Skip to content

Commit fbacb4e

Browse files
committed
Website: Various fixes to make Lighthouse happier
1 parent 1c69632 commit fbacb4e

15 files changed

Lines changed: 48 additions & 12 deletions

apps/website/public/hero/CLAUDE.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ into a frame + two pane cutouts so they can animate independently in `Hero.astro
55

66
## Files
77

8-
| File | Purpose |
9-
| --------------------------------------- | ----------------------------------------------------------------------------------- |
10-
| `cmdr-hero-frame-{dark,light}.png` | Window chrome (title bar, toolbar, borders, status bar) with transparent pane areas |
11-
| `cmdr-hero-left-pane-{dark,light}.png` | Left pane screenshot content on transparent canvas |
12-
| `cmdr-hero-right-pane-{dark,light}.png` | Right pane screenshot content on transparent canvas |
8+
| File | Purpose |
9+
| --------------------------------------- | -------------------------------------------------------------------------------------- |
10+
| `cmdr-hero-frame-{dark,light}.png` | 2x window chrome (title bar, toolbar, borders, status bar) with transparent pane areas |
11+
| `cmdr-hero-left-pane-{dark,light}.png` | 2x left pane screenshot content on transparent canvas |
12+
| `cmdr-hero-right-pane-{dark,light}.png` | 2x right pane screenshot content on transparent canvas |
13+
| `cmdr-hero-*-{dark,light}-1x.png` | 1x derivatives for responsive delivery experiments and future `srcset` wiring |
1314

14-
All six files share the same canvas size: **2508 x 1634 px** (2x retina). `Hero.astro` switches between dark and light
15-
variants using CSS selectors on `data-theme` / `prefers-color-scheme`.
15+
The six primary files share the same canvas size: **2508 x 1634 px** (2x retina). The 1x derivatives are **1254 x 817
16+
px** and are generated from the 2x files. `Hero.astro` switches between dark and light variants using CSS selectors on
17+
`data-theme` / `prefers-color-scheme`.
1618

1719
## How to reshoot
1820

@@ -105,13 +107,21 @@ for variant in dark light; do
105107
cmdr-hero-frame-${variant}.png
106108
done
107109

110+
for variant in dark light; do
111+
for layer in frame left-pane right-pane; do
112+
magick cmdr-hero-${layer}-${variant}.png -resize 50% \
113+
cmdr-hero-${layer}-${variant}-1x.png
114+
done
115+
done
116+
108117
rm -f /tmp/hero-mask.png /tmp/src-alpha.png /tmp/new-alpha.png
109118
```
110119

111120
### 6. Verify
112121

113-
Check that all six PNGs are 2508 x 1634 and file sizes are roughly: ~650 KB frame, ~340 KB left pane, ~140 KB right
114-
pane. To verify the frame transparency, composite on a red background:
122+
Check that the six primary PNGs are 2508 x 1634, the six 1x derivatives are 1254 x 817, and the 2x file sizes are
123+
roughly: ~650 KB frame, ~340 KB left pane, ~140 KB right pane. To verify the frame transparency, composite on a red
124+
background:
115125

116126
```bash
117127
magick -size 2508x1634 xc:red \
85.1 KB
Loading
90 KB
Loading
195 KB
Loading
184 KB
Loading
75.6 KB
Loading
70 KB
Loading
4.13 KB
Loading
1.01 KB
Loading
2.2 KB
Loading

0 commit comments

Comments
 (0)