From de03b499d4d57c00338ad3251121e56d87f97a90 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 7 Nov 2021 11:12:16 +0100 Subject: [PATCH] Add language flags --- config.yml | 6 +-- themes/custom/layouts/_default/baseof.html | 14 ++--- themes/custom/static/images/en_lang.svg | 61 ++++++++++++++++++++++ themes/custom/static/images/fr_lang.svg | 3 ++ 4 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 themes/custom/static/images/en_lang.svg create mode 100644 themes/custom/static/images/fr_lang.svg diff --git a/config.yml b/config.yml index 4c24c1f..fad97ef 100644 --- a/config.yml +++ b/config.yml @@ -6,10 +6,8 @@ theme: custom defaultContentLanguage: fr defaultContentLanguageInSubdir: true languages: - fr: - languageName: Français - en: - languageName: English + fr: {} + en: {} # Disables warnings disableKinds: diff --git a/themes/custom/layouts/_default/baseof.html b/themes/custom/layouts/_default/baseof.html index 68f3681..3b3de93 100644 --- a/themes/custom/layouts/_default/baseof.html +++ b/themes/custom/layouts/_default/baseof.html @@ -61,17 +61,19 @@ {{ .Name }} {{- end }} - - - {{ range $.Page.Translations }} - {{ .Language.LanguageName }} - {{ end }} - + + + + {{ range $.Page.Translations }} + + {{ .Language }} + + {{ end }} diff --git a/themes/custom/static/images/en_lang.svg b/themes/custom/static/images/en_lang.svg new file mode 100644 index 0000000..c52d431 --- /dev/null +++ b/themes/custom/static/images/en_lang.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/custom/static/images/fr_lang.svg b/themes/custom/static/images/fr_lang.svg new file mode 100644 index 0000000..da33d8f --- /dev/null +++ b/themes/custom/static/images/fr_lang.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file