Files
kuentagym/frontend/index.html
T
dsantillan 9e580c4794
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Cards you can see through, a splash that waits, and iOS launch screens
**The transparency was there and invisible.** `--glass` was a near-black at 55% alpha, and a
dark film over a dark background reads as solid no matter what the alpha says — so the cards
looked exactly as opaque as before. It is 34% now, the family tint weighs a little more
(14%) and the blur is 10px instead of 16: heavy blur flattens the backdrop into one colour,
which hides the very thing that is supposed to show through.

The opaque `@supports` fallback is gone as well. It was copied from the tab bar, where it is
right — the bar floats over scrolling text — and it is wrong here: a card sits in the page
flow and the only thing behind it is the aura. On any device that took that branch, the
cards were solid by construction.

**The splash now waits, which is what a launch screen does.** It stays until the boot is
finished, with a floor of 1.1s so it can actually be read (a warm boot takes milliseconds,
and a splash that lasts that long is a flicker) and a ceiling of 6s so a request that never
answers cannot hold anybody behind a photograph — their workouts are already local. The mark
pulses slowly while it waits, so it looks like a screen that is loading rather than a
photograph that is stuck.

**The long white is iOS, before any of our code runs.** The deployed HTML already carries
the aura's base colour inline, so what is left is the installed web app's own launch screen:
iOS paints it before the page exists, and without an `apple-touch-startup-image` that
matches the device it paints nothing. Fourteen entries now cover the phone and tablet sizes
the app is opened on, cropped from the same photograph (each device fetches only its own).
build-app-icons.mjs fails when the sizes it generates and the sizes index.html links
disagree, because a missing entry is the blank screen this exists to remove.
2026-09-23 11:47:52 -04:00

79 lines
6.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover,user-scalable=no">
<title>KuentaGYM</title>
<meta name="description" content="Personal gym & body weight tracker">
<meta name="theme-color" content="#0c0e12">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="KuentaGYM">
<!-- use-credentials: browsers fetch the manifest without cookies, even same-origin; behind an auth
proxy (Authelia, Cloudflare Access, Teleport…) that fetch is a login redirect and the Home Screen
icon comes out generic. iOS 26 reads the icon from the manifest, so this is where it shows. -->
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
<link rel="apple-touch-icon" href="icon-180.png">
<link rel="icon" type="image/png" href="icon-180.png">
<!-- iOS launch screens. An installed web app paints this before a line of our code runs, and
without it that screen is blank — the white flash on every open that no CSS can reach. Each
entry is one device's exact pixel size, generated from the same photograph as the in-app splash
by scripts/build-app-icons.mjs, which fails when this list and its own table drift apart.
iOS shows nothing at all when no entry matches, so the table matters more than the file count. -->
<link rel="apple-touch-startup-image" href="startup/750x1334@2.jpg" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" href="startup/1242x2208@3.jpg" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1125x2436@3.jpg" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/828x1792@2.jpg" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" href="startup/1242x2688@3.jpg" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1170x2532@3.jpg" media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1179x2556@3.jpg" media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1206x2622@3.jpg" media="(device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1284x2778@3.jpg" media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1290x2796@3.jpg" media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1320x2868@3.jpg" media="(device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3)">
<link rel="apple-touch-startup-image" href="startup/1536x2048@2.jpg" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" href="startup/1668x2388@2.jpg" media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" href="startup/2048x2732@2.jpg" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)">
<!-- The first paint must not be white. Until the app's stylesheet arrives the browser paints its
own default, which on a cold load — or while a service worker swaps in a new bundle — is a
white flash before the aura's dark base appears. This one rule is that base colour (index.css
keeps the real one, and overrides this the moment it loads, being later in the document).
The script below it does the same job for the two settings that change the look: the app reads
them after boot, which would otherwise flash the default theme at anybody who chose another.
It reads the same localStorage key the store writes (see store/useStore.js) and resolves
'system' exactly the way App.jsx does. Anything unexpected leaves the defaults in place. -->
<style>html,body{background:#100e0b}</style>
<script>
try {
var saved = JSON.parse(localStorage.getItem('gym_state_v1') || '{}')
var de = document.documentElement
var dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
var theme = saved.theme === 'light' || saved.theme === 'dark' ? saved.theme : (dark ? 'dark' : 'light')
de.dataset.theme = theme
if (theme === 'light') document.head.insertAdjacentHTML('beforeend', '<style>html,body{background:#f2f2f7}</style>')
if (saved.accent) de.dataset.accent = saved.accent
} catch (e) { /* a browser with storage blocked still gets the app, just not the no-flash head start */ }
</script>
</head>
<body>
<!-- "Diamond Weave" aura — the atmosphere behind every screen.
Three stacked layers, two of them blurred and composited with mix-blend-mode against the BODY
background, which is why this container must never carry a background-color of its own: the
layers would blend against that instead of the page and the effect washes out. The base colour
lives on body in index.css (warm near-black in the dark theme; the usual light background in
the light theme, where the layers switch to `multiply` for the same reason).
It lives here rather than in React so it exists before the app boots — the splash has
something to sit on — and costs no render. Every layer is decorative: aria-hidden here, and
pointer-events:none in the CSS so it can never eat a tap. -->
<div class="aura" aria-hidden="true">
<div class="aura-layer-1"></div>
<div class="aura-layer-2"></div>
<div class="aura-layer-3"></div>
</div>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>