The splash is the photograph, and it is painted before the app exists
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
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
Two things about the launch screen on the phone. **No mark on it.** The photograph is the screen now — the logo that sat in the middle is gone, and so is the vignette that existed to keep that logo readable. Nothing to read, just the picture, which is what was asked for. **It no longer waits for React.** Until now the splash was a React element, so it could not appear until the bundle had downloaded, parsed and mounted — on a phone that is the long blank stretch between opening the app and seeing anything, and it is why the splash seemed to arrive late and then flash past: by the time it rendered, the app was nearly ready. index.html now paints the same photograph from inline styles, so it is on screen as soon as the HTML is parsed, with the bundle still downloading behind it. React replaces the container's contents when it mounts, and the two screens are identical — same image, same object-fit, same base colour behind it while the picture decodes — so the handover cannot be seen as anything but the app arriving. The blank before even that is iOS's own launch screen, which is what apple-touch-startup-image covers: production already serves all fourteen, so a PWA that still opens white is one that was installed before those existed. Removing the icon from the home screen and adding it again is what makes iOS pick them up — its launch images are read at install time, not on every launch.
This commit is contained in:
1 parent
b6d3512c36
commit
45183c725f
4 files changed
+22
-15
No files matched your search
+4
-10
@@ -221,17 +221,11 @@ button,.chip,.tile,.item,.wday,.cal-d,.swatch,.hm-c,.lrow,.seg button,.stp butto
|
||||
/* 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}
|
||||
/* The photograph, full bleed, and nothing on it. No mark and no vignette: the picture is the
|
||||
screen, which is also what index.html paints before this stylesheet exists — identical rules,
|
||||
so the one hands over to the other without a flicker. */
|
||||
.boot-splash{position:fixed;inset:0;z-index:1;overflow:hidden;background:#100e0b}
|
||||
.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));
|
||||
/* A slow pulse so a screen that is waiting looks like it is waiting. `prefers-reduced-motion`
|
||||
already switches every animation in this file off (see the top), which is the right answer for
|
||||
anybody who asked for less movement. */
|
||||
animation:splash-breathe 1.9s var(--ease) infinite;
|
||||
}
|
||||
@keyframes splash-breathe{0%,100%{opacity:.82;transform:scale(1)}50%{opacity:1;transform:scale(1.035)}}
|
||||
/* 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))}
|
||||
|
||||
Reference in new issue
Block a user