Skip to content

docs: prepare the real landing page screenshot - #52

Open
Periicles wants to merge 3 commits into
mainfrom
docs/hero-screenshot
Open

docs: prepare the real landing page screenshot#52
Periicles wants to merge 3 commits into
mainfrom
docs/hero-screenshot

Conversation

@Periicles

Copy link
Copy Markdown
Owner

Prep work, not a finished change: everything is in place except the screenshot itself, which needs a machine with Screen Recording permission — mine does not have it.

Safe to merge as-is. With docs/assets/hero.png absent the page renders exactly as it does today, and it lights up the moment the file lands.

The capture script

scripts/capture-hero.sh reads the crop region from the panel's real window via CGWindowList rather than from a constant, so it cannot drift from ScreenHelper. It adds a margin either side so the notch reads as a notch rather than as a floating black box.

Two modes, because screencapture -R needs Screen Recording permission a terminal does not have by default — you hit that exact failure yourself:

scripts/capture-hero.sh                          # direct, needs the permission
scripts/capture-hero.sh --from ~/Desktop/x.png   # crops a Cmd-Shift-5 shot, needs nothing

The --from path derives pixels-per-point from the screenshot's own width instead of assuming the backing scale, so it is right whatever display it was taken on.

The page

The <img> ships hidden and is revealed by main.js only once it has actually loaded. A missing file therefore costs nothing — no broken image, no layout hole — and the CSS mockup stays as the fallback, including with JavaScript off. That is why this is mergeable before the asset exists.

Verification

  • Ran the --from path end to end on an existing full-screen shot: region computed as 780×183pt at (510,0), cropped to 1560×366px at exactly 2×. The output was not committed — it showed your calendar names and the settings menu, which is precisely the kind of thing not to publish.
  • Rendered the page offscreen with the asset absent: mockup shows, no broken image.
  • Not verified: the reveal path in a real browser, since I have no browser here. The logic is a load listener plus a complete && naturalWidth check for the cached case.
  • 28 i18n keys resolve both ways, node --check passes, bash -n on the script passes.

What is left for you

Run NotchBar during an actual event so the panel shows the in-progress state — title, times, progress bar. A shot of "No event today" would sell nothing. Then run the script, check the menu bar and event title in the frame are things you want public, and commit docs/assets/hero.png.

The crop region comes from the panel's real window via CGWindowList, not from
a constant, so it cannot drift from the app's geometry.

Two modes because screencapture -R needs Screen Recording permission that a
terminal does not have by default: capture directly when it is granted, or
crop a full-screen shot taken with Cmd-Shift-5, which needs nothing. The crop
maths derives pixels-per-point from the screenshot's own width rather than
assuming the backing scale.
The hero is a CSS mockup, which is honest but not evidence. The image is
hidden in the markup and revealed by script only once it has actually loaded,
so a missing docs/assets/hero.png costs nothing: no broken image, no layout
hole, and the mockup stays as the fallback — including with JavaScript off.
@Periicles Periicles self-assigned this Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant