Feat/hero studio#18
Open
PaladinKnightMaster wants to merge 10 commits into
Open
Conversation
Drive the HTML/React/Next.js generators from a single HeroConfig (content, accent, overlay, performance, motion). Adds context-aware escaping, accent and href validation, contrast-safe overlay scrims, poster + preload presets, prefers-reduced-motion handling, and an accessible pause/play control baked into every generated hero. Includes encode/decode for untrusted URL configs and a node:test suite.
|
@PaladinKnightMaster is attempting to deploy a commit to the Cristian's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Hero Studio
Right now every hero exports the exact same hardcoded markup. The code modal is basically a read-only viewer. This PR turns it into a tiny hero generator: pick a video, tweak the content/colors/behavior, watch a live preview, and copy or download the result in HTML, React, or Next.js — with your changes baked in.
It's additive, not destructive: the curated handcrafted heroes stay exactly as they are (default tab). Studio is an opt-in "build your own" mode right next to them.
what's new
localStorage.HeroStudio,SegmentedControl,HeroPreviewFrame(all dependency-free).perf + a11y (not an afterthought)
preload="none"+ lazy video load on scroll → zero video bytes for off-screen cards. Homepage went from dynamic → static + ISR (revalidate 5m).prefers-reduced-motionhandling, and contrast-safe overlay scrims.also fixed along the way
motion: "always"preset is now honored in all three generators (was silently ignored in React/Next).javascript:etc. →#).how it was tested
pnpm lint(0 errors) ·pnpm exec tsc --noEmit·pnpm test(15/15) ·pnpm build— all green ✅heads up before deploy
Run
pnpm posters(needsffmpeg) and let thesync-r2workflow upload them. The site degrades gracefully without posters, but they're what makes first paint instant.