Communitygithub.com

视差滚动着陆页

将一段5–15秒的短视频转化为全屏电影感着陆页,用户滚动鼠标即可逐帧播放视频,同时5段文字场景交叉淡入淡出,营造沉浸式叙事体验。

视差滚动着陆页 是什么?

该技能将一段5–15秒的短视频(通常为AI生成)转化为一个全屏电影感着陆页。页面锁定视口(不滚动),通过JavaScript拦截鼠标滚轮、触控或键盘操作,将其转换为虚拟滚动进度,从而逐帧播放视频。同时,页面包含5个自动定位的文字场景(kicker + Anton大写标题 + Caveat手写体副标题),每个场景有独立的滚动进度窗口,交叉淡入淡出。页面还包含固定导航栏、预加载器、晕影/胶片颗粒叠加层、滚动提示和底部帧计数器。该技能支持独立创建新项目(存入 ~/Documents/yuv-projects/landings/<slug>/)或集成到现有的 parasites 展示案例(examples/parasites/)中。工作流程分为四个阶段:用户确认(视频路径、别名、主题、模式、强调色)→ 帧提取(使用自定义Python脚本,以q:v 2质量提取每帧JPEG)→ 页面创作(基于模板填充占位符)→ 资源链接(复制公共CSS和JS)。输出为单个HTML文件 + 帧文件夹 + 共享样式/脚本文件。该技能使用Anton + Caveat + Inter字体栈,搭配金/琥珀/粉/奶油色强调色方案,是YUV.AI技能金字塔的中层技能,与 yuv-pilot 协作。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/hoodini/ai-agents-skills/tree/HEAD/skills/parallax-landing-page

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

视差滚动着陆页 (Parallax Landing Page)

将一段短视频转化为全屏电影感着陆页——用户滚动鼠标即可逐帧播放视频,同时五段戏剧性文字场景交叉淡入淡出。文档本身永远不会实际滚动——滚轮/触控/键盘输入由JavaScript拦截并转换为虚拟帧进度。

此技能编码了本仓库中参考示例 ../../examples/parasites/ (github / lion / hope 着陆页——使用此技能构建的三个可工作页面)中已验证的模式。如果任何地方有歧义,请以该文件夹为基准。

此项技能在 YUV.AI 金字塔中的位置

parallax-landing-page 位于 YUV.AI 技能金字塔的中间层级,与 yuv-design-system, yuv-decks, yuv-viral-video, video-to-landing-page 并列。顶层编排器 yuv-pilot 会在需要将5–15秒视频片段转化为单屏滚动擦洗着陆页时路由到此技能。

此项技能自带视觉语言(Anton + Caveat + Inter,金/琥珀/强调/奶油色强调色板)——它不调用 yuv-design-system。两个系统并存:yuv-design-system 负责跨网页/应用/演示界面的品牌调色板;parallax-landing-page 专责电影感滚动擦洗美学。对于 YUV.AI 视差着陆页,你可以可选地在页脚区域添加凤凰水印和规范的 Linktree URL 作为品牌贯穿线——水印文件见 yuv-design-system/assets/。不要将 Anton/Caveat 字体栈替换为设计系统的Neon调色板——那会丢失标志性外观。

你将要构建的内容

每个着陆页都是一个锁定的视口,包含:

  • 一个填满屏幕的画布,一次绘制一帧(cover-fit, DPR ≤ 2)
  • 5个绝对定位的文字场景(kicker + 大写Anton标题 + Caveat手写体行),每个都有独立的滚动进度窗口
  • 一个固定导航栏,包含 PARALLAX // showcase 标志和兄弟着陆页的链接
  • 一个在允许用户交互前预加载每一帧的加载器
  • 一个晕影 + 胶片颗粒叠加层
  • 一个用户开始滚动后淡出的底部滚动提示
  • 一个右下角的帧计数器(例如 073 / 145)
  • 最后场景就是CTA区域——没有单独的 .end 部分

在 q:v 2 下总重量:约 120–220 KB/帧 × 帧数。一个6秒24fps片段 = 145帧 ≈ 25 MB。一个10秒片段 = 241帧 ≈ 53 MB。

保存位置

默认: ~/Documents/yuv-projects/landings/<slug>/ ——始终将独立着陆页保存到此处以便日后查找。只有在用户明确指定其他位置或选择模式B(集成到现有的 examples/parasites/ 展示)时才覆盖。

mkdir -p ~/Documents/yuv-projects/landings
cd ~/Documents/yuv-projects/landings
# 此技能在提取帧并构建HTML时会在此处创建 <slug>/ 目录

最终路径(模式A——独立):~/Documents/yuv-projects/landings/<slug>/。 最终路径(模式B——集成):用户选择的现有展示目录。

在每次构建结束时告知用户最终路径。


工作流程

共有四个阶段。不要跳过任何阶段——每个阶段为下一个提供输入。

阶段1——发现

与用户确认:

  1. 视频路径 ——源MP4文件的位置。
  2. 别名 (slug) ——短的文件夹/文件名(例如 hope, marcus, desk)。一个单词,小写,无空格。这同时作为帧文件夹名(<slug>/)和HTML文件名(<slug>.html)。
  3. 主题/话题 ——此着陆页是关于什么的?产品发布?个人时刻?野生动物遭遇?你需要这个来编写文案。
  4. 项目模式 ——独立(全新文件夹)或集成到 examples/parasites/ 的现有展示(本仓库顶部)。如果用户说“添加到展示”,他们指的是下面的模式B。
  5. 强调色 ——用于脚本/CTA高亮:gold (#f5b042), amber (#ff8a3d), accent (粉 #ff4d6d), cream (#f5e9d4),或新的颜色(将其添加到 style.css 的 :root 并编写新的 .script.<name> 规则)。

如果用户未指定其中某些内容,请提出默认值并继续——不要因为他们在看到结果后可以回答的问题而停滞。

阶段2——提取帧

运行捆绑的提取脚本。它使用 ffprobe 探测视频,并以原生分辨率、-q:v 2(近乎无损JPEG)提取每一帧,命名为 frame-001.jpg 到 frame-NNN.jpg(3位零填充)。

python <skill>/scripts/extract_frames.py <video_path> <output_folder>

示例:

python C:/Users/User/.claude/skills/parallax-landing-page/scripts/extract_frames.py \
    C:/Users/User/Documents/parasites/hope/hope.mp4 \
    C:/Users/User/Documents/parasites/hope

脚本将 JSON 元数据块打印到标准输出。捕获它——你需要 frame_count 和 suggested_scroll_budget 用于 HTML。

为什么用 -q:v 2:ezgif 和类似工具会激进地重新压缩(约55 KB/帧)。原生 ffmpeg 在 q:v 2 下,相同尺寸下约 120–220 KB/帧——视觉上更锐利。不要缩小;永远不要放大(会无端增大文件)。

为什么用滚动预算公式(每帧约26像素):使“每前进一帧需要滚动的像素数”在不同片段长度下保持恒定。145帧 → ~4200,241帧 → ~6300,90帧 → ~2500(下限)。脚本会为你计算并限制在 [2500, 8000] 范围内。

阶段3——创作页面

读取位于 <skill>/assets/landing-page-template.html 的模板。它是一个完整的可工作文件,包含 {{PLACEHOLDER}} 标记和创意部分旁边的 <!-- TODO: --> 注释。在 <target>/<slug>.html 写入一个新文件,替换所有内容。

替换清单(每个占位符都必须替换):

占位符应该放什么示例
{{PAGE_TITLE}}HTML <title>Hope — The Fastest Heart in the Negev
{{PAGE_DESCRIPTION}}meta 描述,一句话A moment with Hope, the cheetah of Midbarium.
{{SLUG}}文件夹名(无路径,无斜杠)hope
{{FRAME_COUNT}}整型帧数241
{{FRAME_COUNTER_TEXT}}匹配宽度的 001 / NNN001 / 241
{{SCROLL_BUDGET}}来自提取器 JSON 的整数6300
{{PREVIEW_FRAME_MID}}零填充的中间帧编号121
{{PREVIEW_FRAME_END}}零填充的最后一帧编号241
{{LOADER_TITLE}}一个单词,大写HOPE
{{LOADER_SCRIPT}}以 … 结尾的手写体行summoning the runner…
{{NAV_LINKS_HTML}}导航栏的完整 <a> 标签块见下文
{{SCENE_N_*}}5个场景各自的 kicker、标题、手写行参考文案指南
{{SCROLL_HINT_TEXT}}2–4个大写提示词SCROLL TO RUN
{{CTA_BUTTONS_HTML}}2–4个 <a class="cta"> 标签见下文
{{ACCENT_CLASS}}用于 .script.X 和 .cta.X 的强调色后缀amber

阅读 references/copy-guide.md 以了解电影感文案模式(kicker措辞、标题长度、手写行语气)。文案是这项技能的价值所在——泛泛的文案会毁掉本来漂亮的动画。

阶段4——链接资源

如果目标文件夹已有 style.css 和 parallax.js(展示集成),则什么也不做——它们是共享的。否则将两者从 <skill>/assets/ 复制到目标文件夹:

cp <skill>/assets/style.css <target>/style.css
cp <skill>/assets/parallax.js <target>/parallax.js

如果集成到现有展示,还需执行 references/showcase-integration.md 中的步骤——向 index.html 添加卡片,向每个现有着陆页的导航栏添加链接,并在前一个着陆页的最后场景添加链式CTA。

告知用户如何查看:

从父文件夹通过 python -m http.server 8000 打开 <target>/<slug>.html(不要用 file:// ——Chromium可能会因本地图片源污染画布)。

文件约定

<target>/
├── <slug>/                  # 帧文件夹
│   ├── <slug>.mp4           # 源文件(保留)
│   ├── frame-001.jpg
│   ├── frame-002.jpg
│   └── … frame-NNN.jpg
├── <slug>.html              # 着陆页
├── style.css                # 共享(独立时复制)
├── parallax.js              # 共享(独立时复制)
└── index.html               # 中心页(仅独立或集成时)

帧文件夹名和HTML文件名必须使用相同的别名——页面中 new ParallaxPage({folder: '<slug>', ...}) 调用的 folder 选项即为字面文件夹路径。

ParallaxPage API(已包含在 parallax.js 中,请勿重新定义)

new ParallaxPage({
  folder:       '<slug>',     // 包含 frame-001.jpg 等的文件夹
  frameCount:   145,          // 整数
  prefix:       'frame-',     // 此技能始终为 'frame-'
  scrollBudget: 4200,         // 完整通过所需累积输入的像素数
  // 可选:padWidth(默认3),ext(默认'jpg')
})

该类会自动附加 body.scrub-page(通过CSS锁定滚动),预加载所有帧,运行基于RAF的线性插值(系数0.22)朝向从滚动派生的目标帧,并交叉淡入淡出 data-start/data-end 范围包含当前进度的场景。

硬性约束(不可协商)

这些已内置于参考实现中,违反会破坏体验:

  • 5个场景,固定进度窗口:0.00–0.20, 0.22–0.40, 0.42–0.60, 0.62–0.80, 0.82–1.00。场景之间的0.02间隙是故意的——这是两次节拍之间“纯图像,无文字”的瞬间。英雄(场景1)和最终(场景5)分别使用 data-fade="0.30" 和 data-fade="0.18",以便在边缘处保持更久;中间场景使用默认的0.25。
  • 擦洗区域下方没有 .end 部分。最终场景包含CTA。整个页面是一个锁定的视口。
  • Anton + Caveat + Inter——大写Anton用于所有粗体内容,Caveat用于手写体强调(金/琥珀/奶油色),Inter用于任何正文引导文本。永远不要替换,永远不要添加第四种字体。
  • 米白 #f5f1ea,绝不用 #fff——已在CSS中作为 var(--text)。
  • 帧名称为 frame-NNN.jpg,零填充到总位数宽度(3位是标准,因为片段 < 1000帧;JS从总数自动计算计数器宽度)。
  • 别名既是文件夹名又是HTML文件名基名——hope/, hope.html。无例外;集成步骤假设这一点。

遇到困难时从何处查找

  • 本仓库中的参考展示:examples/parasites/ —— github.html、lion.html、hope.html、style.css、parallax.js、index.html。如果你的输出在这些方面有明显差异,说明你偏离了轨道;重新阅读。
  • references/copy-guide.md ——如何编写5个场景使其真正具有电影感。
  • references/showcase-integration.md ——添加到现有中心页时需要的确切编辑。
  • assets/landing-page-template.html ——带有占位符的规范结构。
  • assets/hub-template.html ——仅用于创建全新展示(从头开始3张卡片)。

两个真实调用示例

独立模式: 用户有一个单独片段 desk.mp4 并想要一个着陆页。

  1. 询问别名 + 主题。在 desk.mp4 上运行提取器 → ./desk/frame-NNN.jpg。
  2. 将 style.css + parallax.js 复制到项目根目录。
  3. 从模板创作 desk.html。导航栏只有一个链接:自身。
  4. 完成。告知用户用 python -m http.server 提供服务。

展示添加: 用户将 hope.mp4 添加到现有的 parasites 文件夹。

  1. 别名 = hope。提取 → hope/frame-NNN.jpg。(复用现有的 style.css + parallax.js。)
  2. 从模板创作 hope.html。
  3. 运行展示集成:向 index.html 添加第三张卡片,在 github.html 和 lion.html 的导航栏追加 Hope 链接,将前一个着陆页的最后场景链接为 Next: Hope → CTA。
  4. 如果引入新的强调色,将其添加到 :root,并在 style.css 中添加 .script.X + .cta.X 规则。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

hoodini/ai-agents-skills

Edit any selfie or screen-share footage into a viral short-form video in YUV.AI's signature style — Apple-style liquid-glass cards (real CSS backdrop-filter), dark-mode polish, MrBeast-paced cuts, video-title karaoke captions, premium GSAP motion graphics, no fake content, never covering the speaker's face. Hebrew is rendered in Rubik Black, English in Anton uppercase. Always renders BOTH 9:16 and 16:9 and always saves with _V<N> suffix for backups. Trigger when the user drops a path to an .mp4/.mov/.mkv and says "edit this", "make it viral", "turn this into a short", or any Hebrew equivalent (ערוך סרטון, סרטון ויראלי, להפוך לוויראלי, ריל, שורט). The pipeline is the COMBINATION of two skills: video-use (transcription + word-snapped cuts + base extraction) and hyperframes (HTML/CSS/GSAP visual composition + render). Do NOT use for podcast-only audio edits.

hoodini/ai-agents-skills

Yuval Avidani's YUV.AI brand and design system. Apply ONLY when YUV.AI-branded output is requested — presentations, decks, keynotes, portfolio, brand site, profile, speaker bio, brand assets, or any prompt mentioning YUV.AI / "my brand" / "my deck" / "my site" / "for me". Do NOT auto-trigger on generic "build a game / web app / dashboard / landing page" without YUV.AI context — those use whatever palette fits. Three modes; NEON (hot pink #FF1464 + neon cyan #00E5FF + white, DEFAULT for YUV.AI web, apps, games, dashboards, social, general visual work); DECKS (Fly High purple/yellow/grey, presentations and slides ONLY); Warm Editorial (pink/yellow/bone for Hope, Marcus, bigcats.ai, practical.yuv.ai). Universal Fly High throughline across all modes; flight/progress motifs (HUD strips, dials, "Let's Fly High" tagline, phoenix mark). Anton + Inter (EN), Rubik + Assistant (HE), letter-spacing 0 default. Bundled brand assets, canonical socials, credentials. Project brand wins if specified.

hoodini/ai-agents-skills

Yuval's all-in-one AI video pipeline. Turns an idea/script into a finished, on-brand MP4 by orchestrating HyperFrames (HTML→deterministic video render), Lottie (branded motion graphics), ManimCE (math / neural-network / concept animations), and a transcribe→approve caption flow — all wrapped in the YUV.AI Neon Phoenix brand via a frame.md. Use whenever Yuval wants to make, edit, or explain something as a video: promo, explainer, launch, social reel, "make a video about X", "explain X as a video", "neural network animation", "turn this into a video", captioned tutorial, 16:9 or 9:16. Triggers: video, explainer, promo, reel, manim, lottie, hyperframes, animation, "make a video", "explain ... as a video", מצגת וידאו, סרטון, הסבר וידאו. Routes each beat to the right engine, wraps in brand, self-verifies, and renders.

hoodini/ai-agents-skills

Build a premium cinematic landing page with mouse-scrub video hero and brand-driven narrative-arc sections. Use whenever the user provides a hero video plus a product / subject / brand and wants a landing page, promo site, product showcase, marketing page, or storytelling site. Works for any language (RTL or LTR — Hebrew, English, Arabic, Spanish, French, Japanese, etc.) and any subject (food, tech, animals, fashion, services, SaaS, wildlife campaigns, music releases, books, real estate). The signature effect is mouse-driven video scrubbing — the hero video lives across the entire page as a fixed backdrop, and moving the mouse left-right scrubs the video timeline so the subject responds to the cursor. Below the hero, 4-5 fully-opaque sections each carry their own brand identity (color, typography emphasis, layout pattern) and walk the viewer through a narrative arc (e.g. longing → joy → nostalgia → contemplation → action). Triggers on phrases like "build a landing page from this video", "cinematic landing ...

hoodini/ai-agents-skills

Edit any video into a captioned showcase — transcribe (any language, defaults to large-v3), present a transcript_review.txt for the user to fix mishears BEFORE rendering, then build a HyperFrames composition with liquid-glass caption pills, liquid blob background, liquid morph wipes, optional behind-subject text via background removal, and render the final video. Use whenever the user provides a video file and asks to edit it, caption it, add subtitles, fix existing captions, make a reel/promo/captioned tutorial, or "do the same" pattern as a prior captioned video. Supports English, Hebrew, and any Whisper-supported language. **Renders both 16:9 (YouTube / horizontal) and 9:16 (TikTok / Instagram Reels / YouTube Shorts) from the SAME 16:9 source** — vertical mode uses a centered footage strip with a blurred backdrop + liquid blobs and a vertical-tuned caption pill, no need to re-shoot. THE PIPELINE PAUSES FOR USER APPROVAL on the transcript before final render — this is the support mechanism for getting ca...

hoodini/ai-agents-skills

Turn any video into a cinematic scroll-driven landing page — Apple-style hero where scrolling progresses the visible frame through the video. Use when the user provides a video file and asks for "a landing page from this video", "scroll-frame website", "Apple-style scroll site", "hero that scrubs the video", "like the GitHub Copilot landing", or any equivalent. Extracts N evenly-spaced frames via ffmpeg, builds a self-contained HTML page with a sticky hero + JS scroll listener that swaps the visible frame as you scroll, plus headline, sections and CTA below. For YUV.AI projects, applies the yuv-design-system skill in Neon mode (pink/cyan/white, default for YUV.AI web) — Decks (purple/yellow) is reserved for slides only. For generic / non-YUV.AI projects, picks an appropriate palette per the source video. Output is one folder with `index.html` and a `frames/` directory — drop on any static host.

hoodini/github-trending

Fetch and display GitHub trending repositories and developers. Use when building dashboards showing trending repos, discovering popular projects, or tracking GitHub trends. Triggers on GitHub trending, trending repos, popular repositories, GitHub discover.

hoodini/mongodb

Work with MongoDB databases using best practices. Use when designing schemas, writing queries, building aggregation pipelines, or optimizing performance. Triggers on MongoDB, Mongoose, NoSQL, aggregation pipeline, document database, MongoDB Atlas.

hoodini/owasp-security

Implement secure coding practices following OWASP Top 10. Use when preventing security vulnerabilities, implementing authentication, securing APIs, or conducting security reviews. Triggers on OWASP, security, XSS, SQL injection, CSRF, authentication security, secure coding, vulnerability.

相关技能