1. New /admin route with sub-tabs (Protokoll, Benutzer) for admins. Top nav: "Protokoll" dropped, "Admin" added right of Einstellungen. /logs and /einstellungen/benutzer issue 301 redirects to the new paths. Benutzer is no longer part of Einstellungen sub-nav. 2. User_filters.max_age_hours (migration v6) — new dropdown (1–10 h / beliebig) under Einstellungen → Filter; Wohnungen list drops flats older than the cutoff by discovered_at. 3. Header shows "aktualisiert vor X s" instead of a countdown. Template emits data-counter-up-utc with last_alert_heartbeat; app.js ticks up each second. When a scrape runs, the heartbeat updates and the HTMX swap resets the counter naturally. 4. Chevron state synced after HTMX swaps: panes preserved via hx-preserve keep the user's open/closed state, and the sibling button's .open class is re-applied by syncFlatExpandState() on afterSwap — previously a scroll-triggered poll would flip the chevron back to closed while the pane stayed open. 5. "Final absenden" footer removed from the profile page (functionality is unchanged, the switch still sits atop Wohnungen). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1.7 KiB
HTML
37 lines
1.7 KiB
HTML
{#
|
|
Shared layout: top bar with brand + user + logout, tab nav, body container.
|
|
Used by every authenticated view via `{% extends "_layout.html" %}`.
|
|
#}
|
|
{% extends "base.html" %}
|
|
{% block body %}
|
|
<header class="border-b border-soft bg-white/70 backdrop-blur sticky top-0 z-10">
|
|
<div class="max-w-6xl mx-auto px-6 py-3 flex items-center justify-between">
|
|
<div class="flex items-center gap-3">
|
|
<div class="brand-dot"></div>
|
|
<h1 class="text-xl font-semibold">lazyflat</h1>
|
|
</div>
|
|
<div class="flex items-center gap-4 text-sm">
|
|
<span class="text-slate-500">{{ user.username }}{% if is_admin %} · <span class="chip chip-info">Administrator</span>{% endif %}</span>
|
|
<form method="post" action="/logout">
|
|
<button class="btn btn-ghost text-sm" type="submit">Abmelden</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<nav class="max-w-6xl mx-auto px-6 flex border-b border-soft -mb-px">
|
|
<a class="tab {% if active_tab=='wohnungen' %}active{% endif %}" href="/">Wohnungen</a>
|
|
<a class="tab {% if active_tab=='bewerbungen' %}active{% endif %}" href="/bewerbungen">Bewerbungen</a>
|
|
<a class="tab {% if active_tab=='einstellungen' %}active{% endif %}" href="/einstellungen">Einstellungen</a>
|
|
{% if is_admin %}
|
|
<a class="tab {% if active_tab=='admin' %}active{% endif %}" href="/admin">Admin</a>
|
|
{% endif %}
|
|
</nav>
|
|
</header>
|
|
<main class="max-w-6xl mx-auto px-6 py-6 space-y-6">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
{% if user.username == 'annika' %}
|
|
<footer class="text-center text-xs text-slate-500 py-6">
|
|
Programmiert für Annika ♥
|
|
</footer>
|
|
{% endif %}
|
|
{% endblock %}
|