The app's own mark: assets/logoym.png becomes the icon, the brand, and the Start button
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

Every icon the app ships now comes from one source image, generated rather than drawn:
frontend/scripts/build-app-icons.mjs writes public/icon-512.png (declared "any maskable"
in the manifest, hence an opaque square), public/icon-180.png (iOS home screen and
favicon), public/logo.png (transparent, for the UI) and resources/icon.png (the
@capacitor/assets source for the native shells).

The file was a PNG despite its .jpeg name — it has a real alpha channel — so it is
assets/logoym.png now. It is the file the owner dropped in, and the icons are derived
from it, which is what keeps the PWA icon, the home-screen icon, the in-app mark and the
native icon from ever drifting apart.

The emblem is dark green (its most common colour is #031808, its accents are greens too)
with transparent corners, which decides two things. The icon squares are filled with that
same dark green and the mark is centred at 88% of the canvas: the corners blend into it,
the maskable safe circle stays clean, and a transparent icon can't disappear on a dark
home screen. And the tab bar's Start button keeps the accent as a RING instead of a fill —
on the old lime disc the emblem would have read as a dark blob. The ring still marks the
primary action, and it still turns orange with the pulse while a session is running, with
the label underneath saying Start / Resume / Workout, so nothing that button communicated
was lost by swapping its glyph for the mark.

Login, the mobile onboarding and the boot placeholder in App.jsx showed the dumbbell glyph
as a stand-in for the brand; they all show the mark now, so the app cannot flash a
different logo on its way in. Three now-unused Icon imports go with it.

Icons are written as 256-colour palettes: measured against the full RGBA versions the mean
per-channel error is 1.5/255, invisible, and the files are ~2.5× smaller (161 KB for
everything the browser downloads, against 532 KB of source). Transparency survives it as
the palette's own alpha entries — verified, not assumed.

docs/MOBILE.md says how to regenerate and why resources/icon.svg is now inert
(@capacitor/assets tries .png before .svg, so the new icon.png wins), and that comment is
repeated in the SVG itself so nobody edits the file that no longer decides anything.
This commit is contained in:
dsantillan committed 2026-09-23 10:41:33 -04:00
1 parent ba37ef8a44
commit c150101232
14 files changed
+146 -25

No files matched your search

+24 -9
View File
@@ -361,21 +361,28 @@ h4.sec{
#tabbar button.on{color:var(--acc)}
#tabbar button.on .icn{--icon-stroke:2;color:inherit;opacity:1}
#tabbar button.start{margin-top:-24px}
/* The disc carries the app's own mark (public/logo.png, generated from assets/logoym.png by
scripts/build-app-icons.mjs) instead of a glyph, so it keeps the accent as a RING rather than as
a fill: the emblem is dark green, and on a lime disc it would read as a dark blob. The ring is
what still marks this as the primary action against the dark bar, and it turns orange while a
session is running — the state the old play glyph carried, alongside the label underneath.
The fill is the emblem's own darkest green, so the corners it does not cover blend into it. */
#tabbar button.start .cir{
width:52px;height:52px;border-radius:50%;background:var(--acc);color:var(--on-acc);
width:52px;height:52px;border-radius:50%;background:#031808;
border:2px solid var(--acc);
display:flex;align-items:center;justify-content:center;position:relative;
box-shadow:0 6px 18px -4px color-mix(in srgb,var(--acc) 55%,transparent);
transition:transform var(--fast) var(--ease);
transition:transform var(--fast) var(--ease),border-color var(--fast);
}
#tabbar button.start:active .cir{transform:scale(.93)}
#tabbar button.start .cir .icn{font-size:26px;--icon-stroke:2;color:inherit;opacity:1}
/* Rounded on the <img> rather than clipped with `overflow:hidden` on the disc: the recording pulse
is a ::after on .cir that scales out past it, and clipping the disc would clip that too. */
#tabbar button.start .cir img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
#tabbar button.start span{color:var(--acc);font-weight:600}
/* `.cir` is itself a <span>, so the label rules above and below reach it too and
outrank the `.cir` block — which is how the running state ended up painting an
orange play glyph onto an orange disc. Both states restate their own colour.
The disc is orange in either theme, so its glyph is black, not `--on-acc`. */
#tabbar button.start .cir{color:var(--on-acc)}
#tabbar button.start.rec .cir{background:var(--orange);color:#000;box-shadow:0 6px 18px -4px color-mix(in srgb,var(--orange) 55%,transparent)}
/* `.cir` is itself a <span>, so the label rule above reaches it as well. Nothing inside it reads
colour any more (the mark is an image), but the ring and the pulse are painted from the state
classes, which is why they restate themselves here. */
#tabbar button.start.rec .cir{border-color:var(--orange);box-shadow:0 6px 18px -4px color-mix(in srgb,var(--orange) 55%,transparent)}
#tabbar button.start.rec span{color:var(--orange)}
#tabbar button.start.rec .cir::after{
content:'';position:absolute;inset:0;border-radius:50%;
@@ -383,6 +390,14 @@ h4.sec{
}
@keyframes ping{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.45);opacity:0}}
/* --- the app's mark, wherever it stands for the app itself -------------------------------
Login, the mobile onboarding and the boot placeholder in App.jsx all show this one image, so
the app never flashes a different logo on its way in. Sized by width and centred; the source
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
written last wins in the cascade, and that should be the standard name.