implemented basic menu features

pull/2/head
mtyton 2023-05-07 11:07:22 +02:00
rodzic 2e5c18e7c5
commit 433500090e
2 zmienionych plików z 23 dodań i 11 usunięć

Wyświetl plik

@ -48,7 +48,9 @@
{# Global javascript #} {# Global javascript #}
<script type="text/javascript" src="{% static 'js/artel.js' %}"></script> <script type="text/javascript" src="{% static 'js/artel.js' %}"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
{% block extra_js %} {% block extra_js %}
{# Override this in templates to add extra javascript #} {# Override this in templates to add extra javascript #}

Wyświetl plik

@ -1,18 +1,28 @@
{% load static %} {% load static %}
{% load menu_tags %}
<div class="d-flex flex-column flex-shrink-0 p-3 mr-5" style="width: 280px;"> <div class="d-flex flex-column flex-shrink-0 p-3 mr-5" style="width: 280px;">
<svg class="bi me-2" width="40" height="32"> <svg class="bi me-2" width="40" height="32">
<img src="{% static 'images/las_ruinas_PL.png' %}"/> <img src="{% static 'images/las_ruinas_PL.png' %}"/>
</svg> </svg>
<hr> <hr>
<ul class="nav nav-pills flex-column mb-auto"> <ul class="nav navbar-nav">
{% for item in menu_items %} {% for item in menu_items %}
<li class="nav-item"> <li class="{{ item.active_class }}">
<a href="{{ item.href }}" class="nav-link" aria-current="page"> <a href="{{ item.href }}">{{ item.text }}</a>
{{ item.text }} {% if item.has_children_in_menu %}
</a> <button class="btn btn-toggle" data-target="#ddtoggle_{{ item.link_page.pk }}" data-toggle="collapse"
</li> aria-expanded={% if item.active_class %}"true" {% else %} "false" {% endif %}
{% endfor %} aria-controls="#ddtoggle_{{ item.link_page.pk }}">
</ul> &or;
</button>
{% sub_menu item template="menu/custom_submenu.html" %}
{% endif %}
</li>
{% endfor %}
</ul>
<hr> <hr>
</div> </div>