From 0ce87ba16027349099d244dcc832b89680242233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Lech=C3=A9mia?= Date: Mon, 22 May 2023 18:04:41 +0200 Subject: [PATCH] Fixed navbar and sidenav (#2556) * Fixed navbar and sidenav add toggle btn to hidde sidenav * style --- .../templates/admin/index_layout.html | 34 ++++--- backend/geonature/templates/layout.html | 99 +++++++++++-------- 2 files changed, 78 insertions(+), 55 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 81590f58e3..0bfc4406b9 100644 --- a/backend/geonature/templates/layout.html +++ b/backend/geonature/templates/layout.html @@ -3,69 +3,90 @@ {% 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 %} + + +