From 629bf4230e81c864d53fd5248f57fb555f8ccc22 Mon Sep 17 00:00:00 2001 From: mipel Date: Fri, 2 Jul 2021 11:38:44 +0200 Subject: [PATCH] Simple navbar implemented --- konova/static/css/konova.css | 23 ++++ locale/de/LC_MESSAGES/django.po | 2 +- templates/anonymous-user-navbar.html | 22 ---- templates/authenticated-user-navbar.html | 128 ----------------------- templates/base.html | 87 +++------------ templates/navbar.html | 47 +++++++++ 6 files changed, 84 insertions(+), 225 deletions(-) create mode 100644 konova/static/css/konova.css delete mode 100644 templates/anonymous-user-navbar.html delete mode 100644 templates/authenticated-user-navbar.html create mode 100644 templates/navbar.html diff --git a/konova/static/css/konova.css b/konova/static/css/konova.css new file mode 100644 index 0000000..794ff84 --- /dev/null +++ b/konova/static/css/konova.css @@ -0,0 +1,23 @@ +/* +Declare some basic colours +*/ +:root{ + --rlp-red: #871d33; + --rlp-grey-dark: #8e8e8e; + --rlp-grey-light: #c6c6c6; +} + + +.nav{ + background-color: var(--rlp-red); + height: 50px; +} + +.menu-elem{ + border-left: 1px solid white; + border-right: 1px solid white; +} + +.nav-btn{ + color: white; +} \ No newline at end of file diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 2f712ed..8fe31e9 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -224,7 +224,7 @@ msgstr "Neues Ökokonto hinzufügen" #: konova/settings.py:62 msgid "Edit eco account" -msgstr "Ökokonto" +msgstr "Ökokonto bearbeiten" #: konova/settings.py:63 msgid "Delete eco account" diff --git a/templates/anonymous-user-navbar.html b/templates/anonymous-user-navbar.html deleted file mode 100644 index 0836ac0..0000000 --- a/templates/anonymous-user-navbar.html +++ /dev/null @@ -1,22 +0,0 @@ -{% load i18n %} -
- -
\ No newline at end of file diff --git a/templates/authenticated-user-navbar.html b/templates/authenticated-user-navbar.html deleted file mode 100644 index 9e977ae..0000000 --- a/templates/authenticated-user-navbar.html +++ /dev/null @@ -1,128 +0,0 @@ -{% load i18n %} - -
- -
- -
- {% trans 'You are currently working as ' %} - {{ current_role.type }} ({{ current_role.org }}) - {% trans 'Change...' %} -
\ No newline at end of file diff --git a/templates/base.html b/templates/base.html index cf7e2ea..471fba8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,5 +1,5 @@ -{% load static i18n fontawesome_5 %} +{% load static i18n fontawesome_5 bootstrap4 %} @@ -7,89 +7,28 @@ {% bootstrap_css %} {% bootstrap_javascript jquery='full' %} {% fontawesome_5_static %} + {% block head %} {% endblock %} -{% if render_header %} -
-
-
-
-

{{ base_frontend_title }}

-
-
- -
-
-
-{% endif %} -
- - -
-
- {% for message in messages %} -
- {{ message }} -
- {% endfor %} -
+
+ {% block header %} + {% include 'navbar.html' %} + {% endblock %} +
+
-
-
- {% block body %} -
- {% block body_left %} -   - {% endblock %} -
-
- {% block body_middle %} - {% endblock %} -
-
- {% block body_right %} -   - {% endblock %} -
- {% endblock %} -
-
-
-