56 lines
2.9 KiB
HTML
56 lines
2.9 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">
|
|
<link href="{% static 'css/icons/bootstrap-icons.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>
|
|
{% if base.navbar.has_user %}
|
|
<form action="" method="post" class="ms-auto">
|
|
{% csrf_token %}
|
|
<input type="search" name="qr_search" id="qr_search_field" aria-label="QR Scan" placeholder="QR Search" class="form-control me-2 text-success">
|
|
</form>
|
|
{% endif %}
|
|
<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="{% url 'logout' %}">Logout</a></li>
|
|
{% if base.navbar.show_admin %}
|
|
<li><a class="dropdown-item text-success" href="{% url 'admin:index' %}">Administration</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item"><a href="{% url 'login' %}" class="nav-link{% if base.login_active %} active{% endif %}">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> |