Footer now compares the running SOURCE_COMMIT against origin/main via Gitea's compare API and renders "build <sha> (latest)" when up to date or "build <sha> (N behind)" otherwise — so it's obvious from any page whether the deploy is current. Per-SHA cache (60s TTL, 1.5s timeout) keeps the lookup off the hot path in steady state. Network or parse errors return None and the parens suffix is just hidden — the SHA itself always renders, so a flaky git host can never break the layout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
39 lines
1.9 KiB
HTML
39 lines
1.9 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">
|
|
<span class="brand-dot"><img src="/static/didi.webp" alt=""></span>
|
|
<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>
|
|
<footer class="text-center text-xs text-slate-500 py-6">
|
|
Mit ♥ programmiert für Annika
|
|
{% if git_commit_short %}
|
|
<span class="mx-1">·</span>
|
|
<span title="{{ git_commit }}">build {{ git_commit_short }}{% if git_status %} ({{ git_status }}){% endif %}</span>
|
|
{% endif %}
|
|
</footer>
|
|
{% endblock %}
|