From 05c3b8fac9bec7cf54fed20d93fac52e1e97ad97 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Sun, 10 Nov 2019 00:23:06 +0100 Subject: Add language switch at bottom of page --- layouts/partials/docs/footer.html | 24 ++++++++++++++++++++ layouts/partials/docs/git-footer.html | 23 ------------------- layouts/partials/docs/language-switch.html | 14 ------------ layouts/partials/docs/languages.html | 32 +++++++++++++++++++++++++++ layouts/partials/docs/menu-filetree.html | 2 +- layouts/partials/docs/menu.html | 5 ----- layouts/partials/docs/search.html | 2 +- layouts/partials/docs/translation-switch.html | 14 ------------ 8 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 layouts/partials/docs/footer.html delete mode 100644 layouts/partials/docs/git-footer.html delete mode 100644 layouts/partials/docs/language-switch.html create mode 100644 layouts/partials/docs/languages.html delete mode 100644 layouts/partials/docs/translation-switch.html (limited to 'layouts/partials/docs') diff --git a/layouts/partials/docs/footer.html b/layouts/partials/docs/footer.html new file mode 100644 index 0000000..15d1640 --- /dev/null +++ b/layouts/partials/docs/footer.html @@ -0,0 +1,24 @@ +{{ if or .GitInfo .Site.Params.BookEditPath }} + +{{ end }} diff --git a/layouts/partials/docs/git-footer.html b/layouts/partials/docs/git-footer.html deleted file mode 100644 index bf3e4a7..0000000 --- a/layouts/partials/docs/git-footer.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ if or .GitInfo .Site.Params.BookEditPath }} - -{{ end }} diff --git a/layouts/partials/docs/language-switch.html b/layouts/partials/docs/language-switch.html deleted file mode 100644 index 4a84ade..0000000 --- a/layouts/partials/docs/language-switch.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ if .Site.IsMultiLingual }} - -{{ end }} diff --git a/layouts/partials/docs/languages.html b/layouts/partials/docs/languages.html new file mode 100644 index 0000000..d905327 --- /dev/null +++ b/layouts/partials/docs/languages.html @@ -0,0 +1,32 @@ +{{ if .Site.IsMultiLingual }} + +{{ $langs := dict }} +{{ range .Site.Home.AllTranslations }} + {{ $langs = merge $langs (dict .Language.Lang .) }} +{{ end }} +{{ range .Translations }} + {{ $langs = merge $langs (dict .Language.Lang .) }} +{{ end }} + +
+ + + + + +
+{{ end }} diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html index c917828..30fc2ce 100644 --- a/layouts/partials/docs/menu-filetree.html +++ b/layouts/partials/docs/menu-filetree.html @@ -15,7 +15,7 @@ {{ end }} {{ else }} diff --git a/layouts/partials/docs/menu.html b/layouts/partials/docs/menu.html index 3d04b04..6a72ac9 100644 --- a/layouts/partials/docs/menu.html +++ b/layouts/partials/docs/menu.html @@ -10,11 +10,6 @@ {{ end }} {{ partial "docs/inject/menu-after" . }} - -{{ if .Site.IsMultiLingual }} - {{ partial "docs/translation-switch" . }} - {{ partial "docs/language-switch" . }} -{{ end }} diff --git a/layouts/partials/docs/search.html b/layouts/partials/docs/search.html index 17a14eb..5c8b912 100644 --- a/layouts/partials/docs/search.html +++ b/layouts/partials/docs/search.html @@ -1,6 +1,6 @@ {{ if default true .Site.Params.BookSearch }} diff --git a/layouts/partials/docs/translation-switch.html b/layouts/partials/docs/translation-switch.html deleted file mode 100644 index 4ad0f1a..0000000 --- a/layouts/partials/docs/translation-switch.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ if .IsTranslated }} - -{{ end }} \ No newline at end of file -- cgit v1.2.3