117 lines
5.1 KiB
HTML
117 lines
5.1 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 User-Komponenten-CSS. #}
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='tokens.css') }}">
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='components.css') }}">
|
||
|
||
{# User-Brand-Tokens des aktiven Teams serverseitig überschreiben. |safe wegen
|
||
der Anführungszeichen im Font – Quelle ist Admin/Seed (kein Nutzer-Input). #}
|
||
{% block head_brand %}
|
||
{% if current_team %}
|
||
<style>
|
||
:root {
|
||
--cp-user-brand-primary: {{ current_team.brand_primary }};
|
||
--cp-user-brand-primary-strong: {{ current_team.brand_primary_strong }};
|
||
--cp-user-brand-accent: {{ current_team.brand_accent }};
|
||
--cp-user-brand-accent-strong: {{ current_team.brand_accent_strong }};
|
||
--cp-user-brand-font: {{ current_team.brand_font | safe }};
|
||
}
|
||
</style>
|
||
{% endif %}
|
||
{% endblock %}
|
||
</head>
|
||
<body class="cp-shell-user{% if current_user %} cp-has-nav{% endif %}">
|
||
|
||
{% if current_user %}
|
||
<header class="cp-topbar">
|
||
<a class="cp-topbar__logo" href="{{ url_for('main.index') }}">
|
||
{{ current_team.name if current_team else 'CheckPoint' }}
|
||
</a>
|
||
<div class="cp-topbar__actions">
|
||
{% include "_theme_toggle.html" %}
|
||
<a class="cp-iconbtn" 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>
|
||
<a class="cp-avatar" href="{{ url_for('profil.index') }}"
|
||
aria-label="Profil von {{ current_user.anzeigename }}">
|
||
{% if current_user.profilbild_pfad %}
|
||
<img class="cp-avatar__img" src="{{ url_for('profil.bild', user_id=current_user.id) }}" alt="">
|
||
{%- else -%}
|
||
{%- set teile = current_user.anzeigename.split() -%}
|
||
{{ (teile[0][:1] ~ (teile[1][:1] if teile|length > 1 else ''))|upper }}
|
||
{% endif %}
|
||
</a>
|
||
</div>
|
||
</header>
|
||
{% endif %}
|
||
|
||
<main 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 %}
|
||
</main>
|
||
|
||
{% if current_user %}
|
||
<nav class="cp-bottomnav" aria-label="Hauptnavigation">
|
||
{% set ep = request.endpoint %}
|
||
<a class="cp-navitem" href="{{ url_for('main.index') }}"
|
||
{% if ep == 'main.index' %}aria-current="page"{% endif %}>
|
||
<svg viewBox="0 0 24 24" width="24" height="24" 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-navitem" href="{{ url_for('dienste.meine_termine') }}"
|
||
{% if ep in ['dienste.meine_termine', 'planung.verfuegbarkeit'] %}aria-current="page"{% endif %}>
|
||
<svg viewBox="0 0 24 24" width="24" height="24" 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>Termine</span>
|
||
</a>
|
||
<a class="cp-navitem" href="{{ url_for('main.team') }}"
|
||
{% if ep == 'main.team' %}aria-current="page"{% endif %}>
|
||
<svg viewBox="0 0 24 24" width="24" height="24" 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-navitem" href="{{ url_for('profil.index') }}"
|
||
{% if ep == 'profil.index' %}aria-current="page"{% endif %}>
|
||
<svg viewBox="0 0 24 24" width="24" height="24" 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>
|
||
{% endif %}
|
||
|
||
</body>
|
||
</html>
|