Cloudflare was caching /static/style.css and /static/app.js at the edge for up to 4 hours (its default Browser Cache TTL, since the app sets no explicit Cache-Control), so deploys could look like they hadn't landed even though the origin was already up to date. A content hash of style.css/app.js/htmx.min.js, computed once at startup, is now appended as ?v=<hash> to their URLs in base.html, so every deploy that changes those files produces new, never-cached URLs and needs no manual cache purge. Also commits the live-sync-updates design spec, which was written but never staged earlier in the session. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
40 lines
1.8 KiB
HTML
40 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}MyWhoosh Garmin Sync{% endblock %}</title>
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16.png">
|
|
<link rel="shortcut icon" href="/static/favicon.ico">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
|
<link rel="stylesheet" href="/static/style.css?v={{ static_version }}">
|
|
<script src="/static/htmx.min.js?v={{ static_version }}" defer></script>
|
|
<script src="/static/app.js?v={{ static_version }}" defer></script>
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<span class="brand"><img src="/static/logo.png" alt="" class="brand-logo" width="28" height="28">MyWhoosh → Garmin Sync</span>
|
|
<div class="topbar-right">
|
|
<nav>
|
|
{% if request.session.get('admin_authenticated') %}
|
|
<a href="/">Dashboard</a>
|
|
<a href="/system">System</a>
|
|
{% endif %}
|
|
{% if request.session.get('self_service_user_id') %}
|
|
<a href="/account">My Account</a>
|
|
{% endif %}
|
|
</nav>
|
|
{% set next_tick = next_sync_tick(request) %}
|
|
{% if next_tick %}
|
|
<span class="sync-status">Next sync: <time class="next-sync" datetime="{{ next_tick.isoformat() }}" data-utc="{{ next_tick.isoformat() }}">{{ next_tick.strftime('%Y-%m-%d %H:%M UTC') }}</time></span>
|
|
{% endif %}
|
|
</div>
|
|
</header>
|
|
<main class="container">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
<div id="toast-container" class="toast-container"></div>
|
|
</body>
|
|
</html>
|