Add cross-language links in the index template.

This commit is contained in:
Julien Palard 2023-01-25 16:07:24 +01:00
parent d9c1fd07ab
commit 42624e9e48
No known key found for this signature in database
GPG key ID: 0EFC1AC1006886F8
3 changed files with 24 additions and 9 deletions

View file

@ -155,6 +155,18 @@ main {
}
}
header {
max-width: 760px;
.translations {
float: right;
.active {
font-weight: 600;
}
}
}
article {
margin: 0 8% 2% 8%;
@ -167,14 +179,6 @@ main {
color: @header-text-color;
font-size: 0.86em;
}
.translations {
float: right;
.active {
font-weight: 600;
}
}
}
code, kbd, samp, pre {

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,17 @@
</script>
{% endif %}
<header>
{% if extra_siteurls %}
<div class="translations">
<a class="active" href="{{ articles_page.url }}">{{ DEFAULT_LANG }}</a>
{% for lang, url in extra_siteurls.items() %}
<a href="{{ url }}/{{ articles_page.url }}">{{ lang }}</a>
{% endfor %}
</div>
{% endif %}
</header>
{% for article in articles_page.object_list %}
<article>
<header>