Files
ani-web/static/index.html
T
jozamudi 731f44b99c watched: single DONE_RATIO source constant replaces the seven hardcoded 0.95 literals
server/app.py DONE_RATIO is injected into index.html like {{VERSION}}, app.js
reads it as window.DONE_RATIO (fallback = same default). Change the threshold
in exactly one place now.
2026-09-21 01:41:44 +00:00

44 lines
1.9 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#0e0f13">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>ani-web</title>
<link rel="icon" href="icon.svg">
<link rel="manifest" href="manifest.webmanifest">
<link rel="stylesheet" href="style.css?v={{VERSION}}">
</head>
<body>
<header>
<a class="logo" href="/">ani-web</a>
<form onsubmit="const q=document.getElementById('q').value.trim(); if(q) location='?q='+encodeURIComponent(q); return false">
<input id="q" placeholder="search anime…" aria-label="search anime" autocomplete="off" autocapitalize="off" spellcheck="false">
</form>
<span id="pill" class="pill"><i class="d"></i><span></span></span>
<span id="me" class="muted"></span>
<div id="menubox" style="display:none">
<button id="menu" class="tiny" aria-label="menu" aria-haspopup="true">☰</button>
<div id="menu-items">
<a id="stats" class="tiny" href="?stats">stats</a>
<button id="logout" class="tiny">logout</button>
<button id="delacct" class="tiny danger">delete account</button>
</div>
</div>
</header>
<main id="main"><p class="muted">Search for an anime to get started.</p></main>
<div id="toasts" aria-live="polite"></div>
<!-- Versioning: ?v={{VERSION}} is replaced by the server (server/app.py index
route) with the git SHA at startup — a correct cache key per commit.
No hand-bumping; JSV in app.js reads the same value from its own URL. -->
<script src="hls.min.js"></script>
<!-- Watched threshold: server injects its DONE_RATIO source constant here;
app.js reads it as DONE_RATIO. Server uses the same value for its stats. -->
<script>window.DONE_RATIO = {{DONE_RATIO}};</script>
<script src="app.js?v={{VERSION}}"></script>
</body>
</html>