Files
Roman c45f1b79fd Cache-busting des assets statiques
Le navigateur servait un CSS périmé après mise à jour (aucun invalidateur
sur /static). Les liens CSS/JS portent désormais ?v=<mtime des fichiers
statiques> : toute modification du design est visible immédiatement chez
tous les clients, sans hard-refresh ni bump manuel de version.
2026-09-25 14:58:42 +00:00

45 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Ohm Stream{% endblock %}</title>
<link rel="stylesheet" href="/static/css/style.css?v={{ asset_v }}">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js"></script>
</head>
<body>
<header class="topbar" x-data="{ username: '', pref: 'both' }" x-init="fetch('/auth/me').then(r => r.json()).then(u => { username = u.username; pref = u.content_preference || 'both'; }).catch(() => {})">
<a class="logo" href="/">OHM<span>STREAM</span></a>
<nav class="topnav">
<a class="{{ 'active' if active == 'discover' }}" href="/discover">Découvrir</a>
<a class="{{ 'active' if active == 'search' }}" href="/">Recherche</a>
<a class="{{ 'active' if active == 'downloads' }}" href="/downloads">Téléchargements</a>
<a class="{{ 'active' if active == 'library' }}" href="/library">Bibliothèque</a>
<a class="{{ 'active' if active == 'favorites' }}" href="/favorites">Favoris</a>
<a class="{{ 'active' if active == 'admin' }}" href="/admin">Admin</a>
</nav>
<div class="topbar-right">
<select class="pref-select" x-model="pref" x-show="username" title="Types de contenus"
@change="fetch('/auth/preferences', { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ content_preference: pref }) }).then(() => location.reload())">
<option value="anime">⛩ Animés</option>
<option value="serie">📺 Séries</option>
<option value="both">✨ Les deux</option>
</select>
<div class="avatar" x-text="username ? username[0] : '·'" :title="username"></div>
<form method="post" action="/auth/logout" style="display:inline">
<button class="icon-btn" type="submit" title="Déconnexion">⏻</button>
</form>
</div>
</header>
<main class="main">
{% block content %}{% endblock %}
</main>
<script src="/static/js/app.js?v={{ asset_v }}"></script>
<script src="/static/js/update-watcher.js?v={{ asset_v }}"></script>
{% block scripts %}{% endblock %}
</body>
</html>