From 66e35cf83cca6f5bd4935784a4ae85053bed7416 Mon Sep 17 00:00:00 2001 From: Sunpy Date: Sun, 12 May 2019 19:36:06 +0100 Subject: [PATCH] Change language on login --- templates/layout/bootstrap.html | 2 +- templates/layout/includes/top_nav.html | 2 + templates/login.html | 75 +++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 2 deletions(-) diff --git a/templates/layout/bootstrap.html b/templates/layout/bootstrap.html index 48653a8..a4027b8 100644 --- a/templates/layout/bootstrap.html +++ b/templates/layout/bootstrap.html @@ -3,7 +3,7 @@ {% include 'layout/includes/boot-head.html' %} {% if title %} - Husstanden - {{ title }} + Husstanden - {{ _(title) }} {% else %} Husstanden {% endif %} diff --git a/templates/layout/includes/top_nav.html b/templates/layout/includes/top_nav.html index fcfef00..e1018b4 100644 --- a/templates/layout/includes/top_nav.html +++ b/templates/layout/includes/top_nav.html @@ -72,6 +72,8 @@ {{ _("english") | title }}
+ +
diff --git a/templates/login.html b/templates/login.html index 2f8ccac..d83413c 100644 --- a/templates/login.html +++ b/templates/login.html @@ -18,14 +18,28 @@ html, body { background-color: #000; overflow-x: hidden; padding-top: 20px; + + display: grid; + grid-template-rows: 25% 50% 25%; + height: 100%; } +.sidenav > div:nth-child(1n) { + grid-row-start: 1; + grid-row-end: 2; +} + +.sidenav > div:nth-child(2n) { + grid-row-start: 3; + grid-row-end: 3; + + align-self: end; +} .main { padding: 0px 10px; display: grid; grid-template-rows: 25% auto; - grid-row-gap: 8px; height: 100%; } @@ -94,6 +108,35 @@ html, body { .toggle-form.toggled > form:nth-child(2n) { display: block; } + +.lang-icon { + background-position: left; + background-size: contain; + width: 32px; + height: 24px; + + color: white; + text-align: center; + font-size: 24px; + vertical-align: middle; + display: table-cell; +} + +.lang-en { + background-image: url("{{ url_for('static', filename='const/img/flags/gb.svg') }}"); +} + +.lang-no { + background-image: url("{{ url_for('static', filename='const/img/flags/no.svg') }}"); +} + +.dropdown-menu { + background-color: #6c757d; +} + +.dropdown-menu a { + color: white; +}