li7y/templates/base.html
2024-07-11 01:16:37 +02:00

66 lines
2.2 KiB
HTML

{#
SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% let branding = "li7y" -%}
<!DOCTYPE html>
<html class="h-100">
<head>
<meta charset="utf-8">
<title>{% block title %}{{ branding }}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/vendor/bootstrap.min.css">
</head>
<body class="d-flex flex-column h-100">
<nav class="navbar navbar-expand-lg bg-body-secondary">
<div class="container">
<a class="navbar-brand" href="/">{{ branding }}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-expander">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar-expander">
<ul class="navbar-nav me-auto mb-2 mb-md-0">
<li class="nav-item">
<a class="nav-link{% if req.path() == "/" %} active{% endif %}" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link{% if req.path() == "/items" %} active{% endif %}" href="/items">Items</a>
</li>
<li class="nav-item">
<a class="nav-link{% if req.path() == "/item-classes" %} active{% endif %}" href="/item-classes">Item Classes</a>
</li>
</ul>
</div>
</div>
</nav>
<main class="container my-4">
<div class="d-flex justify-content-between mb-3">
<div>
<h2>{% block page_title %}{% endblock %}</h2>
</div>
<div>
{% block page_actions %}{% endblock %}
</div>
</div>
{% block main %}{% endblock %}
</main>
<footer class="mt-auto py-3 bg-body-tertiary text-body-tertiary">
<div class="container">
<p class="mb-0">li7y is free software, released under the terms of the AGPL v3</p>
</div>
</footer>
<script src="/static/vendor/bootstrap.bundle.min.js"></script>
<script src="/static/app.js"></script>
{# TODO this is not the best way, but it works for now #}
{% block extra_scripts %}{% endblock %}
</body>
</html>