1
0
Fork 0
mirror of https://github.com/Findus23/acronomy.git synced 2024-09-19 15:33:45 +02:00
acronomy/templates/base.html

85 lines
2.8 KiB
HTML
Raw Normal View History

2020-06-01 11:03:21 +02:00
<!DOCTYPE html>
<html lang="de">
2021-05-01 21:28:15 +02:00
{% load django_bootstrap5 %}
2020-07-20 15:54:36 +02:00
{% load static %}
2024-07-02 22:37:09 +02:00
{% load vite %}
2020-06-01 11:03:21 +02:00
<head>
<meta charset="utf-8">
2020-07-30 22:04:06 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1">
2020-06-01 11:03:21 +02:00
<title>{% block title %}Acronomy{% endblock %}</title>
2020-07-27 14:18:47 +02:00
<link rel="icon" href="{% static "images/logo.png" %}" sizes="1024x1024">
<link rel="icon" href="{% static "images/logo.svg" %}" sizes="any" type="image/svg+xml">
2020-06-13 21:18:58 +02:00
{% if debug %}
<link rel="stylesheet" href="{% url "css" %}">
{% else %}
<link rel="stylesheet" href="{% static "css/main.css" %}">
{% endif %}
2020-06-01 11:03:21 +02:00
{% block extra_head %}
{% endblock %}
2020-07-20 15:54:36 +02:00
{% if not debug %}
2020-07-30 22:04:06 +02:00
<script>
2020-07-20 15:54:36 +02:00
var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['setRequestMethod', 'POST']);
_paq.push(["setDoNotTrack", true]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "https://matomo.lw1.at/";
_paq.push(['setTrackerUrl', u + 'statistics.php']);
_paq.push(['setSiteId', '29']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.src = u + 'statistics.js';
s.parentNode.insertBefore(g, s);
})();
</script>
{% endif %}
2020-06-01 11:03:21 +02:00
</head>
<body>
2020-07-08 15:57:25 +02:00
{% if user.is_authenticated %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
2020-07-22 14:30:34 +02:00
<div class="container-fluid">
{% if user.is_staff %}
<a class="navbar-brand" href="{% url 'admin:index' %}">Admin</a>
{% endif %}
2021-03-08 20:37:24 +01:00
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
2020-07-22 14:30:34 +02:00
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
2020-07-30 22:04:06 +02:00
<div class="navbar-nav">
2020-07-22 14:30:34 +02:00
<a class="nav-item nav-link" href="{% url 'add' %}">Add</a>
{% block admin_navbar %}
{% endblock %}
2020-07-30 22:04:06 +02:00
</div>
2020-07-22 14:30:34 +02:00
</div>
2020-07-08 15:57:25 +02:00
</div>
</nav>
{% endif %}
2020-06-01 11:03:21 +02:00
<div class="container {% block containerclasses %}{% endblock %}">
2020-06-02 18:05:58 +02:00
{% bootstrap_messages %}
2020-06-08 20:33:29 +02:00
{% block heading %}
{% endblock %}
2020-06-01 11:03:21 +02:00
<div id="autocomplete" class="autocomplete">
2020-06-13 21:18:58 +02:00
<input placeholder="Search for an acronym"
class="autocomplete-input" {% block searchInput %}{% endblock %}/>
2020-06-01 11:03:21 +02:00
<ul class="autocomplete-result-list"></ul>
</div>
{% block content %}
{% endblock %}
2020-06-15 19:40:55 +02:00
2020-06-01 11:03:21 +02:00
</div>
2020-06-15 19:40:55 +02:00
{% include 'footer.html' %}
2024-07-02 22:37:09 +02:00
{% if debug %}
<script type="module" src="http://localhost:5173/@vite/client"></script>
<script type="module" src="http://localhost:5173/static/main.ts"></script>
{% else %}
<script type="module" async src="{% js_asset_url "main.ts" %}"></script>
{% endif %}
2020-06-01 11:03:21 +02:00
</body>
</html>