144 lines
7.9 KiB
HTML
144 lines
7.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de"{% if current_theme == 'hell' %} data-theme="light"{% elif current_theme == 'dunkel' %} data-theme="dark"{% endif %}>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}CheckPoint Ehrenamt{% endblock %}</title>
|
|
|
|
{# tokens.css zuerst (Variablen), dann das Admin-Komponenten-CSS. #}
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='tokens.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='components-admin.css') }}">
|
|
|
|
{# Admin-Brand: v1 nutzt die festen Checkpoint-Defaults aus tokens.css
|
|
(das Team-Modell hat keine Admin-Brand-Felder). Ein zweites Team würde hier
|
|
analog zur User-Shell --cp-admin-brand-* serverseitig überschreiben. #}
|
|
{% block head_brand %}{% endblock %}
|
|
</head>
|
|
<body class="cp-shell-admin">
|
|
|
|
{% if current_user %}
|
|
{# Mobile: schmale Topbar mit Hamburger; Sidebar wird zum Off-Canvas-Overlay. #}
|
|
<header class="cp-admin-topbar">
|
|
<button type="button" class="cp-hamburger" data-sidebar-open
|
|
aria-label="Menü öffnen" aria-controls="cp-sidebar" aria-expanded="false">
|
|
<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor"
|
|
stroke-width="2" stroke-linecap="round" aria-hidden="true">
|
|
<path d="M3 6h18M3 12h18M3 18h18"></path>
|
|
</svg>
|
|
</button>
|
|
<span class="cp-admin-topbar__title">{{ current_team.name if current_team else 'CheckPoint' }}</span>
|
|
<a class="cp-iconbtn cp-admin-topbar__bell" href="{{ url_for('main.benachrichtigungen') }}"
|
|
aria-label="Benachrichtigungen{% if benachrichtigungen_ungelesen %} ({{ benachrichtigungen_ungelesen }} ungelesen){% endif %}">
|
|
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor"
|
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.7 21a2 2 0 0 1-3.4 0"></path>
|
|
</svg>
|
|
{% if benachrichtigungen_ungelesen %}<span class="cp-badge">{{ benachrichtigungen_ungelesen }}</span>{% endif %}
|
|
</a>
|
|
</header>
|
|
|
|
<div class="cp-overlay" data-sidebar-close hidden></div>
|
|
|
|
<aside class="cp-sidebar" id="cp-sidebar">
|
|
<div class="cp-sidebar__brand">
|
|
<span>{{ current_team.name if current_team else 'CheckPoint' }}</span>
|
|
<a class="cp-iconbtn cp-sidebar__bell" href="{{ url_for('main.benachrichtigungen') }}"
|
|
aria-label="Benachrichtigungen{% if benachrichtigungen_ungelesen %} ({{ benachrichtigungen_ungelesen }} ungelesen){% endif %}">
|
|
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor"
|
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.7 21a2 2 0 0 1-3.4 0"></path>
|
|
</svg>
|
|
{% if benachrichtigungen_ungelesen %}<span class="cp-badge">{{ benachrichtigungen_ungelesen }}</span>{% endif %}
|
|
</a>
|
|
</div>
|
|
{% set bp = request.blueprint %}
|
|
{% set ep = request.endpoint %}
|
|
<nav class="cp-sidebar__nav" aria-label="Verwaltung">
|
|
<a class="cp-navlink" href="{{ url_for('main.index') }}"
|
|
{% if ep == 'main.index' %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M3 11l9-8 9 8"></path><path d="M5 10v10h14V10"></path>
|
|
</svg><span>Start</span>
|
|
</a>
|
|
<a class="cp-navlink" href="{{ url_for('planung.liste') }}"
|
|
{% if bp == 'planung' %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<rect x="3" y="4" width="18" height="18" rx="2"></rect><path d="M16 2v4M8 2v4M3 10h18"></path>
|
|
</svg><span>Planung</span>
|
|
</a>
|
|
<a class="cp-navlink" href="{{ url_for('dienste.liste') }}"
|
|
{% if bp == 'dienste' and ep != 'dienste.meine_termine' %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>
|
|
</svg><span>Dienste</span>
|
|
</a>
|
|
<a class="cp-navlink" href="{{ url_for('dokumente.freigaben') }}"
|
|
{% if ep in ['dokumente.freigaben', 'dokumente.liste'] %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6M9 15l2 2 4-4"></path>
|
|
</svg><span>Freigaben</span>
|
|
</a>
|
|
<a class="cp-navlink" href="{{ url_for('main.team') }}"
|
|
{% if ep == 'main.team' %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle>
|
|
<path d="M23 21v-2a4 4 0 0 0-3-3.87M16 3.13A4 4 0 0 1 16 11"></path>
|
|
</svg><span>Team</span>
|
|
</a>
|
|
<a class="cp-navlink" href="{{ url_for('chat.kanal', art='ankuendigungen') }}"
|
|
{% if bp == 'chat' %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
</svg><span>Chat-Verwaltung</span>
|
|
</a>
|
|
<a class="cp-navlink" href="{{ url_for('profil.index') }}"
|
|
{% if ep == 'profil.index' %}aria-current="page"{% endif %}>
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>
|
|
</svg><span>Profil</span>
|
|
</a>
|
|
</nav>
|
|
|
|
<div class="cp-sidebar__footer">
|
|
{% include "_theme_toggle.html" %}
|
|
<form method="post" action="{{ url_for('auth.logout') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="cp-navlink cp-navlink--logout">
|
|
<svg class="cp-navlink__icon" viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"></path>
|
|
</svg><span>Abmelden</span>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</aside>
|
|
{% endif %}
|
|
|
|
<main class="cp-admin-main">
|
|
<div class="cp-page">
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
<ul class="cp-flash" role="status">
|
|
{% for message in messages %}
|
|
<li>{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</main>
|
|
|
|
{% if current_user %}
|
|
<script src="{{ url_for('static', filename='sidebar.js') }}" defer></script>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|