mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-10-14 02:31:58 +00:00
more flexible navbar code in base template
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
{% set title = 'nopaque' %}
|
||||
{% endif %}
|
||||
|
||||
{% if navbar_fixed is not defined %}
|
||||
{% set navbar_fixed = true %}
|
||||
{% endif %}
|
||||
|
||||
{% if navbar_extended is not defined %}
|
||||
{% set navbar_extended = false %}
|
||||
{% endif %}
|
||||
|
||||
{% block doc %}
|
||||
<!DOCTYPE html>
|
||||
<html {% block html_attribs %}lang="en"{% endblock html_attribs %}>
|
||||
@@ -27,9 +35,27 @@
|
||||
{% block body %}
|
||||
<header {% block header_attribs %}{% endblock header_attribs %}>
|
||||
{% block header %}
|
||||
{% block navbar %}
|
||||
{% include "_base/navbar.html.j2" %}
|
||||
{% endblock navbar %}
|
||||
{% if navbar_fixed %}
|
||||
<div class="navbar-fixed">
|
||||
{% endif %}
|
||||
<nav {% block navbar_attribs %}{% if navbar_extended %}class="nav-extended"{% endif %}{% endblock navbar_attribs %}>
|
||||
{% block navbar %}
|
||||
<div {% block navbar_primary_content_attribs %}class="nav-wrapper primary-color"{% endblock navbar_primary_content_attribs %}>
|
||||
{% block navbar_primary_content %}
|
||||
{% include "_base/navbar_primary_content.html.j2" %}
|
||||
{% endblock navbar_primary_content %}
|
||||
</div>
|
||||
{% if navbar_extended %}
|
||||
<div {% block navbar_secondary_content_attribs %}class="nav-content primary-variant-color"{% endblock navbar_secondary_content_attribs %}>
|
||||
{% block navbar_secondary_content %}
|
||||
{% endblock navbar_secondary_content %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock navbar %}
|
||||
</nav>
|
||||
{% if navbar_fixed %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% block sidenav %}
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include "_base/sidenav.html.j2" %}
|
||||
@@ -41,6 +67,7 @@
|
||||
<main {% block main_attribs %}class="background-color"{% endblock main_attribs %}>
|
||||
{% block main %}
|
||||
{% block page_content %}{% endblock page_content %}
|
||||
{% endblock main %}
|
||||
|
||||
<div id="dropdowns">
|
||||
{% block dropdowns %}
|
||||
@@ -53,7 +80,6 @@
|
||||
{% include "_base/modals.html.j2" %}
|
||||
{% endblock modals %}
|
||||
</div>
|
||||
{% endblock main %}
|
||||
</main>
|
||||
|
||||
<footer {% block footer_attribs %}class="page-footer primary-variant-color"{% endblock footer_attribs %}>
|
||||
@@ -62,9 +88,11 @@
|
||||
{% endblock footer %}
|
||||
</footer>
|
||||
|
||||
{% block scripts %}
|
||||
{% include "_base/scripts.html.j2" %}
|
||||
{% endblock scripts %}
|
||||
<div id="scripts">
|
||||
{% block scripts %}
|
||||
{% include "_base/scripts.html.j2" %}
|
||||
{% endblock scripts %}
|
||||
</div>
|
||||
{% endblock body %}
|
||||
</body>
|
||||
{% endblock html %}
|
||||
|
Reference in New Issue
Block a user