SielBotWebsite/templates/base.html
Maaxxs 750428c5b2 Seitenleiste mit Icons im Stil der Hauptseite
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 07:44:47 +02:00

64 lines
3.5 KiB
HTML

{% from "macros.html" import icon %}<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>{% block title %}Siel{% endblock %} · Elyos Allianz</title>
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon-32.png">
<link rel="apple-touch-icon" href="/static/img/favicon-180.png">
<link rel="stylesheet" href="/static/css/panel.css?v=10">
</head>
<body>
{% if user %}
<div class="shell">
<input type="checkbox" id="nav-toggle" class="nav-toggle" aria-hidden="true">
<header class="topbar">
<label for="nav-toggle" class="topbar-menu" aria-label="Menü">☰</label>
<img src="/static/img/elyos-allianz-logo.webp" alt="Elyos Allianz" class="topbar-logo">
</header>
<aside class="sidebar">
<a href="/" class="brand"><img src="/static/img/elyos-allianz-logo.webp" alt="Elyos Allianz"></a>
<div class="brand-sub">Siel · Verwaltung</div>
<nav>
{% set nav = [("/", "Übersicht", None, "home"), ("/allgemein", "Allgemein", "general", "settings")] %}
{% for href, label, area, ic in nav %}
{% if area is none or area in user.areas %}
<a href="{{ href }}" class="nav-link{% if path == href %} active{% endif %}">{{ icon(ic) }}<span>{{ label }}</span></a>
{% endif %}
{% endfor %}
<div class="nav-heading">Funktionen</div>
{% for area, label, href, ic in [("welcome", "Begrüßung", "/begruessung", "welcome"), ("reactionroles", "Reaktionsrollen", "/reaktionsrollen", "smile"), ("moderation", "Moderation", "/moderation", "shield"), ("tickets", "Tickets", "/tickets", "ticket"), ("alliance", "Allianz", None, "users")] %}
{% if area in user.areas %}
{% if href %}
<a href="{{ href }}" class="nav-link{% if path == href or path.startswith(href ~ "/") %} active{% endif %}">{{ icon(ic) }}<span>{{ label }}</span></a>
{% else %}
<span class="nav-link disabled" title="Kommt bald">{{ icon(ic) }}<span>{{ label }}</span><small>bald</small></span>
{% endif %}
{% endif %}
{% endfor %}
{% if user.owner %}
<div class="nav-heading">Verwaltung</div>
<a href="/zugaenge" class="nav-link{% if path == '/zugaenge' %} active{% endif %}">{{ icon("key") }}<span>Zugänge</span></a>
<a href="/protokoll" class="nav-link{% if path == '/protokoll' %} active{% endif %}">{{ icon("list") }}<span>Protokoll</span></a>
{% endif %}
</nav>
<div class="me">
{% if user.avatar %}<img src="{{ user.avatar }}" alt="" class="avatar">{% endif %}
<div class="me-name">{{ user.name }}<small>{{ "Admin" if user.owner else "Zugang" }}</small></div>
<form method="post" action="/logout">
<input type="hidden" name="csrf" value="{{ csrf }}">
<button type="submit" class="btn-link logout" title="Abmelden">{{ icon("log-out") }}</button>
</form>
</div>
</aside>
<main class="content">
{% for f in flashes %}<div class="flash flash-{{ f.kind }}">{{ f.text }}</div>{% endfor %}
{% block content %}{% endblock %}
</main>
</div>
{% else %}
{% block public %}{% endblock %}
{% endif %}
</body>
</html>