Add hidden language selector to front page and post pages

This commit is contained in:
Philipp Oppermann
2020-02-17 14:51:51 +01:00
parent ea3e89dd00
commit 8ff09b3a62
3 changed files with 24 additions and 1 deletions

View File

@@ -89,4 +89,15 @@
{{ macros::utterances() }}
</section>
<aside class="page-aside-right">
<div class="block hidden" id="language-selector">
<h2>Other Languages</h2>
<ul>
{% for translation in page.translations %}
<li data-lang-switch-to="{{ translation.lang }}" class="hidden"><a href="{{ translation.permalink }}">{{ translation.lang }} {% if translation.lang == "en" %}(original){% endif %}</a></li>
{% endfor %}
</ul>
</div>
</aside>
{% endblock after_main %}