network_inventory/src/core/templates/core/base.html

58 lines
1.9 KiB
HTML

{% load django_htmx %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="{% static 'core/css/bootstrap.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'core/css/material-icons.css' %}">
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="{% static 'core/img/favicon.ico' %}" />
<title>Network Inventory</title>
</head>
<body>
<div class="container">
<a href="{% url 'customers' %}">Home</a> |
<a href="{% url 'warranties' %}">Warranties</a> |
{% if request.user.is_superuser %}
<a href="{% url 'all_computers' %}">All Computers</a> |
{% endif %}
{% if user.is_authenticated %}
<a href="{% url 'logout' %}">Logout</a> |
{% else %}
<a href="{% url 'login' %}">Login</a> |
{% endif %}
<h1>{% block section_title %}Device Inventory{% endblock %}</h1>
{% block content %}{% endblock %}
<footer>
{% block footer %}
<div class="row mt-3">
<p class="copyright">Created by Andreas Zweili licensed under GPLv3.0</p>
</div>
{% endblock %}
</footer>
</div>
<script src="{% static 'core/js/htmx.js' %}"></script>
{% django_htmx_script %}
<script>
function closeModal() {
var container = document.getElementById("htmx-modal-position")
var backdrop = document.getElementById("modal-backdrop")
var modal = document.getElementById("modal")
modal.classList.remove("show")
backdrop.classList.remove("show")
setTimeout(function () {
container.removeChild(backdrop)
container.removeChild(modal)
}, 200)
}
</script>
</body>
</html>