Salud: Today by default, chart panels, and an aura behind the whole app
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 the screen was missing, plus the launch photo.

**Today.** The period filter started at 30 days, which buried the question a five-minute
cadence exists to answer: what do the numbers say right now? "Today" is now first and the
default, and it means today — the grid drops metrics nobody has measured today (the scale
is not stepped on every morning), and if nothing has come in yet the grid falls back to
everything and says so rather than showing an empty screen. The number on every card was
always the newest reading; what is new is that the card says which day it is and when it
landed ("hoy · hace 12 min"), so the claim can be checked instead of trusted. The screen
also refreshes itself every minute while it is open, which is what makes a five-minute
cadence visible.

The filter and the charts want different windows, and the view keeps them apart: a
sparkline or a trend needs history, so the fetch never asks for less than a week even in
"Today", and anything labelled with a window says which one it is. (The alternative —
fetching one day and drawing nothing — would have made Today the one mode with no charts.)

**Chart panels.** Every tile carries a 52px sparkline, which shows a shape and cannot be
read. The first few metrics in the catalogue's own order now get a full-width panel each:
axes, the window's min / avg / max, and the card's own colour, so a panel and its tile are
recognisably the same metric.

**The aura.** index.html carries the three "Diamond Weave" layers and index.css puts the
base colour on `body` where the blend modes composite against it, with `#app` lifted to
z-index 1 so the absolutely-positioned layers cannot paint over the page (everything modal
was already higher). Dark keeps `screen`; the light theme switches the same layers to
`multiply`, because screened amber over white is amber that has been washed away. The blur
radii follow the spec per breakpoint, and the layers are fixed rather than absolute so
scrolling never repaints two 200px blurs.

**The launch screen.** assets/splash.jpg is a 3862×5786 photograph from a camera, so
nothing ships it raw: build-app-icons.mjs now derives public/splash.webp (1170px wide, 62 KB
— WebP because it is a photo) for the boot screen and resources/splash.jpg (2732×2732,
fitted on the aura's base colour rather than cropped, so a portrait composition survives)
for @capacitor/assets. The 12 MB original is gitignored: the derived files are committed,
so a clone still builds, and the script says what is missing when regeneration is asked for
without it.
This commit is contained in:
dsantillan committed 2026-09-23 11:32:51 -04:00
1 parent 3b7c9011c4
commit c3c1c2836c
15 files changed
+374 -27

No files matched your search

+70 -1
View File
@@ -164,7 +164,57 @@ button,.chip,.tile,.item,.wday,.cal-d,.swatch,.hm-c,.lrow,.seg button,.stp butto
#app{
padding:calc(var(--sat) + 8px) var(--pad) calc(88px + var(--sab));
max-width:560px;margin:0 auto;
/* Above the aura (index.html): its layers are absolutely positioned and would otherwise paint
over the page, since a positioned box paints above static content no matter where it sits in
the DOM. Everything modal already sits higher — #modal-root is 100, the tab bar 50. */
position:relative;z-index:1;
}
/* ================= Aura background ("Diamond Weave") =======================================
The base colour goes on BODY, never on the container: the two blurred layers use
mix-blend-mode, and a blend composites against what is painted behind the element — the page
background. Put the colour on the container and they blend with that instead, which is what
turns this effect into a flat brown smear.
Dark theme: `screen` over the warm near-black below, which is what the gradient was tuned for.
Light theme: the same layers with `multiply`, because `screen` over a white surface washes the
colour away completely (the spec's own note). Nothing else changes — same geometry, same hues.
`position: fixed` rather than absolute so scrolling never repaints two 200px blurs, and
`will-change: transform` keeps each blurred layer on its own GPU texture. */
:root[data-theme="dark"] body{background-color:#100e0b}
.aura{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.aura-layer-1,.aura-layer-2,.aura-layer-3{position:absolute;inset:0;pointer-events:none;transform:translateZ(0);will-change:transform}
.aura-layer-1{
mix-blend-mode:normal;
background:
repeating-linear-gradient(45deg,transparent,transparent 30px,rgba(245,158,11,.08) 30px,rgba(245,158,11,.08) 31px),
repeating-linear-gradient(-45deg,transparent,transparent 30px,rgba(245,158,11,.08) 30px,rgba(245,158,11,.08) 31px);
}
.aura-layer-2{
mix-blend-mode:screen;filter:blur(200px);
background:radial-gradient(circle at 50% 50%,rgba(245,158,11,.5) 0%,transparent 45%);
}
.aura-layer-3{
mix-blend-mode:screen;filter:blur(125px);
background:radial-gradient(circle at 20% 80%,rgba(217,119,6,.3) 0%,transparent 35%);
}
/* Wider screens get the desktop blur radii from the spec; phones keep the smaller ones, which are
cheaper and read the same at that size. */
@media (min-width:700px){
.aura-layer-2{filter:blur(260px)}
.aura-layer-3{filter:blur(180px)}
}
/* Light theme: multiply, so the amber darkens the pale background instead of being screened into
nothing. Same layers, same colours, opposite blend. */
:root[data-theme="light"] .aura-layer-2,
:root[data-theme="light"] .aura-layer-3{mix-blend-mode:multiply}
/* The launch screen, while the profile is being read. The photo fills the viewport and the app's
own mark sits on it, over a soft darkening so the logo never fights a busy part of the image.
public/splash.webp is derived from assets/splash.jpg by scripts/build-app-icons.mjs. */
.boot-splash{position:fixed;inset:0;z-index:1;display:grid;place-items:center;overflow:hidden}
.boot-splash img.boot-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.boot-splash::after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,transparent 30%,rgba(16,14,11,.55) 100%)}
.boot-splash img.boot-logo{position:relative;width:104px;height:auto;filter:drop-shadow(0 8px 24px rgba(0,0,0,.45))}
/* Keep the last workout controls clear of the mobile overlays without adding a second
screenful of blank scroll space. The stacked rest timer needs the larger reserve. */
body.resting #app{padding-bottom:calc(206px + var(--sab))}
@@ -396,7 +446,6 @@ h4.sec{
is the transparent PNG (public/logo.png, generated by scripts/build-app-icons.mjs), so it sits
on whatever background the screen already has rather than carrying a plate of its own. */
.brand{display:block;width:88px;height:auto;margin:0 auto}
.brand.boot{width:56px;opacity:.85}
/* NOTE on every backdrop-filter pair in this file: the -webkit- line comes first and the
standard property last, which is the order a prefixed/standard pair wants — whichever is
@@ -1290,6 +1339,26 @@ body.chips-dragging *{cursor:inherit}
.vh-trend .icn{font-size:13px;--icon-stroke:2.2}
.vh-spark{margin:2px -6px -4px;height:36px;overflow:hidden}
.vh-spark-ph{height:36px}
/* Which day the number is from, and when it landed. Dim and small on purpose: it is the footnote
to a 26px number, not a second number. `.vh-ago` brings its own separator so the two can be
written as siblings without the view threading punctuation through a translation. */
.vh-when{margin-top:3px;font-size:11px;color:var(--label-3);letter-spacing:0}
.vh-when .vh-ago::before{content:' · '}
/* --- the chart panels -----------------------------------------------------
Full-width panels for the few metrics people open this screen for. Same `--tint` contract as
the tiles, so a panel and its card are recognisably the same metric. */
.vh-charts{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.vh-tchart{--tint:var(--grey);width:100%;text-align:left;display:block;font:inherit;color:inherit;
padding:12px 10px 6px;background:color-mix(in srgb,var(--tint) 6%,var(--surface))}
.vh-tchart:active{background:color-mix(in srgb,var(--tint) 12%,var(--surface-2))}
.vh-tchart-hd{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 2px;margin-bottom:2px}
.vh-tchart-t{display:flex;align-items:center;gap:5px;font-size:14px;font-weight:500;color:var(--label-2)}
.vh-tchart-t .icn{font-size:15px;color:var(--tint)}
.vh-tchart-v{font-size:22px;font-weight:600;letter-spacing:-.022em;color:var(--tint);font-variant-numeric:tabular-nums}
.vh-tchart-v i{margin-left:3px;font-size:12px;font-weight:500;font-style:normal;color:var(--label-2)}
.vh-tchart-ft{display:flex;gap:12px;padding:0 2px;margin-top:1px;font-size:11.5px;color:var(--label-3);font-variant-numeric:tabular-nums}
.vh-window{font-weight:400;color:var(--label-3);text-transform:none;letter-spacing:0}
.vh-sheet-top{margin:2px 0 12px}
.vh-chart{padding:6px 4px 2px;margin-bottom:4px}