diff options
author | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2023-07-27 14:04:30 +0700 |
---|---|---|
committer | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2023-07-27 14:04:30 +0700 |
commit | fa98ab0589d4be1ca89a0538f6826b0037ff9821 (patch) | |
tree | 7c019babc4d02a3b7bc8dfb2fb6550fdc58345c7 /layouts/partials/post-language-switcher.html | |
parent | 890252ec5e659b439165e0d18ca991ef1bfad9ee (diff) | |
download | victor-fa98ab0589d4be1ca89a0538f6826b0037ff9821.tar.gz |
Set up layout and navigation
Diffstat (limited to 'layouts/partials/post-language-switcher.html')
-rw-r--r-- | layouts/partials/post-language-switcher.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/partials/post-language-switcher.html b/layouts/partials/post-language-switcher.html new file mode 100644 index 0000000..162cdf3 --- /dev/null +++ b/layouts/partials/post-language-switcher.html @@ -0,0 +1,16 @@ +{{ if .IsTranslated }} + {{ $pageLang := .Page.Lang}} + <ul class="post-translations"> + {{ range .AllTranslations }} + {{ if eq .Lang $pageLang }} + <li> + {{ upper .Lang }} + </li> + {{ else }} + <li> + <a href="{{ .Permalink }}">{{ upper .Lang }}</a> + </li> + {{ end }} + {{ end }} + </ul> +{{ end }} \ No newline at end of file |