From ad3af456763c8c4ef8e18e720612b9b6b6474508 Mon Sep 17 00:00:00 2001 From: TheoLechemia Date: Mon, 22 May 2023 14:49:51 +0200 Subject: [PATCH 1/2] Fixed navbar and sidenav add toggle btn to hidde sidenav --- backend/geonature/templates/layout.html | 95 +++++++++++++++---------- 1 file changed, 56 insertions(+), 39 deletions(-) diff --git a/backend/geonature/templates/layout.html b/backend/geonature/templates/layout.html index 81590f58e3..aeabf66e27 100644 --- a/backend/geonature/templates/layout.html +++ b/backend/geonature/templates/layout.html @@ -3,22 +3,25 @@ {% extends 'admin/base.html' %} -{% block head_tail %} +{% block head_css %} {{ super() }} {% endblock %} -{% block page_body %} +{% block head_tail %} + +{% endblock %} -
- -
- {% block brand %} -

{{ admin_view.name|capitalize }}

- {% endblock %} - {{ layout.messages() }} + +
+
+ -
+ {{index_layout.menu()}} +
+ +
+ {% block body %} + {% endblock %} +
+
-
+ {% endblock %} + + + From 3e180232ce50758e9d3180509e110af1a786e718 Mon Sep 17 00:00:00 2001 From: TheoLechemia Date: Mon, 22 May 2023 16:59:36 +0200 Subject: [PATCH 2/2] style --- .../templates/admin/index_layout.html | 34 ++++++++++--------- backend/geonature/templates/layout.html | 6 +++- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/backend/geonature/templates/admin/index_layout.html b/backend/geonature/templates/admin/index_layout.html index 95ae680d55..adeac99710 100644 --- a/backend/geonature/templates/admin/index_layout.html +++ b/backend/geonature/templates/admin/index_layout.html @@ -10,36 +10,38 @@ {% set children = item.get_children() %} {%- if children %} + class="list-group-item list-group-item-action main-item"> {{ layout.menu_icon(item) }}{{ item.name }} - {%- for child in children -%} - {%- if child.is_category() -%} - {{ menu(menu_root=[child]) }} - {% else %} - - {{ layout.menu_icon(child) }}{{ child.name }} - + {%- for child in children -%} + {%- if child.is_category() -%} + {{ menu(menu_root=[child]) }} + {% else %} + + + {{ layout.menu_icon(child) }}{{ child.name }} + + + {%- endif %} + {%- endfor %} - {%- endif %} - {%- endfor %} {% endif %} {%- else %} - {%- if item.is_accessible() and item.is_visible() -%} + {%- if item.is_accessible() and item.is_visible() and item.name != 'Accueil' -%} + - {{ layout.menu_icon(item) }}{{ item.name }} + {{ layout.menu_icon(item) }}{{ item.name }} {%- endif -%} {% endif -%} {% endfor %} + {% endmacro %} diff --git a/backend/geonature/templates/layout.html b/backend/geonature/templates/layout.html index aeabf66e27..0bfc4406b9 100644 --- a/backend/geonature/templates/layout.html +++ b/backend/geonature/templates/layout.html @@ -25,6 +25,7 @@ } .main-item { font-weight: bold; + background-color: gainsboro!important; } .child-item { padding-left: 35px; @@ -61,7 +62,10 @@