Seitenleiste mit Icons im Stil der Hauptseite

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-29 07:44:47 +02:00
parent 4ae9591fcd
commit 750428c5b2
3 changed files with 35 additions and 12 deletions

View file

@ -60,7 +60,13 @@ input, select, textarea, button { font: inherit; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; } .sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-heading { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 1.1rem 0.6rem 0.35rem; } .nav-heading { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 1.1rem 0.6rem 0.35rem; }
.nav-link { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.7rem; border-radius: 6px; color: var(--text); } .nav-link { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.7rem; border-radius: 6px; color: var(--text); }
.nav-link > span { flex: 1; }
.nav-link .icon { color: var(--text-muted); flex-shrink: 0; }
.nav-link:hover .icon, .nav-link.active .icon { color: var(--gold); }
.nav-link.disabled .icon { opacity: 0.6; }
.btn-link.logout { display: inline-flex; padding: 0.3rem; border-radius: 6px; }
.btn-link.logout:hover { background: var(--bg-panel-alt); }
.nav-link:hover { background: var(--bg-panel-alt); color: var(--text); text-decoration: none; } .nav-link:hover { background: var(--bg-panel-alt); color: var(--text); text-decoration: none; }
.nav-link.active { background: rgba(201, 162, 39, 0.14); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); } .nav-link.active { background: rgba(201, 162, 39, 0.14); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.nav-link.disabled { color: var(--text-muted); cursor: default; } .nav-link.disabled { color: var(--text-muted); cursor: default; }

View file

@ -1,4 +1,4 @@
<!doctype html> {% from "macros.html" import icon %}<!doctype html>
<html lang="de"> <html lang="de">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -7,7 +7,7 @@
<title>{% block title %}Siel{% endblock %} · Elyos Allianz</title> <title>{% block title %}Siel{% endblock %} · Elyos Allianz</title>
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon-32.png"> <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="apple-touch-icon" href="/static/img/favicon-180.png">
<link rel="stylesheet" href="/static/css/panel.css?v=9"> <link rel="stylesheet" href="/static/css/panel.css?v=10">
</head> </head>
<body> <body>
{% if user %} {% if user %}
@ -21,26 +21,26 @@
<a href="/" class="brand"><img src="/static/img/elyos-allianz-logo.webp" alt="Elyos Allianz"></a> <a href="/" class="brand"><img src="/static/img/elyos-allianz-logo.webp" alt="Elyos Allianz"></a>
<div class="brand-sub">Siel · Verwaltung</div> <div class="brand-sub">Siel · Verwaltung</div>
<nav> <nav>
{% set nav = [("/", "Übersicht", None), ("/allgemein", "Allgemein", "general")] %} {% set nav = [("/", "Übersicht", None, "home"), ("/allgemein", "Allgemein", "general", "settings")] %}
{% for href, label, area in nav %} {% for href, label, area, ic in nav %}
{% if area is none or area in user.areas %} {% if area is none or area in user.areas %}
<a href="{{ href }}" class="nav-link{% if path == href %} active{% endif %}">{{ label }}</a> <a href="{{ href }}" class="nav-link{% if path == href %} active{% endif %}">{{ icon(ic) }}<span>{{ label }}</span></a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<div class="nav-heading">Funktionen</div> <div class="nav-heading">Funktionen</div>
{% for area, label, href in [("welcome", "Begrüßung", "/begruessung"), ("reactionroles", "Reaktionsrollen", "/reaktionsrollen"), ("moderation", "Moderation", "/moderation"), ("tickets", "Tickets", "/tickets"), ("alliance", "Allianz", None)] %} {% 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 area in user.areas %}
{% if href %} {% if href %}
<a href="{{ href }}" class="nav-link{% if path == href or path.startswith(href ~ "/") %} active{% endif %}">{{ label }}</a> <a href="{{ href }}" class="nav-link{% if path == href or path.startswith(href ~ "/") %} active{% endif %}">{{ icon(ic) }}<span>{{ label }}</span></a>
{% else %} {% else %}
<span class="nav-link disabled" title="Kommt bald">{{ label }} <small>bald</small></span> <span class="nav-link disabled" title="Kommt bald">{{ icon(ic) }}<span>{{ label }}</span><small>bald</small></span>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if user.owner %} {% if user.owner %}
<div class="nav-heading">Verwaltung</div> <div class="nav-heading">Verwaltung</div>
<a href="/zugaenge" class="nav-link{% if path == '/zugaenge' %} active{% endif %}">Zugänge</a> <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 %}">Protokoll</a> <a href="/protokoll" class="nav-link{% if path == '/protokoll' %} active{% endif %}">{{ icon("list") }}<span>Protokoll</span></a>
{% endif %} {% endif %}
</nav> </nav>
<div class="me"> <div class="me">
@ -48,7 +48,7 @@
<div class="me-name">{{ user.name }}<small>{{ "Admin" if user.owner else "Zugang" }}</small></div> <div class="me-name">{{ user.name }}<small>{{ "Admin" if user.owner else "Zugang" }}</small></div>
<form method="post" action="/logout"> <form method="post" action="/logout">
<input type="hidden" name="csrf" value="{{ csrf }}"> <input type="hidden" name="csrf" value="{{ csrf }}">
<button type="submit" class="btn-link" title="Abmelden">Abmelden</button> <button type="submit" class="btn-link logout" title="Abmelden">{{ icon("log-out") }}</button>
</form> </form>
</div> </div>
</aside> </aside>

View file

@ -1,3 +1,20 @@
{# Strich-Icons im Stil von lumina-ascendens.de (includes/functions.php, icon()) #}
{% macro icon(name) %}
{%- set paths = {
"home": '<path d="M3 9.5 12 3l9 6.5V20a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z"/>',
"settings": '<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>',
"welcome": '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><line x1="19" y1="8" x2="19" y2="14"/><line x1="22" y1="11" x2="16" y2="11"/>',
"smile": '<circle cx="12" cy="12" r="9"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><line x1="9" y1="9.5" x2="9.01" y2="9.5"/><line x1="15" y1="9.5" x2="15.01" y2="9.5"/>',
"shield": '<path d="M12 21c4.5-1.8 7-5.2 7-9.5V6l-7-3-7 3v5.5c0 4.3 2.5 7.7 7 9.5z"/>',
"ticket": '<path d="M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3a2 2 0 0 0 0-4z"/><line x1="14" y1="5" x2="14" y2="7"/><line x1="14" y1="11" x2="14" y2="13"/><line x1="14" y1="17" x2="14" y2="19"/>',
"users": '<path d="M16 19v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 17.5V19"/><circle cx="9" cy="8" r="3"/><path d="M20 19v-1.5a3.5 3.5 0 0 0-2.5-3.36"/><path d="M14.5 4.6a3 3 0 0 1 0 5.8"/>',
"key": '<circle cx="7.5" cy="15.5" r="4.5"/><path d="m10.7 12.3 9.8-9.8"/><path d="m17 6 3 3"/><path d="m14.5 8.5 2 2"/>',
"list": '<line x1="9" y1="6" x2="20" y2="6"/><line x1="9" y1="12" x2="20" y2="12"/><line x1="9" y1="18" x2="20" y2="18"/><circle cx="4.5" cy="6" r="1"/><circle cx="4.5" cy="12" r="1"/><circle cx="4.5" cy="18" r="1"/>',
"log-out": '<path d="M9 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3"/><path d="m14 16 4-4-4-4"/><path d="M18 12H9"/>',
} -%}
<svg class="icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">{{ paths[name] | safe }}</svg>
{%- endmacro %}
{# Ein/Aus-Schalter (wie bei MEE6) #} {# Ein/Aus-Schalter (wie bei MEE6) #}
{% macro switch(id, checked) %} {% macro switch(id, checked) %}
<label class="switch" title="An/Aus"> <label class="switch" title="An/Aus">