From edda2c248e88b09369d2cdcddebc24252799ffd6 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Fri, 2 Oct 2020 20:12:21 +0200 Subject: [PATCH] highlight active menu item --- allianceauth/static/css/auth-base.css | 24 +++-- allianceauth/templates/allianceauth/base.html | 92 ++++++++++--------- 2 files changed, 68 insertions(+), 48 deletions(-) diff --git a/allianceauth/static/css/auth-base.css b/allianceauth/static/css/auth-base.css index 73400a1f..32f03efd 100644 --- a/allianceauth/static/css/auth-base.css +++ b/allianceauth/static/css/auth-base.css @@ -53,22 +53,34 @@ ul.list-group.list-group-horizontal > li.list-group-item { .table-aa > thead > tr > th{ border-bottom: 1px solid #f2f2f2; } -.table-aa > thead > tr > th{ +.table-aa > thead > tr > th{ vertical-align: middle; } .table-aa > tbody > tr > td{ border-bottom: 1px solid #f2f2f2; } -.table-aa > tbody > tr > td { +.table-aa > tbody > tr > td { vertical-align: middle; } -.table-aa > tbody > tr:last-child { +.table-aa > tbody > tr:last-child { border-bottom: none; } +/* highlight active menu items +--------------------------------------------------------------------------------------------------------------------- */ +@media all { + .template-light-mode .nav-pills > li > a.active { + background-color: rgb(236, 240, 241); + } + + .template-dark-mode .nav-pills > li > a.active { + background-color: rgb(48, 48, 48); + } +} + /* Small devices (tablets, 768px and up) */ @media (min-width: 768px) { - + /* class for vertically aligning columns in a bootstrap row */ .row.vertical-flexbox-row2 { display: -webkit-box; @@ -77,7 +89,7 @@ ul.list-group.list-group-horizontal > li.list-group-item { display: flex; flex-wrap: wrap; } - + .row.vertical-flexbox-row2 > [class*='col-'] { display: flex; flex-direction: column; @@ -89,4 +101,4 @@ ul.list-group.list-group-horizontal > li.list-group-item { .button-wrapper .btn { margin-bottom:5px; } -} \ No newline at end of file +} diff --git a/allianceauth/templates/allianceauth/base.html b/allianceauth/templates/allianceauth/base.html index ee7db14d..e976c386 100644 --- a/allianceauth/templates/allianceauth/base.html +++ b/allianceauth/templates/allianceauth/base.html @@ -3,52 +3,60 @@ {% load navactive %} - - - - - - - {% include 'allianceauth/icons.html' %} + + + + + + - {% block title %}{% block page_title %}{% endblock page_title %} - Alliance Auth{% endblock title %} + {% include 'allianceauth/icons.html' %} - {% include 'bundles/bootstrap-css.html' %} - {% include 'bundles/fontawesome.html' %} + {% block title %}{% block page_title %}{% endblock page_title %} - Alliance Auth{% endblock title %} - - {% block extra_css %}{% endblock extra_css %} - - -{% if user.is_authenticated %} -
- - {% include 'allianceauth/top-menu.html' %} -
- {% include 'allianceauth/side-menu.html' %} -
- {% if messages %} -
- {% for message in messages %} -
{{ message }}
- {% if not forloop.last %} + {% include 'bundles/bootstrap-css.html' %} + {% include 'bundles/fontawesome.html' %} + + + + {% block extra_css %}{% endblock extra_css %} + + + + {% if user.is_authenticated %} +
+ + {% include 'allianceauth/top-menu.html' %} + +
+ {% include 'allianceauth/side-menu.html' %} +
+ {% if messages %}
+ {% for message in messages %} +
{{ message }}
+ {% if not forloop.last %} +
+ {% endif %} + {% endfor %} {% endif %} - {% endfor %} - {% endif %} - {% block content %} - {% endblock content %} + + {% block content %} + {% endblock content %} +
+
+
-
-
-
-{% endif %} -{% include 'bundles/bootstrap-js.html' %} -{% block extra_javascript %} -{% endblock extra_javascript %} - - + {% endif %} + + {% include 'bundles/bootstrap-js.html' %} + + {% block extra_javascript %} + {% endblock extra_javascript %} + + +