49 lines
2.3 KiB
HTML
49 lines
2.3 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
|
<title>{{ base.title }}</title>
|
|
{% block customhead %}
|
|
{% endblock customhead %}
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
|
|
<div class="container">
|
|
<a href="/" class="navbar-brand">{{ base.navbar.brand }}</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navmenu">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navmenu">
|
|
<ul class="navbar-nav">
|
|
{% for item in base.navbar.navitems %}
|
|
<li class="nav-item"><a href="{{ item.link }}" class="nav-link {{ item.active_class }}">{{ item }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
<ul class="navbar-nav ms-auto">
|
|
{% if base.navbar.has_user %}
|
|
<li class="nav-item dropdown">
|
|
<a href="#" class="nav-link dropdown-toggle text-primary" id="navbar-user-dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">{{ base.navbar.username }}</a>
|
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbar-user-dropdown">
|
|
<li><a class="dropdown-item" href="#">Logout</a></li>
|
|
{% if base.navbar.show_admin %}
|
|
<li><a class="dropdown-item text-warning" href="{% url 'admin:index' %}">Administration</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item"><a href="#" class="nav-link">Login</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{% block content %}
|
|
{% endblock content %}
|
|
|
|
<script type="text/javascript" src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
|
</body>
|
|
</html> |