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
Three things, and the first two were bugs rather than taste. **The launch screen never appeared.** Its condition was `!ready && !authed`, and `authed` is true from the saved profile — so a signed-in person (everybody who has ever opened the app) went straight past it and only a brand-new device ever saw the photo. It now shows for the first half second on every launch, and beyond that only while there is genuinely nothing to show yet (no profile and boot still running, the original behaviour, which stops the login screen flashing before the server config lands). Deliberately not "until ready": boot pulls from the server, and waiting for it would hide the local copy exactly when the network is bad — working from that copy is what the offline mode is for. **The white screen.** Until the app's stylesheet arrives the browser paints its own default, and the aura's dark base only existed in that stylesheet — so a cold load, or a service worker swapping in a new bundle, started white. index.html now carries the base colour inline, and, next to it, a few lines that apply the saved theme and accent before the first paint: the app reads those after boot, which meant everybody who had chosen anything saw the defaults flash first. Same storage key the store writes, same resolution of 'system'. **The cards.** They were solid --surface, which sat on top of the aura and hid it. Salud's tiles and chart panels are glass now — the family tint over a translucent fill, a hairline border in the same tint, and a 16px blur with a saturation lift so what shows through stays readable. The fill is a warm near-black rather than the neutral grey: a cool card over a warm gradient reads as a dirty edge. The token (`--glass`) is defined per theme, and where backdrop-filter is unsupported the cards go back to solid, which is the trade the tab bar already documents — the fallback block sits AFTER the glass rules, or the cascade would have handed it the blur it cannot render. Only Salud's cards are glass so far; the rest of the app is still opaque, which is a bigger decision than this change should make on its own.
59 lines
3.5 KiB
HTML
59 lines
3.5 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">
|
|
<!-- 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>
|