Repository navigation
Add a /videos/ page with click-to-load explainer videos - #859
Merged
Merged
Conversation
Five explainer videos, by audience, each a self-hosted thumbnail linking to YouTube that plays in place in YouTube's no-cookie player. The page self-hosts its fonts so it requests nothing from YouTube or Google until a reader plays a video. The homepage and How thirdshift works link to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The How thirdshift works entry had two sentences; the brief asks for one, and the page test now checks it. The tests' videos are objects, and the guide and videos tests share one overflow assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
/videos/page that lists the five explainer videos by audience. Each video starts as a self-hosted thumbnail that links tohttps://youtu.be/<id>. With JavaScript on, playing one swaps in YouTube's no-cookie player in the same spot.The other pages load their fonts from
fonts.googleapis.com. That would break the criterion "no request to any YouTube or Google host", so this page self-hosts the same faces undersite/fonts/instead. The other pages are unchanged.Captions stay off by default (no
cc_load_policy). Each entry's sentence is drawn from that video's YouTube description.Evidence
/videos/returns 404, and the sitemap lists 4 pages.After:
cd site && npm testpasses 30 of 30, includingdocs:check.The new tests:
I also made the tests fail on purpose:
/fonts/fonts.cssfor a Google Fonts link fails the off-origin request test.I checked the layout visually at 1280 and 390 px.
Rust is untouched, so I did not run
cargo test.Merge Danger
Door: two-way
The change is all new static files plus link additions. Reverting it removes the page.
Blast Radius: small
main.jsis shared by every page. The new handler only binds toa.video-play, and only/videos/has those links. The homepage and How thirdshift works gain one link each in their existing link lists.The fonts directory is new, and only
/videos/uses it.Review coverage
Both reviewers read every changed file. The binaries were inspected: the thumbnails were viewed, and the woff2 files were checked with
file/xxd.The Spec axis inspected the two OFL texts by size only. The Standards axis read them in full.
Unaddressed findings
Standards
link.hrefinplayVideo(site/main.js). Declined.youtu.be/<id>href is the page's single statement of the id, and it must stay a working link without JavaScript. Adata-attribute would duplicate it.https://youtu.be/<id>. "…requests nothing from YouTube or Google until a video plays…" asserts the player URL derived from it.site/docs/index.html(viasite/generate-docs.mjs:67) and thesite/prompts/index.htmlfooter don't link to/videos/. Declined.main.js. The reviewer offered this as a note only. It follows the existing per-page blocks (fold reveal, copy buttons, press line).Spec
None. The one Spec finding (two sentences in one entry) failed when I ran it, so I fixed the entry and kept the check as a test.
Security
None. The change adds static pages, self-hosted fonts and a click-to-load YouTube player; the player URL is built only from the page's own authored links, with the id URL-encoded.
Closes #851
🤖 Generated with Claude Code
Built with claude · claude-opus-5-5 · medium
Security review outcome
No unaddressed introduced findings.