From fcf20219586e4c66d703e249aac5bb6a42a4320d Mon Sep 17 00:00:00 2001 From: Egor Lynko Date: Sun, 17 Jan 2021 17:32:33 +0300 Subject: feat(language-selector): Implement optional language selector (#298) --- layouts/partials/header.html | 4 +++- layouts/partials/header/language-selector.html | 25 +++++++++++++++++++++++++ layouts/partials/slideout.html | 4 +++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/header/language-selector.html (limited to 'layouts/partials') diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3592e88..24d5b37 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -8,6 +8,8 @@ +{{ partial "header/language-selector.html" . }} + \ No newline at end of file + diff --git a/layouts/partials/header/language-selector.html b/layouts/partials/header/language-selector.html new file mode 100644 index 0000000..e28650e --- /dev/null +++ b/layouts/partials/header/language-selector.html @@ -0,0 +1,25 @@ + +{{ if (and (.Site.IsMultiLingual) ($.Site.Params.showLanguageSelector)) }} +
+ +
+{{ end }} diff --git a/layouts/partials/slideout.html b/layouts/partials/slideout.html index 42ed13e..da0885c 100644 --- a/layouts/partials/slideout.html +++ b/layouts/partials/slideout.html @@ -22,4 +22,6 @@ {{- end }} - \ No newline at end of file + + {{ partial "header/language-selector.html" . }} + -- cgit v1.2.3