read.markets/app/templates/public_base.html
Giorgio Gilestro daa3f79a52 mobile: cache-bust static assets so browser picks up CSS/JS edits
User reported phone still showing old behaviour (Qty/Avg portfolio
columns visible) even though the server-side JS had been updated.
Root cause: every <link>/<script> URL was a plain
/static/css/foo.css with no query string, so mobile Chrome served
the file from its HTTP cache rather than refetching it.

Adds a process-startup timestamp to the Jinja environment as
ASSET_VERSION (computed once when templates_env is imported). Every
<link>/<script> reference now appends `?v={{ ASSET_VERSION }}` so a
container restart bumps the URL and the browser refetches. 38 URLs
across 8 templates updated via sed; tests still pass.

Side benefit: future CSS/JS edits no longer require users to hard-
refresh.
2026-05-28 19:20:49 +02:00

69 lines
2.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}{{ BRAND_NAME }}{% endblock %}</title>
<meta name="description" content="{{ TAGLINE }}">
{# Same flash-prevention theme bootstrap as the app shell. #}
<script>
(function() {
try {
var t = localStorage.getItem('cassandra.theme') || 'light';
document.documentElement.dataset.theme = t;
} catch (e) { document.documentElement.dataset.theme = 'light'; }
})();
</script>
<link rel="stylesheet" href="{{ url_for('static', path='/css/tokens.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/layout.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/panels.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/auth.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/settings.css') }}?v={{ ASSET_VERSION }}" />
<link rel="stylesheet" href="{{ url_for('static', path='/css/public.css') }}?v={{ ASSET_VERSION }}" />
</head>
<body class="public-page">
<div class="public-shell">
<header class="public-header">
<a class="public-header__brand" href="/" aria-label="{{ BRAND_NAME }} home">
{{ BRAND_NAME }}
</a>
<nav class="public-header__nav">
<a href="/pricing" class="{% if request.url.path == '/pricing' %}active{% endif %}">Pricing</a>
<a href="/about" class="{% if request.url.path == '/about' %}active{% endif %}">About</a>
{% if cu and (cu.user or cu.is_admin) %}
<a href="/" class="public-header__cta">Dashboard</a>
{% else %}
<a href="/login" class="public-header__cta">Sign in / sign up</a>
{% endif %}
</nav>
</header>
<main class="public-main">
{% block main %}{% endblock %}
</main>
<footer class="public-footer">
<div class="public-footer__inner">
<div class="public-footer__brand">
<strong>{{ BRAND_NAME }}</strong>
<span class="public-footer__tagline">{{ TAGLINE }}</span>
</div>
<nav class="public-footer__links">
<a href="/pricing">Pricing</a>
<a href="/about">About</a>
<a href="/terms">Terms</a>
<a href="/privacy">Privacy</a>
<a href="/disclaimer">Disclaimer</a>
</nav>
<div class="public-footer__meta">
&copy; 2026 {{ LEGAL_OPERATOR }} &middot;
Not investment advice &middot;
{{ OPERATOR_JURISDICTION }} &middot;
ICO ZC098928 &middot;
Last reviewed 2026-05-24
</div>
</div>
</footer>
</div>
</body>
</html>