Mercurial > libervia-templates
diff sat_templates/templates/default/static/styles.css @ 183:240bbac435f4
base: implemented language button:
- `component.menu` can now be used with a `{% call %}`, allowing extra HTML to be added after in the <nav> element
- a language dropdown is shown if more than one translation is available, allowing to change page locale
- if javascript is available, only the dropdown is visible, and changing it reload the page with new locale
- if javascript is not available, a submit button is display to change the locale
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 10 Apr 2019 21:05:58 +0200 |
parents | 29214fa3a53b |
children | e85122a39e8f |
line wrap: on
line diff
--- a/sat_templates/templates/default/static/styles.css Wed Apr 10 21:05:56 2019 +0200 +++ b/sat_templates/templates/default/static/styles.css Wed Apr 10 21:05:58 2019 +0200 @@ -791,15 +791,20 @@ .main_menu { min-width: 200px; - /* background-color: #eaeaea; */ background-color: #333; color: white; overflow: auto; + display: flex; + flex-direction: column; + flex-shrink: 0; + justify-content: space-between; + padding-bottom: 0.5em; } .main_menu ul { flex-direction: row; flex-wrap: wrap; + margin-bottom: 0.2em; } .main_menu li { @@ -819,6 +824,31 @@ font-weight: bold; } +.menu__language { + display: flex; + flex-direction: row; + justify-content: center; + padding: 0 0.3em; +} + +.menu__language select { + border: none; + font-size: 0.8em; +} + +.menu__language button { + display: none; + border: none; + background-color: var(--color-prim--light); + margin-left: 1em; + font-size: 0.8em; +} + +.menu__language button:hover { + background-color: var(--color-prim--dark); + cursor: pointer; +} + .category_menu ul { justify-content: center; } @@ -1310,4 +1340,5 @@ flex-direction: column; padding-left: 2em; } + }