Files

28 lines
1.3 KiB
HTML
Raw Permalink Normal View History

{% import "_ui.html" as ui %}
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}ros_control{% endblock %}</title>
<link rel="stylesheet" href="/static/style.css">
<script src="/static/htmx.min.js"></script>
<script src="/static/app.js" defer></script>
</head>
<body>
{% if request.session.get("user") %}
{% set nav = [("Устройства", "/", "devices"), ("Группы", "/groups", "groups"), ("Резервные копии", "/backups", "backups"), ("Журнал", "/events", "events")] %}
<header class="app-header">
<a class="brand" href="/"><span class="brand-logo">{{ ui.icon("router") }}</span>ros_control</a>
<nav class="nav" aria-label="Разделы">
{% for title, href, key in nav %}<a href="{{ href }}" class="{{ 'on' if section == key }}">{{ title }}</a>{% endfor %}
</nav>
<span class="grow"></span>
<span class="user">{{ request.session.get("user") }}</span>
<form method="post" action="/logout"><button class="btn ghost-n">Выйти</button></form>
</header>
{% endif %}
<main class="container">{% block content %}{% endblock %}</main>
<dialog id="modal" class="modal" aria-labelledby="modal-title"><div id="modal-body"></div></dialog>
</body>
</html>