diff options
author | Tina <feministclickback@mail36.net> | 2020-05-09 21:00:49 +0300 |
---|---|---|
committer | Tina <feministclickback@mail36.net> | 2020-05-09 21:00:49 +0300 |
commit | de303af180fcfd15b23c16889d61b947c9102166 (patch) | |
tree | d5b9564e17235e7a72e6ba01df4b866e03c8152d | |
parent | d3fe6dbda5f06a271d4808c66d4faf7de84b35ba (diff) |
Integrate language switcher in header layout
This adds an additional CSS class to the header if Site.Params.Language
Switcher.show is set to `true`, changing the CSS grid so it integrates
the language switcher.
-rw-r--r-- | assets/css/style.css | 6 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/assets/css/style.css b/assets/css/style.css index ab0802a..4755b21 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -587,7 +587,7 @@ /* LANGUAGE SWITCHER */ .LangNav { display: flex; - justify-content: flex-start; + justify-content: flex-end; align-items: center; margin: 1rem 4.5rem; } @@ -599,3 +599,7 @@ span.language.active { opacity: 0.5; } + +.header.has-LangNav { + grid-template-columns: auto 1fr auto; +} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 4253522..9cda72b 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,4 @@ -<header class="header"> +<header class="header {{ if $.Site.Params.languageSwitcher.show }} has-LangNav{{ end }}"> <div class="header__title"> <a href="{{ $.Site.BaseURL }}" class="header__title__link" alt="Home"> {{ if $.Site.Params.logo }} |