Browse Source

add basic support for post translations (#144)

tags/2.38
Jan Steinke 6 years ago
parent
commit
85d9218877
2 changed files with 11 additions and 0 deletions
  1. 10
    0
      layouts/partials/i18nlist.html
  2. 1
    0
      layouts/partials/site-navigation.html

+ 10
- 0
layouts/partials/i18nlist.html View File

@@ -0,0 +1,10 @@
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul class="pl0 mr3">
{{ range .Translations }}
<li class="list f5 f4-ns fw4 dib pr3">
<a class="hover-white no-underline white-90" href="{{ .Permalink }}">{{ .Lang }}</a>
</li>
{{ end}}
</ul>
{{ end }}

+ 1
- 0
layouts/partials/site-navigation.html View File

@@ -4,6 +4,7 @@
{{ .Site.Title }}
</a>
<div class="flex-l items-center">
{{ partial "i18nlist.html" . }}
{{ if .Site.Menus.main }}
<ul class="pl0 mr3">
{{ range .Site.Menus.main }}

Loading…
Cancel
Save