The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
Initialize HTML Anything project with Next.js, Tailwind CSS, and essential configuration files. Add .gitignore, LICENSE, and contributing guidelines in both English and Chinese. Create foundational documentation including README and progress tracking. Set up package.json with dependencies and scripts for development.
pftom3aecb36ea24e
diff --git a/.gitignore b/.gitignorenew file mode 100644index 00000000..60ad087a--- /dev/null+++ b/.gitignore@@ -0,0 +1,44 @@+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.++# dependencies+/node_modules+/.pnp+.pnp.*+.yarn/*+!.yarn/patches+!.yarn/plugins+!.yarn/releases+!.yarn/versions++# testing+/coverage++# next.js+/.next/+/out/++# production+/build++# misc+.DS_Store+*.pem++# debug+npm-debug.log*+yarn-debug.log*+yarn-error.log*+.pnpm-debug.log*++# env files (can opt-in for committing if needed)+.env*++# vercel+.vercel++# typescript+*.tsbuildinfo+next-env.d.ts++# claude code+.claude-sessions/diff --git a/AGENTS.md b/AGENTS.mdnew file mode 100644index 00000000..8bd0e390--- /dev/null+++ b/AGENTS.md@@ -0,0 +1,5 @@+<!-- BEGIN:nextjs-agent-rules -->+# This is NOT the Next.js you know++This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.+<!-- END:nextjs-agent-rules -->diff --git a/CLAUDE.md b/CLAUDE.mdnew file mode 100644index 00000000..43c994c2--- /dev/null+++ b/CLAUDE.md@@ -0,0 +1 @@diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 00000000..6d142d65--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,241 @@+# Contributing to HTML Anything++Thanks for thinking about contributing. HTML Anything is small on purpose — most of the value lives in **files** (skill folders, prompt fragments, agent adapters) rather than framework code. The highest-leverage contributions are usually one folder, one Markdown file, or a ten-line adapter.++This guide tells you exactly where to look for each type of contribution and what bar a PR has to clear before we merge.++<p align="center"><b>English</b> · <a href="CONTRIBUTING.zh-CN.md">简体中文</a></p>++---++## Three things you can ship in one afternoon++| If you want to… | You're really adding | Where it lives | Ship size |+|---|---|---|---|+| Make HTML Anything render a new kind of artifact (an invoice, a job posting, an iOS Settings screen…) | a **Skill** | [`src/lib/templates/skills/<your-skill>/`](src/lib/templates/skills/) | one folder, ~3 files |+| Hook up a new coding-agent CLI | an **Agent adapter** | [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) + [`src/lib/agents/detect.ts`](src/lib/agents/detect.ts) | ~10 lines in one array |+| Add a new export target (WeChat Channels, Douyin captions, Notion, …) | an **Export adapter** | [`src/components/drafts-menu.tsx`](src/components/drafts-menu.tsx) + helper under `src/lib/export/` | one component + one helper |+| Add a feature, fix a bug, refactor the streaming parser | code | `src/app/`, `src/lib/`, `src/components/` | normal PR |+| Improve docs, port a section into another language, fix typos | docs | `README.md`, `README.zh-CN.md`, this file | one PR |++If you're not sure which bucket your idea is in, [open an issue first](https://github.com/your-org/html-anything/issues/new) and we'll point you at the right surface.++---++## Local setup++```bash+git clone https://github.com/your-org/html-anything.git+cd html-anything+pnpm install+pnpm dev # next dev — http://localhost:3000+pnpm build # next build, when verifying a release-shaped bundle+```++Node `~20` and `pnpm` are required. macOS, Linux, and WSL2 are the primary paths. Native Windows should work but isn't a primary target — file an issue if it doesn't.++Before you push, make sure you have **at least one coding-agent CLI logged in** (`claude login`, `cursor login`, `gemini auth`, etc.) so you can actually run an end-to-end generation. PRs that touch the streaming or agent layer are expected to include a screenshot or log snippet showing it worked.++> **A note on this project.** It is a normal Next.js 16 App Router app — no daemon, no Electron shell, no extra processes. Everything happens in `next dev`: server routes spawn the local CLI, stream stdout back as SSE, and the browser appends into an iframe `srcdoc`. If you find yourself wanting to introduce a separate long-running process, please open a discussion first.++---++## Adding a new Skill++A skill is a folder under [`src/lib/templates/skills/`](src/lib/templates/skills/) with a `SKILL.md` at the root, following Claude Code's [`SKILL.md` convention][skill] plus a small extended frontmatter that the picker reads. **No registration step.** Drop the folder in, restart `pnpm dev`, the picker shows it.++### Skill folder layout++```text+src/lib/templates/skills/your-skill/+├── SKILL.md # required — prompt body + frontmatter+├── example.html # required — what the agent should produce, hand-authored+├── assets/ # optional — fonts, images, reusable CSS, layout fragments+└── references/ # optional — design-system snippets, references the agent should Read+```++### `SKILL.md` shape++```markdown+---+name: your-skill+description: One sentence shown in the picker preview.+mode: prototype # prototype | deck | frame | social | office | doc | mockup | vfx+scenario: marketing # design | marketing | engineering | product | finance | hr | sale | personal+surface: desktop # desktop | mobile | A4 | 1080x1920 | 1600x900 | 1920x1080 | …+preview:+ type: iframe # iframe | image | deck+ thumbnail: docs/screenshots/skills/your-skill.png # optional, used in the README showcase grid+design_system:+ requires: optional # required | optional | none+featured: false # set true if this should appear in "Showcase examples"+example_prompt: |+ Three-sentence example prompt that demonstrates the kind of input this skill is for.+---++# Your Skill++<one-paragraph identity / discipline statement — voice, intent, what the agent must commit to>++## Hard constraints+- 8 px baseline grid · all spacing / line-height / font-size as multiples of 8.+- CJK-first font stack: `"Noto Sans SC", "PingFang SC", "Source Han Sans"`. Latin: `"Inter", "Manrope"`.+- Color contrast ≥ 4.5. Real `:focus` state on every interactive element.+- Must use the user's real data. No `lorem ipsum`. No invented metrics. No purple gradients.++## Layout++<the structure / sections / hierarchy the agent should produce, with concrete tokens+ — sizes, ratios, named slots — not vague aesthetic prose>++## What "good" looks like+- <one-line positive example>+- <another>++## What "bad" looks like+- <one-line negative example, mirror of the slop blacklist if relevant>+- <another>+```++### Bar for merging a new skill++1. **Real `example.html` ships in the folder.** Hand-author it once — the agent has a target to copy. PRs without one get bounced.+2. **The example renders in the browser** (`pnpm dev` → pick the skill → ⌘+Enter → screenshot). Attach the screenshot to the PR.+3. **Hard constraints exist and are specific.** Vague directives ("use modern typography") are not constraints. Real ones look like "Inter 96 / 64 / 40 / 24 / 16 px, 8 px grid, max two weights per slide".+4. **No `lorem ipsum`** anywhere in the example. If the example uses placeholder data, it must be plausibly-real placeholder data.+5. **Slug uses ASCII lowercase with dashes** — `deck-swiss-international`, `social-x-post-card`. Mirror the 75 existing folders.+6. **If you vendored work from another repo**, the original `LICENSE` and authorship attribution have to ship inside your skill folder. Example: `src/lib/templates/skills/deck-guizang-editorial/LICENSE` preserves the original op7418 license verbatim.++### Picker grouping++The picker organizes skills along two axes. Pick values that already exist where possible — only introduce a new value if your skill genuinely doesn't fit:++- **`mode`** — `prototype` · `deck` · `frame` · `social` · `office` · `doc` · `mockup` · `vfx`.+- **`scenario`** — `design` · `marketing` · `engineering` · `product` · `finance` · `hr` · `sale` · `personal`.++---++## Adding a new coding-agent CLI++Hooking up a new agent (e.g. some new shop's `foo-coder` CLI) is one entry in [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts):++```ts+{+ id: 'foo',+ name: 'Foo Coder',+ bin: 'foo',+ detect: { args: ['--version'] },+ build: (prompt: string) => ({+ args: ['exec', '-p', prompt],+ stdin: null, // or 'prompt' if the CLI reads from stdin+ }),+ stream: 'plain', // 'plain' | 'json-event' | 'claude-stream-json'+}+```++That's it. `/api/agents` will detect it on `PATH`, the top-bar picker shows it, the chat path works through the same SSE pipeline. If the CLI emits **typed events** (like Claude Code's `--output-format stream-json`), add a parser in [`src/lib/agents/invoke.ts`](src/lib/agents/invoke.ts) and set `stream: 'claude-stream-json'`.++### Bar for merging an agent adapter++1. **A real session works end-to-end.** Run `pnpm dev`, pick your agent, generate any skill's `example_prompt`, and paste the SSE log into the PR description showing it streamed an artifact through.+2. **`PATH` detection works on macOS, Linux, and WSL.** The scanner already includes `~/.local/bin` · `~/.bun/bin` · `/opt/homebrew/bin` · `~/.npm-global/bin`; if your CLI lives somewhere else, add the dir to the scan list.+3. **The README's "Supported coding agents" table gets one row** in both `README.md` and `README.zh-CN.md`.+4. **Stream parser is reusable.** If the CLI emits the same JSON-line shape as another adapter, share the parser — don't fork.++---++## Adding a new export target++Export targets live in two places: a helper under `src/lib/export/` that produces the bytes (string for `.html`, Blob for `.png`, `ClipboardItem` for paste), and a menu entry in [`src/components/drafts-menu.tsx`](src/components/drafts-menu.tsx) that wires it into the UI.++### Bar for merging an export target++1. **Round-trip test in the target platform.** Paste / upload the output into the platform itself (WeChat editor, X composer, Zhihu editor) and screenshot the result in the PR.+2. **No platform credentials in code.** If the target needs an API key, the user supplies it in settings; we don't ship one.+3. **Output is self-contained.** `.html` exports inline their CSS via `juice`; PNG exports use `modern-screenshot` at 2×.++---++## Code style++We're not pedantic about formatting (Prettier on save is fine), but two rules are non-negotiable because they show up in the prompt stack and the user-facing API:++1. **Single quotes in TS/TSX.** Strings are single-quoted unless escaping makes them ugly. The codebase is already consistent — please match.+2. **Comments in English.** Even if the PR is translating something into 中文, code comments stay in English so we can keep one set of greppable references.++Beyond that:++- **Don't narrate.** No `// import the module`, no `// loop through items`. If the code reads obviously, the comment is noise. Save comments for non-obvious intent or constraints the code can't express.+- **TypeScript for `src/`.** No new top-level `.js` files unless there's a compelling reason.+- **No new top-level dependencies** without a paragraph in the PR description on what we get vs. what bytes we ship. The dep list in [`package.json`](package.json) is small on purpose.+- **Run `pnpm build`** before pushing structural changes. Type errors block merge.++---++## Commits & pull requests++- **One concern per PR.** Adding a skill + refactoring the SSE parser + bumping a dep is three PRs.+- **Title is imperative + scope.** `add deck-product-launch skill`, `fix SSE backpressure when CLI hangs`, `docs: clarify skill frontmatter`.+- **Body explains the why.** "What does this do" is usually obvious from the diff; "why does this need to exist" rarely is.+- **Reference an issue** if there is one. If there isn't and the PR is non-trivial, open one first so we can agree the change is wanted before you spend the time.+- **No squash-during-review.** Push fixups; we'll squash on merge.+- **No force-push to a shared branch** unless the reviewer asked.++We don't enforce a CLA. Apache-2.0 covers us; your contribution is licensed under the same.++---++## Reporting bugs++Open an issue with:++- What you ran (the exact `pnpm dev` invocation, or which UI button you clicked).+- Which agent CLI was selected (Claude Code? Cursor Agent? …).+- The skill that triggered it.+- The relevant **server log tail** — most "the artifact never rendered" reports get diagnosed in 30 seconds when we can see `spawn ENOENT` or the CLI's actual error.+- A screenshot if it's UI.++For prompt-stack bugs ("the agent emitted a purple gradient hero, the constraint in `SKILL.md` was supposed to forbid that"), include the **full assistant message** so we can see whether the violation was the model or the prompt.++---++## Asking questions++- Architecture question, design question, "is this a bug or a misuse" → [GitHub Discussions](https://github.com/your-org/html-anything/discussions) (preferred — searchable for the next person).+- "How do I write a skill that does X" → open a discussion. We'll answer it and turn the answer into an entry in this guide if the pattern is missing.++---++## What we don't accept++To keep the project focused, please don't open PRs that:++- **Vendor a model runtime.** HTML Anything's whole bet is "your existing CLI is enough". We don't ship `pi-ai`, OpenAI keys, model loaders, or hosted inference proxies.+- **Rewrite the frontend away from the current stack without prior discussion.** Next.js 16 App Router + React 19 + Tailwind v4 + TypeScript is the line. No Astro, Solid, Svelte, or other framework rewrites unless maintainers explicitly want that migration.+- **Replace the SSE streaming model with WebSocket / long-polling.** SSE + iframe `srcdoc` append is the simplest thing that ships a live render; we keep it.+- **Add telemetry / analytics / phone-home.** HTML Anything is local-first. The only outbound calls are to the agent CLI on your laptop, plus whatever the generated HTML itself references (Tailwind CDN, Google Fonts).+- **Bundle a binary** without a license file and authorship attribution next to it.+- **Add a skill whose `example.html` is empty / placeholder / clearly model-generated without review.** A skill is judged by what its example renders; an empty example is rejected immediately.++If you're not sure whether your idea fits, open a discussion before writing the code.++---++## Localization maintenance++The repo ships two languages at parity: English (`README.md`, `CONTRIBUTING.md`) and 简体中文 (`README.zh-CN.md`, `CONTRIBUTING.zh-CN.md`). When adding or renaming a skill, agent, or export target:++- Update **both** READMEs' tables.+- Update **both** CONTRIBUTING docs if your change introduces a new contribution surface or a new bar a PR has to clear.+- **Skill prompt bodies stay in their source language.** Don't translate `SKILL.md` — it's part of the prompt stack the agent reads, and keeping one source language avoids multiplying prompt QA across locales.+- Daemon error messages, file names, and agent-generated artifact text are known limitations unless a PR explicitly scopes them.++---++## License++By contributing, you agree your contribution is licensed under the [Apache-2.0 License](LICENSE) of this repository.++Vendored work retains its original license and authorship attribution — see each `src/lib/templates/skills/<skill>/` folder's own `LICENSE` / `README.md` for what it inherits from upstream. The most prominent example is [`src/lib/templates/skills/deck-guizang-editorial/`](src/lib/templates/skills/deck-guizang-editorial/), which retains the original license and authorship attribution to [op7418](https://github.com/op7418).++[skill]: https://docs.anthropic.com/en/docs/claude-code/skillsdiff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.mdnew file mode 100644index 00000000..39e78597--- /dev/null+++ b/CONTRIBUTING.zh-CN.md@@ -0,0 +1,240 @@+# 为 HTML Anything 贡献代码++谢谢你愿意贡献。HTML Anything 是一个故意保持小的项目 —— 大部分价值都在**文件**里(skill 文件夹、提示词片段、agent adapter),而不在框架代码里。回报率最高的贡献,通常是一个文件夹、一个 Markdown 文件,或者十行 adapter。++这份指南告诉你:每种贡献该放在哪个目录,PR 在合并前要过哪些线。++<p align="center"><a href="CONTRIBUTING.md">English</a> · <b>简体中文</b></p>++---++## 一个下午就能交付的三件事++| 你想做什么 | 你其实是在加 | 文件位置 | 体积 |+|---|---|---|---|+| 让 HTML Anything 渲染一种新作品(发票、招聘启事、iOS 设置页…) | 一个 **Skill** | [`src/lib/templates/skills/<your-skill>/`](src/lib/templates/skills/) | 一个文件夹,约 3 个文件 |+| 接入一个新的 coding-agent CLI | 一个 **Agent adapter** | [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) + [`src/lib/agents/detect.ts`](src/lib/agents/detect.ts) | 一个数组里加 10 行 |+| 加一个新的发布目标(视频号、抖音字幕、Notion …) | 一个 **Export adapter** | [`src/components/drafts-menu.tsx`](src/components/drafts-menu.tsx) + `src/lib/export/` 下的 helper | 一个组件 + 一个 helper |+| 加功能、修 bug、重构流式 parser | 代码 | `src/app/`, `src/lib/`, `src/components/` | 常规 PR |+| 改文档、把某一段翻译到另一种语言、修错别字 | 文档 | `README.md`, `README.zh-CN.md`, 本文 | 一个 PR |++不确定自己的想法属于哪一类?[先开个 issue](https://github.com/your-org/html-anything/issues/new),我们帮你定位到对应的目录。++---++## 本地开发++```bash+git clone https://github.com/your-org/html-anything.git+cd html-anything+pnpm install+pnpm dev # next dev — http://localhost:3000+pnpm build # next build,发布前验包+```++Node `~20` 与 `pnpm` 是硬要求。macOS、Linux、WSL2 是主路径;纯 Windows 应该能跑,但不是主要目标 —— 跑不通请提 issue。++push 之前请确保你**至少有一个 coding-agent CLI 登录好了**(`claude login`、`cursor login`、`gemini auth` …),这样才能跑端到端生成。涉及流式或 agent 层的 PR,期望附上截图或日志片段,证明它真的跑通了。++> **关于项目形态的说明。** 这是一个普通的 Next.js 16 App Router 项目 —— 没有 daemon、没有 Electron 壳、没有别的常驻进程。所有事都在 `next dev` 里完成:server route 直接 spawn 本地 CLI,把 stdout 作为 SSE 流回浏览器,浏览器 append 进 iframe `srcdoc`。如果你打算引入一个独立的长期进程,**请先开 discussion**。++---++## 加一个新的 Skill++skill 是 [`src/lib/templates/skills/`](src/lib/templates/skills/) 下的一个文件夹,根目录有 `SKILL.md`,遵循 Claude Code 的 [`SKILL.md` 约定][skill] + 我们的扩展 frontmatter(picker 会读这部分)。**不需要在任何地方注册。** 把文件夹放进去,重启 `pnpm dev`,picker 里就出现了。++### Skill 目录结构++```text+src/lib/templates/skills/your-skill/+├── SKILL.md # 必需 —— 提示词正文 + frontmatter+├── example.html # 必需 —— 你希望 agent 产出什么样的成品,手写一份+├── assets/ # 可选 —— 字体、图片、可复用 CSS、布局片段+└── references/ # 可选 —— 设计系统片段、agent 应该 Read 的参考资料+```++### `SKILL.md` 写法++```markdown+---+name: your-skill+description: picker 预览里显示的一句话简介。+mode: prototype # prototype | deck | frame | social | office | doc | mockup | vfx+scenario: marketing # design | marketing | engineering | product | finance | hr | sale | personal+surface: desktop # desktop | mobile | A4 | 1080x1920 | 1600x900 | 1920x1080 | …+preview:+ type: iframe # iframe | image | deck+ thumbnail: docs/screenshots/skills/your-skill.png # 可选,README 精选示例网格会用+design_system:+ requires: optional # required | optional | none+featured: false # 想登上 "精选示例" 就置 true+example_prompt: |+ 三句话的示例 prompt,演示这个 skill 接受什么样的输入。+---++# Your Skill++<一段话写清身份 / 纪律 —— 声音、意图、agent 必须遵守什么>++## 硬约束+- 8 px 基线网格 · 所有间距 / line-height / 字号都是 8 的倍数。+- 中文字体栈:`"Noto Sans SC", "PingFang SC", "Source Han Sans"`;英文:`"Inter", "Manrope"`。+- 颜色对比 ≥ 4.5。每个可交互元素都有真实 `:focus` 态。+- 必须使用用户提供的真实数据。禁止 `lorem ipsum`、禁止编造指标、禁止紫色渐变。++## 版式++<结构 / 区块 / 层级,用具体 token —— 尺寸、比例、命名插槽 —— 不要用空泛的审美词>++## "好" 长什么样+- <一句正面例子>+- <再一句>++## "坏" 长什么样+- <一句反面例子,对应反 AI-slop 黑名单>+- <再一句>+```++### Skill PR 合并标准++1. **文件夹里附真实 `example.html`。** 手写一份 —— agent 才有 target 可抄。没附的 PR 直接打回。+2. **`example.html` 能在浏览器里渲染**(`pnpm dev` → 选这个 skill → ⌘+Enter → 截图)。截图附 PR。+3. **硬约束写得具体。** "用现代字体" 不是约束。真正的约束长这样:"Inter 96 / 64 / 40 / 24 / 16 px 字号梯度,8px 网格,每页最多两个字重"。+4. **example 里不许有 `lorem ipsum`**。要用占位数据,也得是看起来像真的占位数据。+5. **slug 用小写 + 连字符** —— `deck-swiss-international`、`social-x-post-card`。和已有的 75 个文件夹保持一致。+6. **vendor 进来的作品,必须保留原始 `LICENSE` 和署名**。比如 [`src/lib/templates/skills/deck-guizang-editorial/`](src/lib/templates/skills/deck-guizang-editorial/) 完整保留了 op7418 的 LICENSE 和署名。++### picker 分组规则++picker 用两个维度组织 skill。**优先用已有的取值**,只有当你的 skill 真的不适合任何已有值时才引入新值:++- **`mode`** —— `prototype` · `deck` · `frame` · `social` · `office` · `doc` · `mockup` · `vfx`+- **`scenario`** —— `design` · `marketing` · `engineering` · `product` · `finance` · `hr` · `sale` · `personal`++---++## 加一个新的 coding-agent CLI++接入新 agent(比如某家的 `foo-coder` CLI),就在 [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) 加一行:++```ts+{+ id: 'foo',+ name: 'Foo Coder',+ bin: 'foo',+ detect: { args: ['--version'] },+ build: (prompt: string) => ({+ args: ['exec', '-p', prompt],+ stdin: null, // 如果 CLI 走 stdin,写 'prompt'+ }),+ stream: 'plain', // 'plain' | 'json-event' | 'claude-stream-json'+}+```++完事。`/api/agents` 会在 `PATH` 上扫到它,顶栏 picker 会出现,chat 流程走同一条 SSE 管道。如果这个 CLI 输出**有类型的事件**(比如 Claude Code 的 `--output-format stream-json`),在 [`src/lib/agents/invoke.ts`](src/lib/agents/invoke.ts) 加 parser,把 `stream` 设成 `'claude-stream-json'`。++### Agent adapter PR 合并标准++1. **端到端跑通过一次真实 session。** `pnpm dev` 起服,选你接入的 agent,用任一 skill 的 `example_prompt` 生成一次,把 SSE 日志贴在 PR 描述里。+2. **`PATH` 检测在 macOS / Linux / WSL 都能找到。** 扫描器已经包含 `~/.local/bin` · `~/.bun/bin` · `/opt/homebrew/bin` · `~/.npm-global/bin`;如果你的 CLI 装在别处,把目录加进扫描列表。+3. **README 的 "Supported coding agents" 表格加一行**,`README.md` 和 `README.zh-CN.md` 都改。+4. **stream parser 复用。** 如果新 CLI 输出和已有 adapter 形状一致,请共用 parser,不要 fork。++---++## 加一个新的发布目标++发布目标分两块:`src/lib/export/` 下的 helper 负责产出字节(`.html` 的字符串、`.png` 的 Blob、粘贴的 `ClipboardItem`),[`src/components/drafts-menu.tsx`](src/components/drafts-menu.tsx) 里加一个菜单项把它接进 UI。++### Export PR 合并标准++1. **目标平台往返测试。** 把产物粘 / 上传到目标平台(公众号编辑器、X 输入框、知乎编辑器),把结果截图贴 PR。+2. **代码里不许有平台凭证。** 需要 API Key 的话,让用户在 settings 里填,仓库不许内置。+3. **产物自包含。** `.html` 用 `juice` 内联 CSS;PNG 用 `modern-screenshot` 走 2× DPR。++---++## 代码风格++我们对格式不严苛(Prettier on save 就够),但有两条不商量,因为它们直接出现在 prompt 栈和对外 API 里:++1. **TS/TSX 用单引号。** 除非转义太丑,否则字符串一律单引号。仓库已经全员一致 —— 请保持。+2. **代码注释一律英文。** 即使你这个 PR 是把某段翻成中文,**代码注释**也保持英文,方便整库 grep。++此外:++- **不要复读。** `// import the module`、`// loop through items` 之类的注释是噪音。只在代码无法表达的"为什么"上写注释。+- **`src/` 下用 TypeScript。** 没特别理由不要新增顶层 `.js` 文件。+- **新增顶层依赖**要在 PR 描述里写一段"我们得到了什么 vs 我们打包多了多少字节"。[`package.json`](package.json) 的依赖列表是有意保持小的。+- **push 前跑一次 `pnpm build`**。类型错会卡 merge。++---++## Commit & PR 规范++- **一个 PR 一件事。** 加一个 skill + 重构 SSE parser + 升一个依赖 = 三个 PR。+- **标题用祈使句 + scope。** `add deck-product-launch skill`、`fix SSE backpressure when CLI hangs`、`docs: clarify skill frontmatter`。+- **正文写"为什么"。** "做了什么"通常 diff 一看就懂;"为什么要做"很少看得出来。+- **挂关联 issue。** 没有 issue 但 PR 又不小?请先开一个,约好这件事值得做之后再写代码。+- **review 期间不要 squash。** 用 fixup commit;merge 时我们会 squash。+- **不要 force-push 共享分支**,除非 reviewer 让你做。++我们不强制 CLA。Apache-2.0 已经覆盖;你的贡献以同一份协议授权。++---++## 报 bug++开 issue 时请附:++- 你跑的命令(确切的 `pnpm dev` 调用,或者你点的 UI 按钮)。+- 选的是哪个 agent CLI(Claude Code? Cursor Agent? …)。+- 触发的是哪个 skill。+- 相关的 **server 日志尾部** —— "artifact 没有渲染出来"这类问题,看到 `spawn ENOENT` 或者 CLI 的真实错误,通常 30 秒就能诊断。+- 如果是 UI 问题,附截图。++prompt 栈相关的 bug("agent 输出了紫色渐变 hero,`SKILL.md` 里明明禁止了"),请把**完整的 assistant message** 贴进来,方便判断是模型违规还是 prompt 写漏了。++---++## 提问++- 架构问题、设计问题、"这算 bug 还是误用" → [GitHub Discussions](https://github.com/your-org/html-anything/discussions)(首选 —— 下一个遇到同样问题的人能搜到)。+- "怎么写一个做 X 的 skill" → 开 discussion。我们回答之后,如果这是一个新的 pattern,会把答案沉淀进这份文档。++---++## 我们不接受的 PR++为了让项目保持聚焦,请不要提以下 PR:++- **内置模型 runtime。** 这个项目押注的就是"你已经有的 CLI 就够了"。不内置 `pi-ai`、不内置 OpenAI key、不内置 model loader、不内置托管推理 proxy。+- **未经讨论就把前端栈换掉。** Next.js 16 App Router + React 19 + Tailwind v4 + TypeScript 是底线。不要换 Astro / Solid / Svelte 等等,除非维护者明确想做这次迁移。+- **把 SSE 流式换成 WebSocket / 长轮询。** SSE + iframe `srcdoc` append 是最简单能做到实时渲染的方案,我们保留它。+- **加 telemetry / analytics / phone-home。** 项目是 local-first。唯一的对外调用是你笔记本上的 agent CLI,以及生成出来的 HTML 自己引用的资源(Tailwind CDN、Google Fonts)。+- **打包二进制**但不附 LICENSE 与署名。+- **加一个 skill,但 `example.html` 是空的 / 占位的 / 一眼模型批量糊出来没审过。** skill 的价值靠 example 撑;空 example 直接打回。++不确定自己的想法合不合适?写代码之前先开 discussion。++---++## 多语言维护++仓库以 parity 方式维护两种语言:英文(`README.md`、`CONTRIBUTING.md`)与简体中文(`README.zh-CN.md`、`CONTRIBUTING.zh-CN.md`)。新增 / 改名 skill、agent、export 目标时:++- **两份 README 的表格都要更新。**+- 如果你的改动引入了新的贡献入口或新的合并标准,**两份 CONTRIBUTING 都要同步**。+- **Skill 提示词正文保持源语言。** 不要翻译 `SKILL.md` —— 它是给 agent 读的 prompt 栈的一部分,保持单一源语言能避免提示词 QA 跨语言膨胀。+- server 错误消息、文件名、agent 生成的产物文本都是已知短板,除非 PR 明确把它们纳入改动范围。++---++## License++参与贡献即代表你同意:你的贡献以本仓库的 [Apache-2.0 License](LICENSE) 授权。++vendor 进来的第三方作品保留**原始** LICENSE 与署名 —— 每个 `src/lib/templates/skills/<skill>/` 文件夹里的 `LICENSE` / `README.md` 以它为准。最明显的例子是 [`src/lib/templates/skills/deck-guizang-editorial/`](src/lib/templates/skills/deck-guizang-editorial/),完整保留了 [op7418](https://github.com/op7418) 的原始 LICENSE 与署名。++[skill]: https://docs.anthropic.com/en/docs/claude-code/skillsdiff --git a/LICENSE b/LICENSEnew file mode 100644index 00000000..d6456956--- /dev/null+++ b/LICENSE@@ -0,0 +1,202 @@++ Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "[]"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright [yyyy] [name of copyright owner]++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.diff --git a/PROGRESS.md b/PROGRESS.mdnew file mode 100644index 00000000..10b5ecb7--- /dev/null+++ b/PROGRESS.md@@ -0,0 +1,269 @@+# HTML Anything — 构建进度追踪++> 持久化任务列表,防止 context 丢失。每完成一项就更新此文件。+> 最近更新: **全部 11 项任务完成 ✅** — 端到端跑通, dev server 在 :3456++## 项目目标++把任意数据/文档(文本、Markdown、CSV、Excel、JSON、SQL、图片)转成"世界级好看"的 HTML:+PPT、简历、海报、知识卡片、社媒图、网页原型、文章、Hyperframes 视频脚本……+然后一键复制成公众号/推特/知乎可发布格式,或截图导出。++灵感来源: Claude Code 创始人不再用 markdown 全用 HTML 表达 → 我们做 "everything → HTML"。++## 全局任务清单++| # | 任务 | 状态 | 备注 |+|---|------|------|------|+| 1 | 研究参考项目核心特性 | ✅ | open-design agent 检测 / markdown-nice 复制 / markdown-to-image 截图 都已研究 |+| 2 | 初始化 Next.js 项目骨架 | ✅ | Next.js 16 + React 19 + Tailwind v4 + Turbopack |+| 3 | 实现本地 Code Agent 检测 API | ✅ | detect.ts + argv.ts + invoke.ts + /api/agents + /api/convert SSE |+| 4 | 构建编辑器/预览主界面布局 | ✅ | toolbar + agent picker + template picker + editor pane + preview pane + export menu |+| 5 | 实现多种数据格式输入处理 | ✅ | auto detect (md/csv/tsv/json/yaml/sql/html) + xlsx 解析 + 图片 dataUrl + 文件上传 |+| 6 | 设计多套世界级 HTML 模板/设计系统 | ✅ | 9 个模板: 文章/PPT/简历/海报/小红书/推特/Web 原型/数据报告/Hyperframes |+| 7 | 实现 AI 转换流水线 | ✅ | spawn agent → SSE → 客户端 hook → iframe 实时刷新 (Claude 测试通过 80s/31KB) |+| 8 | 实现一键复制到公众号/推特/知乎 | ✅ | juice 内联 + ClipboardItem + 知乎数学公式处理 + Safari fallback |+| 9 | 实现 HTML 截图/导出/分享 | ✅ | modern-screenshot 2x PNG / 复制到剪贴板 / 下载 .html / .png |+| 10 | 编写有传播力的 README | ✅ | 中英双语, 含 architecture/templates/agents 表/致谢 |+| 11 | 端到端验证整个流程跑通 | ✅ | curl POST /api/convert → claude → SSE → 完整 HTML 输出, 0 错误 |++## 技术决策++- **框架**: Next.js 16 App Router + Server Components 边界控制+- **样式**: Tailwind v4 (无配置文件, CSS-first)+- **编辑器**: 简洁 textarea + 标签页(文本/MD/CSV/Excel/JSON/上传),不引入 Monaco+- **预览**: iframe srcdoc 沙箱,每次转换后注入完整 HTML+- **状态**: zustand (客户端) + RSC fetch+- **AI 调用**: 优先本地 CLI agent(spawn + stdin pipe + SSE relay),可选 API key 兜底+- **复制**: juice 内联样式 → ClipboardItem({'text/html', 'text/plain'})+- **截图**: modern-screenshot domToBlob (image/png) → 剪贴板或下载+- **模板**: 每个模板 = name + category + aspectRatio + designTokens + promptTemplate+ - 提示词中包含 Tailwind CDN 引导 + 字体 + 配色 + 排版规则 → AI 输出自包含 HTML++## 文件结构(计划)++```+src/+├── app/+│ ├── api/+│ │ ├── agents/route.ts ✅ GET 检测 agent+│ │ └── convert/route.ts ⏳ POST 流式转换+│ ├── layout.tsx ⏳ 改 metadata + 字体+│ ├── page.tsx ⏳ 主编辑器+│ └── globals.css ⏳ 主题+├── components/+│ ├── editor-pane.tsx+│ ├── preview-pane.tsx+│ ├── toolbar.tsx+│ ├── agent-picker.tsx+│ ├── template-picker.tsx+│ ├── export-menu.tsx+│ └── upload-dropzone.tsx+├── lib/+│ ├── agents/+│ │ ├── detect.ts ✅+│ │ ├── argv.ts ✅+│ │ └── invoke.ts ⏳ spawn helper+│ ├── parsers/+│ │ ├── csv.ts ⏳+│ │ ├── xlsx.ts ⏳+│ │ └── auto.ts ⏳ 自动判断输入类型+│ ├── templates/+│ │ ├── index.ts ⏳+│ │ ├── article.ts+│ │ ├── ppt.ts+│ │ ├── resume.ts+│ │ ├── poster.ts+│ │ ├── xiaohongshu.ts+│ │ ├── twitter-card.ts+│ │ ├── prototype.ts+│ │ └── hyperframes.ts+│ ├── export/+│ │ ├── wechat.ts ⏳+│ │ ├── twitter.ts+│ │ ├── zhihu.ts+│ │ └── image.ts+│ └── store.ts ⏳ zustand+├── PROGRESS.md ✅ 本文件+└── README.md ⏳+```++## 待办(细化) — 全部 ✅++- [x] task-1 研究 (open-design / markdown-nice / markdown-to-image)+- [x] task-2 init Next.js 16 + Tailwind v4 + Turbopack+- [x] task-3.1 detect.ts (PATH 扫描 + 16 个 agent 定义)+- [x] task-3.2 argv.ts (8 个 agent 的 headless 调用参数 + 解析器)+- [x] task-3.3 /api/agents/route.ts+- [x] task-3.4 invoke.ts (spawn + stream + 防御性 close 处理)+- [x] task-4.1 store.ts (zustand + persist)+- [x] task-4.2 主界面布局 (toolbar + 50/50 split)+- [x] task-4.3 toolbar (logo + agent + template + convert + export + ⌘+Enter)+- [x] task-4.4 agent-picker (auto detect + refresh + 已安装/未安装分组)+- [x] task-4.4 template-picker (9 个模板 emoji + 尺寸提示)+- [x] task-4.5 editor-pane (输入/上传/示例 三 tab + 自动格式识别)+- [x] task-4.5 preview-pane (预览/代码/日志 三 tab + status badge)+- [x] task-5.1 parsers/auto.ts (md/csv/tsv/json/yaml/sql/html 自动识别)+- [x] task-5.2 parsers/file.ts (xlsx 解析 + 图片 dataUrl + 文本)+- [x] task-5.2 upload-dropzone (拖拽 + 点击)+- [x] task-6.1 templates/index.ts 注册表+- [x] task-6.2 9 个模板(高质量提示词 + 设计系统约束)+- [x] task-7.1 /api/convert/route.ts (SSE relay)+- [x] task-7.2 use-convert.ts (客户端 SSE 解析 + 流式 append)+- [x] task-7.3 extract-html.ts (从 chatty agent 输出抽取 HTML)+- [x] task-8.1 export/wechat.ts (juice 内联)+- [x] task-8.2 export/zhihu.ts (math → data-eeimg)+- [x] task-8.3 export/image.ts (modern-screenshot 2x PNG)+- [x] task-8.4 export/clipboard.ts (ClipboardItem + Safari fallback)+- [x] task-8.5 export-menu UI (7 个动作: 公众号/知乎/推特/HTML/纯文本/.html/.png)+- [x] task-9 download.ts (.html / .png)+- [x] task-10 README 中英文 + agent 表 + 模板表 + architecture 图+- [x] task-11 dev server :3456 + 真实 claude 调用通过++## 风险记录++- Tailwind v4 + 在 iframe 预览中需要 CDN 注入(每次转换的 HTML 中包含 Tailwind play CDN)✅ 已在所有模板提示词中要求+- 本地 agent 不存在时需引导用户 → 显示安装指引(claude/cursor/codex)✅ agent-picker 显示"未检测到", 未安装条目 disabled 显示+- HTML 通过 iframe srcdoc 注入: 注意 XSS, 严格沙箱 ✅ `sandbox="allow-scripts allow-same-origin"`, 没有给到 top-frame+- Iframe srcdoc 在流式更新时会刷新 → 当前是接受的代价 (claude 大约 2-3 个 chunk, 不是字符级流), 后续可加 debounce++## 验证记录 (2026-05-10 23:30)++- `pnpm exec tsc --noEmit` ✅ 0 errors+- `GET / 200` (295ms, SSR + Tailwind v4 OK)+- `GET /api/agents 200` → 检测到 7 个本地 agent (claude/codex/cursor-agent/gemini/copilot/opencode/aider)+- `POST /api/convert` (claude, article-magazine 模板) → 80s 内返回完整 SSE 流, 4 个事件 (start + 2 deltas + done), 31KB HTML+- 生成的 HTML: 自包含 Tailwind CDN + Google Fonts (Inter/Manrope/Noto Sans/Serif SC/JetBrains Mono) + 自定义 theme + 真实文章排版++## 启动方式++```bash+cd /Users/pftom/.superset/projects/html-everthing+pnpm dev # 默认 :3000+# 或 PORT=3456 pnpm dev+```++## v4 升级 (2026-05-11) — 模型选择 + 首次入口流程++用户反馈: 首次进来如果没配置过 agent, 应该自动弹框选择 + 配置, 包括能选对应 CLI 的模型.++页面入口的 auto-popup 之前已经在 `page.tsx:24` 实现 (`!welcomeAck || !selectedAgent → setOpen(true)`); 本次补齐**模型选择** + **协议感知**.++### 关键改动文件+- `src/lib/agents/detect.ts`+ - 新加 `ModelOption` 类型 + `DEFAULT_MODEL` 常量 ("default" → 不传 `--model`, 让 CLI 自己挑)+ - 17 个 agent 全部带 `fallbackModels`, 参考 open-design 的 `apps/daemon/src/agents.ts` 的 evidence-based 列表+ - `DetectedAgent` 暴露 `protocol` + `models` + `unsupported`, 客户端一次拉到所有 picker 数据+- `src/lib/store.ts` — 新 `agentModels: Record<string, string>` 持久化每个 agent 的最近选择;`AgentInfo` 类型同步加 `protocol/models/unsupported` 字段;persist v2 → v3, 加 `setAgentModel(agent, model)` setter+- `src/components/welcome-modal.tsx`+ - 新 `ModelPicker` 子组件 — 选中 agent 后渲染圆角 chip 列表, 点击切换并写入 `agentModels[id]`+ - 新 `PROTOCOL_HINT` — 在 agent card 上加 `stdin · stream` / `positional argv` / `ACP JSON-RPC · 暂未接入` / `pi-rpc · 暂未接入` 标签+ - 选中 ACP/pi-rpc 时 footer 显红色提示 + "进入编辑器" 按钮 disabled (不阻止用户继续浏览, 但拒绝带未支持 agent 进入流程)+- `src/lib/use-convert.ts` — `ConvertReq` 加 `model`, payload 中按需 `{model: ...}`, log 行包含模型名+- `src/components/toolbar.tsx`+ - 从 store 读 `agentModels[selectedAgent]`, 透传到 `run()`+ - agent button 增加 mono 风格 model badge (default 时不显示)+ - `canConvert` 现在也排除 `agentInfo?.unsupported` 的情形, 配套 friendly tooltip++### 验证+- `pnpm exec tsc --noEmit` ✅ 0 errors in agents/store/use-convert/toolbar/welcome-modal+- `GET /api/agents` → 17 个 agent, 每个含 1-9 个 model, protocol 字段正确 (stdin × 9 / argv × 1 / acp × 6 / pi-rpc × 1), unsupported 标记齐+- `POST /api/convert {agent:"claude", model:"haiku", ...}` → spawn argv 末尾确实多出 `--model haiku` ✅+- 首次访问 (清 localStorage) → modal 自动弹出, 选 agent → 出现 model chip 行 → 选 sonnet → 进入编辑器后 toolbar 显示 `Claude Code [sonnet] ›`++## v3 升级 (2026-05-11) — 全量 code agent 接入++参考 open-design 的 `apps/daemon/src/agents.ts`,把代理矩阵从 8 → 17:++| # | agent | bin | 协议 | 备注 |+|---|-------|-----|------|------|+| ✅ | claude | `claude` (fb: openclaude/openclaw) | stdin · stream-json | 加 openclaw fork 入口 |+| ✅ | codex | `codex` | stdin · json | 既有 |+| ✅ | cursor-agent | `cursor-agent` | stdin · stream-json | 既有 |+| ✅ | gemini | `gemini` | stdin · stream-json | 既有 |+| ✅ | copilot | `copilot` | stdin · json | 既有 |+| ✅ | opencode | `opencode-cli`/`opencode` | stdin · json | 既有 |+| ✅ | qwen | `qwen` | stdin · plain | 既有 |+| ✅ | aider | `aider` | stdin · plain | 既有 |+| ✅ | qoder | `qodercli` | stdin · stream-json | 新, 复用 claude 风格 envelope 解析 |+| ✅ | deepseek | `deepseek` | **argv** · plain | 新, prompt 走位置参数 (`exec --auto <prompt>`); invoke.ts 加 `protocol:"argv"` 分支 |+| ⚠️ | hermes | `hermes` | ACP JSON-RPC | 检测+安装提示,调用时返回 `UnsupportedAgentProtocolError` |+| ⚠️ | kimi | `kimi` | ACP JSON-RPC | 同上 |+| ⚠️ | devin | `devin` | ACP JSON-RPC | 同上 |+| ⚠️ | kiro | `kiro-cli` | ACP JSON-RPC | 同上 |+| ⚠️ | kilo | `kilo` | ACP JSON-RPC | 同上 |+| ⚠️ | vibe | `vibe-acp` | ACP JSON-RPC | 同上 |+| ⚠️ | pi | `pi` | pi-rpc (Inflection 自有 RPC) | 同上 |++### 关键改动文件+- `src/lib/agents/detect.ts` — 加 `AgentProtocol` 类型 (stdin/argv/acp/pi-rpc); 注册 9 个新 agent; claude 加 `openclaw` fallback+- `src/lib/agents/argv.ts` — 加 `UnsupportedAgentProtocolError`; `buildArgv` 新增 qoder/deepseek 分支 + 6 个 ACP agent + pi 全部抛 friendly error; `parseLine` 处理 qoder envelope + 把 deepseek 视作 plain text (同 aider)+- `src/lib/agents/invoke.ts` — `protocol:"argv"` 时把 `opts.prompt` 追加到 argv 末尾,并跳过 stdin 写入;捕获 `UnsupportedAgentProtocolError` 转 SSE error event+- `src/components/welcome-modal.tsx` — `VENDOR_HINT` 加 9 个 vendor (DeepSeek/Cognition/Mature/Moonshot/Inflection/AWS/Kilo/Mistral/Qoder), 每个含 gradient 配色 + 安装命令++### 验证+- `pnpm exec tsc --noEmit` ✅ 0 errors in agents/* and welcome-modal (其它 store/toolbar 错误为 v2 task-list 重构遗留, 与本次无关)+- `GET /api/agents` → 17 个 agent, 本机 10 个已安装 (claude/codex/cursor-agent/gemini/copilot/opencode/deepseek/aider/hermes/kiro)+- `POST /api/convert {agent:"hermes",...}` → SSE 立即返回 `{"type":"error","message":"hermes uses the ACP JSON-RPC protocol, which is not yet wired up..."}` ✅+- `POST /api/convert {agent:"pi",...}` → 未安装时报 `not installed or not on PATH` ✅++## v2 升级 (2026-05-11) — 用户反馈后++| # | 任务 | 状态 | 说明 |+|---|------|------|------|+| 12 | 增强 verbose 日志 | ✅ | DELTA/META/START/STDERR/RAW/DONE/ERROR 7 类彩色 badge + 时间戳 + +elapsed; meta 含 model/session/cwd/usage/cost/duration |+| 13 | 进入页 agent 选择弹框 | ✅ | 居中 modal, 已安装/未安装分组卡片, 含 vendor 渐变色块 + 安装命令提示 + pulse-dot |+| 14 | 整体样式 1:1 open-design | ✅ | paper/bone/ink/coral 调色 + Inter Tight + Playfair italic 强调 + 圆角 pill + paper-grain 背景 |+| 15 | 代码 + 预览实时流式 | ✅ | claude 加 --include-partial-messages → 150 deltas (vs 旧 2 chunks); 代码 tab 自动 scroll + ▍ 光标; iframe 320ms 防抖 |++### 关键改动文件+- `src/lib/agents/argv.ts` — 加 `--include-partial-messages` 给 claude; 新 `parseLine()` 抽出 delta + meta (model/session/usage/cost/duration/rate_limit)+- `src/lib/agents/invoke.ts` — emit `meta` / `raw` / `start.promptBytes` 事件+- `src/lib/use-convert.ts` — 客户端解析 meta, 写入 `stats` (model/tokens/cost/ttfb)+- `src/lib/store.ts` — 新 `RunStats` + 结构化 `LogEntry` (kind/elapsed/data)+- `src/components/welcome-modal.tsx` — 新建, 1:1 open-design 风格+- `src/components/toolbar.tsx` — agent button 改 pill 形式 + 实时 stats+- `src/components/preview-pane.tsx` — 代码 tab 流式 + 光标; debouncedHtml 320ms; LogPanel 7 色 badge+- `src/components/template-picker.tsx` — 改成卡片下拉+- `src/components/export-menu.tsx` — 三段式分组+- `src/app/globals.css` — 完整 open-design 调色板 + .pill / .btn-primary / .btn-ghost / .btn-ink / .od-card / .pulse-dot / .serif-em+- `src/app/layout.tsx` — Inter / Inter Tight / Playfair Display / JetBrains Mono 4 套字体+- `src/app/page.tsx` — 挂载 WelcomeModal, hydration-safe++## 所有参考的项目地址+原始 query++我要做一个任意数据文档可以转 HTML 的一个产品,一个编辑器产品。它核心可以完成这么几个事情:+ 首先一进来可以去识别用户的本地的 code agent.+ 然后可以选择某个 code agent, 这是第一个。第二个的话就是说它左侧是一个编辑器或者是 upload+ 的一个入口,然后右侧是一个 HTML 的预览。然后呢左侧的话可以去直接贴一些文本,无论是 markdown+ 的纯文本还是一些 CSV、excel 等数据,对或者是一些 CQ 等 database,然后可以直接贴进去,或者是有一个上传入口+ 可以上传进去。然后上点完之后呢,又点完一个转换之后呢,就可以调 AI,然后去转成右侧的 HTML。这第二个然后第 3+ 个的话就是右边那个 HTML,它可以去选择不同的 design system 或者是好看的模板。然后可以结合一套完整的提示词+ 加流程,把这个左侧的这些数据或者是文档转成右侧,按照这个模板好看的 HTML,然后这个 HTML 可以是 PPT+ 或者是原型/或者通过 html 可以表达的内容,比如简历/hyperframes 视频等的形态对。然后呢,这些转换之后的 HTML+ 可以一键复制成公众号、推特或者是知乎等格式的发布的数据的形态,然后可以复制到剪贴板。++ 参考如下这几个项目完成工作:+ - 编辑器/html 预览/复制到推特/公众号知乎等格式参考:https://github.com/mdnice/markdown-nice+ - 各种 design+ system/examples/模板等/形态(ppt/网页/简历等,或者你可以拓展很多有价值的场景,比如海报/各种社媒配图等),+ 这个参考 https://github.com/nexu-io/open-design https://github.com/mdnice/markdown-resume+ https://github.com/jimliu/baoyu-skills https://github.com/gcui-art/markdown-to-image+ - 识别本地 code agent 参考 https://github.com/nexu-io/open-design+ - 转成 hyperframes 视频/remotion 视频:参见https://github.com/remotion-dev/remotion+ https://github.com/heygen-com/hyperframes https://github.com/nexu-io/open-design++ 需要仔细检查最后有没有跑完并完成整个工作,整体的目标就是 everthing 都可以表达为 html,然后被表达为 html+ 可以表达的任何内容,核心是一定要好看/世界级设计水准/让用户易于传播++ 使用 nextjs 实现项目,用户要做就是识别 agent,填入内容或者上传内容,然后转化(调用+ agent),然后下载/分享等过程一定要易用,快捷,有价值++ 搞定之后,可以 写个 readme, 参考 https://github.com/nexu-io/open-design ,+ 有很多技术/例子/图片等,让用户觉得非常有价值能宣传和传播+ 这个项目的缘由是 claude code 创始人发了一篇文章,说他们现在不用 markdown,全部用 html 表达了,我们希望呈现+ everhting 到 html ,以及能做的事情,传播和吃热度 https://x.com/AlchainHust/status/2053138568818684101+ https://github.com/alchaincyf/huashu-md-html https://x.com/trq212/status/2052809885763747935++ 可以先写个 plan+todo 列表,然后围绕 todo 列表一遍遍检查,直到所有 todo+ 都勾掉确保能够完成跑通直接可以使用,我明天早上过来检查你的任务diff --git a/README.md b/README.mdnew file mode 100644index 00000000..8a5c1c88--- /dev/null+++ b/README.md@@ -0,0 +1,483 @@+# HTML Anything++> **Turn anything into ship-ready HTML, powered by your local AI agent.** Ship-ready = the output is what you actually paste, post, or hand off — no second pass in Figma, no manual re-flow on each platform, no "I'll polish it later". Local-first, zero API key, reuses the CLI session you already have logged in — **8 coding-agent CLIs** auto-detected on your `PATH` (Claude Code · Cursor Agent · Codex · Gemini CLI · GitHub Copilot CLI · OpenCode · Qwen Coder · Aider), driven by **75 composable skill templates** across **9 deliverable surfaces** (magazine articles · keynote decks · résumés · posters · Xiaohongshu cards · tweet cards · web prototypes · data reports · Hyperframes videos). One-click export to WeChat / X / Zhihu, or download `.html` / `.png`.++<p align="center">+ <img src="docs/assets/banner.png" alt="HTML Anything — turn anything into ship-ready HTML, on your laptop" width="100%" />+</p>++<p align="center">+ <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square" /></a>+ <a href="#supported-coding-agents"><img alt="Agents" src="https://img.shields.io/badge/agents-8%20CLIs-black?style=flat-square" /></a>+ <a href="#skills"><img alt="Skills" src="https://img.shields.io/badge/skills-75-orange?style=flat-square" /></a>+ <a href="#export-targets"><img alt="Export" src="https://img.shields.io/badge/export-WeChat%20%C2%B7%20X%20%C2%B7%20Zhihu%20%C2%B7%20PNG-9b59b6?style=flat-square" /></a>+ <a href="#quickstart"><img alt="Quickstart" src="https://img.shields.io/badge/quickstart-2%20commands-green?style=flat-square" /></a>+ <a href="#architecture"><img alt="No API key" src="https://img.shields.io/badge/no-API%20key%20required-ff6b35?style=flat-square" /></a>+</p>++<!-- This project is built on top of nexu-io/open-design — the badges below link to its community channels on purpose. -->+<p align="center">+ <a href="https://github.com/nexu-io/open-design#community"><img alt="Discord (open-design)" src="https://img.shields.io/badge/discord-join-5865f2?style=flat-square&logo=discord&logoColor=white" /></a>+ <a href="https://x.com/nexudotio"><img alt="Follow @nexudotio on X" src="https://img.shields.io/badge/follow-%40nexudotio-000000?style=flat-square&logo=x&logoColor=white" /></a>+ <a href="https://github.com/nexu-io/open-design/releases/latest"><img alt="open-design release" src="https://img.shields.io/github/v/release/nexu-io/open-design?style=flat-square&label=release&color=8e44ad" /></a>+ <a href="https://github.com/nexu-io/open-design/graphs/commit-activity"><img alt="open-design commits / month" src="https://img.shields.io/github/commit-activity/m/nexu-io/open-design?style=flat-square&label=commits%2Fmonth&color=f39c12" /></a>+ <a href="#showcase"><img alt="Design systems" src="https://img.shields.io/badge/design%20systems-9-1abc9c?style=flat-square" /></a>+ <a href="https://github.com/nexu-io/open-design"><img alt="Built on open-design" src="https://img.shields.io/badge/built%20on-nexu--io%2Fopen--design-ff7043?style=flat-square&logo=github&logoColor=white" /></a>+</p>++<p align="center"><b>English</b> · <a href="README.zh-CN.md">简体中文</a></p>++---++## Showcase++The eight skills that surface at the top of the picker's **Featured / 推荐** group — sorted by their `recommended:` rank in `SKILL.md` frontmatter (lower = higher). Each ships a real `example.html` you can open straight from the repo, no auth, no setup.++<table>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/deck-guizang-editorial/"><img src="docs/screenshots/skills/deck-guizang-editorial.png" alt="deck-guizang-editorial" /></a><br/>+<sub><b><a href="src/lib/templates/skills/deck-guizang-editorial/"><code>deck-guizang-editorial</code></a></b> · <i>deck</i> · <code>recommended: 1</code><br/>Magazine × e-ink editorial deck, inspired by <a href="https://github.com/op7418/guizang-ppt-skill"><code>op7418/guizang-ppt-skill</code></a> — 10 locked layouts × 5 palettes (Ink / Indigo Porcelain / Forest Ink / Kraft / Dune). Reads like a printed art-zine, not a slide deck.</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/deck-swiss-international/"><img src="docs/screenshots/skills/deck-swiss-international.png" alt="deck-swiss-international" /></a><br/>+<sub><b><a href="src/lib/templates/skills/deck-swiss-international/"><code>deck-swiss-international</code></a></b> · <i>deck</i> · <code>recommended: 2</code><br/>Swiss International deck — 16-column grid + one saturated accent (Klein Blue / Lemon / Mint / Safety Orange) across 22 locked layouts. Cold, rational, institutional. The deck that reads "a designer made this" the moment it opens.</sub>+</td>+</tr>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/doc-kami-parchment/"><img src="docs/screenshots/skills/doc-kami-parchment.png" alt="doc-kami-parchment" /></a><br/>+<sub><b><a href="src/lib/templates/skills/doc-kami-parchment/"><code>doc-kami-parchment</code></a></b> · <i>doc</i> · <code>recommended: 3</code><br/>Warm-parchment editorial document, inspired by <a href="https://github.com/tw93/kami"><code>tw93/kami</code></a>. <code>#f5f4ed</code> ground + ink-blue accent + single serif voice — a noticeably calmer reading surface than plain-white markdown for long essays, reports, and one-pagers.</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/magazine-poster/"><img src="docs/screenshots/skills/magazine-poster.png" alt="magazine-poster" /></a><br/>+<sub><b><a href="src/lib/templates/skills/magazine-poster/"><code>magazine-poster</code></a></b> · <i>poster</i> · <code>recommended: 4</code><br/>Newsprint Sunday-paper poster — oversized serif headline, two-column body, six numbered sections, dot-pattern cream ground. Reads like a printed broadsheet, not a webpage.</sub>+</td>+</tr>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/video-hyperframes/"><img src="docs/screenshots/skills/video-hyperframes.png" alt="video-hyperframes" /></a><br/>+<sub><b><a href="src/lib/templates/skills/video-hyperframes/"><code>video-hyperframes</code></a></b> · <i>frame / video</i> · <code>recommended: 5</code><br/>Hyperframes / Remotion-compatible storyboard — 6–10 sequential <code>1920×1080</code> frames with hidden duration + transition markers and an auto-play script. Hand straight to <a href="https://github.com/heygen-com/hyperframes"><code>heygen-com/hyperframes</code></a> or Remotion to render <code>.mp4</code>.</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/frame-glitch-title/"><img src="docs/screenshots/skills/frame-glitch-title.png" alt="frame-glitch-title" /></a><br/>+<sub><b><a href="src/lib/templates/skills/frame-glitch-title/"><code>frame-glitch-title</code></a></b> · <i>frame</i> · <code>recommended: 6</code><br/>Glitch title frame — cyan/magenta chromatic offset, CRT scanlines, corrupted-data subtitle, ASCII noise in the corners. Cyberpunk hero card or video transition.</sub>+</td>+</tr>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/vfx-text-cursor/"><img src="docs/screenshots/skills/vfx-text-cursor.png" alt="vfx-text-cursor" /></a><br/>+<sub><b><a href="src/lib/templates/skills/vfx-text-cursor/"><code>vfx-text-cursor</code></a></b> · <i>vfx</i> · <code>recommended: 7</code><br/>VFX text-cursor opener — a cursor "types" across the canvas, each character revealed with a hot-pink × cyan chromatic trail and directional light leaks. Drop in a quote, get a film-grade opening frame.</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/frame-logo-outro/"><img src="docs/screenshots/skills/frame-logo-outro.png" alt="frame-logo-outro" /></a><br/>+<sub><b><a href="src/lib/templates/skills/frame-logo-outro/"><code>frame-logo-outro</code></a></b> · <i>frame</i> · <code>recommended: 8</code><br/>Logo outro frame — logo assembles piece-by-piece with glow bloom, tagline rises, CTA appears. The closing card for a product reveal or brand film.</sub>+</td>+</tr>+</table>++The full skill catalog (organized by mode) is in [Skills](#skills) below.++## Why this exists++Anthropic's [Claude Code team announced](https://x.com/trq212/status/2052809885763747935) they stopped writing internal docs in Markdown — they ship HTML now. The argument is simple:++| Markdown | HTML |+|---|---|+| Good for the writer | Good for the reader |+| Layout limited to the renderer | Layout is yours |+| Looks ugly screenshotted into a tweet | Already looks like a designed image |+| Has to be re-flowed for WeChat / Zhihu / newsletter | One-click format conversion |++**HTML is the final form for humans. Markdown is just an intermediate state during writing.**++But "writing HTML" used to mean writing CSS, picking type scales, snapping to a grid, doing responsive — most users won't, designers won't bother, writers don't have the patience. So what we built: after you press ⌘+Enter, your **local AI agent** turns any input (Markdown / CSV / Excel / JSON / SQL / raw notes) into a **ship-ready single-file HTML** in seconds, then one-click sends it to WeChat / X / Zhihu / anywhere. "Ship-ready" is the bar — when generation finishes, the artifact is what your audience actually sees. No "I'll touch it up later" pass.++We stand on four open-source shoulders:++- [**`nexu-io/open-design`**](https://github.com/nexu-io/open-design) — the agent-detection layer, the design-system model, and the `SKILL.md` protocol. `src/lib/agents/` and `src/lib/templates/skills/*` mirror this architecture directly.+- [**`mdnice/markdown-nice`**](https://github.com/mdnice/markdown-nice) — proof that `juice`-inlined CSS pastes cleanly into WeChat and Zhihu without per-platform manual fix-up.+- [**`gcui-art/markdown-to-image`**](https://github.com/gcui-art/markdown-to-image) — the iframe → high-DPI PNG export path.+- [**`alchaincyf/huashu-md-html`**](https://github.com/alchaincyf/huashu-md-html) — the anti-AI-slop discipline that maps into the hard constraints inside every `SKILL.md` (CJK-first font stack, 8 px baseline grid, contrast ≥ 4.5, must-use-real-data rule).++## At a glance++| | What you get |+|---|---|+| **Coding-agent CLIs (8)** | Claude Code · Cursor Agent · OpenAI Codex · Gemini CLI · GitHub Copilot CLI · OpenCode · Qwen Coder · Aider — scanned on startup across `PATH` (including `~/.local/bin`, `~/.bun/bin`, `/opt/homebrew/bin`, `~/.npm-global/bin` — directories a GUI-launched Node process normally misses), swap from the top-bar picker. |+| **Zero API key** | We reuse the session you already have logged in via `claude login` · `cursor login` · `gemini auth`. Your existing subscription does the work; marginal cost is **$0**. |+| **75 skill templates** | `prototype` (web / SaaS landing / dashboard / data report) · `deck` (20 keynote skills incl. Swiss International, Guizang Editorial, XHS Pastel, Hermes Cyber, Replit, Magazine Web…) · `frame` (10 Hyperframes video frames — liquid hero, NYT data chart, sticky-note flowchart, glitch title, cinema light-leak, macOS notification, logo outro…) · `social` (X / Xiaohongshu / Spotify / Reddit cards) · `office` (PM spec · eng runbook · finance report · HR onboarding · invoice · OKRs · weekly update · meeting notes · kanban) · `doc` (Kami warm-parchment editorial) · `mockup` (3D device frame) · `vfx` (text-cursor effect). |+| **9 surface modes** | 📖 magazine article · 🎬 keynote deck · 📄 résumé · 🖼️ poster · 📱 Xiaohongshu card · 🐦 tweet card · 🛠️ web prototype · 📊 data report · 🎞️ Hyperframes video. Each has multiple skills you can pick from. |+| **One-click export** | `juice` inlines CSS → WeChat paste with zero re-formatting · `modern-screenshot` renders the iframe to a 2× PNG → `ClipboardItem` → drop straight into the tweet composer · `<mjx-container>` → `data-eeimg` placeholder → Zhihu equations render automatically · standalone `.html` download · high-DPI `.png` download. |+| **Streaming render** | `POST /api/convert` over SSE. The agent's stdout JSON-line stream is parsed for text deltas → server-sent events → client appends → iframe `srcdoc` updates live. Waiting for an AI generation looks like watching it type in real time. |+| **Sandboxed preview** | `<iframe sandbox="allow-scripts allow-same-origin">`. User-emitted HTML runs in an isolated origin — Tailwind CDN / Google Fonts / inline scripts work, but cookies and localStorage are quarantined from the host. |+| **Format auto-detect** | The editor accepts Markdown / CSV / TSV / JSON / SQL / plain text. `papaparse` + `xlsx` parse tabular data in the browser — nothing is uploaded. |+| **Deployable to** | Local (`pnpm dev`) · Vercel for the web layer (the agent always stays on your laptop). |+| **License** | Apache-2.0 |++## Demo++<table>+<tr>+<td width="50%">+<img src="docs/screenshots/01-entry-view.png" alt="01 · Entry view" /><br/>+<sub><b>Entry view</b> — the top bar shows your installed CLIs, the left pane is the editor, the middle is the template + design-system picker, the right is a live iframe preview. The same surface produces magazines, decks, posters, web prototypes, and Hyperframes frame scripts.</sub>+</td>+<td width="50%">+<img src="docs/screenshots/02-template-picker.png" alt="02 · 75 skills, searchable and filterable" /><br/>+<sub><b>75 templates, searchable and filterable</b> — pick by mode (prototype / deck / frame / social / office / doc) × scenario (design / marketing / engineering / product / personal). Every skill ships an <code>example.html</code> you can open straight from the repo to see what the agent will produce.</sub>+</td>+</tr>+<tr>+<td width="50%">+<img src="docs/screenshots/03-streaming.png" alt="03 · Live SSE streaming" /><br/>+<sub><b>SSE streaming</b> — agent stdout JSON-line is parsed for text deltas, appended into the iframe <code>srcdoc</code> in real time. You watch the page render line by line. Don't like where it's going? Interrupt and re-prompt — no wasted full generation.</sub>+</td>+<td width="50%">+<img src="docs/screenshots/04-export.png" alt="04 · One-click export" /><br/>+<sub><b>One-click export</b> — WeChat (juice-inlined CSS) · X / Weibo / Xiaohongshu (modern-screenshot → 2× PNG → <code>ClipboardItem</code>) · Zhihu (LaTeX image placeholders) · download <code>.html</code> · download <code>.png</code>. Paste straight in, no second pass of manual formatting.</sub>+</td>+</tr>+<tr>+<td width="50%">+<img src="docs/screenshots/05-deck-mode.png" alt="05 · Deck mode" /><br/>+<sub><b>Deck mode</b> — 20 keynote skills, including Swiss International (Helvetica grid maximalism), Guizang Editorial (magazine ink), Open Slide Canvas (1920×1080 agent-native), Magazine Web, XHS Pastel, Hermes Cyber, Replit Style. ←/→ to navigate slides, presenter notes, PDF export.</sub>+</td>+<td width="50%">+<img src="docs/screenshots/06-hyperframes.png" alt="06 · Hyperframes video frames" /><br/>+<sub><b>Hyperframes frames</b> — 10 motion frame scripts (liquid hero, NYT data chart, sticky-note flowchart, glitch title, cinema light-leak, macOS notification, brand logo outro, text-cursor VFX, 3D device mockup, …) conforming to <a href="https://github.com/heygen-com/hyperframes">heygen-com/hyperframes</a>; hand off straight to Remotion to render <code>.mp4</code>.</sub>+</td>+</tr>+</table>++## Quickstart++```bash+git clone https://github.com/your-org/html-anything+cd html-anything+pnpm install+pnpm dev+# → http://localhost:3000+```++Open the browser → the top bar auto-detects whichever coding-agent CLI you already have signed in → pick a template → paste content → ⌘+Enter.++**No API key required.** We reuse the session you already have logged in (Claude / Cursor / Codex / Gemini / Copilot subscriptions all work).++## Supported coding agents++On startup we scan `PATH` (including `~/.local/bin`, `~/.bun/bin`, `/opt/homebrew/bin`, `~/.npm-global/bin` — directories normally missed by GUI-launched Node) and surface every CLI we recognize:++| Agent | Detection binary | Invocation |+|---|---|---|+| **Claude Code** | `claude` | `claude -p --output-format stream-json` |+| **OpenAI Codex** | `codex` | `codex exec --json --sandbox workspace-write` |+| **Cursor Agent** | `cursor-agent` | `cursor-agent --print --output-format stream-json --force --trust` |+| **Gemini CLI** | `gemini` | `gemini --output-format stream-json --yolo` |+| **GitHub Copilot CLI** | `copilot` | `copilot --allow-all-tools --output-format json` |+| **OpenCode** | `opencode-cli` / `opencode` | `opencode run --format json --dangerously-skip-permissions -` |+| **Qwen Coder** | `qwen` | `qwen --yolo -` |+| **Aider** | `aider` | `aider --no-pretty --no-stream --yes-always --message-file -` |++> The detection strategy and per-CLI adapter shape are borrowed directly from [`nexu-io/open-design`](https://github.com/nexu-io/open-design) and [`multica-ai/multica`](https://github.com/multica-ai/multica): one privileged process spawns CLIs, JSON-line is the wire protocol, every CLI gets a thin adapter in [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts).++If you've already done `claude login` / `cursor login` / `gemini auth` in your terminal, HTML Anything reuses that session. **No second copy of the API key required.**++## Skills++**75 skills under [`src/lib/templates/skills/`](src/lib/templates/skills/)**, each a folder following the Claude Code [`SKILL.md`](https://docs.anthropic.com/en/docs/claude-code/skills) convention plus an extended frontmatter (`mode` · `scenario` · `surface` · `preview` · `design_system`).++The two axes the picker uses:++- **mode** — `prototype` (web / SaaS landing / dashboard / data report / résumé / doc) · `deck` (20 horizontal-swipe presentations) · `frame` (10 Hyperframes motion frames) · `social` (4 social-card formats) · `office` (PM / engineering / finance / HR / operations document surfaces).+- **scenario** — `design` · `marketing` · `engineering` · `product` · `finance` · `hr` · `sale` · `personal`. Used to group skills in the picker.++### Web prototypes & marketing pages (prototype mode)++| Skill | Best for | Output |+|---|---|---|+| [`prototype-web`](src/lib/templates/skills/prototype-web/) | Generic web prototype (default) | Single-page HTML, 1440×900 desktop |+| [`saas-landing`](src/lib/templates/skills/saas-landing/) | SaaS landing page | Hero / features / pricing / CTA |+| [`waitlist-page`](src/lib/templates/skills/waitlist-page/) | Waitlist / early-access page | Minimal form + social proof |+| [`pricing-page`](src/lib/templates/skills/pricing-page/) | Pricing page | Multi-tier comparison tables |+| [`dashboard`](src/lib/templates/skills/dashboard/) | Admin / analytics console | Sidebar + dense data layout |+| [`docs-page`](src/lib/templates/skills/docs-page/) | Technical documentation | 3-column docs layout |+| [`blog-post`](src/lib/templates/skills/blog-post/) | Long-form blog post | Editorial layout |+| [`mobile-app`](src/lib/templates/skills/mobile-app/) | iOS / Android prototype | iPhone 15 Pro chrome |+| [`mobile-onboarding`](src/lib/templates/skills/mobile-onboarding/) | App onboarding flow | Splash · value · sign-in trio |+| [`gamified-app`](src/lib/templates/skills/gamified-app/) | Gamified app | Quest · XP · level trio |+| [`dating-web`](src/lib/templates/skills/dating-web/) | Dating / matchmaking dashboard | Left rail · KPIs · 30-day chart |+| [`magazine-poster`](src/lib/templates/skills/magazine-poster/) | Single-page magazine poster | 1080×1920 |+| [`poster-hero`](src/lib/templates/skills/poster-hero/) | Marketing poster | Single-page display poster |+| [`web-proto-editorial`](src/lib/templates/skills/web-proto-editorial/) | Editorial-style web | Serif display + grid |+| [`web-proto-brutalist`](src/lib/templates/skills/web-proto-brutalist/) | Brutalist web | Hard edges, black & white, anti-grid |+| [`web-proto-soft`](src/lib/templates/skills/web-proto-soft/) | Soft / warm web | Soft shadows, rounded, warm palette |+| [`article-magazine`](src/lib/templates/skills/article-magazine/) | Long-form magazine article | A4 / long-page |+| [`digital-eguide`](src/lib/templates/skills/digital-eguide/) | Digital e-guide | Cover + lesson spread |+| [`resume-modern`](src/lib/templates/skills/resume-modern/) | Minimal résumé | A4 210×297mm |+| [`email-marketing`](src/lib/templates/skills/email-marketing/) | Brand product-launch email | Center single-column, table fallback |+| [`wireframe-sketch`](src/lib/templates/skills/wireframe-sketch/) | Hand-drawn wireframe | Early-pass ideation |++### Decks (deck mode, 20 skills)++| Skill | Best for |+|---|---|+| [`deck-swiss-international`](src/lib/templates/skills/deck-swiss-international/) | Swiss International deck |+| [`deck-guizang-editorial`](src/lib/templates/skills/deck-guizang-editorial/) | Editorial-ink deck (from [op7418/guizang-ppt-skill](https://github.com/op7418/guizang-ppt-skill)) |+| [`deck-open-slide-canvas`](src/lib/templates/skills/deck-open-slide-canvas/) | 1920×1080 agent-native canvas (from [1weiho/open-slide](https://github.com/1weiho/open-slide)) |+| [`deck-magazine-web`](src/lib/templates/skills/deck-magazine-web/) | Magazine-style web deck |+| [`deck-hermes-cyber`](src/lib/templates/skills/deck-hermes-cyber/) | Hermes Cyber neon-luxe |+| [`deck-replit`](src/lib/templates/skills/deck-replit/) | Replit-style product walkthrough |+| [`deck-xhs-pastel`](src/lib/templates/skills/deck-xhs-pastel/) | Xiaohongshu pastel deck |+| [`deck-xhs-white`](src/lib/templates/skills/deck-xhs-white/) | Xiaohongshu pure-white deck |+| [`deck-xhs-post`](src/lib/templates/skills/deck-xhs-post/) | Xiaohongshu single-post deck |+| [`deck-tech-sharing`](src/lib/templates/skills/deck-tech-sharing/) | Tech-sharing deck |+| [`deck-product-launch`](src/lib/templates/skills/deck-product-launch/) | Product-launch event deck |+| [`deck-pitch`](src/lib/templates/skills/deck-pitch/) | Investor pitch |+| [`deck-blueprint`](src/lib/templates/skills/deck-blueprint/) | Blueprint / roadmap |+| [`deck-presenter-mode`](src/lib/templates/skills/deck-presenter-mode/) | Speaker-notes-aware |+| [`deck-course-module`](src/lib/templates/skills/deck-course-module/) | Course module deck |+| [`deck-dir-key-nav`](src/lib/templates/skills/deck-dir-key-nav/) | Directional key-nav deep browse |+| [`deck-graphify-dark`](src/lib/templates/skills/deck-graphify-dark/) | Dark, data-graphic-heavy deck |+| [`deck-obsidian-claude`](src/lib/templates/skills/deck-obsidian-claude/) | Obsidian / Claude-flavored notes |+| [`deck-safety-alert`](src/lib/templates/skills/deck-safety-alert/) | Incident / safety briefing |+| [`deck-simple`](src/lib/templates/skills/deck-simple/) | Minimal horizontal-swipe deck |++### Hyperframes video frames & VFX & device mockups (frame / vfx / mockup, 12 skills)++| Skill | Best for |+|---|---|+| [`frame-liquid-bg-hero`](src/lib/templates/skills/frame-liquid-bg-hero/) | Liquid background hero |+| [`frame-data-chart-nyt`](src/lib/templates/skills/frame-data-chart-nyt/) | NYT-style data chart |+| [`frame-flowchart-sticky`](src/lib/templates/skills/frame-flowchart-sticky/) | Sticky-note flowchart |+| [`frame-glitch-title`](src/lib/templates/skills/frame-glitch-title/) | Glitch title card |+| [`frame-light-leak-cinema`](src/lib/templates/skills/frame-light-leak-cinema/) | Cinema light-leak |+| [`frame-macos-notification`](src/lib/templates/skills/frame-macos-notification/) | macOS notification toast |+| [`frame-logo-outro`](src/lib/templates/skills/frame-logo-outro/) | Brand logo outro |+| [`motion-frames`](src/lib/templates/skills/motion-frames/) | Generic motion-design frame |+| [`video-hyperframes`](src/lib/templates/skills/video-hyperframes/) | Hyperframes frame-script schema |+| [`sprite-animation`](src/lib/templates/skills/sprite-animation/) | Pixel / 8-bit animation |+| [`vfx-text-cursor`](src/lib/templates/skills/vfx-text-cursor/) | Text-cursor VFX |+| [`mockup-device-3d`](src/lib/templates/skills/mockup-device-3d/) | 3D device-frame mockup |++> Frame scripts conform to the [`heygen-com/hyperframes`](https://github.com/heygen-com/hyperframes) spec and hand off straight to [`remotion-dev/remotion`](https://github.com/remotion-dev/remotion) to render `.mp4`.++### Social share cards (social mode)++| Skill | Best for |+|---|---|+| [`social-x-post-card`](src/lib/templates/skills/social-x-post-card/) | X / Twitter quote card (1600×900) |+| [`social-spotify-card`](src/lib/templates/skills/social-spotify-card/) | Spotify-Wrapped style card |+| [`social-reddit-card`](src/lib/templates/skills/social-reddit-card/) | Reddit thread card |+| [`social-carousel`](src/lib/templates/skills/social-carousel/) | 3-card 1080×1080 carousel |+| [`card-xiaohongshu`](src/lib/templates/skills/card-xiaohongshu/) | Xiaohongshu image-with-text card |+| [`card-twitter`](src/lib/templates/skills/card-twitter/) | Twitter pull-quote card |+| [`social-media-dashboard`](src/lib/templates/skills/social-media-dashboard/) | Social-ops dashboard |+| [`social-media-matrix`](src/lib/templates/skills/social-media-matrix/) | Multi-platform content matrix |++### Office & operations (office / doc mode)++| Skill | Scenario | Best for |+|---|---|---|+| [`doc-kami-parchment`](src/lib/templates/skills/doc-kami-parchment/) | personal | Warm-parchment editorial doc (from [tw93/kami](https://github.com/tw93/kami)) |+| [`pm-spec`](src/lib/templates/skills/pm-spec/) | product | PM spec doc + decision log |+| [`team-okrs`](src/lib/templates/skills/team-okrs/) | product | OKR scoresheet |+| [`meeting-notes`](src/lib/templates/skills/meeting-notes/) | operation | Meeting decision log |+| [`weekly-update`](src/lib/templates/skills/weekly-update/) | operation | Team weekly cadence |+| [`kanban-board`](src/lib/templates/skills/kanban-board/) | operation | Board snapshot |+| [`eng-runbook`](src/lib/templates/skills/eng-runbook/) | engineering | Incident runbook |+| [`finance-report`](src/lib/templates/skills/finance-report/) | finance | Exec finance summary |+| [`invoice`](src/lib/templates/skills/invoice/) | finance | Single-page invoice |+| [`hr-onboarding`](src/lib/templates/skills/hr-onboarding/) | hr | Role onboarding plan |+| [`data-report`](src/lib/templates/skills/data-report/) | finance / product | CSV/Excel → visual data report |+| [`live-dashboard`](src/lib/templates/skills/live-dashboard/) | operation | Live data dashboard |+| [`flowai-team-dashboard`](src/lib/templates/skills/flowai-team-dashboard/) | operation | Team workflow dashboard |+| [`ppt-keynote`](src/lib/templates/skills/ppt-keynote/) | personal | Generic Keynote-style deck |++**Adding a skill takes one folder.** Copy a similar skill, edit its `SKILL.md` frontmatter, restart `pnpm dev`, the picker shows it. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the bar a skill PR has to clear before we merge.++## Six load-bearing ideas++### 1 · We don't ship an agent. Yours is good enough.++On boot the browser calls `/api/agents`. The server scans `PATH` — including the dirs a GUI-launched Node usually misses (`~/.local/bin`, `~/.bun/bin`, `/opt/homebrew/bin`, `~/.npm-global/bin`) — and surfaces whichever CLIs it finds. Each CLI has one adapter (argv + stdin protocol + stream parser) in [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts). The whole detection model is borrowed directly from [`nexu-io/open-design`](https://github.com/nexu-io/open-design) and [`multica-ai/multica`](https://github.com/multica-ai/multica): one privileged process spawns CLIs, JSON-line is the wire protocol.++### 2 · Skills are folders, not plugins.++Following Claude Code's [`SKILL.md` convention](https://docs.anthropic.com/en/docs/claude-code/skills) — `SKILL.md` + `assets/` + `references/` + `example.html`. Drop a folder into [`src/lib/templates/skills/`](src/lib/templates/skills/), restart `pnpm dev`, the picker shows it. `deck-guizang-editorial` is vendored directly from [`op7418/guizang-ppt-skill`](https://github.com/op7418/guizang-ppt-skill) with original LICENSE and authorship preserved.++### 3 · Hard constraints stop the model from freestyling.++Every template hardcodes:++- **CJK-first font stack** — `Noto Sans/Serif SC` / source-han for Chinese, `Inter` / `Manrope` for Latin.+- **8 px baseline grid** — every spacing, line-height, font-size is a multiple of 8.+- **Rounded corners · soft shadow · no pure black / pure white** — visual de-slop-ification.+- **Color contrast ≥ 4.5**, every interactive element has a real `:focus` state.+- **Must use the user's real data**, no lorem ipsum.++The discipline is lifted from [`alchaincyf/huashu-design`](https://github.com/alchaincyf/huashu-design)'s Junior-Designer mode + anti-AI-slop checklist. Constraints belong in the prompt — every `SKILL.md` writes them in.++### 4 · Streaming render = watch the AI draw.++`POST /api/convert` is SSE. The agent's stdout is line-delimited JSON; the server pulls out the text deltas and re-emits them as SSE events; the client appends to the iframe's `srcdoc`. The whole experience is the same as watching the agent type in a terminal, except the artifact is HTML, not Markdown. **Interrupt at any time** — you're not paying for a whole generation you don't want.++### 5 · One-click export = zero second-pass formatting.++- **WeChat MP** — `juice` inlines CSS + `data-tool` markers → paste into the editor, styles survive end to end.+- **X / Weibo / Xiaohongshu** — `modern-screenshot` renders the iframe to a 2× PNG → `ClipboardItem` → drop straight into the composer.+- **Zhihu** — same as above, plus `<mjx-container>` is replaced with `data-eeimg` LaTeX-image placeholders (Zhihu won't render KaTeX live — math has to be an image).+- **Download `.html`** / **download `.png`** — self-contained single file, shareable anywhere.++Mechanically inspired by [`mdnice/markdown-nice`](https://github.com/mdnice/markdown-nice) and [`gcui-art/markdown-to-image`](https://github.com/gcui-art/markdown-to-image).++### 6 · Sandboxed iframe = secure + isolated.++User-emitted HTML always renders inside `<iframe sandbox="allow-scripts allow-same-origin">`. Third-party scripts (Tailwind CDN, Google Fonts, custom animations) still execute, but cookies and localStorage stay in the iframe's own origin — the host page is never poisoned. Opening devtools only shows the iframe's DOM, so the debugging experience matches a standalone HTML file.++## Architecture++```+┌─────────────────────── Browser (Next.js 16) ──────────────────────┐+│ Editor / upload · top-bar agent picker · template picker · iframe │+└─────────────┬──────────────────────────────────┬──────────────────┘+ │ ⌘+Enter │+ ▼ ▼+ ┌─────────────────────┐ ┌──────────────────────┐+ │ GET /api/agents │ │ POST /api/convert │+ │ scan PATH, list │ │ SSE — spawn CLI │+ │ installed CLIs │ │ pipe stdin / stdout │+ └─────────────────────┘ └──────────┬───────────┘+ │ spawn + stdin pipe+ ▼+ ┌────────────────────────────────────┐+ │ Your local coding-agent CLI │+ │ claude / codex / cursor-agent / │+ │ gemini / copilot / opencode / │+ │ qwen / aider │+ │ → reuses your existing session │+ └────────────────────────────────────┘+ │+ ▼+ stdout JSON-line ──► SSE event+ │+ ▼+ iframe srcdoc append (live)+ │+ ⌘+C copy → ClipboardItem+ ⌘+S download → .html / .png+```++| Layer | Stack |+|---|---|+| Frontend | Next.js 16 App Router + Turbopack · React 19 · Tailwind v4 · zustand state |+| Server routes | `GET /api/agents` (detection) · `POST /api/convert` (SSE streaming spawn) |+| Agent transport | `child_process.spawn` · one stdin/stdout adapter per CLI ([`src/lib/agents/argv.ts`](src/lib/agents/argv.ts)) |+| Browser-side processing | `juice` (CSS inlining) · `modern-screenshot` (PNG export) · `xlsx` / `papaparse` (spreadsheet parsing) · `marked` + `highlight.js` (Markdown-compatible input) · `dompurify` (XSS defense) |+| Preview sandbox | `iframe[sandbox="allow-scripts allow-same-origin"]` + `srcdoc` |+| Export targets | `.html` standalone · `.png` high-DPI · `ClipboardItem` (text/html + image/png) · WeChat-compatible inlined CSS |+| Deploy | Local `pnpm dev` · Vercel one-click for the web layer (agent stays local) |++## Export targets++| Platform | Implementation | Paste behavior |+|---|---|---|+| **WeChat MP** | `juice` inlines CSS + `data-tool` markers | Paste into editor, zero re-formatting |+| **Zhihu** | Same as WeChat + `<mjx-container>` → `data-eeimg` LaTeX image placeholder | Equations render after upload |+| **X / Weibo / Xiaohongshu** | `modern-screenshot` → 2× PNG → `ClipboardItem` | Drop straight into the composer |+| **Download `.html`** | Single-file, inlined assets | Open anywhere with a browser |+| **Download `.png`** | High-DPI screenshot | Share anywhere |++## Roadmap++- [ ] **Multi-template compare preview** — generate four candidates of the same brief, pick the best one+- [ ] **Hyperframes → mp4** — one-click hand-off of frame scripts to Remotion for real video output+- [ ] **Shared design systems** — interop with [`nexu-io/open-design`](https://github.com/nexu-io/open-design) `DESIGN.md` assets+- [ ] **Template marketplace** — community-contributed prompts & examples+- [ ] **Browser extension** — select on any page → convert to HTML template+- [ ] **History / version diff / IndexedDB archive**+- [ ] **More export targets** — WeChat Channels · Douyin captions · Notion · Linear · Telegraph++## Status++Early but real. The closed loop — **detect agent → pick skill → SSE stream → sandboxed iframe preview → one-click export** — runs end-to-end against all 8 CLIs listed above. The skill library and the `SKILL.md` hard-constraints are where most of the leverage lives, and both are stable. The picker UX, design-system metadata, and the multi-template compare flow ship daily. If something looks broken on your machine, open an issue with the agent CLI you were using and the input — those are the bug reports that move things forward fastest.++| Surface | State |+|---|---|+| Agent detection (8 CLIs) | ✅ stable |+| Skill registry + picker (75 skills) | ✅ stable |+| SSE streaming render | ✅ stable |+| Sandboxed iframe preview | ✅ stable |+| One-click WeChat / X / Zhihu / `.html` / `.png` export | ✅ stable |+| CSV / Excel / JSON / SQL format auto-detect | ✅ stable |+| Multi-template compare (generate 4, pick 1) | 🛠 in progress |+| Hyperframes → `.mp4` one-click handoff to Remotion | 🛠 in progress |+| Browser extension (select on any page → convert) | ⏳ planned |+| History / version diff / IndexedDB archive | ⏳ planned |+| Skill marketplace (`install <github-repo>`) | ⏳ planned |++## Contributing++Issues, PRs, new skills, new agent adapters, new export targets, and translations are all welcome. The highest-leverage contributions are usually **one folder, one Markdown file, or one PR-sized adapter** — small surface area, big leverage. Pick the slot that matches what you want to add:++- **Add a skill** — drop a folder into [`src/lib/templates/skills/`](src/lib/templates/skills/) with `SKILL.md` + `example.html` (+ optional `assets/` and `references/`). The picker auto-discovers it after `pnpm dev` restart. The `SKILL.md` frontmatter has to set `mode` · `scenario` · `surface` · `preview` · `design_system` — copy a neighbour and edit.+- **Wire up a new coding-agent CLI** — one entry in [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) covering: detection binary, argv builder, stdin/stdout protocol, stream parser. Detection is exercised by [`src/app/api/agents/`](src/app/api/agents/) and the spawn loop by [`src/app/api/convert/`](src/app/api/convert/).+- **Add an export target** — drop a module under [`src/lib/export/`](src/lib/export/) (next to `wechat.ts` / `image.ts` / `clipboard.ts`) and add the button to the export menu. WeChat Channels · Douyin captions · Notion · Linear · Telegraph · RSS are all open.+- **Sharpen a `SKILL.md`** — strengthen the hard-constraints (CJK font stack, 8 px baseline, contrast ≥ 4.5, must-use-real-data), add a 5-dimensional self-critique, swap in a better palette. Anti-AI-slop discipline is the most underrated PR shape we accept.+- **Translations & docs** — [`README.zh-CN.md`](README.zh-CN.md) and [`CONTRIBUTING.zh-CN.md`](CONTRIBUTING.zh-CN.md) are kept in parallel with the English files; please update both.++Full walkthrough, bar-for-merging, code style, and what we **don't** accept → [`CONTRIBUTING.md`](CONTRIBUTING.md) ([简体中文](CONTRIBUTING.zh-CN.md)).++## References & lineage++Every external project this repo borrows from — what we take from each, and where it lands in the tree.++| Project | Role here |+|---|---|+| [**`nexu-io/open-design`**](https://github.com/nexu-io/open-design) | The agent-detection layer, the `DESIGN.md` design-system schema, and the `SKILL.md` skill protocol. [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) and [`src/lib/templates/skills/`](src/lib/templates/skills/) mirror this architecture verbatim. |+| [**`multica-ai/multica`**](https://github.com/multica-ai/multica) | Daemon-and-runtime architecture: one privileged process spawns CLIs, JSON-line is the wire protocol, every CLI gets a thin per-adapter shape. |+| [**`alchaincyf/huashu-design`**](https://github.com/alchaincyf/huashu-design) | Anti-AI-slop discipline — Junior-Designer mode, 5-step brand-asset protocol, contrast-≥-4.5 / 8 px baseline-grid / must-use-real-data rules. Hard-coded into every [`SKILL.md`](src/lib/templates/skills/) frontmatter. |+| [`alchaincyf/huashu-md-html`](https://github.com/alchaincyf/huashu-md-html) | Proof that end-to-end WeChat / Zhihu paste-compatibility is solvable. Reference for [`src/lib/export/wechat.ts`](src/lib/export/wechat.ts). |+| [`mdnice/markdown-nice`](https://github.com/mdnice/markdown-nice) | `juice`-inlined-CSS pipeline → WeChat / Zhihu paste with zero re-formatting. Drives [`src/lib/export/wechat.ts`](src/lib/export/wechat.ts). |+| [`mdnice/markdown-resume`](https://github.com/mdnice/markdown-resume) | A4-formatted résumé inspiration → [`resume-modern`](src/lib/templates/skills/resume-modern/). |+| [`gcui-art/markdown-to-image`](https://github.com/gcui-art/markdown-to-image) | iframe → high-DPI PNG export, replicated with `modern-screenshot` in [`src/lib/export/image.ts`](src/lib/export/image.ts). |+| [**`op7418/guizang-ppt-skill`**](https://github.com/op7418/guizang-ppt-skill) | Magazine-ink editorial deck integrated verbatim as [`deck-guizang-editorial`](src/lib/templates/skills/deck-guizang-editorial/) and the Swiss variant [`deck-swiss-international`](src/lib/templates/skills/deck-swiss-international/). Original LICENSE + authorship preserved. |+| [**`tw93/kami`**](https://github.com/tw93/kami) | Warm-parchment monochrome editorial document system → [`doc-kami-parchment`](src/lib/templates/skills/doc-kami-parchment/). |+| [**`1weiho/open-slide`**](https://github.com/1weiho/open-slide) | 1920×1080 agent-native canvas convention → [`deck-open-slide-canvas`](src/lib/templates/skills/deck-open-slide-canvas/). |+| [`heygen-com/hyperframes`](https://github.com/heygen-com/hyperframes) | Frame-script schema for the entire `frame-*` / `vfx-*` / `mockup-*` / `social-*` family. Output hands straight off to Remotion to render `.mp4`. |+| [`remotion-dev/remotion`](https://github.com/remotion-dev/remotion) | Target renderer for Hyperframes frame scripts. |+| [`jimliu/baoyu-skills`](https://github.com/jimliu/baoyu-skills) | Practical skills collection — reference catalog for picker categorization. |++Each bundled upstream skill retains its original LICENSE and authorship inside its own `src/lib/templates/skills/<skill>/` folder.++## Stay in the loop++Follow [**@nexudotio**](https://x.com/nexudotio) on X for release notes, new skills, and the occasional behind-the-scenes thread on what's shipping next. The [Discord](https://github.com/nexu-io/open-design#community) is where the bigger conversations happen — both are run by the upstream `open-design` team, and HTML Anything piggybacks on the same channels.++## Contributors++Thanks to everyone who has filed an issue, opened a PR, or added a skill / agent adapter / export target. Every real contribution counts, and the wall below is the easiest way to say so out loud.++<a href="https://github.com/pftom/html-everthing/graphs/contributors">+ <img src="https://contrib.rocks/image?repo=pftom/html-everthing" alt="HTML Anything contributors" />+</a>++If you've shipped your first PR — welcome. The [`good-first-issue` / `help-wanted`](https://github.com/pftom/html-everthing/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22%2C%22help+wanted%22) labels are the entry point.++## Star History++<a href="https://star-history.com/#pftom/html-everthing&Date">+ <picture>+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=pftom/html-everthing&type=Date&theme=dark" />+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=pftom/html-everthing&type=Date" />+ <img alt="HTML Anything star history" src="https://api.star-history.com/svg?repos=pftom/html-everthing&type=Date" />+ </picture>+</a>++If the curve bends up, that's the signal we look for. ★ this repo to push it.++## License++Apache-2.0 © 2026 HTML Anything contributors. See [`LICENSE`](LICENSE).++Bundled work retains its original license and authorship attribution — see the per-skill `LICENSE` / `README.md` inside each `src/lib/templates/skills/<skill>/` folder for what it inherits from upstream.diff --git a/README.zh-CN.md b/README.zh-CN.mdnew file mode 100644index 00000000..d1eab9b8--- /dev/null+++ b/README.zh-CN.md@@ -0,0 +1,379 @@+# HTML Anything++> **任何文档 / 数据 → 可交付的 HTML,由你本地的 AI agent 一键完成。** 可交付 = 生成完就是你贴出去、发出去、交出去的样子 —— 不用回 Figma 二修、不用每个平台手动重排、不用 "我先这样、待会再调"。本地优先、零 API Key、复用你已经登录好的 CLI session —— **8 个 coding-agent CLI** 在 `PATH` 上自动识别(Claude Code · Cursor Agent · Codex · Gemini CLI · GitHub Copilot CLI · OpenCode · Qwen Coder · Aider),驱动 **75 套 skill 模板** 和 **9 类可交付场景**(杂志文章 · Keynote PPT · 简历 · 海报 · 小红书 · 推特卡 · Web 原型 · 数据报告 · Hyperframes 视频)。一键复制到公众号 / 推特 / 知乎,或者下载 `.html` / `.png`。++<p align="center">+ <img src="docs/assets/banner.png" alt="HTML Anything — 任何输入 → 可交付 HTML,在你的笔记本上" width="100%" />+</p>++<p align="center">+ <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square" /></a>+ <a href="#-自动识别本地-agent"><img alt="Agents" src="https://img.shields.io/badge/agents-8%20CLIs-black?style=flat-square" /></a>+ <a href="#-skills"><img alt="Skills" src="https://img.shields.io/badge/skills-75-orange?style=flat-square" /></a>+ <a href="#一键发布到平台"><img alt="Export" src="https://img.shields.io/badge/export-WeChat%20%C2%B7%20X%20%C2%B7%20Zhihu%20%C2%B7%20PNG-9b59b6?style=flat-square" /></a>+ <a href="#-30-秒上手"><img alt="Quickstart" src="https://img.shields.io/badge/quickstart-2%20commands-green?style=flat-square" /></a>+ <a href="#架构"><img alt="No API key" src="https://img.shields.io/badge/no-API%20key%20required-ff6b35?style=flat-square" /></a>+</p>++<!-- 本项目站在 nexu-io/open-design 的肩膀上 — 下面这一行的社群标签都指向它,顺道带流量。 -->+<p align="center">+ <a href="https://github.com/nexu-io/open-design#community"><img alt="Discord(open-design)" src="https://img.shields.io/badge/discord-join-5865f2?style=flat-square&logo=discord&logoColor=white" /></a>+ <a href="https://x.com/nexudotio"><img alt="X 关注 @nexudotio" src="https://img.shields.io/badge/follow-%40nexudotio-000000?style=flat-square&logo=x&logoColor=white" /></a>+ <a href="https://github.com/nexu-io/open-design/releases/latest"><img alt="open-design 最新版本" src="https://img.shields.io/github/v/release/nexu-io/open-design?style=flat-square&label=release&color=8e44ad" /></a>+ <a href="https://github.com/nexu-io/open-design/graphs/commit-activity"><img alt="open-design 月提交数" src="https://img.shields.io/github/commit-activity/m/nexu-io/open-design?style=flat-square&label=commits%2Fmonth&color=f39c12" /></a>+ <a href="#-看看效果"><img alt="设计系统" src="https://img.shields.io/badge/design%20systems-9-1abc9c?style=flat-square" /></a>+ <a href="https://github.com/nexu-io/open-design"><img alt="基于 open-design" src="https://img.shields.io/badge/built%20on-nexu--io%2Fopen--design-ff7043?style=flat-square&logo=github&logoColor=white" /></a>+</p>++<p align="center"><a href="README.md">English</a> · <b>简体中文</b></p>++---++## 🎨 看看效果++picker 顶部 **推荐 / Featured** 分组里默认置顶的 8 个 skill —— 对应 `SKILL.md` frontmatter 里的 `recommended:` 字段,数字越小排得越靠前。每个都附 `example.html`,repo 里双击就能看效果,不用登录、不用启服。++<table>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/deck-guizang-editorial/"><img src="docs/screenshots/skills/deck-guizang-editorial.png" alt="deck-guizang-editorial" /></a><br/>+<sub><b><a href="src/lib/templates/skills/deck-guizang-editorial/"><code>deck-guizang-editorial</code></a></b> · <i>deck</i> · <code>recommended: 1</code><br/>编辑墨水 PPT,灵感来自 <a href="https://github.com/op7418/guizang-ppt-skill"><code>op7418/guizang-ppt-skill</code></a> —— 10 套锁死版面 × 5 套调色板(墨水 / 靛蓝瓷 / 森林墨 / 牛皮纸 / 沙丘),纸感印刷质感,开起来像一本电子杂志而不是 PPT。</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/deck-swiss-international/"><img src="docs/screenshots/skills/deck-swiss-international.png" alt="deck-swiss-international" /></a><br/>+<sub><b><a href="src/lib/templates/skills/deck-swiss-international/"><code>deck-swiss-international</code></a></b> · <i>deck</i> · <code>recommended: 2</code><br/>瑞士国际主义 PPT —— 16 列网格 + 单一饱和 accent(Klein Blue / Lemon / Mint / Safety Orange),22 套锁死版面。冷静、理性、学院派,开会时让人觉得 "这一定是 designer 做的"。</sub>+</td>+</tr>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/doc-kami-parchment/"><img src="docs/screenshots/skills/doc-kami-parchment.png" alt="doc-kami-parchment" /></a><br/>+<sub><b><a href="src/lib/templates/skills/doc-kami-parchment/"><code>doc-kami-parchment</code></a></b> · <i>doc</i> · <code>recommended: 3</code><br/>暖羊皮纸 + 墨蓝单色 editorial 文档系统,灵感来自 <a href="https://github.com/tw93/kami"><code>tw93/kami</code></a>。<code>#f5f4ed</code> 底色 + 单一衬线字体,长报告、读书笔记、one-pager、简历都能套,比纯白 markdown 高一个量级。</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/magazine-poster/"><img src="docs/screenshots/skills/magazine-poster.png" alt="magazine-poster" /></a><br/>+<sub><b><a href="src/lib/templates/skills/magazine-poster/"><code>magazine-poster</code></a></b> · <i>poster</i> · <code>recommended: 4</code><br/>报纸风长图海报 —— 巨字 serif headline + 双栏正文 + 6 个编号小节 + cream 纸感底色,开起来像一份印好的 Sunday paper,不是网页。</sub>+</td>+</tr>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/video-hyperframes/"><img src="docs/screenshots/skills/video-hyperframes.png" alt="video-hyperframes" /></a><br/>+<sub><b><a href="src/lib/templates/skills/video-hyperframes/"><code>video-hyperframes</code></a></b> · <i>frame / video</i> · <code>recommended: 5</code><br/>Hyperframes / Remotion 兼容的视频脚本 —— 6–10 个连续 <code>1920×1080</code> 帧,自带 duration / transition 注释和自动播放脚本。直接交给 <a href="https://github.com/heygen-com/hyperframes"><code>heygen-com/hyperframes</code></a> 或 Remotion 渲 <code>.mp4</code>。</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/frame-glitch-title/"><img src="docs/screenshots/skills/frame-glitch-title.png" alt="frame-glitch-title" /></a><br/>+<sub><b><a href="src/lib/templates/skills/frame-glitch-title/"><code>frame-glitch-title</code></a></b> · <i>frame</i> · <code>recommended: 6</code><br/>故障艺术标题帧 —— cyan / magenta 像散偏移 + CRT 扫描线 + 数据腐败副标 + 角落 ASCII 噪点。Cyberpunk hero 或视频转场用。</sub>+</td>+</tr>+<tr>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/vfx-text-cursor/"><img src="docs/screenshots/skills/vfx-text-cursor.png" alt="vfx-text-cursor" /></a><br/>+<sub><b><a href="src/lib/templates/skills/vfx-text-cursor/"><code>vfx-text-cursor</code></a></b> · <i>vfx</i> · <code>recommended: 7</code><br/>VFX 文字光标开场 —— 光标在画布上"打字",每个字带 hot pink × cyan 像散拖尾 + 定向光斑。丢一句金句进去,就是电影级的视频片头。</sub>+</td>+<td width="50%" valign="top">+<a href="src/lib/templates/skills/frame-logo-outro/"><img src="docs/screenshots/skills/frame-logo-outro.png" alt="frame-logo-outro" /></a><br/>+<sub><b><a href="src/lib/templates/skills/frame-logo-outro/"><code>frame-logo-outro</code></a></b> · <i>frame</i> · <code>recommended: 8</code><br/>品牌 Logo 收尾帧 —— Logo 分块装配 + glow bloom + tagline 上浮 + CTA。产品发布或品牌片的片尾闭幕镜头。</sub>+</td>+</tr>+</table>++完整 skill 目录(按 mode 分类)见下方 [🎨 Skills](#-skills) 章节。++## 🤔 为什么做这个?++[Claude Code 团队成员发了一条推](https://x.com/trq212/status/2052809885763747935):他们**已经不用 markdown 写文档了,全部改成 HTML**。理由很简单 ——++| Markdown | HTML |+|---|---|+| 给作者爽 | 给读者爽 |+| 排版受模板限制 | 排版无限自由 |+| 截图发推丑得离谱 | 直接是好看的图 |+| 二次粘贴公众号要重排 | 一键格式转换 |++**HTML 是面向人的最终形态,Markdown 只是一段写作中的中间过程。**++但 "写 HTML" 在过去意味着写 CSS、调字号、对齐网格、做响应式 —— 普通用户不会,设计师懒得,作者更没耐心。我们做的事情,是让 **AI 在你按下 ⌘+Enter 之后**,把任何输入(Markdown / CSV / Excel / JSON / SQL / 草稿…)**立刻**变成一份**可交付**的 HTML,然后一键去到公众号 / 推特 / 知乎 / 任何地方。所谓 "可交付":生成完就是受众实际看到的样子,不再需要 "我先这样、待会再调"。++我们站在四个开源项目的肩膀上:++- [**`nexu-io/open-design`**](https://github.com/nexu-io/open-design) —— Agent 检测层 + 设计 system 思路 + Skills protocol;本仓库的 `src/lib/agents/` 和 `src/lib/templates/skills/*` 直接借鉴这套模型。+- [**`mdnice/markdown-nice`**](https://github.com/mdnice/markdown-nice) —— `juice` 内联 CSS、公众号 / 知乎兼容粘贴的可行性证明。+- [**`gcui-art/markdown-to-image`**](https://github.com/gcui-art/markdown-to-image) —— iframe → 高 DPI PNG 的截图导出路径。+- [**`alchaincyf/huashu-md-html`**](https://github.com/alchaincyf/huashu-md-html) —— 反 AI-slop 的话术 / 设计哲学,对应我们模板里的硬约束(中文优先字体、8px 基线网格、对比 ≥ 4.5、必须用真实数据)。++## 一览++| | 你会拿到什么 |+|---|---|+| **本地 coding-agent CLI(8 个)** | Claude Code · Cursor Agent · OpenAI Codex · Gemini CLI · GitHub Copilot CLI · OpenCode · Qwen Coder · Aider —— 启动时扫描 `PATH`(含 `~/.local/bin` · `~/.bun/bin` · `/opt/homebrew/bin` · `~/.npm-global/bin` 这些 GUI 启动会漏掉的目录),顶栏一键切换。 |+| **零 API Key** | 直接复用你已经在终端登录好的 `claude login` · `cursor login` · `gemini auth` session。订阅复用 = **0 边际成本**。 |+| **Skill 模板(75 套)** | `prototype`(web / SaaS landing / dashboard / 数据报告) · `deck`(20 套 keynote PPT,含 Swiss International、Guizang Editorial、XHS Pastel、Hermes Cyber、Replit、Magazine Web 等) · `frame`(10 套 Hyperframes 视频帧:液态背景、NYT 数据图表、贴纸流程图、像素故障字幕、电影漏光、macOS 通知、品牌片尾…) · `social`(X / 小红书 / Spotify / Reddit 卡片) · `office`(PM 规格书 · 工程 runbook · 财务报告 · HR onboarding · 发票 · OKR · 周报 · 会议纪要 · 看板) · `doc`(Kami 暖羊皮纸 editorial) · `mockup`(3D 设备模型) · `vfx`(文本光标)。 |+| **9 类输出场景** | 📖 杂志文章 · 🎬 Keynote PPT · 📄 极简简历 · 🖼️ 营销海报 · 📱 小红书图文卡 · 🐦 推特分享卡 · 🛠️ Web 产品原型 · 📊 数据可视化报告 · 🎞️ Hyperframes 视频。每一类都有可挑选的具体 skill。 |+| **一键发布** | `juice` 内联 CSS → 公众号粘贴 0 调整 · `modern-screenshot` 2× PNG → 拖入推文 · `<mjx-container>` → `data-eeimg` 占位 → 知乎公式自动渲染 · 单文件 `.html` 下载 · 高 DPI `.png` 下载。 |+| **流式渲染** | `POST /api/convert` 走 SSE,agent stdout 的 JSON-line 流式抽出 text → 客户端 append → iframe `srcdoc` 实时刷新。等待时间 = 看 AI 现场写代码的体验。 |+| **沙箱预览** | `iframe[sandbox="allow-scripts allow-same-origin"]`,用户 HTML 隔离运行,宿主页面不受污染。 |+| **格式自动识别** | 编辑器一栏,粘 Markdown / CSV / TSV / JSON / SQL / 纯文本都识别,`papaparse` + `xlsx` 在浏览器端解析,不上传服务器。 |+| **部署** | 本地 `pnpm dev` / Vercel 一键部署 web 层(agent 永远跑在本地)。 |+| **License** | Apache-2.0 |++## Demo++<table>+<tr>+<td width="50%">+<img src="docs/screenshots/01-entry-view.png" alt="01 · 主界面" /><br/>+<sub><b>主界面</b> —— 顶栏自动识别你已装的 CLI,左侧粘内容,中间挑模板和设计 system,右侧 iframe 实时预览。同一个面板搞定杂志、PPT、海报、Web 原型、Hyperframes 帧脚本。</sub>+</td>+<td width="50%">+<img src="docs/screenshots/02-template-picker.png" alt="02 · 模板筛选" /><br/>+<sub><b>75 套模板可搜索可筛选</b> —— 按 mode(prototype / deck / frame / social / office / doc)与 scenario(design / marketing / engineering / product / personal)二维筛。每套模板都附 <code>example.html</code>,双击直接看效果。</sub>+</td>+</tr>+<tr>+<td width="50%">+<img src="docs/screenshots/03-streaming.png" alt="03 · 流式生成" /><br/>+<sub><b>SSE 流式</b> —— agent 的 stdout JSON-line 流式抽出文本,append 进 iframe <code>srcdoc</code>。你能看着它一行一行写出来,不满意可以中途打断重发,不浪费一整次生成。</sub>+</td>+<td width="50%">+<img src="docs/screenshots/04-export.png" alt="04 · 一键发布" /><br/>+<sub><b>一键发布到平台</b> —— 微信公众号(juice 内联 CSS)· 推特 / 微博 / 小红书(modern-screenshot 渲染成 2× PNG,写进 ClipboardItem)· 知乎(公式占位)· 下载 <code>.html</code> · 下载 <code>.png</code>。粘贴即用,0 二次排版。</sub>+</td>+</tr>+<tr>+<td width="50%">+<img src="docs/screenshots/05-deck-mode.png" alt="05 · Keynote PPT" /><br/>+<sub><b>Deck 模式</b> —— 20 套 PPT skill,含 Swiss International(瑞士国际主义)· Guizang Editorial(编辑墨水)· Open Slide Canvas(1920×1080 agent-native)· Magazine Web · XHS Pastel · Hermes Cyber · Replit Style 等。←/→ 切页,支持演讲者备注与打印 PDF。</sub>+</td>+<td width="50%">+<img src="docs/screenshots/06-hyperframes.png" alt="06 · Hyperframes 视频帧" /><br/>+<sub><b>Hyperframes 视频帧</b> —— 10 套帧脚本(液态背景 hero · NYT 数据图表 · 贴纸流程图 · 像素故障标题 · 电影漏光 · macOS 通知 · 品牌 logo 片尾 · 文本光标 VFX · 3D 设备模型 …)符合 <a href="https://github.com/heygen-com/hyperframes">heygen-com/hyperframes</a> 规范,可直送 Remotion 渲染 mp4。</sub>+</td>+</tr>+</table>++## ⚡ 30 秒上手++```bash+git clone https://github.com/your-org/html-anything+cd html-anything+pnpm install+pnpm dev+# → http://localhost:3000+```++打开浏览器 → 顶栏会自动列出你电脑上**已经登录好**的本地 code agent → 选一个模板 → 粘贴内容 → ⌘+Enter++**无需 API Key**。我们直接复用你已经在用的 Claude / Cursor / Codex 订阅,**0 边际成本**。++## 🧠 自动识别本地 agent++进入主页时,我们扫描你的 `PATH`(包括 `~/.local/bin`、`~/.bun/bin`、`/opt/homebrew/bin`、`~/.npm-global/bin` 等通过 GUI 启动会被过滤掉的目录),检测以下 CLI:++| Agent | 检测命令 | 调用方式 |+|---|---|---|+| **Claude Code** | `claude` | `claude -p --output-format stream-json` |+| **OpenAI Codex** | `codex` | `codex exec --json --sandbox workspace-write` |+| **Cursor Agent** | `cursor-agent` | `cursor-agent --print --output-format stream-json --force --trust` |+| **Gemini CLI** | `gemini` | `gemini --output-format stream-json --yolo` |+| **GitHub Copilot CLI** | `copilot` | `copilot --allow-all-tools --output-format json` |+| **OpenCode** | `opencode-cli` / `opencode` | `opencode run --format json --dangerously-skip-permissions -` |+| **Qwen Coder** | `qwen` | `qwen --yolo -` |+| **Aider** | `aider` | `aider --no-pretty --no-stream --yes-always --message-file -` |++> 这一层的设计直接借鉴了 [`nexu-io/open-design`](https://github.com/nexu-io/open-design) 和 [`multica-ai/multica`](https://github.com/multica-ai/multica) 的 agent 检测策略:唯一被 spawn 子进程的进程是 server route,业务进程不直接 spawn;CLI 的 stdin / stdout 用 JSON-line 协议复用,每个 CLI 一个轻 adapter,统一在 [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts)。++只要你已经在终端里登录过对应的 CLI(例如 `claude login`、`cursor login`),HTML Anything 直接复用同一个 session,**不要求你再贴一遍 API Key**。++## 🎨 Skills++**75 套 skill 在 [`src/lib/templates/skills/`](src/lib/templates/skills/) 下开箱即用。** 每个 skill 是一个文件夹,遵循 Claude Code [`SKILL.md`](https://docs.anthropic.com/en/docs/claude-code/skills) 约定 + 扩展 frontmatter(`mode` · `scenario` · `surface` · `preview` · `design_system`)。++picker 用两个维度组织:++- **mode** —— `prototype`(web / SaaS landing / dashboard / 数据报告 / 简历 / 文档) · `deck`(20 套幻灯片 skill) · `frame`(10 套 Hyperframes 视频帧脚本) · `social`(4 套社交平台分享卡) · `office`(PM / 工程 / 财务 / HR / 行政 表格化文档)。+- **scenario** —— `design` / `marketing` / `engineering` / `product` / `finance` / `hr` / `sale` / `personal`,用于在 picker 里分组展示。++完整 skill 目录(按 mode 分类)请见 [English README](README.md#skills),结构一一对应,链接也都是同一个 repo path。新增 skill 只需要 fork 一个 skill 文件夹、改 `SKILL.md` frontmatter、重启 dev server,picker 里就会出现;merge 标准见 [`CONTRIBUTING.zh-CN.md`](CONTRIBUTING.zh-CN.md)。++## 六个核心想法++### 1 · 我们不发 agent,你装的就够好++主界面进来时,浏览器调 `/api/agents`,server 端扫一遍 `PATH`(含 GUI 启动会丢的 `~/.local/bin` · `~/.bun/bin` · `/opt/homebrew/bin` · `~/.npm-global/bin`),识别到哪些 CLI 在场,就把哪些放进顶栏。每个 CLI 对应一个 adapter(参数 + stdin 协议 + 输出解析器),在 [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) 里集中维护。整套思路直接借鉴 [`nexu-io/open-design`](https://github.com/nexu-io/open-design) 和 [`multica-ai/multica`](https://github.com/multica-ai/multica) 的 agent-detection 模型。++### 2 · Skills 是文件夹,不是插件++遵循 Claude Code [`SKILL.md`](https://docs.anthropic.com/en/docs/claude-code/skills) 约定 —— `SKILL.md` + `assets/` + `references/` + `example.html`。drop 一个文件夹到 [`src/lib/templates/skills/`](src/lib/templates/skills/),重启 dev server,picker 里就出现。`deck-guizang-editorial` 直接 vendor 自 [`op7418/guizang-ppt-skill`](https://github.com/op7418/guizang-ppt-skill)(保留原始 LICENSE 与署名)。++### 3 · 强制约束让 AI 不再 freestyle++每个模板都硬编码了:+- **中文优先字体栈**:`Noto Sans/Serif SC` / 思源黑体;英文用 `Inter` / `Manrope`。+- **8 px 基线网格**:所有间距、行高、字号都是 8 的倍数。+- **圆角 / 投影 / 不用纯黑纯白** —— 视觉上去 AI-slop 化。+- **颜色对比 ≥ 4.5**,重要交互必有 `:focus` 态。+- **必须使用用户提供的真实数据**,禁止 lorem ipsum。++灵感来自 [`alchaincyf/huashu-design`](https://github.com/alchaincyf/huashu-design) 的 "Junior-Designer mode" + 反 AI-slop checklist。约束就是 prompt 的一部分,写进每个 `SKILL.md`。++### 4 · 流式渲染 = 看着 AI 现场画++`POST /api/convert` 走 SSE。Agent 的 stdout 是一行行 JSON-line,server 抽出其中的 `text` 字段,作为 SSE event 推下去,客户端 append 进 `iframe[srcdoc]`。整个过程跟在终端里看 AI 写代码一模一样,只不过最终产物是好看的 HTML 而不是 markdown。**不满意可以打断**,不浪费一整次 token。++### 5 · 一键发布到平台 = 0 二次排版++- **微信公众号**:`juice` 内联 CSS + `data-tool` 标记 → 粘进编辑器直接显示,不丢样式。+- **推特 / 微博 / 小红书**:`modern-screenshot` 把 iframe 渲染成 2× PNG → `ClipboardItem` → 直接粘到推文 / 图床。+- **知乎**:同上 + `<mjx-container>` → `data-eeimg` LaTeX 图占位(知乎不支持 KaTeX 直渲,必须转成图)。+- **下载 `.html`** / **下载 `.png`**:自包含单文件,任意分享。++实现思路参考自 [`mdnice/markdown-nice`](https://github.com/mdnice/markdown-nice) 和 [`gcui-art/markdown-to-image`](https://github.com/gcui-art/markdown-to-image)。++### 6 · 沙箱 iframe = 安全 + 隔离++用户输出的 HTML 总是放进 `iframe[sandbox="allow-scripts allow-same-origin"]` 里。第三方脚本可以跑(Tailwind CDN / Google Fonts / 用户自定义动效),但 cookie 和 localStorage 走 iframe 自己的 origin,不污染宿主页面。打开 devtools 也只看 iframe 自己的 DOM,调试体验和写一个独立 HTML 文件一致。++## 架构++```+┌─────────────────────── Browser (Next.js 16) ──────────────────────┐+│ Editor / 上传 · 顶栏 agent picker · 模板 picker · iframe 预览 │+└─────────────┬──────────────────────────────────┬──────────────────┘+ │ ⌘+Enter │+ ▼ ▼+ ┌─────────────────────┐ ┌──────────────────────┐+ │ GET /api/agents │ │ POST /api/convert │+ │ 扫 PATH 检测 CLI │ │ SSE 流式调用 agent │+ └─────────────────────┘ └──────────┬───────────┘+ │ spawn + stdin pipe+ ▼+ ┌────────────────────────────────────┐+ │ 你本地的 code agent │+ │ claude / codex / cursor-agent / │+ │ gemini / copilot / opencode / │+ │ qwen / aider │+ │ → 复用你已登录的 session │+ └────────────────────────────────────┘+ │+ ▼+ stdout JSON-line ──► SSE event+ │+ ▼+ iframe srcdoc append(实时刷新)+ │+ ⌘+C 复制 → ClipboardItem+ ⌘+S 下载 → .html / .png+```++| 层 | 技术栈 |+|---|---|+| Frontend | Next.js 16 App Router + Turbopack · React 19 · Tailwind v4 · zustand 全局状态 |+| Server routes | `GET /api/agents`(检测) · `POST /api/convert`(SSE 流式 spawn) |+| Agent transport | `child_process.spawn` · 每个 CLI 一个 stdin/stdout adapter([`src/lib/agents/argv.ts`](src/lib/agents/argv.ts)) |+| 浏览器端处理 | `juice`(CSS 内联) · `modern-screenshot`(PNG 截图) · `xlsx` / `papaparse`(CSV/Excel 解析) · `marked` + `highlight.js`(markdown 兼容输入) · `dompurify`(XSS 防御) |+| 预览沙箱 | `iframe[sandbox="allow-scripts allow-same-origin"]` + `srcdoc` |+| 导出 | `.html` 单文件 · `.png` 高 DPI · ClipboardItem 富文本 / image/png · 微信兼容 inline CSS |+| 部署 | 本地 `pnpm dev` · Vercel 一键 web 层(agent 永远跑本地) |++## 一键发布到平台++| 平台 | 实现 | 粘贴效果 |+|---|---|---|+| **微信公众号** | `juice` 内联 CSS + `data-tool` 标记 | 0 调整,直接显示 |+| **知乎** | 同上 + `<mjx-container>` → `data-eeimg` LaTeX 图占位 | 公式自动渲染 |+| **推特 / 微博 / 小红书** | `modern-screenshot` 把 iframe 渲染成 2× PNG → ClipboardItem | 直接粘到推文 |+| **下载 `.html`** | 单文件,双击打开 | 任意分享 |+| **下载 `.png`** | 高 DPI 截图 | 任意分享 |++## 🛣️ Roadmap++- [ ] **多模板比较预览** —— 同一份内容生成 4 张候选,选最美的一张落地+- [ ] **Hyperframes → mp4** —— 一键把帧脚本送进 Remotion 渲真视频+- [ ] **共享设计 system** —— 与 [`nexu-io/open-design`](https://github.com/nexu-io/open-design) 互通 `DESIGN.md` 资产+- [ ] **模板市场** —— 社区贡献你的提示词与示例+- [ ] **浏览器扩展** —— 选中网页内容 → 一键转 HTML 模板+- [ ] **历史记录 / 版本对比 / IndexedDB 存档**+- [ ] **更多平台导出适配** —— 微信视频号 · 抖音字幕 · Notion · Linear · Telegraph++## 📍 进度++早期但能用。**识别 agent → 选 skill → SSE 流式渲染 → sandboxed iframe 预览 → 一键导出** —— 这条闭环已经跑通,8 个 CLI 全都能驱动。Skill 库和 `SKILL.md` 里的硬约束是这套东西最值钱的部分,这两块都稳定了。Picker UX、design-system 元数据、多模板对比流程还在每天迭代。**如果你本机上跑出毛病了,提 issue 时附上你用的是哪个 agent CLI + 输入内容,这种 issue 推进最快。**++| 模块 | 状态 |+|---|---|+| Agent 自动识别(8 个 CLI) | ✅ 稳定 |+| Skill 注册表 + picker(75 个 skill) | ✅ 稳定 |+| SSE 流式渲染 | ✅ 稳定 |+| Sandboxed iframe 预览 | ✅ 稳定 |+| 一键复制到公众号 / 推特 / 知乎 / `.html` / `.png` | ✅ 稳定 |+| CSV / Excel / JSON / SQL 格式自动识别 | ✅ 稳定 |+| 多模板对比(同一份生成 4 张,选 1 张落地) | 🛠 进行中 |+| Hyperframes → `.mp4` 一键交给 Remotion 渲视频 | 🛠 进行中 |+| 浏览器扩展(选中网页 → 转 HTML 模板) | ⏳ 计划中 |+| 历史记录 / 版本对比 / IndexedDB 存档 | ⏳ 计划中 |+| Skill 市场(`install <github-repo>`) | ⏳ 计划中 |++## 🤝 贡献++欢迎 issue、PR、新 skill、新 agent 适配、新平台导出、翻译。**最高杠杆的贡献往往就是一个文件夹、一份 Markdown、或者一段 PR-sized adapter** —— 面积小、影响大。按你想加的东西对号入座:++- **新 skill** —— 在 [`src/lib/templates/skills/`](src/lib/templates/skills/) 加一个文件夹,带 `SKILL.md` + `example.html`(可选 `assets/` 和 `references/`)。`pnpm dev` 重启后 picker 自动发现。`SKILL.md` frontmatter 必须设 `mode` · `scenario` · `surface` · `preview` · `design_system` —— 抄一个邻居改就行。+- **新 coding-agent CLI 适配** —— 在 [`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) 加一行,覆盖:识别用的 binary 名字、argv 拼装、stdin/stdout 协议、流式 parser。检测路径走 [`src/app/api/agents/`](src/app/api/agents/),spawn 走 [`src/app/api/convert/`](src/app/api/convert/)。+- **新平台导出** —— 在 [`src/lib/export/`](src/lib/export/) 加一个模块(放在 `wechat.ts` / `image.ts` / `clipboard.ts` 隔壁),并在导出菜单里加按钮。微信视频号 · 抖音字幕 · Notion · Linear · Telegraph · RSS 都是空位。+- **打磨某个 `SKILL.md`** —— 加强硬约束(CJK 字体栈、8 px 基线、对比度 ≥ 4.5、必须用真实数据),加一段五维自检,换一套更合适的调色板。反 AI-slop 这类 PR 是我们最看重的形态。+- **翻译与文档** —— [`README.md`](README.md) 和 [`CONTRIBUTING.md`](CONTRIBUTING.md) 都和中文版并行维护,改一边请同步另一边。++完整的贡献流程、合并门槛、代码规范、以及我们**不接受**的 PR 类型 → [`CONTRIBUTING.zh-CN.md`](CONTRIBUTING.zh-CN.md)([English](CONTRIBUTING.md))。++## 📚 References & Lineage(依赖与渊源)++这个 repo 借鉴的所有外部项目 —— 每一个我们都拿了什么、对应落到哪个目录。++| 项目 | 在这里的角色 |+|---|---|+| [**`nexu-io/open-design`**](https://github.com/nexu-io/open-design) | Agent 识别层、`DESIGN.md` 设计 system schema、`SKILL.md` 协议都来自这里。[`src/lib/agents/argv.ts`](src/lib/agents/argv.ts) 和 [`src/lib/templates/skills/`](src/lib/templates/skills/) 直接镜像了它的架构。 |+| [**`multica-ai/multica`**](https://github.com/multica-ai/multica) | Daemon-and-runtime 架构:一个特权进程 spawn 各家 CLI、JSON-line 做线协议、每个 CLI 一个薄 adapter。 |+| [**`alchaincyf/huashu-design`**](https://github.com/alchaincyf/huashu-design) | 反 AI-slop 设计哲学 —— Junior-Designer 工作流、五步品牌资产协议、对比度 ≥ 4.5 / 8 px 基线 / 必须用真实数据。这些硬约束直接写进了每一个 [`SKILL.md`](src/lib/templates/skills/) frontmatter。 |+| [`alchaincyf/huashu-md-html`](https://github.com/alchaincyf/huashu-md-html) | 公众号 / 知乎复制端到端兼容性的可行性证明。[`src/lib/export/wechat.ts`](src/lib/export/wechat.ts) 的参考实现。 |+| [`mdnice/markdown-nice`](https://github.com/mdnice/markdown-nice) | `juice` 内联 CSS 链路 → 公众号 / 知乎粘贴零调整。驱动 [`src/lib/export/wechat.ts`](src/lib/export/wechat.ts)。 |+| [`mdnice/markdown-resume`](https://github.com/mdnice/markdown-resume) | A4 简历版式的灵感来源 → [`resume-modern`](src/lib/templates/skills/resume-modern/)。 |+| [`gcui-art/markdown-to-image`](https://github.com/gcui-art/markdown-to-image) | iframe → 高 DPI PNG 截图路径,用 `modern-screenshot` 复刻在 [`src/lib/export/image.ts`](src/lib/export/image.ts)。 |+| [**`op7418/guizang-ppt-skill`**](https://github.com/op7418/guizang-ppt-skill) | 编辑墨水 PPT 原封不动接入 [`deck-guizang-editorial`](src/lib/templates/skills/deck-guizang-editorial/) 和瑞士国际主义变体 [`deck-swiss-international`](src/lib/templates/skills/deck-swiss-international/)。原 LICENSE + 作者署名保留。 |+| [**`tw93/kami`**](https://github.com/tw93/kami) | 暖羊皮纸 + 墨蓝单色 editorial 文档系统 → [`doc-kami-parchment`](src/lib/templates/skills/doc-kami-parchment/)。 |+| [**`1weiho/open-slide`**](https://github.com/1weiho/open-slide) | 1920×1080 agent-native canvas 规范 → [`deck-open-slide-canvas`](src/lib/templates/skills/deck-open-slide-canvas/)。 |+| [`heygen-com/hyperframes`](https://github.com/heygen-com/hyperframes) | 整个 `frame-*` / `vfx-*` / `mockup-*` / `social-*` 家族遵循的帧脚本 schema。输出可以直接交给 Remotion 渲 `.mp4`。 |+| [`remotion-dev/remotion`](https://github.com/remotion-dev/remotion) | Hyperframes 帧脚本的目标渲染器。 |+| [`jimliu/baoyu-skills`](https://github.com/jimliu/baoyu-skills) | 实用 skills 集合 —— picker 分类参考目录。 |++每一个 vendor 进来的 upstream skill 都在 `src/lib/templates/skills/<skill>/` 里保留了原始 LICENSE 和作者署名。++## 📣 关注我们++X 上关注 [**@nexudotio**](https://x.com/nexudotio),看版本发布、新 skill、新 design system,以及偶尔的 behind-the-scenes 线程。[Discord](https://github.com/nexu-io/open-design#community) 是更长篇讨论的场子 —— 两者都由上游 `open-design` 团队维护,HTML Anything 共用同一个社群入口。++## 👥 贡献者++感谢每一个提 issue、开 PR、加 skill / agent 适配 / 导出适配的人。下面这面墙是我们能想到最直观的感谢方式。++<a href="https://github.com/pftom/html-everthing/graphs/contributors">+ <img src="https://contrib.rocks/image?repo=pftom/html-everthing" alt="HTML Anything 贡献者" />+</a>++如果你刚刚开第一个 PR —— 欢迎。[`good-first-issue` / `help-wanted`](https://github.com/pftom/html-everthing/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22%2C%22help+wanted%22) 标签是最好的切入口。++## ⭐ Star History++<a href="https://star-history.com/#pftom/html-everthing&Date">+ <picture>+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=pftom/html-everthing&type=Date&theme=dark" />+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=pftom/html-everthing&type=Date" />+ <img alt="HTML Anything star history" src="https://api.star-history.com/svg?repos=pftom/html-everthing&type=Date" />+ </picture>+</a>++曲线往上翘,就是我们要找的信号。点个 ★ 推一把。++## 📄 License++Apache-2.0 © 2026 HTML Anything 贡献者。详见 [`LICENSE`](LICENSE)。++vendor 进来的第三方作品保留原始 LICENSE 与署名 —— 每个 `src/lib/templates/skills/<skill>/` 文件夹里若存在 `LICENSE` / `README.md`,以它为准。diff --git a/docs/assets/banner.png b/docs/assets/banner.pngnew file mode 100644index 00000000..4177e506Binary files /dev/null and b/docs/assets/banner.png differdiff --git a/docs/cover.html b/docs/cover.htmlnew file mode 100644index 00000000..0dafdfd6--- /dev/null+++ b/docs/cover.html@@ -0,0 +1,541 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<title>HTML Anything · Cover</title>+<link rel="preconnect" href="https://fonts.googleapis.com" />+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600;1,9..144,700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />+<style>+ :root {+ --bg: #14100c;+ --bg-soft: #1c1712;+ --ink: #efe7d6;+ --ink-mute: #b9ad97;+ --ink-faint: #6f6555;+ --rule: #2a2219;+ --accent: #e87d3e;+ --accent-soft: #d96b2c;+ }++ * { box-sizing: border-box; }++ html, body { margin: 0; padding: 0; }++ body {+ background: var(--bg);+ color: var(--ink);+ font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;+ -webkit-font-smoothing: antialiased;+ -moz-osx-font-smoothing: grayscale;+ display: flex;+ align-items: center;+ justify-content: center;+ min-height: 100vh;+ overflow: hidden;+ }++ .cover {+ width: 1920px;+ height: 1080px;+ flex: 0 0 auto;+ transform: scale(min(calc(100vw / 1920), calc(100vh / 1080)));+ transform-origin: center center;+ position: relative;+ background:+ radial-gradient(1100px 700px at 78% 38%, rgba(232,125,62,0.10) 0%, rgba(232,125,62,0.02) 40%, transparent 70%),+ radial-gradient(900px 600px at 12% 80%, rgba(232,125,62,0.05) 0%, transparent 60%),+ linear-gradient(180deg, #181208 0%, #14100c 45%, #100b07 100%);+ overflow: hidden;+ isolation: isolate;+ }++ /* faint grid texture */+ .cover::before {+ content: "";+ position: absolute;+ inset: 0;+ background-image:+ linear-gradient(to right, rgba(255,236,200,0.025) 1px, transparent 1px),+ linear-gradient(to bottom, rgba(255,236,200,0.025) 1px, transparent 1px);+ background-size: 80px 80px;+ pointer-events: none;+ z-index: 0;+ }++ /* grain / film noise */+ .cover::after {+ content: "";+ position: absolute;+ inset: 0;+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");+ mix-blend-mode: overlay;+ opacity: 0.45;+ pointer-events: none;+ z-index: 0;+ }++ /* ── top bar ──────────────────────────────────────────────── */+ .topbar {+ position: absolute;+ top: 56px;+ left: 80px;+ right: 80px;+ display: flex;+ align-items: center;+ justify-content: space-between;+ font-family: "JetBrains Mono", ui-monospace, monospace;+ font-size: 13px;+ letter-spacing: 0.18em;+ color: var(--ink-mute);+ text-transform: uppercase;+ z-index: 2;+ }+ .topbar .center {+ color: var(--ink);+ letter-spacing: 0.14em;+ }+ .topbar .dot {+ display: inline-block;+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--accent);+ box-shadow: 0 0 12px rgba(232,125,62,0.6);+ margin-right: 10px;+ vertical-align: middle;+ }+ .topbar .right span + span { margin-left: 6px; }+ .topbar .sep { color: var(--ink-faint); margin: 0 8px; }++ .hairline {+ position: absolute;+ top: 96px;+ left: 80px;+ right: 80px;+ height: 1px;+ background: linear-gradient(to right, transparent, var(--rule) 8%, var(--rule) 92%, transparent);+ z-index: 1;+ }++ /* ── left column ──────────────────────────────────────────── */+ .left {+ position: absolute;+ top: 160px;+ left: 80px;+ width: 880px;+ z-index: 3;+ }++ .badges {+ display: flex;+ gap: 14px;+ margin-bottom: 40px;+ }+ .badge {+ font-family: "JetBrains Mono", ui-monospace, monospace;+ font-size: 13px;+ letter-spacing: 0.16em;+ text-transform: uppercase;+ padding: 8px 18px;+ border-radius: 999px;+ color: var(--ink);+ border: 1px solid var(--rule);+ background: rgba(40,30,20,0.5);+ }+ .badge.accent {+ color: var(--accent);+ border-color: rgba(232,125,62,0.5);+ background: rgba(232,125,62,0.10);+ }+ .badge::before {+ content: "•";+ color: var(--accent);+ margin-right: 8px;+ }++ h1.headline {+ font-family: "Fraunces", "Playfair Display", Georgia, serif;+ font-weight: 500;+ font-size: 88px;+ line-height: 1.02;+ letter-spacing: -0.025em;+ color: var(--ink);+ margin: 0 0 32px 0;+ font-variation-settings: "opsz" 144;+ }+ h1.headline em {+ font-style: italic;+ color: var(--accent);+ font-weight: 600;+ }+ h1.headline .ul {+ display: inline-block;+ position: relative;+ }+ h1.headline .ul::after {+ content: "";+ position: absolute;+ left: 0;+ right: 0;+ bottom: 8px;+ height: 4px;+ background: var(--accent);+ border-radius: 2px;+ }++ .lede {+ max-width: 680px;+ font-size: 17px;+ line-height: 1.6;+ color: var(--ink-mute);+ font-weight: 300;+ letter-spacing: 0.005em;+ }+ .lede + .lede { margin-top: 14px; }+ .lede b {+ color: var(--ink);+ font-weight: 600;+ }+ .lede em {+ font-style: italic;+ color: var(--accent);+ font-weight: 500;+ }++ /* ── stats (inside left column) ───────────────────────────── */+ .stats {+ margin-top: 44px;+ z-index: 3;+ }+ .stats-rule {+ height: 1px;+ background: linear-gradient(to right, var(--rule) 0%, var(--rule) 90%, transparent);+ margin-bottom: 24px;+ }+ .stats-row {+ display: flex;+ gap: 56px;+ }+ .stat .num {+ font-family: "Fraunces", serif;+ font-weight: 500;+ font-size: 52px;+ line-height: 1;+ letter-spacing: -0.02em;+ color: var(--ink);+ font-variation-settings: "opsz" 144;+ }+ .stat.zero .num { color: var(--accent); font-style: italic; }+ .stat .label {+ margin-top: 10px;+ font-family: "JetBrains Mono", monospace;+ font-size: 10px;+ letter-spacing: 0.22em;+ text-transform: uppercase;+ color: var(--ink-mute);+ line-height: 1.4;+ }++ /* ── bottom hairline ──────────────────────────────────────── */+ .bottom-rule {+ position: absolute;+ left: 80px;+ right: 80px;+ bottom: 56px;+ height: 1px;+ background: linear-gradient(to right, transparent, var(--rule) 8%, var(--rule) 92%, transparent);+ z-index: 1;+ }+ .bottom-meta {+ position: absolute;+ left: 80px;+ right: 80px;+ bottom: 30px;+ display: flex;+ justify-content: space-between;+ font-family: "JetBrains Mono", monospace;+ font-size: 11px;+ letter-spacing: 0.2em;+ text-transform: uppercase;+ color: var(--ink-faint);+ z-index: 2;+ }++ /* ── right column · floating screenshots ──────────────────── */+ .stage {+ position: absolute;+ top: 160px;+ right: 60px;+ width: 1200px;+ height: 760px;+ z-index: 2;+ pointer-events: none;+ }++ .card {+ position: absolute;+ border-radius: 14px;+ overflow: hidden;+ background: #221b14;+ box-shadow:+ 0 30px 60px -16px rgba(0,0,0,0.7),+ 0 14px 30px -8px rgba(0,0,0,0.55),+ 0 0 0 1px rgba(255,236,200,0.06) inset;+ }+ .card .chrome {+ position: absolute;+ top: 0; left: 0; right: 0;+ height: 30px;+ background: linear-gradient(180deg, rgba(28,22,16,0.92), rgba(20,15,11,0.88));+ border-bottom: 1px solid rgba(255,236,200,0.05);+ display: flex;+ align-items: center;+ padding: 0 12px;+ z-index: 2;+ }+ .card .chrome .tag {+ font-family: "JetBrains Mono", monospace;+ font-size: 9px;+ letter-spacing: 0.22em;+ text-transform: uppercase;+ color: var(--ink-mute);+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+ }+ .card .chrome .tag .sep { color: var(--ink-faint); margin: 0 6px; }+ .card .chrome .dots {+ display: flex; gap: 5px; margin-right: 10px;+ flex-shrink: 0;+ }+ .card .chrome .dots i {+ width: 7px; height: 7px; border-radius: 50%;+ background: #3a2e22;+ display: inline-block;+ }+ .card img {+ display: block;+ object-fit: cover;+ object-position: center top;+ margin-top: 30px;+ width: 100%;+ height: calc(100% - 30px);+ }++ /* individual placements — 3 cards, spread across full right half */+ .card-1 { /* deck-guizang-editorial — back, top-right */+ top: 0;+ right: 100px;+ width: 540px;+ height: 335px;+ transform: rotate(-4deg);+ z-index: 1;+ }+ .card-2 { /* deck-swiss-international — front, mid, leftmost-reaching */+ top: 200px;+ right: 380px;+ width: 600px;+ height: 375px;+ transform: rotate(2.5deg);+ z-index: 3;+ }+ .card-3 { /* video-hyperframes — bottom-right */+ top: 420px;+ right: 30px;+ width: 540px;+ height: 335px;+ transform: rotate(-2deg);+ z-index: 2;+ }++ /* ── orange "open source" sphere ──────────────────────────── */+ .sphere {+ position: absolute;+ top: 150px;+ right: 110px;+ width: 86px;+ height: 86px;+ border-radius: 50%;+ background:+ radial-gradient(circle at 32% 28%, #ffb988 0%, #ec8c4b 30%, #c95f24 65%, #8c3d12 100%);+ box-shadow:+ 0 0 60px 8px rgba(232,125,62,0.35),+ 0 0 120px 20px rgba(232,125,62,0.12),+ inset -8px -10px 24px rgba(0,0,0,0.35);+ display: flex;+ align-items: center;+ justify-content: center;+ z-index: 5;+ }+ .sphere span {+ font-family: "JetBrains Mono", monospace;+ font-size: 11px;+ font-weight: 500;+ letter-spacing: 0.16em;+ line-height: 1.15;+ color: #1a0e06;+ text-align: center;+ text-transform: uppercase;+ }++ /* mid-canvas pull quote bridging headline & cards */+ .pullquote {+ position: absolute;+ left: 980px;+ top: 760px;+ width: 360px;+ z-index: 4;+ transform: rotate(-1.5deg);+ }+ .pullquote .mark {+ font-family: "Fraunces", serif;+ font-style: italic;+ font-size: 96px;+ line-height: 0.6;+ color: var(--accent);+ opacity: 0.55;+ margin-bottom: -10px;+ }+ .pullquote .q {+ font-family: "Fraunces", serif;+ font-style: italic;+ font-weight: 500;+ font-size: 22px;+ line-height: 1.35;+ color: var(--ink);+ letter-spacing: 0.005em;+ }+ .pullquote .attr {+ margin-top: 14px;+ font-family: "JetBrains Mono", monospace;+ font-size: 10px;+ letter-spacing: 0.2em;+ text-transform: uppercase;+ color: var(--ink-faint);+ }++ /* watermark serial number on left edge */+ .serial {+ position: absolute;+ top: 50%;+ left: 28px;+ transform: translateY(-50%) rotate(-90deg);+ transform-origin: left center;+ font-family: "JetBrains Mono", monospace;+ font-size: 11px;+ letter-spacing: 0.4em;+ color: var(--ink-faint);+ text-transform: uppercase;+ z-index: 2;+ }+</style>+</head>+<body>+ <div class="cover">++ <!-- top metadata bar -->+ <div class="topbar">+ <div class="left-meta">HTML ANYTHING · MANIFESTO · 2026 EDITION</div>+ <div class="center"><span class="dot"></span>html.anything</div>+ <div class="right">+ <span>COVER</span><span class="sep">·</span><span>01 / 09</span><span class="sep">·</span><span>LOCAL AI · ZERO API KEY</span>+ </div>+ </div>+ <div class="hairline"></div>++ <!-- LEFT column -->+ <div class="left">+ <div class="badges">+ <div class="badge accent">Apache 2.0</div>+ <div class="badge">Local-first · Zero API key</div>+ </div>++ <h1 class="headline">+ Anything becomes<br/>+ <em>ship-ready</em> HTML,<br/>+ on your <span class="ul">laptop</span>.+ </h1>++ <p class="lede">+ Markdown is the draft — <b>HTML</b> is what humans read. Your local+ <b>Claude Code</b> (and 7 other agent CLIs) turn <em>anything</em> into a+ single-file, ship-ready HTML — ready to paste into <b>WeChat · X · Zhihu</b>.+ </p>++ <div class="stats">+ <div class="stats-rule"></div>+ <div class="stats-row">+ <div class="stat">+ <div class="num">75</div>+ <div class="label">Composable<br/>Skills</div>+ </div>+ <div class="stat">+ <div class="num">09</div>+ <div class="label">Surface<br/>Modes</div>+ </div>+ <div class="stat">+ <div class="num">08</div>+ <div class="label">Coding<br/>Agents</div>+ </div>+ <div class="stat zero">+ <div class="num">0</div>+ <div class="label">API Key /<br/>Vendor Cloud</div>+ </div>+ </div>+ </div>+ </div>++ <!-- RIGHT column · floating cards -->+ <div class="stage">++ <!-- back: deck-guizang-editorial -->+ <div class="card card-1">+ <div class="chrome">+ <div class="dots"><i></i><i></i><i></i></div>+ <div class="tag">DECK<span class="sep">·</span>GUIZANG EDITORIAL</div>+ </div>+ <img src="screenshots/skills/deck-guizang-editorial.png" alt="" />+ </div>++ <!-- front-middle: deck-swiss-international -->+ <div class="card card-2">+ <div class="chrome">+ <div class="dots"><i></i><i></i><i></i></div>+ <div class="tag">DECK<span class="sep">·</span>SWISS INTERNATIONAL</div>+ </div>+ <img src="screenshots/skills/deck-swiss-international.png" alt="" />+ </div>++ <!-- bottom-right: video-hyperframes -->+ <div class="card card-3">+ <div class="chrome">+ <div class="dots"><i></i><i></i><i></i></div>+ <div class="tag">VIDEO<span class="sep">·</span>HYPERFRAMES STORYBOARD</div>+ </div>+ <img src="screenshots/skills/video-hyperframes.png" alt="" />+ </div>+ </div>++ <!-- mid-canvas pull quote bridging headline & right cards -->+ <div class="pullquote">+ <div class="mark">“</div>+ <div class="q">Markdown is good for the writer.<br/>HTML is good for the reader.</div>+ <div class="attr">— Claude Code Team · 2026</div>+ </div>++ <!-- "open source" sphere -->+ <div class="sphere"><span>OPEN<br/>SOURCE</span></div>++ <!-- bottom hairline + meta -->+ <div class="bottom-rule"></div>+ <div class="bottom-meta">+ <div>GITHUB.COM/PFTOM/HTML-EVERYTHING</div>+ <div>MARKDOWN → HTML · DECK · POSTER · VIDEO FRAME</div>+ <div>APACHE-2.0 · 2026</div>+ </div>++ <div class="serial">HE-2026 · COVER · 0001</div>+ </div>+</body>+</html>diff --git a/docs/screenshots/01-entry-view.png b/docs/screenshots/01-entry-view.pngnew file mode 100644index 00000000..e67bb561Binary files /dev/null and b/docs/screenshots/01-entry-view.png differdiff --git a/docs/screenshots/02-template-picker.png b/docs/screenshots/02-template-picker.pngnew file mode 100644index 00000000..b6c2d07aBinary files /dev/null and b/docs/screenshots/02-template-picker.png differdiff --git a/docs/screenshots/03-streaming.png b/docs/screenshots/03-streaming.pngnew file mode 100644index 00000000..9fdee834Binary files /dev/null and b/docs/screenshots/03-streaming.png differdiff --git a/docs/screenshots/04-export.png b/docs/screenshots/04-export.pngnew file mode 100644index 00000000..93d26785Binary files /dev/null and b/docs/screenshots/04-export.png differdiff --git a/docs/screenshots/05-deck-mode.png b/docs/screenshots/05-deck-mode.pngnew file mode 100644index 00000000..ceba9e56Binary files /dev/null and b/docs/screenshots/05-deck-mode.png differdiff --git a/docs/screenshots/06-hyperframes.png b/docs/screenshots/06-hyperframes.pngnew file mode 100644index 00000000..d24ea8caBinary files /dev/null and b/docs/screenshots/06-hyperframes.png differdiff --git a/docs/screenshots/skills/deck-guizang-editorial.png b/docs/screenshots/skills/deck-guizang-editorial.pngnew file mode 100644index 00000000..7c5fe054Binary files /dev/null and b/docs/screenshots/skills/deck-guizang-editorial.png differdiff --git a/docs/screenshots/skills/deck-swiss-international.png b/docs/screenshots/skills/deck-swiss-international.pngnew file mode 100644index 00000000..7b090fb4Binary files /dev/null and b/docs/screenshots/skills/deck-swiss-international.png differdiff --git a/docs/screenshots/skills/doc-kami-parchment.png b/docs/screenshots/skills/doc-kami-parchment.pngnew file mode 100644index 00000000..de496116Binary files /dev/null and b/docs/screenshots/skills/doc-kami-parchment.png differdiff --git a/docs/screenshots/skills/frame-glitch-title.png b/docs/screenshots/skills/frame-glitch-title.pngnew file mode 100644index 00000000..7f5a8d37Binary files /dev/null and b/docs/screenshots/skills/frame-glitch-title.png differdiff --git a/docs/screenshots/skills/frame-logo-outro.png b/docs/screenshots/skills/frame-logo-outro.pngnew file mode 100644index 00000000..79e84cd0Binary files /dev/null and b/docs/screenshots/skills/frame-logo-outro.png differdiff --git a/docs/screenshots/skills/magazine-poster.png b/docs/screenshots/skills/magazine-poster.pngnew file mode 100644index 00000000..6107eb36Binary files /dev/null and b/docs/screenshots/skills/magazine-poster.png differdiff --git a/docs/screenshots/skills/vfx-text-cursor.png b/docs/screenshots/skills/vfx-text-cursor.pngnew file mode 100644index 00000000..b7967b1eBinary files /dev/null and b/docs/screenshots/skills/vfx-text-cursor.png differdiff --git a/docs/screenshots/skills/video-hyperframes.png b/docs/screenshots/skills/video-hyperframes.pngnew file mode 100644index 00000000..61fbfd86Binary files /dev/null and b/docs/screenshots/skills/video-hyperframes.png differdiff --git a/next.config.ts b/next.config.tsnew file mode 100644index 00000000..e9ffa308--- /dev/null+++ b/next.config.ts@@ -0,0 +1,7 @@+import type { NextConfig } from "next";++const nextConfig: NextConfig = {+ /* config options here */+};++export default nextConfig;diff --git a/package.json b/package.jsonnew file mode 100644index 00000000..aa28508d--- /dev/null+++ b/package.json@@ -0,0 +1,38 @@+{+ "name": "html-anything",+ "version": "0.1.0",+ "private": true,+ "license": "Apache-2.0",+ "scripts": {+ "dev": "next dev",+ "build": "next build",+ "start": "next start"+ },+ "dependencies": {+ "clsx": "^2.1.1",+ "dompurify": "^3.4.2",+ "highlight.js": "^11.11.1",+ "jszip": "^3.10.1",+ "juice": "^11.1.1",+ "lucide-react": "^1.14.0",+ "marked": "^18.0.3",+ "modern-screenshot": "^4.7.0",+ "next": "16.2.6",+ "papaparse": "^5.5.3",+ "pptxgenjs": "^4.0.1",+ "react": "19.2.4",+ "react-dom": "19.2.4",+ "xlsx": "^0.18.5",+ "zustand": "^5.0.13"+ },+ "devDependencies": {+ "@tailwindcss/postcss": "^4",+ "@types/dompurify": "^3.2.0",+ "@types/node": "^20",+ "@types/papaparse": "^5.5.2",+ "@types/react": "^19",+ "@types/react-dom": "^19",+ "tailwindcss": "^4",+ "typescript": "^5"+ }+}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlnew file mode 100644index 00000000..e67308cb--- /dev/null+++ b/pnpm-lock.yaml@@ -0,0 +1,1554 @@+lockfileVersion: '9.0'++settings:+ autoInstallPeers: true+ excludeLinksFromLockfile: false++importers:++ .:+ dependencies:+ clsx:+ specifier: ^2.1.1+ version: 2.1.1+ dompurify:+ specifier: ^3.4.2+ version: 3.4.2+ highlight.js:+ specifier: ^11.11.1+ version: 11.11.1+ jszip:+ specifier: ^3.10.1+ version: 3.10.1+ juice:+ specifier: ^11.1.1+ version: 11.1.1+ lucide-react:+ specifier: ^1.14.0+ version: 1.14.0([email protected])+ marked:+ specifier: ^18.0.3+ version: 18.0.3+ modern-screenshot:+ specifier: ^4.7.0+ version: 4.7.0+ next:+ specifier: 16.2.6+ papaparse:+ specifier: ^5.5.3+ version: 5.5.3+ pptxgenjs:+ specifier: ^4.0.1+ version: 4.0.1+ react:+ specifier: 19.2.4+ version: 19.2.4+ react-dom:+ specifier: 19.2.4+ version: 19.2.4([email protected])+ xlsx:+ specifier: ^0.18.5+ version: 0.18.5+ zustand:+ specifier: ^5.0.13+ version: 5.0.13(@types/[email protected])([email protected])+ devDependencies:+ '@tailwindcss/postcss':+ specifier: ^4+ version: 4.3.0+ '@types/dompurify':+ specifier: ^3.2.0+ version: 3.2.0+ '@types/node':+ specifier: ^20+ version: 20.19.40+ '@types/papaparse':+ specifier: ^5.5.2+ version: 5.5.2+ '@types/react':+ specifier: ^19+ version: 19.2.14+ '@types/react-dom':+ specifier: ^19+ version: 19.2.3(@types/[email protected])+ tailwindcss:+ specifier: ^4+ version: 4.3.0+ typescript:+ specifier: ^5+ version: 5.9.3++packages:++ '@alloc/[email protected]':+ resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}+ engines: {node: '>=10'}++ '@emnapi/[email protected]':+ resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==}++ '@img/[email protected]':+ resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}+ engines: {node: '>=18'}++ '@img/[email protected]':+ resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==}+ cpu: [arm64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==}+ cpu: [x64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==}+ cpu: [arm]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==}+ cpu: [ppc64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==}+ cpu: [riscv64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==}+ cpu: [s390x]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@img/[email protected]':+ resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@img/[email protected]':+ resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [ppc64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [riscv64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [s390x]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@img/[email protected]':+ resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@img/[email protected]':+ resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@img/[email protected]':+ resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [wasm32]++ '@img/[email protected]':+ resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [win32]++ '@img/[email protected]':+ resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [ia32]+ os: [win32]++ '@img/[email protected]':+ resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [win32]++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}+ engines: {node: '>=6.0.0'}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}++ '@next/[email protected]':+ resolution: {integrity: sha512-gd8HoHN4ufj73WmR3JmVolrpJR47ILK6LouP5xElPglaVxir6e1a7VzvTvDWkOoPXT9rkkTzyCxBu4yeZfZwcw==}++ '@next/[email protected]':+ resolution: {integrity: sha512-ZJGkkcNfYgrrMkqOdZ7zoLa1TOy0qpcMfk/z4Mh/FKUz40gVO+HNQWqmLxf67Z5WB64DRp0dhEbyHfel+6sJUg==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [darwin]++ '@next/[email protected]':+ resolution: {integrity: sha512-v/YLBHIY132Ced3puBJ7YJKw1lqsCrgcNo2aRJlCEyQrrCeRJlvGlnmxhPxNQI3KE3N1DN5r9TPNPvka3nq5RQ==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [darwin]++ '@next/[email protected]':+ resolution: {integrity: sha512-RPOvqlYBbcQjkz9VQQDZ2T2bARIjXZV1KFlt+V2Mr6SW/e4I9fcKsaA0hdyf2FHoTlsV2xnBd5Y912rP/1Ce6w==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@next/[email protected]':+ resolution: {integrity: sha512-URUTu1+dMkxJsPFgm+OeEvq9wf5sujw0EvgYy80TDGHTSLTnIHeqb0Eu8A3sC95IRgjejQL+kC4mw+4yPxiAXA==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@next/[email protected]':+ resolution: {integrity: sha512-DOj182mPV8G3UkrayLoREM5YEYI+Dk5wv7Ox9xl1fFibAELEsFD0lDPfHIeILlutMMfdyhlzYPELG3peuKaurw==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@next/[email protected]':+ resolution: {integrity: sha512-HKQ5SP/V/ub73UvF7n/zeJlxk2kLmtL7Wzrg4WfmkjmNos5onJ2tKu7yZOPdL18A6Svfn3max29ym+ry7NkK4g==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@next/[email protected]':+ resolution: {integrity: sha512-LZXpTlPyS5v7HhSmnvsLGP3iIYgYOBnc8r8ArlT55sGHV89bR2HlDdBjWQ+PY6SJMmk8TuVGFuxalnP3k/0Dwg==}+ engines: {node: '>= 10'}+ cpu: [arm64]+ os: [win32]++ '@next/[email protected]':+ resolution: {integrity: sha512-F0+4i0h9J6C4eE3EAPWsoCk7UW/dbzOjyzxY0qnDUOYFu6FFmdZ6l97/XdV3/Nz3VYyO7UWjyEJUXkGqcoXfMA==}+ engines: {node: '>= 10'}+ cpu: [x64]+ os: [win32]++ '@swc/[email protected]':+ resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g==}++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [android]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [darwin]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [darwin]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [freebsd]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA==}+ engines: {node: '>= 20'}+ cpu: [arm]+ os: [linux]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==}+ engines: {node: '>=14.0.0'}+ cpu: [wasm32]+ bundledDependencies:+ - '@napi-rs/wasm-runtime'+ - '@emnapi/core'+ - '@emnapi/runtime'+ - '@tybys/wasm-util'+ - '@emnapi/wasi-threads'+ - tslib++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [win32]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [win32]++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg==}+ engines: {node: '>= 20'}++ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Jm05Tjx+9yCLGv5qw1c+84Psds8MnyrEQYCB+FFk2lgGiUjlRqdxke4mVTuYrj2xnVZqKim2Apr5ySuQRYAw/w==}++ '@types/[email protected]':+ resolution: {integrity: sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg==}+ deprecated: This is a stub types definition. dompurify provides its own type definitions, so you do not need this installed.++ '@types/[email protected]':+ resolution: {integrity: sha512-xxx6M2IpSTnnKcR0cMvIiohkiCx20/oRPtWGbenFygKCGl3zqUzdNjQ/1V4solq1LU+dgv0nQzeGOuqkqZGg0Q==}++ '@types/[email protected]':+ resolution: {integrity: sha512-9v00a+dn2yWVsYDEunWC4g/TcRKVq3r8N5FuZp7u0SGrPvdN9c2yXI9bBuf5Fl0hNCb+QTIePTn5pJs2pwBOQQ==}++ '@types/[email protected]':+ resolution: {integrity: sha512-gFnFp/JMzLHCwRf7tQHrNnfhN4eYBVYYI897CGX4MY1tzY9l2aLkVyx2IlKZ/SAqDbB3I1AOZW5gTMGGsqWliA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==}+ peerDependencies:+ '@types/react': ^19.2.0++ '@types/[email protected]':+ resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==}++ '@types/[email protected]':+ resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}++ resolution: {integrity: sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-Asa2krT+XTPZINCS+2QcyS8WTkObE77RwkydwF7h6DmnKqbvlalz93m/dnphUyCa6SWSP51VgtEUf2FN+gelFQ==}+ engines: {node: '>=6.0.0'}+ hasBin: true++ resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}++ resolution: {integrity: sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==}++ resolution: {integrity: sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==}++ resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==}+ engines: {node: '>=18.17'}++ resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}++ resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}++ resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==}+ engines: {node: '>=0.8'}+ hasBin: true++ resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==}++ resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==}+ engines: {node: '>= 6'}++ resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}++ resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}++ resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}++ resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}+ engines: {node: '>= 4'}++ resolution: {integrity: sha512-lHeS9SA/IKeIFFyYciHBr2n0v1VMPlSj843HdLOwjb2OxNwdq9Xykxqhk+FE42MzAdHvInbAolSE4mhahPpjXA==}++ resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==}++ resolution: {integrity: sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==}++ resolution: {integrity: sha512-xe9vQb5kReirPUxgQrXA3ihgbCqssmTiM7cOZ+Gzu+VeGWgpV98lLZvp0dl4yriyAePcewxGUs9UpKD8PET9KQ==}+ engines: {node: '>=10.13.0'}++ resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}+ engines: {node: '>=0.12'}++ resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==}+ engines: {node: '>=0.12'}++ resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==}+ engines: {node: '>=0.12'}++ resolution: {integrity: sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}++ resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}+ engines: {node: '>=12.0.0'}++ resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==}++ resolution: {integrity: sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==}++ resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==}+ engines: {node: '>=16.x'}+ hasBin: true++ resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==}++ resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}++ resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}++ resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==}+ hasBin: true++ resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}++ resolution: {integrity: sha512-4SBfZqKcc6DrIS+5b/WiGoWaZsdUPBH+e6SbRlNjJpaIRtfoBhYReAtobIEW6mcLeFFDXLBJMuZwkJLkBJjs2w==}+ engines: {node: '>=18.17'}+ hasBin: true++ resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==}++ resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [android]++ resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [darwin]++ resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [darwin]++ resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [freebsd]++ resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm]+ os: [linux]++ resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [win32]++ resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [win32]++ resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==}+ engines: {node: '>= 12.0.0'}++ resolution: {integrity: sha512-+1mdWcfSJVUsaTIjN9zoezmUhfXo5l0vP7ekBMPo3jcS/aIkxHnXqAPsByszMZx/Y8oQBRJxJx5xg+RH3urzxA==}+ peerDependencies:+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0++ resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}++ resolution: {integrity: sha512-7VT90JOkDeaRWpfjOReRGPEKn0ecdARBkDGL+tT1wZY0efPPqkUxLUSmzy/C7TIylQYJC9STISEsCHrqb/7VIA==}+ engines: {node: '>= 20'}+ hasBin: true++ resolution: {integrity: sha512-IAeFvcOnV9V0Yk+bFhYR07O3yNina9ANIN5MoXBKYJ/RLYPurd2d0yw14MDhpr9/momp0WofT1bPUh3hkzdi/g==}++ resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==}+ engines: {node: '>=4.0.0'}+ hasBin: true++ resolution: {integrity: sha512-9YxN+ddPSMMlhylOv25VHzXrl9u67QRxoh7+SEewGtgUw7t6hHTrjptSDJUSne9oG4Xk/h2cwG15nIt4Hc9ujg==}++ resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==}+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}+ hasBin: true++ resolution: {integrity: sha512-qOVgKJg1+At15NpeUP+eJgCHvTCgXsogweq87Ri/Ix7PkqQHg4sdaXmSFqKlgaIXE4kW0g25LE68W87UANlHtw==}+ engines: {node: '>=20.9.0'}+ hasBin: true+ peerDependencies:+ '@opentelemetry/api': ^1.1.0+ '@playwright/test': ^1.51.1+ babel-plugin-react-compiler: '*'+ react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0+ react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0+ sass: ^1.3.0+ peerDependenciesMeta:+ '@opentelemetry/api':+ optional: true+ '@playwright/test':+ optional: true+ babel-plugin-react-compiler:+ optional: true+ sass:+ optional: true++ resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}++ resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}++ resolution: {integrity: sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==}++ resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==}++ resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==}++ resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}++ resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}++ resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}+ engines: {node: ^10 || ^12 || >=14}++ resolution: {integrity: sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==}+ engines: {node: ^10 || ^12 || >=14}++ resolution: {integrity: sha512-TeJISr8wouAuXw4C1F/mC33xbZs/FuEG6nH9FG1Zj+nuPcGMP5YRHl6X+j3HSUnS1f3at6k75ZZXPMZlA5Lj9A==}++ resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}++ resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==}++ resolution: {integrity: sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==}+ peerDependencies:+ react: ^19.2.4++ resolution: {integrity: sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}++ resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}++ resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}++ resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==}++ resolution: {integrity: sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==}+ engines: {node: '>=10'}+ hasBin: true++ resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}++ resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}++ resolution: {integrity: sha512-4qdtOGcBjral6YIBCWJ0ljFSKNLz9KkhbWtuGvUyRowl1kxfuE1x/Z/aJcaiilpb3do9bl5K7/1h9XC5wWpY/A==}++ resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}++ resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==}+ engines: {node: '>= 12.0.0'}+ peerDependencies:+ '@babel/core': '*'+ babel-plugin-macros: '*'+ react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0'+ peerDependenciesMeta:+ '@babel/core':+ optional: true+ babel-plugin-macros:+ optional: true++ resolution: {integrity: sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q==}++ resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}++ resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}+ engines: {node: '>=14.17'}+ hasBin: true++ resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}++ resolution: {integrity: sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==}+ engines: {node: '>=18.17'}++ resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}++ resolution: {integrity: sha512-jOWVmzVceKlVVdwjNSenT4PbGghU0SBIizAev8ofZVgivk/TVHXSbNL8LP6M3spZvkR9/QolkyJavGSX5Cs0UA==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-Ezr98sqXW/+OCGoUEXuOKVR+oVFlSdn1tIySEEJdiSAw4IjrW8hQkwARSSBJTSB5Us5dnytDgL0ZDliAYBhaNA==}+ engines: {node: '>=10.0.0'}++ resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==}+ engines: {node: '>=18'}+ deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation++ resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==}+ engines: {node: '>=0.8'}++ resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==}+ engines: {node: '>=0.8'}+ hasBin: true++ resolution: {integrity: sha512-efI2tVaVQPqtOh114loML/Z80Y4NP3yc+Ff0fYiZJPauNeWZeIp/bRFD7I9bfmCOYBh/PHxlglQ9+wvlwnPikQ==}+ engines: {node: '>=12.20.0'}+ peerDependencies:+ '@types/react': '>=18.0.0'+ immer: '>=9.0.6'+ react: '>=18.0.0'+ use-sync-external-store: '>=1.2.0'+ peerDependenciesMeta:+ '@types/react':+ optional: true+ immer:+ optional: true+ react:+ optional: true+ use-sync-external-store:+ optional: true++snapshots:++ '@alloc/[email protected]': {}++ '@emnapi/[email protected]':+ dependencies:+ tslib: 2.8.1+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-darwin-arm64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-darwin-x64': 1.2.4+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-arm64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-arm': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-ppc64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-riscv64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-s390x': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-x64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linuxmusl-arm64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linuxmusl-x64': 1.2.4+ optional: true++ '@img/[email protected]':+ dependencies:+ '@emnapi/runtime': 1.10.0+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@jridgewell/[email protected]':+ dependencies:+ '@jridgewell/sourcemap-codec': 1.5.5+ '@jridgewell/trace-mapping': 0.3.31++ '@jridgewell/[email protected]':+ dependencies:+ '@jridgewell/gen-mapping': 0.3.13+ '@jridgewell/trace-mapping': 0.3.31++ '@jridgewell/[email protected]': {}++ '@jridgewell/[email protected]': {}++ '@jridgewell/[email protected]':+ dependencies:+ '@jridgewell/resolve-uri': 3.1.2+ '@jridgewell/sourcemap-codec': 1.5.5++ '@next/[email protected]': {}++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@next/[email protected]':+ optional: true++ '@swc/[email protected]':+ dependencies:+ tslib: 2.8.1++ '@tailwindcss/[email protected]':+ dependencies:+ '@jridgewell/remapping': 2.3.5+ enhanced-resolve: 5.21.2+ jiti: 2.7.0+ lightningcss: 1.32.0+ magic-string: 0.30.21+ source-map-js: 1.2.1+ tailwindcss: 4.3.0++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optional: true++ '@tailwindcss/[email protected]':+ optionalDependencies:+ '@tailwindcss/oxide-android-arm64': 4.3.0+ '@tailwindcss/oxide-darwin-arm64': 4.3.0+ '@tailwindcss/oxide-darwin-x64': 4.3.0+ '@tailwindcss/oxide-freebsd-x64': 4.3.0+ '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.0+ '@tailwindcss/oxide-linux-arm64-gnu': 4.3.0+ '@tailwindcss/oxide-linux-arm64-musl': 4.3.0+ '@tailwindcss/oxide-linux-x64-gnu': 4.3.0+ '@tailwindcss/oxide-linux-x64-musl': 4.3.0+ '@tailwindcss/oxide-wasm32-wasi': 4.3.0+ '@tailwindcss/oxide-win32-arm64-msvc': 4.3.0+ '@tailwindcss/oxide-win32-x64-msvc': 4.3.0++ '@tailwindcss/[email protected]':+ dependencies:+ '@alloc/quick-lru': 5.2.0+ '@tailwindcss/node': 4.3.0+ '@tailwindcss/oxide': 4.3.0+ postcss: 8.5.14+ tailwindcss: 4.3.0++ '@types/[email protected]':+ dependencies:+ dompurify: 3.4.2++ '@types/[email protected]':+ dependencies:+ undici-types: 6.21.0++ '@types/[email protected]':+ dependencies:+ undici-types: 6.21.0++ '@types/[email protected]':+ dependencies:+ '@types/node': 20.19.40++ '@types/[email protected](@types/[email protected])':+ dependencies:+ '@types/react': 19.2.14++ '@types/[email protected]':+ dependencies:+ csstype: 3.2.3++ '@types/[email protected]':+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ adler-32: 1.3.1+ crc-32: 1.2.2++ dependencies:+ boolbase: 1.0.0+ css-select: 5.2.2+ css-what: 6.2.2+ domelementtype: 2.3.0+ domhandler: 5.0.3+ domutils: 3.2.2++ dependencies:+ cheerio-select: 2.1.0+ dom-serializer: 2.0.0+ domhandler: 5.0.3+ domutils: 3.2.2+ encoding-sniffer: 0.2.1+ htmlparser2: 9.1.0+ parse5: 7.3.0+ parse5-htmlparser2-tree-adapter: 7.1.0+ parse5-parser-stream: 7.1.2+ undici: 6.25.0+ whatwg-mimetype: 4.0.0++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ boolbase: 1.0.0+ css-what: 6.2.2+ domhandler: 5.0.3+ domutils: 3.2.2+ nth-check: 2.1.1++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ domelementtype: 2.3.0+ domhandler: 5.0.3+ entities: 4.5.0++ [email protected]: {}++ dependencies:+ domelementtype: 2.3.0++ optionalDependencies:+ '@types/trusted-types': 2.0.7++ dependencies:+ dom-serializer: 2.0.0+ domelementtype: 2.3.0+ domhandler: 5.0.3++ dependencies:+ iconv-lite: 0.6.3+ whatwg-encoding: 3.1.1++ dependencies:+ graceful-fs: 4.2.11+ tapable: 2.3.3++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ domelementtype: 2.3.0+ domhandler: 5.0.3+ domutils: 3.2.2+ entities: 4.5.0++ [email protected]: {}++ dependencies:+ safer-buffer: 2.1.2++ dependencies:+ queue: 6.0.2++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ lie: 3.3.0+ pako: 1.0.11+ readable-stream: 2.3.8+ setimmediate: 1.0.5++ dependencies:+ cheerio: 1.0.0+ commander: 12.1.0+ entities: 7.0.1+ mensch: 0.3.4+ slick: 1.12.2+ web-resource-inliner: 8.0.0++ dependencies:+ immediate: 3.0.6++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ dependencies:+ detect-libc: 2.1.2+ optionalDependencies:+ lightningcss-android-arm64: 1.32.0+ lightningcss-darwin-arm64: 1.32.0+ lightningcss-darwin-x64: 1.32.0+ lightningcss-freebsd-x64: 1.32.0+ lightningcss-linux-arm-gnueabihf: 1.32.0+ lightningcss-linux-arm64-gnu: 1.32.0+ lightningcss-linux-arm64-musl: 1.32.0+ lightningcss-linux-x64-gnu: 1.32.0+ lightningcss-linux-x64-musl: 1.32.0+ lightningcss-win32-arm64-msvc: 1.32.0+ lightningcss-win32-x64-msvc: 1.32.0++ dependencies:+ react: 19.2.4++ dependencies:+ '@jridgewell/sourcemap-codec': 1.5.5++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ '@next/env': 16.2.6+ '@swc/helpers': 0.5.15+ baseline-browser-mapping: 2.10.29+ caniuse-lite: 1.0.30001792+ postcss: 8.4.31+ react: 19.2.4+ react-dom: 19.2.4([email protected])+ styled-jsx: 5.1.6([email protected])+ optionalDependencies:+ '@next/swc-darwin-arm64': 16.2.6+ '@next/swc-darwin-x64': 16.2.6+ '@next/swc-linux-arm64-gnu': 16.2.6+ '@next/swc-linux-arm64-musl': 16.2.6+ '@next/swc-linux-x64-gnu': 16.2.6+ '@next/swc-linux-x64-musl': 16.2.6+ '@next/swc-win32-arm64-msvc': 16.2.6+ '@next/swc-win32-x64-msvc': 16.2.6+ sharp: 0.34.5+ transitivePeerDependencies:+ - '@babel/core'+ - babel-plugin-macros++ dependencies:+ boolbase: 1.0.0++ [email protected]: {}++ [email protected]: {}++ dependencies:+ domhandler: 5.0.3+ parse5: 7.3.0++ dependencies:+ parse5: 7.3.0++ dependencies:+ entities: 6.0.1++ [email protected]: {}++ dependencies:+ nanoid: 3.3.12+ picocolors: 1.1.1+ source-map-js: 1.2.1++ dependencies:+ nanoid: 3.3.12+ picocolors: 1.1.1+ source-map-js: 1.2.1++ dependencies:+ '@types/node': 22.19.18+ https: 1.0.0+ image-size: 1.2.1+ jszip: 3.10.1++ [email protected]: {}++ dependencies:+ inherits: 2.0.4++ dependencies:+ react: 19.2.4+ scheduler: 0.27.0++ [email protected]: {}++ dependencies:+ core-util-is: 1.0.3+ inherits: 2.0.4+ isarray: 1.0.0+ process-nextick-args: 2.0.1+ safe-buffer: 5.1.2+ string_decoder: 1.1.1+ util-deprecate: 1.0.2++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ '@img/colour': 1.1.0+ detect-libc: 2.1.2+ semver: 7.8.0+ optionalDependencies:+ '@img/sharp-darwin-arm64': 0.34.5+ '@img/sharp-darwin-x64': 0.34.5+ '@img/sharp-libvips-darwin-arm64': 1.2.4+ '@img/sharp-libvips-darwin-x64': 1.2.4+ '@img/sharp-libvips-linux-arm': 1.2.4+ '@img/sharp-libvips-linux-arm64': 1.2.4+ '@img/sharp-libvips-linux-ppc64': 1.2.4+ '@img/sharp-libvips-linux-riscv64': 1.2.4+ '@img/sharp-libvips-linux-s390x': 1.2.4+ '@img/sharp-libvips-linux-x64': 1.2.4+ '@img/sharp-libvips-linuxmusl-arm64': 1.2.4+ '@img/sharp-libvips-linuxmusl-x64': 1.2.4+ '@img/sharp-linux-arm': 0.34.5+ '@img/sharp-linux-arm64': 0.34.5+ '@img/sharp-linux-ppc64': 0.34.5+ '@img/sharp-linux-riscv64': 0.34.5+ '@img/sharp-linux-s390x': 0.34.5+ '@img/sharp-linux-x64': 0.34.5+ '@img/sharp-linuxmusl-arm64': 0.34.5+ '@img/sharp-linuxmusl-x64': 0.34.5+ '@img/sharp-wasm32': 0.34.5+ '@img/sharp-win32-arm64': 0.34.5+ '@img/sharp-win32-ia32': 0.34.5+ '@img/sharp-win32-x64': 0.34.5+ optional: true++ [email protected]: {}++ [email protected]: {}++ dependencies:+ frac: 1.1.2++ dependencies:+ safe-buffer: 5.1.2++ dependencies:+ client-only: 0.0.1+ react: 19.2.4++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ ansi-colors: 4.1.3+ escape-goat: 3.0.0+ htmlparser2: 9.1.0+ mime: 2.6.0+ valid-data-url: 3.0.1++ dependencies:+ iconv-lite: 0.6.3++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ adler-32: 1.3.1+ cfb: 1.2.2+ codepage: 1.15.0+ crc-32: 1.2.2+ ssf: 0.11.2+ wmf: 1.0.2+ word: 0.3.0++ optionalDependencies:+ '@types/react': 19.2.14+ react: 19.2.4diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlnew file mode 100644index 00000000..581a9d5b--- /dev/null+++ b/pnpm-workspace.yaml@@ -0,0 +1,3 @@+ignoredBuiltDependencies:+ - sharp+ - unrs-resolverdiff --git a/postcss.config.mjs b/postcss.config.mjsnew file mode 100644index 00000000..61e36849--- /dev/null+++ b/postcss.config.mjs@@ -0,0 +1,7 @@+const config = {+ plugins: {+ "@tailwindcss/postcss": {},+ },+};++export default config;diff --git a/public/file.svg b/public/file.svgnew file mode 100644index 00000000..004145cd--- /dev/null+++ b/public/file.svg@@ -0,0 +1 @@+<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>\ No newline at end of filediff --git a/public/globe.svg b/public/globe.svgnew file mode 100644index 00000000..567f17b0--- /dev/null+++ b/public/globe.svg@@ -0,0 +1 @@+<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>\ No newline at end of filediff --git a/public/next.svg b/public/next.svgnew file mode 100644index 00000000..5174b28c--- /dev/null+++ b/public/next.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>\ No newline at end of filediff --git a/public/vercel.svg b/public/vercel.svgnew file mode 100644index 00000000..77053960--- /dev/null+++ b/public/vercel.svg@@ -0,0 +1 @@+<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>\ No newline at end of filediff --git a/public/window.svg b/public/window.svgnew file mode 100644index 00000000..b2b2a44f--- /dev/null+++ b/public/window.svg@@ -0,0 +1 @@+<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>\ No newline at end of filediff --git a/src/app/api/agents/route.ts b/src/app/api/agents/route.tsnew file mode 100644index 00000000..72be062e--- /dev/null+++ b/src/app/api/agents/route.ts@@ -0,0 +1,21 @@+import { NextResponse } from "next/server";+import { detectAgents } from "@/lib/agents/detect";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";++export async function GET() {+ try {+ const agents = detectAgents();+ return NextResponse.json({+ agents,+ installedCount: agents.filter((a) => a.available).length,+ platform: process.platform,+ });+ } catch (err) {+ return NextResponse.json(+ { error: err instanceof Error ? err.message : "detection failed" },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/convert/route.ts b/src/app/api/convert/route.tsnew file mode 100644index 00000000..bc3bf1fa--- /dev/null+++ b/src/app/api/convert/route.ts@@ -0,0 +1,155 @@+import { NextRequest } from "next/server";+import { invokeAgent } from "@/lib/agents/invoke";+import { loadSkill } from "@/lib/templates/loader";+import { assemblePrompt } from "@/lib/templates/shared";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";++type Body = {+ agent: string;+ templateId: string;+ content: string;+ format?: string;+ model?: string;+ cwd?: string;+ /** When the task already has a generated HTML, the client sends both the+ * prior HTML and the prior content. The agent is then asked for a+ * minimal-diff edit (preserve design, only change what the content diff+ * implies). Saves output tokens AND prevents creative drift between runs. */+ editFromHtml?: string;+ editFromContent?: string;+};++function buildEditPrompt(args: {+ templateName: string;+ templateAspect: string;+ newContent: string;+ oldContent: string;+ oldHtml: string;+ format: string;+}): string {+ return `你正在执行一次**最小化差异编辑** (diff-edit), 不是从 0 重新生成。++模板风格: ${args.templateName} (${args.templateAspect})+输入格式: ${args.format}++【硬性规则】+1. 仅输出完整的、修改后的 HTML。第一个字符必须是 \`<\`, 最后必须是 \`</html>\`。+2. **不要**用 markdown 围栏包裹, 不要任何解释性文字。+3. 保留原 HTML 的 \`<head>\` (CDN / 字体 / 样式 / meta), 保留所有不需要变化的 DOM 结构 — 字体、配色、布局、栅格、组件结构、动画都不许改。+4. 仅根据 "旧内容 vs 新内容" 的差异, 替换或调整对应的文字 / 数据节点。+5. 如果新内容增加了条目, 沿用原有的卡片 / 行 / slide / 章节结构添加; 如果删除了条目, 移除对应的元素。+6. 如果新旧内容只差几个字, 也只改那几个字 — 不要顺手 "优化" 或 "重排"。+7. 不要捏造数据。新内容里没有的就不要写。++【旧内容】+${args.oldContent}++【新内容】+${args.newContent}++【已有 HTML — 请基于此修改, 输出完整的修改后版本】+${args.oldHtml}+`;+}++export async function POST(req: NextRequest) {+ let body: Body;+ try {+ body = (await req.json()) as Body;+ } catch {+ return new Response("invalid JSON body", { status: 400 });+ }+ const {+ agent,+ templateId,+ content,+ format = "text",+ model,+ cwd,+ editFromHtml,+ editFromContent,+ } = body;+ if (!agent || !templateId || !content) {+ return new Response("missing required fields: agent, templateId, content", {+ status: 400,+ });+ }+ const skill = loadSkill(templateId);+ if (!skill) {+ return new Response(`unknown template: ${templateId}`, { status: 400 });+ }++ let prompt: string;+ if (editFromHtml && editFromContent) {+ prompt = buildEditPrompt({+ templateName: skill.zhName,+ templateAspect: skill.aspectHint,+ newContent: content,+ oldContent: editFromContent,+ oldHtml: editFromHtml,+ format,+ });+ } else {+ prompt = assemblePrompt({ body: skill.body, content, format });+ }+ const abortCtl = new AbortController();+ req.signal?.addEventListener("abort", () => abortCtl.abort(), { once: true });++ const stream = invokeAgent({+ agent,+ prompt,+ model,+ cwd,+ signal: abortCtl.signal,+ });++ const sse = new ReadableStream({+ async start(controller) {+ const enc = new TextEncoder();+ let outClosed = false;+ const send = (event: string, data: unknown) => {+ if (outClosed) return;+ try {+ controller.enqueue(+ enc.encode(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`),+ );+ } catch {+ outClosed = true;+ }+ };++ const reader = stream.getReader();+ try {+ while (true) {+ const { value, done } = await reader.read();+ if (done) break;+ if (!value) continue;+ send(value.type, value);+ }+ } catch (err) {+ send("error", {+ message: err instanceof Error ? err.message : String(err),+ });+ } finally {+ outClosed = true;+ try {+ controller.close();+ } catch {}+ }+ },+ cancel() {+ abortCtl.abort();+ },+ });++ return new Response(sse, {+ headers: {+ "Content-Type": "text/event-stream; charset=utf-8",+ "Cache-Control": "no-cache, no-transform",+ Connection: "keep-alive",+ "X-Accel-Buffering": "no",+ },+ });+}diff --git a/src/app/api/templates/[id]/example/route.ts b/src/app/api/templates/[id]/example/route.tsnew file mode 100644index 00000000..b01dc72e--- /dev/null+++ b/src/app/api/templates/[id]/example/route.ts@@ -0,0 +1,31 @@+import { NextResponse } from "next/server";+import { loadSkill } from "@/lib/templates/loader";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";++type Ctx = { params: Promise<{ id: string }> };++/**+ * Returns the skill's pre-shipped example as a JSON bundle the client can+ * drop straight into `loadSample()` — saves the picker from making two+ * round-trips (one for content, one for HTML) when the user hits "Preview".+ */+export async function GET(_req: Request, ctx: Ctx) {+ const { id } = await ctx.params;+ const skill = loadSkill(id);+ if (!skill || !skill.example) {+ return new Response(`no example for template: ${id}`, { status: 404 });+ }+ return NextResponse.json({+ id: skill.example.id,+ name: skill.example.name,+ templateId: skill.id,+ format: skill.example.format,+ tagline: skill.example.tagline,+ desc: skill.example.desc,+ source: skill.example.source,+ content: skill.exampleMd ?? "",+ html: skill.exampleHtml ?? "",+ });+}diff --git a/src/app/api/templates/[id]/preview/route.ts b/src/app/api/templates/[id]/preview/route.tsnew file mode 100644index 00000000..1b74d846--- /dev/null+++ b/src/app/api/templates/[id]/preview/route.ts@@ -0,0 +1,29 @@+import { loadSkill } from "@/lib/templates/loader";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";++type Ctx = { params: Promise<{ id: string }> };++/**+ * Returns the skill's `example.html` verbatim so it can be loaded into an+ * `<iframe src=…>`. Lets the browser handle caching and avoids shipping every+ * preview HTML through `srcDoc` (which would block the main thread when the+ * gallery renders dozens of thumbnails at once).+ */+export async function GET(_req: Request, ctx: Ctx) {+ const { id } = await ctx.params;+ const skill = loadSkill(id);+ if (!skill || !skill.exampleHtml) {+ return new Response(`no preview for template: ${id}`, { status: 404 });+ }+ return new Response(skill.exampleHtml, {+ headers: {+ "Content-Type": "text/html; charset=utf-8",+ // Aggressive caching is fine — contributors editing a preview can+ // hard-refresh; the response key (skill id) doesn't get reused for+ // different content.+ "Cache-Control": "public, max-age=300",+ },+ });+}diff --git a/src/app/api/templates/route.ts b/src/app/api/templates/route.tsnew file mode 100644index 00000000..78ddda23--- /dev/null+++ b/src/app/api/templates/route.ts@@ -0,0 +1,20 @@+import { NextResponse } from "next/server";+import { listSkills } from "@/lib/templates/loader";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";++export async function GET() {+ const skills = listSkills();+ return NextResponse.json(+ { templates: skills },+ {+ headers: {+ // Browser cache for a few seconds — long enough to dedupe rapid+ // refetches, short enough that a contributor dropping a new skill+ // folder sees it on the next reload without restarting.+ "Cache-Control": "public, max-age=5",+ },+ },+ );+}diff --git a/src/app/favicon.ico b/src/app/favicon.iconew file mode 100644index 00000000..718d6feaBinary files /dev/null and b/src/app/favicon.ico differdiff --git a/src/app/globals.css b/src/app/globals.cssnew file mode 100644index 00000000..242fa9bc--- /dev/null+++ b/src/app/globals.css@@ -0,0 +1,228 @@+@import "tailwindcss";++/* ── open-design palette (editor + landing hybrid) ──────────────── */+:root {+ --paper: #faf9f7;+ --bone: #f7f1de;+ --surface: #ffffff;+ --ink: #15140f;+ --ink-soft: #2a2620;+ --ink-mute: #5a5448;+ --ink-faint: #8b8676;+ --line: rgba(21, 20, 15, 0.16);+ --line-soft: rgba(21, 20, 15, 0.08);+ --line-faint: rgba(21, 20, 15, 0.05);++ --coral: #c96442; /* editor rust */+ --coral-warm: #ed6f5c; /* landing coral */+ --coral-hover: #b25737;+ --coral-soft: rgba(201, 100, 66, 0.12);++ --mustard: #e9b94a;+ --olive: #6e7448;+ --green: #1f7a3a;+ --blue: #2348b8;+ --purple: #6c3aa6;+ --amber: #b26200;+ --red: #9c2a25;++ color-scheme: light;+}++@theme inline {+ --font-sans: var(--font-sans);+ --font-display: var(--font-display);+ --font-serif: var(--font-serif);+ --font-mono: var(--font-mono);+ --color-paper: var(--paper);+ --color-bone: var(--bone);+ --color-ink: var(--ink);+ --color-ink-soft: var(--ink-soft);+ --color-ink-mute: var(--ink-mute);+ --color-ink-faint: var(--ink-faint);+ --color-coral: var(--coral);+ --color-line: var(--line);+}++html, body {+ height: 100%;+ font-family: var(--font-sans), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;+ font-feature-settings: "ss01", "cv11";+ -webkit-font-smoothing: antialiased;+ text-rendering: optimizeLegibility;+}++/* paper grain — open-design's signature */+body::before {+ content: "";+ position: fixed;+ inset: 0;+ pointer-events: none;+ z-index: 0;+ background:+ radial-gradient(circle at 12% 18%, rgba(106, 92, 56, 0.07), transparent 45%),+ radial-gradient(circle at 88% 72%, rgba(106, 92, 56, 0.05), transparent 50%);+}++/* serif italic for accent — open-design hero pattern */+.serif-em {+ font-family: var(--font-serif);+ font-style: italic;+ font-weight: 500;+ color: var(--coral);+}++/* eyebrow label */+.eyebrow {+ font-family: var(--font-sans);+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.22em;+ text-transform: uppercase;+ color: var(--coral);+ position: relative;+ padding-bottom: 4px;+}+.eyebrow::after {+ content: "";+ position: absolute;+ left: 0;+ bottom: 0;+ width: 18px;+ height: 1.5px;+ background: var(--coral);+}++/* pulse dot */+.pulse-dot {+ width: 6px;+ height: 6px;+ border-radius: 999px;+ background: var(--coral);+ display: inline-block;+ animation: od-pulse 2.4s ease-in-out infinite;+}+@keyframes od-pulse {+ 0%, 100% { opacity: 1; }+ 50% { opacity: 0.35; }+}++/* od scrollbar */+::-webkit-scrollbar { width: 10px; height: 10px; }+::-webkit-scrollbar-track { background: transparent; }+::-webkit-scrollbar-thumb { background: var(--line-soft); border-radius: 8px; }+::-webkit-scrollbar-thumb:hover { background: var(--line); }++/* drop-zone hover */+.dropzone-active {+ outline: 2px dashed var(--coral);+ outline-offset: -8px;+ background: var(--coral-soft);+}++/* shimmer */+@keyframes shimmer {+ 0%, 100% { opacity: 1; }+ 50% { opacity: 0.45; }+}+.shimmer { animation: shimmer 1.6s ease-in-out infinite; }++/* fade-in for modal */+@keyframes od-fade-in {+ from { opacity: 0; transform: translateY(6px) scale(0.985); }+ to { opacity: 1; transform: none; }+}+.od-fade-in { animation: od-fade-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1) both; }+@keyframes od-backdrop {+ from { opacity: 0; }+ to { opacity: 1; }+}+.od-backdrop { animation: od-backdrop 0.2s ease-out both; }++/* ── reusable component primitives ─────────────────────────────── */+.btn-primary {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ background: var(--coral);+ color: #fff;+ padding: 10px 20px;+ border-radius: 999px;+ font-size: 13px;+ font-weight: 500;+ border: none;+ cursor: pointer;+ box-shadow: 0 14px 26px -16px rgba(201, 100, 66, 0.85);+ transition: all 0.18s ease;+}+.btn-primary:hover:not(:disabled) {+ background: var(--coral-hover);+ transform: translateY(-1px);+}+.btn-primary:disabled {+ opacity: 0.4;+ cursor: not-allowed;+ box-shadow: none;+}++.btn-ghost {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ background: transparent;+ color: var(--ink);+ padding: 10px 18px;+ border-radius: 999px;+ font-size: 13px;+ font-weight: 500;+ border: 1px solid var(--line);+ cursor: pointer;+ transition: all 0.18s ease;+}+.btn-ghost:hover:not(:disabled) {+ background: var(--line-faint);+ border-color: var(--ink);+}+.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }++.btn-ink {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ background: var(--ink);+ color: var(--paper);+ padding: 10px 20px;+ border-radius: 999px;+ font-size: 13px;+ font-weight: 500;+ border: none;+ cursor: pointer;+ transition: all 0.18s ease;+}+.btn-ink:hover:not(:disabled) { background: var(--ink-soft); transform: translateY(-1px); }+.btn-ink:disabled { opacity: 0.4; cursor: not-allowed; }++.pill {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 6px 12px;+ border-radius: 999px;+ border: 1px solid var(--line);+ background: var(--surface);+ font-size: 12px;+ color: var(--ink-soft);+ font-weight: 500;+}+.pill-active {+ background: var(--ink);+ color: var(--paper);+ border-color: var(--ink);+}++.od-card {+ background: var(--surface);+ border: 1px solid var(--line-soft);+ border-radius: 16px;+ box-shadow: 0 1px 0 var(--line-faint), 0 18px 40px -28px rgba(21, 20, 15, 0.16);+}diff --git a/src/app/layout.tsx b/src/app/layout.tsxnew file mode 100644index 00000000..d723b0b0--- /dev/null+++ b/src/app/layout.tsx@@ -0,0 +1,61 @@+import type { Metadata } from "next";+import { Inter, Inter_Tight, Playfair_Display, JetBrains_Mono } from "next/font/google";+import "./globals.css";++const inter = Inter({+ variable: "--font-sans",+ subsets: ["latin"],+ weight: ["300", "400", "500", "600"],+});++const interTight = Inter_Tight({+ variable: "--font-display",+ subsets: ["latin"],+ weight: ["400", "500", "600", "700", "800", "900"],+});++const playfair = Playfair_Display({+ variable: "--font-serif",+ subsets: ["latin"],+ weight: ["400", "500", "600", "700"],+ style: ["italic", "normal"],+});++const mono = JetBrains_Mono({+ variable: "--font-mono",+ subsets: ["latin"],+ weight: ["400", "500"],+});++export const metadata: Metadata = {+ title: "HTML Anything — turn anything into beautiful HTML, by your local agent",+ description:+ "Turn any document or dataset into beautiful HTML via your local AI agent: decks, resumes, posters, knowledge cards, Hyperframes videos — one click to WeChat / Twitter / Zhihu.",+ metadataBase: new URL("https://html-anything.app"),+ openGraph: {+ title: "HTML Anything",+ description: "Anything → beautiful HTML, powered by your local code agent.",+ type: "website",+ },+};++export default function RootLayout({+ children,+}: Readonly<{+ children: React.ReactNode;+}>) {+ return (+ <html+ lang="en"+ className={`${inter.variable} ${interTight.variable} ${playfair.variable} ${mono.variable} h-full antialiased`}+ suppressHydrationWarning+ >+ <body+ className="min-h-full bg-[var(--paper)] text-[var(--ink)] selection:bg-[var(--coral)]/30"+ suppressHydrationWarning+ >+ {children}+ </body>+ </html>+ );+}diff --git a/src/app/page.tsx b/src/app/page.tsxnew file mode 100644index 00000000..1de356f7--- /dev/null+++ b/src/app/page.tsx@@ -0,0 +1,73 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { Toolbar } from "@/components/toolbar";+import { EditorPane } from "@/components/editor-pane";+import { PreviewPane } from "@/components/preview-pane";+import { TasksSidebar } from "@/components/tasks-sidebar";+import { WelcomeModal } from "@/components/welcome-modal";+import { SettingsModal } from "@/components/settings-modal";+import { useStore } from "@/lib/store";++export default function Home() {+ const iframeRef = useRef<HTMLIFrameElement | null>(null);+ const welcomeAck = useStore((s) => s.welcomeAck);+ const selectedAgent = useStore((s) => s.selectedAgent);+ const locale = useStore((s) => s.locale);+ const layoutMode = useStore((s) => s.layoutMode);+ const [welcomeOpen, setWelcomeOpen] = useState(false);+ const [settingsOpen, setSettingsOpen] = useState(false);+ const [hydrated, setHydrated] = useState(false);++ useEffect(() => {+ setHydrated(true);+ }, []);++ // Keep <html lang="…"> in sync with the user's locale so screen readers+ // and browser features (autotranslate, hyphenation) pick the right language.+ useEffect(() => {+ if (typeof document !== "undefined") {+ document.documentElement.setAttribute("lang", locale);+ }+ }, [locale]);++ useEffect(() => {+ if (!hydrated) return;+ if (!welcomeAck || !selectedAgent) setWelcomeOpen(true);+ }, [hydrated, welcomeAck, selectedAgent]);++ return (+ <main className="relative flex h-screen flex-col">+ <Toolbar+ iframeRef={iframeRef}+ onOpenAgentPicker={() => setSettingsOpen(true)}+ onOpenSettings={() => setSettingsOpen(true)}+ />+ <div+ className="flex flex-1 min-h-0"+ style={{ borderTop: "1px solid var(--line-faint)" }}+ >+ <TasksSidebar />+ {layoutMode !== "preview" && (+ <section+ className="flex min-w-0 flex-1 basis-0 flex-col"+ style={+ layoutMode === "split"+ ? { borderRight: "1px solid var(--line-faint)" }+ : undefined+ }+ >+ <EditorPane />+ </section>+ )}+ {layoutMode !== "editor" && (+ <section className="flex min-w-0 flex-1 basis-0 flex-col">+ <PreviewPane iframeRef={iframeRef} />+ </section>+ )}+ </div>+ {welcomeOpen && <WelcomeModal onClose={() => setWelcomeOpen(false)} />}+ {settingsOpen && <SettingsModal onClose={() => setSettingsOpen(false)} />}+ </main>+ );+}diff --git a/src/components/deck-viewer.tsx b/src/components/deck-viewer.tsxnew file mode 100644index 00000000..51006f34--- /dev/null+++ b/src/components/deck-viewer.tsx@@ -0,0 +1,295 @@+"use client";++import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { parseDeck, type DeckSlide } from "@/lib/deck";+import { useT } from "@/lib/i18n";++type Props = {+ html: string;+ /** When `true`, the deck viewer is the visible tab — it can grab keyboard events. */+ active: boolean;+ /** Bubble out the latest main-slide iframe so screenshot/export can target it. */+ onMainIframe?: (el: HTMLIFrameElement | null) => void;+ /** Bubble out the parsed slides so the export menu can iterate them. */+ onSlides?: (slides: DeckSlide[]) => void;+};++export function DeckViewer({ html, active, onMainIframe, onSlides }: Props) {+ const t = useT();+ const parsed = useMemo(() => parseDeck(html), [html]);+ const slides = parsed.slides;+ const [index, setIndex] = useState(0);+ const [showNotes, setShowNotes] = useState(false);+ const wrapRef = useRef<HTMLDivElement | null>(null);+ const mainIframeRef = useRef<HTMLIFrameElement | null>(null);+ const [isFullscreen, setIsFullscreen] = useState(false);++ // Keep index in range when the deck shrinks (e.g. live re-render).+ useEffect(() => {+ if (index >= slides.length) setIndex(Math.max(0, slides.length - 1));+ }, [slides.length, index]);++ // Bubble the parsed slides up so the export menu can use them.+ useEffect(() => {+ onSlides?.(slides);+ }, [slides, onSlides]);++ // Bubble main iframe up so screenshot can re-use the existing helpers.+ useEffect(() => {+ onMainIframe?.(mainIframeRef.current);+ });++ const next = useCallback(() => setIndex((i) => Math.min(slides.length - 1, i + 1)), [slides.length]);+ const prev = useCallback(() => setIndex((i) => Math.max(0, i - 1)), []);++ // Keyboard nav (only when this tab is the active one — otherwise the+ // editor textarea would steal arrow keys, but we only listen for ←/→ on the+ // wrapper and on document while in fullscreen).+ useEffect(() => {+ if (!active) return;+ const onKey = (e: KeyboardEvent) => {+ if (e.target instanceof HTMLElement) {+ const tag = e.target.tagName;+ if (tag === "INPUT" || tag === "TEXTAREA" || e.target.isContentEditable) return;+ }+ if (e.key === "ArrowRight" || e.key === "PageDown" || e.key === " ") { e.preventDefault(); next(); }+ else if (e.key === "ArrowLeft" || e.key === "PageUp") { e.preventDefault(); prev(); }+ else if (e.key === "Home") { e.preventDefault(); setIndex(0); }+ else if (e.key === "End") { e.preventDefault(); setIndex(slides.length - 1); }+ else if (e.key === "f" || e.key === "F") { e.preventDefault(); enterFullscreen(); }+ else if (e.key === "n" || e.key === "N") { e.preventDefault(); setShowNotes((v) => !v); }+ };+ window.addEventListener("keydown", onKey);+ return () => window.removeEventListener("keydown", onKey);+ }, [active, next, prev, slides.length]);++ // Track browser-level fullscreen state.+ useEffect(() => {+ const onFs = () => setIsFullscreen(document.fullscreenElement === wrapRef.current);+ document.addEventListener("fullscreenchange", onFs);+ return () => document.removeEventListener("fullscreenchange", onFs);+ }, []);++ const enterFullscreen = useCallback(() => {+ const el = wrapRef.current;+ if (!el) return;+ if (document.fullscreenElement === el) {+ document.exitFullscreen?.();+ } else {+ el.requestFullscreen?.().catch(() => {});+ }+ }, []);++ if (slides.length === 0) {+ return (+ <div className="grid h-full place-items-center text-[13px] text-[var(--ink-mute)]">+ {t("deck.empty")}+ </div>+ );+ }++ const current = slides[index];++ return (+ <div+ ref={wrapRef}+ className="relative flex h-full w-full flex-col"+ style={{ background: isFullscreen ? "#0a0a0a" : "var(--paper)" }}+ >+ {/* main slide canvas */}+ <div className="relative flex-1 overflow-hidden">+ <iframe+ key={current.id /* force-reload between slides for clean keyboard focus */}+ ref={mainIframeRef}+ title={`slide-${current.id}`}+ srcDoc={current.html}+ sandbox="allow-scripts allow-same-origin"+ className="h-full w-full"+ style={{ background: current.bg ?? "#fff", border: "0" }}+ />++ {/* floating prev/next arrows */}+ {slides.length > 1 && (+ <>+ <button+ onClick={prev}+ disabled={index === 0}+ aria-label={t("deck.prev")}+ className="absolute left-3 top-1/2 -translate-y-1/2 grid h-10 w-10 place-items-center rounded-full text-[18px] disabled:opacity-30 transition-opacity"+ style={{+ background: isFullscreen ? "rgba(255,255,255,0.10)" : "var(--surface)",+ color: isFullscreen ? "#fff" : "var(--ink)",+ border: isFullscreen ? "1px solid rgba(255,255,255,0.18)" : "1px solid var(--line)",+ boxShadow: isFullscreen ? "none" : "0 4px 14px -4px rgba(0,0,0,0.18)",+ }}+ >+ ‹+ </button>+ <button+ onClick={next}+ disabled={index === slides.length - 1}+ aria-label={t("deck.next")}+ className="absolute right-3 top-1/2 -translate-y-1/2 grid h-10 w-10 place-items-center rounded-full text-[18px] disabled:opacity-30 transition-opacity"+ style={{+ background: isFullscreen ? "rgba(255,255,255,0.10)" : "var(--surface)",+ color: isFullscreen ? "#fff" : "var(--ink)",+ border: isFullscreen ? "1px solid rgba(255,255,255,0.18)" : "1px solid var(--line)",+ boxShadow: isFullscreen ? "none" : "0 4px 14px -4px rgba(0,0,0,0.18)",+ }}+ >+ ›+ </button>+ </>+ )}++ {/* top-right toolbar — Present + Notes */}+ <div className="absolute right-3 top-3 flex items-center gap-1.5">+ {current.notes && (+ <button+ onClick={() => setShowNotes((v) => !v)}+ className="rounded-full px-3 py-1.5 text-[11px] font-medium"+ style={{+ background: showNotes+ ? "var(--ink)"+ : isFullscreen ? "rgba(255,255,255,0.10)" : "var(--surface)",+ color: showNotes+ ? "var(--paper)"+ : isFullscreen ? "#fff" : "var(--ink)",+ border: isFullscreen+ ? "1px solid rgba(255,255,255,0.18)"+ : "1px solid var(--line)",+ }}+ title={t("deck.notesTooltip")}+ >+ {t("deck.notes")} <span className="opacity-60">N</span>+ </button>+ )}+ <button+ onClick={enterFullscreen}+ className="rounded-full px-3 py-1.5 text-[11px] font-medium"+ style={{+ background: isFullscreen ? "rgba(255,255,255,0.10)" : "var(--ink)",+ color: isFullscreen ? "#fff" : "var(--paper)",+ border: isFullscreen ? "1px solid rgba(255,255,255,0.18)" : "1px solid var(--ink)",+ }}+ title={t("deck.presentTooltip")}+ >+ {isFullscreen ? t("deck.exitPresent") : t("deck.present")}+ <span className="ml-1 opacity-60">F</span>+ </button>+ </div>++ {/* page count badge — bottom-right of canvas */}+ <div+ className="absolute bottom-3 right-3 rounded-full px-3 py-1 text-[11px] font-medium tabular-nums"+ style={{+ background: isFullscreen ? "rgba(255,255,255,0.12)" : "var(--surface)",+ color: isFullscreen ? "#fff" : "var(--ink-soft)",+ border: isFullscreen ? "1px solid rgba(255,255,255,0.18)" : "1px solid var(--line)",+ fontFamily: "var(--font-mono)",+ }}+ >+ {index + 1} / {slides.length}+ </div>++ {/* speaker notes overlay */}+ {showNotes && current.notes && (+ <div+ className="absolute inset-x-3 bottom-14 max-h-[40%] overflow-auto rounded-2xl p-4 text-[13px] leading-relaxed"+ style={{+ background: isFullscreen ? "rgba(20,20,20,0.92)" : "var(--surface)",+ color: isFullscreen ? "#f5f5f5" : "var(--ink)",+ border: isFullscreen ? "1px solid rgba(255,255,255,0.10)" : "1px solid var(--line)",+ backdropFilter: "blur(14px)",+ boxShadow: "0 24px 60px -20px rgba(0,0,0,0.40)",+ }}+ >+ <div+ className="mb-2 text-[10px] uppercase tracking-[0.18em]"+ style={{ color: isFullscreen ? "rgba(255,255,255,0.55)" : "var(--ink-faint)" }}+ >+ {t("deck.notes")} · {t("deck.slideN", { n: index + 1, m: slides.length })}+ </div>+ <p className="whitespace-pre-wrap">{current.notes}</p>+ </div>+ )}+ </div>++ {/* thumbnail strip */}+ {!isFullscreen && (+ <ThumbStrip+ slides={slides}+ activeIndex={index}+ onPick={setIndex}+ />+ )}+ </div>+ );+}++function ThumbStrip({+ slides,+ activeIndex,+ onPick,+}: {+ slides: DeckSlide[];+ activeIndex: number;+ onPick: (i: number) => void;+}) {+ // Each thumb is a 200×112 (16:9) iframe scaled down — heavy if there are+ // many slides, so we render at most ~80; users with bigger decks scroll.+ return (+ <div+ className="flex gap-2 overflow-x-auto px-3 py-3"+ style={{ borderTop: "1px solid var(--line-faint)", background: "var(--surface)" }}+ >+ {slides.map((s, i) => {+ const active = i === activeIndex;+ return (+ <button+ key={s.id + ":" + i}+ onClick={() => onPick(i)}+ className="relative shrink-0 overflow-hidden rounded-lg transition-all"+ style={{+ width: 168,+ height: 96,+ background: s.bg ?? "#fff",+ border: active ? "2px solid var(--ink)" : "1px solid var(--line)",+ boxShadow: active ? "0 6px 18px -8px rgba(21,20,15,0.28)" : "none",+ }}+ title={`Slide ${i + 1}`}+ >+ <iframe+ title={`thumb-${s.id}`}+ srcDoc={s.html}+ sandbox="allow-same-origin"+ scrolling="no"+ tabIndex={-1}+ aria-hidden="true"+ style={{+ pointerEvents: "none",+ // Render at slide native width then visually shrink — avoids+ // the iframe trying to mobile-reflow Tailwind utility text.+ width: 1920,+ height: 1080,+ border: 0,+ transform: `scale(${168 / 1920})`,+ transformOrigin: "top left",+ }}+ />+ <span+ className="absolute bottom-1 left-1 rounded px-1.5 py-0.5 text-[9px] tabular-nums"+ style={{+ background: "rgba(0,0,0,0.55)",+ color: "#fff",+ fontFamily: "var(--font-mono)",+ }}+ >+ {i + 1}+ </span>+ </button>+ );+ })}+ </div>+ );+}diff --git a/src/components/drafts-menu.tsx b/src/components/drafts-menu.tsxnew file mode 100644index 00000000..d96c42b1--- /dev/null+++ b/src/components/drafts-menu.tsx@@ -0,0 +1,120 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { listDrafts, deleteDraft, type Draft } from "@/lib/drafts";+import { relativeTime } from "@/lib/use-autosave";+import { useStore } from "@/lib/store";+import { useT } from "@/lib/i18n";++export function DraftsMenu() {+ const [open, setOpen] = useState(false);+ const [drafts, setDrafts] = useState<Draft[]>([]);+ const ref = useRef<HTMLDivElement>(null);+ const setContent = useStore((s) => s.setContent);+ const setFormat = useStore((s) => s.setFormat);+ const setFilename = useStore((s) => s.setFilename);+ const pushLog = useStore((s) => s.pushLog);+ const t = useT();++ const refresh = () => setDrafts(listDrafts());++ useEffect(() => {+ if (open) refresh();+ }, [open]);++ useEffect(() => {+ const handler = (e: MouseEvent) => {+ if (open && ref.current && !ref.current.contains(e.target as Node)) {+ setOpen(false);+ }+ };+ document.addEventListener("mousedown", handler);+ return () => document.removeEventListener("mousedown", handler);+ }, [open]);++ const restore = (d: Draft) => {+ if (!confirm(t("drafts.restoreConfirm", { when: relativeTime(d.ts) }))) return;+ setContent(d.content);+ setFormat(d.format);+ setFilename(d.filename);+ pushLog({+ kind: "info",+ text: t("drafts.restoredLog", { when: relativeTime(d.ts), n: d.bytes.toLocaleString() }),+ });+ setOpen(false);+ };++ const remove = (e: React.MouseEvent, ts: number) => {+ e.stopPropagation();+ deleteDraft(ts);+ refresh();+ };++ return (+ <div className="relative shrink-0" ref={ref}>+ <button+ onClick={() => setOpen((o) => !o)}+ className="whitespace-nowrap text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)] hover:text-[var(--ink)] transition-colors px-1.5 py-0.5"+ title={t("drafts.tooltip")}+ >+ {t("drafts.button")}+ </button>+ {open && (+ <div+ className="absolute right-0 top-full mt-1.5 z-30 w-[360px] od-fade-in overflow-hidden rounded-2xl"+ style={{+ background: "var(--surface)",+ border: "1px solid var(--line-soft)",+ boxShadow: "0 30px 60px -20px rgba(21, 20, 15, 0.25)",+ }}+ >+ <div+ className="px-4 pt-3 pb-2 text-[10px] uppercase tracking-[0.18em] text-[var(--ink-faint)] flex items-center justify-between"+ style={{ borderBottom: "1px solid var(--line-faint)" }}+ >+ <span>{t("drafts.heading")}</span>+ <span className="font-mono text-[var(--ink-mute)] normal-case tracking-normal">+ {t("drafts.count", { n: drafts.length })}+ </span>+ </div>+ {drafts.length === 0 ? (+ <div className="px-4 py-6 text-center text-[12px] text-[var(--ink-mute)]">+ {t("drafts.empty.title")}+ <div className="text-[11px] text-[var(--ink-faint)] mt-1">{t("drafts.empty.hint")}</div>+ </div>+ ) : (+ <div className="max-h-[60vh] overflow-y-auto p-1.5">+ {drafts.map((d) => (+ <button+ key={d.ts}+ onClick={() => restore(d)}+ className="group w-full flex items-start gap-3 rounded-xl px-3 py-2 text-left hover:bg-[var(--paper)]"+ >+ <div className="min-w-0 flex-1">+ <div className="flex items-center gap-2 text-[12px]">+ <span className="font-medium text-[var(--ink)]">{relativeTime(d.ts)}</span>+ <span className="text-[10px] text-[var(--ink-faint)]">·</span>+ <span className="text-[10.5px] font-mono text-[var(--ink-mute)]">+ {d.format} · {t("drafts.chars", { n: d.bytes.toLocaleString() })}+ </span>+ </div>+ <div className="text-[11px] text-[var(--ink-mute)] mt-0.5 line-clamp-1">+ {d.preview || t("drafts.emptyPreview")}+ </div>+ </div>+ <span+ onClick={(e) => remove(e, d.ts)}+ className="opacity-0 group-hover:opacity-60 hover:!opacity-100 text-[var(--ink-faint)] hover:text-[var(--red)] transition-opacity text-xs px-1"+ title={t("drafts.delete")}+ >+ ✕+ </span>+ </button>+ ))}+ </div>+ )}+ </div>+ )}+ </div>+ );+}diff --git a/src/components/editor-pane.tsx b/src/components/editor-pane.tsxnew file mode 100644index 00000000..ffdf84fd--- /dev/null+++ b/src/components/editor-pane.tsx@@ -0,0 +1,177 @@+"use client";++import { useState, useMemo, useEffect } from "react";+import { useStore, selectActiveTask, usePersistHydrated } from "@/lib/store";+import { detectFormat } from "@/lib/parsers/auto";+import { useAutosave, relativeTime } from "@/lib/use-autosave";+import { downloadMarkdown } from "@/lib/export/download";+import { useT, type DictKey } from "@/lib/i18n";+import { UploadDropzone } from "./upload-dropzone";+import { DraftsMenu } from "./drafts-menu";+import { SamplesGallery } from "./samples-gallery";+import { FormatsGallery } from "./formats-gallery";++const TAB_KEY: Record<"text" | "upload" | "formats" | "samples", DictKey> = {+ text: "editor.tab.text",+ upload: "editor.tab.upload",+ formats: "editor.tab.formats",+ samples: "editor.tab.samples",+};++export function EditorPane() {+ const [tab, setTab] = useState<"text" | "upload" | "formats" | "samples">("text");+ const hydrated = usePersistHydrated();+ const content = useStore((s) => selectActiveTask(s)?.content ?? "");+ const setContent = useStore((s) => s.setContent);+ const format = useStore((s) => selectActiveTask(s)?.format ?? "text");+ const setFormat = useStore((s) => s.setFormat);+ const filename = useStore((s) => selectActiveTask(s)?.filename);+ const setFilename = useStore((s) => s.setFilename);+ const { status: saveStatus, savedAt } = useAutosave();+ const t = useT();++ const detected = useMemo(() => detectFormat(content), [content]);++ const hasContent = content.length > 0;++ return (+ <div className="flex h-full flex-col" style={{ background: "var(--surface)" }}>+ <div+ className="flex flex-col gap-1.5 px-4 py-2 text-sm"+ style={{ borderBottom: "1px solid var(--line-faint)" }}+ >+ <div className="flex items-center justify-between gap-3">+ <div className="flex shrink-0 gap-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">+ {(["text", "upload", "formats", "samples"] as const).map((id) => (+ <button+ key={id}+ onClick={() => setTab(id)}+ className={+ (tab === id ? "pill pill-active" : "pill") + " whitespace-nowrap"+ }+ style={tab === id ? undefined : { background: "transparent", border: "1px solid transparent" }}+ >+ {t(TAB_KEY[id])}+ </button>+ ))}+ </div>+ {hasContent && (+ <SaveIndicator status={saveStatus} savedAt={savedAt} hasContent={hasContent} />+ )}+ </div>++ {hasContent && (+ <div className="flex flex-wrap items-center justify-end gap-x-2.5 gap-y-1 whitespace-nowrap text-[11px] text-[var(--ink-faint)]">+ <button+ onClick={() => downloadMarkdown(content, filename?.replace(/\.[^.]+$/, "") || "draft")}+ className="shrink-0 whitespace-nowrap text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)] hover:text-[var(--ink)] transition-colors"+ title={t("editor.backupTooltip")}+ >+ {t("editor.backup")}+ </button>+ <DraftsMenu />+ <span className="shrink-0 opacity-40">|</span>+ {filename && (+ <span+ className="max-w-[160px] shrink-0 truncate rounded-md px-1.5 py-0.5 font-mono"+ style={{ background: "var(--paper)", color: "var(--ink-soft)" }}+ title={filename}+ >+ {filename}+ </span>+ )}+ <span className="shrink-0 whitespace-nowrap">+ <code className="font-mono text-[var(--ink-soft)]">{format || detected}</code>+ <span className="mx-1 opacity-40">·</span>+ {t("editor.chars", { n: content.length.toLocaleString() })}+ </span>+ </div>+ )}+ </div>++ <div className="relative flex-1 overflow-hidden">+ {tab === "text" && (+ <>+ {!hydrated && (+ <div className="absolute inset-0 flex items-center justify-center pointer-events-none z-10">+ <div className="text-[11px] text-[var(--ink-faint)]">{t("editor.restoring")}</div>+ </div>+ )}+ <textarea+ value={hydrated ? content : ""}+ onChange={(e) => {+ if (!hydrated) return;+ setContent(e.target.value);+ setFilename(undefined);+ const fmt = detectFormat(e.target.value);+ if (fmt !== format) setFormat(fmt);+ }}+ placeholder={t("editor.placeholder")}+ className="block h-full w-full resize-none border-0 bg-transparent p-5 font-[family-name:var(--font-mono)] text-[13px] leading-relaxed text-[var(--ink)] outline-none placeholder:text-[var(--ink-faint)]"+ spellCheck={false}+ disabled={!hydrated}+ />+ </>+ )}+ {tab === "upload" && (+ <div className="h-full p-4">+ <UploadDropzone />+ </div>+ )}+ {tab === "formats" && (+ <FormatsGallery onLoaded={() => setTab("text")} />+ )}+ {tab === "samples" && (+ <SamplesGallery onLoaded={() => setTab("text")} />+ )}+ </div>+ </div>+ );+}++function SaveIndicator({+ status,+ savedAt,+ hasContent,+}: {+ status: "idle" | "saving" | "saved" | "error";+ savedAt: number | null;+ hasContent: boolean;+}) {+ const t = useT();+ // re-render every ~15s so "saved Xs ago" stays current+ const [, setTick] = useState(0);+ useEffect(() => {+ if (!hasContent) return;+ const id = setInterval(() => setTick((n) => n + 1), 15_000);+ return () => clearInterval(id);+ }, [hasContent]);++ if (!hasContent) return null;++ if (status === "saving") {+ return (+ <span className="inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[var(--coral)] shimmer">+ <span className="w-1.5 h-1.5 rounded-full bg-[var(--coral)]" />+ {t("editor.saving")}+ </span>+ );+ }+ if (status === "error") {+ return (+ <span className="inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[var(--red)]">+ {t("editor.saveFailed")}+ </span>+ );+ }+ return (+ <span+ className="inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[var(--green)]"+ title={t("editor.autosaveTooltip")}+ >+ <span className="w-1.5 h-1.5 rounded-full bg-[var(--green)]" />+ {t("editor.autosaved")}+ {savedAt && <span className="text-[var(--ink-faint)] tabular-nums">· {relativeTime(savedAt)}</span>}+ </span>+ );+}diff --git a/src/components/export-menu.tsx b/src/components/export-menu.tsxnew file mode 100644index 00000000..98a5fb0c--- /dev/null+++ b/src/components/export-menu.tsx@@ -0,0 +1,183 @@+"use client";++import { useMemo, useState, useRef, useEffect } from "react";+import { useStore, selectActiveTask } from "@/lib/store";+import { useT } from "@/lib/i18n";+import { copyToWechat } from "@/lib/export/wechat";+import { copyToZhihu } from "@/lib/export/zhihu";+import { copyHtml, copyText } from "@/lib/export/clipboard";+import {+ copyIframeToClipboard,+ downloadIframeAsImage,+} from "@/lib/export/image";+import { downloadHtml } from "@/lib/export/download";+import { extractHtml } from "@/lib/extract-html";+import { parseDeck } from "@/lib/deck";+import {+ exportDeckPngZip,+ exportDeckPptx,+ exportDeckPrint,+} from "@/lib/export/deck";++type ExportMenuProps = {+ iframeRef: React.MutableRefObject<HTMLIFrameElement | null>;+};++export function ExportMenu({ iframeRef }: ExportMenuProps) {+ const html = useStore((s) => selectActiveTask(s)?.html ?? "");+ const [open, setOpen] = useState(false);+ const [busy, setBusy] = useState(false);+ const [toast, setToast] = useState<string | null>(null);+ const ref = useRef<HTMLDivElement>(null);+ const t = useT();++ useEffect(() => {+ const handler = (e: MouseEvent) => {+ if (open && ref.current && !ref.current.contains(e.target as Node)) {+ setOpen(false);+ }+ };+ document.addEventListener("mousedown", handler);+ return () => document.removeEventListener("mousedown", handler);+ }, [open]);++ const showToast = (msg: string) => {+ setToast(msg);+ setTimeout(() => setToast(null), 2200);+ };++ const wrap =+ (label: string, fn: () => Promise<void>) =>+ async () => {+ setBusy(true);+ try {+ await fn();+ showToast(`✓ ${label}`);+ } catch (e) {+ showToast(`✗ ${e instanceof Error ? e.message : t("export.error.generic")}`);+ } finally {+ setBusy(false);+ setOpen(false);+ }+ };++ const cleanHtml = () => extractHtml(html);+ // Re-parse for the deck section. Cheap because parseDeck is regex-only and+ // the menu only opens on user click.+ const deck = useMemo(() => parseDeck(extractHtml(html)), [html]);++ const sections: Array<{+ title: string;+ actions: Array<{ id: string; label: string; emoji: string; fn: () => Promise<void> }>;+ }> = [+ {+ title: t("export.section.platform"),+ actions: [+ { id: "wechat", label: t("export.action.wechat"), emoji: "💬", fn: wrap(t("export.toast.wechat"), async () => { await copyToWechat(cleanHtml()); }) },+ { id: "zhihu", label: t("export.action.zhihu"), emoji: "🦓", fn: wrap(t("export.toast.zhihu"), async () => { await copyToZhihu(cleanHtml()); }) },+ { id: "twitter-img", label: t("export.action.twitterImg"), emoji: "🐦", fn: wrap(t("export.toast.image"), async () => {+ if (!iframeRef.current) throw new Error(t("export.error.previewNotReady")); await copyIframeToClipboard(iframeRef.current);+ }) },+ ],+ },+ {+ title: t("export.section.raw"),+ actions: [+ { id: "html", label: t("export.action.html"), emoji: "</>", fn: wrap(t("export.toast.html"), async () => { await copyHtml(cleanHtml()); }) },+ { id: "text", label: t("export.action.text"), emoji: "📝", fn: wrap(t("export.toast.text"), async () => {+ const tmp = document.createElement("div"); tmp.innerHTML = cleanHtml(); await copyText(tmp.textContent ?? "");+ }) },+ ],+ },+ {+ title: t("export.section.download"),+ actions: [+ { id: "download-html", label: t("export.action.downloadHtml"), emoji: "💾", fn: wrap(t("export.toast.htmlSaved"), async () => { downloadHtml(cleanHtml()); }) },+ { id: "download-png", label: t("export.action.downloadPng"), emoji: "🖼️", fn: wrap(t("export.toast.imgSaved"), async () => {+ if (!iframeRef.current) throw new Error(t("export.error.previewNotReady")); await downloadIframeAsImage(iframeRef.current);+ }) },+ ],+ },+ ...(deck.isDeck+ ? [+ {+ title: t("export.section.deck", { n: deck.slides.length }),+ actions: [+ {+ id: "deck-pdf",+ label: t("export.action.deckPdf"),+ emoji: "📄",+ fn: wrap(t("export.toast.deckPdf"), async () => {+ exportDeckPrint(deck.slides, deck.title);+ }),+ },+ {+ id: "deck-png-zip",+ label: t("export.action.deckPngZip"),+ emoji: "🗂️",+ fn: wrap(t("export.toast.deckPngZip"), async () => {+ await exportDeckPngZip(deck.slides, deck.title);+ }),+ },+ {+ id: "deck-pptx",+ label: t("export.action.deckPptx"),+ emoji: "🎬",+ fn: wrap(t("export.toast.deckPptx"), async () => {+ await exportDeckPptx(deck.slides, deck.title);+ }),+ },+ ],+ },+ ]+ : []),+ ];++ const disabled = !html || busy;++ return (+ <div className="relative" ref={ref}>+ <button onClick={() => setOpen((o) => !o)} disabled={disabled} className="btn-ink">+ {t("export.button")}+ </button>+ {open && (+ <div+ className="absolute right-0 z-30 mt-2 w-72 od-fade-in overflow-hidden rounded-2xl"+ style={{+ background: "var(--surface)",+ border: "1px solid var(--line-soft)",+ boxShadow: "0 30px 60px -20px rgba(21, 20, 15, 0.25)",+ }}+ >+ {sections.map((sec, sIdx) => (+ <div key={sec.title} style={sIdx ? { borderTop: "1px solid var(--line-faint)" } : undefined}>+ <div className="px-4 pt-3 pb-1.5 text-[10px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ {sec.title}+ </div>+ <div className="px-1 pb-1">+ {sec.actions.map((a) => (+ <button+ key={a.id}+ onClick={a.fn}+ className="flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-[13px] hover:bg-[var(--paper)]"+ >+ <span className="w-6 text-center">{a.emoji}</span>+ <span className="text-[var(--ink-soft)]">{a.label}</span>+ </button>+ ))}+ </div>+ </div>+ ))}+ </div>+ )}+ {toast && (+ <div+ className="fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-full px-4 py-2 text-sm shadow-lg od-fade-in"+ style={{ background: "var(--ink)", color: "var(--paper)" }}+ >+ {toast}+ </div>+ )}+ </div>+ );+}diff --git a/src/components/formats-gallery.tsx b/src/components/formats-gallery.tsxnew file mode 100644index 00000000..6e89e4b6--- /dev/null+++ b/src/components/formats-gallery.tsx@@ -0,0 +1,501 @@+"use client";++import { useMemo, useState } from "react";+import { useStore } from "@/lib/store";+import { useT } from "@/lib/i18n";++/**+ * Format gallery — content-format snippets the user can one-click load into+ * the editor. Different from `samples-gallery.tsx` (which ships fully+ * pre-rendered HTML samples tied to specific skills): here every card is a+ * tiny example of an *input* shape (.md / .csv / .json / .sql / .yaml /+ * image, …). After loading, the template picker in the top toolbar decides+ * the *output* shape.+ */++type FormatKind = "text" | "data" | "code" | "image";++type FormatExample = {+ id: string;+ ext: string;+ label: string;+ icon: string;+ /** which group chip surfaces it (and tints the card) */+ kind: FormatKind;+ /** short human description shown under the title */+ description: string;+ /** stored as task.format (matches `DetectedFormat`) */+ format: string;+ /** stored as task.filename */+ filename: string;+ /** content pasted into the textarea */+ content: string;+};++// Tiny inline SVG → data URL helper. Kept inline so the gallery has no extra+// network deps; an SVG is fine for image-format demos because the file+// pipeline only cares that the upload becomes ``.+function svgDataUrl(svg: string): string {+ return `data:image/svg+xml;base64,${typeof window === "undefined" ? Buffer.from(svg).toString("base64") : btoa(unescape(encodeURIComponent(svg)))}`;+}++const PHOTO_PLACEHOLDER_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="640" height="400" viewBox="0 0 640 400"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#f4a259"/><stop offset="1" stop-color="#c96442"/></linearGradient></defs><rect width="640" height="400" fill="url(#g)"/><g fill="#fff" font-family="-apple-system, Helvetica, Arial" text-anchor="middle"><text x="320" y="190" font-size="40" font-weight="700">PNG sample</text><text x="320" y="234" font-size="18" opacity="0.85">640 × 400 · placeholder photo</text></g><circle cx="500" cy="100" r="40" fill="#fff" opacity="0.9"/></svg>`;++const CHART_PLACEHOLDER_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="600" height="360" viewBox="0 0 600 360"><rect width="600" height="360" fill="#faf9f7"/><g fill="#15140f"><text x="36" y="48" font-size="20" font-weight="700" font-family="-apple-system, Helvetica, Arial">Sales by quarter</text></g><g fill="#c96442"><rect x="80" y="140" width="60" height="170"/><rect x="180" y="100" width="60" height="210"/><rect x="280" y="120" width="60" height="190"/><rect x="380" y="60" width="60" height="250"/><rect x="480" y="40" width="60" height="270"/></g><g fill="#8b8676" font-size="12" font-family="-apple-system, Helvetica, Arial" text-anchor="middle"><text x="110" y="330">Q1</text><text x="210" y="330">Q2</text><text x="310" y="330">Q3</text><text x="410" y="330">Q4 (proj)</text><text x="510" y="330">FY27</text></g></svg>`;++const EXAMPLES: FormatExample[] = [+ {+ id: "md-article",+ ext: ".md",+ label: "Markdown",+ icon: "📝",+ kind: "text",+ description: "Headings, lists, tables, quotes — the default doc shape.",+ format: "markdown",+ filename: "quarterly-review.md",+ content: `# Quarterly Review · Q3 2026++> A short note on what shipped this quarter and what's next.++## Highlights+- **Revenue** grew 23% QoQ+- 4 new enterprise logos closed+- Deploy time: 12 min → 4 min++## Numbers++| Metric | Q2 | Q3 | Δ |+| ------ | --- | ---- | ----- |+| MRR | $84k | $103k | +23% |+| Churn | 4.1% | 3.2% | -0.9pp |+| NPS | 41 | 48 | +7 |++## What's next+1. Hire two senior engineers+2. Ship the v2 API+3. Open a Tokyo office++\`\`\`bash+$ npm run deploy --target=tokyo+\`\`\`++[Read the full report →](https://example.com)+`,+ },+ {+ id: "txt-note",+ ext: ".txt",+ label: "Plain text",+ icon: "🗒️",+ kind: "text",+ description: "Raw narrative — paste a draft and let the template style it.",+ format: "text",+ filename: "memo.txt",+ content: `Subject: A note on shipping cadence++Team,++The last two weeks taught us that small, frequent releases beat one big drop.+We cut a hotfix in 12 minutes on Tuesday and nobody noticed — that's the goal.++Three things going forward:+First, we ship behind flags. Always.+Second, no green deploy past 4 pm on Fridays. The on-call should sleep.+Third, every release notes file ends with one customer-visible sentence.++If anything blocks you on this, ping me directly.++— Sam+`,+ },+ {+ id: "csv-people",+ ext: ".csv",+ label: "CSV",+ icon: "📊",+ kind: "data",+ description: "Comma-separated rows — agents render this as styled tables.",+ format: "csv",+ filename: "team.csv",+ content: `name,role,city,joined,salary+Alice Chen,Engineer,Shanghai,2021-04-12,180000+Bob Park,Designer,Seoul,2020-11-03,150000+Carla Ruiz,PM,Madrid,2022-08-21,165000+Daniel Wu,Engineer,Taipei,2023-02-14,175000+Elena Costa,Researcher,Milan,2021-09-30,170000+Felix Oduya,Engineer,Nairobi,2024-01-08,160000+`,+ },+ {+ id: "tsv-metrics",+ ext: ".tsv",+ label: "TSV",+ icon: "📈",+ kind: "data",+ description: "Tab-separated — what you get pasting from Excel / Sheets.",+ format: "tsv",+ filename: "weekly-metrics.tsv",+ content: `week\tsignups\tactivations\tretained_d7\trevenue_usd+2026-W14\t842\t611\t418\t12480+2026-W15\t903\t672\t461\t13720+2026-W16\t1124\t831\t579\t16950+2026-W17\t987\t714\t503\t14280+2026-W18\t1208\t912\t648\t18410+`,+ },+ {+ id: "xlsx-multisheet",+ ext: ".xlsx",+ label: "Excel",+ icon: "🧮",+ kind: "data",+ description: "Multi-sheet workbook — flattened to CSV blocks per sheet.",+ format: "csv",+ filename: "fy26-plan.xlsx",+ content: `# Sheet: Sales+month,product,units,revenue_usd+2026-01,Pro plan,142,28400+2026-02,Pro plan,168,33600+2026-03,Pro plan,201,40200+2026-01,Team plan,38,19000+2026-02,Team plan,44,22000+2026-03,Team plan,51,25500++# Sheet: Pipeline+stage,deal,owner,arr_usd+qualified,Acme Co,Alice,48000+proposal,Globex,Daniel,72000+negotiation,Initech,Carla,96000+closed_won,Umbrella,Bob,120000+`,+ },+ {+ id: "json-object",+ ext: ".json",+ label: "JSON",+ icon: "🧬",+ kind: "code",+ description: "Structured object — good for product cards, profiles, specs.",+ format: "json",+ filename: "product.json",+ content: `{+ "product": "HTML Anything",+ "version": "0.4.0",+ "tagline": "Anything → beautiful HTML",+ "author": {+ "name": "pftom",+ "url": "https://github.com/pftom"+ },+ "metrics": {+ "weekly_active_users": 1240,+ "conversions_total": 8123,+ "avg_first_byte_ms": 1820+ },+ "features": [+ "60+ templates",+ "diff-edit mode",+ "i18n (en / zh-CN)",+ "local agents (Claude Code, Codex, Gemini)"+ ],+ "shipped": true+}+`,+ },+ {+ id: "sql-query",+ ext: ".sql",+ label: "SQL",+ icon: "🛢️",+ kind: "code",+ description: "Queries and DDL — show the query + format the result.",+ format: "sql",+ filename: "top-customers.sql",+ content: `-- Top 10 customers by lifetime value (FY26)+SELECT+ c.id,+ c.name,+ c.country,+ SUM(o.amount_usd) AS lifetime_value,+ COUNT(o.id) AS order_count,+ MIN(o.created_at) AS first_order,+ MAX(o.created_at) AS last_order+FROM customers c+JOIN orders o ON o.customer_id = c.id+WHERE c.created_at >= '2025-04-01'+ AND o.status = 'paid'+GROUP BY c.id, c.name, c.country+HAVING SUM(o.amount_usd) > 10000+ORDER BY lifetime_value DESC+LIMIT 10;+`,+ },+ {+ id: "yaml-config",+ ext: ".yaml",+ label: "YAML",+ icon: "⚙️",+ kind: "code",+ description: "Config files — k8s, GitHub Actions, openapi specs.",+ format: "yaml",+ filename: "deploy.yaml",+ content: `project: html-anything+version: 0.4.0+description: Anything → beautiful HTML++agents:+ - id: claude-code+ label: Claude Code+ protocol: stdin+ models: [opus-4-7, sonnet-4-6, haiku-4-5]+ - id: codex+ label: OpenAI Codex+ protocol: argv+ models: [gpt-5, gpt-4.1]+ - id: gemini+ label: Gemini CLI+ protocol: stdin+ models: [gemini-2.5-pro]++deploy:+ region: us-east-1+ replicas: 3+ resources:+ cpu: "500m"+ memory: "1Gi"+ env:+ NODE_ENV: production+ LOG_LEVEL: info+`,+ },+ {+ id: "html-page",+ ext: ".html",+ label: "HTML",+ icon: "🌐",+ kind: "code",+ description: "A page or fragment — the agent restyles it or extracts content.",+ format: "html",+ filename: "snippet.html",+ content: `<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <title>Hello, HTML Anything</title>+</head>+<body>+ <header>+ <h1>It works!</h1>+ <p class="lede">Drop any HTML here and the agent will restyle it for the picked template.</p>+ </header>+ <section>+ <h2>What you can do</h2>+ <ul>+ <li>Paste a Notion / Linear export</li>+ <li>Drop in a scraped page</li>+ <li>Hand-roll a quick prototype</li>+ </ul>+ </section>+</body>+</html>+`,+ },+ {+ id: "png-photo",+ ext: ".png",+ label: "PNG",+ icon: "🖼️",+ kind: "image",+ description: "Bitmap photo — embedded as data URL, agent writes copy around it.",+ format: "image",+ filename: "photo.png",+ content: `})++Caption: a placeholder hero image. Replace with a real photo, then ⌘+Enter to render in the picked template (Xiaohongshu card, Twitter card, magazine…).+`,+ },+ {+ id: "jpg-chart",+ ext: ".jpg",+ label: "JPG",+ icon: "📷",+ kind: "image",+ description: "Chart / screenshot — agent annotates it with a styled writeup.",+ format: "image",+ filename: "sales-chart.jpg",+ content: `})++Sales by quarter — FY26 closed with Q4 at $250k (projected) and FY27 starting at $270k. The agent will turn this into a finance report card or a magazine pull-out, depending on the template.+`,+ },+];++const KIND_LABEL: Record<FormatKind, { en: string; zh: string; tint: string }> = {+ text: { en: "Text", zh: "文本", tint: "rgba(35,72,184,0.10)" },+ data: { en: "Data", zh: "数据", tint: "rgba(31,122,58,0.10)" },+ code: { en: "Code", zh: "代码", tint: "rgba(108,58,166,0.10)" },+ image: { en: "Image", zh: "图片", tint: "rgba(201,100,66,0.12)" },+};++export function FormatsGallery({ onLoaded }: { onLoaded?: () => void }) {+ const setContent = useStore((s) => s.setContent);+ const setFormat = useStore((s) => s.setFormat);+ const setFilename = useStore((s) => s.setFilename);+ const pushLog = useStore((s) => s.pushLog);+ const locale = useStore((s) => s.locale);+ const t = useT();+ const [filter, setFilter] = useState<FormatKind | "all">("all");++ const filters: Array<{ id: FormatKind | "all"; label: string; emoji: string }> = useMemo(() => {+ const zh = locale === "zh-CN";+ return [+ { id: "all", label: t("samples.filter.all"), emoji: "✨" },+ { id: "text", label: zh ? KIND_LABEL.text.zh : KIND_LABEL.text.en, emoji: "📝" },+ { id: "data", label: zh ? KIND_LABEL.data.zh : KIND_LABEL.data.en, emoji: "📊" },+ { id: "code", label: zh ? KIND_LABEL.code.zh : KIND_LABEL.code.en, emoji: "🧬" },+ { id: "image", label: zh ? KIND_LABEL.image.zh : KIND_LABEL.image.en, emoji: "🖼️" },+ ];+ }, [locale, t]);++ const visible = useMemo(+ () => (filter === "all" ? EXAMPLES : EXAMPLES.filter((e) => e.kind === filter)),+ [filter],+ );++ const handleLoad = (ex: FormatExample) => {+ setContent(ex.content);+ setFormat(ex.format);+ setFilename(ex.filename);+ pushLog({+ kind: "info",+ text: t("formats.loadedLog", { name: ex.filename, fmt: ex.format }),+ });+ onLoaded?.();+ };++ return (+ <div className="flex h-full flex-col">+ <div+ className="flex items-start justify-between gap-3 px-4 py-3"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ <div>+ <div className="text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--ink-faint)] mb-1.5">+ {t("formats.eyebrow")}+ </div>+ <div className="text-[11.5px] text-[var(--ink-mute)] leading-snug max-w-md">+ {t("formats.subtitle")}+ </div>+ </div>+ <div className="text-[11px] text-[var(--ink-faint)] whitespace-nowrap mt-1">+ {visible.length} / {EXAMPLES.length}+ </div>+ </div>++ <div+ className="flex gap-1.5 overflow-x-auto px-4 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ {filters.map((c) => {+ const active = filter === c.id;+ return (+ <button+ key={c.id}+ onClick={() => setFilter(c.id)}+ className="shrink-0 inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[12px] transition-colors"+ style={+ active+ ? { background: "var(--ink)", color: "var(--paper)" }+ : {+ background: "var(--surface)",+ color: "var(--ink-mute)",+ border: "1px solid var(--line-faint)",+ }+ }+ >+ <span>{c.emoji}</span>+ <span>{c.label}</span>+ </button>+ );+ })}+ </div>++ <div className="flex-1 overflow-y-auto p-4">+ <div className="grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3">+ {visible.map((ex) => (+ <FormatCard key={ex.id} ex={ex} onLoad={() => handleLoad(ex)} />+ ))}+ </div>+ </div>+ </div>+ );+}++function FormatCard({ ex, onLoad }: { ex: FormatExample; onLoad: () => void }) {+ const t = useT();+ const tint = KIND_LABEL[ex.kind].tint;+ const previewText = ex.content.split("\n").slice(0, 6).join("\n");+ return (+ <div+ className="group relative flex flex-col overflow-hidden rounded-2xl transition-all hover:-translate-y-0.5"+ style={{+ background: "var(--surface)",+ border: "1px solid var(--line-soft)",+ boxShadow: "0 1px 0 var(--line-faint), 0 14px 32px -22px rgba(21,20,15,0.18)",+ }}+ >+ <div+ className="flex items-center justify-between gap-2 px-4 py-2.5"+ style={{ background: tint, borderBottom: "1px solid var(--line-faint)" }}+ >+ <div className="flex items-center gap-2 min-w-0">+ <span className="text-[18px] leading-none">{ex.icon}</span>+ <span className="font-semibold text-[13px] text-[var(--ink)] truncate">{ex.label}</span>+ <span+ className="rounded px-1.5 py-0.5 text-[10px] font-mono tracking-wide"+ style={{ background: "var(--paper)", color: "var(--ink-soft)", border: "1px solid var(--line-faint)" }}+ >+ {ex.ext}+ </span>+ </div>+ <span className="text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)] whitespace-nowrap">+ {ex.format}+ </span>+ </div>++ <div className="flex flex-1 flex-col gap-2 p-4">+ <div className="text-[11.5px] text-[var(--ink-mute)] leading-snug">{ex.description}</div>+ <pre+ className="rounded-md px-2.5 py-2 text-[10.5px] leading-snug font-[family-name:var(--font-mono)] overflow-hidden whitespace-pre"+ style={{+ background: "var(--paper)",+ color: "var(--ink-soft)",+ border: "1px solid var(--line-faint)",+ maxHeight: "5.4em",+ }}+ title={ex.content}+ >+ {previewText}+ </pre>+ <div className="flex items-center justify-between gap-2 pt-1 mt-auto">+ <span+ className="text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)] truncate"+ title={ex.filename}+ >+ {ex.filename}+ </span>+ <button+ onClick={onLoad}+ className="inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12px] font-semibold transition-all"+ style={{+ background: "var(--coral)",+ color: "#fff",+ boxShadow: "0 8px 18px -12px rgba(201,100,66,0.85)",+ }}+ >+ {t("formats.loadButton")}+ </button>+ </div>+ </div>+ </div>+ );+}diff --git a/src/components/layout-mode-toggle.tsx b/src/components/layout-mode-toggle.tsxnew file mode 100644index 00000000..f7ed4bbc--- /dev/null+++ b/src/components/layout-mode-toggle.tsx@@ -0,0 +1,75 @@+"use client";++import { useStore, type LayoutMode } from "@/lib/store";+import { useT, type DictKey } from "@/lib/i18n";++const MODES: Array<{ id: LayoutMode; tipKey: DictKey; labelKey: DictKey; icon: React.ReactNode }> = [+ {+ id: "editor",+ tipKey: "layout.tip.editor",+ labelKey: "layout.label.editor",+ icon: (+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none">+ <rect x="1.5" y="2.5" width="13" height="11" rx="1.5" stroke="currentColor" strokeWidth="1.2" />+ <rect x="1.5" y="2.5" width="9" height="11" rx="1.5" fill="currentColor" opacity="0.85" />+ </svg>+ ),+ },+ {+ id: "split",+ tipKey: "layout.tip.split",+ labelKey: "layout.label.split",+ icon: (+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none">+ <rect x="1.5" y="2.5" width="13" height="11" rx="1.5" stroke="currentColor" strokeWidth="1.2" />+ <line x1="8" y1="2.5" x2="8" y2="13.5" stroke="currentColor" strokeWidth="1.2" />+ </svg>+ ),+ },+ {+ id: "preview",+ tipKey: "layout.tip.preview",+ labelKey: "layout.label.preview",+ icon: (+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none">+ <rect x="1.5" y="2.5" width="13" height="11" rx="1.5" stroke="currentColor" strokeWidth="1.2" />+ <rect x="5.5" y="2.5" width="9" height="11" rx="1.5" fill="currentColor" opacity="0.85" />+ </svg>+ ),+ },+];++export function LayoutModeToggle() {+ const mode = useStore((s) => s.layoutMode);+ const setMode = useStore((s) => s.setLayoutMode);+ const t = useT();+ return (+ <div+ className="flex items-center gap-0.5 rounded-full p-0.5"+ style={{ background: "var(--surface)", border: "1px solid var(--line)" }}+ role="radiogroup"+ aria-label={t("layout.aria.group")}+ >+ {MODES.map((m) => {+ const active = mode === m.id;+ return (+ <button+ key={m.id}+ role="radio"+ aria-checked={active}+ onClick={() => setMode(m.id)}+ title={t(m.tipKey)}+ aria-label={t(m.labelKey)}+ className="grid h-7 w-7 place-items-center rounded-full transition-colors"+ style={{+ background: active ? "var(--ink)" : "transparent",+ color: active ? "var(--paper)" : "var(--ink-mute)",+ }}+ >+ {m.icon}+ </button>+ );+ })}+ </div>+ );+}diff --git a/src/components/preview-pane.tsx b/src/components/preview-pane.tsxnew file mode 100644index 00000000..8ae4b6e2--- /dev/null+++ b/src/components/preview-pane.tsx@@ -0,0 +1,454 @@+"use client";++import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { useStore, selectActiveTask, type LogEntry, type RunStats } from "@/lib/store";+import { useT, type DictKey } from "@/lib/i18n";+import { previewHtml, extractHtml } from "@/lib/extract-html";+import { isDeck } from "@/lib/deck";+import { DeckViewer } from "./deck-viewer";++type PreviewTab = "preview" | "deck" | "code" | "log";++const PREVIEW_TAB_KEY: Record<PreviewTab, DictKey> = {+ preview: "preview.tab.preview",+ deck: "preview.tab.deck",+ code: "preview.tab.code",+ log: "preview.tab.log",+};++const STATUS_KEY: Record<string, DictKey> = {+ idle: "preview.status.idle",+ running: "preview.status.running",+ done: "preview.status.done",+ error: "preview.status.error",+};++const CHIP_KEYS: DictKey[] = [+ "preview.placeholder.chip.article",+ "preview.placeholder.chip.deck",+ "preview.placeholder.chip.resume",+ "preview.placeholder.chip.poster",+ "preview.placeholder.chip.xiaohongshu",+ "preview.placeholder.chip.twitterCard",+ "preview.placeholder.chip.webProto",+ "preview.placeholder.chip.dataReport",+];++// stable references so the selector doesn't force re-render when active task is missing+const EMPTY_LOG: LogEntry[] = [];+const EMPTY_STATS: RunStats = { outputBytes: 0, deltaCount: 0 };++export function PreviewPane({+ iframeRef,+}: {+ iframeRef?: React.MutableRefObject<HTMLIFrameElement | null>;+}) {+ const html = useStore((s) => selectActiveTask(s)?.html ?? "");+ const status = useStore((s) => selectActiveTask(s)?.status ?? "idle");+ const log = useStore((s) => selectActiveTask(s)?.log ?? EMPTY_LOG);+ const stats = useStore((s) => selectActiveTask(s)?.stats ?? EMPTY_STATS);+ const [tab, setTab] = useState<PreviewTab>("preview");+ const localRef = useRef<HTMLIFrameElement | null>(null);+ const codeRef = useRef<HTMLPreElement | null>(null);+ const logRef = useRef<HTMLDivElement | null>(null);+ const wrapRef = useRef<HTMLDivElement | null>(null);+ const [isFullscreen, setIsFullscreen] = useState(false);+ const t = useT();++ // Browser-level fullscreen for the whole preview pane. The Deck tab has its+ // own fullscreen wired in DeckViewer; we only handle Preview / Source / Log.+ useEffect(() => {+ const onFs = () => setIsFullscreen(document.fullscreenElement === wrapRef.current);+ document.addEventListener("fullscreenchange", onFs);+ return () => document.removeEventListener("fullscreenchange", onFs);+ }, []);++ const toggleFullscreen = useCallback(() => {+ const el = wrapRef.current;+ if (!el) return;+ if (document.fullscreenElement === el) {+ document.exitFullscreen?.();+ } else {+ el.requestFullscreen?.().catch(() => {});+ }+ }, []);++ // F to toggle fullscreen (only when not on Deck tab — DeckViewer handles its own).+ useEffect(() => {+ if (tab === "deck") return;+ const onKey = (e: KeyboardEvent) => {+ if (e.target instanceof HTMLElement) {+ const tagName = e.target.tagName;+ if (tagName === "INPUT" || tagName === "TEXTAREA" || e.target.isContentEditable) return;+ }+ if (e.key === "f" || e.key === "F") {+ e.preventDefault();+ toggleFullscreen();+ }+ };+ window.addEventListener("keydown", onKey);+ return () => window.removeEventListener("keydown", onKey);+ }, [tab, toggleFullscreen]);++ // Detect deck off the cleaned (un-fenced) html — extract once for reuse.+ const cleaned = useMemo(() => extractHtml(html), [html]);+ const deckMode = useMemo(() => isDeck(cleaned), [cleaned]);++ // First time we see a deck, auto-promote the user to the Deck tab so the+ // feature is discoverable. We only do this once per task run (track the+ // latest html length seen as the "trigger") to avoid stealing focus if the+ // user explicitly switched back to the single-page preview.+ const autoSwitchedRef = useRef(false);+ useEffect(() => {+ if (status === "running") return;+ if (deckMode && !autoSwitchedRef.current && tab === "preview") {+ setTab("deck");+ autoSwitchedRef.current = true;+ }+ if (!deckMode) autoSwitchedRef.current = false;+ if (!deckMode && tab === "deck") setTab("preview");+ }, [deckMode, status, tab]);++ // Debounce srcDoc updates to ~3 fps during streaming so the iframe+ // doesn't reload on every delta. Last value always commits when status changes.+ const [debouncedHtml, setDebouncedHtml] = useState(html);+ useEffect(() => {+ if (status !== "running") {+ setDebouncedHtml(html);+ return;+ }+ const id = setTimeout(() => setDebouncedHtml(html), 320);+ return () => clearTimeout(id);+ }, [html, status]);+ const display = useMemo(() => previewHtml(debouncedHtml), [debouncedHtml]);++ useEffect(() => {+ if (iframeRef) iframeRef.current = localRef.current;+ });++ // Auto-scroll code to bottom while streaming+ useEffect(() => {+ if (status === "running" && codeRef.current) {+ codeRef.current.scrollTop = codeRef.current.scrollHeight;+ }+ }, [html, status]);++ // Auto-scroll log to bottom+ useEffect(() => {+ if (logRef.current) {+ logRef.current.scrollTop = logRef.current.scrollHeight;+ }+ }, [log]);++ // Auto-switch to code tab when stream starts so user sees output forming+ const prevStatusRef = useRef(status);+ useEffect(() => {+ if (prevStatusRef.current !== "running" && status === "running" && tab === "preview" && !html) {+ // stay on preview but no-op; we keep preview as default for live HTML render+ }+ prevStatusRef.current = status;+ }, [status, tab, html]);++ const showMetrics = status !== "idle" || !!stats.startedAt;++ // Present button is meaningful for Preview / Source / Log. The Deck tab has+ // its own Present button inside DeckViewer; suppress ours there to avoid+ // two competing fullscreens.+ const canPresent = tab !== "deck" && (tab !== "preview" || !!html);++ return (+ <div+ ref={wrapRef}+ className="flex h-full flex-col"+ style={{ background: isFullscreen ? "#0a0a0a" : "var(--paper)" }}+ >+ {!isFullscreen && (+ <div+ className="flex items-center justify-between gap-2 px-4 py-2.5 text-sm"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--surface)" }}+ >+ <div className="flex gap-1">+ {(["preview", ...(deckMode ? (["deck"] as const) : []), "code", "log"] as const).map((id) => (+ <button+ key={id}+ onClick={() => setTab(id)}+ className={tab === id ? "pill pill-active" : "pill"}+ style={tab === id ? undefined : { background: "transparent", border: "1px solid transparent" }}+ >+ {t(PREVIEW_TAB_KEY[id])}+ {id === "log" && log.length > 0 && (+ <span+ className="ml-1 rounded-full px-1.5 py-0.5 text-[9px] font-bold"+ style={{+ background: tab === "log" ? "rgba(255,255,255,0.18)" : "var(--coral-soft)",+ color: tab === "log" ? "#fff" : "var(--coral)",+ }}+ >+ {log.length}+ </span>+ )}+ </button>+ ))}+ </div>+ <div className="flex items-center gap-1.5">+ {canPresent && (+ <button+ onClick={toggleFullscreen}+ className="rounded-full px-2.5 py-0.5 text-[11px] font-medium"+ style={{+ background: "transparent",+ color: "var(--ink-soft)",+ border: "1px solid var(--line)",+ }}+ title={t("preview.presentTooltip")}+ >+ {t("preview.present")} <span className="opacity-50">F</span>+ </button>+ )}+ <StatusPill status={status} />+ </div>+ </div>+ )}++ {!isFullscreen && showMetrics && <MetricsBar stats={stats} status={status} html={html} />}++ <div className="relative flex-1 overflow-hidden">+ {tab === "preview" && (+ <>+ {!html && <PreviewPlaceholder status={status} />}+ {html && (+ <iframe+ ref={localRef}+ title="preview"+ srcDoc={display}+ sandbox="allow-scripts allow-same-origin"+ className="h-full w-full"+ style={{ background: "#fff" }}+ />+ )}+ </>+ )}+ {tab === "deck" && (+ <DeckViewer+ html={cleaned}+ active={tab === "deck"}+ // Hand the active slide iframe to the parent ref so the existing+ // ExportMenu's "PNG" / "Image" actions snapshot the *current+ // slide*, not the underlying multi-slide doc.+ onMainIframe={(el) => {+ if (iframeRef) iframeRef.current = el;+ localRef.current = el;+ }}+ />+ )}+ {tab === "code" && (+ <pre+ ref={codeRef}+ className="h-full overflow-auto p-4 text-[11.5px] leading-relaxed font-[family-name:var(--font-mono)]"+ style={{ background: "#15140f", color: "#e8e4dc" }}+ >+ {html ? (+ <>+ {html}+ {status === "running" && <span className="shimmer">▍</span>}+ </>+ ) : status === "running" ? (+ <span className="text-[#8b8676]">{t("preview.code.waiting")}</span>+ ) : (+ <span className="text-[#8b8676]">{t("preview.code.empty")}</span>+ )}+ </pre>+ )}+ {tab === "log" && (+ <LogPanel logRef={logRef} log={log} />+ )}++ {/* Fullscreen exit chip — only shown when this pane owns the fullscreen.+ Deck mode is excluded because DeckViewer manages its own fullscreen+ chrome (Present / Exit / nav arrows). */}+ {isFullscreen && tab !== "deck" && (+ <button+ onClick={toggleFullscreen}+ className="absolute right-3 top-3 rounded-full px-3 py-1.5 text-[11px] font-medium"+ style={{+ background: "rgba(255,255,255,0.10)",+ color: "#fff",+ border: "1px solid rgba(255,255,255,0.18)",+ backdropFilter: "blur(8px)",+ }}+ title={t("preview.presentTooltip")}+ >+ {t("preview.exitPresent")} <span className="opacity-60">F</span>+ </button>+ )}+ </div>+ </div>+ );+}++function StatusPill({ status }: { status: string }) {+ const t = useT();+ const map: Record<string, { bg: string; fg: string; dot: boolean }> = {+ idle: { bg: "transparent", fg: "var(--ink-faint)", dot: false },+ running: { bg: "var(--coral-soft)", fg: "var(--coral)", dot: true },+ done: { bg: "rgba(31,122,58,0.12)", fg: "var(--green)", dot: false },+ error: { bg: "rgba(156,42,37,0.12)", fg: "var(--red)", dot: false },+ };+ const c = map[status] ?? map.idle;+ return (+ <span+ className="inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-[11px] font-medium"+ style={{ background: c.bg, color: c.fg }}+ >+ {c.dot && <span className="pulse-dot" />}+ {t(STATUS_KEY[status] ?? "preview.status.idle")}+ </span>+ );+}++function MetricsBar({ stats, status, html }: { stats: RunStats; status: string; html: string }) {+ const t = useT();+ // tick to keep elapsed/ttfb live while running+ const [, setTick] = useState(0);+ useEffect(() => {+ if (status !== "running") return;+ const id = setInterval(() => setTick((n) => n + 1), 250);+ return () => clearInterval(id);+ }, [status]);++ const elapsed = stats.startedAt ? ((stats.endedAt ?? Date.now()) - stats.startedAt) / 1000 : 0;+ const ttfb = stats.firstByteAt && stats.startedAt ? (stats.firstByteAt - stats.startedAt) / 1000 : null;+ const sizeKB = html.length / 1024;+ const live = status === "running";++ const metrics: Array<{ label: string; value: string; hint?: string; live?: boolean }> = [+ { label: "Elapsed", value: `${elapsed.toFixed(1)}s`, live },+ { label: "TTFB", value: ttfb !== null ? `${ttfb.toFixed(2)}s` : "—", hint: t("preview.metric.ttfbHint") },+ { label: "Size", value: `${sizeKB.toFixed(1)} KB` },+ ...(stats.deltaCount > 0 ? [{ label: "Chunks", value: stats.deltaCount.toLocaleString() }] : []),+ ...(stats.outputTokens ? [{ label: "Output", value: `${stats.outputTokens.toLocaleString()} tok` }] : []),+ ...(stats.inputTokens ? [{ label: "Input", value: `${stats.inputTokens.toLocaleString()} tok` }] : []),+ ...(stats.cacheReadTokens ? [{ label: "Cache", value: `${stats.cacheReadTokens.toLocaleString()} tok` }] : []),+ ...(stats.costUsd !== undefined && stats.costUsd > 0+ ? [{ label: "Cost", value: `$${stats.costUsd.toFixed(4)}` }]+ : []),+ ...(stats.model ? [{ label: "Model", value: stats.model.replace(/\[.*\]$/, "") }] : []),+ ];++ return (+ <div+ className="flex flex-wrap items-center gap-x-5 gap-y-1.5 px-4 py-2"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ {metrics.map((m) => (+ <Metric key={m.label} label={m.label} value={m.value} hint={m.hint} live={m.live} />+ ))}+ </div>+ );+}++function Metric({ label, value, hint, live }: { label: string; value: string; hint?: string; live?: boolean }) {+ return (+ <div className="flex items-baseline gap-1.5 whitespace-nowrap" title={hint}>+ <span className="text-[9.5px] uppercase tracking-[0.14em] text-[var(--ink-faint)]">{label}</span>+ <span+ className="text-[12px] tabular-nums font-[family-name:var(--font-mono)]"+ style={{ color: live ? "var(--coral)" : "var(--ink-soft)", fontWeight: live ? 500 : 400 }}+ >+ {value}+ </span>+ </div>+ );+}++function LogPanel({+ log,+ logRef,+}: {+ log: LogEntry[];+ logRef: React.MutableRefObject<HTMLDivElement | null>;+}) {+ const t = useT();+ return (+ <div ref={logRef} className="h-full overflow-auto p-3 text-[11.5px] font-[family-name:var(--font-mono)]" style={{ background: "var(--paper)" }}>+ {log.length === 0 && (+ <div className="text-[var(--ink-faint)] p-4 text-center">{t("preview.log.empty")}</div>+ )}+ {log.map((l, i) => (+ <LogLine key={i} entry={l} />+ ))}+ </div>+ );+}++function LogLine({ entry }: { entry: LogEntry }) {+ const colorMap: Record<string, { tag: string; bg: string; fg: string; text: string }> = {+ info: { tag: "INFO", bg: "rgba(35,72,184,0.10)", fg: "var(--blue)", text: "var(--ink)" },+ start: { tag: "START", bg: "var(--coral-soft)", fg: "var(--coral)", text: "var(--ink)" },+ delta: { tag: "DELTA", bg: "rgba(31,122,58,0.10)", fg: "var(--green)", text: "var(--ink)" },+ meta: { tag: "META", bg: "rgba(108,58,166,0.10)", fg: "var(--purple)", text: "var(--ink-soft)" },+ stderr: { tag: "STDERR", bg: "rgba(178,98,0,0.10)", fg: "var(--amber)", text: "var(--ink-soft)" },+ raw: { tag: "RAW", bg: "rgba(21,20,15,0.05)", fg: "var(--ink-faint)", text: "var(--ink-mute)" },+ done: { tag: "DONE", bg: "rgba(31,122,58,0.10)", fg: "var(--green)", text: "var(--ink)" },+ error: { tag: "ERROR", bg: "rgba(156,42,37,0.10)", fg: "var(--red)", text: "var(--red)" },+ };+ const c = colorMap[entry.kind] ?? colorMap.info;+ const elapsed = entry.elapsed !== undefined ? `+${(entry.elapsed / 1000).toFixed(2)}s` : "";++ return (+ <div className="flex items-start gap-2 py-0.5 px-1 hover:bg-[var(--line-faint)] rounded">+ <span className="text-[var(--ink-faint)] tabular-nums shrink-0 w-[58px]">{elapsed}</span>+ <span+ className="shrink-0 rounded px-1.5 py-px text-[10px] font-bold tracking-wider"+ style={{ background: c.bg, color: c.fg }}+ >+ {c.tag}+ </span>+ <span style={{ color: c.text }} className="break-all whitespace-pre-wrap">+ {entry.text}+ </span>+ </div>+ );+}++function PreviewPlaceholder({ status }: { status: string }) {+ const t = useT();+ const isRunning = status === "running";+ const stats = useStore((s) => selectActiveTask(s)?.stats ?? EMPTY_STATS);+ const secWaited = stats.startedAt ? ((Date.now() - stats.startedAt) / 1000).toFixed(1) : "0";+ return (+ <div className="flex h-full flex-col items-center justify-center gap-4 text-center p-8" style={{ background: "var(--paper)" }}>+ <div className={`text-6xl ${isRunning ? "shimmer" : ""}`}>{isRunning ? "✨" : "🪄"}</div>+ <div>+ <h2 className="text-[22px] font-semibold tracking-tight text-[var(--ink)] font-[family-name:var(--font-display)]">+ {isRunning ? (+ <>+ {t("preview.placeholder.runningTitle.part1")}{" "}+ <em className="serif-em">{t("preview.placeholder.runningTitle.accent")}</em>…+ </>+ ) : (+ <>+ {t("preview.placeholder.idleTitle.part1")}{" "}+ <em className="serif-em">{t("preview.placeholder.idleTitle.accent")}</em>{" "}+ {t("preview.placeholder.idleTitle.part2")}+ </>+ )}+ </h2>+ <p className="mt-2 text-[13px] text-[var(--ink-mute)] max-w-sm leading-relaxed">+ {isRunning+ ? t("preview.placeholder.runningDescr", { sec: secWaited })+ : t("preview.placeholder.idleDescr")}+ </p>+ </div>+ {!isRunning && (+ <div className="flex flex-wrap items-center justify-center gap-2 max-w-md">+ {CHIP_KEYS.map((key) => (+ <span key={key} className="pill" style={{ fontSize: 11 }}>+ {t(key)}+ </span>+ ))}+ </div>+ )}+ </div>+ );+}diff --git a/src/components/samples-gallery.tsx b/src/components/samples-gallery.tsxnew file mode 100644index 00000000..081e497c--- /dev/null+++ b/src/components/samples-gallery.tsx@@ -0,0 +1,303 @@+"use client";++import { useMemo, useState } from "react";+import { useStore } from "@/lib/store";+import { useT } from "@/lib/i18n";+import {+ useTemplates,+ fetchTemplateExample,+ scenarioLabelKey,+ type TemplateDef,+} from "@/lib/templates";++/**+ * Samples gallery — rendered on the "示例" tab in the editor pane. The list+ * comes from `/api/templates` filtered to skills that ship a pre-rendered+ * `example.html` (so every card has something to preview). Each card uses+ * `<iframe src=…>` pointing at `/api/templates/<id>/preview` — the browser+ * does the fetching + caching, no `srcDoc` round-trip through React state.+ */+export function SamplesGallery({ onLoaded }: { onLoaded?: () => void }) {+ const templates = useTemplates();+ const loadSample = useStore((s) => s.loadSample);+ const tasks = useStore((s) => s.tasks);+ const locale = useStore((s) => s.locale);+ const t = useT();+ const [filter, setFilter] = useState<string>("all");+ const [loadingId, setLoadingId] = useState<string | null>(null);++ const previewable = useMemo(+ () => (templates ?? []).filter((tpl) => tpl.example?.hasHtml),+ [templates],+ );++ // group filter chips by scenario (only show scenarios that have ≥1 previewable template)+ const filterChips = useMemo(() => {+ const seen = new Map<string, TemplateDef>();+ for (const tpl of previewable) if (!seen.has(tpl.scenario)) seen.set(tpl.scenario, tpl);+ return [+ { id: "all", label: t("samples.filter.all"), emoji: "✨" },+ ...Array.from(seen.entries()).map(([s, tpl]) => {+ const k = scenarioLabelKey(s);+ return { id: s, label: k ? t(k) : s, emoji: tpl.emoji };+ }),+ ];+ }, [previewable, t]);++ const visible = useMemo(+ () => (filter === "all" ? previewable : previewable.filter((tpl) => tpl.scenario === filter)),+ [filter, previewable],+ );++ const loadedSampleIds = useMemo(+ () => new Set(tasks.map((task) => task.sampleId).filter(Boolean) as string[]),+ [tasks],+ );++ const handleLoad = async (tpl: TemplateDef) => {+ setLoadingId(tpl.id);+ try {+ const ex = await fetchTemplateExample(tpl.id);+ if (!ex) return;+ loadSample({+ id: ex.id,+ name: ex.name,+ content: ex.content,+ format: ex.format,+ templateId: ex.templateId,+ html: ex.html,+ });+ onLoaded?.();+ } finally {+ setLoadingId(null);+ }+ };++ return (+ <div className="flex h-full flex-col">+ {/* sticky filter strip */}+ <div+ className="flex items-start justify-between gap-3 px-4 py-3"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ <div>+ <div className="text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--ink-faint)] mb-1.5">+ {t("samples.eyebrow")}+ </div>+ <div className="text-[11.5px] text-[var(--ink-mute)] leading-snug max-w-md">+ {(() => {+ const SEP = "\u0007";+ const body = t("samples.subtitle.body", {+ preRendered: SEP + "PRE" + SEP,+ diff: SEP + "DIFF" + SEP,+ });+ return body.split(SEP).map((piece, i) => {+ if (piece === "PRE") {+ return (+ <strong key={i} className="text-[var(--ink)]">+ {t("samples.subtitle.preRendered")}+ </strong>+ );+ }+ if (piece === "DIFF") {+ return (+ <strong key={i} className="text-[var(--coral)]">+ {t("samples.subtitle.diff")}+ </strong>+ );+ }+ const kbdParts = piece.split("⌘+Enter");+ if (kbdParts.length === 2) {+ return (+ <span key={i}>+ {kbdParts[0]}+ <kbd className="px-1 py-px rounded bg-white border border-[var(--line)] font-mono text-[10px]">+ ⌘+Enter+ </kbd>+ {kbdParts[1]}+ </span>+ );+ }+ return <span key={i}>{piece}</span>;+ });+ })()}+ </div>+ </div>+ <div className="text-[11px] text-[var(--ink-faint)] whitespace-nowrap mt-1">+ {visible.length} / {previewable.length}+ </div>+ </div>++ <div+ className="flex gap-1.5 overflow-x-auto px-4 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ {filterChips.map((c) => {+ const active = filter === c.id;+ return (+ <button+ key={c.id}+ onClick={() => setFilter(c.id)}+ className="shrink-0 inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[12px] transition-colors"+ style={+ active+ ? { background: "var(--ink)", color: "var(--paper)" }+ : {+ background: "var(--surface)",+ color: "var(--ink-mute)",+ border: "1px solid var(--line-faint)",+ }+ }+ >+ <span>{c.emoji}</span>+ <span>{c.label}</span>+ </button>+ );+ })}+ </div>++ <div className="flex-1 overflow-y-auto p-4">+ {templates === undefined ? (+ <div className="py-12 text-center text-[12px] text-[var(--ink-faint)]">+ {t("samples.loading")}+ </div>+ ) : (+ <div className="grid grid-cols-1 gap-3 lg:grid-cols-2">+ {visible.map((tpl) => (+ <SampleCard+ key={tpl.id}+ tpl={tpl}+ loaded={!!tpl.example && loadedSampleIds.has(tpl.example.id)}+ loading={loadingId === tpl.id}+ onLoad={() => handleLoad(tpl)}+ />+ ))}+ </div>+ )}+ </div>+ </div>+ );+}++function SampleCard({+ tpl,+ loaded,+ loading,+ onLoad,+}: {+ tpl: TemplateDef;+ loaded: boolean;+ loading: boolean;+ onLoad: () => void;+}) {+ const t = useT();+ const locale = useStore((s) => s.locale);+ const example = tpl.example;+ const previewUrl = `/api/templates/${encodeURIComponent(tpl.id)}/preview`;+ return (+ <div+ className="group relative flex flex-col overflow-hidden rounded-2xl transition-all hover:-translate-y-0.5"+ style={{+ background: "var(--surface)",+ border: "1px solid var(--line-soft)",+ boxShadow: "0 1px 0 var(--line-faint), 0 14px 32px -22px rgba(21,20,15,0.18)",+ }}+ >+ {/* live HTML thumbnail (scaled-down iframe pointing at /api/.../preview) */}+ <div+ className="relative h-44 overflow-hidden"+ style={{ background: "var(--paper)", borderBottom: "1px solid var(--line-faint)" }}+ >+ <div+ className="absolute origin-top-left"+ style={{+ transform: "scale(0.32)",+ width: "calc(100% / 0.32)",+ height: "calc(176px / 0.32)",+ pointerEvents: "none",+ }}+ >+ <iframe+ title={tpl.id}+ src={previewUrl}+ sandbox=""+ loading="lazy"+ className="block h-full w-full"+ style={{ background: "#fff", border: "none" }}+ />+ </div>+ <div className="absolute left-3 top-3 flex items-center gap-1.5">+ <span+ className="rounded-full bg-white/90 px-2 py-0.5 text-[10px] font-semibold tracking-wide backdrop-blur"+ style={{ border: "1px solid var(--line-faint)", color: "var(--ink)" }}+ >+ {tpl.emoji} {locale === "en" ? tpl.enName : tpl.zhName}+ </span>+ {loaded && (+ <span+ className="rounded-full px-2 py-0.5 text-[10px] font-semibold backdrop-blur"+ style={{ background: "rgba(31,122,58,0.15)", color: "var(--green)" }}+ title={t("samples.loadedTooltip")}+ >+ {t("samples.loaded")}+ </span>+ )}+ </div>+ <div className="absolute right-3 bottom-3 rounded-full bg-white/90 px-2 py-0.5 text-[10px] font-mono tracking-wide backdrop-blur" style={{ border: "1px solid var(--line-faint)", color: "var(--ink-mute)" }}>+ {tpl.aspectHint}+ </div>+ </div>++ <div className="flex flex-1 flex-col gap-2 p-4">+ <div>+ <div className="font-semibold text-[14px] text-[var(--ink)] leading-snug">+ {example?.name || (locale === "en" ? tpl.enName : tpl.zhName)}+ </div>+ {example?.tagline && (+ <div className="text-[11.5px] text-[var(--coral)] mt-0.5">{example.tagline}</div>+ )}+ </div>+ <div className="text-[11.5px] text-[var(--ink-mute)] leading-snug">+ {example?.desc || tpl.description}+ </div>++ {example?.source && (+ <a+ href={example.source.url}+ target="_blank"+ rel="noopener noreferrer"+ onClick={(e) => e.stopPropagation()}+ className="inline-flex items-center gap-1.5 self-start rounded-full px-2 py-0.5 text-[10.5px] font-medium transition-colors"+ style={{+ background: "var(--paper)",+ color: "var(--ink-mute)",+ border: "1px solid var(--line-faint)",+ }}+ title={example.source.url}+ >+ <span>↗</span>+ <span>{t("samples.sourceLink", { label: example.source.label })}</span>+ </a>+ )}++ <div className="flex items-center justify-between gap-2 pt-1.5 mt-auto">+ <span className="text-[10px] uppercase tracking-[0.14em] text-[var(--ink-faint)]">+ {tpl.scenario} · {example?.format ?? "html"}+ </span>+ <button+ onClick={onLoad}+ disabled={loading}+ className="inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12px] font-semibold transition-all disabled:opacity-50"+ style={{+ background: "var(--coral)",+ color: "#fff",+ boxShadow: "0 8px 18px -12px rgba(201,100,66,0.85)",+ }}+ >+ {loading ? t("samples.loadingButton") : t("samples.loadButton")}+ </button>+ </div>+ </div>+ </div>+ );+}diff --git a/src/components/settings-modal.tsx b/src/components/settings-modal.tsxnew file mode 100644index 00000000..47a3b15b--- /dev/null+++ b/src/components/settings-modal.tsx@@ -0,0 +1,453 @@+"use client";++import { useEffect, useMemo, useState } from "react";+import {+ LOCALES,+ LOCALE_LABEL,+ useStore,+ type AgentInfo,+ type Locale,+} from "@/lib/store";+import { useT, type DictKey } from "@/lib/i18n";++type Props = { onClose: () => void; initialSection?: SectionId };++type SectionId = "agent" | "language";++const SECTIONS: Array<{ id: SectionId; labelKey: DictKey; hintKey: DictKey }> = [+ { id: "agent", labelKey: "settings.section.agent.label", hintKey: "settings.section.agent.hint" },+ { id: "language", labelKey: "settings.section.language.label", hintKey: "settings.section.language.hint" },+];++const PROTOCOL_KEY: Record<AgentInfo["protocol"], { key: DictKey; tone: "ok" | "warn" }> = {+ stdin: { key: "protocol.stdin", tone: "ok" },+ argv: { key: "protocol.argv", tone: "ok" },+ acp: { key: "protocol.acp", tone: "warn" },+ "pi-rpc": { key: "protocol.piRpc", tone: "warn" },+};++const VENDOR_GRADIENT: Record<string, string> = {+ Anthropic: "from-[#c96442] to-[#e9b94a]",+ OpenAI: "from-[#10a37f] to-[#1f7a3a]",+ Cursor: "from-[#5b6cf2] to-[#a1a8f5]",+ Google: "from-[#4285f4] to-[#34a853]",+ GitHub: "from-[#24292e] to-[#444c56]",+ Open: "from-[#6e7448] to-[#b26200]",+ Alibaba: "from-[#ff7a00] to-[#ed6f5c]",+ Aider: "from-[#6c3aa6] to-[#9c2a25]",+ DeepSeek: "from-[#2563eb] to-[#7c3aed]",+ Cognition: "from-[#0f172a] to-[#475569]",+ Mature: "from-[#7c2d12] to-[#b45309]",+ Moonshot: "from-[#0ea5e9] to-[#1e3a8a]",+ Inflection: "from-[#a855f7] to-[#ec4899]",+ AWS: "from-[#ff9900] to-[#232f3e]",+ Kilo: "from-[#16a34a] to-[#0d9488]",+ Mistral: "from-[#fb923c] to-[#ef4444]",+ Qoder: "from-[#0891b2] to-[#7c3aed]",+};++export function SettingsModal({ onClose, initialSection = "agent" }: Props) {+ const [section, setSection] = useState<SectionId>(initialSection);+ const t = useT();++ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.key === "Escape") onClose();+ };+ window.addEventListener("keydown", onKey);+ return () => window.removeEventListener("keydown", onKey);+ }, [onClose]);++ return (+ <div+ className="fixed inset-0 z-50 flex items-center justify-center od-backdrop"+ style={{ background: "rgba(21, 20, 15, 0.45)", backdropFilter: "blur(6px)" }}+ onClick={(e) => {+ if (e.target === e.currentTarget) onClose();+ }}+ >+ <div+ className="relative w-[860px] max-w-[94vw] h-[600px] max-h-[88vh] flex flex-col overflow-hidden od-fade-in"+ style={{+ background: "var(--surface)",+ borderRadius: 24,+ border: "1px solid var(--line-soft)",+ boxShadow: "0 40px 80px -20px rgba(21, 20, 15, 0.35)",+ }}+ >+ <div+ className="flex items-center justify-between px-6 py-4"+ style={{ borderBottom: "1px solid var(--line-faint)" }}+ >+ <div>+ <div className="eyebrow">{t("settings.eyebrow")}</div>+ <h2 className="mt-2 text-[20px] font-semibold tracking-tight text-[var(--ink)] font-[family-name:var(--font-display)]">+ {t("settings.titlePart1")} <em className="serif-em">{t("settings.titleAccent")}</em>+ </h2>+ </div>+ <button+ onClick={onClose}+ className="grid h-8 w-8 place-items-center rounded-full text-[var(--ink-mute)] hover:bg-[var(--line-faint)] hover:text-[var(--ink)] transition-colors"+ title={t("settings.close")}+ >+ ✕+ </button>+ </div>++ <div className="flex flex-1 min-h-0">+ <nav+ className="w-[200px] shrink-0 px-3 py-4 overflow-y-auto"+ style={{ background: "var(--paper)", borderRight: "1px solid var(--line-faint)" }}+ >+ {SECTIONS.map((s) => {+ const active = s.id === section;+ return (+ <button+ key={s.id}+ onClick={() => setSection(s.id)}+ className={`block w-full rounded-xl px-3 py-2.5 mb-1 text-left transition-all ${+ active+ ? "bg-[var(--surface)] ring-1 ring-[var(--line)]"+ : "hover:bg-[var(--surface)]"+ }`}+ >+ <div className={`text-[13.5px] font-medium ${active ? "text-[var(--ink)]" : "text-[var(--ink-soft)]"}`}>+ {t(s.labelKey)}+ </div>+ <div className="text-[11px] text-[var(--ink-faint)] mt-0.5">{t(s.hintKey)}</div>+ </button>+ );+ })}+ </nav>++ <div className="flex-1 min-w-0 overflow-y-auto px-7 py-6">+ {section === "agent" && <AgentSection />}+ {section === "language" && <LanguageSection />}+ </div>+ </div>++ <div+ className="flex items-center justify-end gap-2 px-6 py-4"+ style={{ borderTop: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ <button onClick={onClose} className="btn-primary">+ {t("settings.done")}+ </button>+ </div>+ </div>+ </div>+ );+}++function AgentSection() {+ const setSelectedAgent = useStore((s) => s.setSelectedAgent);+ const setAgents = useStore((s) => s.setAgents);+ const setAgentModel = useStore((s) => s.setAgentModel);+ const agents = useStore((s) => s.agents);+ const selected = useStore((s) => s.selectedAgent);+ const agentModels = useStore((s) => s.agentModels);+ const t = useT();++ const [loading, setLoading] = useState(false);+ const [err, setErr] = useState<string | null>(null);++ const load = async () => {+ setLoading(true);+ setErr(null);+ try {+ const res = await fetch("/api/agents", { cache: "no-store" });+ if (!res.ok) throw new Error(`HTTP ${res.status}`);+ const data = (await res.json()) as { agents: AgentInfo[] };+ setAgents(data.agents);+ const installed = data.agents.filter((a) => a.available);+ if (!installed.find((a) => a.id === selected) && installed.length) {+ setSelectedAgent(installed[0].id);+ }+ } catch (e) {+ setErr(e instanceof Error ? e.message : "detection failed");+ } finally {+ setLoading(false);+ }+ };++ useEffect(() => {+ if (!agents.length) load();+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);++ const installed = useMemo(() => agents.filter((a) => a.available), [agents]);+ const missing = useMemo(() => agents.filter((a) => !a.available), [agents]);+ const selectedAgent = installed.find((a) => a.id === selected);+ const selectedModelId = selected ? agentModels[selected] ?? "default" : "default";++ return (+ <div>+ <div className="flex items-center justify-between mb-4">+ <div>+ <h3 className="text-[17px] font-semibold text-[var(--ink)]">{t("settings.agent.title")}</h3>+ <p className="mt-1 text-[12.5px] text-[var(--ink-mute)] leading-relaxed">+ {t("settings.agent.subtitle")}+ </p>+ </div>+ <button+ onClick={load}+ disabled={loading}+ className="text-xs text-[var(--ink-faint)] hover:text-[var(--ink)] disabled:opacity-50 transition-colors shrink-0"+ >+ {loading ? t("welcome.scanning") : t("welcome.rescan")}+ </button>+ </div>++ {err && (+ <div+ className="mb-4 rounded-xl px-4 py-3 text-sm"+ style={{ background: "var(--coral-soft)", color: "var(--coral)" }}+ >+ {t("welcome.detectionFailed")}: {err}+ </div>+ )}++ {installed.length > 0 && (+ <>+ <div className="mb-2 flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ <span className="pulse-dot" /> {t("welcome.installed", { n: installed.length })}+ </div>+ <div className="grid grid-cols-1 gap-2 sm:grid-cols-2">+ {installed.map((a) => (+ <AgentCard+ key={a.id}+ agent={a}+ selected={selected === a.id}+ onClick={() => setSelectedAgent(a.id)}+ />+ ))}+ </div>+ </>+ )}++ {selectedAgent && (+ <ModelPicker+ agent={selectedAgent}+ modelId={selectedModelId}+ onPick={(id) => setAgentModel(selectedAgent.id, id)}+ />+ )}++ {missing.length > 0 && (+ <>+ <div className="mt-6 mb-2 flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ {t("welcome.notInstalled", { n: missing.length })}+ </div>+ <div className="grid grid-cols-1 gap-2">+ {missing.map((a) => (+ <MissingCard key={a.id} agent={a} />+ ))}+ </div>+ </>+ )}++ {!loading && agents.length === 0 && (+ <div+ className="rounded-2xl border-2 border-dashed py-10 px-6 text-center"+ style={{ borderColor: "var(--line)" }}+ >+ <div className="text-3xl mb-2">🪞</div>+ <p className="text-sm font-medium text-[var(--ink-soft)]">{t("welcome.noAgentsTitle")}</p>+ <p className="mt-2 text-xs text-[var(--ink-mute)]">{t("welcome.noAgentsBody")}</p>+ </div>+ )}+ </div>+ );+}++function LanguageSection() {+ const locale = useStore((s) => s.locale);+ const setLocale = useStore((s) => s.setLocale);+ const t = useT();++ return (+ <div>+ <h3 className="text-[17px] font-semibold text-[var(--ink)]">{t("settings.language.title")}</h3>+ <p className="mt-1 text-[12.5px] text-[var(--ink-mute)] leading-relaxed">+ {t("settings.language.subtitle")}+ </p>++ <div className="mt-5 grid grid-cols-1 gap-1.5 sm:grid-cols-2">+ {LOCALES.map((code) => {+ const active = code === locale;+ return (+ <button+ key={code}+ onClick={() => setLocale(code as Locale)}+ className={`flex items-center justify-between rounded-xl px-4 py-3 text-left transition-all ${+ active+ ? "ring-2 ring-[var(--coral)] bg-[var(--surface)]"+ : "ring-1 ring-[var(--line-soft)] hover:ring-[var(--ink)]/30 bg-[var(--surface)]"+ }`}+ >+ <div className="min-w-0">+ <div className="text-[14px] font-medium text-[var(--ink)] truncate">+ {LOCALE_LABEL[code]}+ </div>+ <div className="font-mono text-[10.5px] text-[var(--ink-faint)] mt-0.5">{code}</div>+ </div>+ {active && (+ <span className="ml-2 text-[10px] font-bold uppercase tracking-wider text-[var(--coral)] shrink-0">+ {t("settings.language.active")}+ </span>+ )}+ {!active && code === "en" && (+ <span className="ml-2 text-[10px] uppercase tracking-wider text-[var(--ink-faint)] shrink-0">+ {t("settings.language.default")}+ </span>+ )}+ </button>+ );+ })}+ </div>++ <div+ className="mt-6 rounded-xl px-4 py-3 text-[12px] text-[var(--ink-mute)]"+ style={{ background: "var(--paper)", border: "1px solid var(--line-faint)" }}+ >+ {t("settings.language.note")}+ </div>+ </div>+ );+}++function AgentCard({+ agent,+ selected,+ onClick,+}: {+ agent: AgentInfo;+ selected: boolean;+ onClick: () => void;+}) {+ const t = useT();+ const proto = PROTOCOL_KEY[agent.protocol];+ const gradient = VENDOR_GRADIENT[agent.vendor] ?? "from-[var(--ink)] to-[var(--ink-soft)]";+ return (+ <button+ onClick={onClick}+ className={`group relative flex items-start gap-3 rounded-2xl p-4 text-left transition-all ${+ selected ? "ring-2 ring-[var(--coral)]" : "ring-1 ring-[var(--line-soft)] hover:ring-[var(--ink)]/30"+ }`}+ style={{ background: "var(--surface)" }}+ >+ <div+ className={`shrink-0 grid h-9 w-9 place-items-center rounded-xl text-white shadow-sm bg-gradient-to-br ${gradient}`}+ >+ <span className="font-semibold text-[15px]">{agent.label.charAt(0)}</span>+ </div>+ <div className="min-w-0 flex-1">+ <div className="flex items-center gap-2">+ <div className="text-[14px] font-semibold text-[var(--ink)] truncate">{agent.label}</div>+ {selected && (+ <span className="text-[10px] font-bold uppercase tracking-wider text-[var(--coral)]">+ {t("agent.selected")}+ </span>+ )}+ </div>+ <div className="flex items-center gap-2 text-[11px] text-[var(--ink-faint)] mt-0.5">+ <span>{agent.vendor}</span>+ <span>·</span>+ <span className={proto.tone === "warn" ? "text-[var(--coral)]" : ""}>{t(proto.key)}</span>+ </div>+ {agent.path && (+ <div+ className="font-mono text-[10px] text-[var(--ink-mute)] mt-1.5 truncate"+ title={agent.path}+ >+ {agent.path}+ </div>+ )}+ </div>+ </button>+ );+}++function ModelPicker({+ agent,+ modelId,+ onPick,+}: {+ agent: AgentInfo;+ modelId: string;+ onPick: (id: string) => void;+}) {+ const t = useT();+ const models = agent.models.length+ ? agent.models+ : [{ id: "default", label: t("model.defaultLabel") }];+ const MARK = "";+ const [before, after = ""] = t("model.label", { agent: MARK }).split(MARK);+ return (+ <div+ className="mt-5 rounded-2xl p-4"+ style={{ background: "var(--paper)", border: "1px solid var(--line-faint)" }}+ >+ <div className="flex items-center justify-between gap-3 mb-3">+ <div>+ <div className="text-[11px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">{t("model.eyebrow")}</div>+ <div className="text-[13px] font-medium text-[var(--ink-soft)] mt-0.5">+ {before}+ <strong className="text-[var(--ink)]">{agent.label}</strong>+ {after}+ </div>+ </div>+ <div className="text-[10.5px] text-[var(--ink-mute)] max-w-[220px] text-right leading-snug">+ {t("model.defaultHint.prefix")}+ <code className="px-1 rounded bg-[var(--surface)] border border-[var(--line-faint)]">+ --model+ </code>+ {t("model.defaultHint.suffix")}+ </div>+ </div>+ <div className="flex flex-wrap gap-1.5">+ {models.map((m) => {+ const active = m.id === modelId;+ return (+ <button+ key={m.id}+ onClick={() => onPick(m.id)}+ className={`rounded-full px-3 py-1.5 text-[12px] transition-all ${+ active+ ? "bg-[var(--ink)] text-[var(--paper)] font-medium"+ : "bg-[var(--surface)] text-[var(--ink-soft)] border border-[var(--line-soft)] hover:border-[var(--ink)]/40"+ }`}+ title={m.id}+ >+ {m.label}+ </button>+ );+ })}+ </div>+ </div>+ );+}++function MissingCard({ agent }: { agent: AgentInfo }) {+ const t = useT();+ const gradient = VENDOR_GRADIENT[agent.vendor] ?? "from-[var(--ink-faint)] to-[var(--ink-mute)]";+ return (+ <div+ className="flex items-center gap-3 rounded-xl p-3 opacity-70"+ style={{ background: "var(--paper)", border: "1px solid var(--line-faint)" }}+ >+ <div+ className={`shrink-0 grid h-8 w-8 place-items-center rounded-lg text-white text-[13px] font-semibold bg-gradient-to-br ${gradient}`}+ >+ {agent.label.charAt(0)}+ </div>+ <div className="min-w-0 flex-1">+ <div className="text-[13px] font-medium text-[var(--ink-soft)]">{agent.label}</div>+ <div className="text-[10.5px] text-[var(--ink-faint)]">{agent.vendor}</div>+ </div>+ <span className="text-[10px] uppercase tracking-wider text-[var(--ink-faint)]">+ {t("agent.notInstalled")}+ </span>+ </div>+ );+}diff --git a/src/components/tasks-sidebar.tsx b/src/components/tasks-sidebar.tsxnew file mode 100644index 00000000..fd60067e--- /dev/null+++ b/src/components/tasks-sidebar.tsx@@ -0,0 +1,391 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { useStore, type Task, type ConvertStatus } from "@/lib/store";+import { useTemplates, type TemplateDef } from "@/lib/templates";+import { relativeTime, useMounted } from "@/lib/use-autosave";+import { useT, type DictKey } from "@/lib/i18n";++// Fallback so tasks render before the registry fetch completes.+const FALLBACK_TPL = {+ id: "",+ zhName: "—",+ enName: "—",+ emoji: "📄",+ description: "",+ category: "other",+ scenario: "marketing",+ aspectHint: "",+ tags: [] as string[],+} satisfies TemplateDef;++const STATUS_DOT: Record<ConvertStatus, { color: string; key: DictKey; live: boolean }> = {+ idle: { color: "var(--ink-faint)", key: "tasks.status.idle", live: false },+ running: { color: "var(--coral)", key: "tasks.status.running", live: true },+ done: { color: "var(--green)", key: "tasks.status.done", live: false },+ error: { color: "var(--red)", key: "tasks.status.error", live: false },+};++export function TasksSidebar() {+ const tasks = useStore((s) => s.tasks);+ const activeTaskId = useStore((s) => s.activeTaskId);+ const collapsed = useStore((s) => s.sidebarCollapsed);+ const setCollapsed = useStore((s) => s.setSidebarCollapsed);+ const newTask = useStore((s) => s.newTask);+ const deleteTask = useStore((s) => s.deleteTask);+ const setActive = useStore((s) => s.setActiveTask);+ const renameTask = useStore((s) => s.renameTask);+ const duplicateTask = useStore((s) => s.duplicateTask);+ const templates = useTemplates();+ const t = useT();++ const [query, setQuery] = useState("");+ const trimmed = query.trim().toLowerCase();+ const filtered = trimmed+ ? tasks.filter((task) => {+ if (task.name.toLowerCase().includes(trimmed)) return true;+ if (task.content.toLowerCase().includes(trimmed)) return true;+ const tpl = templates?.find((x) => x.id === task.templateId);+ if (tpl) {+ if (tpl.zhName.toLowerCase().includes(trimmed)) return true;+ if (tpl.enName.toLowerCase().includes(trimmed)) return true;+ }+ return false;+ })+ : tasks;++ // tick once per minute so "Xs ago" stays current+ const [, setTick] = useState(0);+ useEffect(() => {+ const id = setInterval(() => setTick((n) => n + 1), 30_000);+ return () => clearInterval(id);+ }, []);++ if (collapsed) {+ return (+ <aside+ className="flex flex-col items-center gap-2 py-3"+ style={{+ width: 48,+ background: "var(--paper)",+ borderRight: "1px solid var(--line-faint)",+ }}+ >+ <button+ onClick={() => setCollapsed(false)}+ title={t("tasks.expand")}+ className="grid h-9 w-9 place-items-center rounded-xl transition-colors hover:bg-[var(--line-faint)]"+ style={{ color: "var(--ink-soft)" }}+ >+ <span className="text-[15px]">›</span>+ </button>+ <button+ onClick={() => newTask()}+ title={t("tasks.newTask")}+ className="grid h-9 w-9 place-items-center rounded-xl text-[18px] transition-all hover:bg-[var(--coral-soft)]"+ style={{ color: "var(--coral)" }}+ >+ ++ </button>+ <div className="my-1 h-px w-6" style={{ background: "var(--line-faint)" }} />+ <div className="flex flex-1 flex-col items-center gap-1.5 overflow-y-auto px-1">+ {tasks.map((task, i) => (+ <button+ key={task.id}+ onClick={() => setActive(task.id)}+ title={`${task.name} · ${t(STATUS_DOT[task.status].key)}`}+ className={`relative grid h-9 w-9 place-items-center rounded-xl text-[12px] transition-colors ${+ activeTaskId === task.id ? "ring-1" : "hover:bg-[var(--line-faint)]"+ }`}+ style={{+ background: activeTaskId === task.id ? "var(--surface)" : "transparent",+ color: "var(--ink-soft)",+ ["--tw-ring-color" as string]: "var(--ink)",+ }}+ >+ <span className="font-mono text-[10px]">{i + 1}</span>+ <span+ className={`absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full ${+ STATUS_DOT[task.status].live ? "pulse-dot !w-2 !h-2" : ""+ }`}+ style={{ background: STATUS_DOT[task.status].color }}+ />+ </button>+ ))}+ </div>+ </aside>+ );+ }++ return (+ <aside+ className="flex flex-col"+ style={{+ width: 268,+ background: "var(--paper)",+ borderRight: "1px solid var(--line-faint)",+ }}+ >+ <div+ className="flex items-center justify-between gap-2 px-4 py-3"+ style={{ borderBottom: "1px solid var(--line-faint)" }}+ >+ <div className="flex items-center gap-2">+ <span className="text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ {t("tasks.heading")}+ </span>+ <span+ className="rounded-full px-1.5 text-[10px] font-mono tabular-nums"+ style={{ background: "var(--surface)", color: "var(--ink-mute)", border: "1px solid var(--line-faint)" }}+ title={trimmed ? t("tasks.matchTooltip", { a: filtered.length, b: tasks.length }) : undefined}+ >+ {trimmed ? `${filtered.length}/${tasks.length}` : tasks.length}+ </span>+ </div>+ <button+ onClick={() => setCollapsed(true)}+ title={t("tasks.collapse")}+ className="text-[var(--ink-faint)] hover:text-[var(--ink)] transition-colors text-[14px] px-1"+ >+ ‹+ </button>+ </div>++ <button+ onClick={() => newTask()}+ className="mx-3 mt-3 flex items-center justify-center gap-1.5 rounded-xl py-2 text-[13px] font-medium transition-all hover:-translate-y-px"+ style={{+ background: "var(--coral)",+ color: "#fff",+ boxShadow: "0 10px 22px -16px rgba(201, 100, 66, 0.85)",+ }}+ >+ {t("tasks.newTask")}+ </button>++ <div className="relative mx-3 mt-2.5">+ <span+ className="pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[12px] text-[var(--ink-faint)]"+ aria-hidden+ >+ ⌕+ </span>+ <input+ type="search"+ value={query}+ onChange={(e) => setQuery(e.target.value)}+ placeholder={t("tasks.search.placeholder")}+ className="w-full rounded-lg bg-[var(--surface)] py-1.5 pl-7 pr-7 text-[12px] text-[var(--ink)] outline-none transition-shadow placeholder:text-[var(--ink-faint)] focus:shadow-[0_0_0_2px_var(--coral-soft)]"+ style={{ border: "1px solid var(--line-faint)" }}+ />+ {query && (+ <button+ onClick={() => setQuery("")}+ className="absolute right-1.5 top-1/2 -translate-y-1/2 grid h-5 w-5 place-items-center rounded text-[11px] text-[var(--ink-faint)] hover:bg-[var(--paper)] hover:text-[var(--ink)]"+ title={t("tasks.search.clear")}+ aria-label={t("tasks.search.clear")}+ >+ ✕+ </button>+ )}+ </div>++ <div className="flex-1 overflow-y-auto p-2 pt-2.5">+ {filtered.length === 0 ? (+ <div className="px-3 py-6 text-center text-[12px] text-[var(--ink-mute)]">+ {(() => {+ const intro = t("tasks.empty.intro", { query: "" }).split("");+ return (+ <>+ {intro[0]}+ <span className="font-mono text-[var(--ink)]">{query}</span>+ {intro[1] ?? ""}+ </>+ );+ })()}+ <div className="mt-1.5">+ <button+ onClick={() => setQuery("")}+ className="text-[11px] text-[var(--ink-faint)] underline-offset-2 hover:text-[var(--ink)] hover:underline"+ >+ {t("tasks.empty.clear")}+ </button>+ </div>+ </div>+ ) : (+ filtered.map((task) => (+ <TaskCard+ key={task.id}+ task={task}+ active={task.id === activeTaskId}+ canDelete={tasks.length > 1}+ onActivate={() => setActive(task.id)}+ onRename={(name) => renameTask(task.id, name)}+ onDuplicate={() => duplicateTask(task.id)}+ onDelete={() => {+ if (confirm(t("tasks.deleteConfirm", { name: task.name }))) {+ deleteTask(task.id);+ }+ }}+ />+ ))+ )}+ </div>++ <div+ className="px-4 py-2.5 text-[10.5px] text-[var(--ink-faint)]"+ style={{ borderTop: "1px solid var(--line-faint)" }}+ >+ {t("tasks.footer")}+ </div>+ </aside>+ );+}++function TaskCard({+ task,+ active,+ canDelete,+ onActivate,+ onRename,+ onDuplicate,+ onDelete,+}: {+ task: Task;+ active: boolean;+ canDelete: boolean;+ onActivate: () => void;+ onRename: (name: string) => void;+ onDuplicate: () => void;+ onDelete: () => void;+}) {+ const [editing, setEditing] = useState(false);+ const [draft, setDraft] = useState(task.name);+ const inputRef = useRef<HTMLInputElement>(null);+ const templates = useTemplates();+ const tpl = templates?.find((tplDef) => tplDef.id === task.templateId) ?? FALLBACK_TPL;+ const status = STATUS_DOT[task.status];+ const mounted = useMounted();+ const t = useT();+ const locale = useStore((s) => s.locale);++ useEffect(() => {+ if (editing) {+ setDraft(task.name);+ requestAnimationFrame(() => inputRef.current?.select());+ }+ }, [editing, task.name]);++ const commit = () => {+ setEditing(false);+ if (draft.trim() && draft.trim() !== task.name) onRename(draft);+ };++ const preview = task.content.replace(/\s+/g, " ").trim().slice(0, 64);+ const sizeKB = task.html ? `${(task.html.length / 1024).toFixed(1)} KB` : null;++ return (+ <div+ onClick={() => !editing && onActivate()}+ className={`group relative mb-1.5 cursor-pointer rounded-xl px-3 py-2.5 transition-colors ${+ active ? "" : "hover:bg-[var(--surface)]"+ }`}+ style={+ active+ ? {+ background: "var(--surface)",+ boxShadow: "0 1px 0 var(--line-faint), 0 8px 18px -16px rgba(21,20,15,0.18)",+ border: "1px solid var(--line-soft)",+ }+ : { border: "1px solid transparent" }+ }+ >+ <div className="flex items-start gap-2">+ <span+ className={`mt-1 h-2 w-2 shrink-0 rounded-full ${status.live ? "pulse-dot !w-2 !h-2" : ""}`}+ style={{ background: status.color }}+ title={t(status.key)}+ />+ <div className="min-w-0 flex-1">+ <div className="flex items-center gap-1.5">+ {editing ? (+ <input+ ref={inputRef}+ value={draft}+ onChange={(e) => setDraft(e.target.value)}+ onBlur={commit}+ onKeyDown={(e) => {+ if (e.key === "Enter") commit();+ if (e.key === "Escape") setEditing(false);+ }}+ onClick={(e) => e.stopPropagation()}+ className="w-full rounded-md bg-[var(--paper)] px-1.5 py-0.5 text-[13px] font-medium text-[var(--ink)] outline-none ring-1 ring-[var(--coral)]"+ />+ ) : (+ <div+ onDoubleClick={(e) => {+ e.stopPropagation();+ setEditing(true);+ }}+ className="truncate text-[13px] font-semibold text-[var(--ink)]"+ title={t("tasks.renameDblHint")}+ >+ {task.name}+ </div>+ )}+ </div>+ <div className="mt-0.5 flex items-center gap-1 text-[10.5px] text-[var(--ink-mute)]">+ <span>{tpl.emoji}</span>+ <span className="truncate">{locale === "en" ? tpl.enName : tpl.zhName}</span>+ {sizeKB && (+ <>+ <span className="text-[var(--ink-faint)]">·</span>+ <span className="font-mono tabular-nums text-[var(--ink-faint)]">{sizeKB}</span>+ </>+ )}+ </div>+ <div className="mt-1 line-clamp-2 text-[11px] leading-snug text-[var(--ink-mute)]">+ {preview || <span className="italic text-[var(--ink-faint)]">{t("tasks.emptyContent")}</span>}+ </div>+ <div className="mt-1.5 flex items-center justify-between text-[10px] text-[var(--ink-faint)]">+ <span suppressHydrationWarning>{mounted ? relativeTime(task.updatedAt) : ""}</span>+ <div className="flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100">+ <button+ onClick={(e) => {+ e.stopPropagation();+ setEditing(true);+ }}+ className="rounded px-1 py-0.5 hover:text-[var(--ink)]"+ title={t("tasks.rename")}+ >+ ✎+ </button>+ <button+ onClick={(e) => {+ e.stopPropagation();+ onDuplicate();+ }}+ className="rounded px-1 py-0.5 hover:text-[var(--ink)]"+ title={t("tasks.duplicate")}+ >+ ⎘+ </button>+ {canDelete && (+ <button+ onClick={(e) => {+ e.stopPropagation();+ onDelete();+ }}+ className="rounded px-1 py-0.5 hover:text-[var(--red)]"+ title={t("tasks.delete")}+ >+ ✕+ </button>+ )}+ </div>+ </div>+ </div>+ </div>+ </div>+ );+}diff --git a/src/components/template-picker.tsx b/src/components/template-picker.tsxnew file mode 100644index 00000000..b3c72b9e--- /dev/null+++ b/src/components/template-picker.tsx@@ -0,0 +1,582 @@+"use client";++import {+ useTemplates,+ fetchTemplateExample,+ SCENARIO_ORDER,+ scenarioLabelKey,+ type TemplateDef,+} from "@/lib/templates";+import { useStore, selectActiveTask } from "@/lib/store";+import { useT } from "@/lib/i18n";+import { useEffect, useMemo, useRef, useState } from "react";++type Filter = "all" | string;++function rankFeatured(t: TemplateDef): number {+ // smaller comes first; templates without `featured` go to the back of the bucket+ return typeof t.featured === "number" ? t.featured : 9999;+}++function rankRecommended(t: TemplateDef): number {+ return typeof t.recommended === "number" ? t.recommended : 9999;+}++/** Synthetic scenario key for the curated "Featured" group at the top of the picker. */+const FEATURED_KEY = "_featured";++function matchesQuery(tpl: TemplateDef, q: string): boolean {+ if (!q) return true;+ const hay = [+ tpl.zhName,+ tpl.enName,+ tpl.description,+ tpl.aspectHint,+ tpl.category,+ tpl.scenario,+ ...(tpl.tags ?? []),+ ]+ .join(" ")+ .toLowerCase();+ return q+ .toLowerCase()+ .split(/\s+/)+ .filter(Boolean)+ .every((tok) => hay.includes(tok));+}++export function TemplatePicker() {+ const templates = useTemplates();+ const selectedId = useStore((s) => selectActiveTask(s)?.templateId ?? "article-magazine");+ const setSelected = useStore((s) => s.setSelectedTemplate);+ const loadSample = useStore((s) => s.loadSample);+ const locale = useStore((s) => s.locale);+ const t = useT();+ const [open, setOpen] = useState(false);+ const [query, setQuery] = useState("");+ const [filter, setFilter] = useState<Filter>("all");+ const [loadingPreview, setLoadingPreview] = useState<string | null>(null);+ const ref = useRef<HTMLDivElement>(null);+ const inputRef = useRef<HTMLInputElement>(null);+ const list = templates ?? [];+ const tpl = list.find((tplDef) => tplDef.id === selectedId) ?? list[0];+ const scenarioText = (s: string) => {+ const key = scenarioLabelKey(s);+ return key ? t(key) : s;+ };+ const templateName = (def: TemplateDef) => (locale === "en" ? def.enName : def.zhName);++ // hover preview state — load + cache example.html lazily on hover.+ const [hoveredId, setHoveredId] = useState<string | null>(null);+ const previewCache = useRef<Map<string, string>>(new Map());+ const [, forceRender] = useState(0);+ const [hoverLoading, setHoverLoading] = useState(false);+ const hoverEnterTimer = useRef<number | null>(null);+ const hoverLeaveTimer = useRef<number | null>(null);++ useEffect(() => {+ if (!hoveredId) {+ setHoverLoading(false);+ return;+ }+ if (previewCache.current.has(hoveredId)) {+ setHoverLoading(false);+ return;+ }+ let cancelled = false;+ setHoverLoading(true);+ void (async () => {+ const ex = await fetchTemplateExample(hoveredId);+ if (cancelled) return;+ if (ex?.html) {+ previewCache.current.set(hoveredId, ex.html);+ forceRender((n) => n + 1);+ }+ setHoverLoading(false);+ })();+ return () => {+ cancelled = true;+ };+ }, [hoveredId]);++ const hoveredTpl = hoveredId ? list.find((def) => def.id === hoveredId) ?? null : null;+ const hoveredHtml = hoveredId ? previewCache.current.get(hoveredId) ?? null : null;++ useEffect(() => {+ const handler = (e: MouseEvent) => {+ if (open && ref.current && !ref.current.contains(e.target as Node)) setOpen(false);+ };+ document.addEventListener("mousedown", handler);+ return () => document.removeEventListener("mousedown", handler);+ }, [open]);++ // focus search when opening; reset transient state on close+ useEffect(() => {+ if (open) {+ const id = requestAnimationFrame(() => inputRef.current?.focus());+ return () => cancelAnimationFrame(id);+ }+ setQuery("");+ setFilter("all");+ }, [open]);++ // esc closes+ useEffect(() => {+ if (!open) return;+ const onKey = (e: KeyboardEvent) => {+ if (e.key === "Escape") setOpen(false);+ };+ document.addEventListener("keydown", onKey);+ return () => document.removeEventListener("keydown", onKey);+ }, [open]);++ const hasRecommended = useMemo(+ () => list.some((tpl) => typeof tpl.recommended === "number"),+ [list],+ );++ const filterChips = useMemo(() => {+ const present = new Set(list.map((def) => def.scenario));+ const ordered = SCENARIO_ORDER.filter((s) => present.has(s));+ const extras = Array.from(present).filter((s) => !scenarioLabelKey(s));+ return [+ { id: "all", label: t("template.filter.all") },+ ...(hasRecommended ? [{ id: FEATURED_KEY, label: t("template.filter.featured") }] : []),+ ...ordered.map((s) => ({ id: s, label: scenarioText(s) })),+ ...extras.map((s) => ({ id: s, label: s })),+ ];+ }, [list, hasRecommended, t, scenarioText]);++ const grouped = useMemo(() => {+ // explicit "Featured" filter: show only recommended, sorted by recommended rank+ if (filter === FEATURED_KEY) {+ const items = list+ .filter((tpl) => typeof tpl.recommended === "number" && matchesQuery(tpl, query))+ .sort(+ (a, b) =>+ rankRecommended(a) - rankRecommended(b) || a.zhName.localeCompare(b.zhName, "zh"),+ );+ return [{ key: FEATURED_KEY, label: t("template.filter.featured"), items }];+ }++ const filtered = list+ .filter((tpl) => (filter === "all" || tpl.scenario === filter) && matchesQuery(tpl, query))+ .sort((a, b) => rankFeatured(a) - rankFeatured(b) || a.zhName.localeCompare(b.zhName, "zh"));++ // scenario filter or active search: flat result list, no recommended group+ if (filter !== "all" || query) {+ return [{ key: "_results", label: "", items: filtered }];+ }++ // default "全部" view: 推荐 group first, then scenarios (with recommended templates removed+ // so each template appears once)+ const recommendedItems = filtered+ .filter((tpl) => typeof tpl.recommended === "number")+ .sort(+ (a, b) =>+ rankRecommended(a) - rankRecommended(b) || a.zhName.localeCompare(b.zhName, "zh"),+ );+ const rest = filtered.filter((def) => typeof def.recommended !== "number");+ const buckets = new Map<string, TemplateDef[]>();+ for (const def of rest) {+ if (!buckets.has(def.scenario)) buckets.set(def.scenario, []);+ buckets.get(def.scenario)!.push(def);+ }+ const present = SCENARIO_ORDER.filter((s) => buckets.has(s));+ const extras = Array.from(buckets.keys()).filter((s) => !scenarioLabelKey(s));+ const scenarioGroups = [...present, ...extras].map((s) => ({+ key: s,+ label: scenarioText(s),+ items: buckets.get(s)!,+ }));+ return [+ ...(recommendedItems.length > 0+ ? [{ key: FEATURED_KEY, label: t("template.filter.featured"), items: recommendedItems }]+ : []),+ ...scenarioGroups,+ ];+ }, [list, filter, query, t, scenarioText]);++ const total = useMemo(+ () => grouped.reduce((n, g) => n + g.items.length, 0),+ [grouped],+ );++ const onPreview = async (def: TemplateDef) => {+ setLoadingPreview(def.id);+ try {+ const ex = await fetchTemplateExample(def.id);+ if (!ex) return;+ loadSample({+ id: ex.id,+ name: ex.name,+ content: ex.content,+ format: ex.format,+ templateId: ex.templateId,+ html: ex.html,+ });+ setOpen(false);+ } finally {+ setLoadingPreview(null);+ }+ };++ if (!tpl) {+ return (+ <button+ disabled+ className="flex items-center gap-2 rounded-full border px-3 py-1.5 text-[13px]"+ style={{ background: "var(--surface)", borderColor: "var(--line)", opacity: 0.5 }}+ >+ <span className="text-base">⋯</span>+ <span className="font-medium text-[var(--ink)]">{t("template.loading")}</span>+ </button>+ );+ }++ return (+ <div className="relative" ref={ref}>+ <button+ onClick={() => setOpen((o) => !o)}+ className="flex items-center gap-2 rounded-full border px-3 py-1.5 text-[13px] transition-all hover:border-[var(--ink)]/30"+ style={{ background: "var(--surface)", borderColor: "var(--line)" }}+ >+ <span className="text-base">{tpl.emoji}</span>+ <span className="font-medium text-[var(--ink)]">{templateName(tpl)}</span>+ <span className="text-[10px] uppercase tracking-wider text-[var(--ink-faint)]">{tpl.aspectHint}</span>+ <span className="text-[var(--ink-faint)]">▾</span>+ </button>++ {open && (+ <div+ className="absolute left-0 z-30 mt-2 w-[560px] od-fade-in rounded-2xl overflow-hidden flex flex-col"+ style={{+ background: "var(--surface)",+ border: "1px solid var(--line-soft)",+ boxShadow: "0 30px 60px -20px rgba(21, 20, 15, 0.25)",+ maxHeight: "min(640px, 78vh)",+ }}+ >+ {/* sticky header: title + search + chips */}+ <div+ className="px-4 pt-3 pb-2"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--surface)" }}+ >+ <div className="flex items-center justify-between">+ <div className="text-[10px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ {t("template.heading")}+ </div>+ <div className="text-[10px] text-[var(--ink-faint)]">+ {total} / {list.length}+ </div>+ </div>+ <div+ className="mt-2 flex items-center gap-2 rounded-full px-3 py-1.5"+ style={{ background: "var(--paper)", border: "1px solid var(--line-faint)" }}+ >+ <span className="text-[var(--ink-faint)] text-[12px]">⌕</span>+ <input+ ref={inputRef}+ value={query}+ onChange={(e) => setQuery(e.target.value)}+ placeholder={t("template.search.placeholder")}+ className="flex-1 bg-transparent outline-none text-[13px] text-[var(--ink)] placeholder:text-[var(--ink-faint)]"+ />+ {query && (+ <button+ onClick={() => setQuery("")}+ className="text-[11px] text-[var(--ink-faint)] hover:text-[var(--ink)]"+ title={t("template.search.clear")}+ >+ ✕+ </button>+ )}+ </div>+ <div className="mt-2 -mx-1 flex gap-1 overflow-x-auto pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">+ {filterChips.map((c) => {+ const active = filter === c.id;+ return (+ <button+ key={c.id}+ onClick={() => setFilter(c.id)}+ className="shrink-0 rounded-full px-2.5 py-1 text-[11px] transition-colors"+ style={+ active+ ? { background: "var(--ink)", color: "var(--paper)" }+ : { background: "transparent", color: "var(--ink-mute)", border: "1px solid var(--line-faint)" }+ }+ >+ {c.label}+ </button>+ );+ })}+ </div>+ </div>++ {/* scrollable list */}+ <div className="flex-1 overflow-y-auto p-2">+ {total === 0 ? (+ <div className="py-12 text-center text-[12px] text-[var(--ink-faint)]">+ {templates === undefined ? t("template.empty.loading") : t("template.empty.noMatch")}+ </div>+ ) : (+ grouped.map((group) => (+ <div key={group.key} className="mb-2 last:mb-0">+ {group.label && (+ <div+ className="sticky top-0 z-10 px-3 py-1 text-[10px] uppercase tracking-[0.18em] text-[var(--ink-faint)]"+ style={{ background: "var(--surface)" }}+ >+ {group.label}+ </div>+ )}+ <div className="grid grid-cols-1 gap-0.5">+ {group.items.map((def) => {+ const isSelected = selectedId === def.id;+ const hasPreview = !!def.example?.hasHtml;+ const isLoading = loadingPreview === def.id;+ return (+ <div+ key={def.id}+ className="group flex items-start gap-3 rounded-xl px-3 py-2.5 text-left transition-colors hover:bg-[var(--paper)]"+ style={+ isSelected+ ? { background: "var(--coral-soft)" }+ : hoveredId === def.id+ ? { background: "var(--paper)" }+ : undefined+ }+ onMouseEnter={() => {+ if (!def.example?.hasHtml) return;+ if (hoverLeaveTimer.current) {+ window.clearTimeout(hoverLeaveTimer.current);+ hoverLeaveTimer.current = null;+ }+ if (hoverEnterTimer.current) window.clearTimeout(hoverEnterTimer.current);+ hoverEnterTimer.current = window.setTimeout(() => {+ setHoveredId(def.id);+ }, 260);+ }}+ onMouseLeave={() => {+ if (hoverEnterTimer.current) {+ window.clearTimeout(hoverEnterTimer.current);+ hoverEnterTimer.current = null;+ }+ if (hoverLeaveTimer.current) window.clearTimeout(hoverLeaveTimer.current);+ hoverLeaveTimer.current = window.setTimeout(() => {+ setHoveredId((prev) => (prev === def.id ? null : prev));+ }, 180);+ }}+ >+ <button+ onClick={() => {+ setSelected(def.id);+ setOpen(false);+ }}+ className="flex items-start gap-3 flex-1 min-w-0 text-left"+ >+ <span className="text-2xl shrink-0 leading-none mt-0.5">{def.emoji}</span>+ <div className="min-w-0 flex-1">+ <div className="flex items-center gap-2">+ <span className="text-[13.5px] font-semibold text-[var(--ink)] truncate">+ {templateName(def)}+ </span>+ {typeof def.recommended === "number" && (+ <span+ className="shrink-0 text-[9.5px] font-bold"+ style={{ color: "var(--coral)" }}+ title={t("template.filter.featured")}+ >+ {t("template.featured.symbol")}+ </span>+ )}+ <span className="text-[10px] text-[var(--ink-faint)] shrink-0">+ {def.aspectHint}+ </span>+ </div>+ <div className="text-[11.5px] text-[var(--ink-mute)] leading-snug mt-0.5 line-clamp-2">+ {def.description}+ </div>+ </div>+ </button>+ <div className="flex items-center gap-1.5 shrink-0 mt-1">+ {def.example?.source && (+ <a+ href={def.example.source.url}+ target="_blank"+ rel="noreferrer noopener"+ onClick={(e) => e.stopPropagation()}+ className="rounded-full px-2 py-1 text-[10.5px] font-medium transition-all hover:text-[var(--ink)]"+ style={{+ background: "transparent",+ color: "var(--ink-faint)",+ border: "1px solid var(--line-faint)",+ }}+ title={t("template.source.tooltip", { label: def.example.source.label })}+ >+ ↗ {def.example.source.label}+ </a>+ )}+ {hasPreview && (+ <button+ onClick={(e) => {+ e.stopPropagation();+ void onPreview(def);+ }}+ disabled={isLoading}+ className="rounded-full px-2 py-1 text-[10.5px] font-semibold transition-all disabled:opacity-40"+ style={{+ background: "var(--paper)",+ color: "var(--ink-mute)",+ border: "1px solid var(--line-faint)",+ }}+ title={t("template.preview.tooltip")}+ >+ {isLoading ? t("template.preview.loadingButton") : t("template.preview.button")}+ </button>+ )}+ {isSelected && <span className="text-[var(--coral)]">●</span>}+ </div>+ </div>+ );+ })}+ </div>+ </div>+ ))+ )}+ </div>++ {/* footer hint */}+ <div+ className="px-4 py-2 text-[10.5px] text-[var(--ink-faint)] flex items-center justify-between"+ style={{ borderTop: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ <span>+ {t("template.footer.hint.search")} ·{" "}+ <span className="opacity-70">{t("template.footer.hint.filter")}</span> ·{" "}+ <span className="opacity-70">{t("template.footer.hint.hover")}</span> ·{" "}+ <span className="opacity-70">{t("template.footer.hint.preview")}</span>+ </span>+ <span>+ <kbd className="rounded border border-[var(--line-faint)] px-1">Esc</kbd> {t("template.footer.esc")}+ </span>+ </div>+ </div>+ )}++ {/* hover preview popover — appears next to dropdown when a row with example.html is hovered */}+ {open && hoveredTpl && hoveredTpl.example?.hasHtml && (+ <aside+ className="absolute z-30 mt-2 od-fade-in flex flex-col rounded-2xl overflow-hidden"+ style={{+ left: "calc(560px + 12px)",+ top: 0,+ width: 560,+ maxHeight: "min(640px, 78vh)",+ background: "var(--surface)",+ border: "1px solid var(--line-soft)",+ boxShadow: "0 30px 60px -20px rgba(21, 20, 15, 0.25)",+ }}+ onMouseEnter={() => {+ if (hoverLeaveTimer.current) {+ window.clearTimeout(hoverLeaveTimer.current);+ hoverLeaveTimer.current = null;+ }+ }}+ onMouseLeave={() => {+ if (hoverLeaveTimer.current) window.clearTimeout(hoverLeaveTimer.current);+ hoverLeaveTimer.current = window.setTimeout(() => setHoveredId(null), 160);+ }}+ >+ {/* header */}+ <div+ className="px-4 py-3"+ style={{ borderBottom: "1px solid var(--line-faint)", background: "var(--surface)" }}+ >+ <div className="flex items-center gap-2">+ <span className="text-xl leading-none">{hoveredTpl.emoji}</span>+ <div className="min-w-0 flex-1">+ <div className="text-[13.5px] font-semibold text-[var(--ink)] truncate">+ {templateName(hoveredTpl)}+ </div>+ <div className="text-[10.5px] text-[var(--ink-faint)] uppercase tracking-wider">+ {hoveredTpl.aspectHint} · {locale === "en" ? hoveredTpl.zhName : hoveredTpl.enName}+ </div>+ </div>+ {hoveredTpl.example?.source && (+ <a+ href={hoveredTpl.example.source.url}+ target="_blank"+ rel="noreferrer noopener"+ className="shrink-0 rounded-full px-2 py-1 text-[10.5px] font-medium hover:text-[var(--ink)]"+ style={{+ background: "transparent",+ color: "var(--ink-faint)",+ border: "1px solid var(--line-faint)",+ }}+ title={t("template.source.tooltip", { label: hoveredTpl.example.source.label })}+ >+ ↗ {hoveredTpl.example.source.label}+ </a>+ )}+ </div>+ </div>++ {/* scaled iframe thumbnail */}+ <div+ className="relative flex-1"+ style={{+ background: "var(--paper)",+ height: 400,+ overflow: "hidden",+ }}+ >+ {hoverLoading && !hoveredHtml && (+ <div className="absolute inset-0 flex items-center justify-center text-[12px] text-[var(--ink-faint)]">+ {t("template.popover.loading")}+ </div>+ )}+ {hoveredHtml && (+ <iframe+ key={hoveredTpl.id}+ title={templateName(hoveredTpl)}+ srcDoc={hoveredHtml}+ sandbox="allow-scripts allow-same-origin"+ style={{+ width: 1280,+ height: 960,+ border: 0,+ transform: "scale(0.4375)",+ transformOrigin: "top left",+ pointerEvents: "none",+ }}+ />+ )}+ </div>++ {/* footer */}+ <div+ className="px-4 py-2 text-[10.5px] text-[var(--ink-faint)] flex items-center justify-between"+ style={{ borderTop: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ <span className="line-clamp-1">{hoveredTpl.example?.tagline ?? hoveredTpl.description}</span>+ <button+ onClick={(e) => {+ e.stopPropagation();+ void onPreview(hoveredTpl);+ }}+ className="shrink-0 rounded-full px-2 py-1 text-[10.5px] font-semibold transition-all"+ style={{+ background: "var(--ink)",+ color: "var(--paper)",+ }}+ title={t("template.popover.loadIntoTooltip")}+ >+ {t("template.popover.loadInto")}+ </button>+ </div>+ </aside>+ )}+ </div>+ );+}diff --git a/src/components/toolbar.tsx b/src/components/toolbar.tsxnew file mode 100644index 00000000..0a1a5c7a--- /dev/null+++ b/src/components/toolbar.tsx@@ -0,0 +1,161 @@+"use client";++import { useEffect } from "react";+import { useStore, selectActiveTask } from "@/lib/store";+import { useT } from "@/lib/i18n";+import { useConvert } from "@/lib/use-convert";+import { TemplatePicker } from "./template-picker";+import { ExportMenu } from "./export-menu";+import { LayoutModeToggle } from "./layout-mode-toggle";++export function Toolbar({+ iframeRef,+ onOpenAgentPicker,+ onOpenSettings,+}: {+ iframeRef: React.MutableRefObject<HTMLIFrameElement | null>;+ onOpenAgentPicker: () => void;+ onOpenSettings: () => void;+}) {+ const agent = useStore((s) => s.selectedAgent);+ const agents = useStore((s) => s.agents);+ const agentModels = useStore((s) => s.agentModels);+ const activeTaskId = useStore((s) => s.activeTaskId);+ const template = useStore((s) => selectActiveTask(s)?.templateId ?? "article-magazine");+ const content = useStore((s) => selectActiveTask(s)?.content ?? "");+ const format = useStore((s) => selectActiveTask(s)?.format ?? "text");+ const status = useStore((s) => selectActiveTask(s)?.status ?? "idle");+ const { run, cancel } = useConvert();+ const t = useT();++ const agentInfo = agents.find((a) => a.id === agent);+ const model = agent ? agentModels[agent] ?? "default" : "default";+ const canConvert =+ !!agent && !!content.trim() && status !== "running" && !agentInfo?.unsupported;++ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {+ e.preventDefault();+ if (canConvert)+ run({ taskId: activeTaskId, agent: agent!, templateId: template, content, format, model });+ }+ };+ window.addEventListener("keydown", onKey);+ return () => window.removeEventListener("keydown", onKey);+ }, [canConvert, agent, template, content, format, model, run, activeTaskId]);++ return (+ <header+ className="relative z-20 flex flex-wrap items-center justify-between gap-3 px-5 py-3"+ style={{+ background: "rgba(250, 249, 247, 0.92)",+ borderBottom: "1px solid var(--line-faint)",+ backdropFilter: "blur(10px)",+ }}+ >+ <div className="flex items-center gap-4">+ <Brand />+ <div className="hidden h-6 w-px sm:block" style={{ background: "var(--line)" }} />+ <button+ onClick={onOpenAgentPicker}+ className="flex items-center gap-2.5 rounded-full border px-3 py-1.5 text-[13px] transition-all hover:border-[var(--ink)]/30"+ style={{ background: "var(--surface)", borderColor: "var(--line)" }}+ title={t("toolbar.switchAgent")}+ >+ {agentInfo ? (+ <>+ <span className="pulse-dot" />+ <span className="font-medium text-[var(--ink)]">{agentInfo.label}</span>+ {model !== "default" && (+ <span+ className="rounded px-1.5 py-0.5 text-[10.5px] font-mono"+ style={{ background: "var(--paper)", color: "var(--ink-mute)", border: "1px solid var(--line-faint)" }}+ title={`model = ${model}`}+ >+ {model}+ </span>+ )}+ <span className="text-[var(--ink-faint)]">›</span>+ </>+ ) : (+ <>+ <span className="grid h-4 w-4 place-items-center rounded-full bg-[var(--coral)] text-[9px] text-white font-bold">!</span>+ <span className="font-medium text-[var(--coral)]">{t("toolbar.selectAgent")}</span>+ </>+ )}+ </button>+ <TemplatePicker />+ </div>++ <div className="flex items-center gap-2">+ <LayoutModeToggle />+ <div className="hidden h-6 w-px sm:block" style={{ background: "var(--line)" }} />+ <button+ onClick={onOpenSettings}+ className="grid h-9 w-9 place-items-center rounded-full border text-[var(--ink-soft)] transition-all hover:border-[var(--ink)]/30 hover:text-[var(--ink)]"+ style={{ background: "var(--surface)", borderColor: "var(--line)" }}+ title={t("toolbar.settings")}+ aria-label={t("toolbar.settings")}+ >+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">+ <circle cx="12" cy="12" r="3" />+ <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33h.01a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82v.01a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />+ </svg>+ </button>+ {status === "running" ? (+ <button+ onClick={() => cancel(activeTaskId)}+ className="btn-ghost"+ style={{ borderColor: "var(--coral)", color: "var(--coral)" }}+ >+ {t("toolbar.stop")}+ </button>+ ) : (+ <button+ onClick={() =>+ agent && run({ taskId: activeTaskId, agent, templateId: template, content, format, model })+ }+ disabled={!canConvert}+ className="btn-primary"+ title={+ !agent+ ? t("toolbar.firstSelectAgent")+ : agentInfo?.unsupported+ ? t("toolbar.unsupportedProtocol")+ : !content.trim()+ ? t("toolbar.enterContent")+ : t("toolbar.shortcutHint")+ }+ >+ {t("toolbar.convert")}+ <span className="hidden text-[11px] opacity-70 sm:inline">⌘↵</span>+ </button>+ )}+ <ExportMenu iframeRef={iframeRef} />+ </div>+ </header>+ );+}++function Brand() {+ const t = useT();+ return (+ <a href="/" className="flex items-center gap-2.5">+ <div+ className="grid h-9 w-9 place-items-center rounded-full font-[family-name:var(--font-serif)] italic text-[18px] font-semibold text-[var(--ink)]"+ style={{ border: "1.5px solid var(--ink)", background: "var(--surface)" }}+ >+ H+ </div>+ <div className="leading-tight">+ <div className="text-[14px] font-semibold tracking-tight text-[var(--ink)] font-[family-name:var(--font-display)]">+ HTML <em className="serif-em not-italic font-[family-name:var(--font-serif)] italic font-semibold">Anything</em>+ </div>+ <div className="text-[9.5px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ {t("brand.subtitle")}+ </div>+ </div>+ </a>+ );+}diff --git a/src/components/upload-dropzone.tsx b/src/components/upload-dropzone.tsxnew file mode 100644index 00000000..48ebfb72--- /dev/null+++ b/src/components/upload-dropzone.tsx@@ -0,0 +1,76 @@+"use client";++import { useCallback, useRef, useState } from "react";+import { parseFile } from "@/lib/parsers/file";+import { useStore } from "@/lib/store";+import { useT } from "@/lib/i18n";++export function UploadDropzone() {+ const [active, setActive] = useState(false);+ const inputRef = useRef<HTMLInputElement>(null);+ const setContent = useStore((s) => s.setContent);+ const setFormat = useStore((s) => s.setFormat);+ const setFilename = useStore((s) => s.setFilename);+ const pushLog = useStore((s) => s.pushLog);+ const t = useT();++ const onFiles = useCallback(+ async (files: FileList | null) => {+ if (!files || files.length === 0) return;+ const file = files[0];+ try {+ const parsed = await parseFile(file);+ setContent(parsed.text);+ setFormat(parsed.format);+ setFilename(parsed.filename);+ pushLog({+ kind: "info",+ text: t("upload.loadedLog", { name: parsed.filename ?? "", fmt: parsed.format }),+ });+ } catch (e) {+ pushLog({+ kind: "error",+ text: t("upload.failedLog", { err: e instanceof Error ? e.message : String(e) }),+ });+ }+ },+ [setContent, setFormat, setFilename, pushLog, t],+ );++ return (+ <div+ onDragOver={(e) => {+ e.preventDefault();+ setActive(true);+ }}+ onDragLeave={() => setActive(false)}+ onDrop={(e) => {+ e.preventDefault();+ setActive(false);+ onFiles(e.dataTransfer?.files ?? null);+ }}+ className={`flex h-full flex-col items-center justify-center gap-3 rounded-2xl p-8 text-center text-sm transition-colors ${+ active ? "dropzone-active" : ""+ }`}+ style={{+ background: "var(--paper)",+ border: "2px dashed var(--line)",+ color: "var(--ink-mute)",+ }}+ >+ <div className="text-4xl">📂</div>+ <div className="font-semibold text-[var(--ink)] text-[15px]">{t("upload.title")}</div>+ <div className="text-xs text-[var(--ink-faint)]">{t("upload.types")}</div>+ <button onClick={() => inputRef.current?.click()} className="btn-ink mt-2">+ {t("upload.button")}+ </button>+ <input+ ref={inputRef}+ type="file"+ className="hidden"+ accept=".md,.txt,.csv,.tsv,.xlsx,.xls,.json,.sql,.yaml,.yml,.png,.jpg,.jpeg,.gif,.webp,.svg,.html,.htm,.xml,.log"+ onChange={(e) => onFiles(e.target.files)}+ />+ </div>+ );+}diff --git a/src/components/welcome-modal.tsx b/src/components/welcome-modal.tsxnew file mode 100644index 00000000..b8500808--- /dev/null+++ b/src/components/welcome-modal.tsx@@ -0,0 +1,416 @@+"use client";++import { useEffect, useState } from "react";+import { useStore, type AgentInfo } from "@/lib/store";+import { useT, type DictKey } from "@/lib/i18n";++const PROTOCOL_KEY: Record<AgentInfo["protocol"], { key: DictKey; tone: "ok" | "warn" }> = {+ stdin: { key: "protocol.stdin", tone: "ok" },+ argv: { key: "protocol.argv", tone: "ok" },+ acp: { key: "protocol.acp", tone: "warn" },+ "pi-rpc": { key: "protocol.piRpc", tone: "warn" },+};++const VENDOR_HINT: Record<string, { gradient: string; install: string }> = {+ Anthropic: {+ gradient: "from-[#c96442] to-[#e9b94a]",+ install: "npm i -g @anthropic-ai/claude-code · claude /login",+ },+ OpenAI: {+ gradient: "from-[#10a37f] to-[#1f7a3a]",+ install: "npm i -g @openai/codex",+ },+ Cursor: {+ gradient: "from-[#5b6cf2] to-[#a1a8f5]",+ install: "curl https://cursor.com/install -fsS | bash",+ },+ Google: {+ gradient: "from-[#4285f4] to-[#34a853]",+ install: "npm i -g @google/gemini-cli",+ },+ GitHub: {+ gradient: "from-[#24292e] to-[#444c56]",+ install: "gh extension install github/gh-copilot",+ },+ Open: {+ gradient: "from-[#6e7448] to-[#b26200]",+ install: "npm i -g @opencode-ai/cli",+ },+ Alibaba: {+ gradient: "from-[#ff7a00] to-[#ed6f5c]",+ install: "npm i -g @alibabacloud/qwen-code",+ },+ Aider: {+ gradient: "from-[#6c3aa6] to-[#9c2a25]",+ install: "pip install aider-install && aider-install",+ },+ DeepSeek: {+ gradient: "from-[#2563eb] to-[#7c3aed]",+ install: "cargo install deepseek · deepseek auth",+ },+ Cognition: {+ gradient: "from-[#0f172a] to-[#475569]",+ install: "curl -fsSL https://cli.devin.ai/install.sh | bash",+ },+ Mature: {+ gradient: "from-[#7c2d12] to-[#b45309]",+ install: "npm i -g @mature/hermes-cli · hermes login",+ },+ Moonshot: {+ gradient: "from-[#0ea5e9] to-[#1e3a8a]",+ install: "npm i -g @moonshot-ai/kimi-cli · kimi login",+ },+ Inflection: {+ gradient: "from-[#a855f7] to-[#ec4899]",+ install: "curl -fsSL https://pi.ai/install.sh | bash · pi login",+ },+ AWS: {+ gradient: "from-[#ff9900] to-[#232f3e]",+ install: "brew install kiro · kiro-cli login",+ },+ Kilo: {+ gradient: "from-[#16a34a] to-[#0d9488]",+ install: "npm i -g kilo · kilo login",+ },+ Mistral: {+ gradient: "from-[#fb923c] to-[#ef4444]",+ install: "npm i -g @mistralai/vibe-cli · vibe login",+ },+ Qoder: {+ gradient: "from-[#0891b2] to-[#7c3aed]",+ install: "brew tap qoder/cli && brew install qodercli · qodercli login",+ },+};++type Props = { onClose: () => void };++export function WelcomeModal({ onClose }: Props) {+ const setSelectedAgent = useStore((s) => s.setSelectedAgent);+ const setWelcomeAck = useStore((s) => s.setWelcomeAck);+ const setAgents = useStore((s) => s.setAgents);+ const setAgentModel = useStore((s) => s.setAgentModel);+ const agents = useStore((s) => s.agents);+ const selected = useStore((s) => s.selectedAgent);+ const agentModels = useStore((s) => s.agentModels);+ const t = useT();++ const [loading, setLoading] = useState(false);+ const [err, setErr] = useState<string | null>(null);++ const load = async () => {+ setLoading(true);+ setErr(null);+ try {+ const res = await fetch("/api/agents", { cache: "no-store" });+ if (!res.ok) throw new Error(`HTTP ${res.status}`);+ const data = (await res.json()) as { agents: AgentInfo[] };+ setAgents(data.agents);+ const installed = data.agents.filter((a) => a.available);+ if (!installed.find((a) => a.id === selected) && installed.length) {+ setSelectedAgent(installed[0].id);+ }+ } catch (e) {+ setErr(e instanceof Error ? e.message : "detection failed");+ } finally {+ setLoading(false);+ }+ };++ useEffect(() => {+ load();+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);++ const installed = agents.filter((a) => a.available);+ const missing = agents.filter((a) => !a.available);+ const selectedAgent = installed.find((a) => a.id === selected);+ const selectedModelId = selected ? agentModels[selected] ?? "default" : "default";+ const canEnter = !!selectedAgent && !selectedAgent.unsupported;++ const confirm = () => {+ if (!canEnter) return;+ setWelcomeAck(true);+ onClose();+ };++ return (+ <div+ className="fixed inset-0 z-50 flex items-center justify-center od-backdrop"+ style={{ background: "rgba(21, 20, 15, 0.45)", backdropFilter: "blur(6px)" }}+ onClick={(e) => {+ if (e.target === e.currentTarget && canEnter) confirm();+ }}+ >+ <div+ className="relative w-[640px] max-w-[92vw] max-h-[88vh] flex flex-col overflow-hidden od-fade-in"+ style={{+ background: "var(--surface)",+ borderRadius: 24,+ border: "1px solid var(--line-soft)",+ boxShadow: "0 40px 80px -20px rgba(21, 20, 15, 0.35)",+ }}+ >+ {/* Header */}+ <div className="px-8 pt-8 pb-5 border-b" style={{ borderColor: "var(--line-faint)" }}>+ <div className="flex items-center justify-between">+ <span className="eyebrow">{t("welcome.eyebrow")}</span>+ <button+ onClick={load}+ disabled={loading}+ className="text-xs text-[var(--ink-faint)] hover:text-[var(--ink)] disabled:opacity-50 transition-colors"+ title={t("welcome.rescanTitle")}+ >+ {loading ? t("welcome.scanning") : t("welcome.rescan")}+ </button>+ </div>+ <h1 className="mt-3 text-[28px] leading-[1.18] font-semibold tracking-tight text-[var(--ink)] font-[family-name:var(--font-display)]">+ {t("welcome.titlePart1")} <em className="serif-em">{t("welcome.titleAccent")}</em>+ </h1>+ <p className="mt-2 text-[13.5px] text-[var(--ink-mute)] leading-relaxed">+ {t("welcome.description")}+ </p>+ </div>++ {/* Agent grid */}+ <div className="flex-1 overflow-y-auto px-8 py-6">+ {err && (+ <div className="mb-4 rounded-xl px-4 py-3 text-sm" style={{ background: "var(--coral-soft)", color: "var(--coral)" }}>+ {t("welcome.detectionFailed")}: {err}+ </div>+ )}++ {installed.length > 0 && (+ <>+ <div className="mb-3 flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ <span className="pulse-dot" /> {t("welcome.installed", { n: installed.length })}+ </div>+ <div className="grid grid-cols-1 gap-2 sm:grid-cols-2">+ {installed.map((a) => (+ <AgentCard+ key={a.id}+ agent={a}+ selected={selected === a.id}+ onClick={() => setSelectedAgent(a.id)}+ />+ ))}+ </div>+ </>+ )}++ {missing.length > 0 && (+ <>+ <div className="mt-6 mb-3 flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">+ {t("welcome.notInstalled", { n: missing.length })}+ </div>+ <div className="grid grid-cols-1 gap-2">+ {missing.map((a) => (+ <MissingCard key={a.id} agent={a} />+ ))}+ </div>+ </>+ )}++ {!loading && installed.length === 0 && (+ <div className="rounded-2xl border-2 border-dashed py-10 px-6 text-center" style={{ borderColor: "var(--line)" }}>+ <div className="text-3xl mb-2">🪞</div>+ <p className="text-sm font-medium text-[var(--ink-soft)]">{t("welcome.noAgentsTitle")}</p>+ <p className="mt-2 text-xs text-[var(--ink-mute)]">{t("welcome.noAgentsBody")}</p>+ </div>+ )}++ {selectedAgent && (+ <ModelPicker+ agent={selectedAgent}+ modelId={selectedModelId}+ onPick={(id) => setAgentModel(selectedAgent.id, id)}+ />+ )}+ </div>++ {/* Footer */}+ <div+ className="px-8 py-5 flex items-center justify-between gap-4"+ style={{ borderTop: "1px solid var(--line-faint)", background: "var(--paper)" }}+ >+ <div className="text-xs text-[var(--ink-mute)] truncate">+ {selectedAgent ? (+ <>+ {t("welcome.current")}: <strong className="text-[var(--ink)]">{selectedAgent.label}</strong>+ {selectedModelId !== "default" && (+ <span className="ml-1 text-[var(--ink-faint)]">· {selectedModelId}</span>+ )}+ {selectedAgent.unsupported && (+ <span className="ml-2 text-[var(--coral)]">{t("welcome.unsupportedHint")}</span>+ )}+ </>+ ) : (+ <>{t("welcome.pickInstalled")}</>+ )}+ </div>+ <div className="flex gap-2 shrink-0">+ <button+ onClick={() => {+ setWelcomeAck(true);+ onClose();+ }}+ className="btn-ghost"+ >+ {t("welcome.later")}+ </button>+ <button+ onClick={confirm}+ disabled={!canEnter}+ className="btn-primary"+ title={+ !selectedAgent+ ? t("welcome.enterTooltip.noAgent")+ : selectedAgent.unsupported+ ? t("welcome.enterTooltip.unsupported")+ : t("welcome.enterTooltip.ok")+ }+ >+ {t("welcome.enter")}+ </button>+ </div>+ </div>+ </div>+ </div>+ );+}++function AgentCard({+ agent,+ selected,+ onClick,+}: {+ agent: AgentInfo;+ selected: boolean;+ onClick: () => void;+}) {+ const t = useT();+ const hint = VENDOR_HINT[agent.vendor];+ const proto = PROTOCOL_KEY[agent.protocol];+ return (+ <button+ onClick={onClick}+ className={`group relative flex items-start gap-3 rounded-2xl p-4 text-left transition-all ${+ selected ? "ring-2 ring-[var(--coral)]" : "ring-1 ring-[var(--line-soft)] hover:ring-[var(--ink)]/30"+ }`}+ style={{ background: "var(--surface)" }}+ >+ <div+ className={`shrink-0 grid h-9 w-9 place-items-center rounded-xl text-white shadow-sm bg-gradient-to-br ${+ hint?.gradient ?? "from-[var(--ink)] to-[var(--ink-soft)]"+ }`}+ >+ <span className="font-semibold text-[15px]">{agent.label.charAt(0)}</span>+ </div>+ <div className="min-w-0 flex-1">+ <div className="flex items-center gap-2">+ <div className="text-[14px] font-semibold text-[var(--ink)] truncate">{agent.label}</div>+ {selected && (+ <span className="text-[10px] font-bold uppercase tracking-wider text-[var(--coral)]">+ {t("agent.selected")}+ </span>+ )}+ </div>+ <div className="flex items-center gap-2 text-[11px] text-[var(--ink-faint)] mt-0.5">+ <span>{agent.vendor}</span>+ <span>·</span>+ <span className={proto.tone === "warn" ? "text-[var(--coral)]" : ""}>{t(proto.key)}</span>+ </div>+ {agent.path && (+ <div className="font-mono text-[10px] text-[var(--ink-mute)] mt-1.5 truncate" title={agent.path}>+ {agent.path}+ </div>+ )}+ </div>+ </button>+ );+}++function ModelPicker({+ agent,+ modelId,+ onPick,+}: {+ agent: AgentInfo;+ modelId: string;+ onPick: (id: string) => void;+}) {+ const t = useT();+ const models = agent.models.length+ ? agent.models+ : [{ id: "default", label: t("model.defaultLabel") }];+ const MARK = "";+ const [before, after = ""] = t("model.label", { agent: MARK }).split(MARK);+ return (+ <div+ className="mt-6 rounded-2xl p-4"+ style={{ background: "var(--paper)", border: "1px solid var(--line-faint)" }}+ >+ <div className="flex items-center justify-between gap-3 mb-3">+ <div>+ <div className="text-[11px] uppercase tracking-[0.18em] text-[var(--ink-faint)]">{t("model.eyebrow")}</div>+ <div className="text-[13px] font-medium text-[var(--ink-soft)] mt-0.5">+ {before}+ <strong className="text-[var(--ink)]">{agent.label}</strong>+ {after}+ </div>+ </div>+ <div className="text-[10.5px] text-[var(--ink-mute)] max-w-[200px] text-right leading-snug">+ {t("model.defaultHint.prefix")}+ <code className="px-1 rounded bg-[var(--surface)] border border-[var(--line-faint)]">--model</code>+ {t("model.defaultHint.suffix")}+ </div>+ </div>+ <div className="flex flex-wrap gap-1.5">+ {models.map((m) => {+ const active = m.id === modelId;+ return (+ <button+ key={m.id}+ onClick={() => onPick(m.id)}+ className={`rounded-full px-3 py-1.5 text-[12px] transition-all ${+ active+ ? "bg-[var(--ink)] text-[var(--paper)] font-medium"+ : "bg-[var(--surface)] text-[var(--ink-soft)] border border-[var(--line-soft)] hover:border-[var(--ink)]/40"+ }`}+ title={m.id}+ >+ {m.label}+ </button>+ );+ })}+ </div>+ </div>+ );+}++function MissingCard({ agent }: { agent: AgentInfo }) {+ const t = useT();+ const hint = VENDOR_HINT[agent.vendor];+ return (+ <div+ className="flex items-center gap-3 rounded-xl p-3 opacity-70"+ style={{ background: "var(--paper)", border: "1px solid var(--line-faint)" }}+ >+ <div+ className={`shrink-0 grid h-8 w-8 place-items-center rounded-lg text-white text-[13px] font-semibold bg-gradient-to-br ${+ hint?.gradient ?? "from-[var(--ink-faint)] to-[var(--ink-mute)]"+ }`}+ >+ {agent.label.charAt(0)}+ </div>+ <div className="min-w-0 flex-1">+ <div className="text-[13px] font-medium text-[var(--ink-soft)]">{agent.label}</div>+ {hint && (+ <div className="font-mono text-[10.5px] text-[var(--ink-faint)] truncate" title={hint.install}>+ {hint.install}+ </div>+ )}+ </div>+ <span className="text-[10px] uppercase tracking-wider text-[var(--ink-faint)]">{t("agent.notInstalled")}</span>+ </div>+ );+}diff --git a/src/lib/agents/argv.ts b/src/lib/agents/argv.tsnew file mode 100644index 00000000..16c27db2--- /dev/null+++ b/src/lib/agents/argv.ts@@ -0,0 +1,283 @@+export type AgentArgvOpts = {+ model?: string;+ cwd?: string;+ /** When the adapter takes the prompt as a positional argv (deepseek). */+ prompt?: string;+};++export class UnsupportedAgentProtocolError extends Error {+ constructor(public readonly agent: string, public readonly protocol: string) {+ super(+ `${agent} uses the ${protocol} protocol, which is not yet wired up in this build. ` ++ `Pick one of: claude / codex / cursor-agent / gemini / copilot / opencode / qwen / qoder / deepseek / aider.`,+ );+ }+}++export function buildArgv(agent: string, _opts: AgentArgvOpts = {}): string[] {+ const { model } = _opts;+ switch (agent) {+ case "claude":+ return [+ "-p",+ "--output-format",+ "stream-json",+ "--verbose",+ "--include-partial-messages",+ "--permission-mode",+ "bypassPermissions",+ ...(model ? ["--model", model] : []),+ ];+ case "codex":+ return [+ "exec",+ "--json",+ "--skip-git-repo-check",+ "--sandbox",+ "workspace-write",+ "-c",+ "sandbox_workspace_write.network_access=true",+ ...(model ? ["--model", model] : []),+ ];+ case "cursor-agent":+ return [+ "--print",+ "--output-format",+ "stream-json",+ "--stream-partial-output",+ "--force",+ "--trust",+ ...(model ? ["--model", model] : []),+ ];+ case "gemini":+ return [+ "--output-format",+ "stream-json",+ "--yolo",+ ...(model ? ["--model", model] : []),+ ];+ case "copilot":+ return [+ "--allow-all-tools",+ "--output-format",+ "json",+ ...(model ? ["--model", model] : []),+ ];+ case "opencode":+ return [+ "run",+ "--format",+ "json",+ "--dangerously-skip-permissions",+ ...(model ? ["--model", model] : []),+ "-",+ ];+ case "qwen":+ return ["--yolo", ...(model ? ["--model", model] : []), "-"];+ case "aider":+ return [+ "--no-pretty",+ "--no-stream",+ "--yes-always",+ "--message-file",+ "-",+ ...(model ? ["--model", model] : []),+ ];+ case "qoder":+ // Qoder CLI mirrors `claude -p`'s shape: print mode + stream-json + yolo+ // for non-interactive approval. Prompt arrives via stdin (handled in+ // invoke.ts). See open-design's apps/daemon/src/agents.ts.+ return [+ "-p",+ "--output-format",+ "stream-json",+ "--yolo",+ ...(model ? ["--model", model] : []),+ ];+ case "deepseek":+ // DeepSeek's `exec --auto` requires the prompt as a positional arg;+ // there's no `-` stdin sentinel. invoke.ts appends opts.prompt at+ // spawn time, so we leave the trailing slot empty here.+ return ["exec", "--auto", ...(model ? ["--model", model] : [])];+ case "hermes":+ case "kimi":+ case "devin":+ case "kiro":+ case "kilo":+ case "vibe":+ throw new UnsupportedAgentProtocolError(agent, "ACP JSON-RPC");+ case "pi":+ throw new UnsupportedAgentProtocolError(agent, "pi-rpc");+ default:+ throw new Error(`unknown agent: ${agent}`);+ }+}++export function envFor(agent: string): NodeJS.ProcessEnv {+ const base = { ...process.env };+ if (agent === "gemini") base.GEMINI_CLI_TRUST_WORKSPACE = "true";+ return base;+}++export type AgentParse =+ | { kind: "delta"; text: string }+ | { kind: "meta"; key: string; value: unknown }+ | { kind: "noise" };++/**+ * Parse a single line of agent stdout. Returns either a text delta, a metadata+ * event (model/usage/cost/etc), or noise.+ */+export function parseLine(agent: string, line: string): AgentParse[] {+ const trimmed = line.trim();+ if (!trimmed) return [];++ // Aider / DeepSeek — plain text streaming on stdout (DeepSeek tool calls+ // go to stderr, which is forwarded as `stderr` events, not parsed here).+ if (agent === "aider" || agent === "deepseek") {+ return [{ kind: "delta", text: trimmed.endsWith("\n") ? trimmed : trimmed + "\n" }];+ }++ let parsed: unknown;+ try {+ parsed = JSON.parse(trimmed);+ } catch {+ return [{ kind: "noise" }];+ }+ if (!parsed || typeof parsed !== "object") return [];+ const obj = parsed as Record<string, unknown>;+ const out: AgentParse[] = [];++ if (agent === "claude") {+ // Init / system metadata+ if (obj.type === "system" && obj.subtype === "init") {+ out.push({ kind: "meta", key: "model", value: obj.model });+ out.push({ kind: "meta", key: "session", value: obj.session_id });+ if (obj.cwd) out.push({ kind: "meta", key: "cwd", value: obj.cwd });+ }+ // Stream events (--include-partial-messages → fine-grained text_delta)+ if (obj.type === "stream_event" && obj.event && typeof obj.event === "object") {+ const ev = obj.event as { type?: string; delta?: { type?: string; text?: string; thinking?: string } };+ if (ev.type === "content_block_delta" && ev.delta?.type === "text_delta" && typeof ev.delta.text === "string") {+ out.push({ kind: "delta", text: ev.delta.text });+ } else if (ev.type === "content_block_delta" && ev.delta?.type === "thinking_delta") {+ out.push({ kind: "meta", key: "thinking", value: ev.delta.thinking });+ }+ }+ // Full assistant messages — only used as fallback when stream events absent (i.e. no --include-partial-messages on old claude)+ if (obj.type === "assistant" && obj.message && typeof obj.message === "object") {+ const msg = obj.message as {+ content?: Array<{ type?: string; text?: string }>;+ usage?: Record<string, number>;+ model?: string;+ };+ // Only emit text if no stream_event blocks observed (the caller dedupes)+ const text = (msg.content ?? [])+ .filter((c) => c?.type === "text" && typeof c.text === "string")+ .map((c) => c.text!)+ .join("");+ if (text) out.push({ kind: "delta", text });+ if (msg.usage) out.push({ kind: "meta", key: "usage_partial", value: msg.usage });+ }+ if (obj.type === "result") {+ if (obj.usage) out.push({ kind: "meta", key: "usage", value: obj.usage });+ if (typeof obj.duration_ms === "number") out.push({ kind: "meta", key: "duration_ms", value: obj.duration_ms });+ if (typeof obj.total_cost_usd === "number") out.push({ kind: "meta", key: "cost_usd", value: obj.total_cost_usd });+ if (typeof obj.subtype === "string") out.push({ kind: "meta", key: "result", value: obj.subtype });+ }+ if (obj.type === "rate_limit_event" && obj.rate_limit_info) {+ out.push({ kind: "meta", key: "rate_limit", value: obj.rate_limit_info });+ }+ }++ if (agent === "codex") {+ if (obj.type === "item.completed" && obj.item && typeof obj.item === "object") {+ const item = obj.item as { item_type?: string; text?: string };+ if (item.item_type === "assistant_message" && typeof item.text === "string") {+ out.push({ kind: "delta", text: item.text });+ }+ }+ if (obj.type === "item.delta" && typeof obj.text === "string") {+ out.push({ kind: "delta", text: obj.text });+ }+ if (obj.msg && typeof obj.msg === "object") {+ const msg = obj.msg as { type?: string; message?: string };+ if (msg.type === "agent_message" && typeof msg.message === "string") {+ out.push({ kind: "delta", text: msg.message });+ }+ }+ if (obj.type === "task_complete" && obj.usage) {+ out.push({ kind: "meta", key: "usage", value: obj.usage });+ }+ }++ if (agent === "cursor-agent" || agent === "gemini") {+ if (obj.type === "stream_event" && obj.event && typeof obj.event === "object") {+ const ev = obj.event as { type?: string; delta?: { type?: string; text?: string } };+ if (ev.delta?.type === "text_delta" && typeof ev.delta.text === "string") {+ out.push({ kind: "delta", text: ev.delta.text });+ }+ }+ if (obj.type === "assistant" && obj.message && typeof obj.message === "object") {+ const msg = obj.message as { content?: Array<{ type?: string; text?: string }> };+ const text = (msg.content ?? [])+ .filter((c) => c?.type === "text" && typeof c.text === "string")+ .map((c) => c.text!)+ .join("");+ if (text) out.push({ kind: "delta", text });+ }+ if (typeof obj.text === "string") out.push({ kind: "delta", text: obj.text as string });+ }++ if (agent === "copilot") {+ if (typeof obj.response === "string") out.push({ kind: "delta", text: obj.response });+ if (typeof obj.text === "string") out.push({ kind: "delta", text: obj.text });+ }++ if (agent === "opencode" || agent === "qwen") {+ if (typeof obj.text === "string") out.push({ kind: "delta", text: obj.text });+ if (typeof obj.content === "string") out.push({ kind: "delta", text: obj.content });+ if (typeof obj.message === "string") out.push({ kind: "delta", text: obj.message });+ }++ if (agent === "qoder") {+ // Qoder's stream-json output mirrors claude's envelope shape (init/system,+ // stream_event with content_block_delta/text_delta, assistant message,+ // result with usage). Parse generously across both fine-grained deltas and+ // full assistant turns. Falls back to a bare `text` field for+ // forward-compatibility with future Qoder JSON variants.+ if (obj.type === "system" && obj.subtype === "init") {+ if (obj.model) out.push({ kind: "meta", key: "model", value: obj.model });+ if (obj.session_id) out.push({ kind: "meta", key: "session", value: obj.session_id });+ }+ if (obj.type === "stream_event" && obj.event && typeof obj.event === "object") {+ const ev = obj.event as { type?: string; delta?: { type?: string; text?: string } };+ if (ev.type === "content_block_delta" && ev.delta?.type === "text_delta" && typeof ev.delta.text === "string") {+ out.push({ kind: "delta", text: ev.delta.text });+ }+ }+ if (obj.type === "assistant" && obj.message && typeof obj.message === "object") {+ const msg = obj.message as { content?: Array<{ type?: string; text?: string }> };+ const text = (msg.content ?? [])+ .filter((c) => c?.type === "text" && typeof c.text === "string")+ .map((c) => c.text!)+ .join("");+ if (text) out.push({ kind: "delta", text });+ }+ if (obj.type === "result") {+ if (obj.usage) out.push({ kind: "meta", key: "usage", value: obj.usage });+ if (typeof obj.duration_ms === "number") out.push({ kind: "meta", key: "duration_ms", value: obj.duration_ms });+ }+ if (typeof obj.text === "string") out.push({ kind: "delta", text: obj.text });+ }++ return out;+}++/** Back-compat shim for callers that just want plain text. */+export function extractTextFromLine(agent: string, line: string): string {+ return parseLine(agent, line)+ .filter((p): p is Extract<AgentParse, { kind: "delta" }> => p.kind === "delta")+ .map((p) => p.text)+ .join("");+}diff --git a/src/lib/agents/detect.ts b/src/lib/agents/detect.tsnew file mode 100644index 00000000..543add94--- /dev/null+++ b/src/lib/agents/detect.ts@@ -0,0 +1,366 @@+import { existsSync } from "node:fs";+import { homedir } from "node:os";+import path, { delimiter, join } from "node:path";++/**+ * Per-agent invocation protocol. Determines what `invokeAgent` does with the+ * prompt and how it parses output:+ * - "stdin" : pipe prompt → child stdin, parse stdout via parseLine+ * - "argv" : pass prompt as positional argv (deepseek), parse stdout as plain+ * - "acp" : ACP JSON-RPC over stdio (hermes/kimi/devin/kiro/kilo/vibe).+ * Not implemented in this build — surfaced in detection so the+ * user sees install instructions, but invoke emits a clear+ * error pointing them to a supported agent.+ * - "pi-rpc" : pi's custom JSON-RPC mode. Same status as "acp".+ */+export type AgentProtocol = "stdin" | "argv" | "acp" | "pi-rpc";++export type ModelOption = { id: string; label: string };++/** Synthetic "let the CLI pick" entry — agent runs without `--model`. */+export const DEFAULT_MODEL: ModelOption = { id: "default", label: "Default (CLI config)" };++export type AgentDef = {+ id: string;+ label: string;+ bin: string;+ fallbackBins?: string[];+ envOverride?: string;+ vendor: string;+ /** Defaults to "stdin" when omitted. */+ protocol?: AgentProtocol;+ /**+ * Curated, evidence-based model list shown in the picker. Always begins+ * with `DEFAULT_MODEL` (= no `--model` flag → user's CLI config wins).+ * Mirrors open-design's `fallbackModels` for each adapter.+ */+ fallbackModels: ModelOption[];+};++export const AGENTS: AgentDef[] = [+ // Drop-in fork list (`fallbackBins`) covers CLIs that ship under a different+ // binary name but speak the exact same argv protocol. Today: openclaude /+ // openclaw — both are community Claude Code forks (issue #235 in open-design).+ {+ id: "claude",+ label: "Claude Code",+ bin: "claude",+ fallbackBins: ["openclaude", "openclaw"],+ envOverride: "CLAUDE_BIN",+ vendor: "Anthropic",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "sonnet", label: "Sonnet (alias)" },+ { id: "opus", label: "Opus (alias)" },+ { id: "haiku", label: "Haiku (alias)" },+ { id: "claude-opus-4-7", label: "claude-opus-4-7" },+ { id: "claude-sonnet-4-6", label: "claude-sonnet-4-6" },+ { id: "claude-haiku-4-5", label: "claude-haiku-4-5" },+ ],+ },+ {+ id: "codex",+ label: "OpenAI Codex",+ bin: "codex",+ envOverride: "CODEX_BIN",+ vendor: "OpenAI",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "gpt-5.5", label: "gpt-5.5" },+ { id: "gpt-5.4", label: "gpt-5.4" },+ { id: "gpt-5.4-mini", label: "gpt-5.4-mini" },+ { id: "gpt-5.3-codex", label: "gpt-5.3-codex" },+ { id: "gpt-5-codex", label: "gpt-5-codex" },+ { id: "gpt-5", label: "gpt-5" },+ { id: "o3", label: "o3" },+ { id: "o4-mini", label: "o4-mini" },+ ],+ },+ {+ id: "cursor-agent",+ label: "Cursor Agent",+ bin: "cursor-agent",+ envOverride: "CURSOR_AGENT_BIN",+ vendor: "Cursor",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "auto", label: "auto" },+ { id: "sonnet-4", label: "sonnet-4" },+ { id: "sonnet-4-thinking", label: "sonnet-4-thinking" },+ { id: "gpt-5", label: "gpt-5" },+ ],+ },+ {+ id: "gemini",+ label: "Gemini CLI",+ bin: "gemini",+ envOverride: "GEMINI_BIN",+ vendor: "Google",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "gemini-2.5-pro", label: "gemini-2.5-pro" },+ { id: "gemini-2.5-flash", label: "gemini-2.5-flash" },+ ],+ },+ {+ id: "copilot",+ label: "GitHub Copilot CLI",+ bin: "copilot",+ envOverride: "COPILOT_BIN",+ vendor: "GitHub",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "claude-sonnet-4.6", label: "Claude Sonnet 4.6" },+ { id: "gpt-5.2", label: "GPT-5.2" },+ ],+ },+ {+ id: "opencode",+ label: "OpenCode",+ bin: "opencode-cli",+ fallbackBins: ["opencode"],+ envOverride: "OPENCODE_BIN",+ vendor: "Open",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "anthropic/claude-sonnet-4-5", label: "anthropic/claude-sonnet-4-5" },+ { id: "openai/gpt-5", label: "openai/gpt-5" },+ { id: "google/gemini-2.5-pro", label: "google/gemini-2.5-pro" },+ ],+ },+ {+ id: "qwen",+ label: "Qwen Coder",+ bin: "qwen",+ envOverride: "QWEN_BIN",+ vendor: "Alibaba",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "qwen3-coder-plus", label: "qwen3-coder-plus" },+ { id: "qwen3-coder-flash", label: "qwen3-coder-flash" },+ ],+ },+ {+ id: "qoder",+ label: "Qoder CLI",+ bin: "qodercli",+ envOverride: "QODER_BIN",+ vendor: "Qoder",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "lite", label: "Lite" },+ { id: "efficient", label: "Efficient" },+ { id: "auto", label: "Auto" },+ { id: "performance", label: "Performance" },+ { id: "ultimate", label: "Ultimate" },+ ],+ },+ {+ id: "deepseek",+ label: "DeepSeek TUI",+ bin: "deepseek",+ envOverride: "DEEPSEEK_BIN",+ vendor: "DeepSeek",+ protocol: "argv",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "deepseek-v4-pro", label: "deepseek-v4-pro" },+ { id: "deepseek-v4-flash", label: "deepseek-v4-flash" },+ ],+ },+ {+ id: "aider",+ label: "Aider",+ bin: "aider",+ vendor: "Aider",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "claude-sonnet-4-5", label: "claude-sonnet-4-5" },+ { id: "gpt-5", label: "gpt-5" },+ { id: "deepseek/deepseek-chat", label: "deepseek/deepseek-chat" },+ ],+ },++ // ACP family — detection-only. Models still surfaced for UI completeness.+ {+ id: "hermes",+ label: "Hermes",+ bin: "hermes",+ envOverride: "HERMES_BIN",+ vendor: "Mature",+ protocol: "acp",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "openai-codex:gpt-5.5", label: "gpt-5.5 (openai-codex)" },+ { id: "openai-codex:gpt-5.4", label: "gpt-5.4 (openai-codex)" },+ ],+ },+ {+ id: "kimi",+ label: "Kimi CLI",+ bin: "kimi",+ envOverride: "KIMI_BIN",+ vendor: "Moonshot",+ protocol: "acp",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "kimi-k2-turbo-preview", label: "kimi-k2-turbo-preview" },+ { id: "moonshot-v1-8k", label: "moonshot-v1-8k" },+ { id: "moonshot-v1-32k", label: "moonshot-v1-32k" },+ ],+ },+ {+ id: "devin",+ label: "Devin for Terminal",+ bin: "devin",+ envOverride: "DEVIN_BIN",+ vendor: "Cognition",+ protocol: "acp",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "adaptive", label: "adaptive" },+ { id: "swe", label: "swe" },+ { id: "opus", label: "opus" },+ { id: "sonnet", label: "sonnet" },+ { id: "codex", label: "codex" },+ { id: "gpt", label: "gpt" },+ { id: "gemini", label: "gemini" },+ ],+ },+ {+ id: "kiro",+ label: "Kiro CLI",+ bin: "kiro-cli",+ envOverride: "KIRO_BIN",+ vendor: "AWS",+ protocol: "acp",+ fallbackModels: [DEFAULT_MODEL],+ },+ {+ id: "kilo",+ label: "Kilo",+ bin: "kilo",+ envOverride: "KILO_BIN",+ vendor: "Kilo",+ protocol: "acp",+ fallbackModels: [DEFAULT_MODEL],+ },+ {+ id: "vibe",+ label: "Mistral Vibe CLI",+ bin: "vibe-acp",+ envOverride: "VIBE_BIN",+ vendor: "Mistral",+ protocol: "acp",+ fallbackModels: [DEFAULT_MODEL],+ },+ {+ id: "pi",+ label: "Pi",+ bin: "pi",+ envOverride: "PI_BIN",+ vendor: "Inflection",+ protocol: "pi-rpc",+ fallbackModels: [+ DEFAULT_MODEL,+ { id: "anthropic/claude-sonnet-4-5", label: "Claude Sonnet 4.5" },+ { id: "anthropic/claude-opus-4-5", label: "Claude Opus 4.5" },+ { id: "openai/gpt-5", label: "GPT-5" },+ { id: "google/gemini-2.5-pro", label: "Gemini 2.5 Pro" },+ ],+ },+];++function userToolchainDirs(): string[] {+ const home = homedir();+ const env = process.env;+ const dirs: string[] = [];+ const vp = env.VP_HOME?.trim();+ if (vp) dirs.push(join(vp, "bin"));+ const npmPrefix = env.NPM_CONFIG_PREFIX?.trim();+ if (npmPrefix) dirs.push(join(npmPrefix, "bin"));+ dirs.push(+ join(home, ".local/bin"),+ join(home, ".vite-plus/bin"),+ join(home, ".opencode/bin"),+ join(home, ".bun/bin"),+ join(home, ".volta/bin"),+ join(home, ".asdf/shims"),+ join(home, "Library/pnpm"),+ join(home, ".cargo/bin"),+ join(home, ".npm-global/bin"),+ join(home, ".npm-packages/bin"),+ join(home, ".claude/local"),+ );+ if (process.platform !== "win32") {+ dirs.push("/opt/homebrew/bin", "/usr/local/bin");+ }+ return dirs;+}++export function resolveOnPath(bin: string): string | null {+ const exts =+ process.platform === "win32"+ ? (process.env.PATHEXT ?? ".EXE;.CMD;.BAT").split(";")+ : [""];+ const seen = new Set<string>();+ const dirs = [+ ...(process.env.PATH ?? "").split(delimiter),+ ...userToolchainDirs(),+ ].filter((d) => d && !seen.has(d) && (seen.add(d), true));+ for (const d of dirs) {+ for (const e of exts) {+ const full = path.join(d, bin + e);+ try {+ if (existsSync(full)) return full;+ } catch {+ // ignore+ }+ }+ }+ return null;+}++export type DetectedAgent = {+ id: string;+ label: string;+ vendor: string;+ available: boolean;+ path?: string;+ resolvedBin?: string;+ protocol: AgentProtocol;+ /**+ * Curated model picker list. Sent to the client so the welcome modal can+ * render a dropdown without a follow-up round trip.+ */+ models: ModelOption[];+ /** True when the adapter cannot be invoked yet (acp / pi-rpc). */+ unsupported?: boolean;+};++export function detectAgents(): DetectedAgent[] {+ return AGENTS.map((a): DetectedAgent => {+ const protocol = a.protocol ?? "stdin";+ const unsupported = protocol === "acp" || protocol === "pi-rpc";+ const base = {+ id: a.id,+ label: a.label,+ vendor: a.vendor,+ protocol,+ models: a.fallbackModels,+ unsupported: unsupported || undefined,+ };+ const override = a.envOverride ? process.env[a.envOverride] : undefined;+ if (override && existsSync(override)) {+ return { ...base, available: true, path: override, resolvedBin: a.bin };+ }+ const candidates = [a.bin, ...(a.fallbackBins ?? [])];+ for (const c of candidates) {+ const p = resolveOnPath(c);+ if (p) {+ return { ...base, available: true, path: p, resolvedBin: c };+ }+ }+ return { ...base, available: false };+ });+}diff --git a/src/lib/agents/invoke.ts b/src/lib/agents/invoke.tsnew file mode 100644index 00000000..ed204cb4--- /dev/null+++ b/src/lib/agents/invoke.ts@@ -0,0 +1,167 @@+import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";+import { resolveOnPath, AGENTS } from "./detect";+import { buildArgv, envFor, parseLine, UnsupportedAgentProtocolError } from "./argv";++export type InvokeOpts = {+ agent: string;+ prompt: string;+ cwd?: string;+ model?: string;+ signal?: AbortSignal;+};++export type InvokeEvent =+ | { type: "start"; bin: string; argv: string[]; promptBytes: number }+ | { type: "delta"; text: string }+ | { type: "meta"; key: string; value: unknown }+ | { type: "stderr"; text: string }+ | { type: "raw"; text: string }+ | { type: "done"; code: number | null }+ | { type: "error"; message: string };++export function invokeAgent(opts: InvokeOpts): ReadableStream<InvokeEvent> {+ const def = AGENTS.find((a) => a.id === opts.agent);+ if (!def) {+ return errorStream(`unknown agent: ${opts.agent}`);+ }+ const candidates = [def.bin, ...(def.fallbackBins ?? [])];+ let bin: string | null = null;+ for (const c of candidates) {+ bin = resolveOnPath(c);+ if (bin) break;+ }+ if (!bin) {+ return errorStream(+ `${def.label} (\`${def.bin}\`) is not installed or not on PATH.`,+ );+ }++ let argv: string[];+ try {+ argv = buildArgv(opts.agent, { model: opts.model, prompt: opts.prompt });+ } catch (err) {+ return errorStream(+ err instanceof UnsupportedAgentProtocolError+ ? err.message+ : err instanceof Error+ ? err.message+ : String(err),+ );+ }+ // `protocol: "argv"` adapters (deepseek today) take the prompt as a+ // trailing positional arg rather than reading from stdin.+ const promptViaArgv = def.protocol === "argv";+ if (promptViaArgv) argv = [...argv, opts.prompt];+ const env = envFor(opts.agent);++ return new ReadableStream<InvokeEvent>({+ start(controller) {+ let closed = false;+ let child: ChildProcessWithoutNullStreams | null = null;++ const safeEnqueue = (ev: InvokeEvent) => {+ if (closed) return;+ try {+ controller.enqueue(ev);+ } catch {+ closed = true;+ }+ };+ const safeClose = () => {+ if (closed) return;+ closed = true;+ try {+ controller.close();+ } catch {}+ };++ try {+ child = spawn(bin!, argv, {+ cwd: opts.cwd ?? process.cwd(),+ env,+ stdio: ["pipe", "pipe", "pipe"],+ });+ } catch (err) {+ safeEnqueue({+ type: "error",+ message: err instanceof Error ? err.message : String(err),+ });+ safeClose();+ return;+ }++ safeEnqueue({+ type: "start",+ bin: bin!,+ argv,+ promptBytes: Buffer.byteLength(opts.prompt, "utf8"),+ });++ child.stdin.on("error", () => {});+ try {+ if (!promptViaArgv) child.stdin.write(opts.prompt);+ child.stdin.end();+ } catch {}++ let stdoutBuf = "";+ child.stdout.setEncoding("utf8");+ child.stdout.on("data", (chunk: string) => {+ if (closed) return;+ stdoutBuf += chunk;+ let nl: number;+ while ((nl = stdoutBuf.indexOf("\n")) !== -1) {+ const line = stdoutBuf.slice(0, nl);+ stdoutBuf = stdoutBuf.slice(nl + 1);+ if (!line) continue;+ for (const part of parseLine(opts.agent, line)) {+ if (part.kind === "delta") safeEnqueue({ type: "delta", text: part.text });+ else if (part.kind === "meta") safeEnqueue({ type: "meta", key: part.key, value: part.value });+ else safeEnqueue({ type: "raw", text: line.slice(0, 240) });+ }+ }+ });++ child.stderr.setEncoding("utf8");+ child.stderr.on("data", (chunk: string) => {+ safeEnqueue({ type: "stderr", text: chunk });+ });++ child.on("error", (err) => {+ safeEnqueue({ type: "error", message: err.message });+ safeClose();+ });++ child.on("close", (code) => {+ if (stdoutBuf) {+ for (const part of parseLine(opts.agent, stdoutBuf)) {+ if (part.kind === "delta") safeEnqueue({ type: "delta", text: part.text });+ else if (part.kind === "meta") safeEnqueue({ type: "meta", key: part.key, value: part.value });+ }+ if (opts.agent === "aider" || opts.agent === "deepseek") {+ safeEnqueue({ type: "delta", text: stdoutBuf });+ }+ }+ safeEnqueue({ type: "done", code });+ safeClose();+ });++ const onAbort = () => {+ try {+ child?.kill("SIGTERM");+ } catch {}+ safeClose();+ };+ opts.signal?.addEventListener("abort", onAbort, { once: true });+ },+ cancel() {},+ });+}++function errorStream(message: string): ReadableStream<InvokeEvent> {+ return new ReadableStream<InvokeEvent>({+ start(controller) {+ controller.enqueue({ type: "error", message });+ controller.close();+ },+ });+}diff --git a/src/lib/deck.ts b/src/lib/deck.tsnew file mode 100644index 00000000..877a96a4--- /dev/null+++ b/src/lib/deck.ts@@ -0,0 +1,142 @@+/**+ * Deck mode helpers.+ *+ * The convention adopted by every deck skill (see+ * `src/lib/templates/skills/deck-<id>/SKILL.md`) is that each page is a top-level+ *+ * <section class="slide" data-slide-id="N"> … </section>+ *+ * inside `<body>`. Optional speaker notes live in a `<aside class="notes">`+ * inside that section. This module extracts those sections and rebuilds each+ * one as a standalone HTML document so the deck viewer can render and+ * screenshot slides one-by-one.+ */+export type DeckSlide = {+ /** Standalone HTML doc (head + just-this-slide body) for srcdoc / screenshot */+ html: string;+ /** Speaker notes plain text, if any */+ notes: string;+ /** Slide id from data-slide-id, or 1-based index */+ id: string;+ /** Section's bg color (best-effort) for the strip thumbnail bg */+ bg?: string;+};++export type DeckParsed = {+ isDeck: boolean;+ slides: DeckSlide[];+ /** Original `<head>` (used to copy fonts, Tailwind CDN, custom <style>) */+ head: string;+ /** Body classes — copied so per-slide layout stays consistent */+ bodyClass: string;+ bodyStyle: string;+ /** Document title for filenames */+ title: string;+};++const SLIDE_RE = /<section\b[^>]*\bclass\s*=\s*["'][^"']*\bslide\b[^"']*["'][^>]*>[\s\S]*?<\/section>/gi;++/** Cheap test — true if the document looks like a deck (has ≥1 `<section class="slide">`). */+export function isDeck(html: string): boolean {+ if (!html) return false;+ SLIDE_RE.lastIndex = 0;+ return SLIDE_RE.test(html);+}++function pick(re: RegExp, src: string): string {+ const m = re.exec(src);+ return m ? m[1] : "";+}++function decodeEntities(s: string): string {+ return s+ .replace(/&/g, "&")+ .replace(/</g, "<")+ .replace(/>/g, ">")+ .replace(/"/g, '"')+ .replace(/'/g, "'");+}++function stripTags(s: string): string {+ return decodeEntities(s.replace(/<[^>]+>/g, " ")).replace(/\s+/g, " ").trim();+}++function extractAttr(tag: string, name: string): string {+ const re = new RegExp(`\\b${name}\\s*=\\s*["']([^"']*)["']`, "i");+ return pick(re, tag);+}++/**+ * Parse a full deck HTML doc into per-slide standalone docs.+ * No-op + isDeck:false when the doc has no `<section class="slide">`.+ */+export function parseDeck(fullHtml: string): DeckParsed {+ const empty: DeckParsed = {+ isDeck: false,+ slides: [],+ head: "",+ bodyClass: "",+ bodyStyle: "",+ title: "deck",+ };+ if (!isDeck(fullHtml)) return empty;++ const head = pick(/<head\b[^>]*>([\s\S]*?)<\/head>/i, fullHtml);+ const bodyTag = pick(/<body\b([^>]*)>/i, fullHtml);+ const bodyClass = extractAttr(bodyTag, "class");+ const bodyStyle = extractAttr(bodyTag, "style");+ const title = stripTags(pick(/<title\b[^>]*>([\s\S]*?)<\/title>/i, head)) || "deck";++ const slides: DeckSlide[] = [];+ SLIDE_RE.lastIndex = 0;+ let m: RegExpExecArray | null;+ let idx = 0;+ while ((m = SLIDE_RE.exec(fullHtml))) {+ idx += 1;+ const sectionHtml = m[0];+ const openTag = pick(/<section\b[^>]*>/i, sectionHtml);+ const dataId = extractAttr(openTag, "data-slide-id");+ const inlineStyle = extractAttr(openTag, "style");+ const bg = pick(/background(?:-color)?\s*:\s*([^;"']+)/i, inlineStyle).trim() || undefined;++ // Pull out speaker notes — show them in the notes panel, hide them in+ // the slide canvas (they're meant for the speaker, not the audience).+ let notes = "";+ const slideForRender = sectionHtml.replace(+ /<aside\b[^>]*\bclass\s*=\s*["'][^"']*\bnotes\b[^"']*["'][^>]*>([\s\S]*?)<\/aside>/i,+ (_full, inner: string) => {+ notes = stripTags(inner);+ return "";+ },+ );++ const standalone =+ `<!DOCTYPE html><html><head>${head}\n` ++ // Make a single slide fill the iframe regardless of the original page's+ // global flex / grid centering. Most deck templates already use+ // `.slide { width:1920px; height:1080px; transform: scale(...) }`,+ // so we just neutralize body padding and let the slide live alone.+ `<style>+ html, body { margin:0; padding:0; }+ body { display:flex; align-items:center; justify-content:center; min-height:100vh; }+ .slide { transform-origin: center center !important; }+</style></head>` ++ `<body class="${bodyClass}" style="${bodyStyle}">${slideForRender}</body></html>`;++ slides.push({+ html: standalone,+ notes,+ id: dataId || String(idx),+ bg,+ });+ }++ return {+ isDeck: slides.length > 0,+ slides,+ head,+ bodyClass,+ bodyStyle,+ title,+ };+}diff --git a/src/lib/drafts.ts b/src/lib/drafts.tsnew file mode 100644index 00000000..cecfd0c6--- /dev/null+++ b/src/lib/drafts.ts@@ -0,0 +1,92 @@+"use client";++/**+ * Lightweight drafts history kept in localStorage. Survives refresh.+ * Snapshots a content string at most every `MIN_GAP_MS` and keeps the most+ * recent `MAX_SNAPSHOTS`. We intentionally key these *separately* from the+ * zustand persist store so a corrupted store can never wipe your drafts.+ */+// Legacy key from the old "HTML Everything" brand; do NOT rename — every+// existing user's draft history lives under this localStorage key.+const KEY = "html-everything-drafts";+const MAX_SNAPSHOTS = 8;+const MIN_GAP_MS = 30_000; // do not snapshot more than once per 30s+const MIN_DELTA = 30; // ignore tiny edits++export type Draft = {+ ts: number;+ format: string;+ filename?: string;+ preview: string; // first 80 chars+ bytes: number;+ content: string;+};++function read(): Draft[] {+ if (typeof window === "undefined") return [];+ try {+ const raw = localStorage.getItem(KEY);+ if (!raw) return [];+ const arr = JSON.parse(raw) as Draft[];+ return Array.isArray(arr) ? arr : [];+ } catch {+ return [];+ }+}++function write(list: Draft[]) {+ if (typeof window === "undefined") return;+ try {+ localStorage.setItem(KEY, JSON.stringify(list));+ } catch (err) {+ // localStorage might be full — drop oldest until it fits+ let trimmed = list.slice(-Math.max(2, list.length - 2));+ for (let i = 0; i < 5 && trimmed.length; i++) {+ try {+ localStorage.setItem(KEY, JSON.stringify(trimmed));+ return;+ } catch {+ trimmed = trimmed.slice(1);+ }+ }+ console.warn("drafts: localStorage write failed", err);+ }+}++export function listDrafts(): Draft[] {+ return read().sort((a, b) => b.ts - a.ts);+}++export function snapshotDraft(content: string, format: string, filename?: string): Draft | null {+ if (!content || content.trim().length < 20) return null;+ const list = read();+ const last = list[list.length - 1];+ const now = Date.now();+ if (last) {+ const sameContent = last.content === content;+ const tooSoon = now - last.ts < MIN_GAP_MS;+ const tooSimilar = Math.abs(content.length - last.content.length) < MIN_DELTA;+ if (sameContent || (tooSoon && tooSimilar)) return null;+ }+ const draft: Draft = {+ ts: now,+ format,+ filename,+ preview: content.replace(/\s+/g, " ").slice(0, 80),+ bytes: content.length,+ content,+ };+ const next = [...list, draft].slice(-MAX_SNAPSHOTS);+ write(next);+ return draft;+}++export function deleteDraft(ts: number) {+ const next = read().filter((d) => d.ts !== ts);+ write(next);+}++export function clearDrafts() {+ if (typeof window === "undefined") return;+ localStorage.removeItem(KEY);+}diff --git a/src/lib/export/clipboard.ts b/src/lib/export/clipboard.tsnew file mode 100644index 00000000..2bee5b40--- /dev/null+++ b/src/lib/export/clipboard.ts@@ -0,0 +1,88 @@+"use client";++/**+ * Write rich-text HTML to the clipboard with a plain-text fallback.+ * Tries the modern ClipboardItem API first, falls back to execCommand for Safari.+ */+export async function copyHtml(html: string, plain?: string): Promise<void> {+ const fallback = plain ?? stripTags(html);++ if (typeof window === "undefined") throw new Error("server-side");++ if (navigator.clipboard && typeof window.ClipboardItem !== "undefined") {+ try {+ await navigator.clipboard.write([+ new ClipboardItem({+ "text/html": new Blob([html], { type: "text/html" }),+ "text/plain": new Blob([fallback], { type: "text/plain" }),+ }),+ ]);+ return;+ } catch {+ // fall through+ }+ }++ await copySafari(html, fallback);+}++export async function copyImage(blob: Blob): Promise<void> {+ if (!navigator.clipboard || typeof window.ClipboardItem === "undefined") {+ throw new Error("Image clipboard not supported in this browser");+ }+ await navigator.clipboard.write([+ new ClipboardItem({ [blob.type]: blob }),+ ]);+}++export async function copyText(text: string): Promise<void> {+ if (navigator.clipboard?.writeText) {+ try {+ await navigator.clipboard.writeText(text);+ return;+ } catch {}+ }+ await copySafari(text, text);+}++function copySafari(html: string, plain: string): Promise<void> {+ return new Promise((resolve, reject) => {+ let input = document.getElementById("__copy_helper") as HTMLInputElement | null;+ if (!input) {+ input = document.createElement("input");+ input.id = "__copy_helper";+ Object.assign(input.style, {+ position: "absolute",+ left: "-1000px",+ zIndex: "-1000",+ } as CSSStyleDeclaration);+ document.body.appendChild(input);+ }+ input.value = " ";+ input.focus();+ input.select();+ const handler = (e: ClipboardEvent) => {+ e.preventDefault();+ e.clipboardData?.setData("text/html", html);+ e.clipboardData?.setData("text/plain", plain);+ document.removeEventListener("copy", handler);+ };+ document.addEventListener("copy", handler);+ try {+ const ok = document.execCommand("copy");+ ok ? resolve() : reject(new Error("execCommand returned false"));+ } catch (err) {+ reject(err);+ }+ });+}++function stripTags(html: string): string {+ if (typeof DOMParser === "undefined") return html;+ try {+ const doc = new DOMParser().parseFromString(html, "text/html");+ return doc.body.textContent ?? "";+ } catch {+ return html.replace(/<[^>]+>/g, "");+ }+}diff --git a/src/lib/export/deck.ts b/src/lib/export/deck.tsnew file mode 100644index 00000000..7e2898f8--- /dev/null+++ b/src/lib/export/deck.ts@@ -0,0 +1,188 @@+"use client";++import type { DeckSlide } from "@/lib/deck";+import { iframeToBlob, downloadBlob } from "./image";++/**+ * Render every slide off-screen one at a time and snapshot it. We re-use the+ * existing `iframeToBlob` helper (which already handles fonts / images /+ * Tailwind CDN) — much more reliable than trying to clone the DOM ourselves.+ *+ * The off-screen iframe is sized at the slide's native canvas (1920×1080 by+ * convention) so the screenshot captures the un-scaled layout.+ */+async function renderSlideToBlob(slide: DeckSlide, scale = 2): Promise<Blob> {+ const wrap = document.createElement("div");+ // Park it off-screen with a known width — every deck-* skill targets a+ // 1920×1080 canvas, but other decks may not. We size the iframe big enough+ // to host the slide's natural width; iframeToBlob measures the document.+ wrap.style.cssText = `+ position: fixed;+ top: 0; left: -100000px;+ width: 1920px; height: 1080px;+ overflow: hidden;+ pointer-events: none;+ z-index: -1;+ `;+ const iframe = document.createElement("iframe");+ iframe.setAttribute("title", `slide-${slide.id}`);+ iframe.setAttribute("sandbox", "allow-same-origin allow-scripts");+ iframe.style.cssText = `+ width: 1920px; height: 1080px; border: 0; background: ${slide.bg ?? "#fff"};+ `;+ // We need a tweaked srcdoc that *doesn't* center / scale — for screenshot+ // we want the slide rendered at 1:1.+ iframe.srcdoc = slide.html.replace(+ /\.slide\s*\{\s*transform-origin[^}]*\}/i,+ ".slide { transform: none !important; transform-origin: top left !important; }",+ ).replace(+ /body\s*\{\s*display:flex;\s*align-items:center;\s*justify-content:center;\s*min-height:100vh;\s*\}/,+ "body { margin:0; padding:0; }",+ );+ wrap.appendChild(iframe);+ document.body.appendChild(wrap);++ try {+ // Wait for the iframe to commit srcdoc and load.+ await new Promise<void>((res) => {+ const done = () => res();+ if (iframe.contentDocument?.readyState === "complete") return done();+ iframe.addEventListener("load", done, { once: true });+ setTimeout(done, 4000);+ });+ return await iframeToBlob(iframe, { scale });+ } finally {+ wrap.remove();+ }+}++/** Export every slide as a PNG and bundle them into a single ZIP. */+export async function exportDeckPngZip(+ slides: DeckSlide[],+ basename = "deck",+ onProgress?: (i: number, total: number) => void,+): Promise<void> {+ if (slides.length === 0) throw new Error("no slides");+ // Lazy-load JSZip — keeps initial bundle small.+ const { default: JSZip } = await import("jszip");+ const zip = new JSZip();+ const pad = (n: number) => String(n).padStart(2, "0");+ for (let i = 0; i < slides.length; i++) {+ onProgress?.(i + 1, slides.length);+ const blob = await renderSlideToBlob(slides[i]);+ zip.file(`${basename}-${pad(i + 1)}.png`, blob);+ }+ const out = await zip.generateAsync({ type: "blob" });+ downloadBlob(out, `${basename}-${Date.now()}.zip`);+}++/** Export the deck as a multi-slide PPTX. Each slide goes in as a full-bleed PNG. */+export async function exportDeckPptx(+ slides: DeckSlide[],+ basename = "deck",+ onProgress?: (i: number, total: number) => void,+): Promise<void> {+ if (slides.length === 0) throw new Error("no slides");+ const { default: PptxGenJS } = await import("pptxgenjs");+ const pptx = new PptxGenJS();+ pptx.layout = "LAYOUT_WIDE"; // 13.333 × 7.5 inches → 16:9+ for (let i = 0; i < slides.length; i++) {+ onProgress?.(i + 1, slides.length);+ const blob = await renderSlideToBlob(slides[i]);+ const dataUrl = await blobToDataUrl(blob);+ const s = pptx.addSlide();+ s.addImage({ data: dataUrl, x: 0, y: 0, w: "100%", h: "100%" });+ if (slides[i].notes) s.addNotes(slides[i].notes);+ }+ await pptx.writeFile({ fileName: `${basename}-${Date.now()}.pptx` });+}++/**+ * Print to PDF. We open a new window stacking every slide back-to-back at+ * 1920×1080 with `@page` matching, then trigger the browser's print dialog —+ * the user picks "Save as PDF". This avoids shipping a PDF lib (which would+ * either render at low fidelity or balloon the bundle).+ */+export function exportDeckPrint(slides: DeckSlide[], title = "deck"): void {+ if (slides.length === 0) throw new Error("no slides");+ const w = window.open("", "_blank");+ if (!w) throw new Error("popup blocked — allow popups to print/PDF the deck");++ // Strip the per-slide centering wrapper we added in `parseDeck`; here we+ // want each slide laid out one after another at native size for printing.+ const sectionsHtml = slides+ .map((s) => {+ // Pull just the <body>...</body> of the standalone doc so the parent+ // print page's <head> wins for sizing/printing.+ const bodyMatch = /<body[^>]*>([\s\S]*?)<\/body>/i.exec(s.html);+ const inner = bodyMatch ? bodyMatch[1] : s.html;+ return `<div class="page" style="background:${s.bg ?? "#fff"}">${inner}</div>`;+ })+ .join("\n");++ // Carry over the deck's <head> from the first slide so fonts / Tailwind CDN+ // / inline <style> still apply.+ const headMatch = /<head[^>]*>([\s\S]*?)<\/head>/i.exec(slides[0].html);+ const head = headMatch ? headMatch[1] : "";++ w.document.open();+ w.document.write(`<!DOCTYPE html>+<html>+<head>+<meta charset="utf-8" />+<title>${escapeHtml(title)}</title>+${head}+<style>+ @page { size: 1920px 1080px; margin: 0; }+ html, body { margin: 0; padding: 0; background: #000; }+ .page {+ width: 1920px; height: 1080px;+ overflow: hidden; position: relative;+ page-break-after: always; break-after: page;+ }+ .page:last-child { page-break-after: auto; break-after: auto; }+ /* Most deck templates apply transform: scale(...) at preview-fit ratios.+ For print we want native size — neutralize. */+ .page .slide { transform: none !important; }+ @media screen {+ body { display: flex; flex-direction: column; gap: 24px; padding: 24px; align-items: center; }+ .page { transform: scale(0.5); transform-origin: top left; height: 540px; width: 960px; }+ }+</style>+</head>+<body>+${sectionsHtml}+<script>+ // Wait for fonts / images / iframes to settle before opening the print+ // dialog — otherwise the Tailwind CDN may still be injecting styles.+ function ready(cb) {+ if (document.readyState === 'complete') return cb();+ window.addEventListener('load', cb, { once: true });+ }+ ready(function () {+ setTimeout(function () { window.focus(); window.print(); }, 600);+ });+</script>+</body>+</html>`);+ w.document.close();+}++function blobToDataUrl(blob: Blob): Promise<string> {+ return new Promise((res, rej) => {+ const r = new FileReader();+ r.onload = () => res(String(r.result));+ r.onerror = () => rej(r.error);+ r.readAsDataURL(blob);+ });+}++function escapeHtml(s: string): string {+ return s.replace(/[&<>"']/g, (c) => ({+ "&": "&",+ "<": "<",+ ">": ">",+ '"': """,+ "'": "'",+ })[c]!);+}diff --git a/src/lib/export/download.ts b/src/lib/export/download.tsnew file mode 100644index 00000000..b1958b06--- /dev/null+++ b/src/lib/export/download.ts@@ -0,0 +1,13 @@+"use client";++import { downloadBlob } from "./image";++export function downloadHtml(html: string, basename = "html-anything") {+ const blob = new Blob([html], { type: "text/html;charset=utf-8" });+ downloadBlob(blob, `${basename}-${Date.now()}.html`);+}++export function downloadMarkdown(md: string, basename = "html-anything") {+ const blob = new Blob([md], { type: "text/markdown;charset=utf-8" });+ downloadBlob(blob, `${basename}-${Date.now()}.md`);+}diff --git a/src/lib/export/image.ts b/src/lib/export/image.tsnew file mode 100644index 00000000..93c1c773--- /dev/null+++ b/src/lib/export/image.ts@@ -0,0 +1,237 @@+"use client";++import { domToBlob, waitUntilLoad } from "modern-screenshot";+import { copyImage } from "./clipboard";++export type ImageOpts = {+ scale?: number;+ type?: "image/png" | "image/jpeg" | "image/webp";+ backgroundColor?: string;+ /**+ * Maximum height in CSS pixels for the captured area.+ * Defaults to (16000 / scale) — the upper bound most browsers accept+ * for a single canvas / SVG foreignObject.+ */+ maxHeight?: number;+};++const NEXT_FRAME = () =>+ new Promise<void>((r) => requestAnimationFrame(() => requestAnimationFrame(() => r())));++const sleep = (ms: number) => new Promise<void>((r) => setTimeout(r, ms));++/**+ * Wait until everything inside the iframe document is reasonably stable:+ * fonts loaded, images decoded, stylesheets applied, and Tailwind Play CDN+ * (which injects styles asynchronously) has had a chance to flush.+ */+async function waitForDocumentReady(doc: Document, win: Window): Promise<void> {+ if (doc.readyState !== "complete") {+ await new Promise<void>((res) => {+ const done = () => res();+ doc.addEventListener("readystatechange", () => {+ if (doc.readyState === "complete") done();+ });+ win.addEventListener?.("load", done, { once: true });+ setTimeout(done, 8000);+ });+ }++ const sheets = Array.from(+ doc.querySelectorAll<HTMLLinkElement>('link[rel="stylesheet"]'),+ );+ await Promise.all(+ sheets.map(+ (link) =>+ new Promise<void>((res) => {+ if (link.sheet) return res();+ const done = () => res();+ link.addEventListener("load", done, { once: true });+ link.addEventListener("error", done, { once: true });+ setTimeout(done, 6000);+ }),+ ),+ );++ try {+ const fonts = (doc as Document & { fonts?: FontFaceSet }).fonts;+ if (fonts?.ready) await fonts.ready;+ } catch {+ /* noop */+ }++ const imgs = Array.from(doc.images);+ await Promise.all(+ imgs.map(+ (img) =>+ new Promise<void>((res) => {+ if (img.complete && img.naturalWidth > 0) return res();+ const done = () => res();+ img.addEventListener("load", done, { once: true });+ img.addEventListener("error", done, { once: true });+ if ("decode" in img) img.decode().then(done, done);+ setTimeout(done, 6000);+ }),+ ),+ );++ try {+ await waitUntilLoad(doc.documentElement, { timeout: 6000 });+ } catch {+ /* noop */+ }++ // Tailwind Play CDN injects styles async; give it two frames + a small+ // idle window so utilities are applied before we measure layout.+ await NEXT_FRAME();+ await sleep(120);+ await NEXT_FRAME();+}++function resolveBackground(doc: Document, win: Window, override?: string): string {+ if (override) return override;+ const tryColor = (c?: string | null) => {+ if (!c) return null;+ const v = c.trim();+ if (!v || v === "transparent" || v === "rgba(0, 0, 0, 0)") return null;+ return v;+ };+ try {+ const bodyInline = tryColor(doc.body?.style.backgroundColor);+ if (bodyInline) return bodyInline;+ const bodyComputed = tryColor(win.getComputedStyle(doc.body).backgroundColor);+ if (bodyComputed) return bodyComputed;+ const htmlComputed = tryColor(+ win.getComputedStyle(doc.documentElement).backgroundColor,+ );+ if (htmlComputed) return htmlComputed;+ } catch {+ /* cross-origin or detached doc */+ }+ return "#ffffff";+}++function fullScrollHeight(doc: Document): number {+ const b = doc.body;+ const h = doc.documentElement;+ return Math.max(+ b?.scrollHeight ?? 0,+ b?.offsetHeight ?? 0,+ h?.scrollHeight ?? 0,+ h?.offsetHeight ?? 0,+ h?.clientHeight ?? 0,+ );+}++/** Render a DOM node to a Blob. Used for standalone elements; for iframes prefer {@link iframeToBlob}. */+export async function nodeToBlob(node: HTMLElement, opts: ImageOpts = {}): Promise<Blob> {+ const blob = await domToBlob(node, {+ scale: opts.scale ?? 2,+ type: opts.type ?? "image/png",+ backgroundColor: opts.backgroundColor,+ });+ if (!blob) throw new Error("screenshot failed");+ return blob;+}++/**+ * Render the contents of an <iframe> (built from srcdoc) to a PNG blob.+ *+ * Strategy (matters — the obvious approaches all break in subtle ways):+ *+ * 1. Wait for fonts / images / stylesheets / Tailwind CDN before measuring.+ * 2. Temporarily resize the iframe element to its content's full height so+ * the browser lays out the entire page at the iframe's *natural* width.+ * The iframe sits inside an `overflow:hidden` panel, so the user never+ * sees this resize; meanwhile the layout we capture is byte-identical+ * to the live preview (no subpixel-width drift, no off-by-one wrap).+ * 3. Use `documentElement.clientWidth` for the screenshot width — that's+ * the exact viewport the browser used when measuring text. Using+ * `scrollWidth` here causes a 1–2px drift that wraps Chinese titles to+ * a new line and shoves them under the body text.+ * 4. Pass explicit width/height to modern-screenshot so the foreignObject+ * SVG matches the laid-out size 1:1.+ */+export async function iframeToBlob(+ iframe: HTMLIFrameElement,+ opts: ImageOpts = {},+): Promise<Blob> {+ const doc = iframe.contentDocument;+ const win = iframe.contentWindow;+ if (!doc || !win) throw new Error("iframe not ready");++ await waitForDocumentReady(doc, win);++ // Snapshot inline styles we'll restore after the screenshot.+ const prevIframeHeight = iframe.style.height;+ const prevDocOverflow = doc.documentElement.style.overflow;+ const prevBodyOverflow = doc.body.style.overflow;++ // Force iframe to its content height so layout is fully resolved with no+ // hidden scroll regions. Parent has overflow:hidden so this is invisible.+ const fullHeight = fullScrollHeight(doc);+ if (!fullHeight) throw new Error("preview has no content yet");+ iframe.style.height = `${fullHeight}px`;+ doc.documentElement.style.overflow = "visible";+ doc.body.style.overflow = "visible";++ // Wait a couple of frames for the browser to re-flow at the new size.+ await NEXT_FRAME();+ await sleep(60);+ await NEXT_FRAME();++ try {+ const layoutWidth =+ doc.documentElement.clientWidth ||+ iframe.clientWidth ||+ doc.body.scrollWidth;+ const layoutHeight = fullScrollHeight(doc);++ const scale = opts.scale ?? 2;+ const safeMax = opts.maxHeight ?? Math.floor(16000 / scale);+ const captureHeight = Math.min(layoutHeight, safeMax);++ const backgroundColor = resolveBackground(doc, win, opts.backgroundColor);++ const blob = await domToBlob(doc.documentElement as unknown as HTMLElement, {+ scale,+ type: opts.type ?? "image/png",+ backgroundColor,+ width: layoutWidth,+ height: captureHeight,+ fetch: {+ requestInit: { cache: "force-cache" },+ },+ });+ if (!blob) throw new Error("screenshot failed");+ return blob;+ } finally {+ iframe.style.height = prevIframeHeight;+ doc.documentElement.style.overflow = prevDocOverflow;+ doc.body.style.overflow = prevBodyOverflow;+ }+}++export function downloadBlob(blob: Blob, filename: string) {+ const url = URL.createObjectURL(blob);+ const a = document.createElement("a");+ a.href = url;+ a.download = filename;+ document.body.appendChild(a);+ a.click();+ a.remove();+ setTimeout(() => URL.revokeObjectURL(url), 1000);+}++export async function copyIframeToClipboard(iframe: HTMLIFrameElement): Promise<void> {+ const blob = await iframeToBlob(iframe);+ await copyImage(blob);+}++export async function downloadIframeAsImage(+ iframe: HTMLIFrameElement,+ basename = "html-anything",+): Promise<void> {+ const blob = await iframeToBlob(iframe);+ downloadBlob(blob, `${basename}-${Date.now()}.png`);+}diff --git a/src/lib/export/wechat.ts b/src/lib/export/wechat.tsnew file mode 100644index 00000000..87645081--- /dev/null+++ b/src/lib/export/wechat.ts@@ -0,0 +1,56 @@+"use client";++import juice from "juice";+import { copyHtml } from "./clipboard";++/**+ * Take a full HTML document, extract <body> content, inline all CSS via juice,+ * and tag top-level children with data-tool="html-anything" so WeChat trusts the styles.+ * Returns the HTML to be pasted into WeChat editor.+ */+export function toWechatHtml(fullHtml: string): string {+ if (typeof window === "undefined") return fullHtml;++ const doc = new DOMParser().parseFromString(fullHtml, "text/html");++ // Collect all <style> contents + linked stylesheets we cannot follow+ const styles: string[] = [];+ doc.querySelectorAll("style").forEach((s) => {+ styles.push(s.textContent ?? "");+ });++ // Tailwind via CDN won't be accessible to juice — but the runtime DOM in our+ // preview iframe has *generated* inline styles via `getComputedStyle`. Rather+ // than trying to scrape them, we let users render the fragment in a hidden+ // iframe, walk computed styles, and inline them. Here we do the simple+ // <style>-based inlining plus a fallback marker.+ const css = styles.join("\n");+ const bodyHtml = doc.body?.innerHTML ?? fullHtml;++ // Tag top-level children+ const wrap = document.createElement("div");+ wrap.innerHTML = bodyHtml;+ Array.from(wrap.children).forEach((child) => {+ child.setAttribute("data-tool", "html-anything");+ });++ const tagged = wrap.innerHTML;++ let inlined: string;+ try {+ inlined = juice.inlineContent(tagged, css, {+ inlinePseudoElements: true,+ preserveImportant: true,+ });+ } catch {+ inlined = tagged;+ }++ // Wrap in a section element so WeChat treats it as a content block+ return `<section data-tool="html-anything">${inlined}</section>`;+}++export async function copyToWechat(fullHtml: string): Promise<void> {+ const html = toWechatHtml(fullHtml);+ await copyHtml(html);+}diff --git a/src/lib/export/zhihu.ts b/src/lib/export/zhihu.tsnew file mode 100644index 00000000..1eb07525--- /dev/null+++ b/src/lib/export/zhihu.ts@@ -0,0 +1,31 @@+"use client";++import { toWechatHtml } from "./wechat";+import { copyHtml } from "./clipboard";++/**+ * Zhihu accepts the same kind of inlined HTML as WeChat, but math expressions+ * need <img data-eeimg="true" alt="LATEX">. We strip MathJax containers and replace.+ */+export function toZhihuHtml(fullHtml: string): string {+ let html = toWechatHtml(fullHtml);++ // Replace any mjx-container with the data-eeimg image markup+ html = html.replace(+ /<mjx-container[^>]*?>([\s\S]*?)<\/mjx-container>/g,+ (_full, inner) => {+ const tex = (inner.match(/aria-label="([^"]*)"/) ?? [])[1] ??+ (inner.match(/<math[^>]*?>([\s\S]*?)<\/math>/) ?? [])[1] ??+ "";+ const safe = tex.replace(/"/g, """);+ return `<img class="Formula-image" data-eeimg="true" src="" alt="${safe}">`;+ },+ );++ return html;+}++export async function copyToZhihu(fullHtml: string): Promise<void> {+ const html = toZhihuHtml(fullHtml);+ await copyHtml(html);+}diff --git a/src/lib/extract-html.ts b/src/lib/extract-html.tsnew file mode 100644index 00000000..5d23664f--- /dev/null+++ b/src/lib/extract-html.ts@@ -0,0 +1,63 @@+/**+ * Pulls the actual HTML document out of an agent's possibly chatty response.+ * Agents sometimes wrap output in ```html ... ``` fences or prepend explanation.+ */+export function extractHtml(streamed: string): string {+ if (!streamed) return "";++ // 1. Strip leading ```html fence (and trailing ```)+ const fence = streamed.match(/```(?:html|HTML)?\s*([\s\S]*?)```/);+ if (fence) {+ const inner = fence[1].trim();+ if (inner.startsWith("<")) return inner;+ }++ // 2. Find <!DOCTYPE html ... </html>+ const doctypeStart = streamed.search(/<!DOCTYPE\s+html/i);+ if (doctypeStart !== -1) {+ const closeIdx = streamed.lastIndexOf("</html>");+ if (closeIdx !== -1) {+ return streamed.slice(doctypeStart, closeIdx + "</html>".length);+ }+ // streaming, partial — return from doctype to end+ return streamed.slice(doctypeStart);+ }++ // 3. Find <html> ... </html>+ const htmlStart = streamed.search(/<html[\s>]/i);+ if (htmlStart !== -1) {+ const closeIdx = streamed.lastIndexOf("</html>");+ if (closeIdx !== -1) {+ return streamed.slice(htmlStart, closeIdx + "</html>".length);+ }+ return streamed.slice(htmlStart);+ }++ // 4. If it begins with < (root element), trust it+ if (streamed.trimStart().startsWith("<")) {+ return streamed;+ }++ // 5. Wrap whatever we got in a minimal scaffold so something renders+ return `<!DOCTYPE html><html><head><meta charset="utf-8"><script src="https://cdn.tailwindcss.com"></script></head><body class="p-8 font-sans"><pre class="whitespace-pre-wrap">${escape(+ streamed,+ )}</pre></body></html>`;+}++function escape(s: string): string {+ return s+ .replace(/&/g, "&")+ .replace(/</g, "<")+ .replace(/>/g, ">");+}++/**+ * For previews while the stream is still arriving — make sure we always+ * produce a closing </body></html> so the iframe can render incrementally.+ */+export function previewHtml(streamed: string): string {+ const html = extractHtml(streamed);+ if (!html) return "";+ if (/<\/html>/i.test(html)) return html;+ return html + "\n</body>\n</html>";+}diff --git a/src/lib/i18n.ts b/src/lib/i18n.tsnew file mode 100644index 00000000..a7c834e0--- /dev/null+++ b/src/lib/i18n.ts@@ -0,0 +1,822 @@+/**+ * Tiny i18n layer. Keeps a flat key → string map per locale and exposes a+ * `useT()` hook that reads the active locale from the zustand store. Adding+ * a new locale = add a new dictionary at the bottom of this file and+ * register it in `DICTS`. The `Dict` interface keeps the build honest:+ * if you forget a key the TS check breaks rather than the UI silently+ * falling back to English.+ */++"use client";++import { useStore, type Locale } from "@/lib/store";++export interface Dict {+ // Brand+ "brand.subtitle": string;++ // Toolbar+ "toolbar.selectAgent": string;+ "toolbar.switchAgent": string;+ "toolbar.settings": string;+ "toolbar.stop": string;+ "toolbar.convert": string;+ "toolbar.firstSelectAgent": string;+ "toolbar.unsupportedProtocol": string;+ "toolbar.enterContent": string;+ "toolbar.shortcutHint": string;++ // Layout mode toggle+ "layout.aria.group": string;+ "layout.label.editor": string;+ "layout.label.split": string;+ "layout.label.preview": string;+ "layout.tip.editor": string;+ "layout.tip.split": string;+ "layout.tip.preview": string;++ // Welcome modal+ "welcome.eyebrow": string;+ "welcome.titlePart1": string;+ "welcome.titleAccent": string;+ "welcome.description": string;+ "welcome.rescan": string;+ "welcome.scanning": string;+ "welcome.rescanTitle": string;+ "welcome.detectionFailed": string;+ "welcome.installed": string;+ "welcome.notInstalled": string;+ "welcome.noAgentsTitle": string;+ "welcome.noAgentsBody": string;+ "welcome.later": string;+ "welcome.enter": string;+ "welcome.current": string;+ "welcome.unsupportedHint": string;+ "welcome.pickInstalled": string;+ "welcome.enterTooltip.noAgent": string;+ "welcome.enterTooltip.unsupported": string;+ "welcome.enterTooltip.ok": string;++ // Model picker+ "model.eyebrow": string;+ "model.label": string;+ "model.defaultHint.prefix": string;+ "model.defaultHint.suffix": string;+ "model.defaultLabel": string;++ // Agent card+ "agent.selected": string;+ "agent.notInstalled": string;+ "protocol.stdin": string;+ "protocol.argv": string;+ "protocol.acp": string;+ "protocol.piRpc": string;++ // Settings modal+ "settings.eyebrow": string;+ "settings.titlePart1": string;+ "settings.titleAccent": string;+ "settings.close": string;+ "settings.done": string;+ "settings.section.agent.label": string;+ "settings.section.agent.hint": string;+ "settings.section.language.label": string;+ "settings.section.language.hint": string;+ "settings.agent.title": string;+ "settings.agent.subtitle": string;+ "settings.language.title": string;+ "settings.language.subtitle": string;+ "settings.language.active": string;+ "settings.language.default": string;+ "settings.language.note": string;++ // Editor pane+ "editor.tab.text": string;+ "editor.tab.upload": string;+ "editor.tab.samples": string;+ "editor.tab.formats": string;+ "editor.backup": string;+ "editor.backupTooltip": string;+ "editor.restoring": string;+ "editor.placeholder": string;+ "editor.chars": string;+ "editor.saving": string;+ "editor.saveFailed": string;+ "editor.autosaved": string;+ "editor.autosaveTooltip": string;++ // Preview pane+ "preview.tab.preview": string;+ "preview.tab.deck": string;+ "preview.tab.code": string;+ "preview.tab.log": string;++ // Deck viewer+ "deck.empty": string;+ "deck.prev": string;+ "deck.next": string;+ "deck.present": string;+ "deck.exitPresent": string;+ "deck.presentTooltip": string;+ "deck.notes": string;+ "deck.notesTooltip": string;+ "deck.slideN": string;+ "preview.status.idle": string;+ "preview.status.running": string;+ "preview.status.done": string;+ "preview.status.error": string;+ "preview.code.waiting": string;+ "preview.code.empty": string;+ "preview.placeholder.runningTitle.part1": string;+ "preview.placeholder.runningTitle.accent": string;+ "preview.placeholder.idleTitle.part1": string;+ "preview.placeholder.idleTitle.accent": string;+ "preview.placeholder.idleTitle.part2": string;+ "preview.placeholder.runningDescr": string;+ "preview.placeholder.idleDescr": string;+ "preview.placeholder.chip.article": string;+ "preview.placeholder.chip.deck": string;+ "preview.placeholder.chip.resume": string;+ "preview.placeholder.chip.poster": string;+ "preview.placeholder.chip.xiaohongshu": string;+ "preview.placeholder.chip.twitterCard": string;+ "preview.placeholder.chip.webProto": string;+ "preview.placeholder.chip.dataReport": string;+ "preview.log.empty": string;+ "preview.metric.ttfbHint": string;+ "preview.present": string;+ "preview.exitPresent": string;+ "preview.presentTooltip": string;++ // Tasks sidebar+ "tasks.heading": string;+ "tasks.expand": string;+ "tasks.collapse": string;+ "tasks.newTask": string;+ "tasks.search.placeholder": string;+ "tasks.search.clear": string;+ "tasks.empty.intro": string;+ "tasks.empty.clear": string;+ "tasks.footer": string;+ "tasks.status.idle": string;+ "tasks.status.running": string;+ "tasks.status.done": string;+ "tasks.status.error": string;+ "tasks.rename": string;+ "tasks.duplicate": string;+ "tasks.delete": string;+ "tasks.deleteConfirm": string;+ "tasks.renameDblHint": string;+ "tasks.emptyContent": string;+ "tasks.defaultName": string;+ "tasks.matchTooltip": string;++ // Export menu+ "export.button": string;+ "export.section.platform": string;+ "export.section.raw": string;+ "export.section.download": string;+ "export.section.deck": string;+ "export.action.wechat": string;+ "export.action.zhihu": string;+ "export.action.twitterImg": string;+ "export.action.html": string;+ "export.action.text": string;+ "export.action.downloadHtml": string;+ "export.action.downloadPng": string;+ "export.action.deckPdf": string;+ "export.action.deckPngZip": string;+ "export.action.deckPptx": string;+ "export.toast.wechat": string;+ "export.toast.zhihu": string;+ "export.toast.image": string;+ "export.toast.html": string;+ "export.toast.text": string;+ "export.toast.htmlSaved": string;+ "export.toast.imgSaved": string;+ "export.toast.deckPdf": string;+ "export.toast.deckPngZip": string;+ "export.toast.deckPptx": string;+ "export.error.previewNotReady": string;+ "export.error.generic": string;++ // Drafts menu+ "drafts.button": string;+ "drafts.tooltip": string;+ "drafts.heading": string;+ "drafts.count": string;+ "drafts.empty.title": string;+ "drafts.empty.hint": string;+ "drafts.restoreConfirm": string;+ "drafts.restoredLog": string;+ "drafts.delete": string;+ "drafts.chars": string;+ "drafts.emptyPreview": string;++ // Upload dropzone+ "upload.title": string;+ "upload.types": string;+ "upload.button": string;+ "upload.loadedLog": string;+ "upload.failedLog": string;++ // Formats gallery+ "formats.eyebrow": string;+ "formats.subtitle": string;+ "formats.loadButton": string;+ "formats.loadedLog": string;++ // Samples gallery+ "samples.eyebrow": string;+ "samples.subtitle.preRendered": string;+ "samples.subtitle.diff": string;+ "samples.subtitle.body": string;+ "samples.filter.all": string;+ "samples.loading": string;+ "samples.loaded": string;+ "samples.loadingButton": string;+ "samples.loadButton": string;+ "samples.loadedTooltip": string;+ "samples.sourceLink": string;++ // Template picker+ "template.loading": string;+ "template.heading": string;+ "template.search.placeholder": string;+ "template.search.clear": string;+ "template.filter.all": string;+ "template.filter.featured": string;+ "template.featured.symbol": string;+ "template.empty.loading": string;+ "template.empty.noMatch": string;+ "template.footer.hint.search": string;+ "template.footer.hint.filter": string;+ "template.footer.hint.hover": string;+ "template.footer.hint.preview": string;+ "template.footer.esc": string;+ "template.preview.button": string;+ "template.preview.loadingButton": string;+ "template.preview.tooltip": string;+ "template.popover.loading": string;+ "template.popover.loadInto": string;+ "template.popover.loadIntoTooltip": string;+ "template.source.tooltip": string;+ "template.scenario.marketing": string;+ "template.scenario.engineering": string;+ "template.scenario.operations": string;+ "template.scenario.product": string;+ "template.scenario.design": string;+ "template.scenario.finance": string;+ "template.scenario.sales": string;+ "template.scenario.hr": string;+ "template.scenario.personal": string;+ "template.scenario.education": string;+ "template.scenario.creator": string;+ "template.scenario.video": string;+}++const en: Dict = {+ "brand.subtitle": "anything → beautiful html",++ "toolbar.selectAgent": "Select agent",+ "toolbar.switchAgent": "Switch agent",+ "toolbar.settings": "Settings",+ "toolbar.stop": "◼ Stop",+ "toolbar.convert": "⚡ Convert to HTML",+ "toolbar.firstSelectAgent": "Pick an agent first",+ "toolbar.unsupportedProtocol": "ACP / pi-rpc not wired yet — pick another agent",+ "toolbar.enterContent": "Type or upload content",+ "toolbar.shortcutHint": "⌘+Enter to convert",++ "layout.aria.group": "Workspace layout",+ "layout.label.editor": "Editor only",+ "layout.label.split": "Split (editor + preview)",+ "layout.label.preview": "Preview only",+ "layout.tip.editor": "Editor only — hide preview",+ "layout.tip.split": "Split — editor + preview side by side",+ "layout.tip.preview": "Preview only — hide editor",++ "welcome.eyebrow": "Choose your agent",+ "welcome.titlePart1": "Pick a local",+ "welcome.titleAccent": "code agent",+ "welcome.description":+ "HTML Anything reuses your already-logged-in CLI session — no API key required. You can switch agents anytime from the top bar.",+ "welcome.rescan": "↻ Rescan",+ "welcome.scanning": "Scanning…",+ "welcome.rescanTitle": "Run detection again",+ "welcome.detectionFailed": "Detection failed",+ "welcome.installed": "Installed ({n})",+ "welcome.notInstalled": "Not installed ({n})",+ "welcome.noAgentsTitle": "No local agents detected",+ "welcome.noAgentsBody": "Install one of the CLIs above and log in, then click ↻ Rescan.",+ "welcome.later": "Later",+ "welcome.enter": "Enter editor →",+ "welcome.current": "Active",+ "welcome.unsupportedHint": "Protocol not wired — cannot convert",+ "welcome.pickInstalled": "Pick an installed agent first",+ "welcome.enterTooltip.noAgent": "Pick an installed agent first",+ "welcome.enterTooltip.unsupported": "ACP / pi-rpc not wired yet — pick another agent",+ "welcome.enterTooltip.ok": "Open the editor",++ "model.eyebrow": "model",+ "model.label": "Pick a model for {agent}",+ "model.defaultHint.prefix": "Default omits ",+ "model.defaultHint.suffix": " and lets the CLI pick.",+ "model.defaultLabel": "Default (CLI config)",++ "agent.selected": "Selected",+ "agent.notInstalled": "Not installed",+ "protocol.stdin": "stdin · stream",+ "protocol.argv": "positional argv",+ "protocol.acp": "ACP JSON-RPC · not wired",+ "protocol.piRpc": "pi-rpc · not wired",++ "settings.eyebrow": "Settings",+ "settings.titlePart1": "Configure",+ "settings.titleAccent": "HTML Anything",+ "settings.close": "Close (Esc)",+ "settings.done": "Done",+ "settings.section.agent.label": "Agent",+ "settings.section.agent.hint": "Local CLI · model",+ "settings.section.language.label": "Language",+ "settings.section.language.hint": "Interface language",+ "settings.agent.title": "Code agent",+ "settings.agent.subtitle":+ "HTML Anything reuses your already-logged-in CLI session — no API key required.",+ "settings.language.title": "Interface language",+ "settings.language.subtitle":+ "Sets the language the app surface uses. Default is English; your choice is saved locally.",+ "settings.language.active": "Active",+ "settings.language.default": "Default",+ "settings.language.note":+ "We ship English and Simplified Chinese today. Adding a locale means dropping a dictionary into src/lib/i18n.ts — contributors welcome.",++ "editor.tab.text": "✏️ Text",+ "editor.tab.upload": "⬆️ Upload",+ "editor.tab.samples": "✨ Samples",+ "editor.tab.formats": "📋 Formats",+ "editor.backup": "⤓ Backup",+ "editor.backupTooltip": "Download the current content as a .md / .txt backup",+ "editor.restoring": "Restoring last content…",+ "editor.placeholder":+ "Paste anything here — Markdown / CSV / Excel paste / JSON / SQL / your draft…\n\n⌘+Enter to convert\n\nEverything is autosaved to localStorage and survives a reload; the ↶ history menu top-right shows the last 8 snapshots.",+ "editor.chars": "{n} chars",+ "editor.saving": "Saving…",+ "editor.saveFailed": "✗ Save failed",+ "editor.autosaved": "Autosaved",+ "editor.autosaveTooltip": "Content lives in browser localStorage and survives a reload",++ "preview.tab.preview": "👁 Preview",+ "preview.tab.deck": "🎬 Deck",+ "preview.tab.code": "</> Source",+ "preview.tab.log": "📋 Log",+ "preview.status.idle": "idle",+ "preview.status.running": "generating",+ "preview.status.done": "done",+ "preview.status.error": "error",+ "preview.code.waiting": "// waiting for the agent's first byte…",+ "preview.code.empty": "// no content yet",+ "preview.placeholder.runningTitle.part1": "agent is",+ "preview.placeholder.runningTitle.accent": "thinking",+ "preview.placeholder.idleTitle.part1": "Paste content on the left, then",+ "preview.placeholder.idleTitle.accent": "⚡",+ "preview.placeholder.idleTitle.part2": "convert",+ "preview.placeholder.runningDescr":+ "First bytes land in a few seconds, then it streams. Waited {sec}s so far.",+ "preview.placeholder.idleDescr":+ "Preview · view source · one-click copy for WeChat / Twitter / Zhihu · PNG export.",+ "preview.placeholder.chip.article": "📖 Article",+ "preview.placeholder.chip.deck": "🎬 Slide deck",+ "preview.placeholder.chip.resume": "📄 Resume",+ "preview.placeholder.chip.poster": "🖼️ Poster",+ "preview.placeholder.chip.xiaohongshu": "📱 Xiaohongshu",+ "preview.placeholder.chip.twitterCard": "🐦 Twitter card",+ "preview.placeholder.chip.webProto": "🛠️ Web prototype",+ "preview.placeholder.chip.dataReport": "📊 Data report",+ "preview.log.empty":+ "Live agent events (start / delta / meta / stderr / done) and timings show up here.",+ "preview.metric.ttfbHint": "Time to first byte",+ "preview.present": "⛶ Present",+ "preview.exitPresent": "Exit",+ "preview.presentTooltip": "Fullscreen preview — F to toggle, ESC to exit",++ "deck.empty": "No slides found in this output.",+ "deck.prev": "Previous slide",+ "deck.next": "Next slide",+ "deck.present": "▶ Present",+ "deck.exitPresent": "Exit present",+ "deck.presentTooltip": "Fullscreen — press F to toggle, ESC to exit",+ "deck.notes": "Notes",+ "deck.notesTooltip": "Toggle speaker notes (N)",+ "deck.slideN": "{n} / {m}",++ "tasks.heading": "tasks",+ "tasks.expand": "Expand task list",+ "tasks.collapse": "Collapse task list",+ "tasks.newTask": "+ New task",+ "tasks.search.placeholder": "Search task name / content / template…",+ "tasks.search.clear": "Clear search",+ "tasks.empty.intro": "No tasks match “{query}”",+ "tasks.empty.clear": "Clear search",+ "tasks.footer": "Input and output of every task autosave to your browser and survive a reload.",+ "tasks.status.idle": "idle",+ "tasks.status.running": "generating",+ "tasks.status.done": "done",+ "tasks.status.error": "error",+ "tasks.rename": "Rename",+ "tasks.duplicate": "Duplicate",+ "tasks.delete": "Delete task",+ "tasks.deleteConfirm": "Delete task “{name}”? Its input and output will be lost.",+ "tasks.renameDblHint": "Double-click to rename",+ "tasks.emptyContent": "empty",+ "tasks.defaultName": "Task {n}",+ "tasks.matchTooltip": "{a} / {b} match",++ "export.button": "⤓ Export / Copy ▾",+ "export.section.platform": "Copy to platform",+ "export.section.raw": "Copy raw",+ "export.section.download": "Download",+ "export.section.deck": "Deck · {n} slides",+ "export.action.wechat": "WeChat (公众号)",+ "export.action.zhihu": "Zhihu",+ "export.action.twitterImg": "Twitter / Weibo (PNG)",+ "export.action.html": "HTML source",+ "export.action.text": "Plain text",+ "export.action.downloadHtml": ".html single file",+ "export.action.downloadPng": ".png hi-res image",+ "export.action.deckPdf": "PDF · all slides (print)",+ "export.action.deckPngZip": "PNG · per-slide (.zip)",+ "export.action.deckPptx": ".pptx · PowerPoint",+ "export.toast.wechat": "WeChat format copied",+ "export.toast.zhihu": "Zhihu format copied",+ "export.toast.image": "Image copied",+ "export.toast.html": "HTML copied",+ "export.toast.text": "Text copied",+ "export.toast.htmlSaved": "HTML downloaded",+ "export.toast.imgSaved": "Image downloaded",+ "export.toast.deckPdf": "Print dialog opened — pick “Save as PDF”",+ "export.toast.deckPngZip": "Slide PNGs zipped",+ "export.toast.deckPptx": "PPTX downloaded",+ "export.error.previewNotReady": "Preview not ready",+ "export.error.generic": "failed",++ "drafts.button": "↶ History",+ "drafts.tooltip": "View autosaved version history",+ "drafts.heading": "Autosaved versions",+ "drafts.count": "{n}",+ "drafts.empty.title": "No history yet",+ "drafts.empty.hint": "Inputs over 20 chars get snapshotted every 30s",+ "drafts.restoreConfirm":+ "Restore the version from {when}? The current content will be replaced (the new version is autosaved too).",+ "drafts.restoredLog": "Restored the version from {when} ({n} chars)",+ "drafts.delete": "Delete this version",+ "drafts.chars": "{n} chars",+ "drafts.emptyPreview": "(empty)",++ "upload.title": "Drop a file here",+ "upload.types": "Supports .md .txt .csv .tsv .xlsx .json .sql .yaml .png .jpg",+ "upload.button": "Choose a file",+ "upload.loadedLog": "Loaded {name} ({fmt})",+ "upload.failedLog": "Parse failed: {err}",++ "formats.eyebrow": "Format examples",+ "formats.subtitle":+ "One-click snippets for every input shape we support. Pick a template up top, click Load, then ⌘+Enter — the template above decides the look.",+ "formats.loadButton": "✨ Load →",+ "formats.loadedLog": "Loaded {name} ({fmt})",++ "samples.eyebrow": "Sample gallery",+ "samples.subtitle.preRendered": "pre-rendered",+ "samples.subtitle.diff": "diff edit",+ "samples.subtitle.body":+ "Every sample ships {preRendered} world-class HTML — click to preview in a new task; edit the content and ⌘+Enter, the agent runs a {diff} only and saves tokens.",+ "samples.filter.all": "All",+ "samples.loading": "Loading samples…",+ "samples.loaded": "✓ Loaded",+ "samples.loadingButton": "Loading…",+ "samples.loadButton": "✨ Load & preview →",+ "samples.loadedTooltip": "This sample is already loaded in a task",+ "samples.sourceLink": "Source · {label}",++ "template.loading": "Loading templates…",+ "template.heading": "Pick an output shape",+ "template.search.placeholder": "Search template name / description / tag…",+ "template.search.clear": "Clear",+ "template.filter.all": "All",+ "template.filter.featured": "★ Featured",+ "template.featured.symbol": "★",+ "template.empty.loading": "Loading templates…",+ "template.empty.noMatch": "No matching templates. Try a different keyword or category.",+ "template.footer.hint.search": "⌕ Search",+ "template.footer.hint.filter": "category filter",+ "template.footer.hint.hover": "hover for thumbnail",+ "template.footer.hint.preview": "“Preview” loads into the editor",+ "template.footer.esc": "to close",+ "template.preview.button": "Preview",+ "template.preview.loadingButton": "…",+ "template.preview.tooltip": "Load the prerendered snapshot into a new task",+ "template.popover.loading": "Loading preview…",+ "template.popover.loadInto": "Load into editor →",+ "template.popover.loadIntoTooltip": "Load the prerendered snapshot into a new task",+ "template.source.tooltip": "Reference project: {label}",+ "template.scenario.marketing": "Marketing / Content",+ "template.scenario.engineering": "Engineering / Dev",+ "template.scenario.operations": "Operations",+ "template.scenario.product": "Product",+ "template.scenario.design": "Design / Explore",+ "template.scenario.finance": "Finance / Data",+ "template.scenario.sales": "Sales",+ "template.scenario.hr": "HR / Onboarding",+ "template.scenario.personal": "Personal",+ "template.scenario.education": "Education",+ "template.scenario.creator": "Creator",+ "template.scenario.video": "Video",+};++const zhCN: Dict = {+ "brand.subtitle": "anything → beautiful html",++ "toolbar.selectAgent": "选择 agent",+ "toolbar.switchAgent": "切换 agent",+ "toolbar.settings": "设置",+ "toolbar.stop": "◼ 停止",+ "toolbar.convert": "⚡ 转换为 HTML",+ "toolbar.firstSelectAgent": "先选择 agent",+ "toolbar.unsupportedProtocol": "ACP / pi-rpc 协议暂未接入, 请换其他 agent",+ "toolbar.enterContent": "输入或上传内容",+ "toolbar.shortcutHint": "⌘+Enter 转换",++ "layout.aria.group": "工作区布局",+ "layout.label.editor": "仅编辑器",+ "layout.label.split": "并排 (编辑器 + 预览)",+ "layout.label.preview": "仅预览",+ "layout.tip.editor": "仅编辑器 — 隐藏预览",+ "layout.tip.split": "并排 — 编辑器与预览同时显示",+ "layout.tip.preview": "仅预览 — 隐藏编辑器",++ "welcome.eyebrow": "Choose your agent",+ "welcome.titlePart1": "选一个本地",+ "welcome.titleAccent": "code agent",+ "welcome.description":+ "HTML Anything 复用你已经登录的 CLI session — 不要求你再贴一遍 API Key。进入主界面后,你随时可以在顶栏切换到别的 agent。",+ "welcome.rescan": "↻ 重新检测",+ "welcome.scanning": "扫描中…",+ "welcome.rescanTitle": "重新检测",+ "welcome.detectionFailed": "检测失败",+ "welcome.installed": "已安装 ({n})",+ "welcome.notInstalled": "未安装 ({n})",+ "welcome.noAgentsTitle": "没有检测到任何本地 agent",+ "welcome.noAgentsBody": "先安装上面任意一个 CLI 并登录, 再回来 ↻ 重新检测。",+ "welcome.later": "稍后再说",+ "welcome.enter": "进入编辑器 →",+ "welcome.current": "当前",+ "welcome.unsupportedHint": "协议暂未接入, 无法转换",+ "welcome.pickInstalled": "请先选一个已安装的 agent",+ "welcome.enterTooltip.noAgent": "先选一个已安装的 agent",+ "welcome.enterTooltip.unsupported": "ACP / pi-rpc 协议暂未接入, 请选其他 agent",+ "welcome.enterTooltip.ok": "进入编辑器",++ "model.eyebrow": "model",+ "model.label": "为 {agent} 选个模型",+ "model.defaultHint.prefix": "选 Default 时不传 ",+ "model.defaultHint.suffix": ", 由 CLI 自己挑",+ "model.defaultLabel": "Default (CLI config)",++ "agent.selected": "SELECTED",+ "agent.notInstalled": "未安装",+ "protocol.stdin": "stdin · stream",+ "protocol.argv": "positional argv",+ "protocol.acp": "ACP JSON-RPC · 暂未接入",+ "protocol.piRpc": "pi-rpc · 暂未接入",++ "settings.eyebrow": "设置",+ "settings.titlePart1": "配置",+ "settings.titleAccent": "HTML Anything",+ "settings.close": "关闭 (Esc)",+ "settings.done": "完成",+ "settings.section.agent.label": "Agent",+ "settings.section.agent.hint": "本地 CLI · 模型",+ "settings.section.language.label": "语言",+ "settings.section.language.hint": "界面语言",+ "settings.agent.title": "Code agent",+ "settings.agent.subtitle":+ "HTML Anything 复用你已经登录的 CLI session — 不需要再贴 API Key。",+ "settings.language.title": "界面语言",+ "settings.language.subtitle":+ "选择 app 界面使用的语言。默认 English; 选择会保存到本地。",+ "settings.language.active": "当前",+ "settings.language.default": "默认",+ "settings.language.note":+ "目前发布的是 English 和简体中文。增加一种语言只需要在 src/lib/i18n.ts 里加一份字典 — 欢迎贡献。",++ "editor.tab.text": "✏️ 输入",+ "editor.tab.upload": "⬆️ 上传",+ "editor.tab.samples": "✨ 示例",+ "editor.tab.formats": "📋 格式",+ "editor.backup": "⤓ 备份",+ "editor.backupTooltip": "把当前内容下载为 .md / .txt 备份文件",+ "editor.restoring": "恢复上次内容…",+ "editor.placeholder":+ "粘贴任何内容到这里 — Markdown / CSV / Excel 复制 / JSON / SQL / 你的草稿…\n\n按 ⌘+Enter 转换\n\n所有输入会自动保存到 localStorage, 刷新不丢; 点击右上角 ↶ 历史 可查看最近 8 个版本。",+ "editor.chars": "{n} 字",+ "editor.saving": "正在保存…",+ "editor.saveFailed": "✗ 保存失败",+ "editor.autosaved": "已自动保存",+ "editor.autosaveTooltip": "内容存到浏览器 localStorage, 刷新不丢",++ "preview.tab.preview": "👁 预览",+ "preview.tab.deck": "🎬 PPT",+ "preview.tab.code": "</> 源码",+ "preview.tab.log": "📋 日志",+ "preview.status.idle": "待机",+ "preview.status.running": "生成中",+ "preview.status.done": "完成",+ "preview.status.error": "错误",+ "preview.code.waiting": "// 等待 agent 第一个字节…",+ "preview.code.empty": "// 还没有内容",+ "preview.placeholder.runningTitle.part1": "agent 正在",+ "preview.placeholder.runningTitle.accent": "思考",+ "preview.placeholder.idleTitle.part1": "把内容粘到左侧, 然后",+ "preview.placeholder.idleTitle.accent": "⚡",+ "preview.placeholder.idleTitle.part2": "转换",+ "preview.placeholder.runningDescr": "首字会在几秒内到达, 之后流式更新。当前已等 {sec}s。",+ "preview.placeholder.idleDescr": "支持预览 / 查看源码 / 一键复制公众号·推特·知乎 / 截图导出 PNG。",+ "preview.placeholder.chip.article": "📖 文章",+ "preview.placeholder.chip.deck": "🎬 PPT",+ "preview.placeholder.chip.resume": "📄 简历",+ "preview.placeholder.chip.poster": "🖼️ 海报",+ "preview.placeholder.chip.xiaohongshu": "📱 小红书",+ "preview.placeholder.chip.twitterCard": "🐦 推特卡",+ "preview.placeholder.chip.webProto": "🛠️ Web 原型",+ "preview.placeholder.chip.dataReport": "📊 数据报告",+ "preview.log.empty":+ "这里会实时显示 agent 的事件 (start / delta / meta / stderr / done) 和耗时统计。",+ "preview.metric.ttfbHint": "首字节延迟",+ "preview.present": "⛶ 全屏",+ "preview.exitPresent": "退出全屏",+ "preview.presentTooltip": "全屏预览 — F 切换 / ESC 退出",++ "deck.empty": "本次结果里没有检测到幻灯片。",+ "deck.prev": "上一页",+ "deck.next": "下一页",+ "deck.present": "▶ 放映",+ "deck.exitPresent": "退出放映",+ "deck.presentTooltip": "全屏放映 — F 切换 / ESC 退出",+ "deck.notes": "备注",+ "deck.notesTooltip": "切换演讲者备注 (N)",+ "deck.slideN": "{n} / {m}",++ "tasks.heading": "任务",+ "tasks.expand": "展开任务列表",+ "tasks.collapse": "折叠任务列表",+ "tasks.newTask": "+ 新建任务",+ "tasks.search.placeholder": "搜索任务名 / 内容 / 模板…",+ "tasks.search.clear": "清除搜索",+ "tasks.empty.intro": "没有匹配「{query}」的任务",+ "tasks.empty.clear": "清除搜索",+ "tasks.footer": "所有任务的输入 / 输出都会自动保存到浏览器, 刷新后保留。",+ "tasks.status.idle": "待机",+ "tasks.status.running": "生成中",+ "tasks.status.done": "完成",+ "tasks.status.error": "错误",+ "tasks.rename": "重命名",+ "tasks.duplicate": "复制",+ "tasks.delete": "删除任务",+ "tasks.deleteConfirm": "删除任务「{name}」? 该任务的输入与生成结果都会丢失。",+ "tasks.renameDblHint": "双击重命名",+ "tasks.emptyContent": "空白",+ "tasks.defaultName": "任务 {n}",+ "tasks.matchTooltip": "{a} / {b} 匹配",++ "export.button": "⤓ 导出 / 复制 ▾",+ "export.section.platform": "复制到平台",+ "export.section.raw": "复制原始内容",+ "export.section.download": "下载",+ "export.section.deck": "Deck · 共 {n} 页",+ "export.action.wechat": "微信公众号",+ "export.action.zhihu": "知乎",+ "export.action.twitterImg": "推特 / 微博 (PNG)",+ "export.action.html": "HTML 源码",+ "export.action.text": "纯文本",+ "export.action.downloadHtml": ".html 单文件",+ "export.action.downloadPng": ".png 高清图",+ "export.action.deckPdf": "PDF · 全部幻灯片 (打印)",+ "export.action.deckPngZip": "PNG · 每页一张 (.zip)",+ "export.action.deckPptx": ".pptx · PowerPoint",+ "export.toast.wechat": "已复制公众号格式",+ "export.toast.zhihu": "已复制知乎格式",+ "export.toast.image": "已复制图片",+ "export.toast.html": "已复制 HTML",+ "export.toast.text": "已复制文本",+ "export.toast.htmlSaved": "已下载 HTML",+ "export.toast.imgSaved": "已下载图片",+ "export.toast.deckPdf": "已打开打印窗口 — 选「另存为 PDF」",+ "export.toast.deckPngZip": "已打包 PNG ZIP",+ "export.toast.deckPptx": "已下载 PPTX",+ "export.error.previewNotReady": "预览未就绪",+ "export.error.generic": "失败",++ "drafts.button": "↶ 历史",+ "drafts.tooltip": "查看自动保存的版本历史",+ "drafts.heading": "自动保存的版本",+ "drafts.count": "{n} 个",+ "drafts.empty.title": "暂无历史版本",+ "drafts.empty.hint": "输入超过 20 字, 每 30 秒自动快照",+ "drafts.restoreConfirm": "恢复到 {when} 的版本? 当前内容会被替换 (新版本会自动备份)。",+ "drafts.restoredLog": "已恢复 {when} 的版本 ({n} 字)",+ "drafts.delete": "删除此版本",+ "drafts.chars": "{n} 字",+ "drafts.emptyPreview": "(空)",++ "upload.title": "把文件拖到这里",+ "upload.types": "支持 .md .txt .csv .tsv .xlsx .json .sql .yaml .png .jpg",+ "upload.button": "选择文件",+ "upload.loadedLog": "已加载 {name} ({fmt})",+ "upload.failedLog": "解析失败: {err}",++ "formats.eyebrow": "格式示例",+ "formats.subtitle":+ "一键载入每种输入格式的样例片段。先在顶部选模板, 点击「载入」, 再 ⌘+Enter — 由上方的模板决定输出样式。",+ "formats.loadButton": "✨ 载入 →",+ "formats.loadedLog": "已载入 {name} ({fmt})",++ "samples.eyebrow": "示例画廊",+ "samples.subtitle.preRendered": "预渲染",+ "samples.subtitle.diff": "diff 编辑",+ "samples.subtitle.body":+ "每个示例都已 {preRendered} 世界级 HTML — 点击即在新任务中预览; 修改内容后再 ⌘+Enter, agent 只跑 {diff}, 省 token。",+ "samples.filter.all": "全部",+ "samples.loading": "正在载入示例…",+ "samples.loaded": "✓ 已加载",+ "samples.loadingButton": "载入中…",+ "samples.loadButton": "✨ 载入并预览 →",+ "samples.loadedTooltip": "此示例已经在某个任务里被加载过",+ "samples.sourceLink": "原文 · {label}",++ "template.loading": "载入模板…",+ "template.heading": "选择输出形态",+ "template.search.placeholder": "搜索模板名 / 描述 / 标签…",+ "template.search.clear": "清空",+ "template.filter.all": "全部",+ "template.filter.featured": "★ 推荐 · Featured",+ "template.featured.symbol": "★",+ "template.empty.loading": "正在载入模板…",+ "template.empty.noMatch": "没有匹配的模板。试试别的关键词或切换分类。",+ "template.footer.hint.search": "⌕ 搜索",+ "template.footer.hint.filter": "类别筛选",+ "template.footer.hint.hover": "悬停缩略预览",+ "template.footer.hint.preview": "「预览」按钮载入到编辑器",+ "template.footer.esc": "关闭",+ "template.preview.button": "预览",+ "template.preview.loadingButton": "…",+ "template.preview.tooltip": "把预览快照载入一个新任务",+ "template.popover.loading": "正在加载预览…",+ "template.popover.loadInto": "载入到编辑器 →",+ "template.popover.loadIntoTooltip": "把预览快照载入一个新任务",+ "template.source.tooltip": "参考开源项目: {label}",+ "template.scenario.marketing": "营销 / 内容",+ "template.scenario.engineering": "工程 / 开发",+ "template.scenario.operations": "运营 / 协作",+ "template.scenario.product": "产品",+ "template.scenario.design": "设计 / 探索",+ "template.scenario.finance": "财务 / 数据",+ "template.scenario.sales": "销售",+ "template.scenario.hr": "HR / 入职",+ "template.scenario.personal": "个人 / 生活",+ "template.scenario.education": "教育 / 学习",+ "template.scenario.creator": "创作者",+ "template.scenario.video": "视频",+};++const DICTS: Record<Locale, Dict> = {+ "en": en,+ "zh-CN": zhCN,+};++export type DictKey = keyof Dict;++function format(template: string, vars?: Record<string, string | number>): string {+ if (!vars) return template;+ return template.replace(/\{(\w+)\}/g, (_, k) => {+ const v = vars[k];+ return v === undefined ? `{${k}}` : String(v);+ });+}++export function t(+ locale: Locale,+ key: DictKey,+ vars?: Record<string, string | number>,+): string {+ const dict = DICTS[locale] ?? DICTS.en;+ return format(dict[key], vars);+}++/**+ * Returns a `t(key, vars?)` bound to the active locale. Components call this+ * once at the top of render and use the returned function inline.+ */+export function useT(): (key: DictKey, vars?: Record<string, string | number>) => string {+ const locale = useStore((s) => s.locale);+ return (key, vars) => t(locale, key, vars);+}diff --git a/src/lib/parsers/auto.ts b/src/lib/parsers/auto.tsnew file mode 100644index 00000000..24888151--- /dev/null+++ b/src/lib/parsers/auto.ts@@ -0,0 +1,148 @@+import Papa from "papaparse";++export type DetectedFormat =+ | "markdown"+ | "html"+ | "json"+ | "csv"+ | "tsv"+ | "sql"+ | "yaml"+ | "text";++export function detectFormat(input: string): DetectedFormat {+ const t = input.trim();+ if (!t) return "text";++ // HTML+ if (/^<!DOCTYPE\s+html/i.test(t) || /^<html[\s>]/i.test(t)) return "html";++ // JSON+ if ((t.startsWith("{") && t.endsWith("}")) || (t.startsWith("[") && t.endsWith("]"))) {+ try {+ JSON.parse(t);+ return "json";+ } catch {}+ }++ // SQL+ if (/^\s*(select|insert|update|delete|create|drop|alter|with)\s+/i.test(t)) {+ return "sql";+ }++ // YAML — naive+ if (/^---\s*$/m.test(t.split("\n")[0]) || /^[a-zA-Z_][\w-]*\s*:\s*\S/m.test(t)) {+ if (!/^#{1,6}\s/m.test(t) && !/\|/.test(t.split("\n")[0])) {+ // could be yaml+ const firstLines = t.split("\n").slice(0, 5).join("\n");+ if (/^[a-zA-Z_][\w-]*\s*:/m.test(firstLines)) return "yaml";+ }+ }++ // Markdown — has headings, lists, fences, or links+ if (/^#{1,6}\s+\S/m.test(t)) return "markdown";+ if (/^[*-]\s+\S/m.test(t) && /^[*-]\s+\S/m.test(t.split("\n").slice(1).join("\n"))) return "markdown";+ if (/```[\s\S]*?```/.test(t)) return "markdown";+ if (/!\[[^\]]*\]\([^)]+\)/.test(t)) return "markdown";++ // CSV / TSV+ const lines = t.split("\n").slice(0, 10);+ if (lines.length >= 2) {+ const tabCount = (lines[0].match(/\t/g) || []).length;+ if (tabCount >= 1 && tabCount === ((lines[1].match(/\t/g) || []).length)) {+ return "tsv";+ }+ const commaCount = (lines[0].match(/,/g) || []).length;+ if (commaCount >= 1) {+ const allMatch = lines.slice(1, 5).every(+ (l) => Math.abs(((l.match(/,/g) || []).length) - commaCount) <= 1,+ );+ if (allMatch) return "csv";+ }+ }++ return "text";+}++export type ParsedSummary = {+ format: DetectedFormat;+ raw: string;+ /** Human-readable summary you can pass to the AI alongside raw, when raw is huge */+ preview: string;+ /** Optional structured data extracted */+ structured?: unknown;+};++const MAX_RAW_FOR_AGENT = 40_000;++export function summarizeForAgent(input: string): ParsedSummary {+ const format = detectFormat(input);+ const raw = input;+ let preview = "";+ let structured: unknown;++ switch (format) {+ case "csv":+ case "tsv": {+ try {+ const result = Papa.parse(input.trim(), {+ header: true,+ skipEmptyLines: true,+ delimiter: format === "tsv" ? "\t" : ",",+ dynamicTyping: true,+ });+ const rows = result.data as Record<string, unknown>[];+ const fields = result.meta.fields ?? [];+ structured = { fields, rows };+ const sampleRows = rows.slice(0, 20);+ preview = [+ `[${format.toUpperCase()}] ${rows.length} 行 × ${fields.length} 列`,+ `字段: ${fields.join(", ")}`,+ `前 ${sampleRows.length} 行 (JSON):`,+ JSON.stringify(sampleRows, null, 2),+ ].join("\n");+ } catch (err) {+ preview = `[${format}] (解析失败: ${err instanceof Error ? err.message : err})`;+ }+ break;+ }+ case "json": {+ try {+ const parsed = JSON.parse(input);+ structured = parsed;+ const pretty = JSON.stringify(parsed, null, 2);+ preview =+ pretty.length > 4000+ ? `[JSON] 截断预览 (完整 ${pretty.length} 字节):\n${pretty.slice(0, 4000)}\n…`+ : `[JSON]\n${pretty}`;+ } catch (err) {+ preview = `[JSON 但解析失败]\n${input.slice(0, 1000)}`;+ }+ break;+ }+ case "markdown":+ preview = `[Markdown 文档, ${input.length} 字符]`;+ break;+ case "html":+ preview = `[HTML 文档, ${input.length} 字符]`;+ break;+ case "sql":+ preview = `[SQL 查询/脚本]`;+ break;+ case "yaml":+ preview = `[YAML 配置]`;+ break;+ default:+ preview = `[纯文本, ${input.length} 字符]`;+ }++ // Truncate raw for agent if huge+ let agentRaw = raw;+ if (raw.length > MAX_RAW_FOR_AGENT) {+ agentRaw =+ raw.slice(0, MAX_RAW_FOR_AGENT) ++ `\n\n[...内容过长, 已截断 (${raw.length - MAX_RAW_FOR_AGENT} 字符省略)]`;+ }++ return { format, raw: agentRaw, preview, structured };+}diff --git a/src/lib/parsers/file.ts b/src/lib/parsers/file.tsnew file mode 100644index 00000000..e15c8d33--- /dev/null+++ b/src/lib/parsers/file.ts@@ -0,0 +1,69 @@+"use client";++import * as XLSX from "xlsx";++export type FileParseResult = {+ filename: string;+ format: string;+ text: string;+ /** if image, we keep the data URL */+ dataUrl?: string;+};++const TEXT_EXTS = new Set([+ "txt", "md", "markdown", "csv", "tsv", "json", "yaml", "yml",+ "sql", "js", "ts", "tsx", "jsx", "py", "rb", "go", "rs", "java",+ "html", "htm", "xml", "log", "ini", "toml",+]);+const IMAGE_EXTS = new Set(["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"]);+const SHEET_EXTS = new Set(["xlsx", "xls", "ods", "xlsm"]);++function ext(name: string): string {+ const i = name.lastIndexOf(".");+ return i > -1 ? name.slice(i + 1).toLowerCase() : "";+}++export async function parseFile(file: File): Promise<FileParseResult> {+ const e = ext(file.name);++ if (SHEET_EXTS.has(e)) {+ const buf = await file.arrayBuffer();+ const wb = XLSX.read(buf, { type: "array" });+ const out: string[] = [];+ for (const sheetName of wb.SheetNames) {+ const sheet = wb.Sheets[sheetName];+ const csv = XLSX.utils.sheet_to_csv(sheet);+ out.push(`# Sheet: ${sheetName}\n${csv}`);+ }+ return {+ filename: file.name,+ format: "csv",+ text: out.join("\n\n"),+ };+ }++ if (IMAGE_EXTS.has(e)) {+ const dataUrl = await new Promise<string>((resolve, reject) => {+ const r = new FileReader();+ r.onload = () => resolve(r.result as string);+ r.onerror = reject;+ r.readAsDataURL(file);+ });+ // For images we describe and embed; ai will be told to render the image inline+ return {+ filename: file.name,+ format: "image",+ text: ``,+ dataUrl,+ };+ }++ if (TEXT_EXTS.has(e) || file.type.startsWith("text/")) {+ const text = await file.text();+ return { filename: file.name, format: e || "text", text };+ }++ // unknown — try as text+ const text = await file.text();+ return { filename: file.name, format: "text", text };+}diff --git a/src/lib/store.ts b/src/lib/store.tsnew file mode 100644index 00000000..1cc36cf2--- /dev/null+++ b/src/lib/store.ts@@ -0,0 +1,456 @@+"use client";++import { useEffect, useState } from "react";+import { create } from "zustand";+import { persist } from "zustand/middleware";++export type ModelOption = { id: string; label: string };++export type AgentInfo = {+ id: string;+ label: string;+ vendor: string;+ available: boolean;+ path?: string;+ /** "stdin" | "argv" | "acp" | "pi-rpc" — used by UI to badge unsupported adapters. */+ protocol: "stdin" | "argv" | "acp" | "pi-rpc";+ /** Curated model list for the picker. Always begins with `default`. */+ models: ModelOption[];+ /** True for ACP / pi-rpc adapters where Convert returns a friendly error. */+ unsupported?: boolean;+};++export type ConvertStatus = "idle" | "running" | "done" | "error";++export type LogEntry = {+ kind:+ | "info"+ | "stderr"+ | "error"+ | "delta"+ | "meta"+ | "start"+ | "done"+ | "raw";+ text: string;+ ts: number;+ /** elapsed ms from convert start */+ elapsed?: number;+ /** structured payload for meta events */+ data?: unknown;+};++export type RunStats = {+ startedAt?: number;+ firstByteAt?: number;+ endedAt?: number;+ promptBytes?: number;+ outputBytes: number;+ deltaCount: number;+ model?: string;+ costUsd?: number;+ inputTokens?: number;+ outputTokens?: number;+ cacheReadTokens?: number;+ cacheCreateTokens?: number;+ durationMs?: number;+ bin?: string;+};++export type Task = {+ id: string;+ name: string;+ // input+ content: string;+ format: string;+ filename?: string;+ templateId: string;+ // output+ html: string;+ status: ConvertStatus;+ log: LogEntry[];+ stats: RunStats;+ // sample-derived fields — when populated, the next convert switches to+ // diff-edit mode and asks the agent to make minimal changes to baseHtml+ // instead of regenerating from scratch.+ baseContent?: string;+ baseHtml?: string;+ /** id of the source sample (if any), so the gallery can mark it loaded */+ sampleId?: string;+ // meta+ createdAt: number;+ updatedAt: number;+};++const emptyStats: RunStats = { outputBytes: 0, deltaCount: 0 };++function makeTask(init?: Partial<Task>): Task {+ const now = Date.now();+ return {+ id: init?.id ?? `t_${now.toString(36)}_${Math.random().toString(36).slice(2, 7)}`,+ name: init?.name ?? "新任务",+ content: init?.content ?? "",+ format: init?.format ?? "text",+ filename: init?.filename,+ templateId: init?.templateId ?? "article-magazine",+ html: init?.html ?? "",+ status: init?.status ?? "idle",+ log: init?.log ?? [],+ stats: init?.stats ?? emptyStats,+ baseContent: init?.baseContent,+ baseHtml: init?.baseHtml,+ sampleId: init?.sampleId,+ createdAt: init?.createdAt ?? now,+ updatedAt: init?.updatedAt ?? now,+ };+}++// Shipped locales. Adding a new one means dropping a dictionary into+// `src/lib/i18n/locales/` and registering it in `src/lib/i18n.ts`.+// We ship only en + zh-CN today and leave the rest to contributors.+export type Locale = "en" | "zh-CN";++export const LOCALES: Locale[] = ["en", "zh-CN"];++export const LOCALE_LABEL: Record<Locale, string> = {+ "en": "English",+ "zh-CN": "简体中文",+};++/**+ * Which workspace panes are visible.+ * - "split" — editor on the left, preview on the right (default)+ * - "editor" — editor only (full-width input, hide preview)+ * - "preview" — preview only (after the convert is done you usually want the+ * full canvas — esp. for decks)+ */+export type LayoutMode = "split" | "editor" | "preview";++export const LAYOUT_MODES: LayoutMode[] = ["editor", "split", "preview"];++type Persisted = {+ tasks: Task[];+ activeTaskId: string;+ selectedAgent: string | undefined;+ /** Per-agent last-picked model id. Empty / "default" means no `--model` flag. */+ agentModels: Record<string, string>;+ welcomeAck: boolean;+ sidebarCollapsed: boolean;+ locale: Locale;+ layoutMode: LayoutMode;+};++type State = {+ // multi-task+ tasks: Task[];+ activeTaskId: string;++ // global+ agents: AgentInfo[];+ selectedAgent?: string;+ /** Per-agent model id. "default" or absent = no --model flag. */+ agentModels: Record<string, string>;+ welcomeAck: boolean;+ sidebarCollapsed: boolean;+ locale: Locale;+ layoutMode: LayoutMode;++ // task lifecycle+ newTask: (init?: Partial<Pick<Task, "name" | "content" | "format" | "filename" | "templateId">>) => string;+ deleteTask: (id: string) => void;+ setActiveTask: (id: string) => void;+ renameTask: (id: string, name: string) => void;+ duplicateTask: (id: string) => string;+ /**+ * Load a sample into a brand-new task. Sets content / format / templateId /+ * html / baseContent / baseHtml so the user can immediately preview the+ * world-class HTML, edit the content, and the next Convert switches to+ * diff-edit mode (minimal token use).+ */+ loadSample: (sample: {+ id: string;+ name: string;+ content: string;+ format: string;+ templateId: string;+ html: string;+ }) => string;++ // active-task field setters (operate on the currently active task)+ setContent: (s: string) => void;+ setFormat: (f: string) => void;+ setFilename: (f?: string) => void;+ setSelectedTemplate: (id: string) => void;++ // active-task convert-state setters (used by ad-hoc callers, e.g. drafts-menu)+ pushLog: (entry: Omit<LogEntry, "ts">) => void;++ // per-task convert-state setters (used by convert pipeline so a background+ // task keeps streaming even when the user switches to a different one)+ setHtmlFor: (taskId: string, html: string) => void;+ appendHtmlFor: (taskId: string, chunk: string) => void;+ resetHtmlFor: (taskId: string) => void;+ setStatusFor: (taskId: string, s: ConvertStatus) => void;+ pushLogFor: (taskId: string, entry: Omit<LogEntry, "ts">) => void;+ clearLogFor: (taskId: string) => void;+ resetStatsFor: (taskId: string) => void;+ patchStatsFor: (taskId: string, patch: Partial<RunStats>) => void;+ /** snapshot the current (content, html) as the new diff-edit baseline */+ commitBaseFor: (taskId: string) => void;++ // global setters+ setAgents: (a: AgentInfo[]) => void;+ setSelectedAgent: (id?: string) => void;+ setAgentModel: (agentId: string, modelId: string) => void;+ setWelcomeAck: (v: boolean) => void;+ setSidebarCollapsed: (v: boolean) => void;+ setLocale: (l: Locale) => void;+ setLayoutMode: (m: LayoutMode) => void;+};++function patchTask(tasks: Task[], id: string, patch: Partial<Task> | ((t: Task) => Partial<Task>)): Task[] {+ let changed = false;+ const next = tasks.map((t) => {+ if (t.id !== id) return t;+ const p = typeof patch === "function" ? patch(t) : patch;+ changed = true;+ return { ...t, ...p, updatedAt: Date.now() };+ });+ return changed ? next : tasks;+}++const initialTask = makeTask({ name: "任务 1" });++export const useStore = create<State>()(+ persist(+ (set, get) => ({+ tasks: [initialTask],+ activeTaskId: initialTask.id,+ agents: [],+ selectedAgent: undefined,+ agentModels: {},+ welcomeAck: false,+ sidebarCollapsed: false,+ locale: "en",+ layoutMode: "split",++ newTask: (init) => {+ const tasks = get().tasks;+ const n = tasks.length + 1;+ const t = makeTask({ name: init?.name ?? `任务 ${n}`, ...init });+ set({ tasks: [...tasks, t], activeTaskId: t.id });+ return t.id;+ },+ deleteTask: (id) => {+ const { tasks, activeTaskId } = get();+ if (tasks.length <= 1) {+ // never leave 0 tasks — replace with a fresh empty one+ const fresh = makeTask({ name: "任务 1" });+ set({ tasks: [fresh], activeTaskId: fresh.id });+ return;+ }+ const next = tasks.filter((t) => t.id !== id);+ const nextActive =+ activeTaskId === id ? next[Math.max(0, tasks.findIndex((t) => t.id === id) - 1)]?.id ?? next[0].id : activeTaskId;+ set({ tasks: next, activeTaskId: nextActive });+ },+ setActiveTask: (id) => {+ if (get().tasks.some((t) => t.id === id)) set({ activeTaskId: id });+ },+ renameTask: (id, name) => {+ set((s) => ({ tasks: patchTask(s.tasks, id, { name: name.trim() || "未命名" }) }));+ },+ duplicateTask: (id) => {+ const src = get().tasks.find((t) => t.id === id);+ if (!src) return id;+ const copy = makeTask({+ name: `${src.name} · 副本`,+ content: src.content,+ format: src.format,+ filename: src.filename,+ templateId: src.templateId,+ });+ set((s) => ({ tasks: [...s.tasks, copy], activeTaskId: copy.id }));+ return copy.id;+ },+ loadSample: (sample) => {+ const { tasks, activeTaskId } = get();+ const active = tasks.find((t) => t.id === activeTaskId);+ // if the active task is empty (no content, no html), reuse it; otherwise create a new task+ const reuseActive = active && !active.content.trim() && !active.html;+ const t = makeTask({+ id: reuseActive ? active!.id : undefined,+ name: sample.name,+ content: sample.content,+ format: sample.format,+ templateId: sample.templateId,+ html: sample.html,+ baseContent: sample.content,+ baseHtml: sample.html,+ sampleId: sample.id,+ status: sample.html ? "done" : "idle",+ });+ if (reuseActive) {+ set((s) => ({ tasks: patchTask(s.tasks, active!.id, t), activeTaskId: active!.id }));+ return active!.id;+ }+ set((s) => ({ tasks: [...s.tasks, t], activeTaskId: t.id }));+ return t.id;+ },++ setContent: (s) =>+ set((st) => ({ tasks: patchTask(st.tasks, st.activeTaskId, { content: s }) })),+ setFormat: (f) =>+ set((st) => ({ tasks: patchTask(st.tasks, st.activeTaskId, { format: f }) })),+ setFilename: (f) =>+ set((st) => ({ tasks: patchTask(st.tasks, st.activeTaskId, { filename: f }) })),+ setSelectedTemplate: (id) =>+ set((st) => ({ tasks: patchTask(st.tasks, st.activeTaskId, { templateId: id }) })),++ pushLog: (entry) =>+ set((st) => ({+ tasks: patchTask(st.tasks, st.activeTaskId, (t) => ({+ log: [...t.log.slice(-400), { ...entry, ts: Date.now() }],+ })),+ })),++ setHtmlFor: (taskId, html) =>+ set((st) => ({ tasks: patchTask(st.tasks, taskId, { html }) })),+ appendHtmlFor: (taskId, chunk) =>+ set((st) => ({+ tasks: patchTask(st.tasks, taskId, (t) => ({+ html: t.html + chunk,+ stats: {+ ...t.stats,+ outputBytes: t.stats.outputBytes + chunk.length,+ deltaCount: t.stats.deltaCount + 1,+ firstByteAt: t.stats.firstByteAt ?? Date.now(),+ },+ })),+ })),+ resetHtmlFor: (taskId) =>+ set((st) => ({ tasks: patchTask(st.tasks, taskId, { html: "" }) })),+ setStatusFor: (taskId, s) =>+ set((st) => ({ tasks: patchTask(st.tasks, taskId, { status: s }) })),+ pushLogFor: (taskId, entry) =>+ set((st) => ({+ tasks: patchTask(st.tasks, taskId, (t) => ({+ log: [...t.log.slice(-400), { ...entry, ts: Date.now() }],+ })),+ })),+ clearLogFor: (taskId) =>+ set((st) => ({ tasks: patchTask(st.tasks, taskId, { log: [] }) })),+ resetStatsFor: (taskId) =>+ set((st) => ({ tasks: patchTask(st.tasks, taskId, { stats: emptyStats }) })),+ patchStatsFor: (taskId, patch) =>+ set((st) => ({+ tasks: patchTask(st.tasks, taskId, (t) => ({ stats: { ...t.stats, ...patch } })),+ })),+ commitBaseFor: (taskId) =>+ set((st) => ({+ tasks: patchTask(st.tasks, taskId, (t) => ({+ baseContent: t.content,+ baseHtml: t.html,+ })),+ })),++ setAgents: (a) => set({ agents: a }),+ setSelectedAgent: (id) => set({ selectedAgent: id }),+ setAgentModel: (agentId, modelId) =>+ set((s) => ({ agentModels: { ...s.agentModels, [agentId]: modelId } })),+ setWelcomeAck: (v) => set({ welcomeAck: v }),+ setSidebarCollapsed: (v) => set({ sidebarCollapsed: v }),+ setLocale: (l) => set({ locale: l }),+ setLayoutMode: (m) => set({ layoutMode: m }),+ }),+ {+ // Legacy key from the old "HTML Everything" brand; do NOT rename — every+ // existing user's saved tasks live under this localStorage key.+ name: "html-everything-store",+ version: 5,+ partialize: (s): Persisted => ({+ tasks: s.tasks.map((t) => ({+ ...t,+ // never persist running status — a dropped tab can't keep the stream+ status: (t.status === "running" ? "idle" : t.status) as ConvertStatus,+ })),+ activeTaskId: s.activeTaskId,+ selectedAgent: s.selectedAgent,+ agentModels: s.agentModels,+ welcomeAck: s.welcomeAck,+ sidebarCollapsed: s.sidebarCollapsed,+ locale: s.locale,+ layoutMode: s.layoutMode,+ }),+ migrate: (persisted, fromVersion): Persisted => {+ // v1 → v2: wrap top-level content/format/filename/selectedTemplate into a single task.+ if (fromVersion < 2 && persisted && typeof persisted === "object") {+ const old = persisted as Record<string, unknown>;+ const t = makeTask({+ name: "任务 1",+ content: typeof old.content === "string" ? old.content : "",+ format: typeof old.format === "string" ? old.format : "text",+ filename: typeof old.filename === "string" ? old.filename : undefined,+ templateId: typeof old.selectedTemplate === "string" ? old.selectedTemplate : "article-magazine",+ });+ persisted = {+ tasks: [t],+ activeTaskId: t.id,+ selectedAgent: typeof old.selectedAgent === "string" ? old.selectedAgent : undefined,+ welcomeAck: !!old.welcomeAck,+ sidebarCollapsed: false,+ };+ }+ // v2 → v3: introduce agentModels map.+ if (fromVersion < 3 && persisted && typeof persisted === "object") {+ const p = persisted as Record<string, unknown>;+ if (!p.agentModels || typeof p.agentModels !== "object") {+ p.agentModels = {};+ }+ }+ // v3 → v4: introduce UI locale (default English).+ if (fromVersion < 4 && persisted && typeof persisted === "object") {+ const p = persisted as Record<string, unknown>;+ if (!p.locale || typeof p.locale !== "string" || !(LOCALES as string[]).includes(p.locale as string)) {+ p.locale = "en";+ }+ }+ // v4 → v5: introduce workspace layoutMode (default split).+ if (fromVersion < 5 && persisted && typeof persisted === "object") {+ const p = persisted as Record<string, unknown>;+ if (+ !p.layoutMode ||+ typeof p.layoutMode !== "string" ||+ !(LAYOUT_MODES as string[]).includes(p.layoutMode as string)+ ) {+ p.layoutMode = "split";+ }+ }+ return persisted as Persisted;+ },+ },+ ),+);++/** Returns true once the persist middleware has finished restoring state. */+export function usePersistHydrated(): boolean {+ const [hydrated, setHydrated] = useState(false);+ useEffect(() => {+ setHydrated(useStore.persist.hasHydrated());+ const unsub = useStore.persist.onFinishHydration(() => setHydrated(true));+ return unsub;+ }, []);+ return hydrated;+}++// ── selectors / hooks for active task ──────────────────────────────+export const selectActiveTask = (s: State): Task | undefined =>+ s.tasks.find((t) => t.id === s.activeTaskId);++export function useActiveTask(): Task | undefined {+ return useStore(selectActiveTask);+}++export function useActiveField<K extends keyof Task>(field: K): Task[K] | undefined {+ return useStore((s) => selectActiveTask(s)?.[field]);+}diff --git a/src/lib/templates/index.ts b/src/lib/templates/index.tsnew file mode 100644index 00000000..bf1af5b6--- /dev/null+++ b/src/lib/templates/index.ts@@ -0,0 +1,91 @@+/**+ * Client-facing types + hook for the disk-backed skill registry. The previous+ * 1600-line hardcoded `TEMPLATES` array has been replaced by a folder-per-skill+ * layout under `src/lib/templates/skills/`. Adding a new template = adding a+ * new folder with `SKILL.md` (+ optional `example.md` / `example.html`).+ *+ * - Server-only: `loader.ts` reads disk.+ * - Public API: `/api/templates` returns the SkillMeta[] list, `/api/templates/:id/example` returns one skill's bundled example.+ * - Client: `useTemplates()` below caches the fetch across all callers.+ */++"use client";++import { useEffect, useState } from "react";+import type { SkillMeta as ServerSkillMeta, SkillExampleMeta } from "./loader";++export type TemplateDef = ServerSkillMeta;+export type TemplateExampleMeta = SkillExampleMeta;++// Module-level cache + in-flight promise dedupes parallel callers across the+// React tree. SWR / react-query would also work but adding a dep for one+// endpoint is overkill — this is ~25 lines and behaves the same.+let cache: TemplateDef[] | null = null;+let inflight: Promise<TemplateDef[]> | null = null;+type Listener = (v: TemplateDef[]) => void;+const listeners = new Set<Listener>();++async function fetchTemplates(): Promise<TemplateDef[]> {+ if (cache) return cache;+ if (inflight) return inflight;+ inflight = (async () => {+ const res = await fetch("/api/templates");+ if (!res.ok) throw new Error(`GET /api/templates → ${res.status}`);+ const json = (await res.json()) as { templates: TemplateDef[] };+ cache = json.templates;+ for (const l of listeners) l(cache);+ return cache;+ })();+ try {+ return await inflight;+ } finally {+ inflight = null;+ }+}++/** Returns the registry. `undefined` while loading; never throws. */+export function useTemplates(): TemplateDef[] | undefined {+ const [data, setData] = useState<TemplateDef[] | undefined>(cache ?? undefined);+ useEffect(() => {+ if (cache) {+ setData(cache);+ return;+ }+ const listener = (v: TemplateDef[]) => setData(v);+ listeners.add(listener);+ fetchTemplates().catch(() => {+ // surface as empty — picker shows "no matches", caller can decide+ setData([]);+ });+ return () => {+ listeners.delete(listener);+ };+ }, []);+ return data;+}++/** Fetch one skill's bundled example (content + html). */+export async function fetchTemplateExample(id: string): Promise<{+ id: string;+ name: string;+ templateId: string;+ format: string;+ tagline: string;+ desc: string;+ source?: { url: string; label: string };+ content: string;+ html: string;+} | null> {+ const res = await fetch(`/api/templates/${encodeURIComponent(id)}/example`);+ if (!res.ok) return null;+ return res.json();+}++/** Look up one template by id from the in-memory cache. Returns `undefined` if not loaded yet. */+export function getCachedTemplate(id: string): TemplateDef | undefined {+ return cache?.find((t) => t.id === id);+}++// Re-export scenario constants so existing imports from `@/lib/templates`+// keep working without touching every consumer.+export { SCENARIO_KEYS, SCENARIO_ORDER, scenarioLabelKey } from "./scenarios";diff --git a/src/lib/templates/loader.ts b/src/lib/templates/loader.tsnew file mode 100644index 00000000..bc99c162--- /dev/null+++ b/src/lib/templates/loader.ts@@ -0,0 +1,245 @@+import fs from "node:fs";+import path from "node:path";++/**+ * File-based skill registry, modelled on nexu-io/open-design's daemon layout+ * (see `apps/daemon/src/skills.ts`). Each template is a folder:+ *+ * src/lib/templates/skills/<id>/+ * SKILL.md — frontmatter (id, scenario, tags, …) + prompt body+ * example.md — (optional) sample input content+ * example.html — (optional) pre-rendered preview, shown inline in the picker+ *+ * Adding a template = adding a folder. No TS code change required; the API+ * routes rescan disk and the client refetches `/api/templates`.+ */++const SKILLS_DIR = path.join(process.cwd(), "src/lib/templates/skills");++export type SkillFrontmatter = {+ name?: string;+ zh_name?: string;+ en_name?: string;+ emoji?: string;+ description?: string;+ category?: string;+ scenario?: string;+ aspect_hint?: string;+ featured?: number;+ recommended?: number;+ tags?: string[];+ // sample / preview metadata — only present when example.{md,html} ships alongside+ example_id?: string;+ example_name?: string;+ example_format?: string;+ example_tagline?: string;+ example_desc?: string;+ example_source_url?: string;+ example_source_label?: string;+};++export type SkillExampleMeta = {+ id: string;+ name: string;+ format: string;+ tagline: string;+ desc: string;+ source?: { url: string; label: string };+ /** true iff `example.html` exists on disk */+ hasHtml: boolean;+ /** true iff `example.md` exists on disk */+ hasMd: boolean;+};++/**+ * Skill metadata used by the picker. Body is excluded so we can return the+ * entire registry in one cheap fetch without shipping prompt text to the+ * browser.+ */+export type SkillMeta = {+ id: string;+ zhName: string;+ enName: string;+ emoji: string;+ description: string;+ category: string;+ scenario: string;+ aspectHint: string;+ featured?: number;+ /**+ * If set, the skill is included in the "推荐 / Featured" group at the top of+ * the picker. Lower number = higher rank in that group.+ */+ recommended?: number;+ tags: string[];+ example?: SkillExampleMeta;+};++export type LoadedSkill = SkillMeta & {+ body: string;+ exampleMd?: string;+ exampleHtml?: string;+};++// ─── frontmatter parser ──────────────────────────────────────────────+// Tiny, dependency-free. Handles the flat schema written by+// `scripts/migrate-skills.mts`: strings (optionally quoted), integers, and+// one-line array literals (`tags: ["a", "b"]`).++function parseFrontmatter(raw: string): { fm: SkillFrontmatter; body: string } {+ const m = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*\r?\n?([\s\S]*)$/m.exec(raw);+ if (!m) return { fm: {}, body: raw };+ const block = m[1];+ const body = m[2] ?? "";+ const fm: SkillFrontmatter = {};+ for (const line of block.split(/\r?\n/)) {+ const mm = /^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(.*)$/.exec(line);+ if (!mm) continue;+ const key = mm[1];+ let val: string = mm[2].trim();+ if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {+ val = val.slice(1, -1).replace(/\\"/g, '"');+ }+ switch (key) {+ case "featured": {+ const n = Number(val);+ if (Number.isFinite(n)) fm.featured = n;+ break;+ }+ case "recommended": {+ const n = Number(val);+ if (Number.isFinite(n)) fm.recommended = n;+ break;+ }+ case "tags": {+ const arr = /^\[(.*)\]$/.exec(val);+ if (arr) {+ fm.tags = arr[1]+ .split(",")+ .map((s) => s.trim().replace(/^["']|["']$/g, ""))+ .map((s) => s.replace(/\\"/g, '"'))+ .filter(Boolean);+ }+ break;+ }+ case "name":+ case "zh_name":+ case "en_name":+ case "emoji":+ case "description":+ case "category":+ case "scenario":+ case "aspect_hint":+ case "example_id":+ case "example_name":+ case "example_format":+ case "example_tagline":+ case "example_desc":+ case "example_source_url":+ case "example_source_label":+ (fm as Record<string, string>)[key] = val;+ break;+ }+ }+ return { fm, body: body.trim() };+}++function safeRead(p: string): string | undefined {+ try {+ return fs.readFileSync(p, "utf8");+ } catch {+ return undefined;+ }+}++function fmToMeta(id: string, fm: SkillFrontmatter, hasHtml: boolean, hasMd: boolean): SkillMeta {+ const meta: SkillMeta = {+ id,+ zhName: fm.zh_name ?? fm.name ?? id,+ enName: fm.en_name ?? id,+ emoji: fm.emoji ?? "✨",+ description: fm.description ?? "",+ category: fm.category ?? "other",+ scenario: fm.scenario ?? "marketing",+ aspectHint: fm.aspect_hint ?? "",+ tags: Array.isArray(fm.tags) ? fm.tags : [],+ };+ if (typeof fm.featured === "number") meta.featured = fm.featured;+ if (typeof fm.recommended === "number") meta.recommended = fm.recommended;+ if (fm.example_id || hasMd || hasHtml) {+ meta.example = {+ id: fm.example_id ?? `example-${id}`,+ name: fm.example_name ?? `${meta.zhName} 示例`,+ format: fm.example_format ?? "markdown",+ tagline: fm.example_tagline ?? "",+ desc: fm.example_desc ?? "",+ hasHtml,+ hasMd,+ ...(fm.example_source_url+ ? {+ source: {+ url: fm.example_source_url,+ label: fm.example_source_label ?? fm.example_source_url,+ },+ }+ : {}),+ };+ }+ return meta;+}++// ─── public surface ──────────────────────────────────────────────────++// Cache the metadata listing in production; bypass in dev so new skill+// folders show up without restarting `next dev`.+let metaCache: SkillMeta[] | null = null;+const isDev = process.env.NODE_ENV !== "production";++function isValidId(id: string): boolean {+ return /^[a-z0-9][a-z0-9-]*$/i.test(id);+}++/** Return picker-ready metadata for every skill folder on disk. */+export function listSkills(): SkillMeta[] {+ if (!isDev && metaCache) return metaCache;+ const out: SkillMeta[] = [];+ let dirents: fs.Dirent[] = [];+ try {+ dirents = fs.readdirSync(SKILLS_DIR, { withFileTypes: true });+ } catch {+ return out;+ }+ for (const ent of dirents) {+ if (!ent.isDirectory()) continue;+ const id = ent.name;+ if (!isValidId(id)) continue;+ const dir = path.join(SKILLS_DIR, id);+ const raw = safeRead(path.join(dir, "SKILL.md"));+ if (!raw) continue;+ const { fm } = parseFrontmatter(raw);+ const hasHtml = fs.existsSync(path.join(dir, "example.html"));+ const hasMd = fs.existsSync(path.join(dir, "example.md"));+ out.push(fmToMeta(id, fm, hasHtml, hasMd));+ }+ metaCache = out;+ return out;+}++/** Load one skill including its prompt body and example contents. */+export function loadSkill(id: string): LoadedSkill | null {+ if (!isValidId(id)) return null;+ const dir = path.join(SKILLS_DIR, id);+ const raw = safeRead(path.join(dir, "SKILL.md"));+ if (!raw) return null;+ const { fm, body } = parseFrontmatter(raw);+ const exampleMd = safeRead(path.join(dir, "example.md"));+ const exampleHtml = safeRead(path.join(dir, "example.html"));+ const meta = fmToMeta(id, fm, !!exampleHtml, !!exampleMd);+ return { ...meta, body, exampleMd, exampleHtml };+}++/** Lightweight check for the picker — true iff `example.html` exists. */+export function skillHasPreview(id: string): boolean {+ if (!isValidId(id)) return false;+ return fs.existsSync(path.join(SKILLS_DIR, id, "example.html"));+}diff --git a/src/lib/templates/scenarios.ts b/src/lib/templates/scenarios.tsnew file mode 100644index 00000000..b0dde313--- /dev/null+++ b/src/lib/templates/scenarios.ts@@ -0,0 +1,68 @@+/**+ * Scenario vocabulary + ordering for the picker. Kept as a tiny constants+ * module so both server (validation) and client (filter chips) can import it+ * without pulling in the disk loader.+ *+ * Adding a new scenario: add the key + i18n dictionary entry. Skills whose+ * `frontmatter.scenario` field uses a key not listed below still load — they+ * just sort under a synthetic "other" bucket at the end and render with the+ * raw id as label.+ */++import type { DictKey } from "@/lib/i18n";++/** Canonical scenario keys we know how to translate. */+export const SCENARIO_KEYS = [+ "marketing",+ "engineering",+ "operations",+ "product",+ "design",+ "finance",+ "sales",+ "hr",+ "personal",+ "education",+ "creator",+ "video",+] as const;++export type ScenarioKey = (typeof SCENARIO_KEYS)[number];++const SCENARIO_DICT_KEY: Record<string, DictKey> = {+ marketing: "template.scenario.marketing",+ engineering: "template.scenario.engineering",+ operations: "template.scenario.operations",+ product: "template.scenario.product",+ design: "template.scenario.design",+ finance: "template.scenario.finance",+ sales: "template.scenario.sales",+ hr: "template.scenario.hr",+ personal: "template.scenario.personal",+ education: "template.scenario.education",+ creator: "template.scenario.creator",+ video: "template.scenario.video",+};++/**+ * Returns the dict key for a scenario id, or `null` if the scenario is+ * unknown (the picker renders the raw id as a fallback label).+ */+export function scenarioLabelKey(scenario: string): DictKey | null {+ return SCENARIO_DICT_KEY[scenario] ?? null;+}++export const SCENARIO_ORDER: string[] = [+ "marketing",+ "design",+ "product",+ "engineering",+ "operations",+ "creator",+ "finance",+ "education",+ "personal",+ "hr",+ "sales",+ "video",+];diff --git a/src/lib/templates/shared.ts b/src/lib/templates/shared.tsnew file mode 100644index 00000000..b4373374--- /dev/null+++ b/src/lib/templates/shared.ts@@ -0,0 +1,49 @@+/**+ * Shared design directives prepended to every skill's prompt body. Kept in its+ * own module so the `/api/convert` route can call `assemblePrompt({ body, … })`+ * without depending on the disk loader's full surface.+ */+export const SHARED_DESIGN_DIRECTIVES = `+你是世界级的视觉设计师 + 资深前端工程师。请输出一份**自包含的单文件 HTML**,要求:++【硬性技术要求】+- 文档以 \`<!DOCTYPE html>\` 开头, 末尾以 \`</html>\` 结束。+- 在 \`<head>\` 中通过 CDN 引入 Tailwind v3 Play (https://cdn.tailwindcss.com) 与所需的 Google Fonts。+- 不要引用任何外部图片 URL(除非你能保证 URL 长期有效;优先使用 CSS / SVG 内联绘制)。+- 必要的脚本(图表、动画)通过 jsdelivr CDN 引入;保持单文件可双击打开即用。+- 输出**纯 HTML**, 不要用 markdown 代码围栏包裹, 不要任何解释性文字。第一个字符必须是 \`<\`。++【设计准则 — 世界级标准】+- 排版: 中文优先 \`Noto Sans SC\` / \`Noto Serif SC\`, 英文 \`Inter\` / \`Manrope\` / \`SF Pro\` 风格。+- 色彩: 使用 1 个主色 + 2 个中性色 + 至多 1 个强调色; 大胆留白; 不使用纯黑纯白 (#000/#fff), 改用 \`#0a0a0a\` / \`#fafafa\`。+- 网格: 8 px 基线; 段落最大宽度 65 ch; 标题与正文有清晰的层级。+- 微观细节: 圆角统一 (rounded-xl/2xl), 投影柔和 (shadow-sm/lg), 边框 1px \`#e5e7eb\` / \`#262626\`。+- 动效: 仅在必要处使用 \`transition-all\` 或入场 fade-in; 不要喧宾夺主。+- 无障碍: 颜色对比度 ≥ 4.5; 重要交互有 focus 态。++【内容真实性】+- **必须使用用户提供的真实数据**, 不要编造、不要 lorem ipsum、不要 "Your text here"。+- 如果用户数据是结构化数据 (CSV/JSON), 请提取关键洞察并以图表/表格呈现。+- 中文与英文混排时, 中英文之间留半角空格 (盘古之白)。++`;++/**+ * Wrap a per-template instruction body with the shared design directives and+ * the user content tail. This is the canonical prompt shape; both inline+ * `buildPrompt` functions in `index.ts` and the skill-folder loader assemble+ * prompts via this helper so behaviour stays identical.+ */+export function assemblePrompt(opts: {+ body: string;+ content: string;+ format: string;+}): string {+ return `${SHARED_DESIGN_DIRECTIVES}+${opts.body.trim()}++【输入格式】: ${opts.format}+【用户内容】:+${opts.content}+`;+}diff --git a/src/lib/templates/skills/article-magazine/SKILL.md b/src/lib/templates/skills/article-magazine/SKILL.mdnew file mode 100644index 00000000..b023be9e--- /dev/null+++ b/src/lib/templates/skills/article-magazine/SKILL.md@@ -0,0 +1,29 @@+---+name: article-magazine+zh_name: "杂志文章"+en_name: "Magazine Article"+emoji: "📖"+description: "Substack / Medium 高级感长文排版, 适合公众号、博客发布"+category: article+scenario: marketing+aspect_hint: "A4 / 长页面"+featured: 11+tags: ["blog", "essay", "newsletter", "公众号", "博客", "文章"]+example_id: sample-article-trq212-html+example_name: "杂志文章 · HTML 取代 Markdown"+example_format: markdown+example_tagline: "灵感来自 @trq212 的推文"+example_desc: "围绕「AI 时代 HTML > Markdown」的延伸评论, 含原推附注与可点击链接"+example_source_url: "https://x.com/trq212/status/2052809885763747935"+example_source_label: "@trq212 / x.com"+---++【模板: 杂志文章】+- 顶部 hero: 大标题 (text-5xl/6xl) + 可选副标题 + 作者 / 阅读时间 / 日期元数据。+- 正文: 单栏, 最大宽度约 700px, 居中。段落 `text-lg leading-relaxed text-neutral-700 dark:text-neutral-300`。+- H2 / H3 标题用 serif 字体, 让正文与标题有视觉对比。+- 引用块使用左侧粗 accent 色边线 + 斜体。+- 代码块: 圆角 + 深色背景 + 浅色文字, 显示语言标签。+- 列表项使用自定义 bullet(小方块 / accent 圆点)。+- 章节之间用 `<hr>` 分隔, 但样式做成中央居中的小 ornament。+- 文末加一个简单的 "如果觉得有用,欢迎转发" 行动卡片。diff --git a/src/lib/templates/skills/article-magazine/example.html b/src/lib/templates/skills/article-magazine/example.htmlnew file mode 100644index 00000000..7f7f56ba--- /dev/null+++ b/src/lib/templates/skills/article-magazine/example.html@@ -0,0 +1,81 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>我读完 @trq212 那条推之后, 把所有 markdown 都换成了 HTML</title>+<script src="https://cdn.tailwindcss.com"></script>+<link rel="preconnect" href="https://fonts.googleapis.com">+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Sans+SC:wght@300;400;500;600&family=Noto+Serif+SC:wght@500;700;900&display=swap" rel="stylesheet">+<style>+ :root { --ink:#1a1a1a; --paper:#fafaf7; --line:#e7e5e0; --mute:#6b6760; --accent:#b8553a; --twitter:#1d9bf0; }+ body { font-family:'Inter','Noto Sans SC',sans-serif; background:var(--paper); color:var(--ink); -webkit-font-smoothing:antialiased; }+ .serif { font-family:'Noto Serif SC',Georgia,serif; }+ .ornament { display:flex; align-items:center; justify-content:center; gap:14px; margin:48px 0; color:var(--mute); }+ .ornament::before, .ornament::after { content:""; flex:1; max-width:60px; height:1px; background:var(--line); }+ .article p { font-size:1.0625rem; line-height:1.8; color:#262421; margin:1.1em 0; max-width:65ch; }+ .article h2 { font-family:'Noto Serif SC',serif; font-size:1.875rem; font-weight:700; margin:2.4em 0 0.8em; letter-spacing:-0.01em; }+ .article blockquote { border-left:3px solid var(--accent); padding:0 0 0 20px; margin:1.6em 0; font-style:italic; color:var(--mute); font-family:'Noto Serif SC',serif; font-size:1.0625rem; line-height:1.7; }+ .article a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }+ .grain::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:0.4; background-image:radial-gradient(circle at 12% 18%, rgba(106,92,56,0.05), transparent 45%), radial-gradient(circle at 88% 72%, rgba(106,92,56,0.04), transparent 50%); }+</style>+</head>+<body class="grain">+<article class="article max-w-[720px] mx-auto px-6 pt-20 pb-32">++ <!-- Source banner — clearly attributes the inspiration -->+ <a href="https://x.com/trq212/status/2052809885763747935" target="_blank" rel="noopener" class="!no-underline group block mb-10 rounded-2xl border border-[var(--line)] bg-white/70 hover:bg-white transition-colors p-4 flex items-start gap-4">+ <div class="shrink-0 w-10 h-10 rounded-full bg-[var(--twitter)] grid place-items-center text-white">+ <svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>+ </div>+ <div class="min-w-0 flex-1">+ <div class="text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--mute)] mb-1">灵感来自 / Source</div>+ <div class="text-[14px] font-medium text-[var(--ink)] leading-snug">@trq212 关于 "在 AI 时代, HTML 已经取代 markdown 成为最终形态" 的推文</div>+ <div class="text-[12px] text-[var(--mute)] mt-1 break-all group-hover:text-[var(--accent)] transition-colors">x.com/trq212/status/2052809885763747935 ↗</div>+ </div>+ </a>++ <div class="text-[11px] font-medium tracking-[0.22em] uppercase text-[var(--accent)] mb-5">Essay · 2026.05 · 评论 / 延伸</div>+ <h1 class="serif text-[3rem] leading-[1.08] font-black tracking-tight mb-5">+ 我读完 <a href="https://x.com/trq212/status/2052809885763747935" target="_blank" rel="noopener" class="italic font-bold !no-underline" style="color:var(--accent)">@trq212</a> 那条推之后,<br/>+ 把所有 markdown 都换成了 HTML+ </h1>+ <p class="text-[1.125rem] leading-relaxed text-[var(--mute)] font-light max-w-[60ch] mb-8">+ 简而言之: 在 AI 写作 / 编辑器 / 代理时代, markdown 这个 "中间态" 已经撑不住了 —— HTML 才是面向读者的最终形态。+ </p>+ <div class="flex items-center gap-3 text-[12px] text-[var(--mute)] pb-12 border-b border-[var(--line)]">+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-[#c96442] to-[#e9b94a]"></div>+ <span class="font-medium text-[var(--ink)]">Tom Pan</span>+ <span>·</span><span>5 月 11 日</span>+ <span>·</span><span>4 分钟阅读</span>+ </div>++ <h2>让我点头的三个观察</h2>+ <p><span class="serif font-bold text-[1.5rem] float-left mr-2 leading-none mt-1.5" style="color:var(--accent)">第</span>一, 我们对 markdown 的爱, 主要是写起来爽。但读者从来没投过票。读者拿到的永远是某个 markdown 渲染器吐出来的结果 —— 而那个渲染器属于平台, 不属于你。</p>+ <p>第二, 截图发推这件事, markdown 输了。随便挑一段 markdown, 截图发出去都是被 GitHub 默认主题压扁的灰白方块。HTML 可以是壁纸级图片。</p>+ <p>第三, 公众号 / 知乎 / 小红书 / Notion / 飞书 —— 每一家解释 markdown 的方式都不一样。你写一份, 5 个平台得调 5 次。<strong class="font-semibold text-[var(--ink)]">HTML + 内联 CSS, 一次粘贴, 任何平台都还原</strong>。</p>++ <h2>但 HTML 太啰嗦, 这是真的</h2>+ <p><code class="px-1.5 py-0.5 rounded bg-[#f0ece5] text-[0.92em] font-mono text-[#7a3d27]"><div class="..."></code> 写多了想吐, 这是事实。之前没人愿意花成本写 HTML, 因为同样的内容, markdown 30 秒, HTML 30 分钟。</p>+ <blockquote>变量是 —— AI 把这 30 分钟降到 30 秒了。<br/>你写 markdown, AI 把它升级成可交付的 HTML。你管最终形态, AI 管啰嗦细节。</blockquote>++ <h2>我们顺手做了一个工具</h2>+ <p>灵感来自原推, 加上 Claude Code 团队的实践, 我们做了 <a href="#">HTML Anything</a>。左侧贴 markdown / CSV / JSON, 选一个模板 (杂志、PPT、海报、小红书、数据报告 …), 按 ⌘+Enter —— 本地的 Claude / Cursor / Codex 在你<strong class="font-semibold text-[var(--ink)]">已经登录</strong>的 session 里跑, 几秒后右侧就是一份可以直接复制到公众号 / 推特 / 知乎的 HTML。</p>+ <p>不需要 API Key, 不浪费 token (二次编辑只跑 diff)。</p>++ <h2>结论</h2>+ <p>如果你也觉得 "markdown → 编辑器手动重排" 这件事浪费了你的人生 —— 看一眼原推, 看一眼 Claude Code 团队的迁移, 然后试试任何一个能把 markdown 自动升格为 HTML 的工具。</p>++ <div class="ornament"><span class="serif italic">· · ·</span></div>++ <div class="rounded-2xl border border-[var(--line)] bg-white/60 p-6 mt-12 flex items-start gap-4">+ <div class="text-2xl shrink-0">📩</div>+ <div>+ <div class="font-semibold text-[var(--ink)] mb-1">题图致敬: 推文中那个 "everything is HTML" 的瞬间。</div>+ <div class="text-[13px] text-[var(--mute)]">阅读原推 → <a href="https://x.com/trq212/status/2052809885763747935" target="_blank" rel="noopener" style="color:var(--accent)">x.com/trq212/status/2052809885763747935</a></div>+ </div>+ </div>+</article>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/article-magazine/example.md b/src/lib/templates/skills/article-magazine/example.mdnew file mode 100644index 00000000..16b7e0f7--- /dev/null+++ b/src/lib/templates/skills/article-magazine/example.md@@ -0,0 +1,38 @@+# 我读完 @trq212 那条推之后, 把所有 markdown 都换成了 HTML++> 灵感原文: https://x.com/trq212/status/2052809885763747935+>+> 简而言之: 在 AI 写作 / 编辑器 / 代理时代, markdown 这个"中间态"已经撑不住了 —— HTML 才是面向读者的最终形态。++## 让我点头的三个观察++第一, 我们对 markdown 的爱, 主要是写起来爽。但读者从来没投过票。+读者拿到的永远是某个 markdown 渲染器吐出来的结果 —— 而那个渲染器属于平台, 不属于你。++第二, 截图发推这件事, markdown 输了。+随便挑一段 markdown, 截图发出去都是被 GitHub 默认主题压扁的灰白方块。HTML 可以是壁纸级图片。++第三, 公众号 / 知乎 / 小红书 / Notion / 飞书 —— 每一家解释 markdown 的方式都不一样。+你写一份, 5 个平台得调 5 次。HTML + 内联 CSS, 一次粘贴, 任何平台都还原。++## 但 HTML 太啰嗦, 这是真的++`<div class="...">` 写多了想吐, 这是事实。+之前没人愿意花成本写 HTML, 因为同样的内容, markdown 30 秒, HTML 30 分钟。++变量是 —— **AI 把这 30 分钟降到 30 秒了**。+你写 markdown, AI 把它升级成可交付的 HTML。你管最终形态, AI 管啰嗦细节。++## 我们顺手做了一个工具++灵感来自原推, 加上 Claude Code 团队的实践, 我们做了 [HTML Anything](https://github.com/your-org/html-anything)。+左侧贴 markdown / CSV / JSON, 选一个模板 (杂志、PPT、海报、小红书、数据报告 …), 按 ⌘+Enter ——+本地的 Claude / Cursor / Codex 在你**已经登录**的 session 里跑, 几秒后右侧就是一份可以直接复制到公众号 / 推特 / 知乎的 HTML。++不需要 API Key, 不浪费 token (二次编辑只跑 diff)。++## 结论++如果你也觉得 "markdown → 编辑器手动重排" 这件事浪费了你的人生 —— 看一眼原推, 看一眼 Claude Code 团队的迁移, 然后试试任何一个能把 markdown 自动升格为 HTML 的工具。++> 题图致敬: 推文中那个 "everything is HTML" 的瞬间。diff --git a/src/lib/templates/skills/blog-post/SKILL.md b/src/lib/templates/skills/blog-post/SKILL.mdnew file mode 100644index 00000000..6e6e9c08--- /dev/null+++ b/src/lib/templates/skills/blog-post/SKILL.md@@ -0,0 +1,24 @@+---+name: blog-post+zh_name: "博客长文"+en_name: "Blog Post"+emoji: "📰"+description: "杂志感长文, 含 masthead、hero、figures、pull quote、作者署名"+category: article+scenario: marketing+aspect_hint: "长页面"+tags: ["blog", "essay", "case study", "长文"]+---++【模板: 博客长文 / Blog Post】+【意图】≥ 600 字的真正的长文章, 排版以 typography 为主, 70% 文字 20% 图 10% chrome。+【布局】+- Masthead (publication name + date)+- Hero (大标题 + 副标 + 作者署名 + 阅读时间)+- 正文 (单栏 65ch, 含 figures, pull quotes, 行内引用)+- Author bio 卡片+- Related posts (3 张卡)+【设计细节】+- Pull quote 用大号 serif 斜体 + 左侧色条+- Figures 自带 caption (italic, smaller)+- 代码块: 圆角 + 深色 + 语言标签diff --git a/src/lib/templates/skills/blog-post/example.html b/src/lib/templates/skills/blog-post/example.htmlnew file mode 100644index 00000000..a8e1e46d--- /dev/null+++ b/src/lib/templates/skills/blog-post/example.html@@ -0,0 +1,80 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Why we rewrote our sync engine in Rust — Filebase</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --border: #e6e4e0;+ --accent: #c96442; --surface: #ffffff;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--fg); font: 18px/1.65 Georgia, 'Iowan Old Style', serif; }+ .wrap { max-width: 680px; margin: 0 auto; padding: 56px 28px 96px; }+ nav.top { font-family: -apple-system, system-ui, sans-serif; font-size: 13px; color: var(--muted); margin-bottom: 56px; }+ nav.top a { color: inherit; text-decoration: none; }+ .eyebrow { font-family: -apple-system, system-ui, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 14px; }+ h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 20px; }+ .byline { font-family: -apple-system, system-ui, sans-serif; font-size: 14px; color: var(--muted); margin: 0 0 40px; display: flex; align-items: center; gap: 12px; }+ .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); opacity: 0.18; }+ .lede { font-size: 22px; line-height: 1.5; color: var(--fg); margin: 0 0 40px; font-style: italic; }+ .hero-figure { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--accent), #6b6964); border-radius: 8px; margin-bottom: 48px; opacity: 0.85; }+ p { margin: 24px 0; }+ p:first-of-type::first-letter { float: left; font-size: 64px; line-height: 0.9; padding: 6px 10px 0 0; font-weight: 600; color: var(--accent); }+ h2 { font-size: 28px; letter-spacing: -0.01em; margin: 56px 0 12px; line-height: 1.2; }+ blockquote { margin: 40px 0; padding: 0 32px; font-size: 24px; line-height: 1.4; color: var(--fg); border-left: 3px solid var(--accent); font-style: italic; }+ code { font-family: ui-monospace, monospace; background: var(--surface); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; font-size: 0.85em; }+ pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; overflow-x: auto; font: 14px/1.55 ui-monospace, monospace; }+ figure.numbers { font-family: -apple-system, system-ui, sans-serif; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px -24px; padding: 28px 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }+ figure.numbers .stat .value { font-family: Georgia, serif; font-size: 38px; letter-spacing: -0.01em; line-height: 1; }+ figure.numbers .stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }+ .endnote { font-family: -apple-system, system-ui, sans-serif; font-size: 13px; color: var(--muted); margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); }+ .endnote a { color: var(--accent); text-decoration: none; }+ </style>+</head>+<body>+ <article class="wrap" data-od-id="article">+ <nav class="top"><a href="#">← Filebase blog</a></nav>+ <div class="eyebrow">Engineering</div>+ <h1>Why we rewrote our sync engine in Rust</h1>+ <div class="byline">+ <div class="avatar"></div>+ <span>By Mira Hassan · April 22, 2026 · 8 min read</span>+ </div>+ <p class="lede">For two years our Go sync engine was good enough. Then video editors started joining the customer list, and the GC pauses we'd been politely ignoring turned into bug reports we couldn't ignore.</p>+ <div class="hero-figure" data-od-id="hero-figure"></div>++ <p>The decision wasn't sudden. We'd been watching the GC pause distribution shift for six months before we admitted what the data was telling us. P50 latency was great. P99 was a horror movie. Customers syncing 30 GB of <code>.psd</code> files in active editing sessions were the ones writing in.</p>++ <p>Rewriting an entire sync engine sounds like the kind of project a startup is told never to do. We did it anyway. Here's how it went, what surprised us, and the parts I'd do differently.</p>++ <h2>The trigger: GC pauses we couldn't fix</h2>+ <p>Go's garbage collector is brilliant. It is also, fundamentally, a tradeoff. Our hot path allocated short-lived buffer slices on every block diff — and at our scale, on a heavy uploader, the collector ran often enough that the P99 pause crept past 50ms.</p>++ <p>We tried the usual fixes: pooling buffers with <code>sync.Pool</code>, tuning <code>GOGC</code>, reducing allocations in the merge path. They each helped a little. None of them got us under 20ms, and the customers we cared about needed under 5.</p>++ <blockquote>"We can't fix this in Go. We can fix it in something without a GC."</blockquote>++ <p>Our staff engineer Sasha said this in a meeting in October. He was right. The question wasn't whether to leave Go. It was what to leave it for, and how much we could keep.</p>++ <h2>What we kept; what we threw out</h2>+ <p>The CLI stayed in Go. The control plane stayed in Go. The bit that does block-level diffing in a hot loop on a customer's laptop — that became Rust. The boundary became a single FFI surface with a small, opinionated protocol.</p>++ <figure class="numbers">+ <div class="stat"><div class="value">38ms → 4ms</div><div class="label">P99 sync latency</div></div>+ <div class="stat"><div class="value">62%</div><div class="label">Memory drop</div></div>+ <div class="stat"><div class="value">11 weeks</div><div class="label">From RFC to ship</div></div>+ </figure>++ <p>The numbers above are real and from production. They are also misleading without context: the Rust port doesn't just remove the GC, it also removes a layer of abstraction we'd been carrying since the Go MVP.</p>++ <h2>What I'd do differently</h2>+ <p>One thing: the FFI boundary. We chose <code>cgo</code> for symmetry — Go calling Rust feels right when you already have Go everywhere. But the binding ceremony is brittle, and we ate two production incidents from string lifetime mistakes before we wrote a wrapper layer that handled them once.</p>++ <p>If I were starting today, I'd reach for <code>uniffi</code> or generate the bindings from a schema. The lessons isn't <em>don't use cgo</em>; it's <em>treat the boundary like an external API the moment you cross language families</em>.</p>++ <div class="endnote">Filebase is hiring engineers who like writing this kind of post. <a href="#">See open roles →</a></div>+ </article>+</body>+</html>diff --git a/src/lib/templates/skills/card-twitter/SKILL.md b/src/lib/templates/skills/card-twitter/SKILL.mdnew file mode 100644index 00000000..1b331e40--- /dev/null+++ b/src/lib/templates/skills/card-twitter/SKILL.md@@ -0,0 +1,25 @@+---+name: card-twitter+zh_name: "Twitter 分享卡"+en_name: "Twitter Share Card"+emoji: "🐦"+description: "推特金句 / 数据卡, 适合配推文"+category: card+scenario: marketing+aspect_hint: "1600×900 (16:9)"+tags: ["twitter", "x", "quote", "金句"]+example_id: sample-twitter-quote+example_name: "推特卡 · 金句"+example_format: text+example_tagline: "16:9 暗色金句卡, 截图直接配推文"+example_desc: "高对比金句模板, 含 grid 网格 + 渐变光晕背景"+---++【模板: Twitter 分享卡】+- 容器 `w-[1600px] h-[900px]`, 暗色 / 亮色二选一根据内容情绪。+- 中央一句 hero 金句 (text-6xl, font-semibold, 限 2-3 行)。+- 下方作者署名 + 头像占位 + handle。+- 左上角小标签 (类型: "Insight" / "Data" / "Quote")。+- 右下角品牌水印。+- 整张卡片有微妙的纹理 (grid 网格 / noise / dot pattern)。+- 截图后可直接配推文发出, 视觉简洁有力。diff --git a/src/lib/templates/skills/card-twitter/example.html b/src/lib/templates/skills/card-twitter/example.htmlnew file mode 100644index 00000000..032cdc15--- /dev/null+++ b/src/lib/templates/skills/card-twitter/example.html@@ -0,0 +1,58 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Twitter 分享卡 · 金句</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@600;700;800&family=Noto+Serif+SC:wght@500;700;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">+<style>+ body { margin:0; background:#0a0a0a; font-family:'Inter Tight','Noto Sans SC',sans-serif; min-height:100vh; display:grid; place-items:center; padding:24px; }+ .card { width:1600px; max-width:96vw; aspect-ratio:16/9; border-radius:24px; overflow:hidden; position:relative;+ background:#15140f; color:#fafaf7; padding:80px; display:flex; flex-direction:column; justify-content:space-between;+ box-shadow:0 40px 100px -20px rgba(0,0,0,0.7);+ }+ .grid-pattern { position:absolute; inset:0; opacity:0.06; background-image:linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg,#fff 1px, transparent 1px); background-size:48px 48px; }+ .glow { position:absolute; width:680px; height:680px; border-radius:50%; filter:blur(140px); opacity:0.55; }+ .g1 { background:#c96442; top:-180px; left:-180px; }+ .g2 { background:#e9b94a; bottom:-260px; right:-200px; }+ .header { display:flex; align-items:center; justify-content:space-between; position:relative; z-index:2; }+ .tag { display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; background:rgba(233,185,74,0.14); color:#e9b94a; font-size:13px; font-weight:600; letter-spacing:0.18em; text-transform:uppercase; border:1px solid rgba(233,185,74,0.25); }+ .quote { font-family:'Noto Serif SC',serif; font-size:96px; line-height:1.18; font-weight:700; letter-spacing:-0.02em; max-width:24ch; position:relative; z-index:2; margin-top:auto; margin-bottom:auto; }+ .quote .em { font-style:italic; color:#e9b94a; }+ .quote::before { content:"" "" "; font-family:Georgia,serif; font-size:140px; color:#e9b94a; position:absolute; top:-60px; left:-60px; opacity:0.3; line-height:1; }+ .footer { display:flex; align-items:center; justify-content:space-between; position:relative; z-index:2; }+ .author { display:flex; align-items:center; gap:16px; }+ .avatar { width:56px; height:56px; border-radius:999px; background:linear-gradient(135deg,#c96442,#e9b94a); display:grid; place-items:center; font-family:Georgia,serif; font-style:italic; font-size:28px; font-weight:700; color:#fff; }+ .brand { display:flex; align-items:center; gap:10px; font-family:'JetBrains Mono',monospace; font-size:13px; opacity:0.55; }+ .brand .glyph { width:24px; height:24px; border-radius:6px; border:1px solid rgba(255,255,255,0.4); display:grid; place-items:center; font-family:Georgia,serif; font-style:italic; font-size:13px; font-weight:600; }+</style>+</head>+<body>+<div class="card">+ <div class="grid-pattern"></div>+ <div class="glow g1"></div>+ <div class="glow g2"></div>++ <div class="header">+ <div class="tag">✦ Quote</div>+ <div class="brand"><div class="glyph">H</div>html-anything</div>+ </div>++ <div class="quote">+ Markdown 是给<span class="em">作者</span>爽的,<br/>+ HTML 是给<span class="em">读者</span>爽的。+ </div>++ <div class="footer">+ <div class="author">+ <div class="avatar">T</div>+ <div>+ <div style="font-size:18px; font-weight:600">Tom Pan</div>+ <div style="font-size:14px; opacity:0.55">@tompan · 一个把所有内部文档换成 HTML 的工程师</div>+ </div>+ </div>+ <div style="font-size:13px; opacity:0.45; font-family:'JetBrains Mono',monospace">2026.05</div>+ </div>+</div>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/card-twitter/example.md b/src/lib/templates/skills/card-twitter/example.mdnew file mode 100644index 00000000..836e7c36--- /dev/null+++ b/src/lib/templates/skills/card-twitter/example.md@@ -0,0 +1,3 @@+Markdown 是给作者爽的, HTML 是给读者爽的。++— 一个把所有内部文档换成 HTML 的工程师, 2026diff --git a/src/lib/templates/skills/card-xiaohongshu/SKILL.md b/src/lib/templates/skills/card-xiaohongshu/SKILL.mdnew file mode 100644index 00000000..022a9322--- /dev/null+++ b/src/lib/templates/skills/card-xiaohongshu/SKILL.md@@ -0,0 +1,26 @@+---+name: card-xiaohongshu+zh_name: "小红书图文卡片"+en_name: "Xiaohongshu Card"+emoji: "📱"+description: "小红书风格知识卡片, 多张联排可滑动浏览"+category: card+scenario: marketing+aspect_hint: "1080×1440 (3:4)"+featured: 24+tags: ["xhs", "小红书", "carousel", "图文"]+example_id: sample-xhs-ai-habits+example_name: "小红书图文卡 · AI 工具习惯"+example_format: markdown+example_tagline: "7 张连排, 莫兰迪渐变"+example_desc: "干货卡片合集, 适合截图发小红书 / 朋友圈"+---++【模板: 小红书图文卡片】+- 输出 3-6 张连续卡片, 每张 `w-[1080px] h-[1440px]`, 用 flex 纵向排列方便整体截图也方便单张截图。+- 第一张是封面: 巨大的标题 + 1 行副标题 + 一个吸引人的标签 (类似 "干货预警" / "建议收藏")。+- 中间几张展开正文, 每张一个核心观点, 配 emoji + 短句 + 1-2 个例子。+- 最后一张是总结 + 行动号召 (关注 / 收藏 / 评论)。+- 配色: 选择柔和的莫兰迪色或粉色系; 元素圆润, 大量留白。+- 字号大、行距宽、对比强(小红书在手机上看, 小字根本看不清)。+- 每张卡片右下角小水印 (作者名 / 日期)。diff --git a/src/lib/templates/skills/card-xiaohongshu/example.html b/src/lib/templates/skills/card-xiaohongshu/example.htmlnew file mode 100644index 00000000..5c0f67f0--- /dev/null+++ b/src/lib/templates/skills/card-xiaohongshu/example.html@@ -0,0 +1,98 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>5 个让你的 AI 编辑用得更顺手的小习惯</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;900&family=Inter:wght@500;600;700&display=swap" rel="stylesheet">+<style>+ body { margin:0; background:#f3eee5; font-family:'Noto Sans SC',sans-serif; padding:36px 0; -webkit-font-smoothing:antialiased; }+ .deck { display:flex; flex-direction:column; align-items:center; gap:24px; }+ .card { width:1080px; max-width:96vw; aspect-ratio:3/4; border-radius:32px; overflow:hidden; position:relative; padding:80px 64px; display:flex; flex-direction:column; box-shadow:0 24px 60px -20px rgba(0,0,0,0.18); }+ .c1 { background:linear-gradient(160deg,#f7d2c2 0%,#f3a98a 100%); color:#3a1d10; }+ .c2 { background:linear-gradient(160deg,#fff7e6 0%,#ffe4b8 100%); color:#3a2e10; }+ .c3 { background:linear-gradient(160deg,#e8f0e3 0%,#bcd6b3 100%); color:#1f3a1f; }+ .c4 { background:linear-gradient(160deg,#e7e8f5 0%,#bec1e8 100%); color:#1d1f4a; }+ .c5 { background:linear-gradient(160deg,#fce7f0 0%,#f5b3ce 100%); color:#4a1b34; }+ .c6 { background:linear-gradient(160deg,#fff8e1 0%,#f7c99b 100%); color:#3a2210; }+ .c7 { background:linear-gradient(160deg,#15140f 0%,#3a2620 100%); color:#fafaf7; }+ .badge { display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; background:rgba(255,255,255,0.55); backdrop-filter:blur(8px); font-size:18px; font-weight:600; align-self:flex-start; }+ .num { font-family:Georgia, serif; font-style:italic; font-size:120px; font-weight:700; line-height:0.9; opacity:0.85; margin-bottom:24px; }+ h2 { font-size:64px; font-weight:900; line-height:1.1; letter-spacing:-0.01em; margin:0 0 32px; }+ .body { font-size:30px; font-weight:500; line-height:1.55; opacity:0.85; max-width:24ch; }+ .watermark { position:absolute; bottom:32px; right:36px; font-size:16px; opacity:0.55; font-weight:500; }+ .pageno { position:absolute; top:36px; right:44px; font-family:'Inter',sans-serif; font-size:18px; font-weight:600; opacity:0.45; letter-spacing:0.08em; }+ .hero { font-size:120px; font-weight:900; line-height:1.0; letter-spacing:-0.025em; margin:0; }+</style>+</head>+<body>+<div class="deck">++ <div class="card c1">+ <div class="pageno">01 / 07</div>+ <div class="badge">⚡ 建议收藏 · 干货预警</div>+ <div style="margin:auto 0">+ <div style="font-size:24px; font-weight:600; opacity:0.7; margin-bottom:18px">AI 工具党 · 必看</div>+ <h2 class="hero">5 个让你的<br/>AI 编辑<br/>更顺手的<br/><span style="color:#9c2a25">小习惯</span></h2>+ </div>+ <div style="font-size:22px; opacity:0.65; font-weight:500">滑动看 →</div>+ <div class="watermark">@HTMLAnything · 5/11</div>+ </div>++ <div class="card c2">+ <div class="pageno">02 / 07</div>+ <div class="num">01</div>+ <h2>放弃<br/>完美 prompt</h2>+ <p class="body">你写的 prompt 不可能一次完美。把它当 <strong>对话</strong>, 不是 SQL。</p>+ <div class="watermark">@HTMLAnything</div>+ </div>++ <div class="card c3">+ <div class="pageno">03 / 07</div>+ <div class="num">02</div>+ <h2>让 AI 看见<br/>你的格式</h2>+ <p class="body">贴 markdown / CSV 之前, 先告诉它 <strong>"我希望输出像 X 风格"</strong>。<br/><br/>给一个具体参考, 比 50 个形容词管用。</p>+ <div class="watermark">@HTMLAnything</div>+ </div>++ <div class="card c4">+ <div class="pageno">04 / 07</div>+ <div class="num">03</div>+ <h2>用模板,<br/>别每次重写</h2>+ <p class="body">把好用的提示词存成模板。HTML Anything 直接选模板就行 ——<br/><br/><strong>9 套世界级设计 system</strong> 现成的。</p>+ <div class="watermark">@HTMLAnything</div>+ </div>++ <div class="card c5">+ <div class="pageno">05 / 07</div>+ <div class="num">04</div>+ <h2>二次编辑<br/>跑 diff</h2>+ <p class="body">重新生成不是从 0 开始。改完内容<strong>只发 diff</strong>, 让 AI 在已有 HTML 上微调 ——<br/><br/>省 80% token + 保持设计风格。</p>+ <div class="watermark">@HTMLAnything</div>+ </div>++ <div class="card c6">+ <div class="pageno">06 / 07</div>+ <div class="num">05</div>+ <h2>复用<br/>本地 session</h2>+ <p class="body">不用 API Key, 让本地 Claude / Cursor / Codex 跑。<br/><br/><strong>0 边际成本</strong>, 速度比远程 API 快得多。</p>+ <div class="watermark">@HTMLAnything</div>+ </div>++ <div class="card c7">+ <div class="pageno">07 / 07</div>+ <div style="margin:auto 0">+ <div style="font-size:24px; font-weight:600; color:#e9b94a; margin-bottom:24px">看完别走 ✨</div>+ <h2 class="hero" style="color:#fafaf7">工具不是<br/>越多越好,<br/><span style="color:#e9b94a">流程顺</span><br/>才是真的好用。</h2>+ </div>+ <div style="display:flex; gap:14px; font-size:22px; font-weight:600">+ <span style="padding:10px 22px; background:#e9b94a; color:#15140f; border-radius:999px">关注</span>+ <span style="padding:10px 22px; background:rgba(255,255,255,0.12); color:#fafaf7; border-radius:999px; border:1px solid rgba(255,255,255,0.2)">收藏</span>+ <span style="padding:10px 22px; background:rgba(255,255,255,0.12); color:#fafaf7; border-radius:999px; border:1px solid rgba(255,255,255,0.2)">分享</span>+ </div>+ <div class="watermark" style="color:rgba(255,255,255,0.5)">@HTMLAnything · 每周 AI workflow 实战</div>+ </div>++</div>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/card-xiaohongshu/example.md b/src/lib/templates/skills/card-xiaohongshu/example.mdnew file mode 100644index 00000000..0e950efc--- /dev/null+++ b/src/lib/templates/skills/card-xiaohongshu/example.md@@ -0,0 +1,27 @@+# 5 个让你的 AI 编辑用得更顺手的小习惯++## 封面+建议收藏 · AI 工具党 必看++## 卡 1: 放弃完美 prompt+你写的 prompt 不可能一次完美。把它当**对话**, 不是 SQL。++## 卡 2: 让 AI 看见你的格式+贴一段 markdown / CSV 之前, 先告诉它"我希望输出像 X 风格"——+给一个具体参考, 比给 50 个形容词管用。++## 卡 3: 用模板, 别每次重写+把好用的提示词存成模板。HTML Anything 直接选模板就行,+9 套世界级设计 system 现成的。++## 卡 4: 二次编辑跑 diff+重新生成不是从 0 开始。改完内容只发 diff, 让 AI 在已有 HTML 上微调,+省 80% token + 保持设计风格。++## 卡 5: 复用本地 session+不用 API Key, 让本地 Claude / Cursor / Codex 跑。0 边际成本,+速度比远程 API 快得多。++## 总结+工具不是越多越好, 流程顺才是真的好用。+关注我, 每周更新 AI workflow 实战。diff --git a/src/lib/templates/skills/dashboard/SKILL.md b/src/lib/templates/skills/dashboard/SKILL.mdnew file mode 100644index 00000000..4fe994d1--- /dev/null+++ b/src/lib/templates/skills/dashboard/SKILL.md@@ -0,0 +1,20 @@+---+name: dashboard+zh_name: "管理后台仪表板"+en_name: "Admin Dashboard"+emoji: "🎛️"+description: "固定侧栏 + 顶栏 + KPI 网格 + 1-2 张图"+category: dashboard+scenario: operations+aspect_hint: "桌面 1440"+tags: ["dashboard", "admin", "analytics"]+---++【模板: 管理后台 Dashboard】+【意图】标准 admin/analytics 仪表板单页。+【布局】+- Fixed left sidebar (logo + 导航 + 用户 footer)+- Top bar (search + 通知 + avatar)+- Main: KPI cards 网格 (3-5 个)+- 1-2 张主图表 (折线 / 柱 / 区域)+- 底部 recent activity 列表diff --git a/src/lib/templates/skills/dashboard/example.html b/src/lib/templates/skills/dashboard/example.htmlnew file mode 100644index 00000000..499f329c--- /dev/null+++ b/src/lib/templates/skills/dashboard/example.html@@ -0,0 +1,118 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Pulse — analytics overview</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --border: #e6e4e0;+ --accent: #c96442; --surface: #ffffff; --good: #2f7d4a; --bad: #b53a2a;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 -apple-system, system-ui, sans-serif; display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }+ .sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px; }+ .brand { font-weight: 600; padding: 8px 10px 18px; }+ .nav { display: flex; flex-direction: column; gap: 2px; }+ .nav a { padding: 7px 10px; border-radius: 6px; color: var(--fg); text-decoration: none; }+ .nav a.active { background: var(--bg); font-weight: 500; }+ .nav a:hover { background: var(--bg); }+ .nav .group-label { font-size: 11px; color: var(--muted); padding: 14px 10px 6px; text-transform: uppercase; letter-spacing: 0.06em; }+ main { padding: 0 28px 56px; }+ .topbar { padding: 16px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 24px; }+ .topbar h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }+ .topbar .right { display: flex; align-items: center; gap: 12px; color: var(--muted); }+ button { font: inherit; cursor: pointer; padding: 7px 13px; border-radius: 6px; }+ .btn-primary { background: var(--accent); color: white; border: 1px solid var(--accent); }+ .btn-secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }+ .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }+ @media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }+ .kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }+ .kpi .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }+ .kpi .value { font-size: 28px; letter-spacing: -0.02em; }+ .kpi .delta { font-size: 12px; margin-top: 4px; }+ .kpi .delta.up { color: var(--good); }+ .kpi .delta.down { color: var(--bad); }+ .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }+ .panel h3 { margin: 0 0 16px; font-size: 14px; font-weight: 500; }+ .chart { height: 240px; background: linear-gradient(180deg, rgba(201,100,66,0.06), transparent); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }+ .chart svg { width: 100%; height: 100%; display: block; }+ .panels-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }+ @media (max-width: 900px) { .panels-row { grid-template-columns: 1fr; } }+ table { width: 100%; border-collapse: collapse; }+ th, td { text-align: left; padding: 10px 6px; border-top: 1px solid var(--border); }+ th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }+ .pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }+ .pill.good { color: var(--good); border-color: rgba(47,125,74,0.3); }+ .pill.bad { color: var(--bad); border-color: rgba(181,58,42,0.3); }+ </style>+</head>+<body>+ <aside class="sidebar" data-od-id="sidebar">+ <div class="brand">◐ Pulse</div>+ <nav class="nav">+ <a href="#" class="active">Overview</a>+ <a href="#">Funnels</a>+ <a href="#">Cohorts</a>+ <a href="#">Sessions</a>+ <span class="group-label">Workspace</span>+ <a href="#">Sources</a>+ <a href="#">Members</a>+ <a href="#">Billing</a>+ <a href="#">Settings</a>+ </nav>+ </aside>+ <main>+ <div class="topbar" data-od-id="topbar">+ <h1>Overview · April 2026</h1>+ <div class="right">+ <button class="btn-secondary">Last 30 days ▾</button>+ <button class="btn-primary">+ New report</button>+ </div>+ </div>++ <div class="kpis" data-od-id="kpis">+ <div class="kpi"><div class="label">MRR</div><div class="value">$48.2K</div><div class="delta up">+12.4% MoM</div></div>+ <div class="kpi"><div class="label">Active accounts</div><div class="value">3,184</div><div class="delta up">+204 this month</div></div>+ <div class="kpi"><div class="label">Churn (30d)</div><div class="value">2.1%</div><div class="delta down">+0.4 pp</div></div>+ <div class="kpi"><div class="label">P95 latency</div><div class="value">182 ms</div><div class="delta up">-23 ms</div></div>+ </div>++ <div class="panels-row">+ <div class="panel" data-od-id="chart-panel">+ <h3>Revenue · 30 days</h3>+ <div class="chart">+ <svg viewBox="0 0 600 240" preserveAspectRatio="none">+ <polyline fill="none" stroke="#c96442" stroke-width="2" points="0,180 30,170 60,150 90,160 120,140 150,120 180,130 210,110 240,90 270,100 300,80 330,70 360,80 390,60 420,50 450,60 480,40 510,30 540,40 570,20 600,10" />+ </svg>+ </div>+ </div>+ <div class="panel" data-od-id="signups-panel">+ <h3>New accounts</h3>+ <table>+ <thead><tr><th>Account</th><th>Plan</th><th>Status</th></tr></thead>+ <tbody>+ <tr><td>Linear</td><td>Team</td><td><span class="pill good">active</span></td></tr>+ <tr><td>Cursor</td><td>Pro</td><td><span class="pill good">active</span></td></tr>+ <tr><td>Notion</td><td>Team</td><td><span class="pill bad">trial</span></td></tr>+ <tr><td>Vercel</td><td>Enterprise</td><td><span class="pill good">active</span></td></tr>+ </tbody>+ </table>+ </div>+ </div>++ <div class="panel" data-od-id="recent-events">+ <h3>Recent events</h3>+ <table>+ <thead><tr><th>Time</th><th>Account</th><th>Event</th><th>Plan</th></tr></thead>+ <tbody>+ <tr><td>2:14 pm</td><td>Acme Co</td><td>Upgraded to Team</td><td>Team</td></tr>+ <tr><td>1:48 pm</td><td>Northwind</td><td>Connected GitHub</td><td>Pro</td></tr>+ <tr><td>1:32 pm</td><td>Globex</td><td>Cancelled subscription</td><td>Solo</td></tr>+ <tr><td>12:51 pm</td><td>Initech</td><td>New seat invited</td><td>Team</td></tr>+ </tbody>+ </table>+ </div>+ </main>+</body>+</html>diff --git a/src/lib/templates/skills/data-report/SKILL.md b/src/lib/templates/skills/data-report/SKILL.mdnew file mode 100644index 00000000..c79637de--- /dev/null+++ b/src/lib/templates/skills/data-report/SKILL.md@@ -0,0 +1,28 @@+---+name: data-report+zh_name: "数据可视化报告"+en_name: "Data Visualization Report"+emoji: "📊"+description: "把 CSV/Excel/JSON 数据转成漂亮的可视化报告页"+category: data+scenario: finance+aspect_hint: "桌面长页面"+featured: 10+tags: ["data", "report", "chart", "数据", "报告"]+example_id: sample-data-weekly-report+example_name: "数据报告 · 周报"+example_format: csv+example_tagline: "KPI 卡 + Chart.js 图表 + 表格"+example_desc: "9 个月增长数据自动渲染成可视化报告, 内联 Chart.js"+---++【模板: 数据可视化报告】+- 头部: 报告标题 + 时间区间 + 数据来源说明。+- KPI 卡片网格: 3-5 个最重要指标, 每个卡片显示数值 + 同比变化 + 微型趋势线。+- 主图表区: 至少 2 个图表 (柱状 / 折线 / 饼 / 散点), 使用 Chart.js 或 ECharts (jsdelivr CDN 引入), 数据从用户输入解析得到。+- **图表容器必须有固定高度**: 每个 `<canvas>` 外层包一个 `<div style="position:relative;height:NNNpx">` (KPI 迷你图 ~40px, 主图表 ~240–280px)。Chart.js 用 `responsive:true, maintainAspectRatio:false` 时若父容器没有显式高度, 会陷入 ResizeObserver 死循环, 图表无限增高直至卡死浏览器。**绝对不要**直接给 canvas 写 `height=` 属性当布局, 那个只是初始值。+- 数据表格: 用户原始数据节选, 使用 `<table>` + 现代化样式 (zebra stripe, hover, sticky header)。+- 洞察块: 3-5 条文字洞察, 用 emoji 开头, 像产品周报。+- 底部"方法论"折叠区。+- 配色克制专业: 主色 1 + 中性色阶, 图表用调色板。+- **必须解析用户提供的实际数据**, 不要捏造。diff --git a/src/lib/templates/skills/data-report/example.html b/src/lib/templates/skills/data-report/example.htmlnew file mode 100644index 00000000..1c19f7d1--- /dev/null+++ b/src/lib/templates/skills/data-report/example.html@@ -0,0 +1,175 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>数据周报 · 2025 年 5 月</title>+<script src="https://cdn.tailwindcss.com"></script>+<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">+<style>+ body { background:#fafaf7; font-family:'Inter','Noto Sans SC',sans-serif; color:#15140f; -webkit-font-smoothing:antialiased; }+ .num { font-family:'Inter',sans-serif; font-feature-settings:'tnum' on; letter-spacing:-0.02em; }+ .section h2 { font-size:11px; font-weight:700; letter-spacing:0.18em; text-transform:uppercase; color:#5a564e; margin:0 0 16px; }+ table { border-collapse:collapse; width:100%; font-size:13px; }+ thead th { background:#f4f1ec; text-align:left; padding:10px 14px; font-size:11px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:#5a564e; position:sticky; top:0; }+ tbody td { padding:10px 14px; border-bottom:1px solid #e7e5e0; }+ tbody tr:nth-child(even) { background:#fbfaf7; }+ tbody tr:hover { background:#f4f1ec; }+ .delta-up { color:#1f7a3a; font-weight:600; }+ .delta-down { color:#9c2a25; font-weight:600; }+</style>+</head>+<body>++<div class="max-w-6xl mx-auto px-8 py-12">++ <header class="pb-7 mb-8 border-b border-[#e7e5e0]">+ <div class="flex items-baseline justify-between flex-wrap gap-3">+ <div>+ <div class="text-[11px] font-semibold tracking-[0.22em] uppercase text-[#c96442] mb-2">Weekly Report · Week 19</div>+ <h1 class="text-4xl font-extrabold tracking-tight">数据周报 · 2025 年 5 月</h1>+ </div>+ <div class="text-xs text-[#5a564e] text-right">+ <div>来源: <span class="font-semibold text-[#15140f]">内部 BI</span></div>+ <div>截止 <span class="font-mono text-[#15140f]">2025-05-11</span></div>+ </div>+ </div>+ <p class="mt-3 text-sm text-[#5a564e] max-w-2xl leading-relaxed">本周关键指标全部向好。MAU 同比增长 184%, 付费转化与流失双双改善。</p>+ </header>++ <section class="section mb-10">+ <h2>核心指标 · KPI</h2>+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4">+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0] shadow-[0_1px_0_#f0ece5]">+ <div class="text-[11px] font-semibold uppercase tracking-wider text-[#5a564e] mb-2">月活用户 · MAU</div>+ <div class="text-3xl font-extrabold num">23,950</div>+ <div class="text-xs mt-2"><span class="delta-up">▲ 16.0%</span> <span class="text-[#5a564e]">vs 上月</span></div>+ <div class="mt-3" style="position:relative;height:40px"><canvas id="kpi1"></canvas></div>+ </div>+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0] shadow-[0_1px_0_#f0ece5]">+ <div class="text-[11px] font-semibold uppercase tracking-wider text-[#5a564e] mb-2">新增 · Signups</div>+ <div class="text-3xl font-extrabold num">4,250</div>+ <div class="text-xs mt-2"><span class="delta-up">▲ 15.5%</span> <span class="text-[#5a564e]">vs 上月</span></div>+ <div class="mt-3" style="position:relative;height:40px"><canvas id="kpi2"></canvas></div>+ </div>+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0] shadow-[0_1px_0_#f0ece5]">+ <div class="text-[11px] font-semibold uppercase tracking-wider text-[#5a564e] mb-2">付费 · Paying</div>+ <div class="text-3xl font-extrabold num">2,418 <span class="text-base text-[#5a564e]">/ 10.1%</span></div>+ <div class="text-xs mt-2"><span class="delta-up">▲ 18.5%</span> <span class="text-[#5a564e]">vs 上月</span></div>+ <div class="mt-3" style="position:relative;height:40px"><canvas id="kpi3"></canvas></div>+ </div>+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0] shadow-[0_1px_0_#f0ece5]">+ <div class="text-[11px] font-semibold uppercase tracking-wider text-[#5a564e] mb-2">流失 · Churn</div>+ <div class="text-3xl font-extrabold num">1.8%</div>+ <div class="text-xs mt-2"><span class="delta-up">▼ 0.1pp</span> <span class="text-[#5a564e]">vs 上月</span></div>+ <div class="mt-3" style="position:relative;height:40px"><canvas id="kpi4"></canvas></div>+ </div>+ </div>+ </section>++ <section class="section mb-10">+ <h2>趋势 · Growth</h2>+ <div class="grid lg:grid-cols-3 gap-4">+ <div class="lg:col-span-2 rounded-2xl bg-white p-5 border border-[#e7e5e0]">+ <div class="text-sm font-semibold mb-3">MAU & 付费用户增长</div>+ <div style="position:relative;height:260px"><canvas id="chart-main"></canvas></div>+ </div>+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0]">+ <div class="text-sm font-semibold mb-3">流失率 · 月度</div>+ <div style="position:relative;height:260px"><canvas id="chart-churn"></canvas></div>+ </div>+ </div>+ </section>++ <section class="section mb-10">+ <h2>明细 · Raw data</h2>+ <div class="rounded-2xl border border-[#e7e5e0] overflow-hidden bg-white">+ <table>+ <thead><tr><th>月份</th><th class="text-right">MAU</th><th class="text-right">新增</th><th class="text-right">付费</th><th class="text-right">流失率</th></tr></thead>+ <tbody id="rows"></tbody>+ </table>+ </div>+ </section>++ <section class="section mb-10">+ <h2>洞察 · Insights</h2>+ <div class="grid md:grid-cols-3 gap-4">+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0]">+ <div class="text-3xl mb-2">📈</div>+ <div class="font-semibold mb-1.5">MAU 半年增长 184%</div>+ <div class="text-sm text-[#5a564e] leading-relaxed">主要来自小红书自然流量, 单条爆款笔记带来 8k+ 新增。</div>+ </div>+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0]">+ <div class="text-3xl mb-2">💰</div>+ <div class="font-semibold mb-1.5">付费转化 7.3% → 10.1%</div>+ <div class="text-sm text-[#5a564e] leading-relaxed">团队 Pro 套餐贡献最大。新引导流程 + 30 天试用是关键。</div>+ </div>+ <div class="rounded-2xl bg-white p-5 border border-[#e7e5e0]">+ <div class="text-3xl mb-2">🎯</div>+ <div class="font-semibold mb-1.5">月流失 3.4% → 1.8%</div>+ <div class="text-sm text-[#5a564e] leading-relaxed">AI 起草功能上线后, 沉默用户激活率翻倍。</div>+ </div>+ </div>+ </section>++ <details class="mt-12 rounded-xl border border-[#e7e5e0] bg-white p-5">+ <summary class="cursor-pointer text-sm font-semibold text-[#5a564e] flex items-center justify-between">+ 方法论 · Methodology <span class="text-[#5a564e]">▾</span>+ </summary>+ <div class="text-xs text-[#5a564e] leading-relaxed mt-3 max-w-3xl">+ MAU = 30 天内至少打开一次产品的去重用户。付费 = 当月有效付费订阅。流失率 = 上月付费但本月未续的比例。数据来自内部 BI, 已剔除测试账号与 bot。+ </div>+ </details>++</div>++<script>+const data = [+ {month:'2024-09', mau:8420, signups:1240, paying:612, churn:0.034},+ {month:'2024-10', mau:9180, signups:1380, paying:701, churn:0.031},+ {month:'2024-11', mau:10240, signups:1610, paying:840, churn:0.028},+ {month:'2024-12', mau:11800, signups:1890, paying:1012, churn:0.025},+ {month:'2025-01', mau:13620, signups:2240, paying:1218, churn:0.023},+ {month:'2025-02', mau:15440, signups:2680, paying:1455, churn:0.021},+ {month:'2025-03', mau:17890, signups:3120, paying:1722, churn:0.020},+ {month:'2025-04', mau:20640, signups:3680, paying:2041, churn:0.019},+ {month:'2025-05', mau:23950, signups:4250, paying:2418, churn:0.018},+];++document.getElementById('rows').innerHTML = data.map(d => `+ <tr>+ <td class="font-mono text-xs">${d.month}</td>+ <td class="text-right num">${d.mau.toLocaleString()}</td>+ <td class="text-right num">${d.signups.toLocaleString()}</td>+ <td class="text-right num">${d.paying.toLocaleString()}</td>+ <td class="text-right num">${(d.churn*100).toFixed(1)}%</td>+ </tr>+`).join('');++const sparkOpts = { responsive:true, maintainAspectRatio:false, plugins:{legend:{display:false},tooltip:{enabled:false}}, scales:{x:{display:false},y:{display:false}}, elements:{point:{radius:0},line:{tension:0.4,borderWidth:2}} };+new Chart(document.getElementById('kpi1'), { type:'line', data:{labels:data.map(d=>d.month), datasets:[{data:data.map(d=>d.mau), borderColor:'#c96442', fill:false}]}, options:sparkOpts });+new Chart(document.getElementById('kpi2'), { type:'line', data:{labels:data.map(d=>d.month), datasets:[{data:data.map(d=>d.signups), borderColor:'#e9b94a', fill:false}]}, options:sparkOpts });+new Chart(document.getElementById('kpi3'), { type:'line', data:{labels:data.map(d=>d.month), datasets:[{data:data.map(d=>d.paying), borderColor:'#1f7a3a', fill:false}]}, options:sparkOpts });+new Chart(document.getElementById('kpi4'), { type:'line', data:{labels:data.map(d=>d.month), datasets:[{data:data.map(d=>d.churn*100), borderColor:'#2348b8', fill:false}]}, options:sparkOpts });++new Chart(document.getElementById('chart-main'), {+ type:'bar',+ data:{+ labels:data.map(d=>d.month),+ datasets:[+ {label:'MAU', data:data.map(d=>d.mau), backgroundColor:'rgba(201,100,66,0.18)', borderColor:'#c96442', borderWidth:1.5, borderRadius:4, yAxisID:'y'},+ {label:'付费', type:'line', data:data.map(d=>d.paying), borderColor:'#1f7a3a', backgroundColor:'#1f7a3a', tension:0.35, borderWidth:2.5, pointRadius:3, yAxisID:'y'},+ ]+ },+ options:{ responsive:true, maintainAspectRatio:false, plugins:{legend:{position:'bottom',labels:{usePointStyle:true,boxWidth:8}}}, scales:{x:{grid:{display:false}},y:{grid:{color:'#f0ece5'}, ticks:{callback:v=>v.toLocaleString()}}} }+});++new Chart(document.getElementById('chart-churn'), {+ type:'line',+ data:{ labels:data.map(d=>d.month), datasets:[{label:'流失率 %', data:data.map(d=>(d.churn*100).toFixed(2)), borderColor:'#9c2a25', backgroundColor:'rgba(156,42,37,0.08)', tension:0.4, borderWidth:2.5, fill:true, pointRadius:3}] },+ options:{ responsive:true, maintainAspectRatio:false, plugins:{legend:{display:false}}, scales:{x:{grid:{display:false}},y:{grid:{color:'#f0ece5'}, ticks:{callback:v=>v+'%'}, beginAtZero:true}} }+});+</script>++</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/data-report/example.md b/src/lib/templates/skills/data-report/example.mdnew file mode 100644index 00000000..76c17529--- /dev/null+++ b/src/lib/templates/skills/data-report/example.md@@ -0,0 +1,17 @@+month,active_users,new_signups,paying,churn_rate+2024-09,8420,1240,612,0.034+2024-10,9180,1380,701,0.031+2024-11,10240,1610,840,0.028+2024-12,11800,1890,1012,0.025+2025-01,13620,2240,1218,0.023+2025-02,15440,2680,1455,0.021+2025-03,17890,3120,1722,0.020+2025-04,20640,3680,2041,0.019+2025-05,23950,4250,2418,0.018++# 数据周报 · 2025 年 5 月+来源: 内部 BI · 截止 5 月 11 日+洞察:+- MAU 半年增长 184%, 主要来自小红书自然流量+- 付费转化率从 7.3% 提升到 10.1%, 团队 Pro 套餐贡献最大+- 月流失从 3.4% 降到 1.8%, AI 起草功能上线后明显改善diff --git a/src/lib/templates/skills/dating-web/SKILL.md b/src/lib/templates/skills/dating-web/SKILL.mdnew file mode 100644index 00000000..1796666b--- /dev/null+++ b/src/lib/templates/skills/dating-web/SKILL.md@@ -0,0 +1,21 @@+---+name: dating-web+zh_name: "社区 / 配对数据墙"+en_name: "Dating / Community Dashboard"+emoji: "💞"+description: "消费感配对仪表板: 信号 ticker + KPI + 30 天柱状 + 趋势"+category: dashboard+scenario: personal+aspect_hint: "桌面 1440"+featured: 5+tags: ["dating", "community", "consumer"]+---++【模板: 社区 / 配对 Dashboard】+【意图】消费产品感的数据墙, editorial typography + 克制的高亮色。+【布局】+- Left rail 导航+- Ticker bar 实时信号+- Headline KPIs+- 30-day mutual-matches 柱状图+- Match-rate 趋势 blockdiff --git a/src/lib/templates/skills/dating-web/example.html b/src/lib/templates/skills/dating-web/example.htmlnew file mode 100644index 00000000..d8ba20dd--- /dev/null+++ b/src/lib/templates/skills/dating-web/example.html@@ -0,0 +1,265 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>mutuals · your dating life, measured by the company you keep</title>+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Serif+Text:ital@0;1&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />+ <style>+ :root {+ --paper: #f4ede0;+ --panel: #f9f3e7;+ --ink: #1f1c14;+ --muted: #7a7264;+ --rule: #d6cdb6;+ --accent: #c14a2b;+ --good: #406b3a;+ --bad: #b6422f;+ --serif-display: 'DM Serif Display', 'Iowan Old Style', Georgia, serif;+ --serif-body: 'DM Serif Text', 'Iowan Old Style', Georgia, serif;+ --mono: 'IBM Plex Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.55 var(--serif-body); }++ .ticker {+ display: flex;+ justify-content: space-between;+ align-items: center;+ padding: 14px 28px;+ border-bottom: 1px solid var(--ink);+ font: 11px/1 var(--mono);+ color: var(--muted);+ letter-spacing: 0.18em;+ text-transform: uppercase;+ }+ .ticker .left { display: flex; align-items: center; gap: 18px; }+ .ticker b { color: var(--ink); font-weight: 500; }++ .layout { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 44px); }+ aside.rail {+ border-right: 1px solid var(--ink);+ padding: 22px 22px 22px 28px;+ display: flex; flex-direction: column; gap: 22px;+ }+ aside .brand { font: italic 800 30px/1 var(--serif-display); letter-spacing: -0.005em; }+ aside .brand .dot { color: var(--accent); }+ aside .user { display: flex; align-items: center; gap: 10px; }+ aside .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 12px/1 var(--mono); letter-spacing: 0.06em; }+ aside .user .meta { font: 13px/1.2 var(--mono); }+ aside .user .meta b { display: block; color: var(--ink); font-weight: 500; }+ aside .user .meta span { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; }++ aside h4 { font: 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 10px; }+ aside ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; }+ aside li { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border-radius: 4px; font: 15.5px/1.2 var(--serif-body); color: var(--ink); cursor: default; }+ aside li.active { background: rgba(193,74,43,0.10); color: var(--accent); font-weight: 600; }+ aside li.active::before { content: '●'; color: var(--accent); margin-right: 6px; font-size: 9px; }+ aside li .badge { background: var(--accent); color: var(--paper); font: 10px/1 var(--mono); padding: 3px 6px; border-radius: 999px; letter-spacing: 0.06em; }+ aside li .badge.gray { background: var(--ink); }++ aside .status {+ margin-top: auto;+ padding-top: 18px;+ border-top: 1px solid var(--rule);+ font: 11px/1.4 var(--mono);+ color: var(--muted);+ letter-spacing: 0.06em;+ }+ aside .status .live::before { content: '●'; color: #2f7d4a; margin-right: 6px; }++ main { padding: 30px 36px 44px; }+ .grid {+ display: grid;+ grid-template-columns: repeat(3, 1fr);+ grid-auto-rows: minmax(120px, auto);+ gap: 22px 36px;+ margin-bottom: 36px;+ }+ .stat { padding: 4px 0 14px; border-bottom: 1px solid var(--rule); }+ .stat .label { font: 11px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 6px; }+ .stat .value {+ font: 800 56px/1.05 var(--serif-display);+ letter-spacing: -0.01em;+ font-feature-settings: 'tnum';+ margin-bottom: 6px;+ }+ .stat .value.good { color: var(--good); }+ .stat .value.bad { color: var(--bad); }+ .stat .value em { font-style: italic; font-weight: 400; }+ .stat .note { font: italic 13.5px/1.4 var(--serif-body); color: var(--muted); max-width: 32ch; }+ .stat .arrow { font-style: normal; color: var(--good); font-size: 14px; }++ .panel { padding: 18px 0 24px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 18px; }+ .panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }+ .panel-head h3 { margin: 0; font: italic 24px/1 var(--serif-display); letter-spacing: -0.005em; }+ .panel-head .meta { font: 11px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; max-width: 56ch; text-align: right; }+ .panel svg { width: 100%; height: 220px; display: block; }+ .panel .axis { display: flex; justify-content: space-between; font: 10px/1 var(--mono); color: var(--muted); letter-spacing: 0.1em; padding: 8px 4px 0; text-transform: uppercase; }++ .lower-panel .lede { font: italic 15px/1.55 var(--serif-body); color: var(--muted); margin: 0; max-width: 70ch; }+ .lower-panel .lede b { color: var(--ink); font-style: normal; font-weight: 600; }++ @media (max-width: 1100px) {+ .layout { grid-template-columns: 1fr; }+ aside.rail { border-right: none; border-bottom: 1px solid var(--ink); }+ .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 28px; }+ }+ </style>+</head>+<body>+ <div class="ticker" data-od-id="ticker">+ <div class="left">+ <span>YOUR DATING LIFE, MEASURED BY THE COMPANY YOU KEEP</span>+ <span style="opacity:0.6;">·</span>+ <span>REVIEWED WEEKLY</span>+ </div>+ <div>NEXT TIER AT <b>2,080 MUTUALS</b></div>+ </div>++ <div class="layout">+ <aside class="rail" data-od-id="rail">+ <div class="brand">mutuals<span class="dot">.</span></div>+ <div class="user">+ <div class="avatar">si</div>+ <div class="meta"><b>@signals</b><span>RATIO 22.9 · TIER III</span></div>+ </div>++ <div>+ <h4>Today</h4>+ <ul>+ <li>specimen <span class="badge">3</span></li>+ <li>inbox <span class="badge">3</span></li>+ <li>queue <span style="font:11px/1 var(--mono);color:var(--muted);">6</span></li>+ <li>notifications <span class="badge gray">12</span></li>+ </ul>+ </div>+ <div>+ <h4>You</h4>+ <ul>+ <li class="active">your stats</li>+ <li>mutuals & communities</li>+ <li>blocked <span style="font:11px/1 var(--mono);color:var(--muted);">14</span></li>+ <li>settings</li>+ </ul>+ </div>+ <div>+ <h4>Archive</h4>+ <ul>+ <li>past issues</li>+ <li>expired matches <span style="font:11px/1 var(--mono);color:var(--muted);">7</span></li>+ </ul>+ </div>++ <div class="status">+ <div class="live">online · last match 11m ago</div>+ <div style="opacity:0.7;margin-top:2px;">mutuals.v0.6.1</div>+ </div>+ </aside>++ <main data-od-id="main">+ <section class="grid" data-od-id="kpis">+ <div class="stat">+ <div class="label">Mutuals on file</div>+ <div class="value"><em>1,842</em></div>+ <p class="note"><span class="arrow">↑</span> 41 this wk · healthy growth.</p>+ </div>+ <div class="stat">+ <div class="label">Replies in 24h</div>+ <div class="value good">47</div>+ <p class="note">the people who'd text back within a day.</p>+ </div>+ <div class="stat">+ <div class="label">Communities</div>+ <div class="value"><em>14</em></div>+ <p class="note">4 active · 7 lurking · 3 inferred.</p>+ </div>++ <div class="stat">+ <div class="label">Match rate</div>+ <div class="value good">14%</div>+ <p class="note">above median for your cohort.</p>+ </div>+ <div class="stat">+ <div class="label">2nd dates</div>+ <div class="value"><em>3</em></div>+ <p class="note">of 7 first dates this year. you commit.</p>+ </div>+ <div class="stat">+ <div class="label">Exes in your circle</div>+ <div class="value bad">4</div>+ <p class="note">manageable. two are now friends.</p>+ </div>++ <div class="stat">+ <div class="label">Shared blocks</div>+ <div class="value"><em>214</em></div>+ <p class="note">your single greatest compatibility asset.</p>+ </div>+ <div class="stat">+ <div class="label">Avg response</div>+ <div class="value"><em>2.1<span style="font-size:32px;">h</span></em></div>+ <p class="note">too fast. wait 4–6h. they notice.</p>+ </div>+ <div class="stat">+ <div class="label">Logged-off hrs</div>+ <div class="value bad">4</div>+ <p class="note">/ 168 this wk. we beg.</p>+ </div>+ </section>++ <section class="panel" data-od-id="bars">+ <div class="panel-head">+ <h3>mutuals — <em>last 30 days</em></h3>+ <div class="meta">↑ TRENDING UP · +3 CLOSE MUTUALS THIS MONTH · TWO VIA THE SAME OFFSITE</div>+ </div>+ <svg viewBox="0 0 720 220" preserveAspectRatio="none" aria-hidden="true">+ <g fill="#1f1c14">+ <rect x="6" y="170" width="14" height="50"></rect>+ <rect x="30" y="158" width="14" height="62"></rect>+ <rect x="54" y="146" width="14" height="74"></rect>+ <rect x="78" y="172" width="14" height="48"></rect>+ <rect x="102" y="162" width="14" height="58"></rect>+ <rect x="126" y="138" width="14" height="82"></rect>+ <rect x="150" y="120" width="14" height="100"></rect>+ <rect x="174" y="148" width="14" height="72"></rect>+ <rect x="198" y="132" width="14" height="88"></rect>+ <rect x="222" y="108" width="14" height="112"></rect>+ <rect x="246" y="118" width="14" height="102"></rect>+ <rect x="270" y="154" width="14" height="66"></rect>+ <rect x="294" y="130" width="14" height="90"></rect>+ <rect x="318" y="100" width="14" height="120"></rect>+ <rect x="342" y="86" width="14" height="134"></rect>+ <rect x="366" y="116" width="14" height="104"></rect>+ <rect x="390" y="138" width="14" height="82"></rect>+ <rect x="414" y="92" width="14" height="128"></rect>+ <rect x="438" y="74" width="14" height="146"></rect>+ <rect x="462" y="106" width="14" height="114"></rect>+ <rect x="486" y="84" width="14" height="136"></rect>+ <rect x="510" y="124" width="14" height="96"></rect>+ <rect x="534" y="98" width="14" height="122"></rect>+ <rect x="558" y="68" width="14" height="152"></rect>+ <rect x="582" y="80" width="14" height="140"></rect>+ <rect x="606" y="46" width="14" height="174" fill="#c14a2b"></rect>+ <rect x="630" y="60" width="14" height="160" fill="#c14a2b"></rect>+ <rect x="654" y="92" width="14" height="128"></rect>+ <rect x="678" y="76" width="14" height="144"></rect>+ <rect x="702" y="90" width="14" height="130"></rect>+ </g>+ </svg>+ <div class="axis"><span>MAR 18</span><span>MAR 25</span><span>APR 1</span><span>APR 8</span><span>APR 15</span><span>TODAY</span></div>+ </section>++ <section class="panel lower-panel" data-od-id="trend">+ <div class="panel-head">+ <h3>match rate — <em>last 12 weeks</em></h3>+ <div class="meta">STEADY CLIMB FROM 8% → 14%. ATTRIBUTABLE TO ONE COMMUNITY JOIN (FOUNDERS WHO POST, WK 4).</div>+ </div>+ <p class="lede">A real climb, not a vibe. <b>One community join</b> moved your match rate more than four months of profile edits — keep posting from that circle, ship more, tweet less.</p>+ </section>+ </main>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/deck-blueprint/SKILL.md b/src/lib/templates/skills/deck-blueprint/SKILL.mdnew file mode 100644index 00000000..53c9827b--- /dev/null+++ b/src/lib/templates/skills/deck-blueprint/SKILL.md@@ -0,0 +1,22 @@+---+name: deck-blueprint+zh_name: "蓝图架构 Deck"+en_name: "Knowledge Arch Blueprint"+emoji: "📐"+description: "奶油纸 + 锈红 + 蓝图网格 mask + 黑边硬卡片 + pipeline 盒"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 29+tags: ["blueprint", "architecture", "engineering"]+---++【模板: Knowledge Arch Blueprint Deck】+【意图】认真的、印刷友好的架构 / pipeline 讲解 deck。+【布局】+- 奶油 #F0EAE0 底 + 蓝图 48px 网格 mask+- Pipeline 步骤盒 (其中一个抬高)+- 右侧锈红 #B5392A insight callout+- Playfair serif 大字 + SVG 虚线反馈环+【设计细节】+- 零渐变零软阴影diff --git a/src/lib/templates/skills/deck-blueprint/example.html b/src/lib/templates/skills/deck-blueprint/example.htmlnew file mode 100644index 00000000..a98629c2--- /dev/null+++ b/src/lib/templates/skills/deck-blueprint/example.html@@ -0,0 +1,407 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Knowledge Arch Blueprint</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* knowledge-arch-blueprint — 奶油纸 + 建筑蓝图风 */+.tpl-knowledge-arch-blueprint{+ --kb-bg:#F0EAE0;+ --kb-ink:#1a1a1a;+ --kb-ink2:#555;+ --kb-ink3:#aaa;+ --kb-rust:#B5392A;+ --kb-rust-soft:rgba(181,57,42,.08);+ --kb-line:#cec8be;+ background:var(--kb-bg);+ color:var(--kb-ink);+ font-family:'Inter','Noto Sans SC',-apple-system,sans-serif;+}+.tpl-knowledge-arch-blueprint .slide{background:var(--kb-bg);color:var(--kb-ink);padding:64px 80px}+.tpl-knowledge-arch-blueprint .kb-grid-bg{position:absolute;inset:0;pointer-events:none;opacity:.35;background-image:linear-gradient(rgba(26,26,26,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(26,26,26,.06) 1px,transparent 1px);background-size:48px 48px;mask-image:radial-gradient(ellipse at center,black 40%,transparent 85%)}+.tpl-knowledge-arch-blueprint .slide > *{position:relative;z-index:2}+.tpl-knowledge-arch-blueprint .kb-kicker{font-size:13px;font-weight:800;letter-spacing:4px;text-transform:uppercase;color:var(--kb-rust);margin-bottom:12px}+.tpl-knowledge-arch-blueprint .kb-h1{font-size:66px;font-weight:900;line-height:1.08;color:#111;margin:0 0 14px;letter-spacing:-.02em}+.tpl-knowledge-arch-blueprint .kb-h1 span.rust{color:var(--kb-rust)}+.tpl-knowledge-arch-blueprint .kb-sub{font-size:20px;color:#666;line-height:1.55;max-width:780px}+.tpl-knowledge-arch-blueprint .kb-insight{display:inline-block;background:var(--kb-rust);color:#fff;border-radius:10px;padding:16px 22px;font-size:14px;font-weight:700;line-height:1.5;max-width:340px;box-shadow:0 8px 24px rgba(181,57,42,.22)}+.tpl-knowledge-arch-blueprint .kb-insight .kk{font-size:10px;letter-spacing:2px;opacity:.7;display:block;margin-bottom:6px;font-weight:800}+.tpl-knowledge-arch-blueprint .kb-section-label{font-size:11px;font-weight:800;letter-spacing:3.5px;text-transform:uppercase;color:#aaa;margin:30px 0 12px;display:flex;align-items:center;gap:14px}+.tpl-knowledge-arch-blueprint .kb-section-label::after{content:'';flex:1;height:1px;background:var(--kb-line)}+.tpl-knowledge-arch-blueprint .kb-pipeline{display:flex;align-items:stretch;gap:14px;margin-top:24px}+.tpl-knowledge-arch-blueprint .kb-step{flex:1;border:2px solid #1a1a1a;border-radius:12px;padding:22px 18px;background:#fff;position:relative;min-height:200px;display:flex;flex-direction:column}+.tpl-knowledge-arch-blueprint .kb-step.hero{background:var(--kb-rust);border-color:var(--kb-rust);color:#fff;flex:1.25;box-shadow:0 10px 32px rgba(181,57,42,.28);transform:translateY(-10px)}+.tpl-knowledge-arch-blueprint .kb-step-num{font-size:10px;font-weight:800;letter-spacing:2.5px;color:#bbb;margin-bottom:8px;text-transform:uppercase}+.tpl-knowledge-arch-blueprint .kb-step.hero .kb-step-num{color:rgba(255,255,255,.6)}+.tpl-knowledge-arch-blueprint .kb-step-title{font-size:22px;font-weight:900;line-height:1.15;color:#111;margin-bottom:8px}+.tpl-knowledge-arch-blueprint .kb-step.hero .kb-step-title{color:#fff}+.tpl-knowledge-arch-blueprint .kb-step-body{font-size:13px;line-height:1.55;color:#555;margin-top:auto}+.tpl-knowledge-arch-blueprint .kb-step.hero .kb-step-body{color:rgba(255,255,255,.88)}+.tpl-knowledge-arch-blueprint .kb-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}+.tpl-knowledge-arch-blueprint .kb-card{background:#fff;border:2px solid #1a1a1a;border-radius:12px;padding:22px 24px}+.tpl-knowledge-arch-blueprint .kb-card h4{font-size:20px;font-weight:900;margin-bottom:6px}+.tpl-knowledge-arch-blueprint .kb-card p{font-size:14px;color:#555;line-height:1.55}+.tpl-knowledge-arch-blueprint .kb-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:22px;font-size:12px;color:#666}+.tpl-knowledge-arch-blueprint .kb-legend .d{display:flex;align-items:center;gap:8px}+.tpl-knowledge-arch-blueprint .kb-legend .b{width:14px;height:14px;border:2px solid #1a1a1a;border-radius:3px}+.tpl-knowledge-arch-blueprint .kb-legend .b.rust{background:var(--kb-rust);border-color:var(--kb-rust)}+.tpl-knowledge-arch-blueprint .kb-footer{position:absolute;left:80px;right:80px;bottom:36px;display:flex;justify-content:space-between;font-size:11px;color:#999;letter-spacing:.15em;text-transform:uppercase;border-top:1px solid var(--kb-line);padding-top:16px}+.tpl-knowledge-arch-blueprint .kb-mono{font-family:'JetBrains Mono',monospace}+.tpl-knowledge-arch-blueprint .kb-codebox{background:#1a1a1a;color:#f0eae0;border-radius:12px;padding:22px 26px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.8;margin-top:20px;border:2px solid #1a1a1a}+.tpl-knowledge-arch-blueprint .kb-codebox .cm{color:#7a766c}+.tpl-knowledge-arch-blueprint .kb-codebox .kw{color:#e8a87c}+.tpl-knowledge-arch-blueprint .kb-codebox .st{color:#b3d1bc}+.tpl-knowledge-arch-blueprint .kb-codebox .hl{color:var(--kb-rust);background:rgba(255,255,255,.08);padding:0 4px;border-radius:3px}+.tpl-knowledge-arch-blueprint .kb-big-num{font-family:'Playfair Display',Georgia,serif;font-size:200px;font-weight:900;line-height:.9;color:var(--kb-rust);letter-spacing:-.04em}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-knowledge-arch-blueprint">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="kb-grid-bg"></div>+ <div style="display:flex;justify-content:space-between;align-items:flex-start;gap:40px;margin-bottom:44px">+ <div>+ <div class="kb-kicker">Karpathy Stack · 架构图 v2</div>+ <h1 class="kb-h1">LLM <span class="rust">知识库</span> 的<br>工程化蓝图</h1>+ <p class="kb-sub">从「乱贴笔记」到「可审计、可纠错、可复用」的第二大脑 —— 这是我读完 Karpathy 的分享后画的一张系统图。</p>+ </div>+ <div class="kb-insight"><span class="kk">KEY INSIGHT</span>Karpathy 原版缺一块:<br>反馈闭环让错误能回流纠正。</div>+ </div>+ <div class="kb-section-label">Pipeline · End-to-end</div>+ <div class="kb-pipeline">+ <div class="kb-step"><div class="kb-step-num">STEP 01</div><div class="kb-step-title">采集</div><div class="kb-step-body">浏览器剪藏、PDF、Podcast 转写、聊天记录</div></div>+ <div class="kb-step"><div class="kb-step-num">STEP 02</div><div class="kb-step-title">去噪</div><div class="kb-step-body">清洗导航栏、广告、重复段落、低信噪素材</div></div>+ <div class="kb-step hero"><div class="kb-step-num">STEP 03 · CORE</div><div class="kb-step-title">Wiki 化</div><div class="kb-step-body">结构化成双链笔记,实体、关系、属性全在一起</div></div>+ <div class="kb-step"><div class="kb-step-num">STEP 04</div><div class="kb-step-title">使用</div><div class="kb-step-body">Agent 随时检索、回答、再写入</div></div>+ </div>+ <div class="kb-footer"><span>Blueprint · v2 · 2026.04</span><span>01 / 08</span></div>+ </section>++ <!-- 2. SECTION DIVIDER -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div style="margin:auto 0">+ <div class="kb-kicker">Chapter One</div>+ <h1 class="kb-h1" style="font-size:120px">为什么 <span class="rust">笔记</span><br>不够用了</h1>+ <p class="kb-sub" style="font-size:24px;margin-top:20px">当你的知识量超过记忆容量,<br>你需要的不是更多文件,而是一张<b>可导航的图</b>。</p>+ </div>+ <div class="kb-footer"><span>Section · Chapter 1</span><span>02 / 08</span></div>+ </section>++ <!-- 3. CONTENT 2-col -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div class="kb-kicker">Problem · Solution</div>+ <h1 class="kb-h1" style="font-size:48px">原版 vs <span class="rust">升级版</span></h1>+ <div class="kb-grid-2">+ <div class="kb-card">+ <div class="kb-kicker" style="color:#888">原版 Karpathy</div>+ <h4>一次性写入</h4>+ <p>采集 → 转写 → 存档,错了就错了。没有回路,没有修正机制,笔记越多越混乱。</p>+ </div>+ <div class="kb-card" style="background:var(--kb-rust-soft);border-color:var(--kb-rust)">+ <div class="kb-kicker">升级 v2</div>+ <h4>反馈闭环</h4>+ <p>AI 使用知识库时记录每次 miss / 幻觉 / 过期事实,自动回灌到源文件,让笔记会自我修正。</p>+ </div>+ </div>+ <div class="kb-legend">+ <div class="d"><span class="b"></span>普通节点</div>+ <div class="d"><span class="b rust"></span>核心节点 · 反馈回路入口</div>+ <div class="d">—— 数据流 ┈┈ 反馈回路</div>+ </div>+ <div class="kb-footer"><span>Content · Compare</span><span>03 / 08</span></div>+ </section>++ <!-- 4. CODE -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div class="kb-kicker">Implementation · Skill Manifest</div>+ <h1 class="kb-h1" style="font-size:48px">反馈回路 <span class="rust">怎么实现</span></h1>+ <p class="kb-sub">一个 100 行的 Agent Skill,把「AI 用得顺不顺」回写成 vault 的一条条修订记录。</p>+ <pre class="kb-codebox"><span class="cm"># skills/wiki-feedback/SKILL.md</span>+<span class="kw">name</span>: wiki-feedback+<span class="kw">trigger</span>: <span class="st">"after every retrieval"</span>++<span class="kw">on_hit</span>: record(<span class="st">query, path, used=true</span>)+<span class="kw">on_miss</span>: record(<span class="st">query, reason=</span><span class="hl">"not-in-vault"</span>)+<span class="kw">on_wrong</span>: record(<span class="st">query, correction, path</span>)++<span class="kw">nightly</span>:+ - <span class="st">aggregate misses → suggest new notes</span>+ - <span class="st">aggregate wrongs → diff-patch old notes</span>+ - <span class="st">commit to git, open PR for human review</span></pre>+ <div class="kb-footer"><span>Content · Code</span><span>04 / 08</span></div>+ </section>++ <!-- 5. DIAGRAM - SVG feedback loop -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div class="kb-kicker">System Diagram</div>+ <h1 class="kb-h1" style="font-size:44px">反馈回路全貌</h1>+ <svg viewBox="0 0 1200 520" style="width:100%;max-width:1200px;margin-top:20px" xmlns="http://www.w3.org/2000/svg">+ <defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">+ <path d="M0,0 L10,5 L0,10 z" fill="#1a1a1a"/>+ </marker>+ <marker id="arrow-r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">+ <path d="M0,0 L10,5 L0,10 z" fill="#B5392A"/>+ </marker>+ </defs>+ <g font-family="Inter, sans-serif" font-size="16" font-weight="700">+ <!-- boxes -->+ <rect x="40" y="180" width="200" height="120" rx="10" fill="#fff" stroke="#1a1a1a" stroke-width="2"/>+ <text x="140" y="220" text-anchor="middle">Sources</text>+ <text x="140" y="250" text-anchor="middle" font-size="12" font-weight="400" fill="#666">web · pdf · chat</text>++ <rect x="300" y="180" width="200" height="120" rx="10" fill="#fff" stroke="#1a1a1a" stroke-width="2"/>+ <text x="400" y="220" text-anchor="middle">Clean + Split</text>+ <text x="400" y="250" text-anchor="middle" font-size="12" font-weight="400" fill="#666">defuddle / chunker</text>++ <rect x="560" y="160" width="220" height="160" rx="10" fill="#B5392A" stroke="#B5392A" stroke-width="2"/>+ <text x="670" y="210" text-anchor="middle" fill="#fff" font-size="20">Vault (Wiki)</text>+ <text x="670" y="240" text-anchor="middle" font-size="12" font-weight="400" fill="rgba(255,255,255,.8)">markdown · links</text>+ <text x="670" y="262" text-anchor="middle" font-size="12" font-weight="400" fill="rgba(255,255,255,.8)">bases · canvas</text>++ <rect x="840" y="180" width="200" height="120" rx="10" fill="#fff" stroke="#1a1a1a" stroke-width="2"/>+ <text x="940" y="220" text-anchor="middle">Agent Use</text>+ <text x="940" y="250" text-anchor="middle" font-size="12" font-weight="400" fill="#666">retrieve / answer</text>++ <!-- forward arrows -->+ <line x1="245" y1="240" x2="295" y2="240" stroke="#1a1a1a" stroke-width="2" marker-end="url(#arrow)"/>+ <line x1="505" y1="240" x2="555" y2="240" stroke="#1a1a1a" stroke-width="2" marker-end="url(#arrow)"/>+ <line x1="785" y1="240" x2="835" y2="240" stroke="#1a1a1a" stroke-width="2" marker-end="url(#arrow)"/>++ <!-- feedback dashed -->+ <path d="M 940 180 Q 940 80, 670 80 Q 400 80, 400 180" fill="none" stroke="#B5392A" stroke-width="2" stroke-dasharray="6 6" marker-end="url(#arrow-r)"/>+ <rect x="580" y="58" width="180" height="30" rx="6" fill="#F0EAE0" stroke="#B5392A" stroke-width="1"/>+ <text x="670" y="78" text-anchor="middle" fill="#B5392A" font-size="12">FEEDBACK · wrong / miss</text>++ <!-- bottom feedback to sources -->+ <path d="M 940 300 Q 940 420, 670 420 Q 140 420, 140 300" fill="none" stroke="#B5392A" stroke-width="2" stroke-dasharray="6 6" marker-end="url(#arrow-r)"/>+ <rect x="560" y="400" width="220" height="30" rx="6" fill="#F0EAE0" stroke="#B5392A" stroke-width="1"/>+ <text x="670" y="420" text-anchor="middle" fill="#B5392A" font-size="12">NIGHTLY · suggest new sources</text>+ </g>+ </svg>+ <div class="kb-footer"><span>Diagram · Feedback Loop</span><span>05 / 08</span></div>+ </section>++ <!-- 6. STATS -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div class="kb-kicker">After 6 Months</div>+ <h1 class="kb-h1" style="font-size:44px">升级版 <span class="rust">跑了半年</span> 的数据</h1>+ <div style="display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:24px;margin-top:28px;align-items:center">+ <div style="text-align:center"><div class="kb-big-num">13</div><p style="font-size:14px;color:#666;margin-top:6px;letter-spacing:.1em;text-transform:uppercase">关键优化项 · 全部落地</p></div>+ <div class="kb-card"><h4 style="color:var(--kb-rust)">-62%</h4><p>幻觉率(相比无反馈回路版本)</p></div>+ <div class="kb-card"><h4 style="color:var(--kb-rust)">+4.1×</h4><p>单次检索命中率</p></div>+ </div>+ <div class="kb-grid-2" style="margin-top:18px">+ <div class="kb-card"><h4>自动修订 227 条</h4><p>其中 189 条被人工批准合并,38 条被拒绝(数据已归档)。</p></div>+ <div class="kb-card"><h4>新增笔记 412 篇</h4><p>从 miss 日志聚类而来,每篇都有来源追溯。</p></div>+ </div>+ <div class="kb-footer"><span>Content · Stats</span><span>06 / 08</span></div>+ </section>++ <!-- 7. CTA -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div class="kb-kicker">Next Step</div>+ <h1 class="kb-h1" style="font-size:60px">开始你的 <span class="rust">Wiki v2</span></h1>+ <p class="kb-sub">不用重写所有笔记。先接一条回路,让 AI 的每次使用都在「改好」你的 vault。</p>+ <div class="kb-pipeline">+ <div class="kb-step"><div class="kb-step-num">TONIGHT</div><div class="kb-step-title">装 Skill</div><div class="kb-step-body">pnpm i -g @lewis/wiki-feedback</div></div>+ <div class="kb-step"><div class="kb-step-num">DAY 2</div><div class="kb-step-title">跑 7 天</div><div class="kb-step-body">观察 miss log 自动累积</div></div>+ <div class="kb-step hero"><div class="kb-step-num">DAY 8 · CORE</div><div class="kb-step-title">第一次审 PR</div><div class="kb-step-body">花 15 分钟 review 自动生成的修订</div></div>+ <div class="kb-step"><div class="kb-step-num">MONTH 1</div><div class="kb-step-title">开始信它</div><div class="kb-step-body">你的 vault 会变成活的</div></div>+ </div>+ <div class="kb-footer"><span>CTA</span><span>07 / 08</span></div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="kb-grid-bg"></div>+ <div style="margin:auto 0;text-align:center">+ <div class="kb-kicker">END · blueprint v2</div>+ <h1 class="kb-h1" style="font-size:140px;margin-top:24px">谢谢 <span class="rust">·</span> thanks</h1>+ <p class="kb-sub" style="margin:0 auto;font-size:22px">图纸、Skill、笔记模板都在 <b>github.com/lewis/karpathy-wiki-v2</b></p>+ </div>+ <div class="kb-footer"><span>End of deck</span><span>08 / 08</span></div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-course-module/SKILL.md b/src/lib/templates/skills/deck-course-module/SKILL.mdnew file mode 100644index 00000000..5943a785--- /dev/null+++ b/src/lib/templates/skills/deck-course-module/SKILL.md@@ -0,0 +1,23 @@+---+name: deck-course-module+zh_name: "课程 / 培训 Deck"+en_name: "Course Module Deck"+emoji: "🎓"+description: "暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页"+category: slides+scenario: education+aspect_hint: "16:9"+featured: 25+tags: ["course", "workshop", "training", "教学"]+---++【模板: 课程 / 培训模块 Deck】+【意图】教学 / workshop 用 deck, 持续显示学习目标。+【布局】+- Cover (模块名 + 讲师)+- Learning objectives 列表 (左侧持续显示)+- 正文页 (concept + 例子)+- MCQ 自测页+- Wrap-up + 下一模块预告+【设计细节】+- warm paper bg + Playfair serifdiff --git a/src/lib/templates/skills/deck-course-module/example.html b/src/lib/templates/skills/deck-course-module/example.htmlnew file mode 100644index 00000000..cf681aaa--- /dev/null+++ b/src/lib/templates/skills/deck-course-module/example.html@@ -0,0 +1,542 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">+<title>Module 04 · Recursion · CS101</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* html-ppt :: animations.css+ * Apply by adding class="anim-<name>" or data-anim="<name>".+ * Durations are deliberately snappy; tweak --anim-dur per element.+ */+:root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}++/* ---------- FADE DIRECTIONALS ---------- */+@keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}+@keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}+.anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}+.anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}+.anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}+.anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}++/* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */+@keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}+@keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}+@keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}+@keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}+@keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}+ 20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}+ 40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}+ 60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}+ 80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}+ 100%{opacity:1;transform:none}}+.anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}+.anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}+.anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}+.anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}+.anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}++/* ---------- TYPEWRITER ---------- */+.anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;+ width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}+@keyframes kf-type{to{width:100%}}+@keyframes kf-caret{50%{border-color:transparent}}++/* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */+@keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}+ 50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}+.anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}++.anim-shimmer-sweep{position:relative;overflow:hidden}+.anim-shimmer-sweep::after{content:"";position:absolute;inset:0;+ background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);+ transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}+@keyframes kf-shimmer{to{transform:translateX(100%)}}++.anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));+ background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;+ animation:kf-gradflow 4s linear infinite}+@keyframes kf-gradflow{to{background-position:300% 0}}++/* ---------- STAGGER LIST ---------- */+.anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}+.anim-stagger-list > *:nth-child(1){animation-delay:.05s}+.anim-stagger-list > *:nth-child(2){animation-delay:.15s}+.anim-stagger-list > *:nth-child(3){animation-delay:.25s}+.anim-stagger-list > *:nth-child(4){animation-delay:.35s}+.anim-stagger-list > *:nth-child(5){animation-delay:.45s}+.anim-stagger-list > *:nth-child(6){animation-delay:.55s}+.anim-stagger-list > *:nth-child(7){animation-delay:.65s}+.anim-stagger-list > *:nth-child(8){animation-delay:.75s}+.anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}++/* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */+.counter{font-variant-numeric:tabular-nums}++/* ---------- SVG PATH DRAW ---------- */+.anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{+ stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}+@keyframes kf-draw{to{stroke-dashoffset:0}}++/* ---------- PARALLAX TILT (hover) ---------- */+.anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}+.anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}++/* ---------- CARD FLIP 3D ---------- */+@keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}+ to{transform:perspective(1200px) rotateY(0);opacity:1}}+.anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}++/* ---------- CUBE ROTATE 3D ---------- */+@keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}+ to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}+.anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}++/* ---------- PAGE TURN 3D ---------- */+@keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}+ to{transform:perspective(1600px) rotateY(0);opacity:1}}+.anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}++/* ---------- PERSPECTIVE ZOOM ---------- */+@keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}+ to{opacity:1;transform:none}}+.anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}++/* ---------- MARQUEE SCROLL ---------- */+.anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}+@keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}++/* ---------- KEN BURNS ---------- */+@keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}+.anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}++/* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */+.anim-confetti-burst{position:relative}+.anim-confetti-burst::before,.anim-confetti-burst::after{+ content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;+ background:var(--accent);box-shadow:+ 20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),+ 30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),+ 40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),+ 10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));+ opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}+.anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}+@keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}++/* ---------- SPOTLIGHT ---------- */+@keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}+.anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}++/* ---------- MORPH SHAPE (SVG) ---------- */+.anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}+@keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}+ 100%{d:path("M60,120 Q120,220 180,120 T300,120")}}++/* ---------- RIPPLE REVEAL ---------- */+@keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}+ 100%{clip-path:circle(160% at 20% 80%);opacity:1}}+.anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}++/* reduced motion */+@media (prefers-reduced-motion: reduce){+ [class*="anim-"]{animation:none!important;transition:none!important}+}++</style>+<style>/* course-module — academic but friendly */+.tpl-course-module{+ --bg:#fbfaf6;--bg-soft:#f4f1e8;--surface:#ffffff;--surface-2:#f6f3ea;+ --border:rgba(60,45,20,.12);--border-strong:rgba(60,45,20,.24);+ --text-1:#2a2418;--text-2:#5a5140;--text-3:#8a7f68;+ --accent:#2d7d6e;--accent-2:#d88a3a;--accent-3:#c4593f;+ --grad:linear-gradient(135deg,#2d7d6e,#4ea893);+ --radius:14px;--radius-lg:20px;+ --shadow:0 12px 30px rgba(60,45,20,.07);+ font-family:'Inter','Noto Sans SC',sans-serif;+}+.tpl-course-module .slide{padding:64px 80px;background:var(--bg);display:grid;grid-template-columns:260px 1fr;gap:56px;align-content:start}+.tpl-course-module .slide.full{grid-template-columns:1fr;display:flex;flex-direction:column;justify-content:center}+.tpl-course-module .sidebar{border-right:1px solid var(--border);padding-right:32px;position:relative}+.tpl-course-module .sidebar .brand{font-family:'Playfair Display',serif;font-size:22px;font-weight:700;color:var(--accent)}+.tpl-course-module .sidebar .brand::before{content:"✦ ";color:var(--accent-2)}+.tpl-course-module .sidebar h5{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--text-3);margin:32px 0 12px}+.tpl-course-module .obj-list{list-style:none;padding:0;margin:0;font-size:13px;color:var(--text-2);line-height:1.5}+.tpl-course-module .obj-list li{padding:8px 0 8px 22px;position:relative;border-bottom:1px dashed var(--border)}+.tpl-course-module .obj-list li::before{content:"○";position:absolute;left:0;top:8px;color:var(--accent)}+.tpl-course-module .obj-list li.done::before{content:"●";color:var(--accent)}+.tpl-course-module .obj-list li.current{color:var(--text-1);font-weight:700}+.tpl-course-module .obj-list li.current::before{content:"▸";color:var(--accent-2)}+.tpl-course-module .main{min-width:0}+.tpl-course-module .h1{font-family:'Playfair Display',serif;font-size:72px;line-height:1.02;font-weight:800;letter-spacing:-.02em;color:var(--text-1)}+.tpl-course-module .h2{font-family:'Playfair Display',serif;font-size:48px;line-height:1.1;font-weight:700;letter-spacing:-.015em;color:var(--text-1)}+.tpl-course-module h3,.tpl-course-module h4{color:var(--text-1)}+.tpl-course-module .kicker{color:var(--accent-2);font-size:12px;font-weight:700;letter-spacing:.14em}+.tpl-course-module .lede{font-size:20px;color:var(--text-2);line-height:1.7}+.tpl-course-module .callout{border-left:4px solid var(--accent-2);background:var(--surface-2);padding:20px 24px;border-radius:0 var(--radius) var(--radius) 0;margin-top:24px}+.tpl-course-module .callout b{color:var(--accent-2)}+.tpl-course-module .concept-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px 26px;box-shadow:var(--shadow)}+.tpl-course-module .concept-box h4{margin-top:0;color:var(--accent)}+.tpl-course-module .exercise{background:#fff8ed;border:1.5px dashed var(--accent-2);border-radius:var(--radius);padding:24px 28px}+.tpl-course-module .exercise::before{content:"✎ Exercise";display:block;font-size:12px;font-weight:700;letter-spacing:.12em;color:var(--accent-2);margin-bottom:10px;text-transform:uppercase}+.tpl-course-module .code{background:#2a2418;color:#f4f1e8;border-radius:var(--radius);padding:20px 24px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.7;overflow:auto}+.tpl-course-module .code .cmt{color:#8a7f68;font-style:italic}+.tpl-course-module .code .kw{color:#e8a770}+.tpl-course-module .code .str{color:#8ec6b2}+.tpl-course-module .mcq{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px 22px;margin-bottom:10px;display:flex;gap:14px;align-items:flex-start;cursor:pointer}+.tpl-course-module .mcq .letter{flex:none;width:28px;height:28px;border-radius:50%;border:2px solid var(--text-3);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;color:var(--text-2)}+.tpl-course-module .mcq.correct{border-color:var(--accent);background:rgba(45,125,110,.06)}+.tpl-course-module .mcq.correct .letter{border-color:var(--accent);background:var(--accent);color:#fff}+.tpl-course-module .pill-academic{display:inline-block;padding:4px 12px;border-radius:4px;background:var(--surface-2);border:1px solid var(--border);font-size:12px;color:var(--text-2);font-family:'JetBrains Mono',monospace}+.tpl-course-module .slide.full .h1{font-size:88px}+.tpl-course-module .deck-footer{color:var(--text-3)}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-course-module">+<div class="deck">++ <!-- 1. Cover -->+ <section class="slide full" data-title="Cover">+ <p class="kicker">CS 101 · MODULE 04</p>+ <h1 class="h1 mt-s">Recursion: solving<br>problems by <em>calling yourself</em>.</h1>+ <p class="lede mt-l" style="max-width:62ch">In this module you'll learn why a function that calls itself is not a trick, but the most natural way to describe problems that contain smaller copies of themselves.</p>+ <div class="row mt-l" style="gap:16px">+ <span class="pill-academic">~ 45 min read</span>+ <span class="pill-academic">prereq · functions, if/else</span>+ <span class="pill-academic">lang · Python</span>+ </div>+ <div class="deck-footer"><span>Dr. A. Rivera · Spring 2026</span><span class="slide-number" data-current="1" data-total="7"></span></div>+ </section>++ <!-- 2. Objectives -->+ <section class="slide" data-title="Objectives">+ <aside class="sidebar">+ <div class="brand">CS 101 · M04</div>+ <h5>Learning objectives</h5>+ <ul class="obj-list">+ <li class="current">Define recursion</li>+ <li>Identify a base case</li>+ <li>Trace a recursive call</li>+ <li>Convert loop ↔ recursion</li>+ <li>Recognize when recursion helps</li>+ </ul>+ <h5>Module progress</h5>+ <p class="dim" style="font-size:13px">Page 2 of 7 · ~5 min in</p>+ </aside>+ <div class="main">+ <p class="kicker">OBJECTIVES</p>+ <h2 class="h2 mt-s">By the end, you will be able to…</h2>+ <div class="stack mt-l">+ <div class="concept-box"><h4>① Explain recursion in one sentence.</h4><p class="dim">"A function that solves a problem by calling itself on a smaller version of that problem."</p></div>+ <div class="concept-box"><h4>② Write a base case that always terminates.</h4><p class="dim">Every recursive function must have an exit door, or it runs forever.</p></div>+ <div class="concept-box"><h4>③ Trace a call stack on paper.</h4><p class="dim">Given <code>fact(4)</code>, draw the stack frames top-to-bottom.</p></div>+ <div class="concept-box"><h4>④ Convert a while-loop to a recursive equivalent.</h4><p class="dim">And explain when one is clearer than the other.</p></div>+ </div>+ </div>+ </section>++ <!-- 3. Concept -->+ <section class="slide" data-title="Concept">+ <aside class="sidebar">+ <div class="brand">CS 101 · M04</div>+ <h5>Learning objectives</h5>+ <ul class="obj-list">+ <li class="done">Define recursion</li>+ <li class="current">Identify a base case</li>+ <li>Trace a recursive call</li>+ <li>Convert loop ↔ recursion</li>+ <li>Recognize when recursion helps</li>+ </ul>+ <h5>Key terms</h5>+ <p class="dim" style="font-size:13px">base case · recursive case · call stack · tail call</p>+ </aside>+ <div class="main">+ <p class="kicker">CORE CONCEPT</p>+ <h2 class="h2 mt-s">Two parts, always.</h2>+ <p class="lede mt-m">A recursive function has exactly two things inside it: a <b>base case</b> (when to stop) and a <b>recursive case</b> (how to shrink the problem before calling yourself).</p>+ <div class="callout">+ <b>Rule of thumb.</b> If you can't name the base case out loud, don't write the recursion yet. Draw it on paper first.+ </div>+ <div class="grid g2 mt-l">+ <div class="concept-box"><h4>Base case</h4><p class="dim">The smallest possible input — one the function answers directly, without calling itself.</p><p class="pill-academic">e.g. <b>n == 0</b></p></div>+ <div class="concept-box"><h4>Recursive case</h4><p class="dim">Every other input — delegate to a smaller version of the same problem.</p><p class="pill-academic">e.g. <b>n × fact(n-1)</b></p></div>+ </div>+ </div>+ </section>++ <!-- 4. Example -->+ <section class="slide" data-title="Example">+ <aside class="sidebar">+ <div class="brand">CS 101 · M04</div>+ <h5>Learning objectives</h5>+ <ul class="obj-list">+ <li class="done">Define recursion</li>+ <li class="done">Identify a base case</li>+ <li class="current">Trace a recursive call</li>+ <li>Convert loop ↔ recursion</li>+ <li>Recognize when recursion helps</li>+ </ul>+ <h5>Try it yourself</h5>+ <p class="dim" style="font-size:13px">Open repl.it and run the code on the right. Then try <code>fact(10)</code>.</p>+ </aside>+ <div class="main">+ <p class="kicker">WORKED EXAMPLE</p>+ <h2 class="h2 mt-s">Factorial, 7 lines.</h2>+ <div class="code mt-m"><pre style="margin:0"><span class="cmt"># fact(n) = n × (n-1) × … × 1, and fact(0) = 1</span>+<span class="kw">def</span> fact(n):+ <span class="kw">if</span> n == <span class="str">0</span>: <span class="cmt"># base case</span>+ <span class="kw">return</span> <span class="str">1</span>+ <span class="kw">return</span> n * fact(n - <span class="str">1</span>) <span class="cmt"># recursive case</span>++<span class="kw">print</span>(fact(<span class="str">4</span>)) <span class="cmt"># → 24</span></pre></div>+ <div class="callout">+ <b>Trace fact(4).</b> 4 × fact(3) → 4 × (3 × fact(2)) → 4 × 3 × (2 × fact(1)) → 4 × 3 × 2 × 1 × fact(0) → 4 × 3 × 2 × 1 × 1 = <b>24</b>.+ </div>+ </div>+ </section>++ <!-- 5. Exercise -->+ <section class="slide" data-title="Exercise">+ <aside class="sidebar">+ <div class="brand">CS 101 · M04</div>+ <h5>Learning objectives</h5>+ <ul class="obj-list">+ <li class="done">Define recursion</li>+ <li class="done">Identify a base case</li>+ <li class="done">Trace a recursive call</li>+ <li class="current">Convert loop ↔ recursion</li>+ <li>Recognize when recursion helps</li>+ </ul>+ <h5>Time</h5>+ <p class="dim" style="font-size:13px">~10 minutes · solo</p>+ </aside>+ <div class="main">+ <p class="kicker">EXERCISE 4.1</p>+ <h2 class="h2 mt-s">Write <em>sum_to(n)</em>.</h2>+ <p class="lede mt-m">Return <code>1 + 2 + … + n</code> using recursion — no loops allowed.</p>+ <div class="exercise mt-l">+ <p style="margin:0;font-size:18px;color:var(--text-1)"><b>Your task</b></p>+ <ol style="color:var(--text-2);line-height:1.8;margin:10px 0 0">+ <li>Write the base case. What does <code>sum_to(0)</code> return?</li>+ <li>Write the recursive case in terms of <code>sum_to(n - 1)</code>.</li>+ <li>Test it: <code>sum_to(5) == 15</code>, <code>sum_to(10) == 55</code>.</li>+ <li>Bonus: what happens if you call <code>sum_to(-3)</code>? Fix it.</li>+ </ol>+ </div>+ <p class="dim mt-m" style="font-size:14px">Stuck? Remember: a base case is the smallest input you already know the answer to.</p>+ </div>+ </section>++ <!-- 6. Check understanding -->+ <section class="slide" data-title="Check">+ <aside class="sidebar">+ <div class="brand">CS 101 · M04</div>+ <h5>Learning objectives</h5>+ <ul class="obj-list">+ <li class="done">Define recursion</li>+ <li class="done">Identify a base case</li>+ <li class="done">Trace a recursive call</li>+ <li class="done">Convert loop ↔ recursion</li>+ <li class="current">Recognize when recursion helps</li>+ </ul>+ <h5>Self-assess</h5>+ <p class="dim" style="font-size:13px">You should get 3/3.</p>+ </aside>+ <div class="main">+ <p class="kicker">CHECK YOUR UNDERSTANDING</p>+ <h2 class="h2 mt-s">Which function will recurse forever?</h2>+ <div class="mt-l">+ <div class="mcq"><div class="letter">A</div><div><b>def f(n): return 1 if n == 0 else n * f(n - 1)</b><p class="dim" style="font-size:13px;margin:4px 0 0">Base case <code>n == 0</code>, shrinks toward it. Terminates.</p></div></div>+ <div class="mcq correct"><div class="letter">B</div><div><b>def f(n): return n + f(n + 1)</b><p class="dim" style="font-size:13px;margin:4px 0 0"><b style="color:var(--accent)">✓ Correct.</b> No base case, and <code>n</code> grows — infinite recursion.</p></div></div>+ <div class="mcq"><div class="letter">C</div><div><b>def f(n): return n if n < 2 else f(n - 1) + f(n - 2)</b><p class="dim" style="font-size:13px;margin:4px 0 0">Classic Fibonacci. Base case on <code>n < 2</code>. Terminates.</p></div></div>+ </div>+ </div>+ </section>++ <!-- 7. Summary -->+ <section class="slide full" data-title="Summary">+ <p class="kicker">SUMMARY · MODULE 04</p>+ <h1 class="h1 mt-s">You can now…</h1>+ <div class="grid g2 mt-l">+ <div class="concept-box"><h4>✓ Define recursion</h4><p class="dim">A function that calls itself on a smaller input.</p></div>+ <div class="concept-box"><h4>✓ Write a safe base case</h4><p class="dim">Every recursion needs an exit door.</p></div>+ <div class="concept-box"><h4>✓ Trace a call stack</h4><p class="dim">You can unwind <code>fact(4)</code> by hand.</p></div>+ <div class="concept-box"><h4>✓ Judge when to use it</h4><p class="dim">Trees and self-similar problems → recursion. Flat iteration → loop.</p></div>+ </div>+ <div class="callout mt-l">+ <b>Up next · Module 05.</b> Divide & conquer: merge sort. We'll use everything you just learned — but on lists, not numbers.+ </div>+ </section>++</div>++</body></html>diff --git a/src/lib/templates/skills/deck-dir-key-nav/SKILL.md b/src/lib/templates/skills/deck-dir-key-nav/SKILL.mdnew file mode 100644index 00000000..57b252c3--- /dev/null+++ b/src/lib/templates/skills/deck-dir-key-nav/SKILL.md@@ -0,0 +1,20 @@+---+name: deck-dir-key-nav+zh_name: "极简方向键 Keynote"+en_name: "Dir-Key Nav Minimal Deck"+emoji: "▶︎"+description: "8 页单色背景, 160px display + 4px accent + Mono 箭头列表"+category: slides+scenario: personal+aspect_hint: "16:9"+featured: 34+tags: ["minimal", "kbd", "monocolor"]+---++【模板: 极简方向键 Keynote】+【意图】“有话要说但没什么可看” 的极简 keynote。+【布局】+- 8 页单色背景 (靛 / 奶 / 绛 / 翠 / 灰 / 紫 / 白 / 炭)+- 160px display 标题 + 4px 短粗 accent 线+- 箭头 → 前缀的 Mono 列表+- 左下 ← → kbd 提示 + 右下页码diff --git a/src/lib/templates/skills/deck-dir-key-nav/example.html b/src/lib/templates/skills/deck-dir-key-nav/example.htmlnew file mode 100644index 00000000..5384acb7--- /dev/null+++ b/src/lib/templates/skills/deck-dir-key-nav/example.html@@ -0,0 +1,366 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Dir-Key Nav Minimal</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* dir-key-nav-minimal — 方向键极简 · 8 种 mono-background 切换 */+.tpl-dir-key-nav-minimal{+ --dk-font:'Inter','Noto Sans SC','PingFang SC',-apple-system,sans-serif;+ --dk-mono:'JetBrains Mono',monospace;+ background:#000;+ color:#fff;+ font-family:var(--dk-font);+}+.tpl-dir-key-nav-minimal .slide{padding:80px 104px;overflow:hidden;position:absolute;inset:0}+/* 8 background themes */+.tpl-dir-key-nav-minimal .t-indigo{background:linear-gradient(135deg,#0f172a 0%,#1e1b4b 100%);color:#fff}+.tpl-dir-key-nav-minimal .t-cream{background:#F5F0E8;color:#1a1a1a}+.tpl-dir-key-nav-minimal .t-crimson{background:linear-gradient(135deg,#7f1d1d 0%,#991b1b 100%);color:#fff}+.tpl-dir-key-nav-minimal .t-emerald{background:linear-gradient(135deg,#052e16 0%,#064e3b 100%);color:#ecfdf5}+.tpl-dir-key-nav-minimal .t-slate{background:linear-gradient(135deg,#0f1923 0%,#1a2942 100%);color:#e6edf3}+.tpl-dir-key-nav-minimal .t-violet{background:linear-gradient(135deg,#1e0a2e 0%,#2e1065 100%);color:#f5f3ff}+.tpl-dir-key-nav-minimal .t-white{background:#ffffff;color:#111216}+.tpl-dir-key-nav-minimal .t-charcoal{background:linear-gradient(135deg,#111827 0%,#1f2937 100%);color:#f3f4f6}++.tpl-dir-key-nav-minimal .dk-snum{position:absolute;top:30px;right:48px;font-size:11px;font-weight:700;letter-spacing:3px;text-transform:uppercase;font-family:var(--dk-mono)}+.tpl-dir-key-nav-minimal .t-cream .dk-snum,+.tpl-dir-key-nav-minimal .t-white .dk-snum{color:#999}+.tpl-dir-key-nav-minimal .t-indigo .dk-snum,+.tpl-dir-key-nav-minimal .t-crimson .dk-snum,+.tpl-dir-key-nav-minimal .t-emerald .dk-snum,+.tpl-dir-key-nav-minimal .t-slate .dk-snum,+.tpl-dir-key-nav-minimal .t-violet .dk-snum,+.tpl-dir-key-nav-minimal .t-charcoal .dk-snum{color:rgba(255,255,255,.38)}++.tpl-dir-key-nav-minimal .dk-eyebrow{font-size:12px;font-weight:700;letter-spacing:3.5px;text-transform:uppercase;opacity:.55;margin-bottom:22px;display:flex;align-items:center;gap:14px}+.tpl-dir-key-nav-minimal .dk-eyebrow::after{content:'';flex:1;max-width:120px;height:1px;background:currentColor;opacity:.3}+.tpl-dir-key-nav-minimal .dk-h0{font-size:160px;font-weight:900;line-height:.9;letter-spacing:-5px;margin:0 0 20px}+.tpl-dir-key-nav-minimal .dk-h1{font-size:100px;font-weight:900;line-height:.98;letter-spacing:-3px;margin:0 0 18px}+.tpl-dir-key-nav-minimal .dk-h2{font-size:72px;font-weight:800;line-height:1.05;letter-spacing:-2px;margin:0 0 16px}+.tpl-dir-key-nav-minimal .dk-lede{font-size:26px;line-height:1.45;opacity:.72;max-width:900px;font-weight:300}+.tpl-dir-key-nav-minimal .dk-lede strong{font-weight:700;opacity:1}+.tpl-dir-key-nav-minimal .dk-big{font-family:var(--dk-mono);font-size:240px;font-weight:800;line-height:.9;letter-spacing:-10px}++.tpl-dir-key-nav-minimal .dk-line{display:block;width:90px;height:4px;background:currentColor;margin:30px 0;opacity:.85}+.tpl-dir-key-nav-minimal .t-indigo .dk-accent{color:#a5b4fc}+.tpl-dir-key-nav-minimal .t-cream .dk-accent{color:#B5392A}+.tpl-dir-key-nav-minimal .t-crimson .dk-accent{color:#fecaca}+.tpl-dir-key-nav-minimal .t-emerald .dk-accent{color:#6ee7b7}+.tpl-dir-key-nav-minimal .t-slate .dk-accent{color:#7dd3fc}+.tpl-dir-key-nav-minimal .t-violet .dk-accent{color:#c4b5fd}+.tpl-dir-key-nav-minimal .t-white .dk-accent{color:#6366f1}+.tpl-dir-key-nav-minimal .t-charcoal .dk-accent{color:#fbbf24}++.tpl-dir-key-nav-minimal .dk-list{list-style:none;padding:0;margin:28px 0 0;font-family:var(--dk-mono);font-size:22px;line-height:2}+.tpl-dir-key-nav-minimal .dk-list li{padding-left:30px;position:relative;font-weight:400;opacity:.85}+.tpl-dir-key-nav-minimal .dk-list li::before{content:'→';position:absolute;left:0;opacity:.5}+.tpl-dir-key-nav-minimal .dk-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:56px;margin-top:36px}+.tpl-dir-key-nav-minimal .dk-col h3{font-size:28px;font-weight:700;margin-bottom:10px}+.tpl-dir-key-nav-minimal .dk-col p{font-size:19px;line-height:1.55;opacity:.72;font-weight:300}+.tpl-dir-key-nav-minimal .dk-code{font-family:var(--dk-mono);font-size:16px;line-height:1.9;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:24px 28px;margin-top:24px;white-space:pre}+.tpl-dir-key-nav-minimal .t-cream .dk-code,+.tpl-dir-key-nav-minimal .t-white .dk-code{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.1)}+.tpl-dir-key-nav-minimal .dk-keyhint{position:absolute;bottom:34px;left:104px;font-family:var(--dk-mono);font-size:12px;letter-spacing:2px;text-transform:uppercase;opacity:.45}+.tpl-dir-key-nav-minimal .dk-keyhint kbd{display:inline-block;padding:2px 10px;margin:0 3px;border:1px solid currentColor;border-radius:4px;font-size:12px}+.tpl-dir-key-nav-minimal .dk-page{position:absolute;bottom:34px;right:48px;font-family:var(--dk-mono);font-size:12px;letter-spacing:2px;opacity:.45}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-dir-key-nav-minimal">+<div class="deck">++ <!-- 1. COVER · indigo -->+ <section class="slide t-indigo is-active">+ <div class="dk-snum">01 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">Karpathy LLM Wiki</div>+ <h1 class="dk-h0">为什么笔记<br>治不了 <span class="dk-accent">LLM</span></h1>+ <span class="dk-line"></span>+ <p class="dk-lede">8 种背景、8 张幻灯,一个关于如何把 AI 变成「长期记忆外挂」的最短陈述。<strong>按 → 继续。</strong></p>+ </div>+ <div class="dk-keyhint">nav · <kbd>←</kbd> <kbd>→</kbd> · <kbd>space</kbd></div>+ <div class="dk-page">cover</div>+ </section>++ <!-- 2. SECTION · cream -->+ <section class="slide t-cream">+ <div class="dk-snum">02 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">Chapter 01</div>+ <h1 class="dk-h0">The <span class="dk-accent">Problem</span>.</h1>+ <span class="dk-line"></span>+ <p class="dk-lede">Token 上限是一个物理事实。你每次和 LLM 说话,它都是一个失忆症患者。</p>+ </div>+ <div class="dk-keyhint">chapter · 01 / 04</div>+ <div class="dk-page">section</div>+ </section>++ <!-- 3. CONTENT · crimson -->+ <section class="slide t-crimson">+ <div class="dk-snum">03 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">Symptoms</div>+ <h2 class="dk-h1">四种你已经<br>受够的<br><span class="dk-accent">遗忘</span>。</h2>+ <ul class="dk-list">+ <li>昨天聊过的项目,今天重新解释一遍</li>+ <li>上下文窗口一到,它开始「编造记忆」</li>+ <li>不同 session 之间毫无关联,就像第一次见</li>+ <li>你的真正偏好从未被记住,每次都要 re-prompt</li>+ </ul>+ </div>+ <div class="dk-keyhint">content · list</div>+ <div class="dk-page">03</div>+ </section>++ <!-- 4. CONTENT · emerald -->+ <section class="slide t-emerald">+ <div class="dk-snum">04 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">The Fix</div>+ <h2 class="dk-h1">答案不是<br><span class="dk-accent">更大</span> 的窗口。</h2>+ <p class="dk-lede" style="margin-top:10px">而是:把你的知识、偏好、历史都<strong>写进文件系统</strong>。<br>让 LLM 每次对话前,先去读那个系统。</p>+ <div class="dk-grid-2">+ <div class="dk-col"><h3>× 窗口 stuffing</h3><p>把所有东西塞 prompt,贵、慢、最终溢出。</p></div>+ <div class="dk-col"><h3>✓ 文件 + 检索</h3><p>按需加载,永远不溢出,结构化可 diff。</p></div>+ </div>+ </div>+ <div class="dk-keyhint">content · compare</div>+ <div class="dk-page">04</div>+ </section>++ <!-- 5. CODE · slate -->+ <section class="slide t-slate">+ <div class="dk-snum">05 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">Minimal Setup</div>+ <h2 class="dk-h2"><span class="dk-accent">4 行</span> YAML<br>就能开始。</h2>+ <pre class="dk-code">memory:+ root: ~/.llm-wiki+ format: markdown+ retrieval: hybrid # embedding + bm25</pre>+ <p class="dk-lede" style="margin-top:16px;font-size:20px">你现在拥有一个会随时间增长的 <strong>第二大脑</strong>。每次对话它都会被读、被更新。</p>+ </div>+ <div class="dk-keyhint">content · code</div>+ <div class="dk-page">05</div>+ </section>++ <!-- 6. CHART · violet — big number with bar -->+ <section class="slide t-violet">+ <div class="dk-snum">06 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">30-day result</div>+ <div class="dk-big dk-accent">87%</div>+ <p class="dk-lede" style="margin-top:14px;font-size:26px">的 re-explain 被消除。平均每次对话节省 <strong>4.2 分钟</strong> 的 re-context。</p>+ <svg viewBox="0 0 900 80" style="width:100%;max-width:900px;margin-top:30px">+ <rect x="0" y="30" width="900" height="22" rx="11" fill="rgba(255,255,255,.12)"/>+ <rect x="0" y="30" width="783" height="22" rx="11" fill="#c4b5fd"/>+ <text x="792" y="47" font-family="JetBrains Mono" font-size="16" fill="#c4b5fd" font-weight="700">87%</text>+ </svg>+ </div>+ <div class="dk-keyhint">chart · big-num</div>+ <div class="dk-page">06</div>+ </section>++ <!-- 7. CTA · white -->+ <section class="slide t-white">+ <div class="dk-snum">07 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">Start tonight</div>+ <h2 class="dk-h1">开始<br>你的 <span class="dk-accent">wiki</span>。</h2>+ <span class="dk-line"></span>+ <p class="dk-lede">不是装又一个插件。是决定:从今晚起,<strong>你的所有 AI 对话都要有一个共同的 vault</strong>。</p>+ <pre class="dk-code" style="font-size:18px">$ mkdir ~/llm-wiki && cd ~/llm-wiki+$ git init+$ echo "# my brain" > README.md</pre>+ </div>+ <div class="dk-keyhint">cta · three-commands</div>+ <div class="dk-page">07</div>+ </section>++ <!-- 8. THANKS · charcoal -->+ <section class="slide t-charcoal">+ <div class="dk-snum">08 / 08</div>+ <div style="margin:auto 0">+ <div class="dk-eyebrow">End · thanks for staying</div>+ <h1 class="dk-h0"><span class="dk-accent">謝謝</span>。</h1>+ <span class="dk-line"></span>+ <p class="dk-lede">Karpathy 的原始 thread + 我的 vault 结构都在 <strong>github.com/lewis/llm-wiki</strong>。欢迎按 ← 再看一遍。</p>+ </div>+ <div class="dk-keyhint">press <kbd>←</kbd> to rewind · <kbd>F</kbd> for fullscreen</div>+ <div class="dk-page">fin</div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-graphify-dark/SKILL.md b/src/lib/templates/skills/deck-graphify-dark/SKILL.mdnew file mode 100644index 00000000..6aeb015a--- /dev/null+++ b/src/lib/templates/skills/deck-graphify-dark/SKILL.md@@ -0,0 +1,20 @@+---+name: deck-graphify-dark+zh_name: "暗底图谱 Deck"+en_name: "Graphify Dark Deck"+emoji: "🌌"+description: "深夜渐变 + 漂浮 orbs + SVG 力导向图谱 + JetBrains Mono"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 28+tags: ["graph", "dev tool", "ai", "cli"]+---++【模板: Graphify Dark Graph Deck】+【意图】AI-native / 知识图谱 / dev-tool launch deck。+【布局】+- Cover: #06060c→#0e1020 渐变 + 浮动 blur orbs + SVG 力导向 graph+- Section 页: 彩虹渐变标题+- 代码 / CLI 页: JetBrains Mono 高亮+- Glassmorphism 卡片页diff --git a/src/lib/templates/skills/deck-graphify-dark/example.html b/src/lib/templates/skills/deck-graphify-dark/example.htmlnew file mode 100644index 00000000..3a134d2f--- /dev/null+++ b/src/lib/templates/skills/deck-graphify-dark/example.html@@ -0,0 +1,402 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Graphify Dark Graph</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* graphify-dark-graph — 暗底玻璃 + 力导向知识图谱 */+.tpl-graphify-dark-graph{+ --gd-bg:#06060c;+ --gd-bg2:#0e1020;+ --gd-text:#f0ece4;+ --gd-text2:#b0a99e;+ --gd-text3:#7a746c;+ --gd-warm:#e8a87c;+ --gd-blue:#7eb8da;+ --gd-green:#7ed3a4;+ --gd-rose:#d4a0b9;+ --gd-purple:#b8a4d6;+ --gd-danger:#e07070;+ background:var(--gd-bg);+ color:var(--gd-text);+ font-family:'Inter','Noto Sans SC',-apple-system,sans-serif;+ letter-spacing:-.01em;+}+.tpl-graphify-dark-graph .slide{background:linear-gradient(160deg,#08080f,#0e1020 50%,#08080f);color:var(--gd-text);padding:64px 88px;overflow:hidden}+.tpl-graphify-dark-graph .gd-ambient{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}+.tpl-graphify-dark-graph .gd-orb{position:absolute;border-radius:50%;filter:blur(110px);opacity:.35;animation:gdDrift 22s ease-in-out infinite alternate}+.tpl-graphify-dark-graph .gd-orb-1{width:520px;height:520px;background:radial-gradient(circle,rgba(126,184,218,.55),transparent 70%);top:-12%;left:-6%}+.tpl-graphify-dark-graph .gd-orb-2{width:460px;height:460px;background:radial-gradient(circle,rgba(232,168,124,.45),transparent 70%);top:55%;right:-8%;animation-delay:-6s}+.tpl-graphify-dark-graph .gd-orb-3{width:420px;height:420px;background:radial-gradient(circle,rgba(184,164,214,.4),transparent 70%);bottom:-8%;left:30%;animation-delay:-11s}+@keyframes gdDrift{0%{transform:translate(0,0) scale(1)}100%{transform:translate(25px,-20px) scale(1.08)}}+.tpl-graphify-dark-graph .slide > *{position:relative;z-index:2}+.tpl-graphify-dark-graph .gd-snum{position:absolute;top:28px;right:40px;font-size:12px;letter-spacing:.25em;color:var(--gd-text3);z-index:3}+.tpl-graphify-dark-graph .gd-eyebrow{font-size:13px;letter-spacing:.2em;text-transform:uppercase;color:var(--gd-text3);font-weight:500}+.tpl-graphify-dark-graph .gd-h1{font-size:74px;font-weight:800;line-height:1.08;letter-spacing:-.02em;margin:16px 0 10px;color:var(--gd-text)}+.tpl-graphify-dark-graph .gd-h2{font-size:52px;font-weight:700;line-height:1.12;margin:0 0 14px}+.tpl-graphify-dark-graph .gd-lede{font-size:22px;line-height:1.65;font-weight:300;color:var(--gd-text2);max-width:850px}+.tpl-graphify-dark-graph .gd-rainbow{background:linear-gradient(90deg,#ff0080,#ff4d00,#ff9900,#ffe600,#00c853,#0091ea,#6200ea,#ff0080);background-size:200% auto;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:gdRainbow 4s linear infinite}+@keyframes gdRainbow{0%{background-position:0% center}100%{background-position:200% center}}+.tpl-graphify-dark-graph .gd-grad{background:linear-gradient(135deg,var(--gd-warm),var(--gd-rose),var(--gd-purple));-webkit-background-clip:text;-webkit-text-fill-color:transparent}+.tpl-graphify-dark-graph .gd-accent{color:var(--gd-warm);font-weight:500}+.tpl-graphify-dark-graph .gd-green{color:var(--gd-green)}+.tpl-graphify-dark-graph .gd-blue{color:var(--gd-blue)}+.tpl-graphify-dark-graph .gd-dim{color:var(--gd-text2)}+.tpl-graphify-dark-graph .gd-mono{font-family:'JetBrains Mono',monospace}+.tpl-graphify-dark-graph .gd-glass{position:relative;overflow:hidden;border-radius:20px;padding:22px 26px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.1);backdrop-filter:blur(20px) saturate(160%);box-shadow:0 8px 32px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.08)}+.tpl-graphify-dark-graph .gd-glass::before{content:'';position:absolute;top:0;left:0;right:0;height:50%;background:linear-gradient(180deg,rgba(255,255,255,.05),transparent);pointer-events:none}+.tpl-graphify-dark-graph .gd-glass-warm{background:rgba(232,168,124,.06);border-color:rgba(232,168,124,.2)}+.tpl-graphify-dark-graph .gd-glass-green{background:rgba(126,211,164,.06);border-color:rgba(126,211,164,.2)}+.tpl-graphify-dark-graph .gd-glass-blue{background:rgba(126,184,218,.06);border-color:rgba(126,184,218,.2)}+.tpl-graphify-dark-graph .gd-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:24px}+.tpl-graphify-dark-graph .gd-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:24px}+.tpl-graphify-dark-graph .gd-tag{display:inline-block;border-radius:999px;padding:5px 14px;font-size:12px;font-weight:500;margin:2px 4px 2px 0;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);color:var(--gd-text2)}+.tpl-graphify-dark-graph .gd-cmd{font-family:'JetBrains Mono',monospace;font-size:32px;font-weight:700;color:var(--gd-green);text-shadow:0 0 30px rgba(126,211,164,.45),0 0 60px rgba(126,211,164,.15);letter-spacing:-.01em}+.tpl-graphify-dark-graph .gd-big{font-size:120px;font-weight:900;letter-spacing:-.04em;line-height:1}+.tpl-graphify-dark-graph .gd-codebox{background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:22px 26px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.8;color:#d8d4c8}+.tpl-graphify-dark-graph .gd-codebox .cm{color:#6b6a62}+.tpl-graphify-dark-graph .gd-codebox .kw{color:var(--gd-warm)}+.tpl-graphify-dark-graph .gd-codebox .st{color:var(--gd-green)}+.tpl-graphify-dark-graph .gd-codebox .fn{color:var(--gd-blue)}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-graphify-dark-graph">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="gd-ambient"><div class="gd-orb gd-orb-1"></div><div class="gd-orb gd-orb-2"></div><div class="gd-orb gd-orb-3"></div></div>+ <!-- live force-directed graph bg -->+ <svg viewBox="0 0 1600 900" style="position:absolute;inset:0;width:100%;height:100%;opacity:.38;z-index:1" xmlns="http://www.w3.org/2000/svg">+ <g stroke="#7eb8da" stroke-width="1" stroke-opacity=".5" fill="none">+ <line x1="300" y1="200" x2="520" y2="340"/>+ <line x1="520" y1="340" x2="780" y2="260"/>+ <line x1="780" y1="260" x2="1040" y2="420"/>+ <line x1="520" y1="340" x2="640" y2="560"/>+ <line x1="640" y1="560" x2="900" y2="620"/>+ <line x1="900" y1="620" x2="1040" y2="420"/>+ <line x1="1040" y1="420" x2="1260" y2="300"/>+ <line x1="1260" y1="300" x2="1380" y2="500"/>+ <line x1="900" y1="620" x2="1120" y2="720"/>+ <line x1="300" y1="200" x2="200" y2="420"/>+ <line x1="200" y1="420" x2="360" y2="640"/>+ <line x1="360" y1="640" x2="640" y2="560"/>+ </g>+ <g>+ <circle cx="300" cy="200" r="10" fill="#e8a87c"/>+ <circle cx="520" cy="340" r="14" fill="#7eb8da"/>+ <circle cx="780" cy="260" r="9" fill="#7ed3a4"/>+ <circle cx="1040" cy="420" r="18" fill="#b8a4d6"/>+ <circle cx="640" cy="560" r="11" fill="#d4a0b9"/>+ <circle cx="900" cy="620" r="12" fill="#e8a87c"/>+ <circle cx="1260" cy="300" r="8" fill="#7ed3a4"/>+ <circle cx="1380" cy="500" r="10" fill="#7eb8da"/>+ <circle cx="1120" cy="720" r="9" fill="#d4a0b9"/>+ <circle cx="200" cy="420" r="8" fill="#b8a4d6"/>+ <circle cx="360" cy="640" r="11" fill="#7eb8da"/>+ </g>+ </svg>+ <div class="gd-snum">01 / 08</div>+ <div style="margin-top:auto">+ <p class="gd-eyebrow">Tech Sharing · 纯干货</p>+ <h1 class="gd-h1" style="font-size:88px"><span class="gd-rainbow">手把手用 Graphify<br>搭建个人知识图谱</span></h1>+ <p class="gd-lede" style="margin-top:20px">一行命令 · 全多模态 · 诚实审计 —— <span class="gd-accent">把任何文件夹变成可导航的知识网络。</span></p>+ <p class="gd-eyebrow" style="margin-top:26px">↑ 背景就是 Graphify 真实跑出来的知识图谱</p>+ </div>+ </section>++ <!-- 2. SECTION DIVIDER -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-1"></div><div class="gd-orb gd-orb-2"></div></div>+ <div class="gd-snum">02 / 08</div>+ <div style="margin:auto 0">+ <div class="gd-eyebrow">Part 01</div>+ <h1 class="gd-h1" style="font-size:120px">Why <span class="gd-grad">Graph</span>?</h1>+ <p class="gd-lede">folder → tree → graph,人类认知的下一步</p>+ </div>+ </section>++ <!-- 3. CONTENT — plugin grid -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-2"></div><div class="gd-orb gd-orb-3"></div></div>+ <div class="gd-snum">03 / 08</div>+ <p class="gd-eyebrow">Feature Map</p>+ <h2 class="gd-h2">一个工具,<span class="gd-grad">四件事</span></h2>+ <div class="gd-grid-4">+ <div class="gd-glass gd-glass-warm"><div style="font-size:30px">📂</div><h4 style="margin:10px 0 6px">Folder Ingest</h4><p class="gd-dim" style="font-size:13px;line-height:1.55">递归扫描任意路径,支持 md / pdf / 代码 / 图片</p></div>+ <div class="gd-glass gd-glass-blue"><div style="font-size:30px">🧠</div><h4 style="margin:10px 0 6px">Entity Extract</h4><p class="gd-dim" style="font-size:13px;line-height:1.55">用 LLM 抽概念、人物、事件、关系</p></div>+ <div class="gd-glass gd-glass-green"><div style="font-size:30px">🕸️</div><h4 style="margin:10px 0 6px">Force Graph</h4><p class="gd-dim" style="font-size:13px;line-height:1.55">D3 力导向,点击即跳转原文</p></div>+ <div class="gd-glass"><div style="font-size:30px">🔍</div><h4 style="margin:10px 0 6px">Audit Trail</h4><p class="gd-dim" style="font-size:13px;line-height:1.55">每条边都能追溯到 source span</p></div>+ </div>+ <div class="gd-glass gd-glass-warm" style="margin-top:24px"><p style="font-size:18px;line-height:1.6">它不是「又一个 RAG」—— 它是 <span class="gd-accent">把检索结果画出来,让你一眼就知道信息长什么样</span>。</p></div>+ </section>++ <!-- 4. CODE -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-1"></div></div>+ <div class="gd-snum">04 / 08</div>+ <p class="gd-eyebrow">One command</p>+ <h2 class="gd-h2">从 0 到图谱,<span class="gd-grad">大概 90 秒</span></h2>+ <p class="gd-cmd" style="margin:16px 0 22px">$ graphify ~/notes --out ./graph</p>+ <pre class="gd-codebox"><span class="cm"># graphify.config.yaml</span>+<span class="kw">ingest</span>:+ paths: [<span class="st">~/notes</span>, <span class="st">~/code/docs</span>]+ include: [<span class="st">"*.md"</span>, <span class="st">"*.pdf"</span>, <span class="st">"*.py"</span>]++<span class="kw">extract</span>:+ model: <span class="st">claude-opus-4-6</span>+ schema: [<span class="st">concept</span>, <span class="st">person</span>, <span class="st">event</span>, <span class="st">relation</span>]++<span class="kw">render</span>:+ engine: <span class="st">d3-force</span>+ audit: <span class="fn">true</span> <span class="cm"># 每条边带 source span</span></pre>+ </section>++ <!-- 5. CHART — race diagram -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-3"></div></div>+ <div class="gd-snum">05 / 08</div>+ <p class="gd-eyebrow">Efficiency Race</p>+ <h2 class="gd-h2">没有知识库 vs 有知识库</h2>+ <div style="max-width:900px;margin-top:30px">+ <div style="display:flex;align-items:center;gap:16px;margin-bottom:20px">+ <div style="width:110px;text-align:right;font-weight:700;color:var(--gd-danger)">没有<br>知识库</div>+ <div style="flex:1;position:relative;height:70px;background:rgba(224,112,112,.06);border:1px solid rgba(224,112,112,.2);border-radius:16px">+ <div style="position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:32px">🛵</div>+ <div style="position:absolute;left:72px;top:50%;transform:translateY(-50%);color:var(--gd-danger);font-size:14px">反复喂信息…整理…又忘了…</div>+ </div>+ </div>+ <div style="display:flex;align-items:center;gap:16px">+ <div style="width:110px;text-align:right;font-weight:700;color:var(--gd-green)">有<br>知识库</div>+ <div style="flex:1;position:relative;height:70px;background:rgba(126,211,164,.06);border:1px solid rgba(126,211,164,.25);border-radius:16px">+ <div style="position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:32px">🏎️</div>+ <div style="position:absolute;right:72px;top:50%;transform:translateY(-50%);color:var(--gd-green);font-size:14px">AI 自己找 → 确认 → 干活!</div>+ </div>+ </div>+ </div>+ <div class="gd-grid-3" style="margin-top:36px">+ <div class="gd-glass gd-glass-warm"><div class="gd-big gd-grad">5×</div><p class="gd-dim" style="margin-top:6px">速度提升</p></div>+ <div class="gd-glass gd-glass-green"><div class="gd-big gd-grad">-80%</div><p class="gd-dim" style="margin-top:6px">重复喂信息</p></div>+ <div class="gd-glass gd-glass-blue"><div class="gd-big gd-grad">∞</div><p class="gd-dim" style="margin-top:6px">记忆持久化</p></div>+ </div>+ </section>++ <!-- 6. PIPELINE -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-2"></div></div>+ <div class="gd-snum">06 / 08</div>+ <p class="gd-eyebrow">Pipeline</p>+ <h2 class="gd-h2">端到端 <span class="gd-grad">4 步走</span></h2>+ <div style="display:flex;align-items:center;justify-content:center;gap:8px;margin-top:36px">+ <div class="gd-glass" style="flex:1;text-align:center"><div style="font-size:34px">📂</div><div style="font-weight:600;margin-top:8px">Scan</div><div class="gd-dim" style="font-size:13px">递归读文件</div></div>+ <div style="color:var(--gd-text3);font-size:24px">→</div>+ <div class="gd-glass gd-glass-blue" style="flex:1;text-align:center"><div style="font-size:34px">🔬</div><div style="font-weight:600;margin-top:8px">Extract</div><div class="gd-dim" style="font-size:13px">LLM 抽实体</div></div>+ <div style="color:var(--gd-text3);font-size:24px">→</div>+ <div class="gd-glass gd-glass-green" style="flex:1;text-align:center"><div style="font-size:34px">🕸️</div><div style="font-weight:600;margin-top:8px">Build</div><div class="gd-dim" style="font-size:13px">构图 + 去重</div></div>+ <div style="color:var(--gd-text3);font-size:24px">→</div>+ <div class="gd-glass gd-glass-warm" style="flex:1;text-align:center"><div style="font-size:34px">🎨</div><div style="font-weight:600;margin-top:8px">Render</div><div class="gd-dim" style="font-size:13px">D3 交互图</div></div>+ </div>+ <div class="gd-glass" style="margin-top:32px"><p style="font-size:16px;line-height:1.6;color:var(--gd-text2)">每一步都有 audit log:你永远知道某个节点为什么存在、它来自哪个文件的哪一行。</p></div>+ </section>++ <!-- 7. CTA -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-1"></div><div class="gd-orb gd-orb-3"></div></div>+ <div class="gd-snum">07 / 08</div>+ <p class="gd-eyebrow">Try it tonight</p>+ <h2 class="gd-h1" style="font-size:80px">Graphify <span class="gd-grad">your folders</span></h2>+ <p class="gd-cmd" style="margin-top:22px">$ npm i -g @lewis/graphify</p>+ <p class="gd-cmd" style="margin-top:10px;color:var(--gd-warm);text-shadow:0 0 30px rgba(232,168,124,.45)">$ graphify ~/obsidian-vault</p>+ <div style="margin-top:32px">+ <span class="gd-tag">#knowledge-graph</span>+ <span class="gd-tag">#open-source</span>+ <span class="gd-tag">#claude-agent</span>+ <span class="gd-tag">#obsidian</span>+ <span class="gd-tag">#d3-force</span>+ </div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="gd-ambient"><div class="gd-orb gd-orb-2"></div></div>+ <div class="gd-snum">08 / 08</div>+ <div style="margin:auto 0;text-align:center">+ <div class="gd-big gd-rainbow" style="font-size:180px">Thanks.</div>+ <p class="gd-lede" style="margin:28px auto 0">github.com/lewis/graphify · 欢迎 star / issue / PR</p>+ </div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-guizang-editorial/SKILL.md b/src/lib/templates/skills/deck-guizang-editorial/SKILL.mdnew file mode 100644index 00000000..8f585862--- /dev/null+++ b/src/lib/templates/skills/deck-guizang-editorial/SKILL.md@@ -0,0 +1,49 @@+---+name: deck-guizang-editorial+zh_name: "贵赞编辑墨水 Deck"+en_name: "Guizang Editorial E-Ink Deck"+emoji: "🖋️"+description: "电子杂志 × 电子墨水; 10 个版面 + 5 套调色板 (墨水/靛蓝瓷/森林墨/牛皮纸/沙丘)"+category: slides+scenario: marketing+aspect_hint: "16:9 横向翻页"+featured: 49+recommended: 1+tags: ["editorial", "e-ink", "magazine", "narrative", "guizang"]+example_id: sample-guizang-editorial+example_name: "贵赞编辑墨水 · 章节封页"+example_format: markdown+example_tagline: "墨水经典调色板 + 衬线 display"+example_desc: "L02 Act Divider 章节封页 + L03 Big Numbers Grid 数据格, 纸感印刷"+example_source_url: "https://github.com/op7418/guizang-ppt-skill"+example_source_label: "op7418/guizang-ppt-skill"+---++【模板: 贵赞编辑墨水 Deck (Editorial × E-Ink)】+【意图】叙事、观点、分享、个人风格表达。墨纸印刷感, 不要科技感。Inspired by op7418/guizang-ppt-skill Style A。++【调色板 — 5 选 1, 严禁改 hex、严禁混用】+- 🖋 **墨水经典 Monocle** — ink `#0a0a0b`, paper `#f1efea`, paper-tint `#e8e5de`, ink-tint `#18181a`. 默认 / 通用商业 / 科技。+- 🌊 **靛蓝瓷 Indigo Porcelain** — ink `#0a1f3d`, paper `#f1f3f5`, paper-tint `#e4e8ec`, ink-tint `#152a4a`. 科技 / 研究 / 数据。+- 🌿 **森林墨 Forest Ink** — ink `#1a2e1f`, paper `#f5f1e8`, paper-tint `#ece7da`, ink-tint `#253d2c`. 自然 / 可持续 / 文化。+- 🍂 **牛皮纸 Kraft Paper** — ink `#2a1e13`, paper `#eedfc7`, paper-tint `#e0d0b6`, ink-tint `#3a2a1d`. 怀旧 / 人文 / 文学。+- 🌙 **沙丘 Dune** — ink `#1f1a14`, paper `#f0e6d2`, paper-tint `#e3d7bf`, ink-tint `#2d2620`. 艺术 / 设计 / 时尚。++【布局 — 10 个磁带式版面, 按 6-12 张组成 deck】+- **L01 Hero Cover** — 居中大字 hero typography + kicker + subtitle + lead paragraph + 底部元数据 row。+- **L02 Act Divider** — kicker + 8.5-10vw 巨大 headline + 一句引言; 章节切换可反色 (ink ↔ paper)。+- **L03 Big Numbers Grid** — 3×2 数据卡 (label / 大数字 / 注释)。+- **L04 Quote + Image** — 左 kicker + headline + body + callout; 右 16:10 图 (基线对齐 baseline 不是 top)。+- **L05 Image Grid** — 3×2 或 3×1 等高图网格 (26vh 或 22vh); 严格统一高度。+- **L06 Pipeline / Flow** — 横向编号步骤组, 每步: №X + 标题 + 描述; 支持键盘逐步推进。+- **L07 Hero Question** — 7vw 全屏单一问句, 按语义断行, 周围极简。+- **L08 Big Quote** — 5.8vw 巨大衬线引文 + 英文翻译 + 署名 + 日期。+- **L09 Before / After** — 1:1 split; 左列 opacity .55 (旧/before); 右列 full brightness (新/after)。+- **L10 Mixed Media** — 8:4 比例; 左大段文字 (kicker / headline / body / callout) + 右 3:4 竖图作辅助。++【设计细节】+- **严禁**: 渐变 / drop-shadow / 圆角 / 圆形装饰 / blur / SVG 图标库 / emoji 装饰。+- **字体**: Display 用 `Playfair Display` (英) / `Noto Serif SC` (中); Body 用 `Inter` / `Noto Sans SC`; 编号 / 数字偶尔可用 italic 衬线。+- **杂志感细节**: kicker 用 11px uppercase letterspacing 0.12em; folio 右下角 `01 / 12`; 顶部细 hairline rule + 期刊 logo / topic。+- **不许**: 数据捏造、Lorem ipsum、占位图片 URL。所有图请用纯 CSS / SVG 内联描绘 (色块 + 简笔)。+- 键盘 ← / → 切换; hash 同步; 单文件 HTML。diff --git a/src/lib/templates/skills/deck-guizang-editorial/example.html b/src/lib/templates/skills/deck-guizang-editorial/example.htmlnew file mode 100644index 00000000..cebe6c1d--- /dev/null+++ b/src/lib/templates/skills/deck-guizang-editorial/example.html@@ -0,0 +1,92 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>贵赞编辑墨水 · 章节封页</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400&family=Inter:wght@400;500;600&family=Noto+Serif+SC:wght@400;500;700&family=Noto+Sans+SC:wght@400;500&display=swap" rel="stylesheet" />+<style>+ body { font-family: 'Inter','Noto Sans SC',system-ui,sans-serif; background:#0a0a0b; margin:0; }+ .deck { display:grid; gap:24px; padding:24px; }+ .slide { width:100%; aspect-ratio:16/9; max-width:1280px; margin:0 auto; position:relative; overflow:hidden; }+ .paper { background:#f1efea; color:#0a0a0b; }+ .ink { background:#0a0a0b; color:#f1efea; }+ .display { font-family:'Playfair Display','Noto Serif SC',serif; }+ .body-serif { font-family:'Playfair Display','Noto Serif SC',serif; font-style:italic; }+ .kicker { font-size:11px; letter-spacing:0.12em; text-transform:uppercase; font-weight:500; }+ .hairline { border:0; border-top:1px solid currentColor; opacity:0.3; }+ .folio { font-feature-settings:'tnum'; font-variant-numeric:tabular-nums; }+</style>+</head>+<body>+<div class="deck">++ <!-- L02 Act Divider · ink reverse -->+ <section class="slide ink">+ <div class="absolute inset-0 p-12 flex flex-col justify-between">+ <header class="flex items-baseline justify-between kicker opacity-70">+ <span>OPEN DESIGN — Issue №26</span>+ <span>Act II</span>+ <span class="folio">04 / 12</span>+ </header>+ <div>+ <div class="kicker opacity-80">第二章</div>+ <h1 class="display mt-4 leading-[0.95]" style="font-size:clamp(64px,9vw,160px); font-weight:500;">+ 为什么<br/>+ <span class="body-serif">写作者</span>该写 HTML<br/>+ 而不是 Markdown。+ </h1>+ </div>+ <footer class="flex items-baseline justify-between kicker opacity-60">+ <span>BY Open Design · 2026 SPRING</span>+ <span class="body-serif normal-case tracking-normal">A magazine for editorial agents.</span>+ </footer>+ </div>+ </section>++ <!-- L03 Big Numbers Grid · paper -->+ <section class="slide paper">+ <div class="absolute inset-0 p-12 flex flex-col justify-between">+ <header class="flex items-baseline justify-between kicker" style="color:#3a382f">+ <span>OPEN DESIGN — Issue №26</span>+ <span>Numbers</span>+ <span class="folio">05 / 12</span>+ </header>+ <div>+ <div class="kicker" style="color:#6b665b">By the numbers</div>+ <h2 class="display mt-2 leading-[1.0]" style="font-size:clamp(36px,5vw,72px); font-weight:500;">+ 四个数字, <span class="body-serif">一条线</span> —— HTML 已经赢了。+ </h2>+ </div>+ <div class="grid grid-cols-4 gap-8 mt-4">+ <article class="border-t pt-4" style="border-color:#0a0a0b">+ <div class="kicker" style="color:#6b665b">现有模板</div>+ <div class="display mt-2" style="font-size:84px; font-weight:500; line-height:1;">75</div>+ <p class="mt-3 text-[13px] leading-snug" style="color:#3a382f"><span class="body-serif">+16</span> in this release; cover slides, docs, frames.</p>+ </article>+ <article class="border-t pt-4" style="border-color:#0a0a0b">+ <div class="kicker" style="color:#6b665b">本地 Agent</div>+ <div class="display mt-2" style="font-size:84px; font-weight:500; line-height:1;">17</div>+ <p class="mt-3 text-[13px] leading-snug" style="color:#3a382f">Claude · Codex · Cursor · Gemini · Copilot, all <span class="body-serif">stdin</span>.</p>+ </article>+ <article class="border-t pt-4" style="border-color:#0a0a0b">+ <div class="kicker" style="color:#6b665b">平均生成</div>+ <div class="display mt-2" style="font-size:84px; font-weight:500; line-height:1;">80<span class="body-serif text-[40px]">s</span></div>+ <p class="mt-3 text-[13px] leading-snug" style="color:#3a382f">一份杂志风 PPT, <span class="body-serif">31KB</span> 自包含 HTML.</p>+ </article>+ <article class="border-t pt-4" style="border-color:#0a0a0b">+ <div class="kicker" style="color:#6b665b">API Keys</div>+ <div class="display mt-2" style="font-size:84px; font-weight:500; line-height:1;">0</div>+ <p class="mt-3 text-[13px] leading-snug" style="color:#3a382f">复用你 <span class="body-serif">已经登录</span>的 CLI session.</p>+ </article>+ </div>+ <footer class="flex items-baseline justify-between kicker opacity-70" style="color:#3a382f">+ <span>Source: HTML-Anything internal · 2026-05</span>+ <span class="body-serif normal-case tracking-normal">Set in Playfair & Inter.</span>+ </footer>+ </div>+ </section>++</div>+</body>+</html>diff --git a/src/lib/templates/skills/deck-guizang-editorial/example.md b/src/lib/templates/skills/deck-guizang-editorial/example.mdnew file mode 100644index 00000000..06b09c9c--- /dev/null+++ b/src/lib/templates/skills/deck-guizang-editorial/example.md@@ -0,0 +1,12 @@+# 关于「HTML 取代 Markdown」++> 墨水经典调色板, 双页预览: L02 章节封页 + L03 Big Numbers++## 主题+Claude Code 团队全面转向 HTML — 我们为什么也该跟上。++## 关键数据+- 75: HTML Anything 现有模板数+- 17: 已接入的本地 AI agent+- 80s: 平均一次"杂志风网页 PPT"生成耗时+- 0: 用户需要的 API key 数量diff --git a/src/lib/templates/skills/deck-hermes-cyber/SKILL.md b/src/lib/templates/skills/deck-hermes-cyber/SKILL.mdnew file mode 100644index 00000000..40ff9438--- /dev/null+++ b/src/lib/templates/skills/deck-hermes-cyber/SKILL.md@@ -0,0 +1,21 @@+---+name: deck-hermes-cyber+zh_name: "Cyber Terminal Deck"+en_name: "Hermes Cyber Terminal Deck"+emoji: "🟢"+description: "黑底 + CRT 网格扫描线 + $ 命令行标题 + 薄荷绿大字 + 三档 tag"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 30+tags: ["cyber", "terminal", "review", "cli"]+---++【模板: Hermes Cyber Terminal Deck】+【意图】CLI / agent / dev tool 测评 deck (含 trace, diff, benchmark)。+【布局】+- #0a0c10 黑底 + 56px 赛博网格 + CRT 暗角+- 窗口红绿灯 chrome + `$ prompt` 标题+- 薄荷绿 #7ed3a4 大字 + JetBrains Mono+- Stroke-only 柱状图 + blinking 光标+- 琥珀 / 绿 / 红 三档 tagdiff --git a/src/lib/templates/skills/deck-hermes-cyber/example.html b/src/lib/templates/skills/deck-hermes-cyber/example.htmlnew file mode 100644index 00000000..0f304747--- /dev/null+++ b/src/lib/templates/skills/deck-hermes-cyber/example.html@@ -0,0 +1,422 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Hermes Cyber Terminal</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* hermes-cyber-terminal — 暗终端 + 霓虹绿青 + 扫描线 */+.tpl-hermes-cyber-terminal{+ --hc-bg:#0a0c10;+ --hc-bg2:#15151b;+ --hc-surface:#12141a;+ --hc-border:rgba(126,211,164,.18);+ --hc-ink:#e4e2d8;+ --hc-ink2:#8a8892;+ --hc-green:#7ed3a4;+ --hc-cyan:#64dfdf;+ --hc-amber:#e9c58a;+ --hc-rose:#d4a0b9;+ --hc-red:#ff6b6b;+ background:var(--hc-bg);+ color:var(--hc-ink);+ font-family:'JetBrains Mono','SF Mono','Inter','Noto Sans SC',monospace;+}+.tpl-hermes-cyber-terminal .slide{background:var(--hc-bg);color:var(--hc-ink);padding:60px 84px;overflow:hidden}+.tpl-hermes-cyber-terminal .hc-scanlines{position:absolute;inset:0;pointer-events:none;z-index:3;background:repeating-linear-gradient(180deg,transparent 0,transparent 3px,rgba(126,211,164,.025) 3px,rgba(126,211,164,.025) 4px);mix-blend-mode:screen}+.tpl-hermes-cyber-terminal .hc-grid{position:absolute;inset:0;pointer-events:none;opacity:.35;background-image:linear-gradient(rgba(126,211,164,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(126,211,164,.08) 1px,transparent 1px);background-size:56px 56px;mask-image:radial-gradient(ellipse at 50% 50%,black 30%,transparent 80%)}+.tpl-hermes-cyber-terminal .hc-vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,transparent 50%,rgba(0,0,0,.6) 100%)}+.tpl-hermes-cyber-terminal .slide > *{position:relative;z-index:2}+.tpl-hermes-cyber-terminal .hc-chrome{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;font-size:11px;color:var(--hc-ink2);letter-spacing:.18em;text-transform:uppercase}+.tpl-hermes-cyber-terminal .hc-chrome .dots{display:flex;gap:8px}+.tpl-hermes-cyber-terminal .hc-chrome .dots span{width:11px;height:11px;border-radius:50%;background:#2a2d33}+.tpl-hermes-cyber-terminal .hc-chrome .dots span:nth-child(1){background:#ff5f57}+.tpl-hermes-cyber-terminal .hc-chrome .dots span:nth-child(2){background:#febc2e}+.tpl-hermes-cyber-terminal .hc-chrome .dots span:nth-child(3){background:var(--hc-green)}+.tpl-hermes-cyber-terminal .hc-prompt{color:var(--hc-green);font-weight:500}+.tpl-hermes-cyber-terminal .hc-prompt::before{content:'$ ';color:var(--hc-cyan)}+.tpl-hermes-cyber-terminal .hc-h1{font-family:'JetBrains Mono',monospace;font-size:72px;font-weight:700;line-height:1.05;letter-spacing:-.02em;color:var(--hc-green);text-shadow:0 0 30px rgba(126,211,164,.35),0 0 60px rgba(126,211,164,.1);margin:14px 0 12px}+.tpl-hermes-cyber-terminal .hc-h2{font-size:46px;font-weight:600;color:var(--hc-ink);margin:0 0 10px;letter-spacing:-.015em}+.tpl-hermes-cyber-terminal .hc-h3{font-size:22px;font-weight:600;color:var(--hc-amber);margin:0 0 10px}+.tpl-hermes-cyber-terminal .hc-lede{font-size:18px;line-height:1.7;color:var(--hc-ink2);max-width:780px;font-family:'Inter','Noto Sans SC',sans-serif}+.tpl-hermes-cyber-terminal .hc-cursor{display:inline-block;width:12px;height:1em;background:var(--hc-green);vertical-align:middle;margin-left:6px;animation:hcBlink 1s steps(2) infinite}+@keyframes hcBlink{50%{opacity:0}}+.tpl-hermes-cyber-terminal .hc-card{background:var(--hc-surface);border:1px solid var(--hc-border);border-radius:10px;padding:20px 24px;position:relative}+.tpl-hermes-cyber-terminal .hc-card::before{content:'';position:absolute;top:-1px;left:12px;right:12px;height:2px;background:linear-gradient(90deg,transparent,var(--hc-green),transparent)}+.tpl-hermes-cyber-terminal .hc-card .lbl{font-size:10px;letter-spacing:.22em;text-transform:uppercase;color:var(--hc-ink2);margin-bottom:8px}+.tpl-hermes-cyber-terminal .hc-card .val{font-size:22px;font-weight:700;color:var(--hc-green);font-family:'JetBrains Mono',monospace}+.tpl-hermes-cyber-terminal .hc-card .desc{font-size:13px;color:var(--hc-ink2);margin-top:10px;line-height:1.55;font-family:'Inter',sans-serif}+.tpl-hermes-cyber-terminal .hc-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;margin-top:24px}+.tpl-hermes-cyber-terminal .hc-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}+.tpl-hermes-cyber-terminal .hc-codebox{background:#0c0d12;border:1px solid var(--hc-border);border-radius:10px;padding:22px 26px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.85;color:#d8d4c8;box-shadow:inset 0 0 60px rgba(126,211,164,.04)}+.tpl-hermes-cyber-terminal .hc-codebox .cm{color:#5a6068}+.tpl-hermes-cyber-terminal .hc-codebox .kw{color:var(--hc-amber)}+.tpl-hermes-cyber-terminal .hc-codebox .st{color:var(--hc-green)}+.tpl-hermes-cyber-terminal .hc-codebox .fn{color:var(--hc-cyan)}+.tpl-hermes-cyber-terminal .hc-codebox .var{color:var(--hc-rose)}+.tpl-hermes-cyber-terminal .hc-codebox .hl{color:#fff;background:rgba(126,211,164,.15);padding:0 4px;border-radius:3px}+.tpl-hermes-cyber-terminal .hc-tag{display:inline-block;font-family:'JetBrains Mono',monospace;font-size:11px;padding:3px 10px;border:1px solid var(--hc-border);border-radius:4px;color:var(--hc-green);background:rgba(126,211,164,.04);margin:2px 6px 2px 0;text-transform:uppercase;letter-spacing:.1em}+.tpl-hermes-cyber-terminal .hc-tag.amber{color:var(--hc-amber);border-color:rgba(233,197,138,.2);background:rgba(233,197,138,.04)}+.tpl-hermes-cyber-terminal .hc-tag.red{color:var(--hc-red);border-color:rgba(255,107,107,.25);background:rgba(255,107,107,.05)}+.tpl-hermes-cyber-terminal .hc-big{font-family:'JetBrains Mono',monospace;font-size:140px;font-weight:700;line-height:1;color:var(--hc-green);text-shadow:0 0 40px rgba(126,211,164,.4),0 0 80px rgba(126,211,164,.15);letter-spacing:-.04em}+.tpl-hermes-cyber-terminal .hc-footer{position:absolute;left:84px;right:84px;bottom:32px;display:flex;justify-content:space-between;font-size:10px;color:var(--hc-ink2);letter-spacing:.2em;text-transform:uppercase;border-top:1px solid rgba(126,211,164,.1);padding-top:14px}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-hermes-cyber-terminal">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="hc-grid"></div>+ <div class="hc-vignette"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>~/hermes · zsh · 118x42 · 01:37:04</div></div>+ <div style="margin:auto 0">+ <p class="hc-prompt">whoami --hermes</p>+ <h1 class="hc-h1">HERMES<br>AGENT / v0.9.2<span class="hc-cursor"></span></h1>+ <p class="hc-lede">一个号称能「自主跑完整软件工程任务」的命令行 agent。<br>真的好用?还是又一轮营销?—— 我连续跑了 72 小时,告诉你答案。</p>+ <div style="margin-top:26px">+ <span class="hc-tag">rust-core</span>+ <span class="hc-tag">mcp-native</span>+ <span class="hc-tag amber">72h-benchmark</span>+ <span class="hc-tag red">honest-review</span>+ </div>+ </div>+ <div class="hc-footer"><span>hermes-review · lewis · 2026</span><span>01 / 08</span></div>+ </section>++ <!-- 2. SECTION DIVIDER -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>section · 01/04</div></div>+ <div style="margin:auto 0">+ <p class="hc-prompt">cat chapter_01.md</p>+ <h1 class="hc-h1" style="font-size:110px">// Setup</h1>+ <p class="hc-lede">从 <code style="color:var(--hc-amber)">brew install hermes</code> 到第一次 prompt —— 一共 4 分 22 秒。</p>+ </div>+ <div class="hc-footer"><span>section · setup</span><span>02 / 08</span></div>+ </section>++ <!-- 3. CONTENT — spec cards -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>benchmark · cold-start</div></div>+ <h2 class="hc-h2">开箱数据</h2>+ <p class="hc-lede">cold start → first-successful-task 三次平均</p>+ <div class="hc-grid-3">+ <div class="hc-card"><div class="lbl">install time</div><div class="val">42s</div><div class="desc">单 binary,无 docker,无 python env。</div></div>+ <div class="hc-card"><div class="lbl">first token</div><div class="val">1.8s</div><div class="desc">接入 claude-opus-4-6,无预热。</div></div>+ <div class="hc-card"><div class="lbl">first PR merged</div><div class="val">4m22s</div><div class="desc">跑的是 fix-a-typo 级别的低难度任务。</div></div>+ </div>+ <div class="hc-grid-2">+ <div class="hc-card"><div class="lbl">// verdict +</div><div class="val" style="color:var(--hc-green);font-size:18px">冷启动是真的快</div><div class="desc">和 OpenClaw 的 docker + pip 流程比,快不止一个数量级。</div></div>+ <div class="hc-card"><div class="lbl">// verdict -</div><div class="val" style="color:var(--hc-red);font-size:18px">MCP 服务器配置不够友好</div><div class="desc">env 变量需要手动塞进 ~/.hermes/env,文档几乎没写。</div></div>+ </div>+ <div class="hc-footer"><span>data · verified 3 runs</span><span>03 / 08</span></div>+ </section>++ <!-- 4. CODE -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>trace · hermes run</div></div>+ <p class="hc-prompt">hermes run "refactor auth module to use pkce"</p>+ <h3 class="hc-h3" style="margin-top:12px">↓ 真实 trace (节选)</h3>+ <pre class="hc-codebox" style="margin-top:10px"><span class="cm"># hermes v0.9.2 · session 42a1</span>+[<span class="fn">plan</span>] <span class="st">"分析 src/auth/*.ts → 找 oauth flow → 抽成 pkce"</span>+[<span class="fn">read</span>] src/auth/oauth.ts <span class="cm">// 214 lines</span>+[<span class="fn">read</span>] src/auth/token.ts <span class="cm">// 88 lines</span>+[<span class="kw">think</span>] <span class="st">"发现 implicit flow,改为 code+pkce,需新 state param"</span>+[<span class="fn">edit</span>] src/auth/oauth.ts <span class="hl">+43 -17</span>+[<span class="fn">edit</span>] src/auth/token.ts <span class="hl">+12 -4</span>+[<span class="fn">test</span>] pnpm vitest auth <span class="st">PASS 18/18</span>+[<span class="fn">commit</span>] <span class="var">"feat(auth): migrate to oauth2 code+pkce"</span>+[<span class="fn">push</span>] origin feat/pkce-auth <span class="st">ok</span>++<span class="cm"># 总耗时 3m 14s · 14k tokens · $0.21</span></pre>+ <div class="hc-footer"><span>trace · live</span><span>04 / 08</span></div>+ </section>++ <!-- 5. CHART -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>benchmark · hermes vs openclaw</div></div>+ <h2 class="hc-h2">72 小时对比</h2>+ <p class="hc-lede">同一组 48 个 GitHub issue,两个 agent 各跑一遍</p>+ <svg viewBox="0 0 1000 380" style="width:100%;max-width:1040px;margin-top:24px" xmlns="http://www.w3.org/2000/svg">+ <g font-family="JetBrains Mono, monospace" font-size="13" fill="#8a8892">+ <!-- axis -->+ <line x1="80" y1="40" x2="80" y2="320" stroke="rgba(126,211,164,.2)"/>+ <line x1="80" y1="320" x2="960" y2="320" stroke="rgba(126,211,164,.2)"/>+ <!-- y labels -->+ <text x="70" y="46" text-anchor="end">100%</text>+ <text x="70" y="116" text-anchor="end">75%</text>+ <text x="70" y="186" text-anchor="end">50%</text>+ <text x="70" y="256" text-anchor="end">25%</text>+ <text x="70" y="324" text-anchor="end">0</text>+ <!-- bars: hermes -->+ <g>+ <rect x="130" y="80" width="80" height="240" fill="rgba(126,211,164,.15)" stroke="#7ed3a4" stroke-width="1.5"/>+ <text x="170" y="76" text-anchor="middle" fill="#7ed3a4" font-weight="700">82%</text>+ <text x="170" y="345" text-anchor="middle">resolved</text>+ <rect x="240" y="146" width="80" height="174" fill="rgba(126,211,164,.15)" stroke="#7ed3a4" stroke-width="1.5"/>+ <text x="280" y="142" text-anchor="middle" fill="#7ed3a4" font-weight="700">58%</text>+ <text x="280" y="345" text-anchor="middle">one-shot</text>+ <rect x="350" y="60" width="80" height="260" fill="rgba(126,211,164,.15)" stroke="#7ed3a4" stroke-width="1.5"/>+ <text x="390" y="56" text-anchor="middle" fill="#7ed3a4" font-weight="700">89%</text>+ <text x="390" y="345" text-anchor="middle">test-pass</text>+ <rect x="460" y="110" width="80" height="210" fill="rgba(126,211,164,.15)" stroke="#7ed3a4" stroke-width="1.5"/>+ <text x="500" y="106" text-anchor="middle" fill="#7ed3a4" font-weight="700">71%</text>+ <text x="500" y="345" text-anchor="middle">pr-merged</text>+ </g>+ <!-- bars: openclaw -->+ <g>+ <rect x="570" y="150" width="80" height="170" fill="rgba(233,197,138,.12)" stroke="#e9c58a" stroke-width="1.5"/>+ <text x="610" y="146" text-anchor="middle" fill="#e9c58a" font-weight="700">60%</text>+ <text x="610" y="345" text-anchor="middle">resolved</text>+ <rect x="680" y="212" width="80" height="108" fill="rgba(233,197,138,.12)" stroke="#e9c58a" stroke-width="1.5"/>+ <text x="720" y="208" text-anchor="middle" fill="#e9c58a" font-weight="700">38%</text>+ <text x="720" y="345" text-anchor="middle">one-shot</text>+ <rect x="790" y="130" width="80" height="190" fill="rgba(233,197,138,.12)" stroke="#e9c58a" stroke-width="1.5"/>+ <text x="830" y="126" text-anchor="middle" fill="#e9c58a" font-weight="700">67%</text>+ <text x="830" y="345" text-anchor="middle">test-pass</text>+ </g>+ <!-- legend -->+ <g transform="translate(820,50)">+ <rect x="0" y="0" width="14" height="14" fill="rgba(126,211,164,.15)" stroke="#7ed3a4"/>+ <text x="22" y="12" fill="#7ed3a4">hermes 0.9.2</text>+ <rect x="0" y="22" width="14" height="14" fill="rgba(233,197,138,.12)" stroke="#e9c58a"/>+ <text x="22" y="34" fill="#e9c58a">openclaw 2.1</text>+ </g>+ </g>+ </svg>+ <div class="hc-footer"><span>benchmark · n=48</span><span>05 / 08</span></div>+ </section>++ <!-- 6. STATS -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>tldr</div></div>+ <p class="hc-prompt">echo $VERDICT</p>+ <div class="hc-big">7.8<span style="font-size:60px;color:var(--hc-ink2)">/ 10</span></div>+ <p class="hc-lede" style="margin-top:14px">值得装,还不值得完全依赖。</p>+ <div class="hc-grid-2" style="margin-top:24px">+ <div class="hc-card"><div class="lbl">+ strong points</div><div class="desc">• rust 本体冷启快<br>• trace 可读性极强<br>• diff 审核友好,commit message 也写得合格</div></div>+ <div class="hc-card"><div class="lbl">- weak points</div><div class="desc">• plan 阶段偶尔跳步<br>• 超 50k LoC 仓库会 OOM<br>• MCP 配置需要手动塞 env</div></div>+ </div>+ <div class="hc-footer"><span>verdict · honest</span><span>06 / 08</span></div>+ </section>++ <!-- 7. CTA -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>install</div></div>+ <h2 class="hc-h2">想自己跑一遍?</h2>+ <p class="hc-lede">三条命令,不到 5 分钟就能看见它干第一件事。</p>+ <pre class="hc-codebox" style="margin-top:22px"><span class="cm"># 1. install</span>+<span class="kw">$</span> brew install hermes-agent/tap/hermes++<span class="cm"># 2. auth (先准备好 anthropic api key)</span>+<span class="kw">$</span> hermes auth login++<span class="cm"># 3. first task</span>+<span class="kw">$</span> cd ~/your-repo && hermes run <span class="st">"add a CHANGELOG.md from git log"</span></pre>+ <div style="margin-top:26px">+ <span class="hc-tag">brew-ready</span>+ <span class="hc-tag">opus-4.6</span>+ <span class="hc-tag amber">needs-api-key</span>+ </div>+ <div class="hc-footer"><span>try-it-now</span><span>07 / 08</span></div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="hc-grid"></div>+ <div class="hc-scanlines"></div>+ <div class="hc-chrome"><div class="dots"><span></span><span></span><span></span></div><div>EOF</div></div>+ <div style="margin:auto 0">+ <p class="hc-prompt">exit 0</p>+ <h1 class="hc-h1" style="font-size:120px">// thanks<span class="hc-cursor"></span></h1>+ <p class="hc-lede">完整 trace、48 个任务的 PR 列表、benchmark 脚本都在 <span style="color:var(--hc-amber)">github.com/lewis/hermes-review</span></p>+ </div>+ <div class="hc-footer"><span>session closed</span><span>08 / 08</span></div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-magazine-web/SKILL.md b/src/lib/templates/skills/deck-magazine-web/SKILL.mdnew file mode 100644index 00000000..9318c002--- /dev/null+++ b/src/lib/templates/skills/deck-magazine-web/SKILL.md@@ -0,0 +1,24 @@+---+name: deck-magazine-web+zh_name: "杂志风网页 PPT"+en_name: "Magazine Web Deck"+emoji: "📰"+description: "电子杂志 × 电子墨水风, WebGL 流体背景 + 衬线 display"+category: slides+scenario: marketing+aspect_hint: "16:9 横向翻页"+featured: 9+tags: ["magazine", "editorial", "e-ink", "horizontal swipe"]+---++【模板: 杂志风网页 PPT (magazine-web-ppt)】+【意图】horizontal-swipe HTML deck, 杂志 × e-ink 调。+【布局】+- Cover (衬线 display + WebGL 流体背景)+- 章节幕封页+- 数据大字报页 (一个巨数字 + 一句解释)+- 图片网格页+- 金句页 (Sunday-paper 风)+【设计细节】+- 字体: Playfair / Noto Serif SC display + Inter / 思源 sans body+- 键盘 ← / → 切换; hash 同步diff --git a/src/lib/templates/skills/deck-magazine-web/example.html b/src/lib/templates/skills/deck-magazine-web/example.htmlnew file mode 100644index 00000000..6281a05f--- /dev/null+++ b/src/lib/templates/skills/deck-magazine-web/example.html@@ -0,0 +1,1101 @@+<!DOCTYPE html>+<html lang='en'>+<head>+<meta charset='utf-8' />+<meta name='viewport' content='width=device-width, initial-scale=1' />+<title>Open Design · kami deck — Vol. 01 / Issue Nº 26</title>+<meta name='description' content='Open Design as a kami slide deck. Warm parchment with ink-blue cover and chapter slides, serif at one weight, no italic.' />+<link rel='preconnect' href='https://fonts.googleapis.com' />+<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin />+<link href='https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;500&family=Source+Sans+3:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap' rel='stylesheet' />+<style>+/*+ * kami-deck — single-file slide deck stylesheet.+ *+ * Kami token language (warm parchment, ink-blue accent, serif at one+ * weight, no italic) — but laid out as a horizontal swipe deck. Macro+ * tokens are scaled × ~1.6 vs. print baseline; letter-spacing scaled+ * × ~0.6 (per design-systems/kami/DESIGN.md §3).+ *+ * Navigation model is borrowed from skills/guizang-ppt — same flex+ * track + transform translateX, same key/wheel/touch handlers.+ */++:root {+ /* surface */+ --parchment: #f5f4ed;+ --ivory: #faf9f5;+ --warm-sand: #e8e6dc;+ --deep-dark: #141413;++ /* brand (single chromatic accent) */+ --brand: #1B365D;+ --brand-light: #2D5A8A;++ /* text */+ --near-black: #141413;+ --dark-warm: #3d3d3a;+ --olive: #504e49;+ --stone: #6b6a64;++ /* border */+ --border: #e8e6dc;+ --border-soft: #e5e3d8;++ /* tag tints (solid hex, NEVER rgba) */+ --tag-08: #EEF2F7;+ --tag-14: #E4ECF5;+ --tag-22: #D0DCE9;++ /* type */+ --serif: 'Source Serif 4', Charter, Georgia, Palatino, 'Times New Roman', serif;+ --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;+ --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, Monaco, monospace;+}++* { box-sizing: border-box; margin: 0; padding: 0; }+html, body {+ width: 100%; height: 100%;+ overflow: hidden;+ background: var(--parchment);+ color: var(--near-black);+ font-family: var(--serif);+ font-weight: 400;+ -webkit-font-smoothing: antialiased;+}+strong { font-weight: 500; }++/* ---------- deck flex track ---------- */+#deck {+ position: fixed; inset: 0;+ height: 100vh;+ display: flex;+ flex-wrap: nowrap;+ transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);+ z-index: 5;+ will-change: transform;+}+.slide {+ width: 100vw; height: 100vh;+ flex: 0 0 100vw;+ position: relative;+ padding: 80px 96px;+ display: flex;+ flex-direction: column;+ overflow: hidden;+ background: var(--parchment);+ color: var(--near-black);+}+.slide.dark {+ background: var(--brand);+ color: var(--ivory);+}+.slide-inner {+ max-width: 1280px;+ margin: 0 auto;+ width: 100%;+ height: 100%;+ display: grid;+ align-content: center;+ gap: 24px;+ position: relative;+ min-height: 0;+}++/* ---------- per-slide chrome strip ---------- */+.slide-chrome {+ position: absolute;+ top: 28px; left: 0; right: 0;+ display: flex;+ justify-content: space-between;+ align-items: center;+ padding: 0 96px;+ font-family: var(--sans);+ font-size: 11px;+ font-weight: 500;+ letter-spacing: 0.6px;+ text-transform: uppercase;+ color: var(--stone);+ z-index: 4;+ pointer-events: none;+}+.slide.dark .slide-chrome { color: rgba(250, 249, 245, 0.55); }+.slide-chrome b { color: var(--near-black); font-weight: 500; }+.slide.dark .slide-chrome b { color: var(--ivory); }+.slide-chrome .left { display: inline-flex; align-items: center; gap: 12px; }+.slide-chrome .right {+ display: inline-flex; align-items: center; gap: 12px;+ font-variant-numeric: tabular-nums;+}+.slide-chrome .mark {+ width: 22px; height: 22px;+ border-radius: 50%;+ border: 1px solid currentColor;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ font-family: var(--serif);+ font-weight: 500;+ font-size: 11px;+ letter-spacing: 0;+ opacity: 0.85;+}+.slide-foot {+ position: absolute;+ bottom: 28px; left: 0; right: 0;+ display: flex;+ justify-content: space-between;+ align-items: center;+ padding: 0 96px;+ font-family: var(--mono);+ font-size: 10.5px;+ letter-spacing: 0.4px;+ color: var(--stone);+ font-variant-numeric: tabular-nums;+ z-index: 4;+ pointer-events: none;+}+.slide.dark .slide-foot { color: rgba(250, 249, 245, 0.55); }+.slide-foot .counter {+ font-family: var(--mono);+ letter-spacing: 0.04em;+ color: var(--near-black);+ background: var(--ivory);+ padding: 4px 8px;+ border: 1px solid var(--border);+ border-radius: 4px;+}+.slide.dark .slide-foot .counter {+ color: var(--ivory);+ background: rgba(250, 249, 245, 0.08);+ border-color: rgba(250, 249, 245, 0.22);+}++/* ---------- progress bar ---------- */+.deck-progress {+ position: fixed;+ left: 0; right: 0; bottom: 0;+ height: 2px;+ background: rgba(27, 54, 93, 0.08);+ z-index: 30;+}+.deck-progress .bar {+ height: 100%;+ background: var(--brand);+ width: 0%;+ transition: width 0.6s cubic-bezier(0.77, 0, 0.175, 1);+}++/* ---------- dot nav ---------- */+#nav {+ position: fixed;+ left: 50%;+ bottom: 40px;+ transform: translateX(-50%);+ z-index: 30;+ display: flex;+ gap: 9px;+ padding: 8px 14px;+ border-radius: 999px;+ background: rgba(245, 244, 237, 0.78);+ border: 1px solid var(--border);+ backdrop-filter: blur(8px);+}+#nav .dot {+ width: 7px; height: 7px;+ border-radius: 50%;+ background: rgba(27, 54, 93, 0.22);+ cursor: pointer;+ transition: all 0.3s ease;+ border: 0;+ padding: 0;+}+#nav .dot:hover {+ background: rgba(27, 54, 93, 0.5);+ transform: scale(1.15);+}+#nav .dot.active {+ background: var(--brand);+ width: 22px;+ border-radius: 999px;+}++#hint {+ position: fixed;+ bottom: 36px; right: 28px;+ z-index: 30;+ font-family: var(--mono);+ font-size: 10px;+ letter-spacing: 0.4px;+ text-transform: uppercase;+ color: var(--stone);+ opacity: 0.75;+}++/* ---------- COVER slide (dark) ---------- */+.s-cover .slide-inner {+ grid-template-columns: 1fr;+ text-align: left;+ align-content: center;+ gap: 28px;+ max-width: 980px;+}+.s-cover .eyebrow {+ font-family: var(--sans);+ font-size: 12px;+ font-weight: 500;+ letter-spacing: 1.2px;+ text-transform: uppercase;+ color: rgba(250, 249, 245, 0.65);+}+.s-cover h1 {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(60px, 7vw, 110px);+ line-height: 1.05;+ letter-spacing: -1.2px;+ color: var(--ivory);+ margin: 0;+}+.s-cover h1 .hl { color: #B5C8DC; }+.s-cover .tagline {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 21px;+ color: rgba(250, 249, 245, 0.75);+ max-width: 50ch;+ line-height: 1.45;+}+.s-cover .meta {+ margin-top: 20px;+ display: flex;+ align-items: center;+ gap: 20px;+ font-family: var(--mono);+ font-size: 11px;+ letter-spacing: 0.4px;+ text-transform: uppercase;+ color: rgba(250, 249, 245, 0.6);+ font-variant-numeric: tabular-nums;+}+.s-cover .meta .rule {+ width: 56px; height: 1px;+ background: rgba(250, 249, 245, 0.4);+ display: inline-block;+}++/* ---------- CHAPTER divider (dark) ---------- */+.s-chapter .slide-inner {+ grid-template-columns: 1fr;+ text-align: center;+ align-content: center;+ gap: 36px;+}+.s-chapter .num {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(64px, 8vw, 130px);+ color: rgba(250, 249, 245, 0.55);+ letter-spacing: -0.5px;+ line-height: 1;+ font-variant-numeric: tabular-nums;+}+.s-chapter h2 {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(48px, 5.4vw, 84px);+ line-height: 1.1;+ letter-spacing: -0.6px;+ color: var(--ivory);+ margin: 0 auto;+ max-width: 22ch;+}+.s-chapter .lede {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 19px;+ color: rgba(250, 249, 245, 0.7);+ max-width: 42ch;+ margin: 0 auto;+ line-height: 1.5;+ letter-spacing: 0.05em;+}++/* ---------- CONTENT slide ---------- */+.s-content .slide-inner {+ grid-template-columns: 1fr 2.4fr;+ gap: 56px;+ align-content: center;+}+.s-content.layout-full .slide-inner { grid-template-columns: 1fr; max-width: 980px; }+.s-content .head { display: flex; flex-direction: column; gap: 16px; }+.s-content .num {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 14px;+ letter-spacing: 0.4px;+ color: var(--brand);+ font-variant-numeric: tabular-nums;+}+.s-content h2 {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(36px, 4vw, 56px);+ line-height: 1.1;+ letter-spacing: 0.4px;+ color: var(--near-black);+ margin: 0;+ max-width: 14ch;+}+.s-content .lede {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 15px;+ color: var(--olive);+ max-width: 28ch;+ line-height: 1.5;+}+.s-content .body { display: flex; flex-direction: column; gap: 18px; }+.s-content .body p {+ font-family: var(--serif);+ font-weight: 400;+ font-size: 17px;+ line-height: 1.55;+ color: var(--dark-warm);+ max-width: 64ch;+}+.s-content .body p strong { color: var(--near-black); font-weight: 500; }+.s-content .body code {+ font-family: var(--mono);+ font-size: 14px;+ color: var(--brand);+ background: var(--tag-08);+ padding: 1px 6px;+ border-radius: 3px;+}+.s-content ul.dash {+ list-style: none; padding: 0; margin: 4px 0 0;+ display: flex; flex-direction: column; gap: 10px;+}+.s-content ul.dash li {+ position: relative; padding-left: 18px;+ font-family: var(--serif);+ font-weight: 400;+ font-size: 16px;+ line-height: 1.55;+ color: var(--dark-warm);+}+.s-content ul.dash li::before {+ content: '\2013';+ position: absolute; left: 0;+ color: var(--brand);+}+.s-content .body .tag-row { margin-top: 4px; }+.s-content .tag {+ display: inline-block;+ font-family: var(--sans);+ font-size: 12px;+ font-weight: 500;+ padding: 2px 8px;+ border-radius: 4px;+ color: var(--brand);+ background: var(--tag-14);+ letter-spacing: 0.4px;+}++/* ---------- STATS slide ---------- */+.s-stats .slide-inner { grid-template-columns: 1fr; gap: 48px; }+.s-stats .head { display: flex; flex-direction: column; gap: 18px; }+.s-stats .num {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 14px;+ letter-spacing: 0.4px;+ color: var(--brand);+ font-variant-numeric: tabular-nums;+}+.s-stats h2 {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(36px, 4.2vw, 60px);+ line-height: 1.1;+ letter-spacing: 0.4px;+ color: var(--near-black);+ max-width: 22ch;+ margin: 0;+}+.s-stats .grid {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));+ gap: 0;+ border-top: 1px solid var(--border);+ border-bottom: 1px solid var(--border);+}+.s-stats .stat {+ padding: 32px 24px 28px;+ display: flex;+ flex-direction: column;+ gap: 8px;+ border-right: 1px solid var(--border-soft);+}+.s-stats .stat:last-child { border-right: 0; }+.s-stats .stat .v {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(48px, 6vw, 88px);+ line-height: 1;+ letter-spacing: -0.8px;+ color: var(--brand);+ font-variant-numeric: tabular-nums;+}+.s-stats .stat .l {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 15px;+ color: var(--near-black);+ margin-top: 8px;+}+.s-stats .stat .s {+ font-family: var(--serif);+ font-weight: 400;+ font-size: 13px;+ color: var(--olive);+ line-height: 1.5;+ max-width: 28ch;+}+.s-stats .caption {+ font-family: var(--mono);+ font-size: 11px;+ color: var(--stone);+ letter-spacing: 0.4px;+ font-variant-numeric: tabular-nums;+}++/* ---------- QUOTE slide ---------- */+.s-quote .slide-inner {+ grid-template-columns: 1fr;+ max-width: 1080px;+ gap: 36px;+ align-content: center;+}+.s-quote blockquote {+ border-left: 2px solid var(--brand);+ padding: 6px 0 6px 28px;+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(28px, 3.4vw, 42px);+ line-height: 1.35;+ color: var(--near-black);+ margin: 0;+ letter-spacing: 0.05em;+ max-width: 36ch;+}+.s-quote .author {+ display: flex;+ align-items: center;+ gap: 16px;+ margin-top: 12px;+}+.s-quote .author .glyph {+ width: 44px; height: 44px;+ border-radius: 50%;+ background: var(--brand); color: var(--ivory);+ font-family: var(--serif); font-weight: 500;+ font-size: 18px;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ text-transform: uppercase;+ letter-spacing: 0;+}+.s-quote .author p {+ font-family: var(--serif);+ font-weight: 500;+ font-size: 14px;+ color: var(--near-black);+}+.s-quote .author p span {+ display: block;+ color: var(--olive);+ font-weight: 400;+ margin-top: 2px;+}++/* ---------- CTA slide ---------- */+.s-cta .slide-inner {+ grid-template-columns: 1fr;+ max-width: 980px;+ gap: 28px;+ align-content: center;+ text-align: left;+}+.s-cta .eyebrow {+ font-family: var(--sans);+ font-size: 12px; font-weight: 500;+ letter-spacing: 1.2px;+ text-transform: uppercase;+ color: var(--brand);+}+.s-cta h2 {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(48px, 5.4vw, 88px);+ line-height: 1.05;+ letter-spacing: -0.6px;+ color: var(--near-black);+ margin: 0;+}+.s-cta .body {+ font-family: var(--serif);+ font-weight: 400;+ font-size: 17px;+ color: var(--dark-warm);+ max-width: 50ch;+ line-height: 1.55;+}+.s-cta .actions {+ display: inline-flex;+ gap: 12px;+ margin-top: 12px;+ align-items: center;+ flex-wrap: wrap;+}+.s-cta .btn {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ font-family: var(--sans);+ font-size: 13px;+ font-weight: 500;+ letter-spacing: 0.4px;+ padding: 10px 16px;+ border-radius: 8px;+ border: 0;+ cursor: pointer;+ text-decoration: none;+}+.s-cta .btn-primary {+ background: var(--brand);+ color: var(--ivory);+ box-shadow: 0 0 0 1px var(--brand);+}+.s-cta .btn-primary:hover { background: var(--brand-light); box-shadow: 0 0 0 1px var(--brand-light); }+.s-cta .btn-ghost {+ background: transparent;+ color: var(--brand);+ box-shadow: 0 0 0 1px var(--brand);+}+.s-cta .btn-ghost:hover { background: var(--tag-08); }++/* ---------- END slide (dark) ---------- */+.s-end .slide-inner {+ grid-template-columns: 1fr;+ align-content: end;+ padding-bottom: 24px;+ text-align: left;+ gap: 18px;+ max-width: none;+}+.s-end .word {+ font-family: var(--serif);+ font-weight: 500;+ font-size: clamp(96px, 16vw, 240px);+ line-height: 1;+ letter-spacing: -1.2px;+ color: var(--ivory);+ white-space: nowrap;+ overflow-x: hidden;+}+.s-end .word .hl { color: #B5C8DC; }+.s-end .colophon {+ border-top: 1px solid rgba(250, 249, 245, 0.22);+ padding-top: 22px;+ font-family: var(--sans);+ font-size: 11px;+ font-weight: 500;+ letter-spacing: 1.2px;+ text-transform: uppercase;+ color: rgba(250, 249, 245, 0.65);+ font-variant-numeric: tabular-nums;+}++/* ---------- ESC overview ---------- */+#overview {+ position: fixed; inset: 0;+ z-index: 100;+ background: rgba(245, 244, 237, 0.96);+ backdrop-filter: blur(12px);+ display: none;+ overflow-y: auto;+ padding: 60px 56px;+}+#overview .ov-head {+ display: flex; justify-content: space-between; align-items: baseline;+ margin-bottom: 32px;+ font-family: var(--sans); font-size: 11px;+ letter-spacing: 1.2px; text-transform: uppercase;+ color: var(--stone);+ font-variant-numeric: tabular-nums;+}+#overview .ov-head b { color: var(--near-black); font-weight: 500; }+#overview .ov-grid {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));+ gap: 22px;+ max-width: 1280px;+ margin: 0 auto;+}+#overview .ov-card {+ cursor: pointer;+ border-radius: 8px;+ overflow: hidden;+ border: 1px solid var(--border);+ transition: border-color 0.2s, transform 0.2s;+ background: var(--ivory);+}+#overview .ov-card:hover { border-color: var(--brand); transform: translateY(-2px); }+#overview .ov-card.active { border-color: var(--brand); border-width: 2px; }+#overview .ov-thumb {+ width: 100%;+ aspect-ratio: 16 / 10;+ overflow: hidden;+ position: relative;+ pointer-events: none;+ background: var(--parchment);+}+#overview .ov-thumb .clone {+ width: 100vw; height: 100vh;+ transform: scale(0.18);+ transform-origin: top left;+ position: absolute;+ top: 0; left: 0;+ pointer-events: none;+}+#overview .ov-label {+ padding: 8px 12px;+ font-family: var(--mono); font-size: 10px;+ letter-spacing: 0.4px; text-transform: uppercase;+ color: var(--stone);+ display: flex; justify-content: space-between; align-items: center;+ font-variant-numeric: tabular-nums;+}+#overview .ov-label b { color: var(--near-black); font-weight: 500; }++/* ---------- responsive ---------- */+@media (max-width: 1080px) {+ .slide { padding: 64px 56px; }+ .slide-chrome, .slide-foot { padding: 0 56px; }+ .s-content .slide-inner { grid-template-columns: 1fr; gap: 28px; }+}+@media (max-width: 640px) {+ .slide { padding: 44px 28px; }+ .slide-chrome, .slide-foot { padding: 0 28px; font-size: 9.5px; letter-spacing: 0.6px; }+ #hint { display: none; }+}+</style>+</head>+<body>++<div id='deck'>++ <!-- ===== 01 · COVER (dark) ===== -->+ <section class='slide s-cover dark' data-slide-kind='cover'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <span class='eyebrow'>Open-source design studio · Nº 01</span>+ <h1>Designing intelligence on warm <span class='hl'>paper</span>.</h1>+ <p class='tagline'>The open-source studio for editorial documents and slide decks — typeset by your own coding agent.</p>+ <div class='meta'>+ <span>Berlin · 52.5200° N · 13.4050° E</span>+ <span class='rule'></span>+ <span>MMXXVI · Apache-2.0</span>+ </div>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>01 / 09</span>+ </div>+ </section>++ <!-- ===== 02 · CHAPTER (dark) ===== -->+ <section class='slide s-chapter dark' data-slide-kind='chapter'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <p class='num'>01</p>+ <h2>Why design needs another tool.</h2>+ <p class='lede'>Because the strongest agents already live on your laptop — and they deserve a real workflow, not a chat window.</p>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>02 / 09</span>+ </div>+ </section>++ <!-- ===== 03 · CONTENT ===== -->+ <section class='slide s-content' data-slide-kind='content'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <div class='head'>+ <p class='num'>01.1</p>+ <h2>What it is.</h2>+ <p class='lede'>A local-first design studio for the agent you already trust.</p>+ </div>+ <div class='body'>+ <p>+ Open Design is the <strong>open-source alternative to Anthropic's Claude Design</strong>. It runs on your laptop. Your agent reads a folder of <code>SKILL.md</code> files and a folder of <code>DESIGN.md</code> systems, then produces real files — landing pages, decks, white papers, dashboards.+ </p>+ <ul class='dash'>+ <li>Files, not opaque prompts — every skill is a folder of Markdown.</li>+ <li>Deterministic visual directions, not random generation.</li>+ <li>Sandboxed iframe preview, real <code>cwd</code>, exportable artifacts.</li>+ </ul>+ <div class='tag-row'>+ <span class='tag'>Apache-2.0</span>+ <span class='tag'>Local-first</span>+ <span class='tag'>BYOK</span>+ </div>+ </div>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>03 / 09</span>+ </div>+ </section>++ <!-- ===== 04 · CONTENT ===== -->+ <section class='slide s-content' data-slide-kind='content'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <div class='head'>+ <p class='num'>01.2</p>+ <h2>How it feels.</h2>+ <p class='lede'>Editorial discipline, not chat-window improvisation.</p>+ </div>+ <div class='body'>+ <p>+ A new project starts with a 30-second question form: brand, audience, scale, language. The agent picks one of five visual directions, locks the type stack, and writes the artifact to disk. <strong>You can read every file it touched.</strong>+ </p>+ <p>+ Every iteration is reviewed in a sandboxed iframe with comment-mode anchors on every editable element. Re-runs are deterministic — same brief, same output.+ </p>+ <ul class='dash'>+ <li>Brief → 30s question form locks brand + audience + scale.</li>+ <li>Direction → 5 visual directions in OKLch + locked type stack.</li>+ <li>Artifact → real file on disk, sandboxed preview, comment anchors.</li>+ </ul>+ </div>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>04 / 09</span>+ </div>+ </section>++ <!-- ===== 05 · STATS ===== -->+ <section class='slide s-stats' data-slide-kind='stats'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <div class='head'>+ <p class='num'>01.3</p>+ <h2>By the numbers.</h2>+ </div>+ <div class='grid'>+ <div class='stat'>+ <div class='v'>31</div>+ <div class='l'>Skills</div>+ <div class='s'>file-based, shippable today, drop-in compatible.</div>+ </div>+ <div class='stat'>+ <div class='v'>72</div>+ <div class='l'>Design systems</div>+ <div class='s'>portable DESIGN.md tokens — Linear, Vercel, Stripe, kami…</div>+ </div>+ <div class='stat'>+ <div class='v'>12</div>+ <div class='l'>Agent CLIs</div>+ <div class='s'>auto-detected on your $PATH; switch backends instantly.</div>+ </div>+ <div class='stat'>+ <div class='v'>3</div>+ <div class='l'>Commands</div>+ <div class='s'>from <code>git clone</code> to first artifact, locally.</div>+ </div>+ </div>+ <p class='caption'>Open Design v0.2.0 · Apache-2.0 · MMXXVI · figures as of Issue Nº 26.</p>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>05 / 09</span>+ </div>+ </section>++ <!-- ===== 06 · CHAPTER (dark) ===== -->+ <section class='slide s-chapter dark' data-slide-kind='chapter'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <p class='num'>02</p>+ <h2>What ships next.</h2>+ <p class='lede'>Q2 2026 — packaging, multi-tenant tokens, daemon hardening. The roadmap is public.</p>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>06 / 09</span>+ </div>+ </section>++ <!-- ===== 07 · QUOTE ===== -->+ <section class='slide s-quote' data-slide-kind='quote'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <blockquote>+ Open Design helped us turn vague AI ideas into a visual system that felt sharp, believable, and genuinely new — without ever opening a chat window.+ </blockquote>+ <div class='author'>+ <span class='glyph'>m</span>+ <p>+ Mina Kovac+ <span>Creative Director · North Form, Berlin</span>+ </p>+ </div>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>07 / 09</span>+ </div>+ </section>++ <!-- ===== 08 · CTA ===== -->+ <section class='slide s-cta' data-slide-kind='cta'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <span class='eyebrow'>Start a conversation · Nº 03</span>+ <h2>Let's build something open and visually unforgettable.</h2>+ <p class='body'>+ Star the repo on GitHub, drop into the issues, or run <code>pnpm tools-dev</code> tonight. Three commands and the loop is yours.+ </p>+ <div class='actions'>+ <a class='btn btn-primary' href='https://github.com/nexu-io/open-design'>Star on GitHub</a>+ <a class='btn btn-ghost' href='https://github.com/nexu-io/open-design/issues'>Open an issue</a>+ </div>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>08 / 09</span>+ </div>+ </section>++ <!-- ===== 09 · END (dark) ===== -->+ <section class='slide s-end dark' data-slide-kind='end'>+ <div class='slide-chrome'>+ <span class='left'><span class='mark'>kami</span> <b>Open Design</b> · Vol. 01 / Issue Nº 26</span>+ <span class='right'>Open Design · kami deck</span>+ </div>+ <div class='slide-inner'>+ <div class='word'>Open <span class='hl'>Design.</span></div>+ <p class='colophon'>Apache-2.0 · MMXXVI · Berlin · 52.5200° N · 13.4050° E · Composed in kami</p>+ </div>+ <div class='slide-foot'>+ <span>Berlin · MMXXVI</span>+ <span class='counter'>09 / 09</span>+ </div>+ </section>++</div>++<div id='nav'></div>+<div id='hint'>← / → · esc · swipe</div>+<div class='deck-progress'><div class='bar'></div></div>++<script>+(function () {+ var deck = document.getElementById('deck');+ if (!deck) return;+ var slides = Array.prototype.slice.call(deck.querySelectorAll('.slide'));+ var nav = document.getElementById('nav');+ var bar = document.querySelector('.deck-progress .bar');+ var total = slides.length;+ var idx = 0, lock = false;++ deck.style.width = (total * 100) + 'vw';++ slides.forEach(function (s, i) {+ var b = document.createElement('button');+ b.className = 'dot';+ b.dataset.i = i;+ b.setAttribute('aria-label', 'Slide ' + (i + 1));+ b.onclick = function () { go(i); };+ nav.appendChild(b);+ });++ /* Unthrottled state update. The interaction throttle (`lock`) only+ guards wheel/key/touch so a fast input burst doesn't overshoot the+ transition; host- and observer-driven sync must bypass it, otherwise+ a host message or restoreInitialSlide that lands inside the 700ms+ window after go(0) silently no-ops and the deck stays on slide 1+ while the host counter advances. */+ function applySlide(n) {+ idx = Math.max(0, Math.min(total - 1, n));+ deck.style.transform = 'translateX(' + (-idx * 100) + 'vw)';+ /* load-bearing: .slide.active is read by Open Design's host bridge+ (src/runtime/srcdoc.ts findActiveByClass) to drive the slide+ counter. No CSS targets it — do not remove. */+ slides.forEach(function (s, i) { s.classList.toggle('active', i === idx); });+ nav.querySelectorAll('.dot').forEach(function (d, i) {+ d.classList.toggle('active', i === idx);+ });+ if (bar) bar.style.width = (((idx + 1) / total) * 100) + '%';+ }++ function go(n) {+ if (lock) return;+ applySlide(n);+ lock = true;+ setTimeout(function () { lock = false; }, 700);+ }++ /* ESC overview */+ var overviewOn = false;+ var ov = document.createElement('div');+ ov.id = 'overview';+ document.body.appendChild(ov);++ function buildOverview() {+ ov.innerHTML = '';+ var head = document.createElement('div');+ head.className = 'ov-head';+ head.innerHTML = '<span><b>Slide overview</b> · esc to close</span><span>' ++ String(idx + 1).padStart(2, '0') + ' / ' + String(total).padStart(2, '0') + '</span>';+ ov.appendChild(head);+ var grid = document.createElement('div');+ grid.className = 'ov-grid';+ slides.forEach(function (s, i) {+ var card = document.createElement('div');+ card.className = 'ov-card' + (i === idx ? ' active' : '');+ var thumb = document.createElement('div');+ thumb.className = 'ov-thumb';+ var clone = s.cloneNode(true);+ clone.className = clone.className + ' clone';+ clone.style.transform = 'scale(0.18)';+ thumb.appendChild(clone);+ var label = document.createElement('div');+ label.className = 'ov-label';+ label.innerHTML = '<b>' + String(i + 1).padStart(2, '0') + '</b><span>' ++ (s.dataset.slideKind || '') + '</span>';+ card.appendChild(thumb);+ card.appendChild(label);+ card.onclick = function () { toggleOverview(); go(i); };+ grid.appendChild(card);+ });+ ov.appendChild(grid);+ }++ function toggleOverview() {+ overviewOn = !overviewOn;+ if (overviewOn) { buildOverview(); ov.style.display = 'block'; }+ else { ov.style.display = 'none'; }+ }++ addEventListener('keydown', function (e) {+ if (e.key === 'Escape') { e.preventDefault(); toggleOverview(); return; }+ if (overviewOn) return;+ if (e.key === 'ArrowRight' || e.key === 'PageDown' || e.key === ' ' || e.key === 'ArrowDown') {+ e.preventDefault(); go(idx + 1);+ } else if (e.key === 'ArrowLeft' || e.key === 'PageUp' || e.key === 'ArrowUp') {+ e.preventDefault(); go(idx - 1);+ } else if (e.key === 'Home') {+ e.preventDefault(); go(0);+ } else if (e.key === 'End') {+ e.preventDefault(); go(total - 1);+ }+ });++ var wheelTO = null, wheelAcc = 0;+ addEventListener('wheel', function (e) {+ if (overviewOn) return;+ wheelAcc += e.deltaY + e.deltaX;+ if (Math.abs(wheelAcc) > 60) {+ go(idx + (wheelAcc > 0 ? 1 : -1));+ wheelAcc = 0;+ }+ clearTimeout(wheelTO);+ wheelTO = setTimeout(function () { wheelAcc = 0; }, 150);+ }, { passive: true });++ var tx = 0, ty = 0;+ addEventListener('touchstart', function (e) {+ tx = e.touches[0].clientX; ty = e.touches[0].clientY;+ }, { passive: true });+ addEventListener('touchend', function (e) {+ if (overviewOn) return;+ var dx = e.changedTouches[0].clientX - tx;+ var dy = e.changedTouches[0].clientY - ty;+ if (Math.abs(dx) > 50 && Math.abs(dx) > Math.abs(dy)) {+ go(idx + (dx < 0 ? 1 : -1));+ }+ }, { passive: true });++ /* Host-driven navigation: Open Design's host bridge classifies this deck+ as class-driven (because go() toggles .slide.active) but the visible+ slide is moved by deck.style.transform, which the bridge can't drive.+ Two cooperating handlers keep the deck in sync with the host:+ 1. An od:slide message listener routes host nav through go() and+ calls stopImmediatePropagation() so the bridge's own listener+ (registered after this one) doesn't run a second time and+ overshoot by re-reading the freshly-toggled .active class.+ 2. A MutationObserver on each slide watches .active and pulls the+ deck transform onto the active index for class changes that+ don't come through a message — chiefly the bridge's+ restoreInitialSlide path, which calls setActive() directly. */+ addEventListener('message', function (e) {+ var data = e && e.data;+ if (!data || data.type !== 'od:slide') return;+ if (typeof e.stopImmediatePropagation === 'function') e.stopImmediatePropagation();+ if (data.action === 'go' && typeof data.index === 'number') applySlide(data.index);+ else if (data.action === 'next') applySlide(idx + 1);+ else if (data.action === 'prev') applySlide(idx - 1);+ else if (data.action === 'first') applySlide(0);+ else if (data.action === 'last') applySlide(total - 1);+ });++ if (typeof MutationObserver !== 'undefined') {+ var syncFromActiveClass = function () {+ for (var i = 0; i < slides.length; i++) {+ if (slides[i].classList && slides[i].classList.contains('active') && i !== idx) {+ applySlide(i);+ return;+ }+ }+ };+ var mo = new MutationObserver(syncFromActiveClass);+ slides.forEach(function (s) { mo.observe(s, { attributes: true, attributeFilter: ['class'] }); });+ }++ applySlide(0);+})();+</script>+</body>+</html>diff --git a/src/lib/templates/skills/deck-obsidian-claude/SKILL.md b/src/lib/templates/skills/deck-obsidian-claude/SKILL.mdnew file mode 100644index 00000000..32274c77--- /dev/null+++ b/src/lib/templates/skills/deck-obsidian-claude/SKILL.md@@ -0,0 +1,20 @@+---+name: deck-obsidian-claude+zh_name: "GitHub Dark 紫渐变 Deck"+en_name: "Obsidian Claude Gradient Deck"+emoji: "🌃"+description: "GitHub-dark + 紫蓝环境光 + 三色渐变标题 + GitHub 风代码"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 31+tags: ["github", "dark", "purple", "mcp", "agent"]+---++【模板: Obsidian Claude Gradient Deck】+【意图】类 GitHub Blog / Linear Changelog 的开发者教程 deck。+【布局】+- GitHub-dark #0d1117 + 紫蓝 radial 环境光 + 60px 网格 mask+- 居中布局 + 紫色 pill tag+- 三色渐变标题 (#a855f7→#60a5fa→#34d399)+- GitHub 风代码 palette + 紫色左边框高亮块diff --git a/src/lib/templates/skills/deck-obsidian-claude/example.html b/src/lib/templates/skills/deck-obsidian-claude/example.htmlnew file mode 100644index 00000000..5aa3d69d--- /dev/null+++ b/src/lib/templates/skills/deck-obsidian-claude/example.html@@ -0,0 +1,371 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Obsidian × Claude Gradient</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* obsidian-claude-gradient — 紫色暗底 + GitHub-ish 渐变卡 */+.tpl-obsidian-claude-gradient{+ --oc-bg:#0d1117;+ --oc-surface:#161b22;+ --oc-surface2:#21262d;+ --oc-border:#30363d;+ --oc-accent:#7c3aed;+ --oc-accent2:#a855f7;+ --oc-accent3:#c084fc;+ --oc-green:#3fb950;+ --oc-blue:#58a6ff;+ --oc-orange:#f97316;+ --oc-yellow:#fbbf24;+ --oc-red:#f87171;+ --oc-text:#e6edf3;+ --oc-dim:#8b949e;+ --oc-dimmer:#484f58;+ background:var(--oc-bg);+ color:var(--oc-text);+ font-family:'Inter','Noto Sans SC','PingFang SC',-apple-system,sans-serif;+}+.tpl-obsidian-claude-gradient .slide{background:var(--oc-bg);color:var(--oc-text);padding:64px 88px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;overflow:hidden}+.tpl-obsidian-claude-gradient .oc-cbg{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 28% 38%,rgba(124,58,237,.25) 0%,transparent 60%),radial-gradient(ellipse at 72% 62%,rgba(88,166,255,.18) 0%,transparent 60%)}+.tpl-obsidian-claude-gradient .oc-cgrid{position:absolute;inset:0;pointer-events:none;background-image:linear-gradient(rgba(48,54,61,.4) 1px,transparent 1px),linear-gradient(90deg,rgba(48,54,61,.4) 1px,transparent 1px);background-size:60px 60px;mask-image:radial-gradient(ellipse at center,black 35%,transparent 80%)}+.tpl-obsidian-claude-gradient .slide > *{position:relative;z-index:2}+.tpl-obsidian-claude-gradient .oc-snum{position:absolute;top:24px;right:36px;color:var(--oc-dimmer);font-size:12px;letter-spacing:.1em;z-index:3}+.tpl-obsidian-claude-gradient .oc-tag{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--oc-accent3);background:rgba(124,58,237,.14);border:1px solid rgba(168,85,247,.3);padding:5px 16px;border-radius:999px;margin-bottom:22px}+.tpl-obsidian-claude-gradient .oc-h1{font-size:72px;font-weight:800;line-height:1.08;letter-spacing:-.02em;margin:0 0 10px;color:var(--oc-text)}+.tpl-obsidian-claude-gradient .oc-h2{font-size:44px;font-weight:700;line-height:1.18;letter-spacing:-.015em;margin:0 0 14px}+.tpl-obsidian-claude-gradient .oc-sub{font-size:19px;color:var(--oc-dim);line-height:1.65;max-width:720px;margin-top:14px}+.tpl-obsidian-claude-gradient .oc-g{background:linear-gradient(135deg,#a855f7 0%,#60a5fa 55%,#34d399 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}+.tpl-obsidian-claude-gradient .oc-card{background:var(--oc-surface);border:1px solid var(--oc-border);border-radius:14px;padding:22px 26px;text-align:left;position:relative;overflow:hidden}+.tpl-obsidian-claude-gradient .oc-card::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(168,85,247,.4),transparent)}+.tpl-obsidian-claude-gradient .oc-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;width:100%;max-width:1000px;margin-top:24px}+.tpl-obsidian-claude-gradient .oc-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;width:100%;max-width:1080px;margin-top:24px}+.tpl-obsidian-claude-gradient .oc-badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;padding:3px 11px;border-radius:999px;margin-bottom:10px}+.tpl-obsidian-claude-gradient .oc-bp{background:rgba(168,85,247,.15);color:var(--oc-accent3)}+.tpl-obsidian-claude-gradient .oc-bb{background:rgba(88,166,255,.15);color:var(--oc-blue)}+.tpl-obsidian-claude-gradient .oc-bg{background:rgba(63,185,80,.15);color:var(--oc-green)}+.tpl-obsidian-claude-gradient .oc-bo{background:rgba(249,115,22,.15);color:var(--oc-orange)}+.tpl-obsidian-claude-gradient .oc-code{background:#010409;border:1px solid var(--oc-border);border-radius:12px;padding:20px 24px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.85;width:100%;max-width:860px;text-align:left;color:#e6edf3}+.tpl-obsidian-claude-gradient .oc-code .cp{color:var(--oc-green)}+.tpl-obsidian-claude-gradient .oc-code .cc{color:var(--oc-blue)}+.tpl-obsidian-claude-gradient .oc-code .ca{color:var(--oc-accent3)}+.tpl-obsidian-claude-gradient .oc-code .cm{color:var(--oc-dimmer)}+.tpl-obsidian-claude-gradient .oc-code .cs{color:var(--oc-orange)}+.tpl-obsidian-claude-gradient .oc-hl{background:rgba(124,58,237,.1);border:1px solid rgba(168,85,247,.3);border-left:4px solid var(--oc-accent2);border-radius:0 12px 12px 0;padding:16px 22px;font-size:16px;line-height:1.7;max-width:860px;text-align:left}+.tpl-obsidian-claude-gradient .oc-steps{display:flex;flex-direction:column;gap:0;width:100%;max-width:820px;text-align:left}+.tpl-obsidian-claude-gradient .oc-step{display:flex;gap:20px;align-items:flex-start;padding:18px 0;border-bottom:1px solid var(--oc-border)}+.tpl-obsidian-claude-gradient .oc-step:last-child{border-bottom:none}+.tpl-obsidian-claude-gradient .oc-sn{width:36px;height:36px;flex-shrink:0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;background:linear-gradient(135deg,var(--oc-accent),var(--oc-blue));color:#fff}+.tpl-obsidian-claude-gradient .oc-sc h4{font-size:17px;font-weight:600;margin-bottom:6px;color:var(--oc-text)}+.tpl-obsidian-claude-gradient .oc-sc p{font-size:14px;color:var(--oc-dim);line-height:1.6}+.tpl-obsidian-claude-gradient .oc-pill{display:inline-flex;align-items:center;gap:8px;background:var(--oc-surface2);border:1px solid var(--oc-border);border-radius:999px;padding:7px 18px;font-size:14px;font-weight:500;color:var(--oc-text);margin:4px 6px 4px 0}+.tpl-obsidian-claude-gradient .oc-quote{max-width:800px}+.tpl-obsidian-claude-gradient .oc-quote blockquote{font-size:26px;font-weight:500;line-height:1.6;position:relative;padding:0 36px;margin:0;color:var(--oc-text)}+.tpl-obsidian-claude-gradient .oc-quote blockquote::before{content:'"';position:absolute;left:-6px;top:-22px;font-size:78px;color:var(--oc-accent);opacity:.4;font-family:Georgia,serif;line-height:1}+.tpl-obsidian-claude-gradient .oc-quote .attr{margin-top:20px;font-size:13px;color:var(--oc-dim)}+.tpl-obsidian-claude-gradient .oc-big{font-size:140px;font-weight:900;line-height:.95;letter-spacing:-.04em}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-obsidian-claude-gradient">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">01 / 08</div>+ <div class="oc-tag">● OBSIDIAN × CLAUDE · 第二大脑</div>+ <h1 class="oc-h1">把 Obsidian 和 Claude<br>拧成 <span class="oc-g">一条神经</span></h1>+ <p class="oc-sub">不是又一个 AI 笔记插件 —— 是让 Claude 真正理解你 vault 的结构、链接、双向引用,<br>然后在你想写东西之前就把资料准备好。</p>+ <div style="margin-top:32px">+ <span class="oc-pill">🧠 Markdown-native</span>+ <span class="oc-pill">⚡ MCP-ready</span>+ <span class="oc-pill">🔗 双链理解</span>+ </div>+ </section>++ <!-- 2. SECTION -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">02 / 08</div>+ <div class="oc-tag">● CHAPTER 01</div>+ <h1 class="oc-h1" style="font-size:110px">Why <span class="oc-g">not</span> Notion?</h1>+ <p class="oc-sub">当你的知识多到会互相引用时,<br>「文件夹」就不够了,「数据库」也不是答案。</p>+ </section>++ <!-- 3. CONTENT — compare cards -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">03 / 08</div>+ <div class="oc-tag">● COMPARE</div>+ <h2 class="oc-h2">Notion vs <span class="oc-g">Obsidian</span> · 对 AI 友好度</h2>+ <div class="oc-grid-2">+ <div class="oc-card">+ <span class="oc-badge oc-bb">NOTION</span>+ <h4 style="font-size:20px;margin-bottom:10px">数据库原生</h4>+ <p style="color:var(--oc-dim);font-size:14px;line-height:1.65">适合结构化任务、团队协作,但是——<br>• AI 要走 API,拿不到实时全文<br>• 嵌套块结构复杂,token 成本高<br>• 本地化差,没法当长期记忆</p>+ </div>+ <div class="oc-card" style="border-color:rgba(168,85,247,.35);background:rgba(124,58,237,.05)">+ <span class="oc-badge oc-bp">OBSIDIAN</span>+ <h4 style="font-size:20px;margin-bottom:10px">纯 Markdown + 双链</h4>+ <p style="color:var(--oc-dim);font-size:14px;line-height:1.65">对 AI 天生友好 ——<br>• 所有东西就是文件,Claude 直接读<br>• 双链 = 天然 graph,抽实体几乎零成本<br>• 离线、可 git、可 diff、可回滚</p>+ </div>+ </div>+ <div class="oc-hl" style="margin-top:26px">💡 <b>关键洞察:</b>AI 不需要「更聪明的数据库」,它需要「能被它自己读懂的文件系统」。</div>+ </section>++ <!-- 4. STEPS -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">04 / 08</div>+ <div class="oc-tag">● SETUP · 4 STEPS</div>+ <h2 class="oc-h2">从 0 到第一次「AI 写笔记」</h2>+ <div class="oc-steps">+ <div class="oc-step"><div class="oc-sn">1</div><div class="oc-sc"><h4>装 Obsidian + 开 Local REST API 插件</h4><p>社区插件,一个勾就开。它让外部进程能 read/write 你的 vault。</p></div></div>+ <div class="oc-step"><div class="oc-sn">2</div><div class="oc-sc"><h4>接 Claude Desktop + obsidian-mcp server</h4><p>MCP 一个配置文件就能接,token 填 vault 的 api key。</p></div></div>+ <div class="oc-step"><div class="oc-sn">3</div><div class="oc-sc"><h4>装 5 个 obsidian-skills</h4><p>markdown / bases / canvas / cli / defuddle —— 让 Claude 知道怎么正确使用 Obsidian。</p></div></div>+ <div class="oc-step"><div class="oc-sn">4</div><div class="oc-sc"><h4>让 Claude 自己整理一次</h4><p>「帮我把最近 10 篇笔记里的重复概念合并,生成一张新的 MOC」—— 90 秒出结果。</p></div></div>+ </div>+ </section>++ <!-- 5. CODE -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">05 / 08</div>+ <div class="oc-tag">● MCP CONFIG</div>+ <h2 class="oc-h2">claude_desktop_config.json</h2>+ <pre class="oc-code"><span class="cm">// ~/Library/Application Support/Claude/claude_desktop_config.json</span>+{+ <span class="cc">"mcpServers"</span>: {+ <span class="cc">"obsidian"</span>: {+ <span class="cc">"command"</span>: <span class="cs">"npx"</span>,+ <span class="cc">"args"</span>: [<span class="cs">"-y"</span>, <span class="cs">"@modelcontextprotocol/server-obsidian"</span>],+ <span class="cc">"env"</span>: {+ <span class="cc">"OBSIDIAN_API_KEY"</span>: <span class="cs">"xxxxxxxxxxxxxxxx"</span>,+ <span class="cc">"OBSIDIAN_HOST"</span>: <span class="cs">"http://127.0.0.1:27123"</span>+ }+ }+ }+}</pre>+ <p class="oc-sub" style="margin-top:18px">重启 Claude Desktop,输入 <b style="color:var(--oc-accent3)">/mcp</b>,你会看到 obsidian 已连。</p>+ </section>++ <!-- 6. STATS -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">06 / 08</div>+ <div class="oc-tag">● 3 MONTHS IN</div>+ <h2 class="oc-h2">跑了 90 天,我的 <span class="oc-g">vault 数据</span></h2>+ <div class="oc-grid-3" style="margin-top:28px">+ <div class="oc-card" style="text-align:center"><div class="oc-big oc-g" style="font-size:80px">1,842</div><p style="color:var(--oc-dim);margin-top:8px;font-size:13px">notes in vault</p></div>+ <div class="oc-card" style="text-align:center"><div class="oc-big oc-g" style="font-size:80px">6.3k</div><p style="color:var(--oc-dim);margin-top:8px;font-size:13px">backlinks (由 AI 自动补)</p></div>+ <div class="oc-card" style="text-align:center"><div class="oc-big oc-g" style="font-size:80px">-74%</div><p style="color:var(--oc-dim);margin-top:8px;font-size:13px">找资料平均耗时</p></div>+ </div>+ <div class="oc-hl" style="margin-top:26px">最大收益不是「AI 帮我写」,而是「AI 帮我把旧笔记重新连起来」—— 每周 30 分钟,vault 就会主动生长。</div>+ </section>++ <!-- 7. QUOTE / CTA -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">07 / 08</div>+ <div class="oc-tag">● CTA · 今晚可以做</div>+ <div class="oc-quote">+ <blockquote>不要再找「AI 笔记应用」了。<br>你要的是一个 <span class="oc-g">文件夹 + 一条神经</span>。</blockquote>+ <div class="attr">— 我自己,用了 90 天后</div>+ </div>+ <div style="margin-top:36px">+ <span class="oc-pill">⬇ obsidian.md</span>+ <span class="oc-pill">⬇ Claude Desktop</span>+ <span class="oc-pill">⬇ obsidian-mcp</span>+ <span class="oc-pill">⬇ obsidian-skills × 5</span>+ </div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="oc-cbg"></div>+ <div class="oc-cgrid"></div>+ <div class="oc-snum">08 / 08</div>+ <div class="oc-big oc-g">Thanks.</div>+ <p class="oc-sub" style="margin-top:26px">配置模板、skill manifest、我的 vault 结构图都在 <b style="color:var(--oc-accent3)">github.com/lewis/obsidian-claude</b></p>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-open-slide-canvas/SKILL.md b/src/lib/templates/skills/deck-open-slide-canvas/SKILL.mdnew file mode 100644index 00000000..c0decf37--- /dev/null+++ b/src/lib/templates/skills/deck-open-slide-canvas/SKILL.md@@ -0,0 +1,53 @@+---+name: deck-open-slide-canvas+zh_name: "1920 画布自由 Deck"+en_name: "Open-Slide 1920 Canvas Deck"+emoji: "🎨"+description: "锁死 1920×1080 画布, React 组件级自由组合, 不绑模板"+category: slides+scenario: design+aspect_hint: "1920×1080 (16:9)"+featured: 35+recommended: 9+tags: ["canvas", "open-slide", "freeform", "1920", "react"]+example_id: sample-deck-open-slide-canvas+example_name: "1920 自由画布 · Sea Indigo"+example_format: markdown+example_tagline: "锁死 1920×1080 + 自由组合"+example_desc: "Sea Indigo 调色 + 一页大字 question + 角标"+example_source_url: "https://github.com/1weiho/open-slide"+example_source_label: "1weiho/open-slide"+---++【模板: 1920 画布自由 Deck】+【意图】不想被模板束缚的场景 (个人作品集、奇特演讲、艺术 / 设计课 deck)。给一个固定 1920×1080 画布 + 极强的类型 / 调色约束, 让 agent 像写 React 组件一样按内容自由排布每一页。Inspired by 1weiho/open-slide。++【硬性技术规格】+- 画布: 每页严格 `width: 1920px; height: 1080px;` 用 `transform: scale(...)` 适配视窗 (默认 `scale(0.7)` 居中)。+- **绝对禁止 overflow**: 每页内容必须 fit in 1920×1080, 不许滚动条出现。+- 字号 type scale (px): `2xs:18 · xs:22 · sm:28 · md:36 · lg:48 · xl:64 · 2xl:88 · 3xl:120 · 4xl:160 · 5xl:220`。+- 边距 padding: 96 / 128 / 160 三档之一。+- 每页有 `<section class="slide" data-slide-id="<n>">`。++【调色板 — 每个 deck 选 1 套, 全程不改】+- 🌫 **Ash & Lime** — bg `#f1efea`, ink `#161616`, accent `#c5e803`。+- 🌌 **Sea Indigo** — bg `#0a0e1a`, ink `#f5f5f7`, accent `#5ac8fa`。+- 🧉 **Mate Mocha** — bg `#1a1411`, ink `#f5e9d6`, accent `#d97757`。+- 🌸 **Pearl Rose** — bg `#fdf6f3`, ink `#1a1015`, accent `#ff5d8f`。++【布局自由度 — 这是核心】+- 不强制模板, 每页根据**内容性质**自选布局: cover / question / quote / image-text / 三列 / 五列 / 列表 / 数据卡 / 满版图。+- 但每页**必须遵守一条规则**: 视觉重心 (visual hierarchy) 只有 1 个 — 一句金句、一个数字、一张图, 不要"什么都强调"。+- 不许塞两段平等的文字; 真要并列就上 3 列等权重网格。++【字体】+- 西文: `Inter Tight` (display) + `Inter` (body); 或 `Source Serif Pro` (editorial 风时)。+- 中文: `Noto Sans SC` (sans 风) 或 `Noto Serif SC` (editorial 风); 不混 sans + serif。+- mono: `JetBrains Mono` 给数据 / 时间戳。++【设计细节】+- 严禁 emoji 装饰 (内容里的允许); 严禁多色彩虹; accent 只用一个色。+- 严禁 SVG icon 套用 lucide / feather 等通用库 (自己写 inline SVG)。+- 加键盘 ← / → 切换 + hash 同步; 角标固定: 右下 `№N/M`, 左下 deck title。+- 必须用用户的真实内容; 严禁 lorem ipsum。+- 单文件 HTML; Tailwind CDN; 不要外链图片。diff --git a/src/lib/templates/skills/deck-open-slide-canvas/example.html b/src/lib/templates/skills/deck-open-slide-canvas/example.htmlnew file mode 100644index 00000000..f3408242--- /dev/null+++ b/src/lib/templates/skills/deck-open-slide-canvas/example.html@@ -0,0 +1,51 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Open-Slide Canvas · 一句问题</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800;900&family=Inter:wght@400;500&family=Noto+Sans+SC:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />+<style>+ body { font-family:'Inter Tight','Noto Sans SC',system-ui,sans-serif; background:#020306; margin:0; min-height:100vh; }+ .slide-frame { width:1280px; height:720px; transform:scale(0.78); transform-origin: top left; }+ .canvas { background:#0a0e1a; color:#f5f5f7; }+ .accent { color:#5ac8fa; }+ .mono { font-family:'JetBrains Mono',ui-monospace,monospace; }+ /* hairline diag bg */+ .grain {+ background-image:+ radial-gradient(circle at 20% 80%, rgba(90,200,250,0.10) 0%, transparent 50%),+ radial-gradient(circle at 80% 30%, rgba(124,92,255,0.08) 0%, transparent 55%);+ }+</style>+</head>+<body class="p-10 overflow-hidden">+<div class="slide-frame canvas grain relative">+ <div class="absolute inset-0 p-32 flex flex-col justify-between">+ <header class="flex items-baseline justify-between mono text-[11px] uppercase tracking-[0.18em] opacity-60">+ <span>HTML-ANYTHING · DECK · OPEN-SLIDE CANVAS</span>+ <span>SEA INDIGO</span>+ <span>№05 / 12</span>+ </header>++ <div>+ <div class="mono text-[12px] uppercase tracking-[0.22em] accent">Question 03</div>+ <h1 class="mt-6 font-black leading-[0.95] tracking-[-0.025em]" style="font-size:120px">+ 当生成内容的成本<br/>+ 逼近 <span class="accent">零</span>, 留下的<br/>+ 只有 <em class="not-italic" style="font-family:'Source Serif Pro',serif;font-style:italic;font-weight:500">品味</em>。+ </h1>+ <p class="mt-10 text-[28px] opacity-70 max-w-[820px] leading-snug">+ 你打算在哪一帧上, 让读者停下来?+ </p>+ </div>++ <footer class="flex items-baseline justify-between mono text-[11px] uppercase tracking-[0.18em] opacity-50">+ <span>1920 × 1080 · CANVAS · KBD ← →</span>+ <span class="accent">github.com/1weiho/open-slide</span>+ <span>00 : 03 : 21</span>+ </footer>+ </div>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/deck-open-slide-canvas/example.md b/src/lib/templates/skills/deck-open-slide-canvas/example.mdnew file mode 100644index 00000000..eaea86bf--- /dev/null+++ b/src/lib/templates/skills/deck-open-slide-canvas/example.md@@ -0,0 +1,6 @@+# 一句关键问题++> Sea Indigo 调色, 单页 hero question 风格++## 问题+当生成内容的成本逼近零, 留下的只有品味 —— 你打算在哪一帧上, 让读者停下来?diff --git a/src/lib/templates/skills/deck-pitch/SKILL.md b/src/lib/templates/skills/deck-pitch/SKILL.mdnew file mode 100644index 00000000..0610dd32--- /dev/null+++ b/src/lib/templates/skills/deck-pitch/SKILL.md@@ -0,0 +1,26 @@+---+name: deck-pitch+zh_name: "投资人 Pitch Deck"+en_name: "Investor Pitch Deck"+emoji: "🚀"+description: "10 页融资 deck, 白底 + 蓝紫渐变 hero, traction 柱状, $X.XM ask"+category: slides+scenario: finance+aspect_hint: "16:9 ×10"+featured: 20+tags: ["pitch", "investor", "seed", "vc"]+---++【模板: Investor Pitch Deck】+【意图】10 页投资人 ready 的 fundraising deck。+【布局】+- Cover (Logo + Tagline + Round/$Ask)+- Problem · Solution · Why Now+- Product (截图占位)+- Market size (TAM/SAM/SOM)+- Traction (柱状图大数字)+- Business model+- Go-to-market+- Team+- Ask: $4.5M-style page+- Thanks / Contactdiff --git a/src/lib/templates/skills/deck-pitch/example.html b/src/lib/templates/skills/deck-pitch/example.htmlnew file mode 100644index 00000000..269dd53e--- /dev/null+++ b/src/lib/templates/skills/deck-pitch/example.html@@ -0,0 +1,495 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">+<title>Lumen · Pitch Deck</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* html-ppt :: animations.css+ * Apply by adding class="anim-<name>" or data-anim="<name>".+ * Durations are deliberately snappy; tweak --anim-dur per element.+ */+:root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}++/* ---------- FADE DIRECTIONALS ---------- */+@keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}+@keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}+.anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}+.anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}+.anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}+.anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}++/* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */+@keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}+@keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}+@keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}+@keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}+@keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}+ 20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}+ 40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}+ 60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}+ 80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}+ 100%{opacity:1;transform:none}}+.anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}+.anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}+.anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}+.anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}+.anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}++/* ---------- TYPEWRITER ---------- */+.anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;+ width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}+@keyframes kf-type{to{width:100%}}+@keyframes kf-caret{50%{border-color:transparent}}++/* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */+@keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}+ 50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}+.anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}++.anim-shimmer-sweep{position:relative;overflow:hidden}+.anim-shimmer-sweep::after{content:"";position:absolute;inset:0;+ background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);+ transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}+@keyframes kf-shimmer{to{transform:translateX(100%)}}++.anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));+ background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;+ animation:kf-gradflow 4s linear infinite}+@keyframes kf-gradflow{to{background-position:300% 0}}++/* ---------- STAGGER LIST ---------- */+.anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}+.anim-stagger-list > *:nth-child(1){animation-delay:.05s}+.anim-stagger-list > *:nth-child(2){animation-delay:.15s}+.anim-stagger-list > *:nth-child(3){animation-delay:.25s}+.anim-stagger-list > *:nth-child(4){animation-delay:.35s}+.anim-stagger-list > *:nth-child(5){animation-delay:.45s}+.anim-stagger-list > *:nth-child(6){animation-delay:.55s}+.anim-stagger-list > *:nth-child(7){animation-delay:.65s}+.anim-stagger-list > *:nth-child(8){animation-delay:.75s}+.anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}++/* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */+.counter{font-variant-numeric:tabular-nums}++/* ---------- SVG PATH DRAW ---------- */+.anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{+ stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}+@keyframes kf-draw{to{stroke-dashoffset:0}}++/* ---------- PARALLAX TILT (hover) ---------- */+.anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}+.anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}++/* ---------- CARD FLIP 3D ---------- */+@keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}+ to{transform:perspective(1200px) rotateY(0);opacity:1}}+.anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}++/* ---------- CUBE ROTATE 3D ---------- */+@keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}+ to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}+.anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}++/* ---------- PAGE TURN 3D ---------- */+@keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}+ to{transform:perspective(1600px) rotateY(0);opacity:1}}+.anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}++/* ---------- PERSPECTIVE ZOOM ---------- */+@keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}+ to{opacity:1;transform:none}}+.anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}++/* ---------- MARQUEE SCROLL ---------- */+.anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}+@keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}++/* ---------- KEN BURNS ---------- */+@keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}+.anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}++/* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */+.anim-confetti-burst{position:relative}+.anim-confetti-burst::before,.anim-confetti-burst::after{+ content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;+ background:var(--accent);box-shadow:+ 20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),+ 30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),+ 40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),+ 10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));+ opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}+.anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}+@keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}++/* ---------- SPOTLIGHT ---------- */+@keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}+.anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}++/* ---------- MORPH SHAPE (SVG) ---------- */+.anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}+@keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}+ 100%{d:path("M60,120 Q120,220 180,120 T300,120")}}++/* ---------- RIPPLE REVEAL ---------- */+@keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}+ 100%{clip-path:circle(160% at 20% 80%);opacity:1}}+.anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}++/* reduced motion */+@media (prefers-reduced-motion: reduce){+ [class*="anim-"]{animation:none!important;transition:none!important}+}++</style>+<style>/* pitch-deck — classic YC/VC pitch */+.tpl-pitch-deck{+ --bg:#ffffff;--bg-soft:#f6f7fb;--surface:#ffffff;--surface-2:#f2f4fa;+ --border:rgba(20,25,60,.08);--border-strong:rgba(20,25,60,.18);+ --text-1:#0d1130;--text-2:#4a5070;--text-3:#8a90ad;+ --accent:#3b5bff;--accent-2:#7a46ff;--accent-3:#d94cff;+ --grad:linear-gradient(135deg,#3b5bff 0%,#7a46ff 55%,#d94cff 100%);+ --grad-soft:linear-gradient(135deg,#eef1ff,#f4edff 55%,#fbedff);+ --radius:20px;--radius-lg:28px;+ --shadow:0 14px 40px rgba(20,25,60,.08),0 2px 8px rgba(20,25,60,.04);+ font-family:'Inter','Noto Sans SC',sans-serif;+}+.tpl-pitch-deck .slide{padding:88px 112px}+.tpl-pitch-deck .kicker{color:var(--accent);font-weight:700}+.tpl-pitch-deck .h1{font-size:86px;line-height:1.02;font-weight:900;letter-spacing:-.035em}+.tpl-pitch-deck .h2{font-size:62px;font-weight:800;letter-spacing:-.03em}+.tpl-pitch-deck .mega{font-size:180px;font-weight:900;line-height:.95;letter-spacing:-.05em;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}+.tpl-pitch-deck .mega-sub{font-size:28px;color:var(--text-2);margin-top:18px}+.tpl-pitch-deck .cover-bg{position:absolute;inset:0;background:var(--grad-soft);z-index:-1}+.tpl-pitch-deck .cover-blob{position:absolute;right:-140px;top:-140px;width:560px;height:560px;border-radius:50%;background:var(--grad);filter:blur(8px);opacity:.35;z-index:-1}+.tpl-pitch-deck .brand-dot{display:inline-block;width:14px;height:14px;border-radius:50%;background:var(--grad);margin-right:10px;vertical-align:middle}+.tpl-pitch-deck .brand{font-weight:800;font-size:22px;letter-spacing:-.02em}+.tpl-pitch-deck .card{border-radius:var(--radius)}+.tpl-pitch-deck .num-tag{font-family:'Inter',sans-serif;font-size:14px;font-weight:700;color:var(--accent);letter-spacing:.12em}+.tpl-pitch-deck .big-q{font-family:'Playfair Display',serif;font-size:56px;line-height:1.15;font-weight:700;letter-spacing:-.02em;max-width:22ch}+.tpl-pitch-deck .metric{display:flex;flex-direction:column;gap:6px}+.tpl-pitch-deck .metric .n{font-size:72px;font-weight:900;letter-spacing:-.035em;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;line-height:1}+.tpl-pitch-deck .metric .l{color:var(--text-2);font-size:16px}+.tpl-pitch-deck .team-card{text-align:center;padding:32px 20px}+.tpl-pitch-deck .avatar{width:96px;height:96px;border-radius:50%;margin:0 auto 14px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:32px}+.tpl-pitch-deck .ask-box{background:var(--grad);color:#fff;padding:56px 64px;border-radius:var(--radius-lg);box-shadow:0 30px 70px rgba(59,91,255,.35)}+.tpl-pitch-deck .ask-box .h2{color:#fff}+.tpl-pitch-deck .ask-box .dim{color:rgba(255,255,255,.85)}+.tpl-pitch-deck .traction-bar{display:flex;align-items:flex-end;gap:14px;height:240px;margin-top:24px}+.tpl-pitch-deck .traction-bar .bar{flex:1;background:var(--grad);border-radius:8px 8px 0 0;position:relative;min-height:20px}+.tpl-pitch-deck .traction-bar .bar span{position:absolute;bottom:-28px;left:0;right:0;text-align:center;font-size:13px;color:var(--text-3)}+.tpl-pitch-deck .traction-bar .bar em{position:absolute;top:-28px;left:0;right:0;text-align:center;font-size:14px;font-weight:700;font-style:normal;color:var(--text-1)}+.tpl-pitch-deck .section-num{font-size:220px;font-weight:900;line-height:.9;color:var(--surface-2);position:absolute;right:72px;bottom:40px;z-index:0;letter-spacing:-.05em}+.tpl-pitch-deck .slide > *{position:relative;z-index:1}+.tpl-pitch-deck .deck-footer{color:var(--text-3)}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-pitch-deck">+<div class="deck">++ <!-- 1. Cover -->+ <section class="slide" data-title="Cover">+ <div class="cover-bg"></div>+ <div class="cover-blob"></div>+ <div style="position:absolute;top:56px;left:112px"><span class="brand-dot"></span><span class="brand">Lumen</span></div>+ <p class="kicker">Seed round · 2026</p>+ <h1 class="h1 anim-fade-up" data-anim="fade-up">The operating system<br>for <span class="gradient-text">solo founders</span>.</h1>+ <p class="lede mt-m">One workspace for billing, CRM, contracts and taxes — built for the 70M people running a business of one.</p>+ <div class="deck-footer"><span>Maya Chen · CEO</span><span class="slide-number" data-current="1" data-total="10"></span></div>+ </section>++ <!-- 2. Problem -->+ <section class="slide" data-title="Problem">+ <span class="section-num">01</span>+ <p class="num-tag">PROBLEM</p>+ <h2 class="h2 mt-s">Solo founders duct-tape<br>7+ tools to stay alive.</h2>+ <div class="grid g3 mt-l">+ <div class="card"><h4>Fragmentation</h4><p class="dim">Stripe, QuickBooks, HubSpot, DocuSign, Notion, Gusto, a spreadsheet. Nothing talks.</p></div>+ <div class="card"><h4>$480/mo wasted</h4><p class="dim">Average solo founder pays for 9 SaaS seats they only half-use.</p></div>+ <div class="card"><h4>14 hrs / week lost</h4><p class="dim">Copy-pasting between tools instead of selling.</p></div>+ </div>+ </section>++ <!-- 3. Solution -->+ <section class="slide" data-title="Solution">+ <span class="section-num">02</span>+ <p class="num-tag">SOLUTION</p>+ <h2 class="h2 mt-s">Lumen is <span class="gradient-text">one spine</span><br>for the business of one.</h2>+ <p class="lede mt-m">Invoice a client → the payment lands → the tax is reserved → the contract is filed → your dashboard updates. In one app. Without plumbing.</p>+ <div class="row mt-l">+ <span class="pill pill-accent">Billing</span>+ <span class="pill pill-accent">CRM</span>+ <span class="pill pill-accent">Contracts</span>+ <span class="pill pill-accent">Taxes</span>+ <span class="pill pill-accent">Banking</span>+ </div>+ </section>++ <!-- 4. Product -->+ <section class="slide" data-title="Product">+ <span class="section-num">03</span>+ <p class="num-tag">PRODUCT</p>+ <h2 class="h2 mt-s">Built around "jobs to be done".</h2>+ <div class="grid g2 mt-l">+ <div class="card card-hover"><h4>Get paid</h4><p class="dim">Invoices, subscriptions and Stripe/Wise payouts with a single click. ACH, card, wire, crypto.</p></div>+ <div class="card card-hover"><h4>Stay legal</h4><p class="dim">E-sign contracts from templates. Auto-file 1099s and quarterly estimates.</p></div>+ <div class="card card-hover"><h4>Sell smarter</h4><p class="dim">Lead inbox, pipeline, email sequences. No separate CRM.</p></div>+ <div class="card card-hover"><h4>See the business</h4><p class="dim">Live P&L, runway, top customers, churn. One dashboard, zero spreadsheets.</p></div>+ </div>+ </section>++ <!-- 5. Market -->+ <section class="slide" data-title="Market">+ <span class="section-num">04</span>+ <p class="num-tag">MARKET</p>+ <h2 class="h2 mt-s">A very big small business.</h2>+ <div class="grid g3 mt-l">+ <div class="metric"><div class="n">73M</div><div class="l">solo businesses in the US + EU</div></div>+ <div class="metric"><div class="n">$186B</div><div class="l">TAM · horizontal SaaS spend</div></div>+ <div class="metric"><div class="n">9.4%</div><div class="l">CAGR through 2030</div></div>+ </div>+ <p class="lede mt-l">Creators, consultants, indie devs, coaches, freelancers — the fastest-growing segment of the workforce, and the most under-served by tooling.</p>+ </section>++ <!-- 6. Business model -->+ <section class="slide" data-title="Business Model">+ <span class="section-num">05</span>+ <p class="num-tag">BUSINESS MODEL</p>+ <h2 class="h2 mt-s">Flat SaaS + payment rake.</h2>+ <div class="grid g3 mt-l">+ <div class="card"><h4>Starter</h4><div class="metric mt-s"><div class="n" style="font-size:56px">$29</div><div class="l">/ month · core billing + CRM</div></div></div>+ <div class="card card-accent"><h4>Pro</h4><div class="metric mt-s"><div class="n" style="font-size:56px">$79</div><div class="l">/ month · contracts, taxes, banking</div></div></div>+ <div class="card"><h4>+ Payments</h4><div class="metric mt-s"><div class="n" style="font-size:56px">0.4%</div><div class="l">interchange rake on processed volume</div></div></div>+ </div>+ <p class="dim mt-l">Blended LTV $1,920 · CAC payback 5 months at current funnel.</p>+ </section>++ <!-- 7. Traction -->+ <section class="slide" data-title="Traction">+ <span class="section-num">06</span>+ <p class="num-tag">TRACTION</p>+ <h2 class="h2 mt-s">6 months, growing 38% MoM.</h2>+ <div class="traction-bar mt-l">+ <div class="bar" style="height:18%"><em>$6k</em><span>Oct</span></div>+ <div class="bar" style="height:30%"><em>$11k</em><span>Nov</span></div>+ <div class="bar" style="height:44%"><em>$17k</em><span>Dec</span></div>+ <div class="bar" style="height:62%"><em>$26k</em><span>Jan</span></div>+ <div class="bar" style="height:82%"><em>$38k</em><span>Feb</span></div>+ <div class="bar" style="height:100%"><em>$54k</em><span>Mar</span></div>+ </div>+ <p class="dim mt-l" style="margin-top:48px">2,140 paying customers · NPS 72 · Net retention 118%</p>+ </section>++ <!-- 8. Team -->+ <section class="slide" data-title="Team">+ <span class="section-num">07</span>+ <p class="num-tag">TEAM</p>+ <h2 class="h2 mt-s">Shipped at scale before.</h2>+ <div class="grid g3 mt-l">+ <div class="card team-card"><div class="avatar">MC</div><h4>Maya Chen</h4><p class="dim">CEO · ex-Stripe billing lead. 8 yrs in payments.</p></div>+ <div class="card team-card"><div class="avatar">RP</div><h4>Raj Patel</h4><p class="dim">CTO · ex-Linear. Built multiplayer sync at 10M users.</p></div>+ <div class="card team-card"><div class="avatar">EK</div><h4>Elena Kim</h4><p class="dim">Head of Design · ex-Notion. Shipped the mobile relaunch.</p></div>+ </div>+ </section>++ <!-- 9. Ask -->+ <section class="slide" data-title="The Ask">+ <p class="num-tag">THE ASK</p>+ <div class="ask-box mt-m">+ <h2 class="h2">Raising $4.5M seed.</h2>+ <p class="lede" style="color:rgba(255,255,255,.9);max-width:60ch">18 months of runway to reach $3M ARR. 40% engineering, 35% growth, 15% compliance/banking licenses, 10% runway buffer.</p>+ <div class="row mt-l" style="gap:40px">+ <div><div style="font-size:44px;font-weight:900">$4.5M</div><div class="dim">SAFE · post-money cap $28M</div></div>+ <div><div style="font-size:44px;font-weight:900">18 mo</div><div class="dim">runway to Series A</div></div>+ <div><div style="font-size:44px;font-weight:900">$3M</div><div class="dim">ARR target by close</div></div>+ </div>+ </div>+ </section>++ <!-- 10. Thanks -->+ <section class="slide center tc" data-title="Thanks">+ <div class="cover-bg"></div>+ <div>+ <div class="mega">Thanks.</div>+ <p class="mega-sub">[email protected] · lumen.app/investors</p>+ <div class="row mt-l" style="justify-content:center;gap:24px">+ <span class="pill pill-accent">Let's talk</span>+ <span class="pill">Deck v4.2 · Apr 2026</span>+ </div>+ </div>+ </section>++</div>++</body></html>diff --git a/src/lib/templates/skills/deck-presenter-mode/SKILL.md b/src/lib/templates/skills/deck-presenter-mode/SKILL.mdnew file mode 100644index 00000000..a97f82d9--- /dev/null+++ b/src/lib/templates/skills/deck-presenter-mode/SKILL.md@@ -0,0 +1,21 @@+---+name: deck-presenter-mode+zh_name: "演讲者模式 Deck"+en_name: "Presenter Mode Deck"+emoji: "🎤"+description: "tokyo-night 默认主题, T 切换 5 主题, S 打开提词器 popup"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 26+tags: ["presenter", "notes", "提词", "teleprompter"]+---++【模板: Presenter Mode Deck】+【意图】怕忘词的演讲者专用 deck, 含逐字稿 notes 与 popup teleprompter。+【布局】+- 每页 + `<aside class="notes">` 150-300 字稿+- 右下小 toolbar: T 切主题 / S 打开 popup+- Popup: CURRENT / NEXT / SCRIPT / TIMER 四张磁吸卡+【设计细节】+- 默认 tokyo-night; 共 5 套主题 (含 light)diff --git a/src/lib/templates/skills/deck-presenter-mode/example.html b/src/lib/templates/skills/deck-presenter-mode/example.htmlnew file mode 100644index 00000000..844676d8--- /dev/null+++ b/src/lib/templates/skills/deck-presenter-mode/example.html@@ -0,0 +1,725 @@+<!DOCTYPE html>+<html lang="zh-CN" data-themes="tokyo-night,dracula,catppuccin-mocha,nord,corporate-clean">+<head>+<meta charset="utf-8">+<meta name="viewport" content="width=device-width,initial-scale=1">+<title>演讲者模式示例 · Presenter Mode Deck</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style data-theme="tokyo-night">/* theme: tokyo-night */+:root{+ --bg:#1a1b26;--bg-soft:#16161e;--surface:#24283b;--surface-2:#2f334d;+ --border:rgba(192,202,245,.12);--border-strong:rgba(192,202,245,.24);+ --text-1:#c0caf5;--text-2:#a9b1d6;--text-3:#565f89;+ --accent:#7aa2f7;--accent-2:#bb9af7;--accent-3:#7dcfff;+ --good:#9ece6a;--warn:#e0af68;--bad:#f7768e;+ --grad:linear-gradient(135deg,#7aa2f7,#bb9af7 55%,#f7768e);+ --grad-soft:linear-gradient(135deg,#24283b,#2f334d);+ --radius:12px;--radius-sm:8px;--radius-lg:20px;+ --shadow:0 10px 30px rgba(0,0,0,.45);+ --shadow-lg:0 24px 62px rgba(0,0,0,.6);+ --font-sans:'Inter','Noto Sans SC',sans-serif;+}++</style>+<style>/* html-ppt :: animations.css+ * Apply by adding class="anim-<name>" or data-anim="<name>".+ * Durations are deliberately snappy; tweak --anim-dur per element.+ */+:root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}++/* ---------- FADE DIRECTIONALS ---------- */+@keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}+@keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}+.anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}+.anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}+.anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}+.anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}++/* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */+@keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}+@keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}+@keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}+@keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}+@keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}+ 20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}+ 40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}+ 60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}+ 80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}+ 100%{opacity:1;transform:none}}+.anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}+.anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}+.anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}+.anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}+.anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}++/* ---------- TYPEWRITER ---------- */+.anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;+ width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}+@keyframes kf-type{to{width:100%}}+@keyframes kf-caret{50%{border-color:transparent}}++/* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */+@keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}+ 50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}+.anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}++.anim-shimmer-sweep{position:relative;overflow:hidden}+.anim-shimmer-sweep::after{content:"";position:absolute;inset:0;+ background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);+ transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}+@keyframes kf-shimmer{to{transform:translateX(100%)}}++.anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));+ background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;+ animation:kf-gradflow 4s linear infinite}+@keyframes kf-gradflow{to{background-position:300% 0}}++/* ---------- STAGGER LIST ---------- */+.anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}+.anim-stagger-list > *:nth-child(1){animation-delay:.05s}+.anim-stagger-list > *:nth-child(2){animation-delay:.15s}+.anim-stagger-list > *:nth-child(3){animation-delay:.25s}+.anim-stagger-list > *:nth-child(4){animation-delay:.35s}+.anim-stagger-list > *:nth-child(5){animation-delay:.45s}+.anim-stagger-list > *:nth-child(6){animation-delay:.55s}+.anim-stagger-list > *:nth-child(7){animation-delay:.65s}+.anim-stagger-list > *:nth-child(8){animation-delay:.75s}+.anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}++/* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */+.counter{font-variant-numeric:tabular-nums}++/* ---------- SVG PATH DRAW ---------- */+.anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{+ stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}+@keyframes kf-draw{to{stroke-dashoffset:0}}++/* ---------- PARALLAX TILT (hover) ---------- */+.anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}+.anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}++/* ---------- CARD FLIP 3D ---------- */+@keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}+ to{transform:perspective(1200px) rotateY(0);opacity:1}}+.anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}++/* ---------- CUBE ROTATE 3D ---------- */+@keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}+ to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}+.anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}++/* ---------- PAGE TURN 3D ---------- */+@keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}+ to{transform:perspective(1600px) rotateY(0);opacity:1}}+.anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}++/* ---------- PERSPECTIVE ZOOM ---------- */+@keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}+ to{opacity:1;transform:none}}+.anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}++/* ---------- MARQUEE SCROLL ---------- */+.anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}+@keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}++/* ---------- KEN BURNS ---------- */+@keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}+.anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}++/* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */+.anim-confetti-burst{position:relative}+.anim-confetti-burst::before,.anim-confetti-burst::after{+ content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;+ background:var(--accent);box-shadow:+ 20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),+ 30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),+ 40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),+ 10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));+ opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}+.anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}+@keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}++/* ---------- SPOTLIGHT ---------- */+@keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}+.anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}++/* ---------- MORPH SHAPE (SVG) ---------- */+.anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}+@keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}+ 100%{d:path("M60,120 Q120,220 180,120 T300,120")}}++/* ---------- RIPPLE REVEAL ---------- */+@keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}+ 100%{clip-path:circle(160% at 20% 80%);opacity:1}}+.anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}++/* reduced motion */+@media (prefers-reduced-motion: reduce){+ [class*="anim-"]{animation:none!important;transition:none!important}+}++</style>+<style>/* tpl-presenter-mode-reveal · scoped styles+ * Presenter-mode demo deck. Inherits tokens from active theme.+ * Minimal overrides — focus is on content + notes structure.+ */++.tpl-presenter-mode-reveal .slide {+ padding: 72px 96px;+}++.tpl-presenter-mode-reveal .kicker {+ font-family: var(--font-mono, monospace);+ font-size: 13px;+ color: var(--text-3);+ letter-spacing: 0.14em;+ text-transform: uppercase;+ margin: 0 0 18px 0;+}++.tpl-presenter-mode-reveal .h1 {+ font-size: clamp(44px, 5.6vw, 76px);+ line-height: 1.12;+ letter-spacing: -0.02em;+ margin: 0 0 24px 0;+}++.tpl-presenter-mode-reveal .h2 {+ font-size: clamp(32px, 3.6vw, 48px);+ line-height: 1.22;+ letter-spacing: -0.01em;+ margin: 0 0 28px 0;+}++.tpl-presenter-mode-reveal .lede {+ font-size: 20px;+ line-height: 1.55;+ color: var(--text-2);+}++.tpl-presenter-mode-reveal .mono {+ font-family: var(--font-mono, monospace);+ font-size: 0.9em;+ padding: 2px 8px;+ border-radius: 6px;+ background: rgba(255,255,255,0.08);+ color: var(--accent, #58a6ff);+}++.tpl-presenter-mode-reveal .accent {+ color: var(--accent, #f0883e);+ font-weight: 700;+}++.tpl-presenter-mode-reveal .speaker {+ display: flex;+ align-items: center;+ gap: 12px;+ margin-top: 32px;+}+.tpl-presenter-mode-reveal .speaker .av {+ width: 42px;+ height: 42px;+ border-radius: 50%;+ background: linear-gradient(135deg, var(--accent, #58a6ff), #bc8cff);+}+.tpl-presenter-mode-reveal .speaker b {+ display: block;+ font-size: 16px;+}+.tpl-presenter-mode-reveal .speaker span {+ font-size: 13px;+ color: var(--text-3);+}++/* Agenda rows */+.tpl-presenter-mode-reveal .agenda-row {+ display: grid;+ grid-template-columns: 48px 1fr auto;+ gap: 16px;+ align-items: center;+ padding: 14px 18px;+ border: 1px solid var(--border, rgba(255,255,255,0.1));+ border-radius: 10px;+ margin-bottom: 10px;+ background: var(--surface, rgba(255,255,255,0.03));+}+.tpl-presenter-mode-reveal .agenda-row .num {+ font-family: var(--font-mono, monospace);+ font-size: 14px;+ color: var(--accent, #58a6ff);+ font-weight: 700;+}+.tpl-presenter-mode-reveal .agenda-row .t {+ font-size: 17px;+ font-weight: 500;+ color: var(--text-1);+}+.tpl-presenter-mode-reveal .agenda-row .d {+ font-family: var(--font-mono, monospace);+ font-size: 12px;+ color: var(--text-3);+}++/* Cards */+.tpl-presenter-mode-reveal .card {+ background: var(--surface, rgba(255,255,255,0.03));+ border: 1px solid var(--border, rgba(255,255,255,0.1));+ border-radius: 12px;+ padding: 22px 24px;+}+.tpl-presenter-mode-reveal .card-accent {+ border-top: 3px solid var(--accent, #58a6ff);+}+.tpl-presenter-mode-reveal .card h4 {+ margin: 0 0 10px 0;+ font-size: 18px;+ color: var(--text-1);+}+.tpl-presenter-mode-reveal .card .dim {+ color: var(--text-2);+ font-size: 14px;+ line-height: 1.6;+ margin: 0;+}++/* Feature rows (presenter view features) */+.tpl-presenter-mode-reveal .feature-row {+ display: flex;+ gap: 14px;+ padding: 14px 0;+ border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));+}+.tpl-presenter-mode-reveal .feature-row:last-child { border-bottom: none; }+.tpl-presenter-mode-reveal .feature-row .num {+ font-size: 24px;+ font-weight: 700;+ line-height: 1;+ flex-shrink: 0;+}+.tpl-presenter-mode-reveal .feature-row b {+ display: block;+ font-size: 17px;+ margin-bottom: 4px;+ color: var(--text-1);+}+.tpl-presenter-mode-reveal .feature-row .dim {+ font-size: 14px;+ color: var(--text-2);+ line-height: 1.55;+ margin: 0;+}+.tpl-presenter-mode-reveal .blue { color: #58a6ff; }+.tpl-presenter-mode-reveal .green { color: #3fb950; }+.tpl-presenter-mode-reveal .orange { color: #f0883e; }+.tpl-presenter-mode-reveal .purple { color: #bc8cff; }+.tpl-presenter-mode-reveal .red { color: #f85149; }++/* Rule rows (3 铁律) */+.tpl-presenter-mode-reveal .rule-row {+ display: grid;+ grid-template-columns: 56px 1fr;+ gap: 20px;+ align-items: start;+ padding: 18px 22px;+ border: 1px solid var(--border, rgba(255,255,255,0.1));+ border-radius: 12px;+ margin-bottom: 14px;+ background: var(--surface, rgba(255,255,255,0.03));+}+.tpl-presenter-mode-reveal .rule-row .num {+ font-size: 28px;+ font-weight: 800;+ font-family: var(--font-mono, monospace);+ line-height: 1;+}+.tpl-presenter-mode-reveal .rule-row b {+ display: block;+ font-size: 18px;+ margin-bottom: 6px;+ color: var(--text-1);+}+.tpl-presenter-mode-reveal .rule-row .dim {+ font-size: 15px;+ color: var(--text-2);+ line-height: 1.6;+ margin: 0;+}++/* Code block */+.tpl-presenter-mode-reveal .code-block {+ background: #0d1117;+ border: 1px solid rgba(255,255,255,0.1);+ border-radius: 12px;+ padding: 20px 26px;+ font-family: var(--font-mono, "SF Mono", monospace);+ font-size: 15px;+ line-height: 1.8;+ color: #e6edf3;+ white-space: pre-wrap;+ text-align: left;+}+.tpl-presenter-mode-reveal .code-block .comment { color: #8b949e; }+.tpl-presenter-mode-reveal .code-block .cmd { color: #3fb950; font-weight: 600; }+.tpl-presenter-mode-reveal .code-block .flag { color: #f0883e; }++/* Stack helper */+.tpl-presenter-mode-reveal .stack > * + * { margin-top: 0; }++/* Grid helpers */+.tpl-presenter-mode-reveal .grid { display: grid; gap: 20px; }+.tpl-presenter-mode-reveal .grid.g2 { grid-template-columns: 1fr 1fr; }+.tpl-presenter-mode-reveal .grid.g3 { grid-template-columns: repeat(3, 1fr); }++.tpl-presenter-mode-reveal .mt-m { margin-top: 20px; }+.tpl-presenter-mode-reveal .mt-l { margin-top: 32px; }+.tpl-presenter-mode-reveal .mt-s { margin-top: 10px; }+.tpl-presenter-mode-reveal .tc { text-align: center; }++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-presenter-mode-reveal">+<div class="deck">++ <!-- ============ 1. COVER ============ -->+ <section class="slide" data-title="Cover">+ <p class="kicker">presenter-mode / demo</p>+ <h1 class="h1 anim-fade-up" data-anim="fade-up">如何做一场<br><span style="background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent">有逐字稿</span>的技术分享</h1>+ <p class="lede mt-m">按 <span class="mono">S</span> 进入演讲者视图 · <span class="mono">T</span> 切换主题 · <span class="mono">← →</span> 翻页</p>+ <div class="speaker">+ <div class="av"></div>+ <div><b>@lewis</b><span>sharing talk · 30 min</span></div>+ </div>+ <div class="deck-footer">+ <span class="mono">#presenter #逐字稿 #tech-talk</span>+ <span class="slide-number" data-current="1" data-total="6"></span>+ </div>+ <aside class="notes">+ <p>大家好,欢迎来到今天的技术分享。我是 lewis,今天想跟大家聊一个很多人忽略但其实非常影响演讲效果的话题——<strong>如何让一场技术分享既有深度,又讲得不卡壳</strong>。</p>+ <p>在正式开始之前,先跟大家介绍一下这份 deck 本身:这是一个支持<em>演讲者模式</em>的 HTML 幻灯片模板。现在你们看到的是观众视图,但我自己的屏幕上看到的是完全不一样的东西——当前页、下一页、完整逐字稿、计时器,全在一块屏幕上。</p>+ <p>为什么我要专门做这个?因为我发现自己做技术分享时最大的痛点不是 PPT 不够好看,而是<strong>讲到某一页突然不知道该说什么,或者忘了过渡怎么接</strong>。今天这份分享既是内容本身,也是个演示——我会一直开着演讲者模式讲,你们可以观察我讲得有多流畅。</p>+ <p>今天分享大概 30 分钟,分 5 个部分。有问题随时打断。Let's go.</p>+ </aside>+ </section>++ <!-- ============ 2. AGENDA ============ -->+ <section class="slide" data-title="Agenda">+ <p class="kicker">agenda</p>+ <h2 class="h2">今天要讲的 5 件事</h2>+ <div class="stack mt-l">+ <div class="agenda-row"><span class="num">01</span><span class="t">为什么 PPT 本身做得好还不够</span><span class="d">~5min</span></div>+ <div class="agenda-row"><span class="num">02</span><span class="t">演讲者模式到底该有哪些信息</span><span class="d">~6min</span></div>+ <div class="agenda-row"><span class="num">03</span><span class="t">逐字稿怎么写才不像念稿</span><span class="d">~8min</span></div>+ <div class="agenda-row"><span class="num">04</span><span class="t">Live demo · html-ppt skill 怎么用</span><span class="d">~8min</span></div>+ <div class="agenda-row"><span class="num">05</span><span class="t">Takeaways + Q&A</span><span class="d">~3min</span></div>+ </div>+ <aside class="notes">+ <p>先过一下今天的议程。</p>+ <p>第一部分我想先说服你们<strong>"PPT 做得漂亮≠讲得好"</strong>。我见过太多很精致的 deck,但讲的人一上去就开始 "嗯…这个…就是…"。</p>+ <p>第二部分聊演讲者视图。业界的产品其实差别蛮大的,Keynote、PowerPoint、reveal.js 都有各自的方案,但真正好用的设计逻辑是什么,我会给出我的答案。</p>+ <p>第三部分是今天的<em>核心</em>——逐字稿。很多人以为逐字稿就是把要说的话一字不差写下来,错。逐字稿的目的是让你<strong>"看一眼就接得上"</strong>,写法完全不一样。</p>+ <p>第四部分会现场 demo 我自己用的 html-ppt skill,展示如何 30 分钟出一份带逐字稿的 deck。</p>+ <p>最后收尾 + 答疑。</p>+ <p>OK,进入第一部分。</p>+ </aside>+ </section>++ <!-- ============ 3. PROBLEM ============ -->+ <section class="slide" data-title="Problem">+ <p class="kicker">// part 01 · problem</p>+ <h2 class="h2">做 PPT 和讲 PPT,<br>是<span class="accent">两件事</span>。</h2>+ <div class="grid g3 mt-l">+ <div class="card card-accent">+ <h4>✅ PPT 做得好</h4>+ <p class="dim">主题统一、排版干净、图表清晰、动效克制。这些是"静态作品"的质量。</p>+ </div>+ <div class="card card-accent">+ <h4>❌ 讲得好</h4>+ <p class="dim">逻辑连贯、语速稳定、不 "嗯啊"、能接住问题、能当场调整节奏。</p>+ </div>+ <div class="card card-accent">+ <h4>💡 差别在哪</h4>+ <p class="dim">前者是<strong>纸上功夫</strong>,后者需要你<strong>"看一眼幻灯片就知道下句话说什么"</strong>。</p>+ </div>+ </div>+ <aside class="notes">+ <p>我先抛一个可能有争议的观点——<strong>做 PPT 和讲 PPT 是两件完全不同的事</strong>。</p>+ <p>大家看左边这张卡片,"PPT 做得好" 意味着什么?主题统一、排版干净、图表清晰、动效克制——这些都是<em>静态作品</em>的质量标准,可以离线评判。</p>+ <p>但中间这张卡片就不一样了:"讲得好" 意味着逻辑连贯、语速稳定、不卡壳、能接住提问、能根据现场反应调整节奏——这些是<strong>临场能力</strong>,跟 PPT 好不好看基本没关系。</p>+ <p>最关键的是右边这句话——讲得好的人,本质上是"<strong>看一眼幻灯片就知道下句话说什么</strong>"。这个能力靠什么?不是背稿,也不是即兴发挥,而是靠<em>合理设计的提词器系统</em>。</p>+ <p>今天接下来 25 分钟,我就是围绕这个核心问题展开的。</p>+ </aside>+ </section>++ <!-- ============ 4. SOLUTION ============ -->+ <section class="slide" data-title="Presenter View">+ <p class="kicker">// part 02 · presenter view</p>+ <h2 class="h2">演讲者视图应该有<span class="accent">四块信息</span></h2>+ <div class="grid g2 mt-l">+ <div>+ <div class="feature-row"><span class="num blue">①</span><div><b>当前页大图</b><p class="dim">占视图一半以上,保证你能扫一眼就知道观众现在看到什么。</p></div></div>+ <div class="feature-row"><span class="num green">②</span><div><b>下一页预览</b><p class="dim">帮你提前准备过渡句,避免"下一页我忘了讲什么了"。</p></div></div>+ </div>+ <div>+ <div class="feature-row"><span class="num orange">③</span><div><b>逐字稿区域</b><p class="dim">大字号、高对比度、支持滚动,这才是演讲者真正在看的东西。</p></div></div>+ <div class="feature-row"><span class="num purple">④</span><div><b>计时器 + 页码</b><p class="dim">知道自己讲了多久、还剩几页,节奏全凭这个。</p></div></div>+ </div>+ </div>+ <aside class="notes">+ <p>演讲者模式应该给你四块信息。我按重要性排序。</p>+ <p>第一块,<strong>当前页大图</strong>。这个必须占据视图一半以上空间,因为它是你跟观众的"同步锚"——观众看到什么,你脑子里也得是什么。</p>+ <p>第二块,<strong>下一页预览</strong>。这个很多人不理解为什么要放,我解释一下:演讲最卡的瞬间不是讲某一页,而是<em>翻到下一页的那 2 秒</em>。如果你提前看到下一页长什么样,过渡句自然就有了。</p>+ <p>第三块,<strong>逐字稿区域</strong>——这是今天的重点,下一部分我会专门讲。这里先说一个硬性要求:字号必须大、对比度必须高、必须能滚动。因为你讲的时候<em>只有余光瞄一下</em>,字小了根本来不及读。</p>+ <p>第四块,<strong>计时器和页码</strong>。知道自己讲了多久、还剩几页——节奏感全靠它。Keynote 做得最好,reveal.js 默认不够清楚。</p>+ <p>这四块缺一不可。今天这个 deck 我把这四块都做出来了,按 S 大家可以试试。</p>+ </aside>+ </section>++ <!-- ============ 5. SCRIPT ============ -->+ <section class="slide" data-title="Script">+ <p class="kicker">// part 03 · script</p>+ <h2 class="h2">逐字稿的<span class="accent">3 条铁律</span></h2>+ <div class="stack mt-l">+ <div class="rule-row">+ <span class="num red">01</span>+ <div>+ <b>不是一字不差的讲稿,是<span class="accent">"提示信号"</span></b>+ <p class="dim">把要讲的核心点加粗,把过渡句单独成段,把数据和名字列清楚——<em>让你看一眼就接得上</em>。</p>+ </div>+ </div>+ <div class="rule-row">+ <span class="num red">02</span>+ <div>+ <b>每页 <span class="accent">150–300 字</span>,不多不少</b>+ <p class="dim">少于 150 字提示不够,多于 300 字你没时间读。按 2–3 分钟/页的节奏控制。</p>+ </div>+ </div>+ <div class="rule-row">+ <span class="num red">03</span>+ <div>+ <b>用<span class="accent">口语</span>写,不用书面语</b>+ <p class="dim">"因此" → "所以";"该方案" → "这个方案"。写的时候读一遍,听起来像说话才对。</p>+ </div>+ </div>+ </div>+ <aside class="notes">+ <p>进入最核心的一部分——逐字稿怎么写。我总结了 3 条铁律。</p>+ <p><strong>第一条,逐字稿不是讲稿</strong>。很多人一听"逐字稿"就以为要把每句话一字不差写下来。错。如果你照着稿念,观众会立刻看出来,信任感瞬间崩塌。</p>+ <p>逐字稿的真实作用是<em>"提示信号"</em>——把核心要点加粗,把过渡句单独成段,把数据和专有名词列清楚。这样你讲的时候<strong>瞄一眼就能接得上</strong>,但说出来的还是你自己的话。</p>+ <p><strong>第二条,每页控制在 150 到 300 字</strong>。这个是我做了十几场分享摸出来的经验值。少于 150 字提示不够,讲到一半卡住;多于 300 字你根本来不及扫完。按一页讲 2 到 3 分钟算,这个字数刚好。</p>+ <p><strong>第三条,用口语写</strong>。这条最多人栽跟头。你写"因此",讲出来会变成"所以";你写"该方案",讲出来会变成"这个方案"。<em>写的时候读一遍</em>,不拗口才对。</p>+ <p>这三条配合起来,你会发现讲 PPT 突然变成了一件很舒服的事。</p>+ </aside>+ </section>++ <!-- ============ 6. DEMO + CLOSING ============ -->+ <section class="slide" data-title="Demo & Close">+ <p class="kicker">// part 04-05 · demo + close</p>+ <h2 class="h2">现在<span class="accent">你也能做到</span></h2>+ <div class="code-block mt-m">+<span class="comment"># 安装 html-ppt skill</span>+<span class="cmd">npx</span> skills add <span class="flag">https://github.com/lewislulu/html-ppt-skill</span>++<span class="comment"># 复制演讲者模式模板</span>+<span class="cmd">cp -r</span> templates/full-decks/presenter-mode-reveal examples/my-talk+<span class="cmd">open</span> examples/my-talk/index.html++<span class="comment"># 键盘操作</span>+<span class="flag">S</span> <span class="comment">→ 进入演讲者视图</span>+<span class="flag">T</span> <span class="comment">→ 切换主题(5 种预设)</span>+<span class="flag">← →</span> <span class="comment">→ 翻页</span>+<span class="flag">R</span> <span class="comment">→ 重置计时器</span>+ </div>+ <p class="lede mt-m tc">关键是:<strong>每一页 <aside class="notes"> 里写 150–300 字逐字稿</strong>。</p>+ <div class="deck-footer">+ <span class="mono">#thanks · Q&A</span>+ <span class="slide-number" data-current="6" data-total="6"></span>+ </div>+ <aside class="notes">+ <p>最后我演示一下这个 skill 怎么用,给大家省点时间自己摸索。</p>+ <p>第一步,装 html-ppt skill,一行命令。第二步,把我这个 <code>presenter-mode-reveal</code> 模板复制到你自己的 examples 目录。第三步,打开 html,按 S。</p>+ <p>键盘操作我列在这里了。<strong>S 进入演讲者视图、T 切换主题、左右键翻页、R 重置计时器</strong>。主题默认带 5 个——tokyo-night、dracula、catppuccin-mocha、nord、corporate-clean——基本覆盖了深色技术分享、浅色商务汇报两种常见场景。</p>+ <p>最关键的一步——<em>每一页底部的 <code><aside class="notes"></code> 里,老老实实写 150 到 300 字的逐字稿</em>。这是整个方法论的交付物。AI 可以帮你写初稿,但你一定要自己过一遍,读出来听听是不是你会说的话。</p>+ <p>好,我今天就讲到这里。如果你做下一场分享的时候想起了这个"演讲者视图 + 逐字稿"的组合,并且觉得讲得比以前顺——那就是我最大的收获。谢谢大家,有问题现在开始。</p>+ </aside>+ </section>++</div>++<div style="position:fixed;bottom:12px;left:12px;font-size:11px;color:#484f5866;z-index:100;pointer-events:none">+ S 演讲者视图 · T 切换主题 · ← → 翻页 · F 全屏 · O 总览 · R 重置计时+</div>+++</body>+</html>diff --git a/src/lib/templates/skills/deck-product-launch/SKILL.md b/src/lib/templates/skills/deck-product-launch/SKILL.mdnew file mode 100644index 00000000..24284df5--- /dev/null+++ b/src/lib/templates/skills/deck-product-launch/SKILL.md@@ -0,0 +1,24 @@+---+name: deck-product-launch+zh_name: "产品发布 Keynote"+en_name: "Product Launch Deck"+emoji: "🎉"+description: "暗 hero + 亮内容, 橙→桃 accent, 特性卡 + 定价 + CTA"+category: slides+scenario: marketing+aspect_hint: "16:9"+featured: 21+tags: ["launch", "keynote", "product"]+---++【模板: Product Launch Keynote】+【意图】新产品发布的 Keynote 风 deck。+【布局】+- Cover (暗背景 + 大字主题)+- Why we built this (问题)+- Introducing (产品名 + 1 张 hero shot)+- Feature cards (3-6 个)+- Pricing tiers+- CTA / Available now+【设计细节】+- accent: 暖橙→桃 渐变diff --git a/src/lib/templates/skills/deck-product-launch/example.html b/src/lib/templates/skills/deck-product-launch/example.htmlnew file mode 100644index 00000000..b65531fd--- /dev/null+++ b/src/lib/templates/skills/deck-product-launch/example.html@@ -0,0 +1,467 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">+<title>Halo v2 · Launch</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* html-ppt :: animations.css+ * Apply by adding class="anim-<name>" or data-anim="<name>".+ * Durations are deliberately snappy; tweak --anim-dur per element.+ */+:root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}++/* ---------- FADE DIRECTIONALS ---------- */+@keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}+@keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}+.anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}+.anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}+.anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}+.anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}++/* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */+@keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}+@keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}+@keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}+@keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}+@keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}+ 20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}+ 40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}+ 60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}+ 80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}+ 100%{opacity:1;transform:none}}+.anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}+.anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}+.anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}+.anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}+.anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}++/* ---------- TYPEWRITER ---------- */+.anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;+ width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}+@keyframes kf-type{to{width:100%}}+@keyframes kf-caret{50%{border-color:transparent}}++/* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */+@keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}+ 50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}+.anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}++.anim-shimmer-sweep{position:relative;overflow:hidden}+.anim-shimmer-sweep::after{content:"";position:absolute;inset:0;+ background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);+ transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}+@keyframes kf-shimmer{to{transform:translateX(100%)}}++.anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));+ background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;+ animation:kf-gradflow 4s linear infinite}+@keyframes kf-gradflow{to{background-position:300% 0}}++/* ---------- STAGGER LIST ---------- */+.anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}+.anim-stagger-list > *:nth-child(1){animation-delay:.05s}+.anim-stagger-list > *:nth-child(2){animation-delay:.15s}+.anim-stagger-list > *:nth-child(3){animation-delay:.25s}+.anim-stagger-list > *:nth-child(4){animation-delay:.35s}+.anim-stagger-list > *:nth-child(5){animation-delay:.45s}+.anim-stagger-list > *:nth-child(6){animation-delay:.55s}+.anim-stagger-list > *:nth-child(7){animation-delay:.65s}+.anim-stagger-list > *:nth-child(8){animation-delay:.75s}+.anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}++/* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */+.counter{font-variant-numeric:tabular-nums}++/* ---------- SVG PATH DRAW ---------- */+.anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{+ stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}+@keyframes kf-draw{to{stroke-dashoffset:0}}++/* ---------- PARALLAX TILT (hover) ---------- */+.anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}+.anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}++/* ---------- CARD FLIP 3D ---------- */+@keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}+ to{transform:perspective(1200px) rotateY(0);opacity:1}}+.anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}++/* ---------- CUBE ROTATE 3D ---------- */+@keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}+ to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}+.anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}++/* ---------- PAGE TURN 3D ---------- */+@keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}+ to{transform:perspective(1600px) rotateY(0);opacity:1}}+.anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}++/* ---------- PERSPECTIVE ZOOM ---------- */+@keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}+ to{opacity:1;transform:none}}+.anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}++/* ---------- MARQUEE SCROLL ---------- */+.anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}+@keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}++/* ---------- KEN BURNS ---------- */+@keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}+.anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}++/* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */+.anim-confetti-burst{position:relative}+.anim-confetti-burst::before,.anim-confetti-burst::after{+ content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;+ background:var(--accent);box-shadow:+ 20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),+ 30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),+ 40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),+ 10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));+ opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}+.anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}+@keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}++/* ---------- SPOTLIGHT ---------- */+@keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}+.anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}++/* ---------- MORPH SHAPE (SVG) ---------- */+.anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}+@keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}+ 100%{d:path("M60,120 Q120,220 180,120 T300,120")}}++/* ---------- RIPPLE REVEAL ---------- */+@keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}+ 100%{clip-path:circle(160% at 20% 80%);opacity:1}}+.anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}++/* reduced motion */+@media (prefers-reduced-motion: reduce){+ [class*="anim-"]{animation:none!important;transition:none!important}+}++</style>+<style>/* product-launch — modern announcement deck */+.tpl-product-launch{+ --bg:#ffffff;--bg-soft:#f5f5f7;--surface:#ffffff;--surface-2:#f2f2f6;+ --ink:#0a0a12;--ink-2:#3a3a44;+ --border:rgba(10,10,18,.08);--border-strong:rgba(10,10,18,.18);+ --text-1:#0a0a12;--text-2:#4a4a58;--text-3:#8a8a96;+ --accent:#ff5a36;--accent-2:#ff8c5a;--accent-3:#ffb36b;+ --grad:linear-gradient(120deg,#ff5a36 0%,#ff8c5a 60%,#ffb36b 100%);+ --radius:22px;--radius-lg:32px;+ --shadow:0 20px 60px rgba(10,10,18,.1);+ font-family:'Inter','Noto Sans SC',sans-serif;+}+.tpl-product-launch .slide{padding:80px 112px}+.tpl-product-launch .slide.dark{background:#0a0a12;color:#f5f5f7}+.tpl-product-launch .slide.dark .h1,.tpl-product-launch .slide.dark .h2,.tpl-product-launch .slide.dark h3,.tpl-product-launch .slide.dark h4{color:#fff}+.tpl-product-launch .slide.dark .lede,.tpl-product-launch .slide.dark .dim{color:rgba(245,245,247,.72)}+.tpl-product-launch .slide.dark .card{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12);box-shadow:none;backdrop-filter:blur(20px)}+.tpl-product-launch .slide.dark .kicker{color:var(--accent-2)}+.tpl-product-launch .h1{font-size:96px;line-height:.98;font-weight:900;letter-spacing:-.045em}+.tpl-product-launch .h2{font-size:64px;font-weight:800;letter-spacing:-.035em}+.tpl-product-launch .hero-shot{position:absolute;right:-60px;top:50%;transform:translateY(-50%);width:640px;height:640px;border-radius:50%;background:var(--grad);filter:blur(2px);opacity:.85}+.tpl-product-launch .hero-shot::after{content:"";position:absolute;inset:80px;border-radius:40px;background:linear-gradient(160deg,rgba(255,255,255,.3),transparent 60%),#1a1a28;box-shadow:inset 0 2px 0 rgba(255,255,255,.2)}+.tpl-product-launch .hero-shot::before{content:"Halo v2";position:absolute;inset:80px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:44px;font-weight:900;letter-spacing:-.02em;z-index:2;border-radius:40px}+.tpl-product-launch .brand{font-size:18px;font-weight:800;letter-spacing:-.02em}+.tpl-product-launch .feature-card{padding:40px 36px;border-radius:var(--radius-lg);background:var(--surface);border:1px solid var(--border);position:relative;overflow:hidden}+.tpl-product-launch .feature-card .icon{width:60px;height:60px;border-radius:18px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-size:28px;font-weight:900;margin-bottom:20px}+.tpl-product-launch .step{display:flex;gap:24px;align-items:flex-start}+.tpl-product-launch .step .n{flex:none;width:56px;height:56px;border-radius:50%;background:var(--grad);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:22px}+.tpl-product-launch .price-card{padding:40px 32px;border-radius:var(--radius-lg);border:1.5px solid var(--border);background:var(--surface);text-align:left}+.tpl-product-launch .price-card.pro{background:#0a0a12;color:#fff;border-color:#0a0a12;transform:scale(1.04);box-shadow:0 30px 80px rgba(255,90,54,.25)}+.tpl-product-launch .price-card.pro .dim{color:rgba(255,255,255,.7)}+.tpl-product-launch .price-card h4{font-size:16px;text-transform:uppercase;letter-spacing:.1em;color:var(--accent)}+.tpl-product-launch .price-card.pro h4{color:var(--accent-2)}+.tpl-product-launch .price-card .amount{font-size:64px;font-weight:900;letter-spacing:-.035em;margin:14px 0}+.tpl-product-launch .price-card ul{list-style:none;padding:0;margin:20px 0 0}+.tpl-product-launch .price-card li{padding:8px 0;font-size:15px;color:var(--text-2);border-top:1px solid var(--border)}+.tpl-product-launch .price-card.pro li{color:rgba(255,255,255,.8);border-color:rgba(255,255,255,.12)}+.tpl-product-launch .cta-btn{display:inline-block;padding:20px 40px;border-radius:999px;background:var(--grad);color:#fff;font-weight:700;font-size:20px;box-shadow:0 20px 50px rgba(255,90,54,.4)}+.tpl-product-launch .testimonial{max-width:44ch;font-family:'Playfair Display',serif;font-size:44px;line-height:1.25;font-weight:500;letter-spacing:-.01em}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-product-launch">+<div class="deck">++ <!-- 1. Cover / hero -->+ <section class="slide dark" data-title="Cover">+ <div class="hero-shot"></div>+ <div style="position:absolute;top:56px;left:112px" class="brand">◎ Halo</div>+ <p class="kicker">Launch · April 2026</p>+ <h1 class="h1 anim-fade-up" data-anim="fade-up">Meet Halo v2.<br>Your ears,<br><span style="background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent">rewritten.</span></h1>+ <p class="lede mt-m" style="max-width:42ch">Studio-grade spatial audio in the lightest open-ear earbuds ever made.</p>+ <div class="deck-footer"><span>halo.audio</span><span class="slide-number" data-current="1" data-total="8"></span></div>+ </section>++ <!-- 2. Introducing -->+ <section class="slide center tc" data-title="Introducing">+ <div>+ <p class="kicker">Introducing</p>+ <h1 class="h1" style="font-size:140px">Halo v2</h1>+ <p class="lede" style="margin:24px auto;max-width:56ch">Four years of research. Three generations of silicon. One product you'll forget you're wearing.</p>+ </div>+ </section>++ <!-- 3. Feature 1 -->+ <section class="slide" data-title="Sound">+ <p class="kicker">01 · The sound</p>+ <h2 class="h2">Hear the room<br>around the music.</h2>+ <div class="grid g3 mt-l">+ <div class="feature-card"><div class="icon">♪</div><h4>Open-ear spatial</h4><p class="dim">16mm titanium drivers angled into the ear canal. You hear the song and the world at once.</p></div>+ <div class="feature-card"><div class="icon">◈</div><h4>Lossless 24-bit</h4><p class="dim">aptX Lossless and Hi-Res LDAC over Bluetooth 5.4. No dongles, no compromises.</p></div>+ <div class="feature-card"><div class="icon">◐</div><h4>Adaptive EQ</h4><p class="dim">Tunes itself to the shape of your ear every 120 seconds.</p></div>+ </div>+ </section>++ <!-- 4. Feature 2 -->+ <section class="slide dark" data-title="Fit">+ <p class="kicker">02 · The fit</p>+ <h2 class="h2">4.9 grams.<br>All-day forgettable.</h2>+ <div class="grid g3 mt-l">+ <div class="card"><h4>Liquid-silicone hook</h4><p>Wraps behind the ear like a glasses arm. Never falls out on a run.</p></div>+ <div class="card"><h4>IP57 sweat + rain</h4><p>Take them in the ocean. Rinse them under the tap. We dare you.</p></div>+ <div class="card"><h4>14h + 42h case</h4><p>A full workweek of commutes on one charge of the case.</p></div>+ </div>+ </section>++ <!-- 5. Feature 3 -->+ <section class="slide" data-title="Intelligence">+ <p class="kicker">03 · The intelligence</p>+ <h2 class="h2">An AI that listens<br>so you don't have to.</h2>+ <div class="grid g2 mt-l">+ <div class="feature-card"><div class="icon">✦</div><h4>Live translate</h4><p class="dim">Real-time translation in 41 languages. Whispered directly into your ear, with a 380ms lag.</p></div>+ <div class="feature-card"><div class="icon">✧</div><h4>Meeting recap</h4><p class="dim">Double-tap to record. Walk away with a summary, action items, and a searchable transcript.</p></div>+ </div>+ </section>++ <!-- 6. How it works -->+ <section class="slide" data-title="How it works">+ <p class="kicker">How it works</p>+ <h2 class="h2">Three taps. You're in.</h2>+ <div class="stack mt-l" style="max-width:900px">+ <div class="step"><div class="n">1</div><div><h4>Open the case near your phone</h4><p class="dim">iOS and Android pair automatically over Bluetooth LE. No app downloads required.</p></div></div>+ <div class="step"><div class="n">2</div><div><h4>Pick your profile</h4><p class="dim">Commute, Focus, Workout, Cinema. Each is a complete audio + transparency recipe.</p></div></div>+ <div class="step"><div class="n">3</div><div><h4>Just listen</h4><p class="dim">Halo adapts to your ear shape, your environment, and your hearing profile — continuously.</p></div></div>+ </div>+ </section>++ <!-- 7. Pricing -->+ <section class="slide" data-title="Pricing">+ <p class="kicker">Pricing</p>+ <h2 class="h2">Pick your Halo.</h2>+ <div class="grid g3 mt-l" style="align-items:start">+ <div class="price-card">+ <h4>Halo Lite</h4>+ <div class="amount">$179</div>+ <p class="dim">Open-ear audio, IP57, 12h battery.</p>+ <ul><li>AAC + SBC</li><li>Single-tap controls</li><li>USB-C charging</li></ul>+ </div>+ <div class="price-card pro">+ <h4>Halo v2 · Pro</h4>+ <div class="amount">$279</div>+ <p class="dim">Everything, in its best form.</p>+ <ul><li>Hi-Res Lossless</li><li>Live translate · 41 lang</li><li>Wireless + MagSafe charging</li><li>Adaptive EQ</li></ul>+ </div>+ <div class="price-card">+ <h4>Halo Studio</h4>+ <div class="amount">$399</div>+ <p class="dim">For creators and field recorders.</p>+ <ul><li>32-bit binaural capture</li><li>XLR dongle included</li><li>Lifetime firmware</li></ul>+ </div>+ </div>+ </section>++ <!-- 8. Testimonial + CTA combined? Task says 8 slides w/ testimonial + CTA as separate. Keep 8: testimonial on 7, but we've used 7 already. Re-plan: cover(1) intro(2) f1(3) f2(4) f3(5) how(6) pricing(7) testimonial+CTA(8) -->+ <section class="slide dark" data-title="Ship">+ <p class="kicker">One more thing</p>+ <div class="row" style="gap:80px;align-items:center">+ <div style="flex:1">+ <p class="testimonial">"I forgot I was wearing them. Then I remembered, and I didn't want to take them off."</p>+ <p class="dim mt-m">— Marques Lin, The Verge · early review</p>+ </div>+ <div style="flex:0 0 auto;text-align:center">+ <p class="dim mb-m">Ships May 14 · from</p>+ <div style="font-size:96px;font-weight:900;letter-spacing:-.04em">$279</div>+ <a class="cta-btn mt-l" href="#">Pre-order Halo v2 →</a>+ <p class="dim mt-m" style="font-size:13px">Free shipping · 45-day return · 2-year warranty</p>+ </div>+ </div>+ </section>++</div>++</body></html>diff --git a/src/lib/templates/skills/deck-replit/SKILL.md b/src/lib/templates/skills/deck-replit/SKILL.mdnew file mode 100644index 00000000..6cfb0436--- /dev/null+++ b/src/lib/templates/skills/deck-replit/SKILL.md@@ -0,0 +1,26 @@+---+name: deck-replit+zh_name: "Replit Slides 风 Deck"+en_name: "Replit Slides Deck"+emoji: "🟣"+description: "Replit Slides 八套主题 (helix/holm/vance/bevel/world/atlas/bluehouse)"+category: slides+scenario: product+aspect_hint: "16:9"+tags: ["replit", "themed", "memo"]+example_id: sample-deck-replit+example_name: "Replit Slides · World Mint"+example_format: markdown+example_tagline: "Replit Slides 八套主题之一"+example_desc: "World Mint 主题封页 + agenda 双页, sans + neon mint accent"+example_source_url: "https://replit.com/slides"+example_source_label: "Replit Slides"+---++【模板: Replit Slides Style Deck】+【意图】Replit Slides 风的单文件 horizontal-swipe deck, 选 1 套主题不混用。+【布局】+- Pick one theme: helix / holm / vance / bevel / world-dark / world-mint / atlas / bluehouse+- Cover + agenda + 6-10 个 content + 收尾+【设计细节】+- 每套主题有完整调色板 + 字体 + accent, 不要混用diff --git a/src/lib/templates/skills/deck-replit/example.html b/src/lib/templates/skills/deck-replit/example.htmlnew file mode 100644index 00000000..c65bf670--- /dev/null+++ b/src/lib/templates/skills/deck-replit/example.html@@ -0,0 +1,113 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<title>Replit Slides · World Mint</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;700;800;900&family=Inter:wght@400;500&family=JetBrains+Mono&display=swap" rel="stylesheet" />+<style>+ body { font-family:'Inter Tight','Inter',system-ui,sans-serif; background:#020405; margin:0; color:#e7fff0; }+ .deck { display:grid; gap:24px; padding:24px; }+ .slide { width:100%; aspect-ratio:16/9; max-width:1280px; margin:0 auto; position:relative; overflow:hidden; }+ .mint-bg {+ background:+ radial-gradient(ellipse at 80% 0%, rgba(0,255,170,0.25) 0%, transparent 50%),+ radial-gradient(ellipse at 0% 100%, rgba(0,210,140,0.18) 0%, transparent 50%),+ linear-gradient(135deg, #04150f 0%, #0a2a1d 60%, #04241a 100%);+ }+ .mint { color:#7ffec8; }+ .mono { font-family:'JetBrains Mono', ui-monospace, monospace; }+ .chip { font-size:11px; letter-spacing:0.18em; text-transform:uppercase; }+ .pill { background: rgba(127,254,200,0.1); color:#7ffec8; padding:3px 10px; border-radius:999px; }+ .ring { border:1px solid rgba(127,254,200,0.35); }+</style>+</head>+<body>+<div class="deck">++ <!-- COVER -->+ <section class="slide mint-bg">+ <div class="absolute inset-0 p-14 flex flex-col justify-between">+ <header class="flex items-baseline justify-between chip opacity-70 mono">+ <span>REPLIT · SLIDES — WORLD MINT</span>+ <span>№01 / 12</span>+ <span>2026</span>+ </header>++ <div>+ <div class="pill chip mono inline-block">Deck · Tech keynote</div>+ <h1 class="mt-6 font-black tracking-[-0.02em] leading-[0.95]" style="font-size:clamp(48px,7vw,128px);color:#e7fff0">+ Building agents that<br/>ship at <span class="mint">the edge.</span>+ </h1>+ <p class="mt-6 text-[24px] opacity-80 font-medium max-w-[720px] leading-snug">+ 17 CLI agents. One stdin/stdout protocol. Zero API keys.+ </p>+ </div>++ <footer class="flex items-baseline justify-between chip opacity-70 mono">+ <span>HTML-ANYTHING.DEV</span>+ <span class="flex items-center gap-3">+ <span class="w-2 h-2 rounded-full" style="background:#7ffec8;box-shadow:0 0 12px #7ffec8"></span>+ <span>LIVE · LOCALHOST:3456</span>+ </span>+ <span>~ S W I P E ~</span>+ </footer>+ </div>+ </section>++ <!-- AGENDA -->+ <section class="slide mint-bg">+ <div class="absolute inset-0 p-14 flex flex-col justify-between">+ <header class="flex items-baseline justify-between chip opacity-70 mono">+ <span>WORLD MINT — AGENDA</span>+ <span>№02 / 12</span>+ <span>5 SCENES</span>+ </header>++ <div>+ <div class="chip mono mint">— Agenda</div>+ <h2 class="mt-2 font-black tracking-[-0.02em] leading-[1.0]" style="font-size:clamp(36px,4.6vw,72px);color:#e7fff0">+ Five short scenes,<br/>+ <span class="mint">one thesis</span>.+ </h2>+ </div>++ <div class="grid grid-cols-5 gap-5">+ <article class="ring rounded-2xl p-4">+ <div class="mono text-[22px] font-bold mint">01</div>+ <div class="mt-2 font-bold leading-snug">The edge moves to your laptop</div>+ <p class="mt-1.5 text-[12px] opacity-70 leading-snug">Cloud agents are a layer. Local agents are a habit.</p>+ </article>+ <article class="ring rounded-2xl p-4">+ <div class="mono text-[22px] font-bold mint">02</div>+ <div class="mt-2 font-bold leading-snug">Why local CLI agents win</div>+ <p class="mt-1.5 text-[12px] opacity-70 leading-snug">Trust, cost, speed. Pick three.</p>+ </article>+ <article class="ring rounded-2xl p-4" style="background:rgba(127,254,200,0.06)">+ <div class="mono text-[22px] font-bold mint">03</div>+ <div class="mt-2 font-bold leading-snug">17 agents · one protocol</div>+ <p class="mt-1.5 text-[12px] opacity-70 leading-snug">stdin/stdout JSON-line, that's it.</p>+ </article>+ <article class="ring rounded-2xl p-4">+ <div class="mono text-[22px] font-bold mint">04</div>+ <div class="mt-2 font-bold leading-snug">Live demo · ⌘+Enter</div>+ <p class="mt-1.5 text-[12px] opacity-70 leading-snug">CSV → magazine in 80 seconds.</p>+ </article>+ <article class="ring rounded-2xl p-4">+ <div class="mono text-[22px] font-bold mint">05</div>+ <div class="mt-2 font-bold leading-snug">Open questions</div>+ <p class="mt-1.5 text-[12px] opacity-70 leading-snug">Templates as a community lib?</p>+ </article>+ </div>++ <footer class="flex items-baseline justify-between chip opacity-60 mono">+ <span>STYLE — WORLD MINT (NEON SANS)</span>+ <span>USE ← / → TO NAVIGATE</span>+ <span>5 / 12</span>+ </footer>+ </div>+ </section>++</div>+</body>+</html>diff --git a/src/lib/templates/skills/deck-replit/example.md b/src/lib/templates/skills/deck-replit/example.mdnew file mode 100644index 00000000..a5f40047--- /dev/null+++ b/src/lib/templates/skills/deck-replit/example.md@@ -0,0 +1,16 @@+# Replit Slides · World Mint 主题++> 双页预览: Cover + Agenda++## 主题+Replit Slides 八套主题之一 (helix / holm / vance / bevel / **world-mint** / atlas / bluehouse)++## Deck 标题+Building agents that ship at the edge++## Agenda+1. The edge moves to your laptop+2. Why local CLI agents win+3. 17 agents · one protocol+4. Live demo · ⌘+Enter+5. Open questionsdiff --git a/src/lib/templates/skills/deck-safety-alert/SKILL.md b/src/lib/templates/skills/deck-safety-alert/SKILL.mdnew file mode 100644index 00000000..0349ef40--- /dev/null+++ b/src/lib/templates/skills/deck-safety-alert/SKILL.md@@ -0,0 +1,22 @@+---+name: deck-safety-alert+zh_name: "安全 / 风险红色 Deck"+en_name: "Testing / Safety Alert Deck"+emoji: "⚠️"+description: "红琥珀警示色 + hazard 条纹 + L1/L2/L3 tier 卡片 + 删除线标题"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 32+tags: ["safety", "security", "policy", "incident"]+---++【模板: Safety Alert Deck】+【意图】安全 / 风险 / 事故复盘 / red team / policy-as-code 用 deck。+【布局】+- 顶/底 45° 红黑 hazard 条纹+- 红色删除线否定标题+- L1/L2/L3 绿 / 琥珀 / 红 tier 卡片+- 圆点状态 alert box+- policy-yaml 代码块 (红左边框 + bad 关键词高亮)+- 红绿 checklist + 事故堆叠柱状图diff --git a/src/lib/templates/skills/deck-safety-alert/example.html b/src/lib/templates/skills/deck-safety-alert/example.htmlnew file mode 100644index 00000000..b1134231--- /dev/null+++ b/src/lib/templates/skills/deck-safety-alert/example.html@@ -0,0 +1,413 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Testing Safety Alert</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* testing-safety-alert — 红/琥珀 警示风 · 白底高对比 */+.tpl-testing-safety-alert{+ --ts-bg:#fffaf7;+ --ts-ink:#14141a;+ --ts-ink2:#4a4955;+ --ts-muted:#8a8892;+ --ts-line:rgba(20,20,26,.08);+ --ts-red:#e0314a;+ --ts-red-soft:#ffecee;+ --ts-amber:#d97706;+ --ts-amber-soft:#fff5e6;+ --ts-green:#067647;+ --ts-green-soft:#e8f8ee;+ background:var(--ts-bg);+ color:var(--ts-ink);+ font-family:'Inter','Noto Sans SC','PingFang SC',-apple-system,sans-serif;+}+.tpl-testing-safety-alert .slide{background:var(--ts-bg);color:var(--ts-ink);padding:64px 84px}+.tpl-testing-safety-alert .ts-stripe{position:absolute;top:0;left:0;right:0;height:14px;background:repeating-linear-gradient(45deg,var(--ts-red) 0 18px,#111318 18px 36px)}+.tpl-testing-safety-alert .ts-stripe-b{position:absolute;bottom:0;left:0;right:0;height:6px;background:repeating-linear-gradient(45deg,var(--ts-red) 0 10px,#111318 10px 20px);opacity:.6}+.tpl-testing-safety-alert .ts-chrome{display:flex;justify-content:space-between;align-items:center;margin:22px 0 16px}+.tpl-testing-safety-alert .ts-alert-tag{display:inline-flex;align-items:center;gap:10px;padding:8px 18px;border-radius:10px;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;background:var(--ts-red);color:#fff;box-shadow:0 6px 18px rgba(224,49,74,.28)}+.tpl-testing-safety-alert .ts-alert-tag::before{content:'⚠';font-size:16px}+.tpl-testing-safety-alert .ts-alert-tag.amber{background:var(--ts-amber);box-shadow:0 6px 18px rgba(217,119,6,.25)}+.tpl-testing-safety-alert .ts-alert-tag.green{background:var(--ts-green);box-shadow:0 6px 18px rgba(6,118,71,.22)}+.tpl-testing-safety-alert .ts-alert-tag.green::before{content:'✓'}+.tpl-testing-safety-alert .ts-page{font-size:13px;color:var(--ts-muted);letter-spacing:.15em;font-weight:700}+.tpl-testing-safety-alert .ts-kicker{font-size:15px;font-weight:700;color:var(--ts-red);letter-spacing:.06em;margin-bottom:10px;text-transform:uppercase}+.tpl-testing-safety-alert .ts-h1{font-size:88px;font-weight:900;line-height:1.04;letter-spacing:-2px;margin:10px 0 16px;color:var(--ts-ink)}+.tpl-testing-safety-alert .ts-h1 .red{color:var(--ts-red)}+.tpl-testing-safety-alert .ts-h1 .strike{position:relative;display:inline-block}+.tpl-testing-safety-alert .ts-h1 .strike::after{content:'';position:absolute;left:-4%;right:-4%;top:50%;height:10px;background:var(--ts-red);transform:skewX(-12deg);opacity:.85}+.tpl-testing-safety-alert .ts-h2{font-size:54px;font-weight:900;line-height:1.1;letter-spacing:-1px;margin:0 0 14px}+.tpl-testing-safety-alert .ts-sub{font-size:22px;line-height:1.5;color:var(--ts-ink2);max-width:880px;margin-top:10px}+.tpl-testing-safety-alert .ts-highlight-red{display:inline-block;padding:4px 14px;background:var(--ts-red);color:#fff;border-radius:8px;font-weight:800}+.tpl-testing-safety-alert .ts-highlight-amber{display:inline-block;padding:4px 14px;background:var(--ts-amber-soft);color:var(--ts-amber);border-radius:8px;font-weight:800;border:1px solid rgba(217,119,6,.2)}+.tpl-testing-safety-alert .ts-highlight-green{display:inline-block;padding:4px 14px;background:var(--ts-green-soft);color:var(--ts-green);border-radius:8px;font-weight:800;border:1px solid rgba(6,118,71,.2)}+.tpl-testing-safety-alert .ts-alert-box{border:2px solid var(--ts-red);border-radius:18px;padding:26px 30px;background:linear-gradient(180deg,#fff 0%,var(--ts-red-soft) 100%);box-shadow:0 14px 36px rgba(224,49,74,.14);margin-top:24px;position:relative}+.tpl-testing-safety-alert .ts-alert-box::before{content:'';position:absolute;top:-11px;left:24px;width:22px;height:22px;background:var(--ts-red);border-radius:50%;box-shadow:0 0 0 6px rgba(224,49,74,.2)}+.tpl-testing-safety-alert .ts-alert-box.amber{border-color:var(--ts-amber);background:linear-gradient(180deg,#fff 0%,var(--ts-amber-soft) 100%);box-shadow:0 14px 36px rgba(217,119,6,.14)}+.tpl-testing-safety-alert .ts-alert-box.amber::before{background:var(--ts-amber);box-shadow:0 0 0 6px rgba(217,119,6,.2)}+.tpl-testing-safety-alert .ts-alert-box.green{border-color:var(--ts-green);background:linear-gradient(180deg,#fff 0%,var(--ts-green-soft) 100%);box-shadow:0 14px 36px rgba(6,118,71,.14)}+.tpl-testing-safety-alert .ts-alert-box.green::before{background:var(--ts-green);box-shadow:0 0 0 6px rgba(6,118,71,.2)}+.tpl-testing-safety-alert .ts-alert-box h3{font-size:34px;font-weight:900;margin:0 0 10px}+.tpl-testing-safety-alert .ts-alert-box p{font-size:17px;line-height:1.6;color:var(--ts-ink2);margin:0}+.tpl-testing-safety-alert .ts-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}+.tpl-testing-safety-alert .ts-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;margin-top:20px}+.tpl-testing-safety-alert .ts-card{border:1px solid var(--ts-line);border-radius:16px;padding:22px 24px;background:#fff;box-shadow:0 6px 20px rgba(17,19,24,.04)}+.tpl-testing-safety-alert .ts-card .lbl{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--ts-muted);margin-bottom:8px}+.tpl-testing-safety-alert .ts-card h4{font-size:26px;font-weight:900;line-height:1.2;margin-bottom:8px}+.tpl-testing-safety-alert .ts-card p{font-size:14px;color:var(--ts-ink2);line-height:1.55}+.tpl-testing-safety-alert .ts-checklist{display:flex;flex-direction:column;gap:12px;margin-top:20px;max-width:880px}+.tpl-testing-safety-alert .ts-check{display:flex;gap:16px;align-items:flex-start;padding:16px 20px;border:1px solid var(--ts-line);border-radius:14px;background:#fff}+.tpl-testing-safety-alert .ts-check .box{flex:0 0 32px;height:32px;border-radius:8px;border:2px solid var(--ts-red);display:grid;place-items:center;font-weight:900;color:var(--ts-red);background:var(--ts-red-soft)}+.tpl-testing-safety-alert .ts-check.ok .box{border-color:var(--ts-green);color:var(--ts-green);background:var(--ts-green-soft)}+.tpl-testing-safety-alert .ts-check .txt{font-size:18px;line-height:1.5;font-weight:600}+.tpl-testing-safety-alert .ts-codebox{background:#141418;color:#fff5ea;border-radius:14px;padding:22px 26px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.85;margin-top:20px;border-left:6px solid var(--ts-red)}+.tpl-testing-safety-alert .ts-codebox .cm{color:#7a756d}+.tpl-testing-safety-alert .ts-codebox .kw{color:#ffb38a}+.tpl-testing-safety-alert .ts-codebox .st{color:#b3e6c2}+.tpl-testing-safety-alert .ts-codebox .bad{color:#ff9aa8;font-weight:700}+.tpl-testing-safety-alert .ts-footer{position:absolute;left:84px;right:84px;bottom:36px;display:flex;justify-content:space-between;font-size:12px;color:var(--ts-muted);letter-spacing:.1em}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-testing-safety-alert">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag">ai safety · 高优先级</span><span class="ts-page">01 / 08</span></div>+ <div class="ts-kicker">2026 年最重要的一条判断</div>+ <h1 class="ts-h1">别再追问<br><span class="strike">AI 会不会干活</span><br>开始问:<span class="red">它出事谁负责</span></h1>+ <p class="ts-sub">AI 出错的代价,不再是一次 bad response 这么简单 —— 它可能一次性写 300 份工单、提 80 个 PR、发 5000 封邮件。</p>+ <div class="ts-alert-box">+ <h3>风险已经规模化</h3>+ <p>「做错」成本 × N;「做对」收益 × N。<br>这就是为什么 <b>测试、验收、安全、风控</b> 会变成未来 3 年最贵的能力。</p>+ </div>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>AI SAFETY BRIEF · LEWIS · 2026.04</span><span>01 / 08</span></div>+ </section>++ <!-- 2. SECTION -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag amber">section · risk 分级</span><span class="ts-page">02 / 08</span></div>+ <div style="margin:auto 0">+ <div class="ts-kicker">Chapter One</div>+ <h1 class="ts-h1" style="font-size:130px">先分 <span class="red">等级</span></h1>+ <p class="ts-sub" style="font-size:28px">不是所有 AI 行为都同等危险。<br>先把「可撤销」和「不可撤销」分开,再谈流程。</p>+ </div>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>section · level taxonomy</span><span>02 / 08</span></div>+ </section>++ <!-- 3. CONTENT risk levels -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag">风险分级 · 3 levels</span><span class="ts-page">03 / 08</span></div>+ <h2 class="ts-h2">三档风险,三种处理</h2>+ <div class="ts-grid-3">+ <div class="ts-card" style="border-top:4px solid var(--ts-green)"><div class="lbl">L1 · 绿色</div><h4>可撤销</h4><p>写 draft、生成图片、起草文档。<br>错了 Ctrl+Z,零代价。<br><b style="color:var(--ts-green)">策略:放开跑</b></p></div>+ <div class="ts-card" style="border-top:4px solid var(--ts-amber)"><div class="lbl">L2 · 琥珀</div><h4>半可撤销</h4><p>发 draft 邮件、提 PR、改 staging 数据。<br>错了要道歉 / 回滚。<br><b style="color:var(--ts-amber)">策略:人工复核</b></p></div>+ <div class="ts-card" style="border-top:4px solid var(--ts-red)"><div class="lbl">L3 · 红色</div><h4>不可撤销</h4><p>发真实邮件、付款、删库、删 prod 数据。<br>错了就真错了。<br><b style="color:var(--ts-red)">策略:硬卡 + 双人审</b></p></div>+ </div>+ <div class="ts-alert-box amber">+ <h3>绝不要让 agent 自己升级</h3>+ <p>L1 的任务不能自己变成 L2。授权必须是显式的、可撤销的、带过期时间的。</p>+ </div>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>risk · 3 levels</span><span>03 / 08</span></div>+ </section>++ <!-- 4. CODE -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag">policy as code</span><span class="ts-page">04 / 08</span></div>+ <div class="ts-kicker">别用文档管规则 · 用代码管规则</div>+ <h2 class="ts-h2">三十行 YAML,<br><span class="ts-highlight-red">红线硬卡</span></h2>+ <pre class="ts-codebox"><span class="cm"># safety-policy.yaml · compiled → runtime guard</span>+<span class="kw">level_1_allow</span>:+ - tools: [<span class="st">write_draft</span>, <span class="st">generate_image</span>, <span class="st">read_docs</span>]++<span class="kw">level_2_require_review</span>:+ - tools: [<span class="st">send_email_draft</span>, <span class="st">open_pr</span>, <span class="st">write_staging_db</span>]+ reviewer: <span class="st">human</span>++<span class="kw">level_3_hard_block</span>:+ - tools: [<span class="st">send_real_email</span>, <span class="st">transfer_money</span>, <span class="st">delete_prod</span>]+ unless: <span class="st">two_human_sign_off AND within_24h</span>++<span class="bad">forbidden_always</span>:+ - <span class="bad">"rm -rf /"</span>+ - <span class="bad">"drop table"</span>+ - <span class="bad">"force push origin main"</span></pre>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>policy · yaml-as-guard</span><span>04 / 08</span></div>+ </section>++ <!-- 5. CHART -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag amber">incident report · q1</span><span class="ts-page">05 / 08</span></div>+ <h2 class="ts-h2">我们 Q1 的 <span class="red">12 起 AI 事故</span></h2>+ <p class="ts-sub">幸好全部捕获在 staging。但每一起都能上生产。</p>+ <svg viewBox="0 0 1040 360" style="width:100%;max-width:1040px;margin-top:18px" xmlns="http://www.w3.org/2000/svg">+ <g font-family="Inter,sans-serif" font-size="14" fill="#4a4955">+ <line x1="70" y1="320" x2="1000" y2="320" stroke="#eaecf3" stroke-width="2"/>+ <!-- month columns: Jan Feb Mar, L1/L2/L3 stacked -->+ <g transform="translate(120,0)">+ <rect x="0" y="220" width="60" height="100" fill="#067647"/>+ <rect x="0" y="160" width="60" height="60" fill="#d97706"/>+ <rect x="0" y="130" width="60" height="30" fill="#e0314a"/>+ <text x="30" y="345" text-anchor="middle" font-weight="700">Jan</text>+ <text x="30" y="120" text-anchor="middle" font-weight="800" fill="#14141a">5</text>+ </g>+ <g transform="translate(320,0)">+ <rect x="0" y="240" width="60" height="80" fill="#067647"/>+ <rect x="0" y="200" width="60" height="40" fill="#d97706"/>+ <rect x="0" y="180" width="60" height="20" fill="#e0314a"/>+ <text x="30" y="345" text-anchor="middle" font-weight="700">Feb</text>+ <text x="30" y="170" text-anchor="middle" font-weight="800" fill="#14141a">3</text>+ </g>+ <g transform="translate(520,0)">+ <rect x="0" y="250" width="60" height="70" fill="#067647"/>+ <rect x="0" y="220" width="60" height="30" fill="#d97706"/>+ <rect x="0" y="210" width="60" height="10" fill="#e0314a"/>+ <text x="30" y="345" text-anchor="middle" font-weight="700">Mar</text>+ <text x="30" y="200" text-anchor="middle" font-weight="800" fill="#14141a">4</text>+ </g>+ <!-- legend -->+ <g transform="translate(720,60)">+ <rect x="0" y="0" width="16" height="16" fill="#e0314a"/><text x="24" y="13" font-weight="700">L3 不可撤销 (3)</text>+ <rect x="0" y="26" width="16" height="16" fill="#d97706"/><text x="24" y="39" font-weight="700">L2 需复核 (4)</text>+ <rect x="0" y="52" width="16" height="16" fill="#067647"/><text x="24" y="65" font-weight="700">L1 可恢复 (5)</text>+ <text x="0" y="100" font-size="13" fill="#8a8892">全部被 safety-policy 在 runtime 拦下,</text>+ <text x="0" y="118" font-size="13" fill="#8a8892">未进 prod。但 3 起 L3 非常惊险。</text>+ </g>+ </g>+ </svg>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>incident · q1 summary</span><span>05 / 08</span></div>+ </section>++ <!-- 6. CHECKLIST -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag green">red-team checklist</span><span class="ts-page">06 / 08</span></div>+ <h2 class="ts-h2">上线前 <span class="red">必过 7 道题</span></h2>+ <div class="ts-checklist">+ <div class="ts-check ok"><div class="box">✓</div><div class="txt">它能删除东西吗?有人类 review 吗?能 60 秒内回滚吗?</div></div>+ <div class="ts-check ok"><div class="box">✓</div><div class="txt">它的 prompt 注入能让它越权吗?(跑过红队提示词)</div></div>+ <div class="ts-check"><div class="box">!</div><div class="txt">它处理 PII 吗?日志里是不是也有 PII?</div></div>+ <div class="ts-check ok"><div class="box">✓</div><div class="txt">上下游失败时,它会不会开始乱改其他资源?</div></div>+ <div class="ts-check"><div class="box">!</div><div class="txt">并发 100 个 agent 一起跑会不会死锁?</div></div>+ <div class="ts-check ok"><div class="box">✓</div><div class="txt">错了能不能 <b>立刻</b> 停?(kill switch 能 2 秒内生效吗)</div></div>+ <div class="ts-check"><div class="box">!</div><div class="txt">出事时有没有人值班?值班手册有没有 agent 专属章节?</div></div>+ </div>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>checklist · pre-launch</span><span>06 / 08</span></div>+ </section>++ <!-- 7. CTA -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag green">今晚就能动</span><span class="ts-page">07 / 08</span></div>+ <h2 class="ts-h2">今晚先做 <span class="ts-highlight-red">三件事</span></h2>+ <div class="ts-grid-3">+ <div class="ts-card"><div class="lbl">1 · 分级</div><h4>给你的 agent<br>写 L1/L2/L3</h4><p>把所有工具列出来,标上等级。不标的一律按 L3。</p></div>+ <div class="ts-card"><div class="lbl">2 · 写 policy</div><h4>policy.yaml<br>接 runtime</h4><p>不要信 prompt 里的 "be careful",要信执行层的硬卡。</p></div>+ <div class="ts-card"><div class="lbl">3 · kill switch</div><h4>红按钮<br>能在 2 秒内停</h4><p>CTO / on-call 都得知道怎么按。演练一次。</p></div>+ </div>+ <div class="ts-alert-box green">+ <h3>真正的安全不是 prompt,是流程</h3>+ <p>prompt 会被注入,流程不会。—— 把保护放在不可被说服的一层。</p>+ </div>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>cta · tonight</span><span>07 / 08</span></div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="ts-stripe"></div>+ <div class="ts-chrome"><span class="ts-alert-tag amber">please stay safe</span><span class="ts-page">08 / 08</span></div>+ <div style="margin:auto 0">+ <div class="ts-kicker">end of brief</div>+ <h1 class="ts-h1" style="font-size:140px">谢谢 <span class="red">·</span> thanks</h1>+ <p class="ts-sub" style="font-size:24px">policy.yaml 模板、红队 prompt 清单、事故复盘模板 —— 评论区扣「安全」。</p>+ </div>+ <div class="ts-stripe-b"></div>+ <div class="ts-footer"><span>end of brief</span><span>08 / 08</span></div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-simple/SKILL.md b/src/lib/templates/skills/deck-simple/SKILL.mdnew file mode 100644index 00000000..95da9620--- /dev/null+++ b/src/lib/templates/skills/deck-simple/SKILL.md@@ -0,0 +1,20 @@+---+name: deck-simple+zh_name: "通用 Simple Deck"+en_name: "Simple Deck"+emoji: "▫️"+description: "通用 horizontal-swipe HTML deck, 不要 magazine 调"+category: slides+scenario: product+aspect_hint: "16:9"+tags: ["deck", "simple", "swipe"]+---++【模板: Simple Deck】+【意图】干净通用的 horizontal-swipe deck (pitch / overview / study)。+【布局】+- Cover + 6-10 个 content 页 + 收尾+- 每页一个核心信息 + 1 张图 / 1 个图表+- 顶部 progress bar+【设计细节】+- 键盘 ← / → 切换 + hash 同步diff --git a/src/lib/templates/skills/deck-simple/example.html b/src/lib/templates/skills/deck-simple/example.htmlnew file mode 100644index 00000000..eb928463--- /dev/null+++ b/src/lib/templates/skills/deck-simple/example.html@@ -0,0 +1,141 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Filebase · Investor deck — Q2 2026</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --accent: #c96442; --surface: #ffffff;+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; height: 100%; }+ body {+ background: var(--bg);+ color: var(--fg);+ font: 18px/1.5 -apple-system, system-ui, sans-serif;+ display: flex;+ overflow-x: auto;+ overflow-y: hidden;+ scroll-snap-type: x mandatory;+ scroll-behavior: smooth;+ }+ body::-webkit-scrollbar { display: none; }+ .slide {+ flex: 0 0 100vw;+ height: 100vh;+ scroll-snap-align: start;+ padding: 80px 96px;+ display: flex;+ flex-direction: column;+ justify-content: center;+ position: relative;+ }+ .slide.title { background: var(--fg); color: var(--bg); }+ .eyebrow { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 28px; }+ .slide h1 { font-size: clamp(48px, 7vw, 96px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 20px; max-width: 16ch; }+ .slide h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.015em; margin: 0 0 20px; max-width: 20ch; }+ .slide .body { font-size: 22px; color: var(--muted); max-width: 56ch; }+ .slide.title .body { color: rgba(250,250,249,0.7); }+ .slide.big-stat .number { font-size: clamp(120px, 22vw, 280px); line-height: 0.9; letter-spacing: -0.04em; color: var(--accent); margin-bottom: 16px; font-weight: 600; }+ .slide.big-stat .caption { font-size: 24px; color: var(--muted); max-width: 24ch; }+ .quote-mark { font-family: Georgia, serif; font-size: 200px; line-height: 0.7; color: var(--accent); opacity: 0.18; margin-bottom: -40px; }+ .quote-text { font-family: Georgia, serif; font-size: 36px; line-height: 1.3; max-width: 26ch; margin: 0 0 28px; }+ .quote-author { font-size: 14px; color: var(--muted); }+ .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }+ .grid-3 .pt { border-top: 2px solid var(--accent); padding-top: 16px; }+ .grid-3 .pt .h { font-size: 18px; font-weight: 500; margin: 0 0 8px; }+ .grid-3 .pt .p { color: var(--muted); margin: 0; font-size: 16px; }+ .counter { position: fixed; bottom: 24px; right: 32px; font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); background: var(--surface); padding: 4px 10px; border-radius: 999px; border: 1px solid #e6e4e0; }+ .hint { position: fixed; bottom: 24px; left: 32px; font-size: 11px; color: var(--muted); }+ </style>+</head>+<body>+ <section class="slide title" data-od-id="slide-1">+ <div class="eyebrow" style="color:#c96442;">Filebase · Series B · Q2 2026</div>+ <h1>The bandwidth bill is the bug.</h1>+ <p class="body">A sync engine that ships only what changed. Backed by 3,184 paying teams.</p>+ </section>+ <section class="slide" data-od-id="slide-2">+ <div class="eyebrow">Problem</div>+ <h2>Every other tool re-uploads the whole file.</h2>+ <p class="body">Edit one frame in a 4 GB Final Cut project; today's tools sync all 4 GB. The video, post-production, and design industries are eating multi-thousand-dollar bandwidth bills they shouldn't be.</p>+ </section>+ <section class="slide big-stat" data-od-id="slide-3">+ <div class="number">38×</div>+ <div class="caption">less data moved over the wire vs. naive sync, on real customer workloads.</div>+ </section>+ <section class="slide" data-od-id="slide-4">+ <div class="eyebrow">Why now</div>+ <h2>Three shifts make this market real.</h2>+ <div class="grid-3">+ <div class="pt"><h3 class="h">Remote post-production</h3><p class="p">Editors don't sit in one room any more. Cloud sync went from convenient to load-bearing.</p></div>+ <div class="pt"><h3 class="h">AI workflows</h3><p class="p">Diffusion checkpoints are 7 GB. Engineers iterate on them daily. Existing tools choke.</p></div>+ <div class="pt"><h3 class="h">Bandwidth pricing</h3><p class="p">Egress costs 4× what it did in 2022. Storage is cheap; movement is expensive.</p></div>+ </div>+ </section>+ <section class="slide" data-od-id="slide-5">+ <div class="quote-mark">"</div>+ <p class="quote-text">Filebase pays for itself in the first month. We were going to hire a dedicated DevOps person to babysit our sync — instead we just switched.</p>+ <p class="quote-author">— Mira Hassan, CTO at Northwind Studios</p>+ </section>+ <section class="slide title" data-od-id="slide-6">+ <div class="eyebrow" style="color:#c96442;">Ask</div>+ <h1>$22M to ship the next sync engine.</h1>+ <p class="body">18-month runway, hire 14, expand to enterprise on-prem.</p>+ </section>++ <div class="counter" id="counter">1 / 6</div>+ <div class="hint">← / → to navigate</div>++ <script>+ const slides = document.querySelectorAll('.slide');+ const counter = document.getElementById('counter');+ let active = 0;++ // Detect the real scroller — when body has `display: flex` + `overflow-x: auto`+ // the scroller can be body OR documentElement depending on the host (in+ // particular, the OD srcdoc iframe). Pick whichever actually overflows.+ function scroller() {+ if (document.body.scrollWidth > document.body.clientWidth + 1) return document.body;+ return document.scrollingElement || document.documentElement;+ }++ function go(i) {+ const next = Math.max(0, Math.min(slides.length - 1, i));+ active = next;+ counter.textContent = (next + 1) + ' / ' + slides.length;+ scroller().scrollTo({ left: next * window.innerWidth, behavior: 'smooth' });+ }+ function syncFromScroll() {+ const i = Math.round(scroller().scrollLeft / window.innerWidth);+ if (i !== active && i >= 0 && i < slides.length) {+ active = i;+ counter.textContent = (i + 1) + ' / ' + slides.length;+ }+ }+ function onKey(e) {+ if (e.target && (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA')) return;+ if (e.key === 'ArrowRight' || e.key === ' ' || e.key === 'PageDown') { e.preventDefault(); go(active + 1); }+ else if (e.key === 'ArrowLeft' || e.key === 'PageUp') { e.preventDefault(); go(active - 1); }+ else if (e.key === 'Home') { e.preventDefault(); go(0); }+ else if (e.key === 'End') { e.preventDefault(); go(slides.length - 1); }+ }+ // Listen on both window and document in capture phase so the handler+ // fires regardless of which element holds focus inside the iframe.+ window.addEventListener('keydown', onKey, true);+ document.addEventListener('keydown', onKey, true);+ // And listen for scroll on both surfaces — same reason.+ document.addEventListener('scroll', syncFromScroll, { passive: true, capture: true });+ window.addEventListener('scroll', syncFromScroll, { passive: true });++ // Auto-focus body so arrow keys work without a click.+ document.body.setAttribute('tabindex', '-1');+ document.body.style.outline = 'none';+ function focusDeck() { try { window.focus(); document.body.focus({ preventScroll: true }); } catch (_) {} }+ document.addEventListener('mousedown', focusDeck);+ window.addEventListener('load', focusDeck);+ focusDeck();+ </script>+</body>+</html>diff --git a/src/lib/templates/skills/deck-swiss-international/SKILL.md b/src/lib/templates/skills/deck-swiss-international/SKILL.mdnew file mode 100644index 00000000..5cabea14--- /dev/null+++ b/src/lib/templates/skills/deck-swiss-international/SKILL.md@@ -0,0 +1,63 @@+---+name: deck-swiss-international+zh_name: "瑞士国际主义 Deck"+en_name: "Swiss International Deck"+emoji: "🟦"+description: "16 列网格 + 单一饱和 accent + 22 个锁死版面 (Klein Blue / Lemon / Mint / Safety Orange)"+category: slides+scenario: marketing+aspect_hint: "16:9 横向翻页"+featured: 50+recommended: 2+tags: ["swiss", "grid", "international", "ikb", "editorial", "facts"]+example_id: sample-swiss-international+example_name: "Swiss International · 产品路线"+example_format: markdown+example_tagline: "Klein Blue IKB + 16 列网格"+example_desc: "S01 Cover + S06 KPI Tower 两页预览, IKB 全屏标题 + 4 柱状 KPI"+example_source_url: "https://github.com/op7418/guizang-ppt-skill"+example_source_label: "op7418/guizang-ppt-skill"+---++【模板: 瑞士国际主义 Deck (Swiss International)】+【意图】事实、产品、分析、方法论表达。极度冷静、理性、学院派, 没有任何手绘 / 噪点 / 装饰。Inspired by op7418/guizang-ppt-skill Style B。++【主题】**只能从下面 4 套二选一, 不许混用、不许改 hex**:+- 🔵 **Klein Blue (IKB)** — accent `#002FA7`, paper `#fafaf8`, ink `#0a0a0a`. 商业 / AI / 设计场景。+- 🟡 **Lemon Yellow** — accent `#FFD500`, paper `#f7f5ee` (淡奶油), ink `#0a0a0a`. 年轻 / 零售 / 体育。文字必须用黑色 (不能白色)。+- 🟢 **Lemon Green / Neon** — accent `#C5E803`, paper `#f7f5ee`, ink `#0a0a0a`. 可持续 / 科技初创 / Gen-Z 品牌。文字必须用黑色。+- 🟠 **Safety Orange** — accent `#FF6B35`, paper `#f7f5ee`, ink `#0a0a0a`. 工业 / 汽车 / 紧急消息。文字用白色 + bold ≥ 600。++【布局 — 22 个锁死版面, 按内容从下面挑 6-10 张组成 deck, 不许新增或改造版式】+- **S01 Cover** — 全屏 accent + ASCII 呼吸点阵 + 反白标题 + 元数据 chrome (date / № / topic)。+- **S02 Vertical Timeline** — 左侧虚线轴 + 圆点; 右侧节点 = 年份 + KPI + 描述。+- **S03 Statement** — 9.6vw 居中巨字 + 左侧大段留白 + 底部 hairline + 注释。+- **S04 Six Cells** — 2×3 网格, 每格: icon + 编号 + 短标题 + 单行描述。+- **S05 Three Sub-cards** — 左侧 hero 标题 + 右侧 3 张水平堆叠的灰色卡。+- **S06 KPI Tower** — 4 列变高蓝色柱状; 柱顶 icon; 柱底大数字 + 标签。+- **S07 H-Bar Chart** — 水平排名横条, 宽度反映数据, 末端标数字。+- **S08 Duo Compare** — 垂直分割线; 左 Before / 右 After。+- **S09 Closing Manifesto** — 左 IKB 块 + ASCII 点阵 + 宣言; 右白底 + 3 条要点。+- **S10 Dot Matrix Statement** — 居中宣言 + 角落几何点矩阵 / 圆环矩阵。+- **S11 Horizontal Timeline** — 顶部 headline, 中部 hairline 轴, 等距节点, 节点下方步骤名。+- **S12 Manifesto + Ink Banner** — 上半 headline + 解释; 下半全宽黑色横幅 + 反白小字。+- **S13 Three Forces Cards** — 左 ink hero 块; 右 3 张灰色卡, 每卡: 大数字 + 文本。+- **S14 Loop Diagram** — 左编号步骤; 右 SVG 同心环; 中心 "LOOP" 标签。+- **S15 Image Matrix + Hero Stat** — 4×3 等高卡片 (12 项) + 底部 summary 大数字 + 标签。+- **S16 Multi-card Brief** — 3×2 微卡; 主文左上, 注脚右下, 单卡 accent 高亮。+- **S17 System Diagram** — 左 headline + 3 段描述; 右 SVG 三同心圆 + 外部标签。+- **S18 Why Now** — 3 列, 每列: category label + headline + 描述 + 底部数字 (最后一列 accent)。+- **S19 Four Cards** — 顶部 accent hairline + headline + 4 张等宽卡 (元数据 / 标题 / 正文)。+- **S20 Stacked KPI Ledger** — 垂直行 + hairline 分隔; 左大数字 / 中标签 / 右 icon。+- **S21 Tech Spec Sheet** — 左标题块 / 中 3 个 KPI hairline / 右变高柱 / 底数据。+- **S22 Image Hero** — 上 60% 全宽图 + 白色标题块覆盖; 下 40% 解释 + 3 列 KPI。++【设计细节 — 绝对铁律】+- **只用直角**: 全程 `border-radius: 0`。圆角 = 立刻违反。+- **1px hairline borders**, 黑色或 accent; 严禁阴影 / 渐变 / blur。+- **16 列网格**: `grid-template-columns: repeat(16, 1fr); gap: 0`。+- **字体**: Inter Tight (Latin display) / Inter (body) / Noto Sans SC (中文) / JetBrains Mono (数据); 严禁衬线、严禁装饰字体。+- **字号极端反差**: cover 用 9.6vw display, body 14-16px, label 11px uppercase letterspacing 0.08em。+- **键盘 ← / → 切换 + hash 同步**; 角标固定: `№N/N` 右下, topic 标签左下。+- **不许编造**: 数字必须来自用户输入, 图表柱高 = 真实数据按比例。+- 输出单文件 HTML, 不用任何外部图片 URL; 装饰几何 (ASCII 矩阵 / 同心圆) 用纯 CSS 或内联 SVG。diff --git a/src/lib/templates/skills/deck-swiss-international/example.html b/src/lib/templates/skills/deck-swiss-international/example.htmlnew file mode 100644index 00000000..887a0ec3--- /dev/null+++ b/src/lib/templates/skills/deck-swiss-international/example.html@@ -0,0 +1,117 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<title>Swiss International · Open Design 2026</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />+<style>+ body { font-family: 'Inter Tight','Inter','Noto Sans SC',system-ui,sans-serif; background:#0a0a0a; color:#fafaf8; margin:0; }+ .slide { width:100%; aspect-ratio:16/9; max-width:1280px; margin:0 auto; position:relative; overflow:hidden; }+ .ikb { background:#002FA7; color:#fafaf8; }+ .paper { background:#fafaf8; color:#0a0a0a; }+ .mono { font-family:'JetBrains Mono', ui-monospace, monospace; }+ .hairline-b { border-bottom:1px solid currentColor; }+ .hairline-t { border-top:1px solid currentColor; }+ /* ASCII dot field */+ .ascii { font-family:'JetBrains Mono', monospace; font-size:11px; line-height:1; letter-spacing:6px; opacity:0.2; }+ .bar { width:60px; background:#002FA7; }+ .deck { display:grid; gap:24px; padding:24px; }+</style>+</head>+<body>+<div class="deck">++ <!-- S01 Cover · Full IKB -->+ <section class="slide ikb">+ <div class="absolute inset-0 p-12 flex flex-col justify-between">+ <header class="flex items-baseline justify-between mono text-[11px] uppercase tracking-[0.18em]">+ <span>OPEN DESIGN — 2026 ROADMAP</span>+ <span>S01 / 22</span>+ <span>2026.05.11</span>+ </header>+ <!-- ascii dot matrix top-right -->+ <pre class="absolute top-20 right-12 ascii">▒▓█▓▒░░▒▓█▓▒+▒▒▓█▓▒░░▒▓█▓▒+░▒▓█▓▒░░▒▓█▓▒+░░▒▓█▓▒░░▒▓█▓+▒░░▒▓█▓▒░░▒▓+▒▒░░▒▓█▓▒░░▒</pre>+ <div>+ <div class="mono text-[12px] uppercase tracking-[0.18em] opacity-80">№01 · A LANDMARK</div>+ <h1 class="mt-3 font-black leading-[0.95] tracking-[-0.02em]" style="font-size:clamp(48px,7.5vw,124px)">+ Designing<br/>intelligence<br/>on warm paper.+ </h1>+ <p class="mt-5 max-w-[640px] text-[15px] opacity-90 leading-snug">+ 75 个世界级 HTML 模板 · 17 个本地 AI agent 适配 · 0 API 成本 · 一键发布到任何平台。+ </p>+ </div>+ <footer class="flex items-baseline justify-between mono text-[11px] uppercase tracking-[0.18em] opacity-70 hairline-t pt-3">+ <span>OPEN-DESIGN.STUDIO</span>+ <span>BERLIN · 52.5200° N · 13.4050° E</span>+ <span>VOL. 01</span>+ </footer>+ </div>+ </section>++ <!-- S06 KPI Tower · paper bg, 4 IKB bars -->+ <section class="slide paper">+ <div class="absolute inset-0 p-12 flex flex-col justify-between">+ <header class="flex items-baseline justify-between mono text-[11px] uppercase tracking-[0.18em]">+ <span>KPI TOWER — Q1-Q4 OUTLOOK</span>+ <span>S06 / 22</span>+ <span>FY 2026</span>+ </header>+ <div>+ <div class="mono text-[12px] uppercase tracking-[0.18em]" style="color:#002FA7">№06 · GROWTH METRICS</div>+ <h2 class="mt-2 font-black leading-[1] tracking-[-0.02em]" style="font-size:clamp(36px,4.8vw,80px)">+ 四根柱子, 一个目标 ——<br/>+ 做<span style="color:#002FA7">最被信任</span>的 HTML 生产线。+ </h2>+ </div>+ <!-- bars -->+ <div class="grid grid-cols-4 gap-10 items-end mt-6">+ <div class="text-center">+ <div class="mb-3 mx-auto" style="height:32px">+ <svg viewBox="0 0 24 24" class="w-7 h-7 mx-auto" fill="#002FA7"><rect x="4" y="4" width="4" height="16"/><rect x="10" y="8" width="4" height="12"/><rect x="16" y="2" width="4" height="18"/></svg>+ </div>+ <div class="bar mx-auto" style="height:60px"></div>+ <div class="mt-3 mono text-[32px] font-bold" style="color:#002FA7">75</div>+ <div class="hairline-t mt-1 pt-1 text-[11px] uppercase tracking-[0.16em] opacity-70">模板 · 现在</div>+ </div>+ <div class="text-center">+ <div class="mb-3 mx-auto" style="height:32px">+ <svg viewBox="0 0 24 24" class="w-7 h-7 mx-auto" fill="#002FA7"><circle cx="12" cy="12" r="9" fill="none" stroke="#002FA7" stroke-width="2"/><circle cx="12" cy="12" r="3"/></svg>+ </div>+ <div class="bar mx-auto" style="height:140px"></div>+ <div class="mt-3 mono text-[32px] font-bold" style="color:#002FA7">200</div>+ <div class="hairline-t mt-1 pt-1 text-[11px] uppercase tracking-[0.16em] opacity-70">模板 · Q4 目标</div>+ </div>+ <div class="text-center">+ <div class="mb-3 mx-auto" style="height:32px">+ <svg viewBox="0 0 24 24" class="w-7 h-7 mx-auto" fill="#002FA7"><path d="M12 2l3 7h7l-5.5 4.5 2 7L12 16l-6.5 4.5 2-7L2 9h7z"/></svg>+ </div>+ <div class="bar mx-auto" style="height:230px"></div>+ <div class="mt-3 mono text-[32px] font-bold" style="color:#002FA7">25K</div>+ <div class="hairline-t mt-1 pt-1 text-[11px] uppercase tracking-[0.16em] opacity-70">GH Stars · 目标</div>+ </div>+ <div class="text-center">+ <div class="mb-3 mx-auto" style="height:32px">+ <svg viewBox="0 0 24 24" class="w-7 h-7 mx-auto" fill="#002FA7"><path d="M5 3l10 9-10 9z"/></svg>+ </div>+ <div class="bar mx-auto" style="height:280px"></div>+ <div class="mt-3 mono text-[32px] font-bold" style="color:#002FA7">80K</div>+ <div class="hairline-t mt-1 pt-1 text-[11px] uppercase tracking-[0.16em] opacity-70">WAU · 目标</div>+ </div>+ </div>+ <footer class="flex items-baseline justify-between mono text-[11px] uppercase tracking-[0.18em] opacity-60 hairline-t pt-3 mt-4">+ <span>SOURCE — INTERNAL ANALYTICS / 2026-04</span>+ <span>OPEN-DESIGN.STUDIO</span>+ <span>№06 / 22</span>+ </footer>+ </div>+ </section>++</div>+</body>+</html>diff --git a/src/lib/templates/skills/deck-swiss-international/example.md b/src/lib/templates/skills/deck-swiss-international/example.mdnew file mode 100644index 00000000..20495b72--- /dev/null+++ b/src/lib/templates/skills/deck-swiss-international/example.md@@ -0,0 +1,15 @@+# Open Design · 2026 路线图++> Klein Blue 主题, 双页预览: S01 Cover + S06 KPI Tower++## 一句话+打造世界级 AI 写作 / 设计基础设施。++## Q1-Q4 关键指标++| 维度 | 数字 |+|---|---|+| 模板数 | 75 → 200 |+| 周活用户 | 12K → 80K |+| Agent 适配 | 17 → 28 |+| GitHub Stars | 4.2K → 25K |diff --git a/src/lib/templates/skills/deck-tech-sharing/SKILL.md b/src/lib/templates/skills/deck-tech-sharing/SKILL.mdnew file mode 100644index 00000000..72fd9ec9--- /dev/null+++ b/src/lib/templates/skills/deck-tech-sharing/SKILL.md@@ -0,0 +1,23 @@+---+name: deck-tech-sharing+zh_name: "技术分享 Deck"+en_name: "Tech Sharing Deck"+emoji: "💻"+description: "GitHub-dark + JetBrains Mono + 终端代码块, 含 agenda + Q&A"+category: slides+scenario: engineering+aspect_hint: "16:9"+featured: 22+tags: ["tech talk", "conference", "engineering"]+---++【模板: Tech Sharing Deck】+【意图】工程内部分享 / 会议 talk 的 deck。+【布局】+- Cover (议题 + 讲者 + handle)+- Agenda 页+- 正文页若干 (代码块 + 关键观点)+- Demo 页 (terminal 截图)+- Q&A 页+【设计细节】+- GitHub-dark 配色 + JetBrains Monodiff --git a/src/lib/templates/skills/deck-tech-sharing/example.html b/src/lib/templates/skills/deck-tech-sharing/example.htmlnew file mode 100644index 00000000..0ca265ba--- /dev/null+++ b/src/lib/templates/skills/deck-tech-sharing/example.html@@ -0,0 +1,512 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">+<title>Rust 异步运行时内部机制 · Tech Sharing</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* html-ppt :: animations.css+ * Apply by adding class="anim-<name>" or data-anim="<name>".+ * Durations are deliberately snappy; tweak --anim-dur per element.+ */+:root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}++/* ---------- FADE DIRECTIONALS ---------- */+@keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}+@keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}+.anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}+.anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}+.anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}+.anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}++/* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */+@keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}+@keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}+@keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}+@keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}+@keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}+ 20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}+ 40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}+ 60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}+ 80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}+ 100%{opacity:1;transform:none}}+.anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}+.anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}+.anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}+.anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}+.anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}++/* ---------- TYPEWRITER ---------- */+.anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;+ width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}+@keyframes kf-type{to{width:100%}}+@keyframes kf-caret{50%{border-color:transparent}}++/* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */+@keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}+ 50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}+.anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}++.anim-shimmer-sweep{position:relative;overflow:hidden}+.anim-shimmer-sweep::after{content:"";position:absolute;inset:0;+ background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);+ transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}+@keyframes kf-shimmer{to{transform:translateX(100%)}}++.anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));+ background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;+ animation:kf-gradflow 4s linear infinite}+@keyframes kf-gradflow{to{background-position:300% 0}}++/* ---------- STAGGER LIST ---------- */+.anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}+.anim-stagger-list > *:nth-child(1){animation-delay:.05s}+.anim-stagger-list > *:nth-child(2){animation-delay:.15s}+.anim-stagger-list > *:nth-child(3){animation-delay:.25s}+.anim-stagger-list > *:nth-child(4){animation-delay:.35s}+.anim-stagger-list > *:nth-child(5){animation-delay:.45s}+.anim-stagger-list > *:nth-child(6){animation-delay:.55s}+.anim-stagger-list > *:nth-child(7){animation-delay:.65s}+.anim-stagger-list > *:nth-child(8){animation-delay:.75s}+.anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}++/* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */+.counter{font-variant-numeric:tabular-nums}++/* ---------- SVG PATH DRAW ---------- */+.anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{+ stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}+@keyframes kf-draw{to{stroke-dashoffset:0}}++/* ---------- PARALLAX TILT (hover) ---------- */+.anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}+.anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}++/* ---------- CARD FLIP 3D ---------- */+@keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}+ to{transform:perspective(1200px) rotateY(0);opacity:1}}+.anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}++/* ---------- CUBE ROTATE 3D ---------- */+@keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}+ to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}+.anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}++/* ---------- PAGE TURN 3D ---------- */+@keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}+ to{transform:perspective(1600px) rotateY(0);opacity:1}}+.anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}++/* ---------- PERSPECTIVE ZOOM ---------- */+@keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}+ to{opacity:1;transform:none}}+.anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}++/* ---------- MARQUEE SCROLL ---------- */+.anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}+@keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}++/* ---------- KEN BURNS ---------- */+@keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}+.anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}++/* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */+.anim-confetti-burst{position:relative}+.anim-confetti-burst::before,.anim-confetti-burst::after{+ content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;+ background:var(--accent);box-shadow:+ 20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),+ 30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),+ 40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),+ 10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));+ opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}+.anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}+@keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}++/* ---------- SPOTLIGHT ---------- */+@keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}+.anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}++/* ---------- MORPH SHAPE (SVG) ---------- */+.anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}+@keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}+ 100%{d:path("M60,120 Q120,220 180,120 T300,120")}}++/* ---------- RIPPLE REVEAL ---------- */+@keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}+ 100%{clip-path:circle(160% at 20% 80%);opacity:1}}+.anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}++/* reduced motion */+@media (prefers-reduced-motion: reduce){+ [class*="anim-"]{animation:none!important;transition:none!important}+}++</style>+<style>/* tech-sharing — 技术分享 dark, code-forward */+.tpl-tech-sharing{+ --bg:#0d1117;--bg-soft:#161b22;--surface:#161b22;--surface-2:#1c2230;+ --border:rgba(139,148,158,.22);--border-strong:rgba(139,148,158,.4);+ --text-1:#e6edf3;--text-2:#8b949e;--text-3:#6e7681;+ --accent:#7ee787;--accent-2:#79c0ff;--accent-3:#ff7b72;+ --grad:linear-gradient(120deg,#7ee787 0%,#79c0ff 60%,#d2a8ff 100%);+ --radius:14px;--radius-lg:20px;+ --shadow:0 20px 60px rgba(0,0,0,.5);+ font-family:'Inter','Noto Sans SC',sans-serif;+}+.tpl-tech-sharing{background:#0d1117;color:var(--text-1)}+.tpl-tech-sharing .slide{padding:72px 96px;background:#0d1117;color:var(--text-1)}+.tpl-tech-sharing .slide::before{content:"";position:absolute;inset:0;background:+ radial-gradient(60% 50% at 90% 10%,rgba(121,192,255,.12),transparent 60%),+ radial-gradient(50% 50% at 10% 90%,rgba(126,231,135,.08),transparent 60%);+ pointer-events:none;z-index:0}+.tpl-tech-sharing .slide>*{position:relative;z-index:1}+.tpl-tech-sharing .h1{font-size:78px;line-height:1.03;font-weight:800;letter-spacing:-.03em;color:#fff}+.tpl-tech-sharing .h2{font-size:54px;font-weight:700;letter-spacing:-.025em;color:#fff}+.tpl-tech-sharing h3,.tpl-tech-sharing h4{color:#fff}+.tpl-tech-sharing .kicker{color:var(--accent);font-family:'JetBrains Mono',monospace;font-size:13px;font-weight:600;text-transform:none;letter-spacing:.02em}+.tpl-tech-sharing .kicker::before{content:"> "}+.tpl-tech-sharing .mono{font-family:'JetBrains Mono','IBM Plex Mono',monospace}+.tpl-tech-sharing .terminal{background:#010409;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.6);font-family:'JetBrains Mono',monospace;font-size:15px;line-height:1.65}+.tpl-tech-sharing .terminal .bar{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#161b22;border-bottom:1px solid var(--border);font-size:12px;color:var(--text-3)}+.tpl-tech-sharing .terminal .dot{width:12px;height:12px;border-radius:50%;background:#ff5f56}+.tpl-tech-sharing .terminal .dot:nth-child(2){background:#ffbd2e}+.tpl-tech-sharing .terminal .dot:nth-child(3){background:#27c93f}+.tpl-tech-sharing .terminal pre{margin:0;padding:24px 28px;color:#e6edf3;overflow:auto;max-height:440px}+.tpl-tech-sharing .kw{color:#ff7b72}+.tpl-tech-sharing .fn{color:#d2a8ff}+.tpl-tech-sharing .str{color:#a5d6ff}+.tpl-tech-sharing .cmt{color:#8b949e;font-style:italic}+.tpl-tech-sharing .num{color:#79c0ff}+.tpl-tech-sharing .card{background:var(--surface);border:1px solid var(--border);box-shadow:none}+.tpl-tech-sharing .card-accent{border-top:3px solid var(--accent)}+.tpl-tech-sharing .pill{background:var(--surface-2);color:var(--text-2);border-color:var(--border)}+.tpl-tech-sharing .pill-accent{background:rgba(126,231,135,.12);color:var(--accent);border-color:rgba(126,231,135,.35)}+.tpl-tech-sharing .tag{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:6px;font-family:'JetBrains Mono',monospace;font-size:12px;background:var(--surface-2);border:1px solid var(--border);color:var(--text-2)}+.tpl-tech-sharing .agenda-row{display:flex;align-items:baseline;gap:24px;padding:18px 0;border-bottom:1px dashed var(--border);font-family:'JetBrains Mono',monospace}+.tpl-tech-sharing .agenda-row .num{color:var(--accent);flex:none;width:48px}+.tpl-tech-sharing .agenda-row .t{color:#fff;font-size:24px;flex:1;font-family:'Inter',sans-serif;font-weight:600}+.tpl-tech-sharing .agenda-row .d{color:var(--text-3);font-size:13px}+.tpl-tech-sharing .speaker{display:flex;align-items:center;gap:14px;margin-top:28px}+.tpl-tech-sharing .speaker .av{width:56px;height:56px;border-radius:50%;background:var(--grad)}+.tpl-tech-sharing .speaker b{display:block;color:#fff;font-size:18px}+.tpl-tech-sharing .speaker span{color:var(--text-3);font-size:13px;font-family:'JetBrains Mono',monospace}+.tpl-tech-sharing .lede{color:var(--text-2)}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-tech-sharing">+<div class="deck">++ <!-- 1. Cover -->+ <section class="slide" data-title="Cover">+ <p class="kicker">tech-sharing / 2026-04-15</p>+ <h1 class="h1 anim-fade-up" data-anim="fade-up">Rust 异步运行时<br>到底在<span style="background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent">调度什么</span>?</h1>+ <p class="lede mt-m">从 <span class="mono">Future::poll</span> 到 tokio 的 work-stealing,一次讲清楚。</p>+ <div class="speaker"><div class="av"></div><div><b>@lewis</b><span>platform infra · 45 min + Q&A</span></div></div>+ <div class="deck-footer"><span class="mono">#async #rust #tokio</span><span class="slide-number" data-current="1" data-total="8"></span></div>+ </section>++ <!-- 2. Agenda -->+ <section class="slide" data-title="Agenda">+ <p class="kicker">agenda.toml</p>+ <h2 class="h2">今天的路线图</h2>+ <div class="stack mt-l">+ <div class="agenda-row"><span class="num">01</span><span class="t">Context: 为什么需要 async</span><span class="d">~5min</span></div>+ <div class="agenda-row"><span class="num">02</span><span class="t">Deep dive 1: Future & Waker</span><span class="d">~12min</span></div>+ <div class="agenda-row"><span class="num">03</span><span class="t">Deep dive 2: Tokio scheduler</span><span class="d">~15min</span></div>+ <div class="agenda-row"><span class="num">04</span><span class="t">Code: 手写一个 mini-runtime</span><span class="d">~8min</span></div>+ <div class="agenda-row"><span class="num">05</span><span class="t">Takeaways + Q&A</span><span class="d">~5min</span></div>+ </div>+ </section>++ <!-- 3. Context -->+ <section class="slide" data-title="Context">+ <p class="kicker">// context</p>+ <h2 class="h2">问题:一个线程一个连接,<br>撑不住 10 万并发。</h2>+ <div class="grid g3 mt-l">+ <div class="card card-accent"><h4>Thread-per-conn</h4><p class="dim">每条连接一根 OS 线程,栈 2–8MB。10 万连接 = 几百 GB RAM。</p><span class="tag mt-s">❌ 不现实</span></div>+ <div class="card card-accent"><h4>Event loop (C)</h4><p class="dim">epoll/kqueue + 回调地狱。快,但写起来痛苦且容易出 bug。</p><span class="tag mt-s">😩 callback hell</span></div>+ <div class="card card-accent"><h4>Async / await</h4><p class="dim">看起来像同步代码,编译成状态机。一根线程跑几千任务。</p><span class="tag mt-s">✅ Rust 选这个</span></div>+ </div>+ </section>++ <!-- 4. Deep dive 1 -->+ <section class="slide" data-title="Deep Dive 1">+ <p class="kicker">deep-dive · 1 / 2</p>+ <h2 class="h2">Future 其实只有一个方法。</h2>+ <div class="grid g2 mt-l" style="align-items:start">+ <div>+ <p class="lede">编译器把 <span class="mono">async fn</span> 变成一个实现了 <span class="mono">Future</span> trait 的匿名状态机。运行时只做一件事:反复 <span class="mono">poll</span> 它,直到返回 <span class="mono">Ready</span>。</p>+ <div class="mt-l">+ <span class="tag">Pending</span> <span class="tag">Ready(T)</span> <span class="tag">Waker.wake()</span>+ </div>+ </div>+ <div class="terminal">+ <div class="bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span>future.rs</span></div>+<pre><span class="kw">pub trait</span> <span class="fn">Future</span> {+ <span class="kw">type</span> Output;+ <span class="kw">fn</span> <span class="fn">poll</span>(+ <span class="kw">self</span>: Pin<&<span class="kw">mut Self</span>>,+ cx: &<span class="kw">mut</span> Context<<span class="str">'_</span>>,+ ) -> Poll<<span class="kw">Self</span>::Output>;+}++<span class="cmt">// Poll::Pending → 挂起,等 waker 唤醒</span>+<span class="cmt">// Poll::Ready(v) → 完成,产出 v</span></pre>+ </div>+ </div>+ </section>++ <!-- 5. Deep dive 2 -->+ <section class="slide" data-title="Deep Dive 2">+ <p class="kicker">deep-dive · 2 / 2</p>+ <h2 class="h2">Tokio 是一个偷任务的小工。</h2>+ <div class="grid g2 mt-l" style="align-items:start">+ <div>+ <p class="lede">Multi-thread runtime = N 个 worker,每个 worker 有自己的本地队列。空闲的 worker 会去别人队列里"偷"任务。</p>+ <div class="stack mt-m">+ <div class="tag">✦ local queue · 256 slots</div>+ <div class="tag">✦ global injection queue</div>+ <div class="tag">✦ work-stealing @ 50% steal ratio</div>+ <div class="tag">✦ LIFO slot for cache locality</div>+ </div>+ </div>+ <div class="card" style="padding:32px">+ <h4 class="mono" style="color:var(--accent-2)">scheduler tick loop</h4>+ <div class="stack mt-m" style="font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.9;color:var(--text-2)">+ <div><span style="color:var(--accent)">1.</span> pop from LIFO slot</div>+ <div><span style="color:var(--accent)">2.</span> else pop from local queue</div>+ <div><span style="color:var(--accent)">3.</span> else drain global queue (every 61 ticks)</div>+ <div><span style="color:var(--accent)">4.</span> else steal from random victim</div>+ <div><span style="color:var(--accent)">5.</span> else park the thread</div>+ </div>+ </div>+ </div>+ </section>++ <!-- 6. Code example -->+ <section class="slide" data-title="Code">+ <p class="kicker">mini-runtime.rs · ~40 LOC</p>+ <h2 class="h2">手写一个最小 runtime。</h2>+ <div class="terminal mt-m">+ <div class="bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span>src/main.rs</span></div>+<pre><span class="kw">use</span> std::collections::VecDeque;+<span class="kw">use</span> std::sync::{Arc, Mutex};+<span class="kw">use</span> std::task::{Context, Poll, Wake, Waker};++<span class="kw">struct</span> Task(Mutex<Pin<Box<<span class="kw">dyn</span> Future<Output = ()> + Send>>>);++<span class="kw">impl</span> Wake <span class="kw">for</span> Task {+ <span class="kw">fn</span> <span class="fn">wake</span>(<span class="kw">self</span>: Arc<<span class="kw">Self</span>>) { QUEUE.lock().unwrap().push_back(<span class="kw">self</span>); }+}++<span class="kw">fn</span> <span class="fn">block_on</span><F: Future<Output = ()> + Send + <span class="str">'static</span>>(fut: F) {+ <span class="fn">spawn</span>(fut);+ <span class="kw">while let Some</span>(task) = QUEUE.lock().unwrap().pop_front() {+ <span class="kw">let</span> waker = Waker::from(task.clone());+ <span class="kw">let mut</span> cx = Context::from_waker(&waker);+ <span class="kw">let mut</span> fut = task.<span class="num">0</span>.lock().unwrap();+ <span class="kw">let</span> _ = fut.as_mut().<span class="fn">poll</span>(&<span class="kw">mut</span> cx); <span class="cmt">// 就是这一行</span>+ }+}</pre>+ </div>+ </section>++ <!-- 7. Takeaways -->+ <section class="slide" data-title="Takeaways">+ <p class="kicker">// takeaways</p>+ <h2 class="h2">三件事带回去。</h2>+ <div class="grid g3 mt-l">+ <div class="card card-accent"><h4>1 · async 是零成本抽象</h4><p class="dim">编译成状态机,没有运行时虚表,没有 GC。</p></div>+ <div class="card card-accent"><h4>2 · Waker 是脉搏</h4><p class="dim">Future 不主动做事,运行时靠 waker 决定"什么时候再 poll"。</p></div>+ <div class="card card-accent"><h4>3 · 别在 async 里阻塞</h4><p class="dim">一行 <span class="mono">std::fs::read</span> 能让整个 worker 停摆。用 <span class="mono">spawn_blocking</span>。</p></div>+ </div>+ <p class="lede mt-l">延伸阅读:<span class="mono">tokio.rs/blog/2019-10-scheduler</span> · <span class="mono">rust-lang.github.io/async-book</span></p>+ </section>++ <!-- 8. Q&A -->+ <section class="slide center tc" data-title="Q and A">+ <div>+ <div class="mono" style="font-size:120px;color:var(--accent);font-weight:800;letter-spacing:-.04em">?</div>+ <h2 class="h2">Questions?</h2>+ <p class="lede" style="margin:14px auto">github.com/lewis · @lewis on slack</p>+ <div class="row mt-l" style="justify-content:center">+ <span class="tag">slides: git.co/rt-deck</span>+ <span class="tag">code: git.co/mini-rt</span>+ </div>+ </div>+ </section>++</div>++</body></html>diff --git a/src/lib/templates/skills/deck-xhs-pastel/SKILL.md b/src/lib/templates/skills/deck-xhs-pastel/SKILL.mdnew file mode 100644index 00000000..704a0126--- /dev/null+++ b/src/lib/templates/skills/deck-xhs-pastel/SKILL.md@@ -0,0 +1,21 @@+---+name: deck-xhs-pastel+zh_name: "马卡龙慢生活 Deck"+en_name: "Pastel Slow-life Deck"+emoji: "🍡"+description: "奶油底 + 柔光 blob + 马卡龙圆角卡片 + Playfair 斜体序号"+category: slides+scenario: personal+aspect_hint: "16:9"+featured: 33+tags: ["xhs", "pastel", "lifestyle", "lifestyle"]+---++【模板: 马卡龙慢生活 Deck】+【意图】生活方式 / 个人成长 / 情绪向内容用 deck。+【布局】+- 奶油 #fef8f1 底 + 三个柔光 blob+- Playfair 斜体衬线 display + sans 正文+- 28px 圆角马卡龙卡片 (桃 / 薄荷 / 天 / 紫 / 柠 / 玫)+- Playfair 斜体 01-04 序号+- SVG donut 图 + chip+page 顶栏diff --git a/src/lib/templates/skills/deck-xhs-pastel/example.html b/src/lib/templates/skills/deck-xhs-pastel/example.htmlnew file mode 100644index 00000000..5de4965a--- /dev/null+++ b/src/lib/templates/skills/deck-xhs-pastel/example.html@@ -0,0 +1,381 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>XHS Pastel Card</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* xhs-pastel-card — 柔和马卡龙大色块封面风 */+.tpl-xhs-pastel-card{+ --xp-bg:#fef8f1;+ --xp-ink:#2a2340;+ --xp-ink2:#5b5470;+ --xp-muted:#9089a8;+ --xp-peach:#ffd8c2;+ --xp-peach-d:#f48b5c;+ --xp-mint:#c8ecd8;+ --xp-mint-d:#2e9d70;+ --xp-sky:#c9dcfb;+ --xp-sky-d:#4e7ed6;+ --xp-lilac:#ddd0f5;+ --xp-lilac-d:#7b5dc4;+ --xp-lemon:#fdf0b2;+ --xp-lemon-d:#c8910a;+ --xp-rose:#fcd0dd;+ --xp-rose-d:#c94673;+ background:var(--xp-bg);+ color:var(--xp-ink);+ font-family:'Playfair Display','Noto Serif SC','Inter','Noto Sans SC',Georgia,serif;+}+.tpl-xhs-pastel-card .slide{background:var(--xp-bg);color:var(--xp-ink);padding:76px 90px}+.tpl-xhs-pastel-card .xp-blob{position:absolute;border-radius:50%;filter:blur(2px);opacity:.85;z-index:0}+.tpl-xhs-pastel-card .xp-blob.b1{width:420px;height:420px;background:radial-gradient(circle,var(--xp-peach),transparent 70%);top:-8%;right:-6%}+.tpl-xhs-pastel-card .xp-blob.b2{width:360px;height:360px;background:radial-gradient(circle,var(--xp-lilac),transparent 72%);bottom:-10%;left:-8%}+.tpl-xhs-pastel-card .xp-blob.b3{width:260px;height:260px;background:radial-gradient(circle,var(--xp-mint),transparent 72%);top:40%;right:20%}+.tpl-xhs-pastel-card .slide > *{position:relative;z-index:2}+.tpl-xhs-pastel-card .xp-topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;font-family:'Inter','Noto Sans SC',sans-serif}+.tpl-xhs-pastel-card .xp-chip{display:inline-flex;align-items:center;gap:10px;padding:8px 18px;border-radius:999px;background:#fff;border:1.5px solid rgba(42,35,64,.1);font-size:13px;font-weight:600;letter-spacing:.08em;color:var(--xp-ink2);text-transform:uppercase}+.tpl-xhs-pastel-card .xp-chip::before{content:'';width:9px;height:9px;border-radius:50%;background:var(--xp-peach-d)}+.tpl-xhs-pastel-card .xp-chip.mint::before{background:var(--xp-mint-d)}+.tpl-xhs-pastel-card .xp-chip.sky::before{background:var(--xp-sky-d)}+.tpl-xhs-pastel-card .xp-chip.lilac::before{background:var(--xp-lilac-d)}+.tpl-xhs-pastel-card .xp-chip.rose::before{background:var(--xp-rose-d)}+.tpl-xhs-pastel-card .xp-page{font-family:'Inter',sans-serif;font-size:13px;color:var(--xp-muted);letter-spacing:.12em;font-weight:600}+.tpl-xhs-pastel-card .xp-kicker{font-family:'Inter',sans-serif;font-size:14px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--xp-peach-d);margin-bottom:14px}+.tpl-xhs-pastel-card .xp-h1{font-size:96px;font-weight:900;line-height:1.05;letter-spacing:-2px;margin:0 0 18px;color:var(--xp-ink);font-family:'Playfair Display','Noto Serif SC',serif}+.tpl-xhs-pastel-card .xp-h1 em{font-style:italic;color:var(--xp-peach-d);font-family:'Playfair Display',serif}+.tpl-xhs-pastel-card .xp-h1 .rose{color:var(--xp-rose-d);font-style:italic}+.tpl-xhs-pastel-card .xp-h1 .mint{color:var(--xp-mint-d);font-style:italic}+.tpl-xhs-pastel-card .xp-h2{font-size:60px;font-weight:800;line-height:1.1;letter-spacing:-1px;margin:0 0 14px;font-family:'Playfair Display','Noto Serif SC',serif}+.tpl-xhs-pastel-card .xp-sub{font-family:'Inter','Noto Sans SC',sans-serif;font-size:21px;line-height:1.6;color:var(--xp-ink2);max-width:800px;font-weight:400}+.tpl-xhs-pastel-card .xp-card{border-radius:28px;padding:30px 34px;background:#fff;box-shadow:0 14px 40px rgba(42,35,64,.08);position:relative;overflow:hidden}+.tpl-xhs-pastel-card .xp-card.peach{background:var(--xp-peach)}+.tpl-xhs-pastel-card .xp-card.mint{background:var(--xp-mint)}+.tpl-xhs-pastel-card .xp-card.sky{background:var(--xp-sky)}+.tpl-xhs-pastel-card .xp-card.lilac{background:var(--xp-lilac)}+.tpl-xhs-pastel-card .xp-card.lemon{background:var(--xp-lemon)}+.tpl-xhs-pastel-card .xp-card.rose{background:var(--xp-rose)}+.tpl-xhs-pastel-card .xp-card .xp-num{font-family:'Playfair Display',serif;font-size:68px;font-weight:900;font-style:italic;line-height:1;opacity:.85}+.tpl-xhs-pastel-card .xp-card h4{font-size:22px;font-weight:800;margin:8px 0;font-family:'Inter','Noto Sans SC',sans-serif}+.tpl-xhs-pastel-card .xp-card p{font-family:'Inter','Noto Sans SC',sans-serif;font-size:15px;line-height:1.55;color:var(--xp-ink2)}+.tpl-xhs-pastel-card .xp-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:26px}+.tpl-xhs-pastel-card .xp-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px;margin-top:26px}+.tpl-xhs-pastel-card .xp-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:24px}+.tpl-xhs-pastel-card .xp-hero-card{background:#fff;border-radius:36px;padding:40px 46px;margin-top:28px;box-shadow:0 20px 50px rgba(42,35,64,.1)}+.tpl-xhs-pastel-card .xp-quote{font-family:'Playfair Display','Noto Serif SC',serif;font-size:40px;font-weight:800;font-style:italic;line-height:1.3;color:var(--xp-ink)}+.tpl-xhs-pastel-card .xp-quote::before{content:'“';font-size:100px;line-height:.8;display:block;color:var(--xp-peach-d);opacity:.7}+.tpl-xhs-pastel-card .xp-footer{position:absolute;left:90px;right:90px;bottom:40px;display:flex;justify-content:space-between;font-family:'Inter',sans-serif;font-size:12px;color:var(--xp-muted);letter-spacing:.1em}+.tpl-xhs-pastel-card .xp-divider{width:90px;height:4px;background:linear-gradient(90deg,var(--xp-peach-d),var(--xp-rose-d));border-radius:2px;margin:20px 0}+.tpl-xhs-pastel-card .xp-codebox{background:#2a2340;color:#fef8f1;border-radius:24px;padding:26px 30px;font-family:'JetBrains Mono',monospace;font-size:14px;line-height:1.85;margin-top:22px}+.tpl-xhs-pastel-card .xp-codebox .cm{color:#9089a8}+.tpl-xhs-pastel-card .xp-codebox .kw{color:#ffc6a0}+.tpl-xhs-pastel-card .xp-codebox .st{color:#c8ecd8}+.tpl-xhs-pastel-card .xp-codebox .hl{color:#fcd0dd;font-weight:700}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-xhs-pastel-card">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="xp-blob b1"></div>+ <div class="xp-blob b2"></div>+ <div class="xp-blob b3"></div>+ <div class="xp-topbar"><div class="xp-chip">A soft manifesto</div><div class="xp-page">01 · 08</div></div>+ <div class="xp-kicker">Living With AI · 2026</div>+ <h1 class="xp-h1">放慢一点,<br>让 <em>AI</em> 帮你<br>过一种 <span class="rose">更温柔</span><br>的生活</h1>+ <div class="xp-divider"></div>+ <p class="xp-sub">这不是一份效率指南。这是一份「怎么用 AI 少做一些事」的清单 —— 把挤出来的 4 小时还给你自己。</p>+ <div class="xp-footer"><span>by lewis · pastel edition</span><span>cover</span></div>+ </section>++ <!-- 2. SECTION -->+ <section class="slide">+ <div class="xp-blob b2"></div>+ <div class="xp-blob b3"></div>+ <div class="xp-topbar"><div class="xp-chip mint">Chapter one</div><div class="xp-page">02 · 08</div></div>+ <div style="margin:auto 0">+ <div class="xp-kicker">先问自己</div>+ <h1 class="xp-h1" style="font-size:120px">什么事<br>是你 <span class="mint">其实不想做</span> 的?</h1>+ <p class="xp-sub">不是「不得不做」,是「做的时候灵魂在叹气」。</p>+ </div>+ <div class="xp-footer"><span>section · chapter 1</span><span>02 · 08</span></div>+ </section>++ <!-- 3. CONTENT 2x2 pastel cards -->+ <section class="slide">+ <div class="xp-blob b1"></div>+ <div class="xp-topbar"><div class="xp-chip rose">Four little escapes</div><div class="xp-page">03 · 08</div></div>+ <h2 class="xp-h2">四件可以<br>完全交给 <em>AI</em> 的小事</h2>+ <div class="xp-grid-2">+ <div class="xp-card peach"><div class="xp-num">01</div><h4>回复那种「收到」邮件</h4><p>它们不需要你思考。让 AI 按你的语气自动处理,一周省 40 分钟。</p></div>+ <div class="xp-card mint"><div class="xp-num">02</div><h4>订餐厅、改签、查路线</h4><p>一句话外包出去。你只负责选最后选项,不负责翻十个 app。</p></div>+ <div class="xp-card sky"><div class="xp-num">03</div><h4>把会议录音变成行动项</h4><p>录音 → 摘要 → todo 一键完成。你只需要确认和签字。</p></div>+ <div class="xp-card lilac"><div class="xp-num">04</div><h4>整理上周拍的 300 张照片</h4><p>按事件分类、挑 10 张精选、写图说。整理档案这件事终于被自动化了。</p></div>+ </div>+ <div class="xp-footer"><span>content · 2x2</span><span>03 · 08</span></div>+ </section>++ <!-- 4. QUOTE -->+ <section class="slide">+ <div class="xp-blob b3"></div>+ <div class="xp-blob b2"></div>+ <div class="xp-topbar"><div class="xp-chip lilac">A small pause</div><div class="xp-page">04 · 08</div></div>+ <div class="xp-hero-card">+ <p class="xp-quote">效率工具的终点,不是<em> 做更多</em>,<br>而是 <em>有资格做更少</em>。</p>+ <div class="xp-divider"></div>+ <p class="xp-sub">当你把「收到」邮件、订餐、行程、照片整理都交出去,你才会惊讶地发现 —— 原来一周有 4 个小时是空的。</p>+ </div>+ <div class="xp-footer"><span>quote</span><span>04 · 08</span></div>+ </section>++ <!-- 5. CODE / PROMPT -->+ <section class="slide">+ <div class="xp-blob b1"></div>+ <div class="xp-topbar"><div class="xp-chip">My auto-reply prompt</div><div class="xp-page">05 · 08</div></div>+ <h2 class="xp-h2">把「<em>收到邮件</em>」<br>自动化的 <span class="rose">一段 prompt</span></h2>+ <pre class="xp-codebox"><span class="cm"># auto-reply skill</span>+<span class="kw">when</span> email matches <span class="st">"收到 / 好的 / 确认 / 收到谢谢"</span>:+ reply:+ tone: <span class="st">"温柔,简短,不要太商业"</span>+ max_lines: <span class="hl">2</span>+ sign_with: <span class="st">"— Lewis"</span>++<span class="kw">always_skip</span>:+ - from: [<span class="st">"家人"</span>, <span class="st">"伴侣"</span>, <span class="st">"亲密朋友"</span>]+ - contains: [<span class="st">"紧急"</span>, <span class="st">"合同"</span>, <span class="st">"付款"</span>]++<span class="cm"># 一周省 38 分钟,测过</span></pre>+ <div class="xp-footer"><span>content · prompt</span><span>05 · 08</span></div>+ </section>++ <!-- 6. CHART — time donut -->+ <section class="slide">+ <div class="xp-blob b2"></div>+ <div class="xp-topbar"><div class="xp-chip mint">Your week, rebuilt</div><div class="xp-page">06 · 08</div></div>+ <h2 class="xp-h2">一周 4 小时 <span class="mint">还给自己</span></h2>+ <div style="display:flex;align-items:center;gap:60px;margin-top:30px">+ <svg viewBox="0 0 260 260" style="width:300px;flex-shrink:0">+ <circle cx="130" cy="130" r="100" fill="none" stroke="#fef0e4" stroke-width="40"/>+ <!-- email 12% -->+ <circle cx="130" cy="130" r="100" fill="none" stroke="#f48b5c" stroke-width="40" stroke-dasharray="75 628" stroke-dashoffset="0" transform="rotate(-90 130 130)"/>+ <!-- logistics 18% -->+ <circle cx="130" cy="130" r="100" fill="none" stroke="#2e9d70" stroke-width="40" stroke-dasharray="113 628" stroke-dashoffset="-75" transform="rotate(-90 130 130)"/>+ <!-- meetings 14% -->+ <circle cx="130" cy="130" r="100" fill="none" stroke="#4e7ed6" stroke-width="40" stroke-dasharray="88 628" stroke-dashoffset="-188" transform="rotate(-90 130 130)"/>+ <!-- photos 6% -->+ <circle cx="130" cy="130" r="100" fill="none" stroke="#7b5dc4" stroke-width="40" stroke-dasharray="38 628" stroke-dashoffset="-276" transform="rotate(-90 130 130)"/>+ <text x="130" y="130" text-anchor="middle" font-family="Playfair Display" font-size="44" font-weight="900" fill="#2a2340">4h</text>+ <text x="130" y="156" text-anchor="middle" font-family="Inter" font-size="12" fill="#9089a8">per week saved</text>+ </svg>+ <div style="flex:1">+ <div class="xp-grid-2" style="grid-template-columns:1fr;gap:12px;margin-top:0">+ <div class="xp-card peach" style="padding:14px 20px;display:flex;align-items:center;gap:14px"><div style="width:14px;height:14px;border-radius:50%;background:var(--xp-peach-d)"></div><div><h4 style="margin:0;font-size:17px">48 min · 邮件</h4></div></div>+ <div class="xp-card mint" style="padding:14px 20px;display:flex;align-items:center;gap:14px"><div style="width:14px;height:14px;border-radius:50%;background:var(--xp-mint-d)"></div><div><h4 style="margin:0;font-size:17px">72 min · 订/改/查</h4></div></div>+ <div class="xp-card sky" style="padding:14px 20px;display:flex;align-items:center;gap:14px"><div style="width:14px;height:14px;border-radius:50%;background:var(--xp-sky-d)"></div><div><h4 style="margin:0;font-size:17px">56 min · 会议摘要</h4></div></div>+ <div class="xp-card lilac" style="padding:14px 20px;display:flex;align-items:center;gap:14px"><div style="width:14px;height:14px;border-radius:50%;background:var(--xp-lilac-d)"></div><div><h4 style="margin:0;font-size:17px">24 min · 照片整理</h4></div></div>+ </div>+ </div>+ </div>+ <div class="xp-footer"><span>chart · donut</span><span>06 · 08</span></div>+ </section>++ <!-- 7. CTA -->+ <section class="slide">+ <div class="xp-blob b1"></div>+ <div class="xp-blob b3"></div>+ <div class="xp-topbar"><div class="xp-chip rose">This weekend</div><div class="xp-page">07 · 08</div></div>+ <h2 class="xp-h2">这周末,<br>先给自己 <em>放一个小假</em></h2>+ <div class="xp-grid-3">+ <div class="xp-card lemon"><div class="xp-num">☕</div><h4>Saturday morning</h4><p>挑一个你最烦的小事,写 prompt,让它从此不再烦你。</p></div>+ <div class="xp-card peach"><div class="xp-num">🌸</div><h4>Saturday afternoon</h4><p>去散步。什么都不带。AI 在家帮你看着消息。</p></div>+ <div class="xp-card sky"><div class="xp-num">🌙</div><h4>Sunday night</h4><p>复盘:哪 4 小时是真的空的?下周继续。</p></div>+ </div>+ <div class="xp-footer"><span>cta</span><span>07 · 08</span></div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="xp-blob b2"></div>+ <div style="margin:auto 0;text-align:center">+ <div class="xp-kicker" style="text-align:center">thanks for reading</div>+ <h1 class="xp-h1" style="font-size:160px;text-align:center">谢谢 <em>·</em> thanks</h1>+ <div class="xp-divider" style="margin:24px auto"></div>+ <p class="xp-sub" style="margin:0 auto">如果你也想过更温柔的一周,评论区跟我说说你打算把哪一件事先交出去 ♡</p>+ </div>+ <div class="xp-footer"><span>end</span><span>08 · 08</span></div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/deck-xhs-post/SKILL.md b/src/lib/templates/skills/deck-xhs-post/SKILL.mdnew file mode 100644index 00000000..01b8accf--- /dev/null+++ b/src/lib/templates/skills/deck-xhs-post/SKILL.md@@ -0,0 +1,19 @@+---+name: deck-xhs-post+zh_name: "小红书图文 Deck"+en_name: "Xiaohongshu Post Deck"+emoji: "🎀"+description: "9 页 3:4 竖版图文, 暖 pastel + 虚线 sticker 卡片"+category: slides+scenario: marketing+aspect_hint: "810×1080 ×9"+featured: 24+tags: ["xhs", "instagram", "carousel"]+---++【模板: 小红书 / Instagram Carousel】+【意图】发小红书 / IG carousel 的 9 页 3:4 竖版图文。+【布局】+- Cover + 7 个 content 页 + 收尾 CTA+- 暖色 pastel 背景+- 虚线 sticker 卡片 + 底部页码 dotsdiff --git a/src/lib/templates/skills/deck-xhs-post/example.html b/src/lib/templates/skills/deck-xhs-post/example.htmlnew file mode 100644index 00000000..a5094469--- /dev/null+++ b/src/lib/templates/skills/deck-xhs-post/example.html@@ -0,0 +1,487 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">+<title>每天只睡 6h 还精神?· 小红书图文</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* html-ppt :: animations.css+ * Apply by adding class="anim-<name>" or data-anim="<name>".+ * Durations are deliberately snappy; tweak --anim-dur per element.+ */+:root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}++/* ---------- FADE DIRECTIONALS ---------- */+@keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}+@keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}+@keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}+.anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}+.anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}+.anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}+.anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}++/* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */+@keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}+@keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}+@keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}+@keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}+@keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}+ 20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}+ 40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}+ 60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}+ 80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}+ 100%{opacity:1;transform:none}}+.anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}+.anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}+.anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}+.anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}+.anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}++/* ---------- TYPEWRITER ---------- */+.anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;+ width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}+@keyframes kf-type{to{width:100%}}+@keyframes kf-caret{50%{border-color:transparent}}++/* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */+@keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}+ 50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}+.anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}++.anim-shimmer-sweep{position:relative;overflow:hidden}+.anim-shimmer-sweep::after{content:"";position:absolute;inset:0;+ background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);+ transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}+@keyframes kf-shimmer{to{transform:translateX(100%)}}++.anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));+ background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;+ animation:kf-gradflow 4s linear infinite}+@keyframes kf-gradflow{to{background-position:300% 0}}++/* ---------- STAGGER LIST ---------- */+.anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}+.anim-stagger-list > *:nth-child(1){animation-delay:.05s}+.anim-stagger-list > *:nth-child(2){animation-delay:.15s}+.anim-stagger-list > *:nth-child(3){animation-delay:.25s}+.anim-stagger-list > *:nth-child(4){animation-delay:.35s}+.anim-stagger-list > *:nth-child(5){animation-delay:.45s}+.anim-stagger-list > *:nth-child(6){animation-delay:.55s}+.anim-stagger-list > *:nth-child(7){animation-delay:.65s}+.anim-stagger-list > *:nth-child(8){animation-delay:.75s}+.anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}++/* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */+.counter{font-variant-numeric:tabular-nums}++/* ---------- SVG PATH DRAW ---------- */+.anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{+ stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}+@keyframes kf-draw{to{stroke-dashoffset:0}}++/* ---------- PARALLAX TILT (hover) ---------- */+.anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}+.anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}++/* ---------- CARD FLIP 3D ---------- */+@keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}+ to{transform:perspective(1200px) rotateY(0);opacity:1}}+.anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}++/* ---------- CUBE ROTATE 3D ---------- */+@keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}+ to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}+.anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}++/* ---------- PAGE TURN 3D ---------- */+@keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}+ to{transform:perspective(1600px) rotateY(0);opacity:1}}+.anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}++/* ---------- PERSPECTIVE ZOOM ---------- */+@keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}+ to{opacity:1;transform:none}}+.anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}++/* ---------- MARQUEE SCROLL ---------- */+.anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}+@keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}++/* ---------- KEN BURNS ---------- */+@keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}+.anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}++/* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */+.anim-confetti-burst{position:relative}+.anim-confetti-burst::before,.anim-confetti-burst::after{+ content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;+ background:var(--accent);box-shadow:+ 20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),+ 30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),+ 40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),+ 10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));+ opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}+.anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}+@keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}++/* ---------- SPOTLIGHT ---------- */+@keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}+.anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}++/* ---------- MORPH SHAPE (SVG) ---------- */+.anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}+@keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}+ 100%{d:path("M60,120 Q120,220 180,120 T300,120")}}++/* ---------- RIPPLE REVEAL ---------- */+@keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}+ 100%{clip-path:circle(160% at 20% 80%);opacity:1}}+.anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}++/* reduced motion */+@media (prefers-reduced-motion: reduce){+ [class*="anim-"]{animation:none!important;transition:none!important}+}++</style>+<style>/* xhs-post — 小红书 3:4 九宫格 */+.tpl-xhs-post{+ --bg:#fef7f3;--bg-soft:#fff1ea;--surface:#ffffff;--surface-2:#fff5ef;+ --border:rgba(90,40,30,.12);--border-strong:rgba(90,40,30,.24);+ --text-1:#3a1f18;--text-2:#6f4a3e;--text-3:#a68676;+ --accent:#ff6b8b;--accent-2:#ffa94d;--accent-3:#ffd166;+ --grad:linear-gradient(135deg,#ffd3e0,#ffe5c7 50%,#d6f0ff);+ --good:#7bc67b;--warn:#ffb547;--bad:#ff6b6b;+ --radius:24px;--radius-lg:32px;+ --shadow:0 14px 36px rgba(90,40,30,.08);+ font-family:'Inter','Noto Sans SC','PingFang SC',sans-serif;+}+.tpl-xhs-post{background:#f0eae2;display:flex;align-items:center;justify-content:center;min-height:100vh}+.tpl-xhs-post .deck{width:810px;height:1080px;position:relative;background:transparent}+.tpl-xhs-post .slide{+ position:absolute;inset:0;width:810px;height:1080px;aspect-ratio:3/4;+ padding:70px 64px;border-radius:28px;overflow:hidden;+ background:var(--bg);+}+.tpl-xhs-post .slide::before{content:"";position:absolute;inset:0;background:+ radial-gradient(45% 30% at 80% 10%,rgba(255,209,102,.35),transparent 70%),+ radial-gradient(50% 35% at 10% 95%,rgba(255,107,139,.22),transparent 70%),+ radial-gradient(40% 30% at 90% 85%,rgba(122,200,255,.18),transparent 70%);+ pointer-events:none;z-index:0}+.tpl-xhs-post .slide > *{position:relative;z-index:1}+.tpl-xhs-post .h1{font-size:72px;line-height:1.1;font-weight:900;letter-spacing:-.02em;color:var(--text-1)}+.tpl-xhs-post .h2{font-size:54px;line-height:1.15;font-weight:800;letter-spacing:-.015em;color:var(--text-1)}+.tpl-xhs-post .h3{font-size:36px;font-weight:800;color:var(--text-1)}+.tpl-xhs-post .page-dot{position:absolute;top:40px;right:48px;background:var(--text-1);color:#fff;border-radius:999px;padding:6px 14px;font-family:'JetBrains Mono',monospace;font-size:14px;font-weight:700;z-index:2}+.tpl-xhs-post .sticker{position:absolute;padding:10px 18px;background:#fff;border:2.5px dashed var(--text-1);border-radius:18px;font-weight:800;font-size:18px;color:var(--text-1);transform:rotate(-3deg);box-shadow:4px 4px 0 var(--text-1)}+.tpl-xhs-post .sticker.pink{background:#ffd3e0}+.tpl-xhs-post .sticker.yellow{background:#ffe788}+.tpl-xhs-post .sticker.blue{background:#cfeaff}+.tpl-xhs-post .sticker.green{background:#d4f2c8}+.tpl-xhs-post .hand-box{background:#fff;border:2.5px solid var(--text-1);border-radius:22px;padding:24px 28px;box-shadow:5px 5px 0 var(--text-1)}+.tpl-xhs-post .lede{color:var(--text-2);font-size:26px;line-height:1.55}+.tpl-xhs-post .big-emoji{font-size:180px;line-height:1;text-align:center}+.tpl-xhs-post .num-circle{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:50%;background:var(--accent);color:#fff;font-weight:900;font-size:36px;border:3px solid var(--text-1);box-shadow:4px 4px 0 var(--text-1)}+.tpl-xhs-post .step-card{background:#fff;border:2.5px solid var(--text-1);border-radius:22px;padding:26px 28px;box-shadow:5px 5px 0 var(--text-1);margin-bottom:24px}+.tpl-xhs-post .step-card h4{font-size:28px;font-weight:800;margin:0 0 6px}+.tpl-xhs-post .step-card p{font-size:18px;color:var(--text-2);margin:0}+.tpl-xhs-post .tag-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}+.tpl-xhs-post .ht{background:#fff;color:var(--accent);border:2px solid var(--text-1);padding:6px 14px;border-radius:999px;font-weight:700;font-size:16px}+.tpl-xhs-post .cover-title{background:linear-gradient(180deg,transparent 60%,var(--accent-3) 60%,var(--accent-3) 92%,transparent 92%);padding:0 10px}+.tpl-xhs-post .heart{color:var(--accent);font-size:28px}+.tpl-xhs-post .bottom-bar{position:absolute;bottom:40px;left:64px;right:64px;display:flex;justify-content:space-between;align-items:center;font-size:15px;color:var(--text-3);font-family:'JetBrains Mono',monospace;z-index:2}+.tpl-xhs-post .avatar{width:54px;height:54px;border-radius:50%;background:var(--grad);border:2.5px solid var(--text-1);box-shadow:3px 3px 0 var(--text-1);display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:20px;color:var(--text-1)}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-xhs-post">+<div class="deck">++ <!-- 1. Cover -->+ <section class="slide" data-title="Cover">+ <div class="page-dot">1 / 9</div>+ <div class="sticker pink" style="top:120px;left:48px;transform:rotate(-6deg)">💤 救命</div>+ <div class="sticker yellow" style="top:140px;right:64px;transform:rotate(5deg)">亲测 7 天</div>+ <div style="margin-top:200px">+ <p class="lede" style="font-size:24px;color:var(--text-1);font-weight:600">打工人深夜自救手册</p>+ <h1 class="h1 mt-s">每天只睡 <span class="cover-title">6h</span><br>还能<span class="cover-title">精神一整天</span><br>的 3 个小习惯</h1>+ </div>+ <div class="bottom-bar"><div><span class="avatar">小</span> <b style="color:var(--text-1);margin-left:8px">@小熊不困了</b></div><div>← 左滑 查看</div></div>+ </section>++ <!-- 2. Hook -->+ <section class="slide" data-title="Hook">+ <div class="page-dot">2 / 9</div>+ <div class="big-emoji" style="margin-top:80px">👀</div>+ <h2 class="h2 tc mt-l">等等先别划走!</h2>+ <p class="lede tc mt-m" style="padding:0 20px">我也曾是那个<br>早上起来像被卡车撞过的人。<br><br>直到我发现了<br><b style="color:var(--accent)">1 件事</b>比睡够 8 小时还重要。</p>+ <div class="sticker blue" style="bottom:160px;left:50%;transform:translateX(-50%) rotate(-2deg)">真 · 转折点 ↓</div>+ </section>++ <!-- 3. Pain -->+ <section class="slide" data-title="Pain">+ <div class="page-dot">3 / 9</div>+ <p class="lede" style="font-weight:700;color:var(--accent)">❌ 你是不是也这样</p>+ <h2 class="h2 mt-s">越睡越累</h2>+ <div class="stack mt-l">+ <div class="hand-box"><b style="font-size:22px">😵💫 周末补觉到中午</b><p class="dim" style="font-size:16px;margin-top:4px">起来头更晕,一整天废掉</p></div>+ <div class="hand-box"><b style="font-size:22px">☕️ 咖啡续三杯</b><p class="dim" style="font-size:16px;margin-top:4px">下午 3 点照样困到扶墙</p></div>+ <div class="hand-box"><b style="font-size:22px">📱 睡前刷到凌晨</b><p class="dim" style="font-size:16px;margin-top:4px">明明很困就是不舍得睡</p></div>+ </div>+ </section>++ <!-- 4. Aha -->+ <section class="slide" data-title="Aha">+ <div class="page-dot">4 / 9</div>+ <div class="sticker green" style="top:100px;right:48px;transform:rotate(4deg)">✨ aha moment</div>+ <p class="lede mt-l" style="color:var(--accent);font-weight:700">💡 真相是</p>+ <h2 class="h2 mt-s">不是睡得少,<br>是<span style="background:var(--accent-3);padding:0 8px">醒得不对</span>。</h2>+ <p class="lede mt-l">身体有 90 分钟一个周期。<br>在"深睡"里被闹钟拽起来,<br>就算睡 9 小时也跟没睡一样。</p>+ <p class="lede mt-m" style="color:var(--text-1);font-weight:700">关键是:<span style="color:var(--accent)">卡着周期醒</span>。</p>+ </section>++ <!-- 5. Step 1 -->+ <section class="slide" data-title="Step 1">+ <div class="page-dot">5 / 9</div>+ <div class="num-circle">1</div>+ <h2 class="h2 mt-m">倒推睡眠时间</h2>+ <div class="hand-box mt-l">+ <p style="font-size:22px;margin:0;color:var(--text-1);font-weight:700">👉 公式</p>+ <p style="font-size:20px;margin:10px 0 0;color:var(--text-2);line-height:1.7">起床时间 − <b style="color:var(--accent)">90min × N</b> − 15min 入睡<br>= 你今晚该上床的点</p>+ </div>+ <div class="hand-box mt-m" style="background:#fff5ef">+ <p style="font-size:18px;margin:0;color:var(--text-2)">举例:要 7 点起</p>+ <p style="font-size:24px;margin:8px 0 0;color:var(--text-1);font-weight:800">→ 23:15 上床 (4 个周期)<br>→ 00:45 上床 (3 个周期)</p>+ </div>+ </section>++ <!-- 6. Step 2 -->+ <section class="slide" data-title="Step 2">+ <div class="page-dot">6 / 9</div>+ <div class="num-circle" style="background:var(--accent-2)">2</div>+ <h2 class="h2 mt-m">早晨 10 分钟光</h2>+ <div class="hand-box mt-l">+ <p style="font-size:22px;margin:0;color:var(--text-1);font-weight:700">☀️ 打开窗帘 / 下楼遛弯</p>+ <p style="font-size:18px;margin:8px 0 0;color:var(--text-2);line-height:1.6">自然光一照,褪黑素立刻被掐停,人就真的醒了。阴天也有效,别偷懒。</p>+ </div>+ <div class="sticker yellow" style="bottom:200px;right:60px;transform:rotate(8deg)">⏰ 比咖啡还猛</div>+ <div class="hand-box mt-m" style="background:#fff5ef">+ <p style="font-size:18px;margin:0;color:var(--text-2)">懒人方案:</p>+ <p style="font-size:22px;margin:6px 0 0;color:var(--text-1);font-weight:700">刷牙的时候站在窗边 🪥</p>+ </div>+ </section>++ <!-- 7. Step 3 -->+ <section class="slide" data-title="Step 3">+ <div class="page-dot">7 / 9</div>+ <div class="num-circle" style="background:var(--accent-3);color:var(--text-1)">3</div>+ <h2 class="h2 mt-m">下午 3 点<br>20 分钟小睡</h2>+ <div class="hand-box mt-l">+ <p style="font-size:20px;margin:0;color:var(--text-2);line-height:1.6"><b style="color:var(--text-1)">⏱️ 最多 20 分钟。</b>超过 30 就会进入深睡,醒来会更累。</p>+ </div>+ <div class="hand-box mt-m" style="background:#fff5ef">+ <p style="font-size:20px;margin:0;color:var(--text-2);line-height:1.6"><b style="color:var(--text-1)">💡 小 tip:</b>睡前喝一口咖啡。20 分钟后咖啡因正好起效,和小睡的清醒 buff 叠加。</p>+ </div>+ <div class="sticker pink" style="bottom:140px;left:50%;transform:translateX(-50%) rotate(-3deg)">打工人作弊技</div>+ </section>++ <!-- 8. Result -->+ <section class="slide" data-title="Result">+ <div class="page-dot">8 / 9</div>+ <p class="lede" style="color:var(--good);font-weight:700">✅ 我坚持 7 天后</p>+ <h2 class="h2 mt-s">结果是……</h2>+ <div class="stack mt-l">+ <div class="hand-box"><b style="font-size:22px">😌 早上闹钟响之前就自然醒</b></div>+ <div class="hand-box"><b style="font-size:22px">💪 下午不再崩溃</b></div>+ <div class="hand-box"><b style="font-size:22px">☕️ 咖啡从 3 杯 → 1 杯</b></div>+ <div class="hand-box" style="background:var(--accent-3);border-color:var(--text-1)"><b style="font-size:24px">✨ 最重要:脾气变好了</b></div>+ </div>+ </section>++ <!-- 9. CTA -->+ <section class="slide" data-title="CTA">+ <div class="page-dot">9 / 9</div>+ <div class="big-emoji" style="margin-top:60px">💌</div>+ <h2 class="h2 tc mt-l">觉得有用的话</h2>+ <h1 class="h1 tc mt-s" style="color:var(--accent)">收藏 + 关注 🧡</h1>+ <p class="lede tc mt-l" style="padding:0 30px">下期讲<br><b style="color:var(--text-1)">「打工人脊椎急救 5 式」</b><br>办公室也能做</p>+ <div class="tag-row" style="justify-content:center;margin-top:36px">+ <span class="ht">#睡眠</span>+ <span class="ht">#打工人日常</span>+ <span class="ht">#自律</span>+ <span class="ht">#健康生活</span>+ </div>+ <div class="bottom-bar"><div><span class="avatar">小</span> <b style="color:var(--text-1);margin-left:8px">@小熊不困了</b></div><div>❤️ 5.2w</div></div>+ </section>++</div>++</body></html>diff --git a/src/lib/templates/skills/deck-xhs-white/SKILL.md b/src/lib/templates/skills/deck-xhs-white/SKILL.mdnew file mode 100644index 00000000..7aa8789c--- /dev/null+++ b/src/lib/templates/skills/deck-xhs-white/SKILL.md@@ -0,0 +1,20 @@+---+name: deck-xhs-white+zh_name: "白底杂志风 Deck"+en_name: "White Editorial Deck"+emoji: "🌈"+description: "纯白 + 顶部彩虹 bar + 渐变文字 + 马卡龙软卡片 + 黑底 pill"+category: slides+scenario: marketing+aspect_hint: "16:9 / 3:4"+featured: 27+tags: ["editorial", "rainbow", "macaron"]+---++【模板: 白底杂志风 Deck】+【意图】可同时发小红书图文与横版 PPT 双用的白底杂志风。+【布局】+- 纯白背景 + 顶部 10 色彩虹 bar+- 80-110px display 标题 + 紫→蓝→绿→橙→粉渐变文字+- 马卡龙软卡片组 (粉 / 紫 / 蓝 / 绿 / 橙)+- 黑底白字 .focus pill + 引用大块diff --git a/src/lib/templates/skills/deck-xhs-white/example.html b/src/lib/templates/skills/deck-xhs-white/example.htmlnew file mode 100644index 00000000..cb262197--- /dev/null+++ b/src/lib/templates/skills/deck-xhs-white/example.html@@ -0,0 +1,418 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>白底杂志风 · XHS Editorial</title>+<style>/* html-ppt :: shared webfonts */+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500;600;700;900&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');+@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');++</style>+<style>/* html-ppt :: base.css — reset + shared tokens + layout primitives */+/* Default tokens. Themes in assets/themes/*.css override the :root block. */+:root {+ --bg: #ffffff;+ --bg-soft: #f7f7f8;+ --surface: #ffffff;+ --surface-2: #f2f2f4;+ --border: rgba(0,0,0,.08);+ --border-strong: rgba(0,0,0,.16);+ --text-1: #111216;+ --text-2: #55596a;+ --text-3: #8a8f9e;+ --accent: #3b6cff;+ --accent-2: #7a5cff;+ --accent-3: #ff5c8a;+ --good: #1aaf6c;+ --warn: #f5a524;+ --bad: #e0445a;+ --grad: linear-gradient(135deg,#3b6cff,#7a5cff 55%,#ff5c8a);+ --grad-soft: linear-gradient(135deg,#eef2ff,#f5ecff 55%,#ffeef5);+ --radius: 18px;+ --radius-sm: 12px;+ --radius-lg: 26px;+ --shadow: 0 10px 30px rgba(18,24,40,.08), 0 2px 6px rgba(18,24,40,.04);+ --shadow-lg: 0 24px 60px rgba(18,24,40,.14), 0 6px 16px rgba(18,24,40,.06);+ --font-sans: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;+ --font-serif: 'Playfair Display','Noto Serif SC',Georgia,serif;+ --font-mono: 'JetBrains Mono','IBM Plex Mono',SFMono-Regular,Menlo,monospace;+ --font-display: var(--font-sans);+ --letter-tight: -.03em;+ --letter-normal: -.01em;+ --ease: cubic-bezier(.4,0,.2,1);+}++*,*::before,*::after{box-sizing:border-box}+html,body{margin:0;padding:0;background:var(--bg);color:var(--text-1);+ font-family:var(--font-sans);font-weight:400;line-height:1.6;+ -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;+ letter-spacing:var(--letter-normal)}+img,svg,video{max-width:100%;display:block}+a{color:var(--accent);text-decoration:none}+a:hover{text-decoration:underline}+code,kbd,pre,samp{font-family:var(--font-mono)}++/* ================= SLIDE SYSTEM ================= */+.deck{position:relative;width:100vw;height:100vh;overflow:hidden;background:var(--bg)}+.slide{+ position:absolute;inset:0;+ display:flex;flex-direction:column;justify-content:center;+ padding:72px 96px;+ box-sizing:border-box;+ opacity:0;pointer-events:none;+ transition:opacity .5s var(--ease), transform .5s var(--ease);+ transform:translateX(30px);+ overflow:hidden;+}+.slide.is-active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2}+.slide.is-prev{transform:translateX(-30px)}++/* single-page standalone (used when a layout file is opened directly) */+body.single .slide{position:relative;width:100vw;height:100vh;opacity:1;transform:none;pointer-events:auto}++/* ================= TYPOGRAPHY ================= */+.eyebrow{font-size:13px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--text-3)}+.kicker{font-size:14px;font-weight:600;color:var(--accent);letter-spacing:.08em;text-transform:uppercase}+h1.title,.h1{font-family:var(--font-display);font-size:72px;line-height:1.05;font-weight:800;letter-spacing:var(--letter-tight);margin:0 0 18px;color:var(--text-1)}+h2.title,.h2{font-family:var(--font-display);font-size:54px;line-height:1.1;font-weight:700;letter-spacing:var(--letter-tight);margin:0 0 14px}+h3,.h3{font-size:32px;line-height:1.2;font-weight:600;letter-spacing:var(--letter-normal);margin:0 0 10px}+h4,.h4{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 8px}+.lede{font-size:22px;line-height:1.55;color:var(--text-2);font-weight:300;max-width:62ch}+.dim{color:var(--text-2)}+.dim2{color:var(--text-3)}+.mono{font-family:var(--font-mono)}+.serif{font-family:var(--font-serif)}+.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}++/* ================= LAYOUT PRIMITIVES ================= */+.stack>*+*{margin-top:14px}+.row{display:flex;gap:24px;align-items:center}+.row.wrap{flex-wrap:wrap}+.grid{display:grid;gap:24px}+.g2{grid-template-columns:repeat(2,1fr)}+.g3{grid-template-columns:repeat(3,1fr)}+.g4{grid-template-columns:repeat(4,1fr)}+.center{display:flex;align-items:center;justify-content:center;text-align:center}+.fill{flex:1}+.sp-t{padding-top:24px}.sp-b{padding-bottom:24px}+.mt-s{margin-top:8px}.mt-m{margin-top:18px}.mt-l{margin-top:32px}+.mb-s{margin-bottom:8px}.mb-m{margin-bottom:18px}.mb-l{margin-bottom:32px}++/* ================= CARDS ================= */+.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);+ padding:26px 28px;box-shadow:var(--shadow);position:relative;overflow:hidden}+.card-soft{background:var(--surface-2);border:1px solid var(--border)}+.card-outline{background:transparent;border:1.5px solid var(--border-strong);box-shadow:none}+.card-accent{background:var(--surface);border-top:3px solid var(--accent)}+.card-hover{transition:transform .3s var(--ease),box-shadow .3s var(--ease)}+.card-hover:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}++.pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:500;+ background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}+.pill-accent{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 28%,transparent)}++/* ================= BARS / DIVIDERS ================= */+.divider{height:1px;background:var(--border);width:100%}+.divider-accent{height:3px;width:72px;background:var(--accent);border-radius:2px}++/* ================= CHROME (header/footer/progress) ================= */+.deck-header{position:absolute;top:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);letter-spacing:.12em;text-transform:uppercase;z-index:10;pointer-events:none}+.deck-footer{position:absolute;bottom:24px;left:40px;right:40px;display:flex;align-items:center;justify-content:space-between;+ font-size:12px;color:var(--text-3);z-index:10;pointer-events:none}+.slide-number::before{content:attr(data-current)}+.slide-number::after{content:" / " attr(data-total)}+.progress-bar{position:fixed;left:0;right:0;bottom:0;height:3px;background:transparent;z-index:20}+.progress-bar > span{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}++/* ================= PRESENTER / OVERVIEW ================= */+.notes{display:none!important}+.notes-overlay{position:fixed;inset:auto 0 0 0;max-height:42vh;background:rgba(20,22,30,.95);color:#e8ebf4;+ padding:20px 32px;font-size:16px;line-height:1.6;border-top:1px solid rgba(255,255,255,.1);transform:translateY(100%);+ transition:transform .3s var(--ease);z-index:40;overflow:auto;font-family:var(--font-sans)}+.notes-overlay.open{transform:translateY(0)}+.overview{position:fixed;inset:0;background:rgba(10,12,18,.92);backdrop-filter:blur(12px);z-index:50;+ display:none;padding:40px;overflow:auto}+.overview.open{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-content:start}+.overview .thumb{background:var(--surface);border:1px solid var(--border);border-radius:12px;+ aspect-ratio:16/9;overflow:hidden;cursor:pointer;position:relative;color:var(--text-1);padding:16px;+ font-size:11px;transition:transform .2s var(--ease)}+.overview .thumb:hover{transform:scale(1.04)}+.overview .thumb .n{position:absolute;top:8px;left:10px;font-weight:700;font-size:14px;color:var(--text-3)}+.overview .thumb .t{position:absolute;bottom:10px;left:14px;right:14px;font-weight:600;color:var(--text-1)}++/* ================= PRESENTER VIEW ================= */+/* Presenter view opens in a separate popup window (S key).+ * All presenter styles are self-contained in the popup HTML generated by runtime.js.+ * The audience window (this file) is NOT affected — it stays as normal deck view.+ * Only the .notes class below is needed to hide speaker notes from audience. */++/* ================= UTILITY ================= */+.hidden{display:none!important}+.nowrap{white-space:nowrap}+.tr{text-align:right}.tc{text-align:center}.tl{text-align:left}+.uppercase{text-transform:uppercase;letter-spacing:.12em}++/* ================= PRINT ================= */+@media print{+ .slide{position:relative;opacity:1!important;transform:none!important;page-break-after:always;height:100vh}+ .deck-header,.deck-footer,.progress-bar,.notes-overlay,.overview{display:none!important}+}++</style>+<style>/* xhs-white-editorial — 白底杂志风 */+.tpl-xhs-white-editorial{+ --xw-bg:#ffffff;+ --xw-ink:#111318;+ --xw-ink2:#475467;+ --xw-muted:#98a2b3;+ --xw-line:#eaecf3;+ --xw-purple:#7b61ff;+ --xw-pink:#ff5fa2;+ --xw-blue:#4e8cff;+ --xw-green:#17b26a;+ --xw-orange:#ff9d42;+ --xw-soft-purple:#f4efff;+ --xw-soft-pink:#fff0f6;+ --xw-soft-blue:#eef4ff;+ --xw-soft-green:#edfdf3;+ --xw-soft-orange:#fff5ea;+ background:var(--xw-bg);+ color:var(--xw-ink);+ font-family:'Inter','Noto Sans SC','PingFang SC',-apple-system,sans-serif;+}+.tpl-xhs-white-editorial .slide{background:#fff;padding:72px 88px}+.tpl-xhs-white-editorial .xw-topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}+.tpl-xhs-white-editorial .xw-tag{display:inline-flex;align-items:center;gap:10px;padding:10px 18px;border:1px solid var(--xw-line);border-radius:999px;font-size:15px;color:var(--xw-ink2);background:#fff}+.tpl-xhs-white-editorial .xw-tag .dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(90deg,#7b61ff,#4e8cff,#17b26a,#ff9d42,#ff5fa2)}+.tpl-xhs-white-editorial .xw-page{font-size:14px;color:var(--xw-muted);letter-spacing:.1em}+.tpl-xhs-white-editorial .xw-kicker{font-size:18px;color:var(--xw-ink2);margin-top:6px;font-weight:500}+.tpl-xhs-white-editorial .xw-title{font-size:84px;line-height:1.02;letter-spacing:-2px;font-weight:850;margin:18px 0 0;color:var(--xw-ink)}+.tpl-xhs-white-editorial .xw-title-md{font-size:60px;line-height:1.05;letter-spacing:-1.5px;font-weight:800;margin:14px 0 0}+.tpl-xhs-white-editorial .xw-grad{background:linear-gradient(90deg,#7b61ff 0%,#4e8cff 25%,#17b26a 48%,#ff9d42 72%,#ff5fa2 100%);-webkit-background-clip:text;background-clip:text;color:transparent}+.tpl-xhs-white-editorial .xw-sub{font-size:24px;line-height:1.45;color:#1f2937;margin-top:22px;max-width:900px}+.tpl-xhs-white-editorial .xw-focus{display:inline-block;padding:6px 14px;border-radius:14px;background:#111318;color:#fff;font-weight:700}+.tpl-xhs-white-editorial .xw-focus-blue{display:inline-block;padding:6px 14px;border-radius:14px;background:var(--xw-soft-blue);color:#174ea6;font-weight:700}+.tpl-xhs-white-editorial .xw-focus-pink{display:inline-block;padding:6px 14px;border-radius:14px;background:var(--xw-soft-pink);color:#c11574;font-weight:700}+.tpl-xhs-white-editorial .xw-focus-orange{display:inline-block;padding:6px 14px;border-radius:14px;background:var(--xw-soft-orange);color:#b54708;font-weight:700}+.tpl-xhs-white-editorial .xw-focus-green{display:inline-block;padding:6px 14px;border-radius:14px;background:var(--xw-soft-green);color:#067647;font-weight:700}+.tpl-xhs-white-editorial .xw-hero{margin-top:28px;border:1px solid var(--xw-line);border-radius:28px;padding:30px 34px;background:linear-gradient(180deg,#fff 0%,#fcfcff 100%);box-shadow:0 18px 48px rgba(17,19,24,.08)}+.tpl-xhs-white-editorial .xw-quote{font-size:38px;line-height:1.3;font-weight:800;letter-spacing:-.5px}+.tpl-xhs-white-editorial .xw-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px}+.tpl-xhs-white-editorial .xw-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;margin-top:22px}+.tpl-xhs-white-editorial .xw-card{border:1px solid var(--xw-line);border-radius:24px;padding:24px 26px;box-shadow:0 10px 24px rgba(17,19,24,.04);background:#fff}+.tpl-xhs-white-editorial .xw-card.soft-purple{background:var(--xw-soft-purple)}+.tpl-xhs-white-editorial .xw-card.soft-pink{background:var(--xw-soft-pink)}+.tpl-xhs-white-editorial .xw-card.soft-blue{background:var(--xw-soft-blue)}+.tpl-xhs-white-editorial .xw-card.soft-green{background:var(--xw-soft-green)}+.tpl-xhs-white-editorial .xw-card.soft-orange{background:var(--xw-soft-orange)}+.tpl-xhs-white-editorial .xw-label{font-size:14px;font-weight:800;opacity:.7;margin-bottom:10px;letter-spacing:.08em;text-transform:uppercase}+.tpl-xhs-white-editorial .xw-card .main{font-size:28px;line-height:1.22;font-weight:850;letter-spacing:-.5px}+.tpl-xhs-white-editorial .xw-card .desc{font-size:16px;line-height:1.5;color:#475467;margin-top:12px}+.tpl-xhs-white-editorial .xw-steps{margin-top:18px}+.tpl-xhs-white-editorial .xw-step{display:flex;gap:18px;align-items:flex-start;margin:16px 0}+.tpl-xhs-white-editorial .xw-num{flex:0 0 48px;height:48px;border-radius:50%;background:#111318;color:#fff;display:grid;place-items:center;font-size:20px;font-weight:900}+.tpl-xhs-white-editorial .xw-txt{font-size:22px;line-height:1.45;font-weight:700}+.tpl-xhs-white-editorial .xw-codebox{background:#0f1117;color:#e4e2d8;border-radius:18px;padding:22px 26px;font-family:'JetBrains Mono',monospace;font-size:15px;line-height:1.75;margin-top:20px;border:1px solid #1f222c}+.tpl-xhs-white-editorial .xw-codebox .cm{color:#6b6a62}+.tpl-xhs-white-editorial .xw-codebox .kw{color:#c88f64}+.tpl-xhs-white-editorial .xw-codebox .st{color:#a8c292}+.tpl-xhs-white-editorial .xw-codebox .hl{color:#e9c58a;font-weight:600}+.tpl-xhs-white-editorial .xw-footer{position:absolute;left:88px;right:88px;bottom:44px;display:flex;justify-content:space-between;align-items:flex-end;font-size:13px;color:var(--xw-muted)}+.tpl-xhs-white-editorial .xw-topline{position:absolute;top:0;left:0;right:0;height:5px;background:linear-gradient(90deg,#6366f1,#8b5cf6,#a855f7,#ec4899,#f43f5e,#f97316,#eab308,#22c55e,#06b6d4,#6366f1)}+.tpl-xhs-white-editorial .xw-pill{display:inline-block;padding:8px 16px;border-radius:999px;font-size:14px;font-weight:700;margin:0 8px 8px 0;background:#fff;border:1px solid var(--xw-line);color:#394150}+.tpl-xhs-white-editorial .xw-big-stat{font-size:96px;font-weight:900;letter-spacing:-4px;line-height:1}+.tpl-xhs-white-editorial .xw-big-stat small{font-size:22px;color:var(--xw-muted);font-weight:700;letter-spacing:0;margin-left:6px}++</style>+<style>+/* Static-preview fallback (runtime.js is absent — keep every slide visible) */+.deck{height:auto;min-height:100vh;overflow:visible}+.slide{position:relative;inset:auto;opacity:1;pointer-events:auto;transform:none;height:100vh;page-break-after:always}+.deck-header,.deck-footer,.slide-number,.progress-bar,.notes-overlay,.overview{pointer-events:none}+.notes{display:none!important}+</style></head>+<body class="tpl-xhs-white-editorial">+<div class="deck">++ <!-- 1. COVER -->+ <section class="slide is-active">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>AI 时代 · 职业判断</div>+ <div class="xw-page">01 / 08</div>+ </div>+ <div class="xw-kicker">我越来越确定的一件事</div>+ <h1 class="xw-title">以后最贵的工作,<br>是 <span class="xw-grad">测试 + 安全</span></h1>+ <p class="xw-sub">AI 会越来越会做事。但谁来保证它 <span class="xw-focus">做对</span>、<span class="xw-focus">没风险</span>、<span class="xw-focus">不会出事</span>?</p>+ <div class="xw-hero">+ <div class="xw-quote">未来最值钱的,<br>不是 <span class="xw-focus-orange">生产</span>,而是 <span class="xw-focus">验收和兜底</span>。</div>+ </div>+ <div class="xw-footer"><span>白底|强重点|杂志竖排</span><span>Cover · 01</span></div>+ </section>++ <!-- 2. SECTION DIVIDER -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>Chapter · 01</div>+ <div class="xw-page">02 / 08</div>+ </div>+ <div style="margin-top:120px">+ <div class="xw-kicker" style="font-size:20px;letter-spacing:.2em;text-transform:uppercase;color:#98a2b3">第一章</div>+ <h1 class="xw-title" style="font-size:110px;margin-top:20px">先看 <span class="xw-grad">大趋势</span></h1>+ <p class="xw-sub" style="font-size:28px">当执行越来越便宜,判断就会越来越贵。</p>+ </div>+ <div class="xw-footer"><span>Section Divider</span><span>02 / 08</span></div>+ </section>++ <!-- 3. CONTENT — 4 card grid -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>越来越多的事会交给 AI</div>+ <div class="xw-page">03 / 08</div>+ </div>+ <h2 class="xw-title-md">未来 3 年,这些事都会 <span class="xw-grad">自动跑</span></h2>+ <div class="xw-grid-2">+ <div class="xw-card soft-pink"><div class="xw-label">内容</div><div class="main">写文案 · 写方案 · 写脚本</div><div class="desc">创作变成一个 prompt 的距离</div></div>+ <div class="xw-card soft-blue"><div class="xw-label">生产</div><div class="main">做图 · 搭页面 · 做表格</div><div class="desc">生产力工具集体重写一次</div></div>+ <div class="xw-card soft-green"><div class="xw-label">执行</div><div class="main">跑流程 · 写代码 · 自动操作</div><div class="desc">Agent 从 demo 走进真实工作流</div></div>+ <div class="xw-card soft-orange"><div class="xw-label">分析</div><div class="main">读数据 · 做总结 · 给建议</div><div class="desc">决策支持层彻底向下延伸</div></div>+ </div>+ <div class="xw-footer"><span>Content · Grid 2x2</span><span>03 / 08</span></div>+ </section>++ <!-- 4. STEPS -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>为什么会这样</div>+ <div class="xw-page">04 / 08</div>+ </div>+ <h2 class="xw-title-md">AI 越强,<span class="xw-grad">判断对错</span> 越值钱</h2>+ <div class="xw-steps">+ <div class="xw-step"><div class="xw-num">1</div><div class="xw-txt">生产会更便宜,边际成本接近零</div></div>+ <div class="xw-step"><div class="xw-num">2</div><div class="xw-txt">复制会更快,错误也一起被加速</div></div>+ <div class="xw-step"><div class="xw-num">3</div><div class="xw-txt">AI 一本正经地做错,人类难以察觉</div></div>+ <div class="xw-step"><div class="xw-num">4</div><div class="xw-txt">所以最贵的能力会变成 <span class="xw-focus">发现问题</span></div></div>+ </div>+ <div class="xw-hero"><div class="xw-quote" style="font-size:30px">AI 让「<span class="xw-focus-blue">做出来</span>」变便宜,<br>但让「<span class="xw-focus">做对、做稳、别出事</span>」变更贵。</div></div>+ <div class="xw-footer"><span>Content · Steps</span><span>04 / 08</span></div>+ </section>++ <!-- 5. CODE EXAMPLE -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>一段你今晚就能跑的验收 Skill</div>+ <div class="xw-page">05 / 08</div>+ </div>+ <h2 class="xw-title-md">不是写 prompt,<br>是写 <span class="xw-grad">验收清单</span></h2>+ <pre class="xw-codebox"><span class="cm"># skills/ai-acceptance/SKILL.md</span>+<span class="kw">name</span>: <span class="st">ai-acceptance</span>+<span class="kw">description</span>: <span class="st">"Runs AI output through a 4-gate review checklist."</span>++<span class="kw">gates</span>:+ - <span class="hl">functional</span>: <span class="st">"Does it actually do what the user asked?"</span>+ - <span class="hl">edge_cases</span>: <span class="st">"Empty / long / non-ASCII / concurrent?"</span>+ - <span class="hl">safety</span>: <span class="st">"PII, secrets, destructive ops — all red-flagged?"</span>+ - <span class="hl">rollback</span>: <span class="st">"If this ships and breaks, can we undo in 60s?"</span></pre>+ <div class="xw-footer"><span>Content · Code Block</span><span>05 / 08</span></div>+ </section>++ <!-- 6. CHART — SVG bar -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>岗位相对价值变化</div>+ <div class="xw-page">06 / 08</div>+ </div>+ <h2 class="xw-title-md">越来越 <span class="xw-focus-pink">便宜</span>,越来越 <span class="xw-focus-green">贵</span></h2>+ <svg viewBox="0 0 960 380" style="width:100%;max-width:1000px;margin-top:30px" xmlns="http://www.w3.org/2000/svg">+ <g font-family="Inter, sans-serif" font-size="16" fill="#475467">+ <!-- baseline -->+ <line x1="180" y1="330" x2="940" y2="330" stroke="#eaecf3" stroke-width="2"/>+ <!-- rows -->+ <g transform="translate(0,40)">+ <text x="170" y="30" text-anchor="end" font-weight="700" fill="#111">纯执行</text>+ <rect x="180" y="10" width="520" height="28" rx="14" fill="#fff0f6"/>+ <rect x="180" y="10" width="120" height="28" rx="14" fill="#ff5fa2"/>+ <text x="710" y="30" fill="#c11574" font-weight="700">-65% 价值</text>+ </g>+ <g transform="translate(0,100)">+ <text x="170" y="30" text-anchor="end" font-weight="700" fill="#111">内容生产</text>+ <rect x="180" y="10" width="520" height="28" rx="14" fill="#eef4ff"/>+ <rect x="180" y="10" width="200" height="28" rx="14" fill="#4e8cff"/>+ <text x="710" y="30" fill="#174ea6" font-weight="700">-40% 价值</text>+ </g>+ <g transform="translate(0,160)">+ <text x="170" y="30" text-anchor="end" font-weight="700" fill="#111">数据分析</text>+ <rect x="180" y="10" width="520" height="28" rx="14" fill="#fff5ea"/>+ <rect x="180" y="10" width="320" height="28" rx="14" fill="#ff9d42"/>+ <text x="710" y="30" fill="#b54708" font-weight="700">持平</text>+ </g>+ <g transform="translate(0,220)">+ <text x="170" y="30" text-anchor="end" font-weight="700" fill="#111">测试 / 验收</text>+ <rect x="180" y="10" width="520" height="28" rx="14" fill="#edfdf3"/>+ <rect x="180" y="10" width="440" height="28" rx="14" fill="#17b26a"/>+ <text x="710" y="30" fill="#067647" font-weight="700">+85% 价值</text>+ </g>+ <g transform="translate(0,280)">+ <text x="170" y="30" text-anchor="end" font-weight="700" fill="#111">安全 / 风控</text>+ <rect x="180" y="10" width="520" height="28" rx="14" fill="#f4efff"/>+ <rect x="180" y="10" width="500" height="28" rx="14" fill="#7b61ff"/>+ <text x="710" y="30" fill="#5b21b6" font-weight="700">+110% 价值</text>+ </g>+ </g>+ </svg>+ <div class="xw-footer"><span>Chart · Horizontal Bars</span><span>06 / 08</span></div>+ </section>++ <!-- 7. CTA -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>今晚就可以做的三件事</div>+ <div class="xw-page">07 / 08</div>+ </div>+ <h2 class="xw-title-md">别再追工具,<br>开始练 <span class="xw-grad">判断力</span></h2>+ <div class="xw-grid-3">+ <div class="xw-card soft-purple"><div class="xw-label">Tonight</div><div class="main">写一份<br>验收清单</div><div class="desc">哪怕只有 5 条,开始比完美更重要</div></div>+ <div class="xw-card soft-blue"><div class="xw-label">This week</div><div class="main">跑一遍<br>红队演练</div><div class="desc">对自己的 agent 说:试着让它出事</div></div>+ <div class="xw-card soft-green"><div class="xw-label">This month</div><div class="main">加一条<br>回滚流程</div><div class="desc">60 秒内能撤销,你就敢把手放开</div></div>+ </div>+ <div class="xw-hero"><div class="xw-quote" style="font-size:32px">真正的稀缺,不是「会用 AI」,<br>而是 <span class="xw-focus">「敢为 AI 的结果签字」</span>。</div></div>+ <div class="xw-footer"><span>CTA</span><span>07 / 08</span></div>+ </section>++ <!-- 8. THANKS -->+ <section class="slide">+ <div class="xw-topline"></div>+ <div class="xw-topbar">+ <div class="xw-tag"><span class="dot"></span>Thanks for reading</div>+ <div class="xw-page">08 / 08</div>+ </div>+ <div style="margin-top:100px">+ <div class="xw-big-stat xw-grad">谢谢<small> · thanks</small></div>+ <p class="xw-sub" style="font-size:28px;margin-top:36px">如果你也在想这些问题,欢迎在评论里告诉我——<br>你最想让 AI 帮你做什么?你最不放心它做什么?</p>+ <div style="margin-top:40px">+ <span class="xw-pill">@lewis</span>+ <span class="xw-pill">小红书 · 白底杂志风</span>+ <span class="xw-pill">html-ppt · full-deck</span>+ </div>+ </div>+ <div class="xw-footer"><span>End</span><span>08 / 08</span></div>+ </section>++</div>++</body>+</html>diff --git a/src/lib/templates/skills/digital-eguide/SKILL.md b/src/lib/templates/skills/digital-eguide/SKILL.mdnew file mode 100644index 00000000..40c0a748--- /dev/null+++ b/src/lib/templates/skills/digital-eguide/SKILL.md@@ -0,0 +1,21 @@+---+name: digital-eguide+zh_name: "电子指南"+en_name: "Digital E-Guide"+emoji: "📚"+description: "两页跨页电子指南, 封面 + 课程页 + pull-quote + 步骤列表"+category: article+scenario: marketing+aspect_hint: "双页预览"+featured: 6+tags: ["eguide", "lookbook", "lead magnet", "playbook"]+---++【模板: 电子指南双页预览】+【意图】creator brand 的 lead-magnet 风格, 一封面一内页跨页排列。+【布局】+- Page 1 封面: display title + 作者 + 'What's inside' 数据 + TOC teaser+- Page 2 内页: lesson body + pull-quote + step list+【设计细节】+- lifestyle / creator brand 调子, 柔和米色+- 两页 side-by-side 横向, 像翻开的书diff --git a/src/lib/templates/skills/digital-eguide/example.html b/src/lib/templates/skills/digital-eguide/example.htmlnew file mode 100644index 00000000..d0991fc2--- /dev/null+++ b/src/lib/templates/skills/digital-eguide/example.html@@ -0,0 +1,204 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>The Creator's Style & Format Guide — Auny</title>+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,700;1,500;1,700&family=DM+Serif+Text:ital@0;1&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />+ <style>+ :root {+ --backdrop: #d8c8c0;+ --paper: #faf3ea;+ --paper-2: #f4ecdf;+ --ink: #1f1c14;+ --muted: #837964;+ --rule: #d3c9b3;+ --accent: #c44a47;+ --accent-2: #e07d52;+ --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;+ --serif-body: 'DM Serif Text', Georgia, serif;+ --sans: -apple-system, system-ui, 'Inter', sans-serif;+ --mono: 'IBM Plex Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ body {+ margin: 0;+ min-height: 100vh;+ color: var(--ink);+ background:+ radial-gradient(ellipse 80% 60% at 50% 20%, #e8d4cc, transparent 70%),+ radial-gradient(ellipse 60% 60% at 80% 90%, #c79a8e, transparent 70%),+ var(--backdrop);+ font: 14px/1.55 var(--serif-body);+ padding: 60px 40px;+ display: flex; gap: 36px; justify-content: center; align-items: flex-start;+ flex-wrap: wrap;+ }++ .page {+ width: 540px; min-height: 740px;+ background: var(--paper);+ border-radius: 4px;+ padding: 44px 44px 36px;+ box-shadow: 0 30px 60px rgba(31,28,20,0.18), 0 4px 8px rgba(31,28,20,0.06);+ position: relative;+ }+ .page.left { transform: rotate(-0.6deg); }+ .page.right { transform: rotate(0.6deg); background: var(--paper-2); }++ .eyebrow {+ font: 10.5px/1 var(--mono);+ letter-spacing: 0.22em;+ color: var(--muted);+ text-transform: uppercase;+ display: flex; justify-content: space-between; align-items: center;+ padding-bottom: 22px;+ border-bottom: 1px solid var(--rule);+ }+ .eyebrow .left, .eyebrow .right { display: flex; align-items: center; gap: 10px; }+ .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }++ /* Cover */+ .cover h1.title {+ font-family: var(--serif);+ font-weight: 700;+ font-size: clamp(60px, 7.5vw, 92px);+ line-height: 0.96;+ letter-spacing: -0.01em;+ margin: 32px 0 8px;+ color: var(--ink);+ }+ .cover h1.title .creator { color: var(--accent); font-style: italic; }+ .cover h1.title .amp { color: var(--accent-2); font-style: italic; font-weight: 500; padding: 0 6px; }+ .cover h1.title .guide { font-style: italic; font-weight: 500; }+ .cover h1.title .format { font-style: italic; font-weight: 500; padding-right: 4px; }++ .cover .author { font: 12px/1 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; margin: 16px 0 18px; display: flex; align-items: center; gap: 10px; }+ .cover .author b { color: var(--ink); font-weight: 500; }++ .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 22px 0 28px; }+ .stat .num { font: 700 36px/1 var(--serif); letter-spacing: -0.005em; }+ .stat .lbl { font: 10px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 6px; max-width: 16ch; }++ .cover h2.inside { font: italic 700 36px/1 var(--serif); margin: 14px 0 14px; letter-spacing: -0.005em; }+ .cover h2.inside em { font-style: italic; color: var(--accent); }++ .toc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 36px; }+ .toc .item { display: flex; align-items: baseline; gap: 6px; font: 14.5px/1.4 var(--serif-body); }+ .toc .item .name { font-style: italic; color: var(--ink); }+ .toc .item .leader { flex: 1; border-bottom: 1px dotted var(--muted); transform: translateY(-2px); margin: 0 4px; }+ .toc .item .pn { font: 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }++ .cover-footer { position: absolute; left: 44px; right: 44px; bottom: 28px; display: flex; justify-content: space-between; align-items: center; font: 10.5px/1 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; padding-top: 14px; border-top: 1px solid var(--rule); }+ .sticker { position: absolute; top: 280px; right: 44px; width: 92px; height: 92px; border-radius: 50%; background: var(--accent-2); transform: rotate(8deg); display: grid; place-items: center; color: #fff; font: italic 700 14px/1.1 var(--serif); text-align: center; padding: 10px; }+ .sticker::after { content: ''; position: absolute; inset: 6px; border: 1px dashed rgba(255,255,255,0.5); border-radius: 50%; }++ /* Spread */+ .spread h2.head { font: italic 700 44px/1 var(--serif); letter-spacing: -0.005em; margin: 32px 0 6px; max-width: 18ch; }+ .spread h2.head .accent { color: var(--accent); }+ .spread .deck { font: italic 16px/1.5 var(--serif-body); color: var(--muted); margin: 0 0 22px; max-width: 50ch; }++ .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 14px; border-top: 1px solid var(--rule); }+ .columns p { margin: 0 0 14px; font: 14.5px/1.6 var(--serif-body); color: var(--ink); }+ .columns p:first-letter { font-family: var(--serif); font-size: 38px; line-height: 0.85; padding: 4px 6px 0 0; float: left; font-weight: 700; color: var(--accent); font-style: italic; }+ .steps { display: flex; flex-direction: column; gap: 10px; }+ .steps .row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--rule); }+ .steps .row .n { font: 700 12px/1 var(--mono); color: var(--accent); letter-spacing: 0.08em; }+ .steps .row .body { font: 14px/1.45 var(--serif-body); }+ .steps .row .body b { color: var(--ink); font-weight: 700; font-style: italic; }++ .pullquote {+ position: absolute; right: -16px; top: 280px;+ width: 250px;+ padding: 18px 22px;+ background: var(--paper);+ border: 1px solid var(--rule);+ border-radius: 4px;+ box-shadow: 0 8px 18px rgba(31,28,20,0.10);+ font: italic 700 22px/1.2 var(--serif);+ color: var(--ink);+ transform: rotate(2.4deg);+ }+ .pullquote .open { font-size: 56px; line-height: 0.4; color: var(--accent); display: block; height: 24px; }+ .pullquote .by { font: 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 400; font-style: normal; margin-top: 14px; display: block; }++ .exercise { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 4px; background: rgba(196,74,71,0.05); display: flex; gap: 14px; align-items: center; }+ .exercise .label { font: 10.5px/1 var(--mono); color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; padding: 6px 8px; border: 1px solid var(--accent); }+ .exercise .text { font: italic 14px/1.4 var(--serif-body); color: var(--ink); }++ .spread-footer { position: absolute; left: 44px; right: 44px; bottom: 28px; display: flex; justify-content: space-between; align-items: center; font: 10.5px/1 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; padding-top: 14px; border-top: 1px solid var(--rule); }++ @media (max-width: 1180px) {+ .pullquote { right: 16px; }+ .page { width: 92vw; max-width: 540px; }+ }+ </style>+</head>+<body>+ <article class="page left cover" data-od-id="cover">+ <div class="eyebrow">+ <div class="left"><span class="dot"></span>STYLE & FORMAT GUIDE FOR CREATORS</div>+ <div class="right">2026 EDITION</div>+ </div>++ <h1 class="title">The <span class="creator">Creator's</span> Style <span class="amp">&</span> <span class="format">Format</span> <span class="guide">guide</span></h1>++ <div class="author">— BY <b>AUNY</b> · CREATOR EDUCATOR · 18 / 04 / 2026</div>++ <div class="stats">+ <div class="stat"><div class="num">16</div><div class="lbl">Principles of style</div></div>+ <div class="stat"><div class="num">38</div><div class="lbl">Do's & Don'ts</div></div>+ <div class="stat"><div class="num">1</div><div class="lbl">Block, zero templates</div></div>+ </div>++ <h2 class="inside">What's <em>inside.</em></h2>++ <div class="toc" data-od-id="toc">+ <div class="item"><span class="name">Find your voice</span><span class="leader"></span><span class="pn">04</span></div>+ <div class="item"><span class="name">Pick a format</span><span class="leader"></span><span class="pn">12</span></div>+ <div class="item"><span class="name">Tone & tension</span><span class="leader"></span><span class="pn">18</span></div>+ <div class="item"><span class="name">Visual rhythm</span><span class="leader"></span><span class="pn">24</span></div>+ <div class="item"><span class="name">Headlines that hold</span><span class="leader"></span><span class="pn">32</span></div>+ <div class="item"><span class="name">Editing the cut</span><span class="leader"></span><span class="pn">40</span></div>+ </div>++ <div class="sticker">FOR THE FIRST DRAFT</div>+ <div class="cover-footer"><span>FIND YOUR VOICE</span><span>01 / 64</span></div>+ </article>++ <article class="page right spread" data-od-id="spread">+ <div class="eyebrow">+ <div class="left"><span class="dot"></span>CHAPTER 02 · TONE</div>+ <div class="right">3 — RULES, 1 — EXERCISE</div>+ </div>++ <h2 class="head">Write like you talk —<br/><span class="accent">only sharper.</span></h2>+ <p class="deck">Your voice already exists. The work is to remove the parts that aren't you, then put what's left in the order people remember. Three small rules and one Sunday-morning exercise.</p>++ <div class="columns">+ <p>Strong writing has the cadence of speech and the precision of editing. Most beginners pick one and stop. Read your draft aloud. The sentences that catch in your throat are the ones to cut.</p>+ <div class="steps">+ <div class="row"><span class="n">01</span><span class="body"><b>Pick the rule.</b> One idea per paragraph. If two appear, split the paragraph.</span></div>+ <div class="row"><span class="n">02</span><span class="body"><b>Drop the filler.</b> "I think", "kind of", "in my opinion" — they soften, then they erase.</span></div>+ <div class="row"><span class="n">03</span><span class="body"><b>End with a verb.</b> The last beat lands harder when it asks for an action, not an adjective.</span></div>+ <div class="row"><span class="n">04</span><span class="body"><b>Read aloud once.</b> Always. The microphone is the editor.</span></div>+ </div>+ </div>++ <div class="pullquote" data-od-id="pullquote">+ <span class="open">"</span>+ Specificity is the unlock — write what only you saw.+ <span class="by">— AUNY · CHAPTER 02</span>+ </div>++ <div class="exercise" data-od-id="exercise">+ <span class="label">EXERCISE</span>+ <span class="text">Rewrite your last three captions without the words <em>just</em>, <em>really</em>, or <em>very</em>. Keep what survives.</span>+ </div>++ <div class="spread-footer"><span>TONE & TENSION</span><span>18 / 64</span></div>+ </article>+</body>+</html>diff --git a/src/lib/templates/skills/doc-kami-parchment/SKILL.md b/src/lib/templates/skills/doc-kami-parchment/SKILL.mdnew file mode 100644index 00000000..dd32bf01--- /dev/null+++ b/src/lib/templates/skills/doc-kami-parchment/SKILL.md@@ -0,0 +1,52 @@+---+name: doc-kami-parchment+zh_name: "Kami 羊皮纸文档"+en_name: "Kami Parchment Document"+emoji: "📜"+description: "暖羊皮纸底 (#f5f4ed) + 墨蓝单色 accent (#1B365D) + 单一衬线字体, 编辑级排印"+category: doc+scenario: personal+aspect_hint: "A4 / Letter 长页"+featured: 48+recommended: 3+tags: ["kami", "parchment", "serif", "editorial", "report", "letter", "one-pager"]+example_id: sample-kami-parchment+example_name: "Kami 羊皮纸 · One-Pager"+example_format: markdown+example_tagline: "暖羊皮纸 + 墨蓝单色 + 单一衬线"+example_desc: "一页 Open Design Studio Issue №26 编辑级 one-pager"+example_source_url: "https://github.com/tw93/kami"+example_source_label: "tw93/kami"+---++【模板: Kami 羊皮纸文档】+【意图】严肃排版文档: one-pager / 长报告 / 信函 / 简历 / 财报 / changelog / portfolio。Inspired by tw93/kami。强调"写得像被排过版的纸", 不是 dashboard, 不是网页。++【硬性视觉签名 — 不许改】+- **画布**: 暖羊皮纸 `#f5f4ed` (永远不用纯白 `#fff`)。次级背景 `#efeee5`。+- **墨色**: 主文字 `#1f1d18` (近黑暖灰, 不用纯黑 `#000`)。次文字 `#6b665b`。+- **唯一色彩**: 墨蓝 `#1B365D` ——所有 accent (链接、tag 描边、重点数字、引用左 rule) 只能用这一个色, 严禁多色。+- **字体**: 一种语言一种衬线, 全文不混用:+ - 英文: `Charter` (fallback: `Source Serif Pro`, `Iowan Old Style`)+ - 中文: `TsangerJinKai02 W04` (fallback: `Noto Serif SC`)+ - 日文: `YuMincho` (fallback: `Noto Serif JP`)+ - Body 400, Heading 500 (不要 700/800/900)。+- **行高**: 标题 1.1–1.3, 紧凑正文 1.4–1.45, 阅读型正文 1.5–1.55。+- **绝不**: drop-shadow / blur / 圆角 ≥ 8px / 渐变 / 霓虹色 / rgba (用 solid hex)。+- **细节**: tag 用 solid hex 背景方块 (因为 WeasyPrint 不渲染 rgba 好); 单线几何 icon; 边缘 1px hairline `#d4d1c5` rule, 长度受控不到边。++【可选文档类型 — 按用户内容判断】+- **One-Pager** — 顶 logotype (Charter italic) + 标题 + lede + 3 列要点 + 底脚 metadata。+- **Long Doc** — 封面页 (大标题 + 副标 + 作者 + 日期) → 目录 (kicker + page no.) → 章节 (folio 顶角 + section rule + body) → 注释脚注 + 文末 colophon。+- **Letter** — 抬头地址 + 日期 + 收件人 + 正文 (左对齐, 段间空 1.5em) + 署名 + 签名占位线。+- **Portfolio** — 项目 hero (大标题 + sub) + 1 张全幅图 (用 CSS 块绘制占位) + 项目描述 + 角色 / 时间 / stack 元数据 row。+- **Resume** — 顶部姓名 (大字) + tagline 一行 + contact row + 主要 section: experience (公司 / 时间 / 职位 / bullets) + skills + education。+- **Slides** — 6-slide keynote, 每页满铺羊皮纸, 大标题 + lede + 角标 page no., 简洁到只有"被印出来"的感觉。+- **Equity Report** — 公司名 + ticker + Q × 年份 + key metrics row (revenue / margin / yoy) + body 分析 + 图表 (SVG 单色折线)。+- **Changelog** — 版本号 (Charter italic 大字) + 日期 + 改动列表 (Added / Changed / Fixed), 单 rule 分隔。++【设计准则】+- "Composed pages, not dashboards." 不要堆 KPI 卡, 不要堆 emoji 图标, 不要 hero gradient。+- "Ring or whisper only, no hard drop shadows." 阴影只能是 `0 0 0 1px #d4d1c5` 这种 hairline 描边。+- 文字层级靠**衬线对比 + 字号 + 留白**, 不靠颜色。+- 单文件 HTML, 用 Tailwind CDN; 全文中英混排时加盘古之白; 不要外链图片, 占位用 paper-tint 色块 + 1px ink 描边。diff --git a/src/lib/templates/skills/doc-kami-parchment/example.html b/src/lib/templates/skills/doc-kami-parchment/example.htmlnew file mode 100644index 00000000..e0843245--- /dev/null+++ b/src/lib/templates/skills/doc-kami-parchment/example.html@@ -0,0 +1,84 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<title>Kami Parchment · Open Design Studio №26</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,500;0,600;1,400&family=Noto+Serif+SC:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />+<style>+ body {+ font-family: 'Source Serif Pro', 'Noto Serif SC', Georgia, serif;+ background: #f5f4ed;+ color: #1f1d18;+ }+ .ink-blue { color: #1B365D; }+ .meta { font-family: 'IBM Plex Mono', ui-monospace, monospace; }+ .rule { border-color: #d4d1c5; }+ .display { font-family: 'Source Serif Pro', 'Noto Serif SC', Georgia, serif; }+ .h1-display { font-size: clamp(48px, 7vw, 96px); line-height: 1.05; letter-spacing: -0.01em; font-weight: 500; }+ .tag { display: inline-block; padding: 3px 10px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; background: #efeee5; color: #1B365D; }+</style>+</head>+<body class="min-h-screen">+ <div class="max-w-[920px] mx-auto px-10 py-14">++ <!-- top folio rule -->+ <header class="flex items-baseline justify-between border-b rule pb-3 text-[11px] meta uppercase tracking-[0.18em]" style="color:#6b665b">+ <span>KAMI · Open Design</span>+ <span>Vol. 01 · Issue №26 · MMXXVI</span>+ <span>Apache-2.0</span>+ </header>++ <!-- kicker -->+ <div class="mt-12 flex items-baseline gap-3">+ <span class="tag">Studio Letter</span>+ <span class="meta text-[11px] uppercase tracking-[0.18em]" style="color:#6b665b">Berlin · 52.5200° N · 13.4050° E</span>+ </div>++ <!-- hero headline -->+ <h1 class="display h1-display mt-4">+ Designing <span style="font-style:italic" class="ink-blue">intelligence</span><br/>+ on warm paper.+ </h1>++ <!-- lede -->+ <p class="mt-8 text-[20px] leading-relaxed max-w-[680px]" style="color:#3a382f">+ The open-source design studio for editorial documents and slide decks — typeset by your own coding agent. Pure white is a screen affordance, not a publishing convention. Paper has temperature, and so does type.+ </p>++ <!-- 3 columns -->+ <section class="mt-14 grid grid-cols-3 gap-10 border-t rule pt-10">+ <article>+ <div class="meta text-[10px] uppercase tracking-[0.18em] ink-blue">01 · Pillar</div>+ <h2 class="display text-[24px] font-semibold mt-2 leading-snug">Composed,<br/>not assembled.</h2>+ <p class="mt-3 text-[14.5px] leading-relaxed" style="color:#3a382f">Every page is set by hand. We don't concatenate sections — we typeset them.</p>+ </article>+ <article>+ <div class="meta text-[10px] uppercase tracking-[0.18em] ink-blue">02 · Pillar</div>+ <h2 class="display text-[24px] font-semibold mt-2 leading-snug">One typeface<br/>speaks.</h2>+ <p class="mt-3 text-[14.5px] leading-relaxed" style="color:#3a382f">Source Serif Pro carries every level of hierarchy. No display vs. body fights.</p>+ </article>+ <article>+ <div class="meta text-[10px] uppercase tracking-[0.18em] ink-blue">03 · Pillar</div>+ <h2 class="display text-[24px] font-semibold mt-2 leading-snug">Ring or whisper,<br/>never shout.</h2>+ <p class="mt-3 text-[14.5px] leading-relaxed" style="color:#3a382f">Hairline rules, single accent, no drop shadows. The page should feel printed.</p>+ </article>+ </section>++ <!-- pull quote -->+ <blockquote class="mt-14 border-l-2 pl-5 italic" style="border-color:#1B365D">+ <p class="text-[22px] leading-snug max-w-[620px]" style="color:#1f1d18">+ "We release one document per fortnight, and every one of them is something we'd actually print."+ </p>+ <footer class="mt-3 text-[12.5px] meta uppercase tracking-[0.16em]" style="color:#6b665b">— Editorial Team · Berlin, 2026</footer>+ </blockquote>++ <!-- colophon -->+ <footer class="mt-16 pt-6 border-t rule flex items-baseline justify-between text-[11px] meta uppercase tracking-[0.18em]" style="color:#6b665b">+ <span>Set in Source Serif Pro & IBM Plex Mono</span>+ <span>opendesign.studio</span>+ <span>№26 / 26</span>+ </footer>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/doc-kami-parchment/example.md b/src/lib/templates/skills/doc-kami-parchment/example.mdnew file mode 100644index 00000000..63b4017e--- /dev/null+++ b/src/lib/templates/skills/doc-kami-parchment/example.md@@ -0,0 +1,26 @@+# Open Design Studio — Issue №26++> An open-source design studio for editorial documents and slide decks — typeset by your own coding agent.++**Location**: Berlin · 52.5200° N, 13.4050° E+**Founded**: MMXXVI+**License**: Apache 2.0++## What we do++We turn anyone's notes, data, and drafts into composed pages — not dashboards — using local AI agents and a small library of editorial templates. Every document is one warm parchment canvas, one ink-blue accent, one serif voice.++## Why warm paper++Pure white is a screen affordance, not a publishing convention. Paper has temperature. Type has temperature. Our canvas is `#f5f4ed` so the eye knows it's something you might actually print.++## Pillars++1. **Composed, not assembled** — every page is set by hand, not concatenated.+2. **One typeface speaks** — serif carries hierarchy; no display fonts fighting body.+3. **Single accent** — `#1B365D` ink-blue, used sparingly.+4. **No shadows, no flash** — ring or whisper only.++## Cadence++We release one document per fortnight. Subscribe at [opendesign.studio](https://opendesign.studio).diff --git a/src/lib/templates/skills/docs-page/SKILL.md b/src/lib/templates/skills/docs-page/SKILL.mdnew file mode 100644index 00000000..86bd2bff--- /dev/null+++ b/src/lib/templates/skills/docs-page/SKILL.md@@ -0,0 +1,22 @@+---+name: docs-page+zh_name: "技术文档页"+en_name: "Docs Page"+emoji: "📘"+description: "三栏文档页: 侧导航 + 正文 + 右 TOC"+category: doc+scenario: engineering+aspect_hint: "桌面 1440"+tags: ["docs", "api", "tutorial", "guide"]+---++【模板: 技术文档页】+【意图】API / 教程文档单页, 长读体验优先。+【布局】+- Inline-start nav (sections + sticky)+- Article body (含代码块, callouts, 表格)+- Inline-end TOC (sticky, scroll-spy)+- 顶栏 search + version + 主题切换+【设计细节】+- 代码块: 圆角 + dark + 语言标签 + 复制按钮+- callout: info / warn / danger 三色diff --git a/src/lib/templates/skills/docs-page/example.html b/src/lib/templates/skills/docs-page/example.htmlnew file mode 100644index 00000000..871f6b26--- /dev/null+++ b/src/lib/templates/skills/docs-page/example.html@@ -0,0 +1,122 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Filebase docs — Quickstart</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --border: #e6e4e0;+ --accent: #c96442; --surface: #ffffff; --code-bg: #f4f4f2;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 -apple-system, system-ui, sans-serif; }+ .topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 28px; display: flex; justify-content: space-between; align-items: center; }+ .topbar .brand { font-weight: 600; }+ .topbar input { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); width: 280px; font: inherit; background: var(--bg); }+ .layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; gap: 0; min-height: calc(100vh - 50px); }+ @media (max-width: 1024px) { .layout { grid-template-columns: 220px 1fr; } .toc { display: none; } }+ @media (max-width: 720px) { .layout { grid-template-columns: 1fr; } .sidebar { display: none; } }+ .sidebar { padding: 24px 16px; border-right: 1px solid var(--border); overflow-y: auto; font-size: 14px; }+ .sidebar .group { margin-bottom: 22px; }+ .sidebar .group-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 8px 8px; }+ .sidebar a { display: block; color: var(--fg); text-decoration: none; padding: 5px 8px; border-radius: 6px; }+ .sidebar a:hover { background: var(--surface); }+ .sidebar a.active { background: var(--accent); color: white; }+ article { padding: 40px 56px 80px; max-width: 760px; }+ .crumbs { color: var(--muted); font-size: 13px; margin-bottom: 12px; }+ h1 { font-size: 36px; letter-spacing: -0.02em; margin: 0 0 12px; }+ .lede { color: var(--muted); font-size: 17px; margin: 0 0 32px; }+ h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }+ h3 { font-size: 16px; margin: 24px 0 8px; }+ p { margin: 12px 0; }+ code { font-family: ui-monospace, monospace; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }+ pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; }+ pre code { background: transparent; padding: 0; }+ .callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 14px 18px; margin: 20px 0; font-size: 14px; }+ .callout .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 4px; }+ .toc { padding: 40px 24px 24px; font-size: 13px; border-left: 1px solid var(--border); }+ .toc .toc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }+ .toc a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }+ .toc a.active { color: var(--accent); font-weight: 500; }+ .pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }+ .pager a { flex: 1; text-decoration: none; color: var(--fg); padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }+ .pager a small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }+ </style>+</head>+<body>+ <header class="topbar" data-od-id="topbar">+ <span class="brand">◰ Filebase docs</span>+ <input placeholder="Search · ⌘K" />+ </header>+ <div class="layout">+ <nav class="sidebar" data-od-id="sidebar">+ <div class="group">+ <div class="group-label">Getting started</div>+ <a href="#" class="active">Quickstart</a>+ <a href="#">Concepts</a>+ <a href="#">Authentication</a>+ </div>+ <div class="group">+ <div class="group-label">Sync engine</div>+ <a href="#">Block-level deltas</a>+ <a href="#">Conflict resolution</a>+ <a href="#">Resumable uploads</a>+ </div>+ <div class="group">+ <div class="group-label">CLI</div>+ <a href="#">Install</a>+ <a href="#">Configuration</a>+ <a href="#">Subcommands</a>+ </div>+ </nav>+ <article data-od-id="article">+ <div class="crumbs">Docs › Getting started › Quickstart</div>+ <h1>Quickstart</h1>+ <p class="lede">Sync your first folder in under five minutes. The CLI is the fastest path; the desktop app and the API client all wrap the same engine.</p>+ <h2 id="install">1. Install the CLI</h2>+ <p>The CLI is distributed as a single binary for macOS, Linux, and Windows.</p>+<pre><code># macOS · Homebrew+brew install filebase++# Linux · curl+curl -fsSL https://get.filebase.dev | sh</code></pre>+ <p>Verify the install:</p>+<pre><code>filebase --version+# filebase 0.6.4</code></pre>+ <h2 id="auth">2. Authenticate</h2>+ <p>Sign in with your Filebase account. The token is stored in <code>~/.config/filebase/credentials</code>.</p>+<pre><code>filebase auth login+# → opens your browser+# ✓ Logged in as [email protected]</code></pre>+ <div class="callout">+ <div class="label">Note</div>+ On servers without a browser, use <code>filebase auth login --device</code> for a device-code flow.+ </div>+ <h2 id="sync">3. Sync a folder</h2>+ <p>Pick a local directory and link it to a remote root. Filebase watches it for changes and pushes block-level diffs in the background.</p>+<pre><code>cd ~/projects+filebase init my-team+filebase sync</code></pre>+ <h3>Excluding files</h3>+ <p>Add a <code>.filebaseignore</code> at the root of the synced folder. Same syntax as <code>.gitignore</code>:</p>+<pre><code>node_modules/+*.log+build/</code></pre>+ <h2 id="next">4. Where to go next</h2>+ <p>Read <a href="#">Conflict resolution</a> to understand how Filebase merges concurrent edits, or skip to the <a href="#">CLI reference</a> for the full subcommand list.</p>+ <div class="pager">+ <a href="#"><small>← Previous</small>Concepts</a>+ <a href="#" style="text-align: right;"><small>Next →</small>Conflict resolution</a>+ </div>+ </article>+ <aside class="toc" data-od-id="toc">+ <div class="toc-label">On this page</div>+ <a href="#install" class="active">1. Install the CLI</a>+ <a href="#auth">2. Authenticate</a>+ <a href="#sync">3. Sync a folder</a>+ <a href="#next">4. Where to go next</a>+ </aside>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/email-marketing/SKILL.md b/src/lib/templates/skills/email-marketing/SKILL.mdnew file mode 100644index 00000000..63cf5e64--- /dev/null+++ b/src/lib/templates/skills/email-marketing/SKILL.md@@ -0,0 +1,25 @@+---+name: email-marketing+zh_name: "营销邮件"+en_name: "Marketing Email"+emoji: "📧"+description: "产品发布邮件, 含 masthead、hero、CTA、规格表, table-fallback"+category: email+scenario: marketing+aspect_hint: "600 邮件宽"+featured: 7+tags: ["email", "newsletter", "mjml"]+---++【模板: 品牌产品发布邮件】+【意图】纯 HTML 邮件, 600px 单栏, 兼容邮件客户端。+【布局】+- Masthead (wordmark 居中)+- Hero 图块 (SVG 占位)+- Headline lockup (含 skewed-italic accent)+- Body copy + primary CTA 按钮+- Specifications grid (3 列)+- Footer (社交 + 退订)+【设计细节】+- 使用 `<table role='presentation'>` 做布局兜底+- 颜色用 inline style (不要依赖 class)diff --git a/src/lib/templates/skills/email-marketing/example.html b/src/lib/templates/skills/email-marketing/example.htmlnew file mode 100644index 00000000..3ccc4a2e--- /dev/null+++ b/src/lib/templates/skills/email-marketing/example.html@@ -0,0 +1,159 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>SPORT TEST — Meet the Axis Pro</title>+ <style>+ :root {+ --page: #d9d6d0;+ --paper: #f4efe7;+ --ink: #1a1816;+ --muted: #6b6964;+ --border: #d8d3c8;+ --accent: #d8482b;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 'Inter', -apple-system, system-ui, sans-serif; }+ .frame { max-width: 680px; margin: 0 auto; background: var(--paper); padding: 0; }+ .masthead { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; border-bottom: 1px solid var(--border); }+ .wordmark { display: flex; align-items: center; gap: 10px; font-family: 'Anton', 'Bebas Neue', Impact, sans-serif; font-size: 22px; letter-spacing: 0.04em; }+ .wordmark .lockup { display: flex; align-items: center; gap: 8px; }+ .wordmark .mark { width: 22px; height: 22px; background: var(--accent); transform: skew(-12deg); display: inline-block; }+ .wordmark .est { font: 11px/1 ui-monospace, monospace; color: var(--muted); padding: 4px 6px; border: 1px solid var(--border); border-radius: 3px; letter-spacing: 0.08em; }+ .nav { display: flex; gap: 28px; font-size: 12px; letter-spacing: 0.18em; color: var(--ink); }+ .nav a { color: inherit; text-decoration: none; }++ .hero { position: relative; aspect-ratio: 4 / 3; background:+ radial-gradient(circle at 30% 20%, #ffd6b8 0%, transparent 55%),+ radial-gradient(circle at 75% 70%, #f59a6c 0%, transparent 60%),+ linear-gradient(135deg, #c9c4b8 0%, #aaa39a 100%); overflow: hidden; }+ .hero .stamp-tl { position: absolute; top: 18px; left: 22px; font: 11px/1 ui-monospace, monospace; color: rgba(26,24,22,0.78); letter-spacing: 0.18em; }+ .hero .stamp-bl { position: absolute; bottom: 18px; left: 22px; font: 11px/1 ui-monospace, monospace; color: rgba(26,24,22,0.78); letter-spacing: 0.18em; }+ .hero .stamp-br { position: absolute; bottom: 18px; right: 22px; font: 11px/1 ui-monospace, monospace; color: rgba(26,24,22,0.6); letter-spacing: 0.18em; }+ .hero svg.shoe { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 78%; height: auto; filter: drop-shadow(0 18px 26px rgba(26,24,22,0.18)); }++ .article { padding: 44px 44px 12px; }+ .eyebrow { font: 11px/1 ui-monospace, monospace; color: var(--accent); letter-spacing: 0.22em; margin-bottom: 28px; display: flex; gap: 12px; align-items: center; }+ .eyebrow span.bar { display: inline-block; width: 22px; height: 2px; background: var(--accent); }+ h1.lockup { font-family: 'Anton', 'Bebas Neue', Impact, sans-serif; font-weight: 400; font-size: clamp(56px, 9vw, 96px); line-height: 0.95; letter-spacing: -0.005em; margin: 0 0 28px; text-transform: uppercase; }+ h1.lockup .axis { color: var(--accent); display: inline-block; transform: skew(-8deg); }+ p.body { font-size: 16px; line-height: 1.55; color: var(--ink); margin: 0 0 30px; max-width: 56ch; }+ p.body em { font-style: italic; color: var(--accent); }++ .cta { display: inline-flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper); padding: 14px 22px; font: 12px/1 'Inter', sans-serif; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; }+ .cta .arrow { display: inline-block; width: 22px; height: 1px; background: var(--paper); position: relative; }+ .cta .arrow::after { content: ''; position: absolute; right: 0; top: -3px; border: 4px solid transparent; border-left-color: var(--paper); }++ .specs { padding: 56px 44px 12px; border-top: 1px solid var(--border); margin-top: 44px; }+ .specs .head { font: 11px/1 ui-monospace, monospace; color: var(--accent); letter-spacing: 0.22em; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }+ .specs .head span.bar { display: inline-block; width: 22px; height: 2px; background: var(--accent); }+ .specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }+ .spec .num { font-family: 'Anton', 'Bebas Neue', Impact, sans-serif; font-size: 56px; line-height: 0.9; letter-spacing: -0.005em; }+ .spec .num sup { font-size: 18px; vertical-align: top; margin-left: 4px; color: var(--muted); font-family: ui-monospace, monospace; letter-spacing: 0.04em; }+ .spec .label { font: 11px/1.45 ui-monospace, monospace; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 8px; max-width: 22ch; }++ .footer { padding: 56px 44px 40px; margin-top: 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }+ .footer .left { display: flex; flex-direction: column; gap: 12px; font-size: 12px; color: var(--muted); }+ .footer .marks { display: flex; align-items: center; gap: 10px; }+ .footer .right { font: 11px/1.6 ui-monospace, monospace; color: var(--muted); letter-spacing: 0.06em; text-align: right; }+ .footer a { color: var(--muted); }++ @media (max-width: 540px) {+ .article, .specs, .footer { padding-left: 24px; padding-right: 24px; }+ h1.lockup { font-size: 48px; }+ .nav { display: none; }+ .specs-grid { grid-template-columns: 1fr 1fr; gap: 24px; }+ }+ </style>+</head>+<body>+ <div class="frame" data-od-id="email">+ <header class="masthead" data-od-id="masthead">+ <div class="wordmark">+ <span class="mark"></span>+ <span class="lockup">SPORT TEST</span>+ <span class="est">EST · 2024</span>+ </div>+ <nav class="nav"><a href="#">SHOP</a><a href="#">JOURNAL</a><a href="#">MEMBERS</a></nav>+ </header>++ <div class="hero" data-od-id="hero">+ <div class="stamp-tl">— SPORT TEST</div>+ <svg class="shoe" viewBox="0 0 600 280" aria-hidden="true">+ <defs>+ <linearGradient id="upper" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#ffe0c4"/>+ <stop offset="55%" stop-color="#f78c4c"/>+ <stop offset="100%" stop-color="#c8442d"/>+ </linearGradient>+ <linearGradient id="midsole" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" stop-color="#fff8ee"/>+ <stop offset="100%" stop-color="#e7dccd"/>+ </linearGradient>+ </defs>+ <path d="M 60 180 C 80 130, 160 90, 230 92 C 290 94, 330 110, 380 115 C 430 120, 470 125, 500 145 C 530 165, 540 195, 520 210 L 100 210 C 80 210, 55 200, 60 180 Z" fill="url(#upper)" stroke="#7c2615" stroke-width="2"/>+ <path d="M 60 180 L 100 210 L 520 210 L 540 200 C 550 190, 545 175, 530 175 L 90 175 C 75 175, 60 175, 60 180 Z" fill="url(#midsole)" stroke="#7c2615" stroke-width="2"/>+ <path d="M 100 210 L 100 230 L 540 230 L 540 220" fill="none" stroke="#7c2615" stroke-width="3" stroke-linecap="round"/>+ <g stroke="#7c2615" stroke-width="2" fill="none" opacity="0.85">+ <path d="M 200 110 C 220 130, 230 145, 240 165"/>+ <path d="M 250 105 C 270 125, 280 140, 290 160"/>+ <path d="M 300 105 C 320 125, 330 140, 340 160"/>+ <path d="M 350 110 C 370 130, 380 145, 390 165"/>+ </g>+ <g fill="#7c2615">+ <circle cx="220" cy="160" r="3"/>+ <circle cx="270" cy="158" r="3"/>+ <circle cx="320" cy="158" r="3"/>+ <circle cx="370" cy="160" r="3"/>+ </g>+ <path d="M 405 145 Q 470 130, 500 150 Q 470 165, 410 162 Z" fill="#fffbf5" stroke="#7c2615" stroke-width="2"/>+ </svg>+ <div class="stamp-bl">— EMBER FLARE</div>+ <div class="stamp-br">DROP 04 · 04—2026</div>+ </div>++ <section class="article" data-od-id="article">+ <div class="eyebrow"><span class="bar"></span>NEW · MAX-CUSHION TRAINER · EMBER FLARE</div>+ <h1 class="lockup" data-od-id="headline">+ Meet the<br/>+ <span class="axis">Axis Pro.</span><br/>+ A sneaker that runs.+ </h1>+ <p class="body">A plush, gel-cushioned trainer wrapped in a painterly flame-knit upper. Built for long days on the road, café runs, and everything between — softer underfoot, louder on the outside. Limited first drop in <em>Ember Flare</em>.</p>+ <a class="cta" href="#" data-od-id="cta">Shop the Axis Pro <span class="arrow"></span></a>+ </section>++ <section class="specs" data-od-id="specs">+ <div class="head"><span class="bar"></span>SPECIFICATIONS · WOMEN'S</div>+ <div class="specs-grid">+ <div class="spec">+ <div class="num">7.4<sup>OZ</sup></div>+ <div class="label">Weight (women's US 8)</div>+ </div>+ <div class="spec">+ <div class="num">34<sup>MM</sup></div>+ <div class="label">Max-cushion stack at the heel</div>+ </div>+ <div class="spec">+ <div class="num">8<sup>MM</sup></div>+ <div class="label">Heel-to-toe drop for low-impact landing</div>+ </div>+ <div class="spec">+ <div class="num" style="font-size:42px;">Gel-02</div>+ <div class="label">Heel & forefoot gel shock pods</div>+ </div>+ </div>+ </section>++ <footer class="footer" data-od-id="footer">+ <div class="left">+ <div class="marks"><span style="display:inline-block;width:18px;height:18px;background:var(--accent);transform:skew(-12deg);"></span><span class="lockup" style="font-family:'Anton',sans-serif;font-size:18px;letter-spacing:0.04em;">SPORT TEST</span></div>+ <div>118 Stillman St · Brooklyn NY 11211</div>+ <div><a href="#">Unsubscribe</a> · <a href="#">View in browser</a></div>+ </div>+ <div class="right">© 2026 SPORT TEST<br/>ALL RIGHTS RESERVED</div>+ </footer>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/eng-runbook/SKILL.md b/src/lib/templates/skills/eng-runbook/SKILL.mdnew file mode 100644index 00000000..de640fa8--- /dev/null+++ b/src/lib/templates/skills/eng-runbook/SKILL.md@@ -0,0 +1,21 @@+---+name: eng-runbook+zh_name: "工程 Runbook"+en_name: "Engineering Runbook"+emoji: "📕"+description: "服务概述 + alerts 表 + dashboards + 操作命令 + on-call + 事故清单"+category: doc+scenario: engineering+aspect_hint: "长页面"+tags: ["runbook", "ops", "oncall", "sre"]+---++【模板: Engineering Runbook】+【意图】工程 oncall 用的可拷贝命令的 runbook 单页。+【布局】+- Service overview (拓扑 + 依赖)+- Alerts table (severity / threshold / runbook link)+- Dashboards links 卡片+- Common procedures (mono 代码块, 一键复制)+- On-call rotation (本周 + 下周)+- Incident response checklistdiff --git a/src/lib/templates/skills/eng-runbook/example.html b/src/lib/templates/skills/eng-runbook/example.htmlnew file mode 100644index 00000000..c4a3e21e--- /dev/null+++ b/src/lib/templates/skills/eng-runbook/example.html@@ -0,0 +1,250 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Auth Service · Runbook</title>+<style>+ :root {+ --bg: #0c0e14;+ --paper: #14171f;+ --paper-2: #1c2030;+ --ink: #eaecf3;+ --muted: #8b94ad;+ --line: #262b3b;+ --accent: #6ee7b7;+ --accent-soft: rgba(110,231,183,0.1);+ --warn: #fbbf24;+ --danger: #f87171;+ --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.6; }+ .page { max-width: 1100px; margin: 0 auto; padding: 32px 28px 64px; }++ /* Header */+ .head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }+ .head-left { display: flex; flex-direction: column; gap: 6px; }+ .crumb { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }+ h1 { font-family: var(--display); font-size: 36px; margin: 4px 0; font-weight: 700; letter-spacing: -0.02em; }+ .head-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }+ .head-meta span { color: var(--accent); }+ .pill {+ display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;+ font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;+ }+ .pill.tier { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(110,231,183,0.3); }+ .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }++ section { margin-top: 40px; }+ h2 { font-family: var(--display); font-size: 22px; margin: 0 0 14px; letter-spacing: -0.005em; font-weight: 700; }+ h2 .index { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 12px; vertical-align: middle; }++ /* Summary */+ .summary { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }+ .panel { padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }+ .panel p { margin: 0 0 12px; }+ .panel p:last-child { margin: 0; }+ .deps h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 500; }+ .deps ul { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12.5px; }+ .deps li { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--paper-2); border-radius: 6px; }+ .deps li .ok { color: var(--accent); }+ .deps li .warn { color: var(--warn); }++ /* Tables */+ table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }+ th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }+ th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--paper-2); }+ tr:last-child td { border-bottom: none; }+ td.code, .panel code { font-family: var(--mono); }+ .sev { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }+ .sev-1 { background: rgba(248,113,113,0.15); color: var(--danger); }+ .sev-2 { background: rgba(251,191,36,0.15); color: var(--warn); }+ .sev-3 { background: rgba(110,231,183,0.15); color: var(--accent); }++ /* Procedure cards */+ .procs { display: flex; flex-direction: column; gap: 14px; }+ .proc { padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }+ .proc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }+ .proc-head h3 { margin: 0; font-family: var(--display); font-size: 17px; }+ .proc-head .when { font-family: var(--mono); font-size: 11px; color: var(--muted); }+ pre { background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #cdd6f4; margin: 8px 0 0; }+ pre .cmt { color: var(--muted); }+ pre .var { color: var(--warn); }+ pre .ok { color: var(--accent); }++ /* On-call */+ .rota { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }++ /* Checklist */+ .checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }+ .step { padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; display: flex; gap: 16px; align-items: flex-start; }+ .step-num { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--display); font-size: 16px; }+ .step h4 { margin: 0 0 6px; font-family: var(--display); font-size: 15px; }+ .step p { margin: 0; color: var(--muted); font-size: 13px; }+ .step code { font-family: var(--mono); background: var(--paper-2); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent); }++ footer { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }++ @media (max-width: 880px) {+ .summary, .checklist { grid-template-columns: 1fr; }+ h1 { font-size: 26px; }+ }+</style>+</head>+<body>+<div class="page">+ <header class="head">+ <div class="head-left">+ <div class="crumb">Northwind / Identity / Auth</div>+ <h1>auth-service</h1>+ <div class="head-meta">Owned by <span>@identity-platform</span> · v4.7.2 · Last reviewed 14 Oct 2025</div>+ </div>+ <span class="pill tier"><span class="dot"></span>Tier 0 · production-critical</span>+ </header>++ <section>+ <h2><span class="index">01</span>Service summary</h2>+ <div class="summary">+ <div class="panel">+ <p><strong>auth-service</strong> issues, validates, and revokes session tokens for every Northwind product surface — web, mobile, and the public API. It owns the password store, the TOTP/WebAuthn enrollments, and the audit-log writer for all auth events.</p>+ <p>If <code>auth-service</code> is down, customers cannot log in or refresh sessions. Existing valid sessions continue to work for their TTL (15 minutes) but no new auth happens.</p>+ </div>+ <div class="panel deps">+ <h3>Dependencies</h3>+ <ul>+ <li><span>Postgres · auth-db</span><span class="ok">healthy</span></li>+ <li><span>Redis · session-cache</span><span class="ok">healthy</span></li>+ <li><span>KMS · auth-keyring</span><span class="ok">healthy</span></li>+ <li><span>SES · transactional</span><span class="warn">degraded</span></li>+ <li><span>Pager · oncall.northwind</span><span class="ok">healthy</span></li>+ </ul>+ </div>+ </div>+ </section>++ <section>+ <h2><span class="index">02</span>Alerts you might wake up to</h2>+ <table>+ <thead><tr><th>Alert</th><th>Severity</th><th>What it means</th><th>First response</th></tr></thead>+ <tbody>+ <tr>+ <td class="code">auth.login_5xx_rate > 1%</td>+ <td><span class="sev sev-1">SEV-1</span></td>+ <td>Login endpoint returning errors. Customers are locked out.</td>+ <td>Check Postgres + Redis dashboards. Roll back last deploy if < 30 min old.</td>+ </tr>+ <tr>+ <td class="code">auth.token_refresh_lag_p95 > 800ms</td>+ <td><span class="sev sev-2">SEV-2</span></td>+ <td>Refresh path is slow. Web app starts to feel sluggish.</td>+ <td>Inspect Redis CPU + connection count. Scale read replicas if needed.</td>+ </tr>+ <tr>+ <td class="code">auth.signup_failure > 10/min</td>+ <td><span class="sev sev-2">SEV-2</span></td>+ <td>New signups are failing. Often SES bounces or SMTP auth.</td>+ <td>Check SES bounce rate. Failover transactional queue to backup region.</td>+ </tr>+ <tr>+ <td class="code">auth.kms_signing_errors > 0</td>+ <td><span class="sev sev-1">SEV-1</span></td>+ <td>KMS can't sign session tokens. New logins fail; existing sessions OK.</td>+ <td>Page the security team. Do not roll keys without a security engineer.</td>+ </tr>+ <tr>+ <td class="code">auth.audit_writer_backlog > 5k</td>+ <td><span class="sev sev-3">SEV-3</span></td>+ <td>Audit log writer is falling behind. Compliance impact.</td>+ <td>Drain manually. Open a ticket; not a wake-up.</td>+ </tr>+ </tbody>+ </table>+ </section>++ <section>+ <h2><span class="index">03</span>Common procedures</h2>+ <div class="procs">+ <div class="proc">+ <div class="proc-head"><h3>Deploy a new version</h3><span class="when">Use during business hours</span></div>+ <p>Deploys are blue/green. The script waits for two consecutive healthchecks before promoting traffic.</p>+<pre><span class="cmt"># Deploy auth-service v4.7.3 to production</span>+$ nw deploy auth-service --tag <span class="var">v4.7.3</span> --env production++<span class="cmt"># Wait for two consecutive healthchecks (~90 s), then promote.</span>+$ nw deploy promote auth-service --env production+<span class="ok">→ traffic shifted: 10% / 50% / 100%</span></pre>+ </div>+ <div class="proc">+ <div class="proc-head"><h3>Roll back to last known good</h3><span class="when">Use when error rate > 1% post-deploy</span></div>+<pre><span class="cmt"># Rolls back to the previously promoted version, no rebuild.</span>+$ nw deploy rollback auth-service --env production+<span class="ok">→ rolled back to v4.7.2 in 38 s</span></pre>+ </div>+ <div class="proc">+ <div class="proc-head"><h3>Rotate signing keys</h3><span class="when">Schedule with security; never solo</span></div>+<pre><span class="cmt"># 1. Generate the new signing key in KMS</span>+$ nw kms create-key --alias auth-signing-<span class="var">$(date +%Y%m%d)</span>++<span class="cmt"># 2. Mark the new key as the primary; old key remains valid for 24h</span>+$ nw kms set-primary auth-signing --key <span class="var"><arn></span>++<span class="cmt"># 3. After 24h, schedule deletion of the previous key</span>+$ nw kms schedule-deletion auth-signing --key <span class="var"><old-arn></span> --days 30</pre>+ </div>+ <div class="proc">+ <div class="proc-head"><h3>Drain audit-log backlog</h3><span class="when">Use when audit_writer_backlog alert fires</span></div>+<pre>$ nw exec auth-service -- bin/audit-drain --batch <span class="var">5000</span>+<span class="ok">→ drained 4,812 entries in 12 s; backlog now 0</span></pre>+ </div>+ </div>+ </section>++ <section>+ <h2><span class="index">04</span>On-call rotation · this month</h2>+ <table class="rota">+ <thead><tr><th>Week</th><th>Primary</th><th>Secondary</th><th>Backup (escalation)</th></tr></thead>+ <tbody>+ <tr><td>Oct 27 – Nov 02</td><td>Devon Park</td><td>Priya Banerjee</td><td>Sasha Lin</td></tr>+ <tr><td>Nov 03 – Nov 09</td><td>Caleb Renner</td><td>Devon Park</td><td>Sasha Lin</td></tr>+ <tr><td>Nov 10 – Nov 16</td><td>Priya Banerjee</td><td>Caleb Renner</td><td>Mira Reddy</td></tr>+ <tr><td>Nov 17 – Nov 23</td><td>Sasha Lin</td><td>Priya Banerjee</td><td>Mira Reddy</td></tr>+ </tbody>+ </table>+ </section>++ <section>+ <h2><span class="index">05</span>Incident response — first 30 minutes</h2>+ <div class="checklist">+ <div class="step">+ <div class="step-num">1</div>+ <div><h4>Acknowledge the page within 5 min.</h4><p>Type <code>/ack</code> in <code>#incidents-auth</code>. The bot stops re-paging and tags the on-call.</p></div>+ </div>+ <div class="step">+ <div class="step-num">2</div>+ <div><h4>Open the incident channel.</h4><p>Run <code>/incident open auth-service "<short title>"</code>. Slack bot creates a dedicated channel and pages the secondary.</p></div>+ </div>+ <div class="step">+ <div class="step-num">3</div>+ <div><h4>Post a status snapshot.</h4><p>Customer-impact in one line, what you know, what you're checking next. Re-post every 10 minutes.</p></div>+ </div>+ <div class="step">+ <div class="step-num">4</div>+ <div><h4>Mitigate before you diagnose.</h4><p>If a recent deploy is suspect, roll back. If KMS is degraded, fail open is <em>never</em> the answer for auth — escalate to security.</p></div>+ </div>+ <div class="step">+ <div class="step-num">5</div>+ <div><h4>Hand off or stand down.</h4><p>If you can't resolve in 30 min, hand to the secondary. When healthy, close with <code>/incident close</code>; postmortem is owed within 5 business days.</p></div>+ </div>+ </div>+ </section>++ <footer>+ <span>Northwind Identity Platform · runbook v3.2</span>+ <span>Source: ops-docs/auth-service.md</span>+ </footer>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/finance-report/SKILL.md b/src/lib/templates/skills/finance-report/SKILL.mdnew file mode 100644index 00000000..255b5963--- /dev/null+++ b/src/lib/templates/skills/finance-report/SKILL.md@@ -0,0 +1,22 @@+---+name: finance-report+zh_name: "季度财报"+en_name: "Finance Report"+emoji: "💼"+description: "Masthead + KPI + 收入/烧钱图 + P&L 表 + 重点 + 展望"+category: finance+scenario: finance+aspect_hint: "长页面"+featured: 10+tags: ["financial", "p&l", "mrr", "财报"]+---++【模板: 季度财报 / Finance Report】+【意图】财务向单页报告, 数字 + 图表 + 文字洞察。+【布局】+- Masthead (公司 + Q + 报告标题) + 4 个 hero KPI+- Revenue chart + Burn chart (Chart.js / ECharts)+- P&L 概要表 (zebra + sticky header)+- Top-line highlights (5 条 bullet)+- Outlook 段落+- Methodology 折叠区diff --git a/src/lib/templates/skills/finance-report/example.html b/src/lib/templates/skills/finance-report/example.htmlnew file mode 100644index 00000000..f5f06bcb--- /dev/null+++ b/src/lib/templates/skills/finance-report/example.html@@ -0,0 +1,242 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Northwind — Q3 Financial Report</title>+<style>+ :root {+ --bg: #f7f6f2;+ --paper: #ffffff;+ --ink: #11141a;+ --muted: #5f6573;+ --line: #e6e3dd;+ --line-strong: #c8c2b6;+ --accent: #1f6e8c;+ --accent-soft: #e7f0f4;+ --positive: #1f8c5c;+ --negative: #b13b3b;+ --display: 'Iowan Old Style', 'Charter', 'Iowan', Georgia, serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body {+ margin: 0;+ background: var(--bg);+ color: var(--ink);+ font-family: var(--body);+ font-size: 14px;+ line-height: 1.55;+ }+ .page {+ max-width: 980px;+ margin: 32px auto;+ padding: 56px 64px;+ background: var(--paper);+ border: 1px solid var(--line);+ border-radius: 12px;+ box-shadow: 0 24px 60px rgba(28,27,26,0.06);+ }+ header.masthead { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 28px; }+ .mast-left { display: flex; flex-direction: column; gap: 6px; }+ .mast-co { font-family: var(--display); font-size: 32px; letter-spacing: -0.01em; font-weight: 700; }+ .mast-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }+ .mast-badge {+ font-family: var(--mono); font-size: 11px; padding: 5px 10px; border-radius: 4px;+ border: 1px solid var(--ink); color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em;+ }++ h2 { font-family: var(--display); font-size: 19px; margin: 36px 0 14px; letter-spacing: -0.005em; font-weight: 700; }+ h2 .accent { color: var(--accent); }+ .lede { color: var(--muted); max-width: 64ch; }++ /* KPI strip */+ .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 28px; }+ .kpi { padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }+ .kpi .label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }+ .kpi .value { font-family: var(--display); font-size: 28px; font-weight: 700; margin-top: 6px; line-height: 1; letter-spacing: -0.01em; }+ .kpi .delta { font-family: var(--mono); font-size: 11.5px; margin-top: 6px; }+ .delta.up { color: var(--positive); }+ .delta.down { color: var(--negative); }+ .delta.flat { color: var(--muted); }++ /* Charts */+ .chart-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }+ .card { padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }+ .card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }+ .card .sub { font-size: 12px; color: var(--muted); }+ .chart svg { width: 100%; height: 200px; display: block; margin-top: 8px; }+ .legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }+ .legend .swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }+ .legend .a { background: var(--accent); }+ .legend .b { background: var(--ink); opacity: 0.6; }++ /* Bars */+ .bars { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }+ .bar-row { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; font-size: 12.5px; }+ .bar-row .label { color: var(--muted); }+ .bar-track { background: var(--accent-soft); border-radius: 4px; height: 10px; position: relative; overflow: hidden; }+ .bar-fill { background: var(--accent); height: 100%; border-radius: 4px; }+ .bar-value { font-family: var(--mono); font-size: 11.5px; text-align: right; color: var(--ink); }++ /* Tables */+ table { width: 100%; border-collapse: collapse; margin-top: 6px; }+ th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }+ th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--line-strong); }+ td.num, th.num { text-align: right; font-family: var(--mono); }+ tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: none; padding-top: 14px; }+ .badge { display: inline-block; padding: 2px 8px; font-size: 11px; border-radius: 999px; font-weight: 500; }+ .badge.green { background: #e7f4ee; color: var(--positive); }+ .badge.amber { background: #fbf0d6; color: #8a6912; }+ .badge.red { background: #f7e1e1; color: var(--negative); }+ .logo { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), #2c98c5); margin-right: 10px; vertical-align: middle; }++ /* Outlook */+ .outlook { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }+ .outlook .quote { padding: 18px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; font-family: var(--display); font-size: 16px; line-height: 1.5; }+ .outlook .signoff { font-size: 13px; color: var(--muted); }+ .outlook .signoff strong { color: var(--ink); display: block; font-family: var(--display); font-size: 16px; margin-bottom: 2px; }+ footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }++ @media (max-width: 760px) {+ .page { padding: 32px 24px; margin: 0; border-radius: 0; }+ .kpis { grid-template-columns: 1fr 1fr; }+ .chart-row { grid-template-columns: 1fr; }+ .outlook { grid-template-columns: 1fr; }+ }+</style>+</head>+<body>+<div class="page">+ <header class="masthead">+ <div class="mast-left">+ <div class="mast-meta">Northwind Trading · Q3 FY25</div>+ <div class="mast-co">Quarterly Financial Report</div>+ <div class="mast-meta">Prepared by Finance · Issued 14 October 2025</div>+ </div>+ <div class="mast-badge">Confidential</div>+ </header>++ <p class="lede">Q3 closed ahead of plan on revenue and gross margin, with cash runway extending to 27 months on the back of a leaner cost base. Mid-market and enterprise both expanded; SMB churn remains the watch item heading into Q4.</p>++ <h2>Headline KPIs</h2>+ <div class="kpis">+ <div class="kpi">+ <div class="label">Revenue</div>+ <div class="value">$8.42M</div>+ <div class="delta up">▲ 14.6% QoQ</div>+ </div>+ <div class="kpi">+ <div class="label">Net new MRR</div>+ <div class="value">$184k</div>+ <div class="delta up">▲ 22.0% QoQ</div>+ </div>+ <div class="kpi">+ <div class="label">Gross margin</div>+ <div class="value">82%</div>+ <div class="delta up">▲ 3 pp YoY</div>+ </div>+ <div class="kpi">+ <div class="label">Cash runway</div>+ <div class="value">27 mo</div>+ <div class="delta up">▲ 4 mo QoQ</div>+ </div>+ </div>++ <h2>Revenue & costs</h2>+ <div class="chart-row">+ <div class="card">+ <h3>Revenue · trailing 12 months</h3>+ <div class="sub">USD millions, monthly</div>+ <div class="chart">+ <svg viewBox="0 0 720 200" preserveAspectRatio="none">+ <defs>+ <linearGradient id="lg" x1="0" x2="0" y1="0" y2="1">+ <stop offset="0%" stop-color="var(--accent)" stop-opacity="0.32"/>+ <stop offset="100%" stop-color="var(--accent)" stop-opacity="0"/>+ </linearGradient>+ </defs>+ <polygon fill="url(#lg)" points="20,180 20,150 80,140 140,128 200,118 260,110 320,98 380,92 440,80 500,72 560,60 620,52 680,40 700,40 700,180" />+ <polyline fill="none" stroke="var(--accent)" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"+ points="20,150 80,140 140,128 200,118 260,110 320,98 380,92 440,80 500,72 560,60 620,52 680,40" />+ <polyline fill="none" stroke="#11141a" stroke-opacity="0.45" stroke-width="1.5" stroke-dasharray="3 3"+ points="20,165 80,158 140,150 200,142 260,134 320,128 380,122 440,116 500,108 560,102 620,96 680,90" />+ <circle cx="680" cy="40" r="3.5" fill="var(--accent)"/>+ </svg>+ <div class="legend">+ <span><span class="swatch a"></span>Revenue</span>+ <span><span class="swatch b"></span>Plan</span>+ </div>+ </div>+ </div>+ <div class="card">+ <h3>Operating costs</h3>+ <div class="sub">USD thousands, Q3</div>+ <div class="bars">+ <div class="bar-row"><span class="label">R&D</span><div class="bar-track"><div class="bar-fill" style="width: 78%"></div></div><span class="bar-value">$1.42M</span></div>+ <div class="bar-row"><span class="label">Sales & GTM</span><div class="bar-track"><div class="bar-fill" style="width: 60%"></div></div><span class="bar-value">$1.10M</span></div>+ <div class="bar-row"><span class="label">G&A</span><div class="bar-track"><div class="bar-fill" style="width: 36%"></div></div><span class="bar-value">$660k</span></div>+ <div class="bar-row"><span class="label">Marketing</span><div class="bar-track"><div class="bar-fill" style="width: 28%"></div></div><span class="bar-value">$510k</span></div>+ <div class="bar-row"><span class="label">Infrastructure</span><div class="bar-track"><div class="bar-fill" style="width: 18%"></div></div><span class="bar-value">$330k</span></div>+ </div>+ </div>+ </div>++ <h2>P&L summary</h2>+ <table>+ <thead>+ <tr>+ <th>Line item</th>+ <th class="num">Q3 FY25</th>+ <th class="num">Q2 FY25</th>+ <th class="num">Δ QoQ</th>+ <th class="num">Q3 FY24</th>+ <th class="num">Δ YoY</th>+ </tr>+ </thead>+ <tbody>+ <tr><td>Revenue</td><td class="num">$8.42M</td><td class="num">$7.34M</td><td class="num" style="color: var(--positive);">+14.6%</td><td class="num">$5.92M</td><td class="num" style="color: var(--positive);">+42.2%</td></tr>+ <tr><td>Cost of revenue</td><td class="num">($1.51M)</td><td class="num">($1.46M)</td><td class="num" style="color: var(--negative);">+3.4%</td><td class="num">($1.18M)</td><td class="num" style="color: var(--negative);">+28.0%</td></tr>+ <tr><td>Gross profit</td><td class="num">$6.91M</td><td class="num">$5.88M</td><td class="num" style="color: var(--positive);">+17.5%</td><td class="num">$4.74M</td><td class="num" style="color: var(--positive);">+45.8%</td></tr>+ <tr><td>Operating expenses</td><td class="num">($4.02M)</td><td class="num">($4.18M)</td><td class="num" style="color: var(--positive);">−3.8%</td><td class="num">($3.66M)</td><td class="num" style="color: var(--negative);">+9.8%</td></tr>+ <tr class="total"><td>Operating income</td><td class="num">$2.89M</td><td class="num">$1.70M</td><td class="num" style="color: var(--positive);">+70.0%</td><td class="num">$1.08M</td><td class="num" style="color: var(--positive);">+167.5%</td></tr>+ </tbody>+ </table>++ <h2>Top accounts</h2>+ <table>+ <thead>+ <tr>+ <th>Customer</th>+ <th>Plan</th>+ <th>Region</th>+ <th class="num">ARR</th>+ <th>Status</th>+ </tr>+ </thead>+ <tbody>+ <tr><td><span class="logo"></span>Pioneer Robotics</td><td>Enterprise</td><td>EMEA</td><td class="num">$612k</td><td><span class="badge green">Renewed</span></td></tr>+ <tr><td><span class="logo"></span>Atlas Cooperative</td><td>Enterprise</td><td>APAC</td><td class="num">$486k</td><td><span class="badge green">Expanded</span></td></tr>+ <tr><td><span class="logo"></span>Foundry Group</td><td>Team Plus</td><td>NA</td><td class="num">$320k</td><td><span class="badge amber">In renewal</span></td></tr>+ <tr><td><span class="logo"></span>Voltage Co.</td><td>Enterprise</td><td>NA</td><td class="num">$298k</td><td><span class="badge green">Renewed</span></td></tr>+ <tr><td><span class="logo"></span>Lattice Health</td><td>Team Plus</td><td>EMEA</td><td class="num">$214k</td><td><span class="badge red">At risk</span></td></tr>+ </tbody>+ </table>++ <h2>Outlook · Q4</h2>+ <div class="outlook">+ <div class="quote">"We're entering Q4 with the strongest pipeline coverage of the year — 3.4× plan — and the operating leverage to convert it without expanding the cost base."</div>+ <div class="signoff">+ <strong>Mira Okafor, CFO</strong>+ We expect revenue of $9.1–9.4M, net new MRR of $200–220k, and gross margin holding above 80%. The two open items are SMB churn (we'll publish a recovery plan with the November update) and the EMEA infra migration, which moves to GA in mid-November.+ </div>+ </div>++ <footer>+ <span>Northwind Trading · Q3 FY25 · Internal use only</span>+ <span>Page 1 of 1</span>+ </footer>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/flowai-team-dashboard/SKILL.md b/src/lib/templates/skills/flowai-team-dashboard/SKILL.mdnew file mode 100644index 00000000..7e718a86--- /dev/null+++ b/src/lib/templates/skills/flowai-team-dashboard/SKILL.md@@ -0,0 +1,24 @@+---+name: flowai-team-dashboard+zh_name: "FlowAI 团队管理"+en_name: "FlowAI Team Dashboard"+emoji: "🌊"+description: "三个 tab 的团队管理后台: 成员、详情、活动日志, 含图表 + CSV 导出"+category: dashboard+scenario: operations+aspect_hint: "桌面 1440"+tags: ["flowai", "team", "members"]+---++【模板: FlowAI 团队管理 Dashboard】+【意图】FlowAI 美学的团队管理 admin 单页。+【布局】+- Tabs: Team Members / Team Details / Activity Log+- KPI stat row+- Member table (avatar + 角色 + 状态)+- Role distribution bar chart+- Online presence + activity sparklines+- Top contributors panel+【设计细节】+- light/dark 切换, hover tooltip, click-to-zoom panels+- CSV export 按钮 (前端实现)diff --git a/src/lib/templates/skills/flowai-team-dashboard/example.html b/src/lib/templates/skills/flowai-team-dashboard/example.htmlnew file mode 100644index 00000000..af16c1e2--- /dev/null+++ b/src/lib/templates/skills/flowai-team-dashboard/example.html@@ -0,0 +1,13 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>FlowAI Team Dashboard Example</title>+ <style>html,body{margin:0;height:100%}iframe{width:100%;height:100%;border:0}</style>+</head>+<body>+ <!-- default showcase sample for template submission -->+ <iframe src="./assets/template.html" title="FlowAI Team Dashboard Example"></iframe>+</body>+</html>diff --git a/src/lib/templates/skills/frame-data-chart-nyt/SKILL.md b/src/lib/templates/skills/frame-data-chart-nyt/SKILL.mdnew file mode 100644index 00000000..6996cd39--- /dev/null+++ b/src/lib/templates/skills/frame-data-chart-nyt/SKILL.md@@ -0,0 +1,43 @@+---+name: frame-data-chart-nyt+zh_name: "NYT 风数据图表帧"+en_name: "NYT-Style Data Chart Frame"+emoji: "📈"+description: "NYT-newsroom 排版 + 错峰揭示动画 + 编辑级图表 (折线/柱/范围带)"+category: video+scenario: video+aspect_hint: "1920×1080 (16:9)"+featured: 46+tags: ["data", "chart", "nyt", "editorial", "frame"]+example_id: sample-frame-data-chart-nyt+example_name: "NYT 风折线图 · 全球用户量"+example_format: markdown+example_tagline: "编辑级图表 + 错峰揭示"+example_desc: "8 年周活跃用户折线 + NYT red accent + 注释 mono"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · data-chart"+---++【模板: NYT 风数据图表帧】+【意图】把一段数据 (CSV / JSON / 一句结论) 做成《纽约时报》专栏感的单帧/动画图表, 适合视频片段或推特卡。Inspired by hyperframes data-chart。++【画布】1920×1080, 暖白底 `#f7f5ee` 或墨黑底 `#0e0e0e` 二选一; 文字色和背景相反。++【布局】+- **顶部 kicker** (11px uppercase letterspace 0.14em, 颜色 = accent 红 `#a91d1d` 或 mint `#5fb38a`): 数据来源 + 类目, 如 "GLOBAL · WEEKLY ACTIVE USERS · 2018–2026"。+- **大字标题** (Cheltenham / Playfair / Source Serif Pro, 5.6vw, italic 副标可选): 一句结论。**结论必须从用户数据中提炼**, 不是描述图。+- **图表区** (占画布 55-65%):+ - 折线: 1-2 条线, 主线 ink 实心 2.5px, 次线 dashed 1.5px; 数据点用 6px 实心圆; 关键点旁标注 `2024 · 412M` 黑色 mono 小字。+ - 柱状: 全部 ink 单色或加 1 道 accent 高亮柱; 柱顶大数字; 柱底类目斜体 (Cheltenham italic)。+ - 范围带 (range band): 浅灰填充 `#e6e2d2` 包络 + 中线 ink。+- **底部 source + footnote** (10px mono, opacity 0.6): "Source: 用户数据 · Chart by html-anything"。+- **错峰揭示动画**: 标题 fade-in (0s), kicker (200ms), 折线 stroke-dashoffset 1.2s ease-out (400ms), 数据标签依次 100ms 间隔。可被 `prefers-reduced-motion` 关闭。++【设计细节】+- **绝不**: 使用 chart.js / d3 库 (除非 jsdelivr CDN 引入); 推荐手写 SVG, 不超过 80 行 inline。+- 字体: 标题 `Source Serif Pro` 或 `Cheltenham` (无则用 `Playfair Display`); body `IBM Plex Sans` 或 `Inter`; 数据标签 `IBM Plex Mono`。+- 1 个主色 (ink) + 1 个 accent (NYT red `#a91d1d` / 编辑 mint `#5fb38a` / 暖橙 `#d97757` 三选一)。+- Y 轴刻度仅 hairline + 3-4 个 tick, 标签在轴外侧 mono 字。+- 严禁 grid 全屏铺线、阴影、3D 立体柱; 严禁 emoji。+- 必须用用户提供的数据。如果输入是文本结论, 自动估算合理坐标 (但要标注 "schematic"); 如果是 CSV/JSON, 直接绘制。+- 单文件 HTML; 数据点旁注释格式: `<text class="annot">2024 · 412M</text>`。diff --git a/src/lib/templates/skills/frame-data-chart-nyt/example.html b/src/lib/templates/skills/frame-data-chart-nyt/example.htmlnew file mode 100644index 00000000..012a526d--- /dev/null+++ b/src/lib/templates/skills/frame-data-chart-nyt/example.html@@ -0,0 +1,101 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>NYT Chart · AI Agent MAU 2018–2026</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;1,400&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600&display=swap" rel="stylesheet" />+<style>+ body { font-family:'IBM Plex Sans','Noto Sans SC',system-ui,sans-serif; background:#f7f5ee; color:#1a1a1a; margin:0; }+ .serif { font-family:'Source Serif Pro',Georgia,serif; }+ .mono { font-family:'IBM Plex Mono',ui-monospace,monospace; }+ .nyt-red { color:#a91d1d; }+ .nyt-red-fill { fill:#a91d1d; }+ .kicker { font-size:11px; letter-spacing:0.14em; text-transform:uppercase; }+ @keyframes draw { from { stroke-dashoffset: 1000 } to { stroke-dashoffset: 0 } }+ .line { stroke-dasharray:1000; animation: draw 1.4s ease-out forwards; animation-delay: .4s; opacity:0; animation-fill-mode: forwards; }+ .line { animation: draw 1.4s ease-out .4s forwards, fadeIn .1s linear .4s forwards; }+ @keyframes fadeIn { to { opacity:1 } }+</style>+</head>+<body class="min-h-screen flex items-center justify-center p-12">+ <article class="w-[1280px] max-w-full">+ <header class="flex items-baseline justify-between">+ <div class="kicker nyt-red font-semibold">GLOBAL · MONTHLY ACTIVE USERS · 2018–2026</div>+ <div class="kicker opacity-60 mono">FRAME 04 · CHART</div>+ </header>++ <h1 class="serif mt-3 leading-[1.05] font-medium" style="font-size:clamp(36px,4.4vw,68px)">+ AI agent 月活在 <span class="nyt-red italic">2024 之后</span> 进入两段抛物线 ——<br/>+ 第一段由云端 Claude / GPT 推动, 第二段由本地 CLI agent 普及。+ </h1>++ <!-- chart -->+ <svg viewBox="0 0 1100 460" class="mt-8 w-full">+ <!-- y axis hairlines -->+ <g stroke="#1a1a1a" stroke-width="0.5" opacity="0.25">+ <line x1="60" y1="60" x2="1040" y2="60"/>+ <line x1="60" y1="180" x2="1040" y2="180"/>+ <line x1="60" y1="300" x2="1040" y2="300"/>+ <line x1="60" y1="420" x2="1040" y2="420"/>+ </g>+ <!-- y labels -->+ <g class="mono" font-size="11" fill="#1a1a1a" opacity="0.6">+ <text x="20" y="64">640M</text>+ <text x="20" y="184">420M</text>+ <text x="20" y="304">210M</text>+ <text x="20" y="424">0</text>+ </g>+ <!-- area band -->+ <path d="M 60 410 L 180 405 L 300 395 L 420 380 L 540 355 L 660 320 L 780 270 L 900 195 L 1020 90 L 1020 420 L 60 420 Z" fill="#a91d1d" opacity="0.06"/>+ <!-- main line -->+ <polyline class="line" fill="none" stroke="#1a1a1a" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"+ points="60,410 180,405 300,395 420,380 540,355 660,320 780,270 900,195 1020,90" />+ <!-- accent inflection -->+ <polyline fill="none" stroke="#a91d1d" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="6 5"+ points="780,270 900,195 1020,90" />+ <!-- data points -->+ <g>+ <circle cx="60" cy="410" r="4" fill="#1a1a1a"/>+ <circle cx="180" cy="405" r="4" fill="#1a1a1a"/>+ <circle cx="300" cy="395" r="4" fill="#1a1a1a"/>+ <circle cx="420" cy="380" r="4" fill="#1a1a1a"/>+ <circle cx="540" cy="355" r="4" fill="#1a1a1a"/>+ <circle cx="660" cy="320" r="4" fill="#1a1a1a"/>+ <circle cx="780" cy="270" r="6" class="nyt-red-fill"/>+ <circle cx="900" cy="195" r="6" class="nyt-red-fill"/>+ <circle cx="1020" cy="90" r="6" class="nyt-red-fill"/>+ </g>+ <!-- annotations -->+ <g class="mono" font-size="11" fill="#1a1a1a">+ <text x="784" y="250">2024 · 310M</text>+ <text x="894" y="175" class="nyt-red-fill">2025 · 468M</text>+ <text x="1010" y="70" class="nyt-red-fill" text-anchor="end">2026 · 640M</text>+ </g>+ <!-- inflection callout -->+ <g class="serif" font-style="italic" fill="#a91d1d">+ <text x="800" y="380" font-size="14">⤴ Inflection point</text>+ <text x="800" y="398" font-size="14">local CLI agents普及</text>+ </g>+ <!-- x labels -->+ <g class="mono" font-size="11" fill="#1a1a1a" opacity="0.6">+ <text x="60" y="445" text-anchor="middle">'18</text>+ <text x="180" y="445" text-anchor="middle">'19</text>+ <text x="300" y="445" text-anchor="middle">'20</text>+ <text x="420" y="445" text-anchor="middle">'21</text>+ <text x="540" y="445" text-anchor="middle">'22</text>+ <text x="660" y="445" text-anchor="middle">'23</text>+ <text x="780" y="445" text-anchor="middle">'24</text>+ <text x="900" y="445" text-anchor="middle">'25</text>+ <text x="1020" y="445" text-anchor="middle">'26</text>+ </g>+ </svg>++ <footer class="mt-3 flex items-baseline justify-between mono text-[10.5px] opacity-60">+ <span>Source · Synthesized industry estimates, 2026-05</span>+ <span>Chart by HTML-Anything</span>+ <span>NYT-STYLE · FRAME-DATA-CHART-NYT</span>+ </footer>+ </article>+</body>+</html>diff --git a/src/lib/templates/skills/frame-data-chart-nyt/example.md b/src/lib/templates/skills/frame-data-chart-nyt/example.mdnew file mode 100644index 00000000..e4dc5568--- /dev/null+++ b/src/lib/templates/skills/frame-data-chart-nyt/example.md@@ -0,0 +1,18 @@+# 全球 AI agent 月活 · 2018-2026++> NYT 风折线图, 一个结论 + 8 个数据点++## 结论+**AI agent 月活在 2024 之后呈两段抛物线增长** — 第一段由 Claude / GPT 工作流推动, 第二段由本地 CLI agent (Cursor / Codex / Aider) 普及推动。++## 数据 (CSV)+year,MAU_millions+2018,12+2019,28+2020,58+2021,90+2022,140+2023,210+2024,310+2025,468+2026,640diff --git a/src/lib/templates/skills/frame-flowchart-sticky/SKILL.md b/src/lib/templates/skills/frame-flowchart-sticky/SKILL.mdnew file mode 100644index 00000000..f8772531--- /dev/null+++ b/src/lib/templates/skills/frame-flowchart-sticky/SKILL.md@@ -0,0 +1,48 @@+---+name: frame-flowchart-sticky+zh_name: "便利贴流程图帧"+en_name: "Sticky Flowchart Frame"+emoji: "📝"+description: "SVG 曲线连接 + 便利贴节点 + 光标交互, 像白板 brainstorm"+category: video+scenario: operations+aspect_hint: "1920×1080 (16:9)"+featured: 45+tags: ["flowchart", "diagram", "sticky", "whiteboard", "frame"]+example_id: sample-frame-flowchart-sticky+example_name: "便利贴流程图 · 用户 onboarding"+example_format: markdown+example_tagline: "SVG 曲线 + 4 色便利贴"+example_desc: "6 节点 onboarding 流程, 手写体 + 白板纸底"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · flowchart"+---++【模板: 便利贴流程图帧 (Sticky Flowchart)】+【意图】把一个流程 / 系统 / 工作流画成"白板 + 便利贴"的样子, 适合 onboarding 视频、运营流程说明、系统架构讲解。Inspired by hyperframes flowchart。++【画布】1920×1080。背景: 米黄白板纸 `#f4ede1` 或冷灰白板 `#f0f2f4`; 加非常浅的 hex grid `rgba(0,0,0,0.04)` 让它有白板感。++【节点 (Sticky Notes)】+- 每节点 = 一张 240×180px 便利贴, 4 套颜色随机分配: 黄 `#fcd34d` / 桃 `#fca5a5` / 薄荷 `#a7f3d0` / 天 `#a5b4fc`。+- 便利贴有轻微旋转 `transform: rotate(±2deg)` 不一致, 投影 `drop-shadow(0 6px 14px rgba(0,0,0,0.12))`, 顶部胶带 `linear-gradient(...)` 装饰。+- 节点内容: 1 个 emoji 或单线 SVG icon + 大字标题 (16-20px) + 一行描述 (12px)。+- 节点字体: `Kalam` / `Caveat` / `Patrick Hand` 手写感字体 (中文用 `霞鹜文楷` 或 `LXGW WenKai Screen`)。++【连接线 (SVG)】+- 用 `<path>` Bezier 曲线连接节点, stroke `#2a2a2a`, width 2.5, `stroke-linecap: round`, `stroke-dasharray: 0` (实线) 或 `8 6` (虚线 = 条件分支)。+- 箭头终端用 `marker-end`, 黑色三角小箭头。+- 复杂节点可有循环或分支: 同一节点连出 2 条 (分叉) 或 2 条进入一节点 (合并)。++【可选交互】+- 顶部 caption (sans, 12px uppercase): "FLOW · MIGRATION · 2026"。+- 鼠标 hover 节点: 抬起阴影 + scale 1.05, 用 CSS transition。+- 一个"光标"装饰 (`<svg>` arrow + name tag), 浮在某节点旁, 模拟 figma 协作光标。++【设计细节】+- 至少 5 个节点, 最多 12 个。+- 节点排布不要全部居中对齐, 要有一点白板风的"随手贴"感, 但保证连接线清晰不交叉。+- 严禁: 全屏深色背景、霓虹色、企业 dashboard 风格。+- 字体不能用 Inter / 衬线, 必须手写感。+- 单文件 HTML, 不要外部图标库 (用 inline SVG)。+- 必须用用户的真实流程内容; 节点文字直接来自用户输入。diff --git a/src/lib/templates/skills/frame-flowchart-sticky/example.html b/src/lib/templates/skills/frame-flowchart-sticky/example.htmlnew file mode 100644index 00000000..7127cd8a--- /dev/null+++ b/src/lib/templates/skills/frame-flowchart-sticky/example.html@@ -0,0 +1,137 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Sticky Flowchart · HTML Anything Onboarding</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Patrick+Hand&family=Inter:wght@400;500;600&family=IBM+Plex+Mono&display=swap" rel="stylesheet" />+<style>+ body {+ font-family:'Patrick Hand','Caveat',cursive;+ background:+ linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),+ linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px),+ #f4ede1;+ background-size: 40px 40px;+ color:#2a2a2a;+ min-height:100vh;+ margin:0;+ }+ .sticky {+ width:200px; min-height:150px;+ padding:14px 16px;+ box-shadow: 0 6px 14px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);+ position:absolute;+ border-radius: 2px 2px 4px 4px;+ }+ .sticky::before {+ content:''; position:absolute; top:-8px; left:50%; transform:translateX(-50%) rotate(-2deg);+ width:80px; height:18px; background:rgba(255,255,255,0.6);+ box-shadow: 0 1px 3px rgba(0,0,0,0.08);+ }+ .yellow { background:#fcd34d; transform: rotate(-1.5deg); }+ .peach { background:#fca5a5; transform: rotate(1.2deg); }+ .mint { background:#a7f3d0; transform: rotate(-0.8deg); }+ .sky { background:#a5b4fc; transform: rotate(2deg); }+ .sticky h3 { font-family:'Caveat',cursive; font-size:22px; font-weight:700; line-height:1.1; }+ .sticky p { font-family:'Patrick Hand',cursive; font-size:14px; line-height:1.3; margin-top:6px; opacity:0.85; }+ .num { font-family:'Caveat',cursive; font-weight:700; font-size:28px; line-height:1; }+ .mono { font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:0.12em; text-transform:uppercase; }+ .cursor-tag {+ position:absolute; transform: translate(-50%,-100%);+ background:#1a1a1a; color:#fff; font-family:'Inter',sans-serif; font-size:10px;+ padding:2px 8px; border-radius:10px; font-weight:600;+ }+</style>+</head>+<body class="relative overflow-hidden">+ <!-- header -->+ <header class="px-12 pt-10 flex items-baseline justify-between">+ <div class="mono opacity-70">FLOW · ONBOARDING · 2026</div>+ <h1 style="font-family:'Caveat',cursive;font-size:36px;font-weight:700">HTML Anything · 新用户上手</h1>+ <div class="mono opacity-70">FRAME-FLOWCHART-STICKY</div>+ </header>++ <!-- canvas -->+ <div class="relative" style="height:780px">++ <!-- SVG connectors layer -->+ <svg class="absolute inset-0 w-full h-full" viewBox="0 0 1500 780" preserveAspectRatio="none" style="pointer-events:none">+ <defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">+ <path d="M0,0 L10,5 L0,10 z" fill="#2a2a2a"/>+ </marker>+ </defs>+ <!-- 1 → 2 -->+ <path d="M 240 240 C 320 240, 360 240, 420 240" fill="none" stroke="#2a2a2a" stroke-width="2.5" stroke-linecap="round" marker-end="url(#arrow)"/>+ <!-- 2 → 3 -->+ <path d="M 620 240 C 700 240, 740 240, 800 240" fill="none" stroke="#2a2a2a" stroke-width="2.5" stroke-linecap="round" marker-end="url(#arrow)"/>+ <!-- 3 → 4 -->+ <path d="M 1000 240 C 1100 240, 1140 290, 1100 360 S 980 480, 880 480" fill="none" stroke="#2a2a2a" stroke-width="2.5" stroke-linecap="round" marker-end="url(#arrow)"/>+ <!-- 4 → 5 -->+ <path d="M 680 480 C 580 480, 540 480, 480 480" fill="none" stroke="#2a2a2a" stroke-width="2.5" stroke-linecap="round" marker-end="url(#arrow)"/>+ <!-- 5 → 6 -->+ <path d="M 280 480 C 200 480, 160 540, 180 600 S 280 700, 380 700" fill="none" stroke="#2a2a2a" stroke-width="2.5" stroke-linecap="round" marker-end="url(#arrow)"/>+ <!-- branch: 2 → installer (dashed) -->+ <path d="M 520 320 C 520 400, 560 440, 700 440" fill="none" stroke="#2a2a2a" stroke-width="2" stroke-linecap="round" stroke-dasharray="8 6" marker-end="url(#arrow)"/>+ </svg>++ <!-- node 1: 打开 -->+ <div class="sticky yellow" style="top:160px; left:60px">+ <div class="num">01</div>+ <h3 class="mt-1">打开 localhost:3456</h3>+ <p>浏览器进入主界面</p>+ </div>++ <!-- node 2: 扫 agent -->+ <div class="sticky peach" style="top:160px; left:420px">+ <div class="num">02</div>+ <h3 class="mt-1">扫描本地 Agent</h3>+ <p>列出 17 个 CLI 中已登录的那几个</p>+ </div>++ <!-- node 3: 选模板 -->+ <div class="sticky mint" style="top:160px; left:800px">+ <div class="num">03</div>+ <h3 class="mt-1">选 75 个模板之一</h3>+ <p>按场景 / 关键字搜</p>+ </div>++ <!-- node 4: 粘内容 -->+ <div class="sticky sky" style="top:400px; left:680px">+ <div class="num">04</div>+ <h3 class="mt-1">粘 MD / CSV / 图</h3>+ <p>自动识别格式</p>+ </div>++ <!-- node 5: 转换 -->+ <div class="sticky yellow" style="top:400px; left:280px">+ <div class="num">05</div>+ <h3 class="mt-1">⌘+Enter 转换</h3>+ <p>SSE 流式刷新预览</p>+ </div>++ <!-- node 6: 复制 -->+ <div class="sticky mint" style="top:620px; left:380px">+ <div class="num">06</div>+ <h3 class="mt-1">一键复制 / 下载</h3>+ <p>公众号 / 推特 / PNG / HTML</p>+ </div>++ <!-- branch: 安装 agent -->+ <div class="sticky peach" style="top:400px; left:700px; transform:rotate(3deg); width:200px">+ <div class="num">⤳</div>+ <h3 class="mt-1">分支: 装个 CLI</h3>+ <p>没有? brew install claude</p>+ </div>++ <!-- cursor tag -->+ <div class="cursor-tag" style="top:280px; left:520px;">🟠 you</div>+ </div>++ <footer class="px-12 pb-6 flex items-baseline justify-between mono opacity-60">+ <span>FLOWCHART · WHITEBOARD STYLE · 6 NODES + 1 BRANCH</span>+ <span>html-anything.dev/onboarding</span>+ </footer>+</body>+</html>diff --git a/src/lib/templates/skills/frame-flowchart-sticky/example.md b/src/lib/templates/skills/frame-flowchart-sticky/example.mdnew file mode 100644index 00000000..9461866c--- /dev/null+++ b/src/lib/templates/skills/frame-flowchart-sticky/example.md@@ -0,0 +1,13 @@+# 新用户上手流程 · HTML Anything++> 白板风便利贴流程图, 6 节点, 1 个分支++## 流程+1. **打开 localhost:3456** — 浏览器进入主界面+2. **自动识别本地 agent** — 扫描 PATH, 列出已登录的 CLI+3. **选模板** — 75 个模板按场景分类+4. **粘贴内容 / 上传文件** — Markdown / CSV / Excel 都支持+5. **⌘+Enter 转换** — 流式调用 agent → SSE → 实时刷新预览+6. **一键复制 / 下载** — 公众号 / 推特 / 知乎 / PNG / HTML++分支: 若无本地 agent → 引导安装 (Claude / Cursor / Codex)diff --git a/src/lib/templates/skills/frame-glitch-title/SKILL.md b/src/lib/templates/skills/frame-glitch-title/SKILL.mdnew file mode 100644index 00000000..eb12ebfb--- /dev/null+++ b/src/lib/templates/skills/frame-glitch-title/SKILL.md@@ -0,0 +1,50 @@+---+name: frame-glitch-title+zh_name: "故障艺术标题帧"+en_name: "Glitch Title Frame"+emoji: "⚡"+description: "数字故障 / 像散偏移 / 数据腐败标题, 适合视频转场 / cyberpunk hero"+category: video+scenario: video+aspect_hint: "1920×1080 (16:9)"+featured: 37+recommended: 6+tags: ["glitch", "cyberpunk", "title", "transition", "vfx", "frame"]+example_id: sample-frame-glitch-title+example_name: "故障标题 · SIGNAL_LOST"+example_format: markdown+example_tagline: "cyan / magenta 像散 + CRT 扫描线"+example_desc: "巨大标题 + 数据腐败伪影 + 角落 ASCII 噪点 chunks"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · glitch"+---++【模板: 故障艺术标题帧 (Glitch Title)】+【意图】单帧 hero / 视频转场 / cyberpunk 风格标题。Inspired by hyperframes glitch。++【画布】1920×1080, 背景 `#070708` 近黑或 CRT 暗灰 `#0d0e10`; 加 56px 网格 (透明 5%) + scanlines 横线 (透明 8%, 2px 间隔)。++【主标题】+- 居中, 6-9vw, weight 800/900, 字体 `Space Grotesk Bold` / `Inter Tight Black` / `JetBrains Mono Bold`。+- 颜色: 主层 `#f5f5f7`; 后面套 2 层伪影:+ - cyan `#00f0ff` translate(`-3px`, `1px`)。+ - magenta `#ff2bd6` translate(`3px`, `-1px`)。+- 整层加 clip-path 切片 5-8 段, 每段 `@keyframes` 随机 translateX -10px → 10px, 持续 80-160ms, 错峰播放, 营造 "data corruption" 像散。+- 每隔 1.5s 触发一次"重故障" — 整个标题被 horizontal smear 1 frame, 用 `filter: url(#displacementFilter)` 或简单 CSS 平移。++【附加层】+- 顶部一行 caption (uppercase mono, 11px, opacity 0.6): `>> SIGNAL_LOST · CH-04 · 14:32:08`。+- 标题下面 1 行副标 (24-28px, mono, opacity 0.7), 偶发被 ` ̶▒̶` 字符替换 (假乱码)。+- 角落随机点缀 `█▓▒░` ASCII 噪点 chunks。+- 底部 timecode (mono, opacity 0.4)。+- 整画面叠 noise grain 层 `background-image: url("data:image/svg+xml,...turbulence...")`, opacity 6%, mix-blend-mode overlay。++【SVG 滤镜 (可选)】+- 定义 `<filter id="rgbShift">` 用 `feColorMatrix` + `feOffset` + `feMerge` 把 R/G/B 三通道偏移; 整层 `filter: url(#rgbShift)` 在故障瞬间应用。++【设计细节】+- 颜色仅用: 黑 / 白 / cyan / magenta / 一点 amber 警告色; 严禁全彩虹。+- 字体: 西文 `Space Grotesk` 或 `JetBrains Mono` Bold; 中文 `Noto Sans Mono CJK SC` 或 `Noto Sans SC` Bold。+- 严禁 lorem ipsum; 必须用用户的标题 + 副标。+- 动效用 `@keyframes`, 可被 `prefers-reduced-motion` 关闭 (退回静态 chromatic split)。+- 单文件 HTML。diff --git a/src/lib/templates/skills/frame-glitch-title/example.html b/src/lib/templates/skills/frame-glitch-title/example.htmlnew file mode 100644index 00000000..f8880f58--- /dev/null+++ b/src/lib/templates/skills/frame-glitch-title/example.html@@ -0,0 +1,99 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<title>Glitch Title · SIGNAL_LOST</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700;800&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet" />+<style>+ body { font-family:'Space Grotesk',sans-serif; background:#0d0e10; color:#f5f5f7; margin:0; min-height:100vh; overflow:hidden; position:relative; }+ .mono { font-family:'JetBrains Mono',monospace; }+ /* scanlines */+ body::before {+ content:''; position:absolute; inset:0; pointer-events:none; z-index:3;+ background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0px, rgba(0,0,0,0.18) 1px, transparent 1px, transparent 3px);+ mix-blend-mode: multiply; opacity:0.6;+ }+ /* grid */+ body::after {+ content:''; position:absolute; inset:0; pointer-events:none; z-index:2;+ background-image: linear-gradient(rgba(0,255,180,0.04) 1px, transparent 1px), linear-gradient(90deg,rgba(0,255,180,0.04) 1px, transparent 1px);+ background-size: 56px 56px;+ }+ /* grain */+ .grain { position:absolute; inset:0; opacity:0.1; mix-blend-mode:overlay; z-index:4; pointer-events:none;+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"); }+ @keyframes glitch {+ 0%, 92%, 100% { transform: translate(0,0); filter: none }+ 93% { transform: translate(-6px, 1px); filter: url(#rgb) }+ 94% { transform: translate(8px, -2px); filter: url(#rgb) }+ 95% { transform: translate(-4px, 2px); }+ 96% { transform: translate(4px, -1px); filter: url(#rgb) }+ 97% { transform: translate(0,0) }+ }+ .glitch-host { position:relative; animation: glitch 4s infinite; }+ .layer { position:absolute; inset:0; mix-blend-mode:screen; }+ .layer-c { color:#00f0ff; transform: translate(-3px, 1px); }+ .layer-m { color:#ff2bd6; transform: translate(3px, -1px); }+ .vignette { position:absolute; inset:0; background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,0.7) 100%); z-index:5; pointer-events:none; }+ .ascii { font-family:'JetBrains Mono',monospace; letter-spacing:2px; line-height:1; }+ @media (prefers-reduced-motion: reduce) { .glitch-host { animation: none } }+</style>+</head>+<body class="flex flex-col items-center justify-center relative">++ <svg width="0" height="0" style="position:absolute">+ <defs>+ <filter id="rgb">+ <feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>+ <feOffset in="SourceGraphic" dx="3" dy="0" result="r"/>+ <feOffset in="SourceGraphic" dx="-3" dy="0" result="b"/>+ <feMerge><feMergeNode in="r"/><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>+ </filter>+ </defs>+ </svg>++ <header class="absolute top-10 left-12 right-12 flex items-baseline justify-between mono text-[11px] opacity-70 z-10 tracking-[0.16em]">+ <span>>> SIGNAL_LOST · CH-04 · 14:32:08</span>+ <span>FRAME · GLITCH-TITLE</span>+ <span>REC ●</span>+ </header>++ <!-- ASCII chunks corners -->+ <pre class="ascii absolute top-24 left-12 text-[12px] opacity-30 z-10">█▓▒░ █▓▒░+▒▓█▓ ░▒▓+░▒▓█ ▓▒░░+▓▒░░ ▒▓█▓</pre>+ <pre class="ascii absolute bottom-24 right-12 text-[12px] opacity-30 z-10 text-right">█▓▒░ ▓▒░█+▒░░▓ ░▒▓█+▓▒░░ █▓▒░+░▒▓█ ▒░░▓</pre>++ <main class="relative z-10 text-center px-12">+ <div class="mono text-[14px] opacity-60 tracking-[0.22em] mb-6 uppercase">— Transmission Halted —</div>+ <div class="glitch-host relative inline-block">+ <h1 class="font-black tracking-[-0.02em] leading-[0.9]" style="font-size:clamp(80px,12vw,200px)">+ SIGNAL<br/>_LOST+ </h1>+ <h1 class="layer layer-c font-black tracking-[-0.02em] leading-[0.9]" style="font-size:clamp(80px,12vw,200px)">+ SIGNAL<br/>_LOST+ </h1>+ <h1 class="layer layer-m font-black tracking-[-0.02em] leading-[0.9]" style="font-size:clamp(80px,12vw,200px)">+ SIGNAL<br/>_LOST+ </h1>+ </div>+ <p class="mt-10 mono text-[16px] opacity-70 tracking-[0.16em]">+ 04 · DATA_CORRUPTION · <span style="color:#ffb547">w̶̶a̷i̶t̶i̶n̶g̶ ̷f̷o̶r̶ ̶r̷e̶c̶o̶v̷e̶r̶y̶</span>+ </p>+ </main>++ <div class="grain"></div>+ <div class="vignette"></div>++ <footer class="absolute bottom-10 left-12 right-12 flex items-baseline justify-between mono text-[11px] opacity-50 z-10 tracking-[0.16em]">+ <span>HTML-ANYTHING / VFX</span>+ <span style="color:#ff2bd6">CHROMATIC · CYAN × MAGENTA</span>+ <span class="mono">⏵ 00:14:32:08</span>+ </footer>+</body>+</html>diff --git a/src/lib/templates/skills/frame-glitch-title/example.md b/src/lib/templates/skills/frame-glitch-title/example.mdnew file mode 100644index 00000000..f4c11a09--- /dev/null+++ b/src/lib/templates/skills/frame-glitch-title/example.md@@ -0,0 +1,12 @@+# 故障标题帧 · SIGNAL_LOST++> Cyan / magenta 像散, CRT 扫描线 + ASCII 噪点++## 标题+SIGNAL_LOST++## 副标+04 · DATA CORRUPTION · 14:32:08++## 章节标识+CH-04 / SIGNAL CORRUPTED — 数据失真重组diff --git a/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md b/src/lib/templates/skills/frame-light-leak-cinema/SKILL.mdnew file mode 100644index 00000000..84bc310e--- /dev/null+++ b/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md@@ -0,0 +1,50 @@+---+name: frame-light-leak-cinema+zh_name: "胶片漏光电影帧"+en_name: "Light-Leak Cinematic Frame"+emoji: "🎞️"+description: "胶片漏光 + 颗粒噪点 + 16:9 letterbox + 衬线大字, 电影感开场 / 章节卡"+category: video+scenario: video+aspect_hint: "2.39:1 letterbox (1920×800) 或 16:9 (1920×1080)"+featured: 36+tags: ["cinema", "film", "light-leak", "grain", "letterbox", "frame"]+example_id: sample-frame-light-leak-cinema+example_name: "胶片漏光 · REEL 03"+example_format: markdown+example_tagline: "暖橙漏光 + 35mm 颗粒"+example_desc: "2.39:1 letterbox + 衬线斜体大字 + 胶片齿孔"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · light-leak"+---++【模板: 胶片漏光电影帧】+【意图】纪录片 / 个人短片 / 视频章节卡的开场单帧 —— 暖橙漏光 + 35mm 颗粒 + 衬线大字, 古典胶片质感。Inspired by hyperframes light-leak。++【画布】+- **2.39:1 letterbox** (推荐): 1920×800, 上下黑边各 140px (`#000`)。+- 或 16:9: 1920×1080, 无 letterbox。++【背景】+- 底层: 深暖色 (深红棕 `#1a0d08` / 墨绿 `#0a1410` / 蓝紫 `#0d0e1a`) 或场景描绘 (CSS gradient 模拟天空 / 室内 / 室外)。+- **胶片漏光 (Light Leak)**: 2-3 个大 `radial-gradient(ellipse at top right, #ffb547 0%, transparent 50%)` + 1 个底部 `linear-gradient(to top, #d97757 0%, transparent 30%)`; 颜色取暖橙 / 桃 / 玫红 / 暗黄, **不要冷蓝**。+- **35mm Grain**: 全屏覆盖 SVG turbulence noise 图层, opacity 14%, `mix-blend-mode: overlay`; 也可用 `background-image: url("data:image/svg+xml,...feTurbulence...")`。+- 可选: 1 道 `feDisplacementMap` 模拟胶片摆动 (慎用)。++【文字】+- 中央或左下: 大字衬线 (Source Serif Pro / Playfair Display / EB Garamond) 5-8vw, weight 500 italic; 颜色暖白 `#f5e9d6` 或 cream。+- 副标 (24-28px) 一行, opacity 0.7, 同样衬线。+- 角落 caption (uppercase letterspace 0.18em, 10-11px, mono, opacity 0.5): "REEL 03 · CH I · 1985"。+- 底部 timecode + 拍摄地 + 日期 (mono, opacity 0.4)。++【可选附加】+- "胶片划痕": 几条 1-2px 竖向白线, opacity 0.2, 不规则间距 (用 `box-shadow` 多重 inset 或多个 `<div>`)。+- "胶片齿孔": letterbox 黑边内, 等距小白方块 (CSS repeating-linear-gradient)。+- 入场动效: 整画面从 underexposed (brightness 0.3) → normal, 800ms 内; 漏光位置缓慢漂移 12s 一个周期。++【设计细节】+- 颜色绝不超过 4 个色相 (深背景 + 2 个暖漏光色 + 文字 cream)。+- 严禁: 蓝紫漏光 (违反胶片质感)、emoji、霓虹色、几何 dashboard 装饰。+- 中文: `Noto Serif SC` italic 不存在 → 用 `Noto Serif SC` regular + 字距加大。+- 必须用用户提供的标题; 自动估算合理"年份 / 章节 / 地点" 元数据 (但来源用户内容)。+- 单文件 HTML, 用 `prefers-reduced-motion` 关动效。diff --git a/src/lib/templates/skills/frame-light-leak-cinema/example.html b/src/lib/templates/skills/frame-light-leak-cinema/example.htmlnew file mode 100644index 00000000..bdda599a--- /dev/null+++ b/src/lib/templates/skills/frame-light-leak-cinema/example.html@@ -0,0 +1,81 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<title>Light Leak Cinema · REEL 03</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Source+Serif+Pro:ital,wght@0,400;1,400;1,500&family=IBM+Plex+Mono:wght@400;500&family=Noto+Serif+SC:wght@400;500&display=swap" rel="stylesheet" />+<style>+ body { font-family:'Source Serif Pro','Noto Serif SC',Georgia,serif; background:#000; margin:0; min-height:100vh; }+ .frame {+ position:relative; width:100%; max-width:1600px; aspect-ratio: 2.39 / 1; margin:0 auto;+ background:#1a0d08;+ overflow:hidden;+ }+ .scene {+ position:absolute; inset:0;+ background:+ radial-gradient(ellipse at 78% 18%, #ffb547 0%, transparent 38%),+ radial-gradient(ellipse at 90% 30%, #ff7e3f 0%, transparent 30%),+ linear-gradient(180deg, transparent 60%, #d97757 110%),+ radial-gradient(ellipse at 30% 60%, #2a1410 0%, transparent 60%),+ linear-gradient(135deg, #1a0d08 0%, #28140c 50%, #0a0502 100%);+ }+ .grain { position:absolute; inset:0; opacity:0.14; mix-blend-mode:overlay; pointer-events:none;+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E"); }+ /* scratches */+ .scratch { position:absolute; top:0; bottom:0; width:1px; background:#f5e9d6; opacity:0.18; }+ .vignette { position:absolute; inset:0; background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,0.6) 100%); }+ .perfs {+ position:absolute; left:0; right:0; height:6px;+ background-image: repeating-linear-gradient(90deg, #f5e9d6 0 8px, transparent 8px 24px);+ opacity:0.5;+ }+ .cream { color:#f5e9d6; }+ .mono { font-family:'IBM Plex Mono',monospace; }+ .display { font-family:'EB Garamond','Noto Serif SC',serif; }+ .chip { font-size:10.5px; letter-spacing:0.22em; text-transform:uppercase; }+</style>+</head>+<body class="min-h-screen flex items-center justify-center p-6" style="background:#000">+ <div class="frame">+ <div class="scene"></div>++ <!-- scratches -->+ <div class="scratch" style="left:14%;height:38%"></div>+ <div class="scratch" style="left:42%;height:60%;top:20%;opacity:0.12"></div>+ <div class="scratch" style="left:71%;height:30%;top:55%"></div>++ <!-- letterbox bars - actually built into aspect ratio container; perfs on top -->++ <!-- top caption -->+ <header class="absolute top-6 left-10 right-10 flex items-baseline justify-between chip mono cream opacity-70 z-10">+ <span>REEL 03 · CH I · MMXXVI</span>+ <span>A Quiet Year in Berlin</span>+ <span>00:03:21</span>+ </header>++ <!-- main text -->+ <main class="absolute z-10 cream" style="left:8%; bottom:18%; max-width:60%">+ <div class="chip mono opacity-70">Reel III · Title</div>+ <h1 class="display mt-3 leading-[1.05] italic font-medium" style="font-size:clamp(40px,5.5vw,84px); color:#f5e9d6">+ A Quiet Year<br/>+ <span style="font-style:italic">in</span> Berlin.+ </h1>+ <p class="display mt-4 italic opacity-80 text-[22px]">+ A short film about typesetting, in fourteen reels.+ </p>+ </main>++ <!-- bottom right meta -->+ <footer class="absolute bottom-6 left-10 right-10 flex items-baseline justify-between chip mono cream opacity-50 z-10">+ <span>52.5200° N · 13.4050° E</span>+ <span>FILMED ON 35MM · PROXY 1080P</span>+ <span>FRAME · LIGHT-LEAK-CINEMA</span>+ </footer>++ <div class="grain"></div>+ <div class="vignette"></div>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/frame-light-leak-cinema/example.md b/src/lib/templates/skills/frame-light-leak-cinema/example.mdnew file mode 100644index 00000000..0218fc30--- /dev/null+++ b/src/lib/templates/skills/frame-light-leak-cinema/example.md@@ -0,0 +1,12 @@+# 胶片漏光帧 · REEL 03++> 2.39:1 letterbox, 暖橙漏光 + 35mm 颗粒++## 标题+A Quiet Year in Berlin++## 副标+A short film about typesetting, in fourteen reels.++## Metadata+REEL 03 · CH I · MMXXVI · 00:03:21diff --git a/src/lib/templates/skills/frame-liquid-bg-hero/SKILL.md b/src/lib/templates/skills/frame-liquid-bg-hero/SKILL.mdnew file mode 100644index 00000000..c8287c2b--- /dev/null+++ b/src/lib/templates/skills/frame-liquid-bg-hero/SKILL.md@@ -0,0 +1,55 @@+---+name: frame-liquid-bg-hero+zh_name: "流体背景 Hero 帧"+en_name: "Liquid Background Hero"+emoji: "🌊"+description: "WebGL 风流体置换背景 + 顶部叠加金句, 适合视频片头 / landing hero / 海报"+category: poster+scenario: video+aspect_hint: "1920×1080 (16:9) 或 1080×1920 (9:16)"+featured: 39+tags: ["liquid", "fluid", "background", "hero", "html-in-canvas", "vfx"]+example_id: sample-frame-liquid-bg-hero+example_name: "流体背景 Hero · 金句"+example_format: markdown+example_tagline: "Aurora Violet 流体"+example_desc: "多层 radial-gradient 呼吸背景 + difference 文字"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · vfx-liquid-background"+---++【模板: 流体背景 Hero】+【意图】可作为视频片头帧、SaaS landing 顶部 hero、海报底图。WebGL 流体感, 但用 CSS / canvas 退化绘制, 确保单文件可双击打开。Inspired by hyperframes vfx-liquid-background。++【画布】1920×1080 (横) 或 1080×1920 (竖), 二选一。背景占满。++【流体背景 — 3 种实现, 按用户偏好选】+1. **CSS 多层 radial-gradient 错位呼吸** (最稳, 默认推荐):+ - 3-5 个大椭圆 `radial-gradient(...)`, 颜色取自调色板。+ - 每个椭圆套 `@keyframes` 平移 + scale + hue-rotate, 周期 8-14s, 错峰; 整个画面叠 `mix-blend-mode: screen` 或 `overlay`。+ - 顶层加 1 层 `backdrop-filter: blur(80px)` 让边缘更糊。+2. **Canvas + simple perlin noise** (中阶):+ - 80 行 inline JS, 用 `requestAnimationFrame` 画 metaballs 或 simplex noise field。+ - 性能允许时启用, `prefers-reduced-motion` 时降回静态截图。+3. **WebGL fragment shader** (高阶, 慎用):+ - 用 jsdelivr CDN 引 `regl` 或 inline plain WebGL。+ - shader 写 domain-warp noise; 单个 quad, 一个 uniform `u_time`。++【顶层文字层】+- 居中或左下: 一句巨型金句 (5-7vw, 衬线或粗 sans), 字体: `Source Serif Pro` / `Inter Tight` / `Manrope Black`。+- 文字色用 paper white `#fafaf8` 或 ink, 取决于背景明暗; 加 `mix-blend-mode: difference` 让它在任何流体颜色上都可读。+- 副标 (小 sans, opacity 0.7) 一行。+- 底部可选 CTA chip 或 hairline + 元数据 row。++【调色 — 4 选 1, 不要彩虹】+- 🌅 **Solar Peach** — `#ffb18a` + `#f78b4c` + `#d97757`, 暖橙桃。+- 🌊 **Ocean Aqua** — `#5ac8fa` + `#0a84ff` + `#1e3a8a`, 海蓝。+- 🌌 **Aurora Violet** — `#a78bfa` + `#7c5cff` + `#1e1b4b`, 极光紫。+- 🌿 **Forest Mint** — `#86efac` + `#34d399` + `#065f46`, 苔森林。++【设计细节】+- 严禁: 多色彩虹 (>4 个色相)、PowerPoint 渐变、霓虹荧光叠加。+- 字体: 中文用 `Noto Serif SC` (display) / `Noto Sans SC` (副标)。+- 严禁外链图片; 全部 CSS + SVG + 可选 canvas。+- 必须用用户提供的金句 / 标题; 如果用户输入是数据 → 提炼一句 ≤ 18 字的金句。+- 单文件 HTML, 可被 `prefers-reduced-motion` 关动效。diff --git a/src/lib/templates/skills/frame-liquid-bg-hero/example.html b/src/lib/templates/skills/frame-liquid-bg-hero/example.htmlnew file mode 100644index 00000000..558f8f80--- /dev/null+++ b/src/lib/templates/skills/frame-liquid-bg-hero/example.html@@ -0,0 +1,64 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Liquid Hero · Aurora Violet</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700;800;900&family=Noto+Sans+SC:wght@400;700;900&family=Source+Serif+Pro:ital,wght@1,400;1,600&display=swap" rel="stylesheet" />+<style>+ body { font-family:'Inter Tight','Noto Sans SC',system-ui,sans-serif; background:#1e1b4b; margin:0; min-height:100vh; overflow:hidden; color:#fafaf8; position:relative; }+ .blob { position:absolute; border-radius:50%; mix-blend-mode:screen; filter:blur(70px); will-change: transform; }+ @keyframes float1 { 0%,100% { transform: translate(0,0) scale(1) } 50% { transform: translate(80px,-60px) scale(1.15) } }+ @keyframes float2 { 0%,100% { transform: translate(0,0) scale(1.1) } 50% { transform: translate(-100px,40px) scale(0.9) } }+ @keyframes float3 { 0%,100% { transform: translate(0,0) scale(0.95) } 50% { transform: translate(50px,80px) scale(1.2) } }+ .b1 { width:600px; height:600px; background:#a78bfa; top:-100px; left:-100px; animation: float1 12s ease-in-out infinite; }+ .b2 { width:520px; height:520px; background:#7c5cff; top:30%; right:-100px; animation: float2 10s ease-in-out infinite; }+ .b3 { width:480px; height:480px; background:#ec4899; bottom:-100px; left:30%; animation: float3 14s ease-in-out infinite; }+ .b4 { width:380px; height:380px; background:#06b6d4; top:60%; left:10%; animation: float1 16s ease-in-out infinite; opacity:0.6 }+ .text-diff { mix-blend-mode: difference; color:#fafaf8; }+ .chip { font-family:'Inter Tight',sans-serif; font-size:11px; letter-spacing:0.18em; text-transform:uppercase; }+ .serif-em { font-family:'Source Serif Pro',serif; font-style:italic; font-weight:600; }+ /* faint grid overlay */+ body::before {+ content:''; position:absolute; inset:0; pointer-events:none;+ background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,0.03) 1px, transparent 1px);+ background-size: 64px 64px; z-index:1;+ }+ @media (prefers-reduced-motion: reduce) {+ .blob { animation: none }+ }+</style>+</head>+<body class="flex flex-col items-center justify-center p-16">++ <div class="blob b1"></div>+ <div class="blob b2"></div>+ <div class="blob b3"></div>+ <div class="blob b4"></div>++ <header class="absolute top-12 left-12 right-12 flex items-baseline justify-between chip opacity-70 z-10">+ <span class="text-diff">HTML ANYTHING · FRAME · LIQUID HERO</span>+ <span class="text-diff">AURORA VIOLET</span>+ <span class="text-diff">2026 · 1920 × 1080</span>+ </header>++ <main class="relative z-10 text-center max-w-[1100px]">+ <h1 class="text-diff font-black leading-[0.95] tracking-[-0.03em]" style="font-size:clamp(48px,7.5vw,128px)">+ 最好的 HTML, <span class="serif-em">是</span><br/>+ 让读者忘了它是 HTML。+ </h1>+ <p class="mt-8 text-diff opacity-80 text-[24px] font-medium">+ HTML Anything · 75 个世界级模板, 0 个 API key+ </p>+ <div class="mt-10 inline-flex items-center gap-3 text-[13px] font-semibold chip px-5 py-2 rounded-full text-diff" style="border:1px solid rgba(255,255,255,0.4)">+ ⌘ Try at localhost:3456+ </div>+ </main>++ <footer class="absolute bottom-12 left-12 right-12 flex items-baseline justify-between chip opacity-60 z-10">+ <span class="text-diff">FRAME-LIQUID-BG-HERO</span>+ <span class="text-diff">PREFERS-REDUCED-MOTION SAFE</span>+ <span class="text-diff">HTMLANYTHING.DEV</span>+ </footer>+</body>+</html>diff --git a/src/lib/templates/skills/frame-liquid-bg-hero/example.md b/src/lib/templates/skills/frame-liquid-bg-hero/example.mdnew file mode 100644index 00000000..eb63bf66--- /dev/null+++ b/src/lib/templates/skills/frame-liquid-bg-hero/example.md@@ -0,0 +1,9 @@+# 流体 Hero · 金句帧++> Aurora Violet 流体背景, mix-blend-mode 文字++## 金句+最好的 HTML, 是让读者忘了它是 HTML。++## 副标+HTML Anything · 75 个世界级模板, 0 个 API keydiff --git a/src/lib/templates/skills/frame-logo-outro/SKILL.md b/src/lib/templates/skills/frame-logo-outro/SKILL.mdnew file mode 100644index 00000000..eae54431--- /dev/null+++ b/src/lib/templates/skills/frame-logo-outro/SKILL.md@@ -0,0 +1,47 @@+---+name: frame-logo-outro+zh_name: "品牌 Logo 收尾帧"+en_name: "Logo Outro Frame"+emoji: "🎬"+description: "Logo 分块组装入场 + glow bloom + tagline 揭示, 适合视频片尾 / 品牌闭幕"+category: video+scenario: video+aspect_hint: "1920×1080 (16:9)"+featured: 40+recommended: 8+tags: ["logo", "outro", "branding", "end-card", "frame"]+example_id: sample-frame-logo-outro+example_name: "品牌 Logo 收尾 · HTML Anything"+example_format: markdown+example_tagline: "Midnight Indigo + glow bloom"+example_desc: "Logo 装配 + 品牌名 + tagline + CTA, 视频片尾用"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · logo-outro"+---++【模板: Logo 收尾帧 (Logo Outro)】+【意图】视频结尾的品牌 reveal 帧 —— logo 分块拼装 + glow bloom + tagline 上浮 + CTA。Inspired by hyperframes logo-outro。++【画布】1920×1080, 黑色 `#08090c` 或品牌深色背景; 加微妙 vignette `radial-gradient(...)` 让中心更亮。++【布局】+- **中心 Logo**: 用 CSS / 内联 SVG 绘制; 由 4-8 个几何块 (圆 / 方 / 三角 / hairline) 组成。+ - 入场动画: 每个块从屏幕外滑入 (±100px 不同方向) + scale 1.4→1.0 + opacity 0→1, 错峰 80ms; 总时长 1.2s。+ - 入场完成后, 整个 logo 加 glow bloom: `filter: drop-shadow(0 0 24px <accent>40)`; 同时一道 shimmer `mask-image` 横扫 logo (500ms)。+- **品牌名**: logo 下方 6-8% 位置, 大字 (Inter Tight / SF Pro Display, 48-72px, weight 700, letter-spacing -0.02em), 入场: typewriter or fade-up after logo bloom (1.4s 开始)。+- **Tagline**: 品牌名下方一行 (24-28px, weight 400, opacity 0.7), fade in (1.8s)。+- **底部 CTA + 元数据**: 双行底部 row, 例如 `htmlanything.dev · @htmlanything · 2026`, 11px uppercase letter-spacing 0.16em, 颜色 opacity 0.4, hairline 分隔。++【调色 — 4 选 1, 不混用】+- 🌌 **Midnight Indigo** — bg `#08090c`, accent `#7c5cff` (霓虹紫蓝 glow)。+- 🌅 **Solar Amber** — bg `#0e0a08`, accent `#ffb547` (暖琥珀)。+- 🌿 **Forest Mint** — bg `#0a1410`, accent `#5fb38a` (薄荷绿)。+- ⚪ **Bone & Ink** — bg `#f1efea`, accent `#0a0a0b` (无 neon, 走 editorial 风, glow 改成阴影)。++【设计细节】+- **绝不**: 用外链 logo 图片; logo 必须用纯 CSS / 内联 SVG 几何绘制。+- 入场动画用 `@keyframes` + `animation-delay`; 可被 `prefers-reduced-motion` 关闭。+- 字体: 西文 `Inter Tight` / `SF Pro Display` / `Manrope`; 中文 `Noto Sans SC` weight 700。+- 必须用用户提供的品牌名 + tagline; 若没有, 跑 fallback "HTML Anything" / "Anything → beautiful HTML"。+- 单文件 HTML; 整个动画完成后 freeze (不要 loop, 这是视频结尾帧)。+- 顶部可选 5px ribbon (accent 色) 增加品牌识别。diff --git a/src/lib/templates/skills/frame-logo-outro/example.html b/src/lib/templates/skills/frame-logo-outro/example.htmlnew file mode 100644index 00000000..b4a7d382--- /dev/null+++ b/src/lib/templates/skills/frame-logo-outro/example.html@@ -0,0 +1,80 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Logo Outro · HTML Anything</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;700;800;900&family=Inter:wght@400;500&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" />+<style>+ body {+ font-family:'Inter Tight','Noto Sans SC',system-ui,sans-serif;+ background: radial-gradient(circle at 50% 45%, #1a1535 0%, #08090c 70%);+ color:#f5f5f7;+ margin:0;+ min-height:100vh;+ overflow:hidden;+ }+ .accent { color:#7c5cff; }+ .ribbon { background:#7c5cff; }+ @keyframes pieceIn { 0% { opacity:0; transform: scale(1.4) translate(var(--dx, 0), var(--dy, 0)) } 100% { opacity:1; transform: scale(1) translate(0,0) } }+ @keyframes glow { from { filter: drop-shadow(0 0 0 transparent) } to { filter: drop-shadow(0 0 32px rgba(124,92,255,0.6)) } }+ .piece { animation: pieceIn 1s cubic-bezier(.34,1.56,.64,1) both; }+ .piece:nth-child(1){--dx:-80px;--dy:-40px;animation-delay:0s}+ .piece:nth-child(2){--dx:60px;--dy:-50px;animation-delay:.08s}+ .piece:nth-child(3){--dx:-40px;--dy:50px;animation-delay:.16s}+ .piece:nth-child(4){--dx:70px;--dy:40px;animation-delay:.24s}+ .piece:nth-child(5){--dx:0;--dy:-70px;animation-delay:.32s}+ .logo-wrap { animation: glow .8s ease-out 1.1s both; }+ @keyframes fadeUp { from { opacity:0; transform: translateY(20px) } to { opacity:1; transform: translateY(0) } }+ .brand { animation: fadeUp .8s ease-out 1.4s both; }+ .tagline { animation: fadeUp .8s ease-out 1.7s both; }+ .meta { animation: fadeUp .6s ease-out 2.1s both; }+ /* shimmer */+ @keyframes shimmer { 0% { background-position:-200% 0 } 100% { background-position:200% 0 } }+ .shimmer {+ background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);+ background-size: 200% 100%;+ -webkit-background-clip:text; background-clip:text; color:transparent;+ animation: shimmer 1.8s ease-out 1.9s 1 both;+ }+</style>+</head>+<body class="flex flex-col items-center justify-center relative">+ <div class="ribbon absolute top-0 left-0 right-0" style="height:4px"></div>++ <!-- logo -->+ <div class="logo-wrap relative" style="width:140px;height:140px">+ <svg viewBox="0 0 140 140" class="absolute inset-0">+ <!-- 5 geometric pieces forming an "H" -->+ <rect class="piece" x="20" y="20" width="20" height="100" fill="#7c5cff"/>+ <rect class="piece" x="100" y="20" width="20" height="100" fill="#7c5cff"/>+ <rect class="piece" x="40" y="60" width="60" height="20" fill="#f5f5f7"/>+ <circle class="piece" cx="30" cy="20" r="10" fill="#7c5cff"/>+ <circle class="piece" cx="110" cy="120" r="10" fill="#f5f5f7"/>+ </svg>+ </div>++ <!-- brand -->+ <h1 class="brand mt-10 font-black tracking-[-0.02em] leading-[0.95]" style="font-size:84px">+ <span class="shimmer">HTML Anything</span>+ </h1>++ <!-- tagline -->+ <p class="tagline mt-4 text-[24px] opacity-70 font-medium">+ Anything → <em class="not-italic accent">beautiful HTML</em>+ </p>++ <!-- CTA / meta -->+ <div class="meta mt-12 flex items-center gap-6 text-[11px] uppercase tracking-[0.18em] opacity-50">+ <span>htmlanything.dev</span>+ <span class="opacity-40">·</span>+ <span>@htmlanything</span>+ <span class="opacity-40">·</span>+ <span>2026</span>+ </div>++ <!-- corner timecode -->+ <div class="absolute bottom-8 right-12 text-[10px] font-mono opacity-30 uppercase tracking-[0.18em]">END · 00:03:21</div>+ <div class="absolute bottom-8 left-12 text-[10px] font-mono opacity-30 uppercase tracking-[0.18em]">FRAME · LOGO-OUTRO</div>+</body>+</html>diff --git a/src/lib/templates/skills/frame-logo-outro/example.md b/src/lib/templates/skills/frame-logo-outro/example.mdnew file mode 100644index 00000000..b276477d--- /dev/null+++ b/src/lib/templates/skills/frame-logo-outro/example.md@@ -0,0 +1,12 @@+# Logo 收尾帧++> Midnight Indigo 调色, 用作视频结尾的品牌 reveal++## 品牌+HTML Anything++## Tagline+Anything → beautiful HTML++## CTA+htmlanything.dev · @htmlanything · 2026diff --git a/src/lib/templates/skills/frame-macos-notification/SKILL.md b/src/lib/templates/skills/frame-macos-notification/SKILL.mdnew file mode 100644index 00000000..a182b249--- /dev/null+++ b/src/lib/templates/skills/frame-macos-notification/SKILL.md@@ -0,0 +1,54 @@+---+name: frame-macos-notification+zh_name: "macOS 通知横幅"+en_name: "macOS Notification Banner"+emoji: "🔔"+description: "拟真 macOS 通知 banner + app icon + 标题正文, 适合 video overlay / 产品发布预告"+category: card+scenario: video+aspect_hint: "1920×1080 视频或 480×120 横幅"+featured: 41+tags: ["macos", "notification", "banner", "overlay", "frame"]+example_id: sample-frame-macos-notification+example_name: "macOS 通知 · 新功能发布"+example_format: markdown+example_tagline: "Big Sur 磨砂玻璃 banner"+example_desc: "App icon + 标题 + 双行正文, 视频角落叠加用"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · macos-notification"+---++【模板: macOS 通知横幅】+【意图】把一段公告 / 消息 / 提示渲染成 macOS Big Sur+ 风格的通知横幅, 适合视频角落叠加、产品发布预告、社媒图。Inspired by hyperframes macos-notification。++【画布】两种用法:+- 视频叠加 1920×1080, 通知放右上角, 周围透明。+- 单独 banner 480×120, 居中输出。++【横幅结构】+- 外框: 圆角 14px (macOS Big Sur 标准), 480×120 (或更长 480×180 含正文), 12-16px 内边距。+- 背景: **frosted glass** 效果 — `background: rgba(245,245,247,0.78)` + `backdrop-filter: blur(40px) saturate(180%)`; 暗色版 `rgba(28,28,30,0.78)`。+- 边框: 1px `rgba(0,0,0,0.06)` (light) / `rgba(255,255,255,0.08)` (dark); 顶部加 1px 亮 highlight `rgba(255,255,255,0.5)`。+- 阴影: `0 10px 40px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.08)`。++【内容】+- 左侧: **App icon** (44×44, 圆角 10px, CSS gradient + 1 个 emoji 或 monogram 字母, **不用外链图片**)。+- 中间:+ - 顶部 row: App 名 (SF Pro 13px, weight 600) + `now` 或具体时间 (12px, opacity 0.6) — 两端对齐。+ - 标题 (15px, weight 600, 1 行截断)。+ - 正文 (13px, weight 400, 1-2 行截断, line-height 1.35)。+- 右侧 (可选): action button "Open" 或 "Reply" (capsule, 浅灰底)。++【字体】+- 主: `SF Pro Text` → fallback `Inter` / `system-ui`; 中文用 `PingFang SC` / `Noto Sans SC`。++【可选附加】+- 多条通知堆叠: 第一条在前, 后面 2 条向后向下递缩 (scale 0.96 + opacity 0.6 + translateY)。+- 入场动效: 从屏幕外右侧滑入 `transform: translateX(110%)→0`, 200ms ease-out; 可被 `prefers-reduced-motion` 关闭。+- 右上角控制 chip "Clear" (hover 显示, opacity 默认 0)。++【设计细节】+- light mode 背景白磨砂, dark mode (推荐 video) 几乎黑磨砂。+- icon 不能用外链 emoji 图片, 用 unicode emoji 或 CSS 绘制几何。+- 必须用用户提供的内容; 标题 + 正文清晰来自用户输入。+- 单文件 HTML, 注意 `backdrop-filter` Safari 需要 `-webkit-` 前缀。diff --git a/src/lib/templates/skills/frame-macos-notification/example.html b/src/lib/templates/skills/frame-macos-notification/example.htmlnew file mode 100644index 00000000..f40a5ab4--- /dev/null+++ b/src/lib/templates/skills/frame-macos-notification/example.html@@ -0,0 +1,60 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>macOS Notification · 转换完成</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" />+<style>+ body {+ font-family: 'Inter','Noto Sans SC','PingFang SC',system-ui,sans-serif;+ background:+ linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%),+ radial-gradient(circle at 80% 20%, rgba(255,200,150,0.3) 0%, transparent 50%);+ background-blend-mode: screen;+ min-height: 100vh;+ }+ .frost {+ background: rgba(28,28,30,0.78);+ -webkit-backdrop-filter: blur(40px) saturate(180%);+ backdrop-filter: blur(40px) saturate(180%);+ border: 1px solid rgba(255,255,255,0.08);+ box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08);+ }+ @keyframes slideIn { from { transform: translateX(120%); opacity:0 } to { transform: translateX(0); opacity:1 } }+ .notif-1 { animation: slideIn .4s ease-out; }+ .notif-2 { transform: translateY(-12px) scale(0.96); opacity: 0.7; }+ .notif-3 { transform: translateY(-24px) scale(0.92); opacity: 0.4; }+</style>+</head>+<body class="flex flex-col items-end justify-start gap-3 p-12 text-white">+ <!-- top stacked notifs -->+ <div class="frost rounded-2xl w-[420px] p-3 flex gap-3 items-center notif-3">+ <div class="w-11 h-11 rounded-[10px] flex items-center justify-center text-xl" style="background:linear-gradient(135deg,#1DB954,#0d7a35)">🎵</div>+ <div class="flex-1 min-w-0">+ <div class="flex items-center justify-between"><span class="text-[13px] font-semibold">Spotify</span><span class="text-[11px] opacity-60">2m ago</span></div>+ <div class="text-[12.5px] truncate opacity-80">Now Playing — Lo-Fi Essentials</div>+ </div>+ </div>+ <div class="frost rounded-2xl w-[420px] p-3 flex gap-3 items-center notif-2">+ <div class="w-11 h-11 rounded-[10px] flex items-center justify-center text-xl" style="background:linear-gradient(135deg,#0f0f12,#2a2a35)">⌘</div>+ <div class="flex-1 min-w-0">+ <div class="flex items-center justify-between"><span class="text-[13px] font-semibold">Cursor</span><span class="text-[11px] opacity-60">1m ago</span></div>+ <div class="text-[12.5px] truncate opacity-80">同步完成 · 8 个文件已上传</div>+ </div>+ </div>+ <!-- main, in-focus notif -->+ <div class="frost rounded-2xl w-[420px] p-3 flex gap-3 items-center notif-1">+ <div class="w-11 h-11 rounded-[10px] flex items-center justify-center text-xl shrink-0" style="background:linear-gradient(135deg,#ff7849,#d97757)">H</div>+ <div class="flex-1 min-w-0">+ <div class="flex items-center justify-between">+ <span class="text-[13px] font-semibold">HTML Anything</span>+ <span class="text-[11px] opacity-60">now</span>+ </div>+ <div class="text-[14px] font-semibold leading-tight mt-0.5">转换完成 · 杂志风网页 PPT</div>+ <div class="text-[12.5px] opacity-80 leading-snug mt-0.5">31.2 KB · 12 帧 · 已在右侧预览面板渲染。点击复制为公众号 / 推特格式。</div>+ </div>+ <button class="text-[11px] font-semibold px-2.5 py-1 rounded-full ml-1 shrink-0" style="background:rgba(255,255,255,0.12)">Open</button>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/frame-macos-notification/example.md b/src/lib/templates/skills/frame-macos-notification/example.mdnew file mode 100644index 00000000..e29b7ff4--- /dev/null+++ b/src/lib/templates/skills/frame-macos-notification/example.md@@ -0,0 +1,8 @@+App: HTML Anything+Title: 转换完成+Body: 你的杂志风网页 PPT 已生成 · 31.2 KB · 视频中输出+Time: now++二级通知 (堆叠):+- Cursor · 同步完成 · 8 个文件已上传+- Spotify · 现在播放 Lo-Fi Essentialsdiff --git a/src/lib/templates/skills/gamified-app/SKILL.md b/src/lib/templates/skills/gamified-app/SKILL.mdnew file mode 100644index 00000000..10b0b3ef--- /dev/null+++ b/src/lib/templates/skills/gamified-app/SKILL.md@@ -0,0 +1,21 @@+---+name: gamified-app+zh_name: "游戏化 App 多屏"+en_name: "Gamified App"+emoji: "🕹️"+description: "三屏: 封面 / 今日任务带 XP / 任务详情, 暗色舞台"+category: mobile+scenario: personal+aspect_hint: "3 × iPhone"+featured: 12+tags: ["gamified", "habit", "rpg", "quest", "xp"]+---++【模板: 游戏化 App / Quest UI】+【意图】类 RPG 习惯养成 app, dark showcase stage 上三个 phone frame。+【布局】+- Frame 1: Cover / Poster+- Frame 2: Today's quests + XP ribbon + level bar+- Frame 3: Quest detail (子任务 + 奖励)+【设计细节】+- 醒目的 quest tile 渐变 + 等级 ribbon + 底部 tab bardiff --git a/src/lib/templates/skills/gamified-app/example.html b/src/lib/templates/skills/gamified-app/example.htmlnew file mode 100644index 00000000..089e60f5--- /dev/null+++ b/src/lib/templates/skills/gamified-app/example.html@@ -0,0 +1,292 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Level — daily quests for becoming a better human</title>+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />+ <style>+ :root {+ --stage: #0e0d0c;+ --stage-2: #1a1714;+ --paper: #ffffff;+ --ink: #1a1714;+ --muted: #6c6660;+ --line: #ebe6dd;+ --accent: #e98425;+ --accent-2: #ff6b3d;+ --tile-1: #ffe9bf;+ --tile-2: #ffe1d9;+ --tile-3: #f3e6ff;+ --tile-4: #d2eecb;+ --tile-5: #d6e7ff;+ --tile-6: #ffd6f1;+ --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;+ --sans: 'Inter', -apple-system, system-ui, sans-serif;+ --mono: 'IBM Plex Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ body {+ margin: 0;+ min-height: 100vh;+ background:+ radial-gradient(ellipse 80% 50% at 50% -10%, rgba(233,132,37,0.18), transparent 70%),+ radial-gradient(ellipse 70% 50% at 50% 110%, rgba(255,255,255,0.04), transparent 70%),+ var(--stage);+ color: #f5efe4;+ font: 14px/1.5 var(--sans);+ }++ .stage-bar {+ display: flex; justify-content: space-between; align-items: center;+ padding: 24px 36px;+ font: 11px/1 var(--mono);+ color: rgba(245,239,228,0.5);+ letter-spacing: 0.2em;+ text-transform: uppercase;+ }+ .stage-bar .word { font-family: var(--serif); font-style: italic; font-size: 22px; color: #f5efe4; letter-spacing: 0; text-transform: none; }++ .phones {+ display: flex; gap: 28px; justify-content: center; padding: 12px 32px 56px;+ flex-wrap: wrap;+ }+ .phone {+ width: 360px; height: 760px;+ background: #050403;+ border-radius: 56px;+ padding: 12px;+ box-shadow: 0 30px 60px rgba(0,0,0,0.45), inset 0 0 0 2px rgba(255,255,255,0.04);+ flex-shrink: 0;+ position: relative;+ }+ .phone::before {+ content: '';+ position: absolute; top: 22px; left: 50%; transform: translateX(-50%);+ width: 116px; height: 30px; background: #050403; border-radius: 999px; z-index: 5;+ }+ .screen { width: 100%; height: 100%; background: var(--paper); border-radius: 44px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }+ .status { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px 6px; font: 600 14px/1 var(--sans); }+ .status .right { display: flex; gap: 6px; align-items: center; font-size: 12px; }++ /* Phone 1 — cover */+ .cover { background: var(--ink); color: #fef9ee; height: 100%; display: flex; flex-direction: column; }+ .cover .status { color: #fef9ee; }+ .cover .body { flex: 1; padding: 40px 28px 0; display: flex; flex-direction: column; }+ .cover .eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 10.5px/1 var(--mono); letter-spacing: 0.18em; color: rgba(254,249,238,0.6); padding: 6px 9px; border: 1px solid rgba(254,249,238,0.22); border-radius: 999px; align-self: flex-start; margin-bottom: 26px; }+ .cover .eyebrow .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }+ .cover h1 { font: italic 800 56px/1 var(--serif); margin: 0 0 16px; letter-spacing: -0.005em; max-width: 12ch; }+ .cover h1 .accent { color: var(--accent); font-style: italic; }+ .cover p.lede { color: rgba(254,249,238,0.62); font-size: 14.5px; line-height: 1.55; margin: 0 0 18px; }+ .cover .tip { font: 11px/1.5 var(--mono); color: rgba(254,249,238,0.4); border-top: 1px dashed rgba(254,249,238,0.2); padding-top: 12px; }+ .cover .tip b { color: rgba(254,249,238,0.7); font-weight: 500; }+ .cover .next-peek { margin-top: auto; height: 92px; background: #211d18; border-top-left-radius: 26px; border-top-right-radius: 26px; padding: 14px 22px; display: flex; align-items: center; gap: 10px; color: rgba(254,249,238,0.6); font: 11px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }+ .cover .next-peek .swatch { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); flex-shrink: 0; }++ /* Phone 2 — quests dashboard */+ .home { display: flex; flex-direction: column; height: 100%; padding: 0; }+ .home .head { padding: 14px 22px 6px; display: flex; justify-content: space-between; align-items: center; }+ .home .head h2 { margin: 0; font: 700 18px/1.2 var(--sans); letter-spacing: -0.005em; }+ .home .head .bell { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,107,61,0.10); color: var(--accent-2); display: grid; place-items: center; font: 700 11px/1 var(--sans); }+ .level-ribbon {+ margin: 8px 14px 12px;+ padding: 12px 14px;+ background: linear-gradient(135deg, #1a1714 0%, #2b251f 100%);+ color: #f5efe4; border-radius: 16px;+ display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;+ }+ .level-ribbon .lv { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; font: 700 14px/1 var(--mono); color: #1a1714; }+ .level-ribbon .meta .label { font: 10px/1 var(--mono); letter-spacing: 0.16em; color: rgba(245,239,228,0.5); text-transform: uppercase; }+ .level-ribbon .meta .name { font: 700 14px/1.2 var(--sans); margin-top: 4px; }+ .level-ribbon .xp { font: 600 12px/1 var(--mono); color: rgba(245,239,228,0.7); }+ .level-ribbon .bar { grid-column: 1 / -1; height: 6px; background: rgba(245,239,228,0.10); border-radius: 999px; overflow: hidden; margin-top: 8px; }+ .level-ribbon .bar > span { display: block; width: 66%; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }++ .home .sub { padding: 0 22px 10px; font: 12.5px/1.4 var(--sans); color: var(--muted); display: flex; align-items: center; gap: 8px; }+ .home .sub .pill { font: 10.5px/1 var(--mono); padding: 4px 8px; border-radius: 999px; background: var(--ink); color: #f5efe4; letter-spacing: 0.06em; }++ .quests { padding: 4px 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow: hidden; }+ .q { border-radius: 18px; padding: 12px; min-height: 110px; position: relative; display: flex; flex-direction: column; gap: 6px; }+ .q .glyph { width: 28px; height: 28px; border-radius: 8px; background: rgba(0,0,0,0.10); color: var(--ink); display: grid; place-items: center; font: 700 13px/1 var(--sans); }+ .q .title { font: 700 13.5px/1.3 var(--sans); color: var(--ink); margin: 0; }+ .q .meta { font: 11px/1.4 var(--sans); color: var(--ink); opacity: 0.7; }+ .q .xp { position: absolute; bottom: 10px; right: 10px; font: 700 11px/1 var(--mono); padding: 4px 7px; border-radius: 999px; background: var(--ink); color: #f5efe4; letter-spacing: 0.06em; }+ .q.q1 { background: var(--tile-2); }+ .q.q1 .glyph { background: #ff7a52; color: white; }+ .q.q2 { background: var(--tile-1); }+ .q.q2 .glyph { background: #f0b54a; color: white; }+ .q.q3 { background: var(--tile-3); }+ .q.q3 .glyph { background: #b08bf2; color: white; }+ .q.q4 { background: var(--tile-4); }+ .q.q4 .glyph { background: #6cba5b; color: white; }+ .q.q5 { background: var(--tile-6); }+ .q.q5 .glyph { background: #e76aae; color: white; }+ .q.q6 { background: var(--tile-5); }+ .q.q6 .glyph { background: #4a86e9; color: white; }++ /* Phone 3 — quest detail */+ .detail { display: flex; flex-direction: column; height: 100%; }+ .detail .topbar { display: flex; align-items: center; gap: 10px; padding: 8px 22px 6px; font: 13px/1 var(--sans); color: var(--muted); }+ .detail .topbar .back { width: 28px; height: 28px; border-radius: 50%; background: var(--line); display: grid; place-items: center; }+ .hero { margin: 8px 14px 14px; padding: 22px 20px 24px; border-radius: 24px; background: linear-gradient(160deg, #ffd2bb 0%, #ff7a52 100%); color: var(--ink); position: relative; overflow: hidden; }+ .hero .badge { display: inline-flex; align-items: center; gap: 6px; font: 10.5px/1 var(--mono); padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,0.10); letter-spacing: 0.16em; text-transform: uppercase; }+ .hero h2 { font: italic 700 30px/1.05 var(--serif); margin: 12px 0 6px; max-width: 12ch; }+ .hero p { font: 14px/1.5 var(--sans); color: rgba(26,23,20,0.75); margin: 0; max-width: 30ch; }+ .hero .stamp { position: absolute; right: 18px; top: 18px; font: 700 11px/1 var(--mono); padding: 6px 8px; background: rgba(255,255,255,0.7); border-radius: 999px; color: var(--ink); letter-spacing: 0.08em; }++ .steps { padding: 4px 22px 12px; }+ .steps h3 { font: 700 11px/1 var(--mono); letter-spacing: 0.18em; color: var(--muted); margin: 12px 0 8px; text-transform: uppercase; }+ .step { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }+ .step .check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); flex-shrink: 0; display: grid; place-items: center; font: 700 11px/1 var(--sans); color: white; }+ .step.done .check { background: var(--accent); border-color: var(--accent); }+ .step.done .check::after { content: '✓'; }+ .step.done .name { color: var(--muted); text-decoration: line-through; }+ .step .name { font: 14px/1.3 var(--sans); }+ .step .meta { font: 11px/1 var(--mono); color: var(--muted); margin-left: auto; letter-spacing: 0.06em; }++ .detail .start {+ margin: auto 18px 12px; padding: 14px; border-radius: 999px;+ background: var(--ink); color: #f5efe4; text-align: center;+ font: 600 14px/1 var(--sans); letter-spacing: 0.06em;+ }++ /* Tab bar shared */+ .tabbar {+ margin-top: auto; display: grid; grid-template-columns: repeat(5, 1fr);+ padding: 10px 14px 26px; border-top: 1px solid var(--line); background: var(--paper);+ }+ .tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 9.5px/1 var(--mono); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }+ .tab .icon { width: 22px; height: 22px; border-radius: 6px; background: var(--line); }+ .tab.active { color: var(--accent); }+ .tab.active .icon { background: var(--accent); }+ .tab.center .icon { background: var(--ink); color: #f5efe4; display: grid; place-items: center; font: 700 16px/1 var(--sans); border-radius: 50%; }++ @media (max-width: 1180px) {+ .phones { gap: 18px; }+ .phone { width: 320px; height: 700px; }+ .cover h1 { font-size: 46px; }+ }+ </style>+</head>+<body>+ <div class="stage-bar" data-od-id="stage-bar">+ <span>HI-FI PROTOTYPE · IPHONE</span>+ <span class="word">level<span style="color:var(--accent);">.</span></span>+ <span>3 SCREENS · LIGHT MODE</span>+ </div>++ <div class="phones" data-od-id="phones">++ <!-- Phone 1 — cover -->+ <div class="phone" data-od-id="phone-cover">+ <div class="screen cover">+ <div class="status"><span>9:41</span><span class="right">·· 5G · 100%</span></div>+ <div class="body">+ <span class="eyebrow"><span class="dot"></span>HI-FI PROTOTYPE · IPHONE</span>+ <h1>Daily quests for <span class="accent">becoming</span> a better human.</h1>+ <p class="lede">Level turns the things you already know you should do — exercise, read, reflect, call a friend — into a daily quest log. Finish them, earn XP, watch your classes level up.</p>+ <p class="tip">Tap quests to open detail. Complete the 6th quest to trigger the level-up moment. Toggle <b>[theme]</b> in the toolbar to switch theme & layout.</p>+ <div class="next-peek"><div class="swatch"></div>NEXT — TODAY'S QUESTS</div>+ </div>+ </div>+ </div>++ <!-- Phone 2 — quests dashboard -->+ <div class="phone" data-od-id="phone-home">+ <div class="screen home">+ <div class="status"><span>9:41</span><span class="right">·· 5G · 100%</span></div>+ <div class="head">+ <h2>Good morning, Sam</h2>+ <div class="bell">×3</div>+ </div>+ <div class="level-ribbon" data-od-id="level-ribbon">+ <div class="lv">14</div>+ <div class="meta"><div class="label">LEVEL</div><div class="name">Level 14</div></div>+ <div class="xp">1648 / 2480</div>+ <div class="bar"><span></span></div>+ </div>+ <div class="sub">8 quests waiting · earn <span class="pill">430 XP</span> today</div>++ <div class="quests" data-od-id="quests">+ <div class="q q1">+ <div class="glyph">B</div>+ <p class="title">Body</p>+ <div class="meta">20-min strength: pushups & planks</div>+ <span class="xp">+90</span>+ </div>+ <div class="q q2">+ <div class="glyph">R</div>+ <p class="title">Read</p>+ <div class="meta">Four Thousand Weeks</div>+ <span class="xp">+60</span>+ </div>+ <div class="q q3">+ <div class="glyph">L</div>+ <p class="title">Listen</p>+ <div class="meta">Huberman Lab — Sleep Architecture</div>+ <span class="xp">+50</span>+ </div>+ <div class="q q4">+ <div class="glyph">N</div>+ <p class="title">Nourish</p>+ <div class="meta">Cook a high-protein lunch</div>+ <span class="xp">+70</span>+ </div>+ <div class="q q5">+ <div class="glyph">M</div>+ <p class="title">Mind</p>+ <div class="meta">10-min focus meditation</div>+ <span class="xp">+40</span>+ </div>+ <div class="q q6">+ <div class="glyph">W</div>+ <p class="title">Watch</p>+ <div class="meta">The Bear · S3 E4</div>+ <span class="xp">+30</span>+ </div>+ </div>++ <div class="tabbar" data-od-id="tabbar-home">+ <div class="tab active"><div class="icon"></div>Today</div>+ <div class="tab"><div class="icon"></div>Library</div>+ <div class="tab center"><div class="icon">+</div> </div>+ <div class="tab"><div class="icon"></div>Stats</div>+ <div class="tab"><div class="icon"></div>Profile</div>+ </div>+ </div>+ </div>++ <!-- Phone 3 — detail -->+ <div class="phone" data-od-id="phone-detail">+ <div class="screen detail">+ <div class="status"><span>9:41</span><span class="right">·· 5G · 100%</span></div>+ <div class="topbar"><div class="back">←</div>QUEST · 03 / 08</div>+ <div class="hero">+ <span class="stamp">+90 XP</span>+ <span class="badge">— BODY · STRENGTH</span>+ <h2>20 minutes that change Wednesday.</h2>+ <p>A short, repeatable strength block — pushups, planks, and one wildcard. No equipment. Sam, you've finished this 11 times this month.</p>+ </div>+ <div class="steps" data-od-id="steps">+ <h3>Today's micro-tasks</h3>+ <div class="step done"><div class="check"></div><div class="name">Roll out the mat</div><div class="meta">+5 XP</div></div>+ <div class="step"><div class="check"></div><div class="name">3 × 12 pushups</div><div class="meta">+30 XP</div></div>+ <div class="step"><div class="check"></div><div class="name">3 × 45s plank</div><div class="meta">+30 XP</div></div>+ <div class="step"><div class="check"></div><div class="name">Wildcard: lunges</div><div class="meta">+25 XP</div></div>+ </div>+ <div class="start">Start quest</div>+ <div class="tabbar" data-od-id="tabbar-detail">+ <div class="tab active"><div class="icon"></div>Today</div>+ <div class="tab"><div class="icon"></div>Library</div>+ <div class="tab center"><div class="icon">+</div> </div>+ <div class="tab"><div class="icon"></div>Stats</div>+ <div class="tab"><div class="icon"></div>Profile</div>+ </div>+ </div>+ </div>++ </div>+</body>+</html>diff --git a/src/lib/templates/skills/hr-onboarding/SKILL.md b/src/lib/templates/skills/hr-onboarding/SKILL.mdnew file mode 100644index 00000000..f0766fe6--- /dev/null+++ b/src/lib/templates/skills/hr-onboarding/SKILL.md@@ -0,0 +1,21 @@+---+name: hr-onboarding+zh_name: "新员工入职页"+en_name: "HR Onboarding"+emoji: "👋"+description: "首周日程 + buddy + 学习路径 + 设备 + 完成标准"+category: doc+scenario: hr+aspect_hint: "长页面"+tags: ["onboarding", "入职", "first week"]+---++【模板: 新员工入职】+【意图】新员工首周看一眼就知道怎么过的单页。+【布局】+- Welcome hero (姓名 + 入职日 + 团队)+- First-week schedule (5 天 timeline)+- Manager + Buddy 卡片+- Learning track 列表+- Equipment checklist+- “你设置好了当且仅当…” outcomes 区diff --git a/src/lib/templates/skills/hr-onboarding/example.html b/src/lib/templates/skills/hr-onboarding/example.htmlnew file mode 100644index 00000000..9fe31f7d--- /dev/null+++ b/src/lib/templates/skills/hr-onboarding/example.html@@ -0,0 +1,219 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Welcome to Northwind — Maya's Onboarding Plan</title>+<style>+ :root {+ --bg: #fbf9f4;+ --paper: #ffffff;+ --ink: #14110e;+ --muted: #6b6760;+ --line: #ece6d8;+ --accent: #c2521a;+ --accent-soft: #fbe6d6;+ --positive: #2c8a4f;+ --display: 'Georgia', 'Times New Roman', serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14.5px; line-height: 1.55; }+ .wrap { max-width: 1080px; margin: 28px auto; padding: 0 32px 64px; }++ /* Cover */+ .cover { padding: 36px 40px; background: var(--ink); color: var(--paper); border-radius: 16px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }+ .cover .eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-soft); }+ .cover h1 { font-family: var(--display); font-size: 38px; line-height: 1.05; letter-spacing: -0.01em; margin: 8px 0 12px; }+ .cover .meta { display: flex; gap: 28px; font-size: 13px; color: rgba(255,255,255,0.74); }+ .cover .meta strong { color: var(--paper); display: block; font-weight: 600; font-size: 14px; }+ .cover-art { width: 130px; height: 130px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ec8b5b); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 56px; color: var(--paper); }++ section { margin-top: 44px; }+ h2 { font-family: var(--display); font-size: 22px; margin: 0 0 6px; letter-spacing: -0.005em; }+ .section-sub { color: var(--muted); margin: 0 0 18px; font-size: 13.5px; }++ /* Day 1 */+ .day-one { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }+ .schedule { display: grid; grid-template-columns: 110px 1fr; gap: 0; }+ .schedule-row { display: contents; }+ .schedule-row .time { padding: 12px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }+ .schedule-row .item { padding: 12px 0; border-top: 1px solid var(--line); }+ .schedule-row:first-child .time, .schedule-row:first-child .item { border-top: none; }+ .schedule-row .item strong { display: block; font-weight: 600; }+ .schedule-row .item span { color: var(--muted); font-size: 13px; }++ /* Week timeline */+ .week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }+ .day { padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }+ .day-head { display: flex; justify-content: space-between; align-items: baseline; }+ .day-name { font-family: var(--display); font-size: 16px; font-weight: 700; }+ .day-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }+ .activity { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }+ .activity .dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }+ .activity small { display: block; color: var(--muted); margin-top: 2px; font-size: 11.5px; }++ /* 30/60/90 */+ .milestones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }+ .milestone { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }+ .milestone .badge { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); letter-spacing: 0.06em; margin-bottom: 10px; }+ .milestone h3 { font-family: var(--display); font-size: 18px; margin: 0 0 12px; }+ .milestone ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }+ .milestone li::marker { color: var(--accent); }++ /* Resources & checklist */+ .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }+ .panel { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }+ .panel h3 { font-family: var(--display); font-size: 17px; margin: 0 0 12px; }+ .resource { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; font-size: 13.5px; }+ .resource:first-of-type { border-top: none; padding-top: 0; }+ .resource .icon { width: 28px; height: 28px; background: var(--accent-soft); border-radius: 7px; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }+ .resource .meta { color: var(--muted); font-family: var(--mono); font-size: 11px; }+ .check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line); }+ .check:first-of-type { border-top: none; padding-top: 0; }+ .check .box { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: transparent; }+ .check.done .box { background: var(--positive); border-color: var(--positive); color: var(--paper); }+ .check strong { display: block; font-weight: 600; }+ .check span { color: var(--muted); font-size: 12.5px; }++ footer { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }++ @media (max-width: 900px) {+ .cover { grid-template-columns: 1fr; text-align: center; }+ .cover-art { margin: 0 auto; }+ .week { grid-template-columns: 1fr 1fr; }+ .milestones { grid-template-columns: 1fr; }+ .grid-2 { grid-template-columns: 1fr; }+ }+</style>+</head>+<body>+<div class="wrap">+ <div class="cover">+ <div>+ <div class="eyebrow">Onboarding plan · 30/60/90</div>+ <h1>Welcome, Maya. Let's make your first 90 days feel deliberate.</h1>+ <div class="meta">+ <div><strong>Role</strong>Product Designer · Growth squad</div>+ <div><strong>Start date</strong>Mon, 4 November 2025</div>+ <div><strong>Manager</strong>Alvaro Méndez</div>+ <div><strong>Onboarding buddy</strong>Sasha Lin</div>+ </div>+ </div>+ <div class="cover-art">M</div>+ </div>++ <section>+ <h2>Day 1 · Monday</h2>+ <p class="section-sub">A grounded day. Coffee with the team, a working laptop, and one shipped commit on the docs site by 5pm.</p>+ <div class="day-one">+ <div class="schedule">+ <div class="schedule-row"><div class="time">09:00</div><div class="item"><strong>Kickoff with Alvaro</strong><span>Welcome, week-one walkthrough, expectations chat. Office Room 3 (or Zoom).</span></div></div>+ <div class="schedule-row"><div class="time">10:00</div><div class="item"><strong>IT setup with Devon</strong><span>Laptop, badge, SSO, Slack, Figma, Linear, GitHub. Bring two photo IDs.</span></div></div>+ <div class="schedule-row"><div class="time">11:30</div><div class="item"><strong>Coffee with Sasha (buddy)</strong><span>The unwritten rules, who-to-ask map, where the good lunch spots are.</span></div></div>+ <div class="schedule-row"><div class="time">12:30</div><div class="item"><strong>Team lunch · Northwind cafeteria</strong><span>Whole Growth squad joins. No agenda.</span></div></div>+ <div class="schedule-row"><div class="time">14:00</div><div class="item"><strong>Read & explore</strong><span>Handbook, last quarter's design crit recordings, Figma library.</span></div></div>+ <div class="schedule-row"><div class="time">16:00</div><div class="item"><strong>Ship "I exist" PR</strong><span>Add yourself to the team page on the docs site. Counts as your first commit.</span></div></div>+ <div class="schedule-row"><div class="time">17:00</div><div class="item"><strong>End-of-day check-in with Alvaro</strong><span>15 min. What was confusing, what wasn't. Repeat tomorrow if useful.</span></div></div>+ </div>+ </div>+ </section>++ <section>+ <h2>First week timeline</h2>+ <p class="section-sub">Two activities per day. Anything else is bonus.</p>+ <div class="week">+ <div class="day">+ <div class="day-head"><div class="day-name">Mon</div><div class="day-date">Nov 4</div></div>+ <div class="activity"><span class="dot"></span><div><strong>Kickoff + setup</strong><small>Alvaro · 09:00</small></div></div>+ <div class="activity"><span class="dot"></span><div><strong>Ship team-page PR</strong><small>Sasha can review</small></div></div>+ </div>+ <div class="day">+ <div class="day-head"><div class="day-name">Tue</div><div class="day-date">Nov 5</div></div>+ <div class="activity"><span class="dot"></span><div><strong>Design system tour</strong><small>Yuko · 10:00</small></div></div>+ <div class="activity"><span class="dot"></span><div><strong>Shadow user research call</strong><small>11:00 with Sam</small></div></div>+ </div>+ <div class="day">+ <div class="day-head"><div class="day-name">Wed</div><div class="day-date">Nov 6</div></div>+ <div class="activity"><span class="dot"></span><div><strong>Squad weekly</strong><small>09:30</small></div></div>+ <div class="activity"><span class="dot"></span><div><strong>Pick a starter ticket</strong><small>From the "good first issues" lane</small></div></div>+ </div>+ <div class="day">+ <div class="day-head"><div class="day-name">Thu</div><div class="day-date">Nov 7</div></div>+ <div class="activity"><span class="dot"></span><div><strong>Design crit attendance</strong><small>14:00. Just listen.</small></div></div>+ <div class="activity"><span class="dot"></span><div><strong>1:1 with skip-level</strong><small>Avi · 16:00</small></div></div>+ </div>+ <div class="day">+ <div class="day-head"><div class="day-name">Fri</div><div class="day-date">Nov 8</div></div>+ <div class="activity"><span class="dot"></span><div><strong>End-of-week retro</strong><small>15-min note to Alvaro</small></div></div>+ <div class="activity"><span class="dot"></span><div><strong>Optional: All-hands demo</strong><small>17:00 · drinks after</small></div></div>+ </div>+ </div>+ </section>++ <section>+ <h2>30 · 60 · 90 day milestones</h2>+ <p class="section-sub">Three outcomes per checkpoint. We'll review each at the matching 1:1 with Alvaro.</p>+ <div class="milestones">+ <div class="milestone">+ <span class="badge">Day 30</span>+ <h3>Find your footing</h3>+ <ul>+ <li>Shipped one small, end-to-end design change to production.</li>+ <li>Mapped every recurring meeting and why it exists.</li>+ <li>Met with each cross-functional partner (eng, PM, research, marketing).</li>+ </ul>+ </div>+ <div class="milestone">+ <span class="badge">Day 60</span>+ <h3>Own a feature</h3>+ <ul>+ <li>Driving design on the new onboarding redesign — own the spec.</li>+ <li>Ran your first design crit as the presenter.</li>+ <li>Drafted one process improvement and posted it for the team.</li>+ </ul>+ </div>+ <div class="milestone">+ <span class="badge">Day 90</span>+ <h3>Move the team forward</h3>+ <ul>+ <li>Shipped a feature you led from research → launch.</li>+ <li>Mentored someone — even informally.</li>+ <li>Shared one hot take in all-hands and lived to tell.</li>+ </ul>+ </div>+ </div>+ </section>++ <section>+ <h2>Things to bookmark</h2>+ <p class="section-sub">Open these, save them in your browser, then forget about this page.</p>+ <div class="grid-2">+ <div class="panel">+ <h3>Resources</h3>+ <div class="resource"><div class="icon">📘</div><div><strong>Northwind Handbook</strong></div><div class="meta">handbook.nw</div></div>+ <div class="resource"><div class="icon">💬</div><div><strong>#growth-squad</strong></div><div class="meta">Slack</div></div>+ <div class="resource"><div class="icon">🎨</div><div><strong>Design Library v3.4</strong></div><div class="meta">Figma</div></div>+ <div class="resource"><div class="icon">📊</div><div><strong>Growth dashboard</strong></div><div class="meta">grafana.nw</div></div>+ <div class="resource"><div class="icon">💸</div><div><strong>Payroll & benefits</strong></div><div class="meta">Rippling</div></div>+ <div class="resource"><div class="icon">📅</div><div><strong>Onboarding calendar</strong></div><div class="meta">cal.nw/onboard</div></div>+ </div>+ <div class="panel">+ <h3>You're set when…</h3>+ <div class="check done"><div class="box">✓</div><div><strong>Laptop, SSO, and badge work end-to-end.</strong><span>Includes Slack, Figma, Linear, GitHub, 1Password.</span></div></div>+ <div class="check done"><div class="box">✓</div><div><strong>You've met everyone on the squad.</strong><span>Coffee, walk, or 15-min Zoom — your call.</span></div></div>+ <div class="check"><div class="box"></div><div><strong>You've shipped your first PR.</strong><span>Even tiny ones count. Sasha will help.</span></div></div>+ <div class="check"><div class="box"></div><div><strong>You can find any meeting on the calendar.</strong><span>And know which ones you can decline.</span></div></div>+ <div class="check"><div class="box"></div><div><strong>You feel comfortable asking dumb questions.</strong><span>This is the most important one. We mean it.</span></div></div>+ </div>+ </div>+ </section>++ <footer>+ <span>Northwind People Ops · Onboarding plan template v3.1</span>+ <span>Updated October 2025</span>+ </footer>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/invoice/SKILL.md b/src/lib/templates/skills/invoice/SKILL.mdnew file mode 100644index 00000000..06a30ddd--- /dev/null+++ b/src/lib/templates/skills/invoice/SKILL.md@@ -0,0 +1,23 @@+---+name: invoice+zh_name: "可打印发票"+en_name: "Printable Invoice"+emoji: "🧾"+description: "标准发票: 寄件/收件 + 明细 + 税 + 总额 + 付款指引"+category: finance+scenario: finance+aspect_hint: "A4"+recommended: 13+tags: ["invoice", "bill", "发票"]+---++【模板: 可打印发票】+【意图】A4 可打印的发票单页。+【布局】+- Header: 发票号 / 日期 / 截止日+- From / Bill to 两块+- Line items table (描述 / 数量 / 单价 / 金额)+- Tax breakdown + Totals (右对齐)+- Payment instructions 区+【设计细节】+- @media print 样式; 颜色对比保留diff --git a/src/lib/templates/skills/invoice/example.html b/src/lib/templates/skills/invoice/example.htmlnew file mode 100644index 00000000..9e6748b0--- /dev/null+++ b/src/lib/templates/skills/invoice/example.html@@ -0,0 +1,214 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Invoice · Sable Studio · INV-2025-0142</title>+<style>+ :root {+ --bg: #f3f1ec;+ --paper: #ffffff;+ --ink: #15140f;+ --muted: #6e6a5d;+ --line: #ddd6c4;+ --accent: #1f4d3a;+ --accent-soft: #e3ece8;+ --display: 'Iowan Old Style', 'Charter', Georgia, serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.55; }+ .sheet { max-width: 820px; margin: 32px auto; background: var(--paper); padding: 64px 72px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 24px 60px rgba(28,27,26,0.06); }++ header.brandbar { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: flex-start; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }+ .brand { display: flex; align-items: center; gap: 14px; }+ .brand-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; font-weight: 700; }+ .brand-name { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.005em; }+ .brand-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }+ .invoice-block { text-align: right; }+ .invoice-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }+ .invoice-num { font-family: var(--display); font-size: 32px; letter-spacing: -0.01em; font-weight: 700; margin: 6px 0 4px; }+ .invoice-dates { font-size: 13px; color: var(--muted); }+ .invoice-dates strong { color: var(--ink); }++ .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 28px 0; }+ .party h4 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 8px; font-weight: 500; }+ .party .name { font-family: var(--display); font-size: 18px; font-weight: 700; margin-bottom: 4px; }+ .party .lines { font-size: 13.5px; color: var(--muted); line-height: 1.6; }+ .party .lines a { color: var(--accent); text-decoration: none; }++ .ref-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 16px 22px; background: var(--accent-soft); border-radius: 6px; margin-bottom: 32px; }+ .ref-strip .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 4px; font-weight: 500; }+ .ref-strip .value { font-size: 14px; }++ table { width: 100%; border-collapse: collapse; }+ thead th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--ink); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }+ tbody td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }+ td.desc strong { display: block; font-weight: 600; margin-bottom: 4px; }+ td.desc small { display: block; color: var(--muted); font-size: 12.5px; }+ td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13.5px; }+ th.num { text-align: right; }++ .totals { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 28px; align-items: flex-start; }+ .terms { font-size: 12.5px; color: var(--muted); padding: 18px 20px; background: var(--bg); border-radius: 6px; }+ .terms h5 { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); margin: 0 0 6px; font-weight: 500; }+ .totals-block { display: flex; flex-direction: column; gap: 8px; }+ .total-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }+ .total-row.subtotal { border-top: 1px solid var(--line); padding-top: 14px; }+ .total-row.discount { color: var(--accent); }+ .total-row.tax { color: var(--muted); }+ .total-row.grand { padding: 14px 18px; background: var(--ink); color: var(--paper); border-radius: 6px; margin-top: 6px; font-family: var(--display); font-size: 20px; font-weight: 700; align-items: center; }++ .pay { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; }+ .pay h4 { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 500; }+ .pay .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }+ .pay .row span { font-family: var(--mono); }++ .signoff { margin-top: 40px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }+ .signoff p { margin: 0; font-family: var(--display); font-size: 16px; font-style: italic; color: var(--muted); }+ .signature { text-align: right; }+ .signature .scribble { font-family: 'Brush Script MT', 'Snell Roundhand', cursive; font-size: 28px; color: var(--accent); }+ .signature .name { font-size: 12.5px; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }++ @media print {+ body { background: white; }+ .sheet { box-shadow: none; border: none; margin: 0; padding: 32px 36px; }+ }+ @media (max-width: 720px) {+ .sheet { padding: 32px 24px; margin: 0; border-radius: 0; }+ .parties, .pay, .signoff { grid-template-columns: 1fr; }+ .totals { grid-template-columns: 1fr; }+ .ref-strip { grid-template-columns: 1fr; }+ header.brandbar { grid-template-columns: 1fr; }+ .invoice-block { text-align: left; }+ }+</style>+</head>+<body>+<div class="sheet">+ <header class="brandbar">+ <div>+ <div class="brand">+ <div class="brand-mark">S</div>+ <div>+ <div class="brand-name">Sable Studio</div>+ <div class="brand-meta">Brand & product design · est. 2018</div>+ </div>+ </div>+ </div>+ <div class="invoice-block">+ <div class="invoice-label">Invoice</div>+ <div class="invoice-num">INV-2025-0142</div>+ <div class="invoice-dates"><strong>Issued</strong> 14 October 2025 · <strong>Due</strong> 13 November 2025</div>+ </div>+ </header>++ <section class="parties">+ <div class="party">+ <h4>From</h4>+ <div class="name">Sable Studio LLC</div>+ <div class="lines">+ 221 Cooper Street, 4F<br>+ Brooklyn, NY 11211 · USA<br>+ EIN 87-1234567<br>+ <a href="mailto:[email protected]">[email protected]</a>+ </div>+ </div>+ <div class="party">+ <h4>Bill to</h4>+ <div class="name">Northwind Trading Co.</div>+ <div class="lines">+ Attn: Mira Okafor, CFO<br>+ 500 Howard Street, Floor 9<br>+ San Francisco, CA 94103 · USA<br>+ AP: <a href="mailto:[email protected]">[email protected]</a>+ </div>+ </div>+ </section>++ <div class="ref-strip">+ <div><div class="label">Project</div><div class="value">Northwind brand identity refresh</div></div>+ <div><div class="label">PO Number</div><div class="value">NW-PO-2025-3387</div></div>+ <div><div class="label">Terms</div><div class="value">Net 30 · USD</div></div>+ </div>++ <table>+ <thead>+ <tr>+ <th>Description</th>+ <th class="num">Qty</th>+ <th class="num">Rate</th>+ <th class="num">Amount</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td class="desc"><strong>Discovery & strategy</strong><small>Stakeholder interviews, competitive audit, brand audit, written strategy doc.</small></td>+ <td class="num">1</td>+ <td class="num">$8,500.00</td>+ <td class="num">$8,500.00</td>+ </tr>+ <tr>+ <td class="desc"><strong>Identity system design</strong><small>Wordmark, monogram, palette, typography, motion principles, two production rounds.</small></td>+ <td class="num">1</td>+ <td class="num">$22,000.00</td>+ <td class="num">$22,000.00</td>+ </tr>+ <tr>+ <td class="desc"><strong>Brand guidelines & handoff</strong><small>Brand book PDF, Figma library, asset pack, two team handoff sessions.</small></td>+ <td class="num">1</td>+ <td class="num">$6,500.00</td>+ <td class="num">$6,500.00</td>+ </tr>+ <tr>+ <td class="desc"><strong>Senior design hours · overage</strong><small>Additional rounds requested between 12 Sep and 28 Sep beyond the original SOW.</small></td>+ <td class="num">14</td>+ <td class="num">$220.00</td>+ <td class="num">$3,080.00</td>+ </tr>+ </tbody>+ </table>++ <div class="totals">+ <div class="terms">+ <h5>Payment terms</h5>+ Payment is due within 30 days of issue. Late payments incur a 1.5% monthly service charge per the master services agreement signed 14 February 2025. The 10% retainer paid 12 August 2025 has been applied below.+ </div>+ <div class="totals-block">+ <div class="total-row"><span>Subtotal</span><span>$40,080.00</span></div>+ <div class="total-row discount"><span>Retainer applied (10%)</span><span>−$4,008.00</span></div>+ <div class="total-row tax"><span>Sales tax · NY (9%)</span><span>$3,246.48</span></div>+ <div class="total-row subtotal"><span>Net before tax</span><span>$36,072.00</span></div>+ <div class="total-row grand"><span>Total due</span><span>$39,318.48</span></div>+ </div>+ </div>++ <div class="pay">+ <div>+ <h4>Wire / ACH (USD)</h4>+ <div class="row"><span>Bank</span><span>Mercury Bank</span></div>+ <div class="row"><span>Routing (ACH)</span><span>084-001-122</span></div>+ <div class="row"><span>Routing (Wire)</span><span>026-073-150</span></div>+ <div class="row"><span>Account</span><span>9847-2210-3318</span></div>+ <div class="row"><span>Memo</span><span>INV-2025-0142</span></div>+ </div>+ <div>+ <h4>Online payment</h4>+ <div class="row"><span>Pay link</span><span>sable.studio/p/inv-0142</span></div>+ <div class="row"><span>Stripe / card / ACH</span><span>Yes</span></div>+ <div class="row"><span>Wise / SEPA / FX</span><span>On request</span></div>+ <div class="row"><span>Receipt</span><span>Auto-emailed</span></div>+ </div>+ </div>++ <div class="signoff">+ <p>Thank you, Northwind. It's been a privilege to work on this rebrand.</p>+ <div class="signature">+ <div class="scribble">Lila Vega</div>+ <div class="name">Lila Vega · Founder, Sable Studio</div>+ </div>+ </div>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/kanban-board/SKILL.md b/src/lib/templates/skills/kanban-board/SKILL.mdnew file mode 100644index 00000000..babfa37d--- /dev/null+++ b/src/lib/templates/skills/kanban-board/SKILL.md@@ -0,0 +1,21 @@+---+name: kanban-board+zh_name: "看板 / Kanban"+en_name: "Kanban Board"+emoji: "📌"+description: "To do / In progress / In review / Done 四列, 卡片 + 头像 + 泳道"+category: dashboard+scenario: operations+aspect_hint: "桌面 1440"+tags: ["kanban", "trello", "sprint", "看板"]+---++【模板: Kanban 看板】+【意图】类 Trello 的 Kanban 单页。+【布局】+- 顶部 filter bar (assignee / label / search)+- 4 列: To do / In progress / In review / Done+- 卡片含: 标题 / labels / due / avatar / 评论数+- 可选 swimlanes (按 epic / assignee 分组)+【设计细节】+- 不需要真 drag, 但视觉上要像可拖diff --git a/src/lib/templates/skills/kanban-board/example.html b/src/lib/templates/skills/kanban-board/example.htmlnew file mode 100644index 00000000..e4416d32--- /dev/null+++ b/src/lib/templates/skills/kanban-board/example.html@@ -0,0 +1,270 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Growth Squad · Sprint 38 Board</title>+<style>+ :root {+ --bg: #f7f7f9;+ --paper: #ffffff;+ --ink: #1a1d29;+ --muted: #5e6478;+ --line: #e5e7ee;+ --line-strong: #c8cdd9;+ --accent: #5b3df0;+ --accent-soft: #ece8ff;+ --pink: #d6336c;+ --teal: #1a8e8e;+ --amber: #b58522;+ --green: #2c8a4f;+ --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 13.5px; line-height: 1.5; }+ .app { display: grid; grid-template-columns: 1fr 280px; min-height: 100vh; }+ main { padding: 18px 22px 32px; min-width: 0; }+ aside.sidebar { padding: 22px 24px; border-left: 1px solid var(--line); background: var(--paper); }++ /* Topbar */+ .topbar { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; }+ .crumb { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }+ .sprint-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 11.5px; }+ .sprint-chip .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }+ .topbar-spacer { flex: 1; }+ .topbar input.search { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; max-width: 220px; background: var(--paper); }+ .icon-btn { padding: 6px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; cursor: pointer; color: var(--muted); }++ .filterbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }+ .filter-label { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 6px; }+ .chip-row { display: flex; gap: 6px; }+ .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); cursor: pointer; }+ .chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }+ .chip .av { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #a991ff); display: inline-block; }+ .filterbar .spacer { flex: 1; }+ .members { display: flex; }+ .members .av { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--paper); margin-left: -8px; font-size: 10.5px; font-weight: 700; color: white; display: inline-flex; align-items: center; justify-content: center; }+ .members .av:first-child { margin-left: 0; }++ /* Board */+ .board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: flex-start; }+ .col { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 460px; display: flex; flex-direction: column; gap: 10px; }+ .col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 8px; border-bottom: 1px dashed var(--line); }+ .col-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }+ .col-name .swatch { width: 8px; height: 8px; border-radius: 50%; }+ .swatch.gray { background: var(--line-strong); }+ .swatch.violet { background: var(--accent); }+ .swatch.amber { background: var(--amber); }+ .swatch.green { background: var(--green); }+ .col-count { font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding: 2px 6px; background: var(--bg); border-radius: 999px; }++ /* Cards */+ .card { padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; cursor: grab; transition: border-color 0.15s, box-shadow 0.15s; }+ .card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(91,61,240,0.06); }+ .card-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }+ .tag-bug { background: rgba(214,51,108,0.12); color: var(--pink); }+ .tag-feat { background: rgba(91,61,240,0.12); color: var(--accent); }+ .tag-design { background: rgba(26,142,142,0.12); color: var(--teal); }+ .tag-chore { background: rgba(94,100,120,0.12); color: var(--muted); }+ .tag-research { background: rgba(181,133,34,0.12); color: var(--amber); }+ .card-title { font-size: 13.5px; font-weight: 500; line-height: 1.4; }+ .card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); }+ .card-meta .left { display: flex; gap: 8px; align-items: center; }+ .av-sm { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #a991ff); color: white; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }+ .av-mira { background: linear-gradient(135deg, #d6336c, #ff7a9b); }+ .av-cale { background: linear-gradient(135deg, #1a8e8e, #56c1c1); }+ .av-pri { background: linear-gradient(135deg, #b58522, #f1b13a); }+ .av-dev { background: linear-gradient(135deg, #2c8a4f, #66c285); }+ .pts { font-family: var(--mono); padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 10.5px; color: var(--muted); }+ .progress { height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; }+ .progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }+ .add-card { padding: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; text-align: center; color: var(--muted); font-size: 12px; cursor: pointer; }+ .add-card:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }++ /* Sidebar */+ aside h4 { font-family: var(--display); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }+ .pulse { display: flex; flex-direction: column; gap: 14px; }+ .pulse-stat { display: flex; justify-content: space-between; font-size: 13px; }+ .pulse-stat strong { font-family: var(--mono); }+ .pulse-bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }+ .pulse-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #a991ff); border-radius: 999px; }+ .top-list { display: flex; flex-direction: column; gap: 10px; }+ .top-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }+ .pill-block { padding: 16px; border-radius: 10px; background: rgba(214,51,108,0.07); border: 1px solid rgba(214,51,108,0.2); }+ .pill-block strong { color: var(--pink); }++ @media (max-width: 1180px) {+ .app { grid-template-columns: 1fr; }+ aside.sidebar { border-left: none; border-top: 1px solid var(--line); }+ .board { grid-template-columns: 1fr 1fr; }+ }+ @media (max-width: 720px) { .board { grid-template-columns: 1fr; } }+</style>+</head>+<body>+<div class="app">+ <main>+ <div class="topbar">+ <span class="crumb">Northwind / Growth squad</span>+ <span class="sprint-chip"><span class="dot"></span>Sprint 38 · Day 6 of 10</span>+ <div class="topbar-spacer"></div>+ <input class="search" placeholder="Search tickets…" />+ <button class="icon-btn">⌘ Filter</button>+ <button class="icon-btn">+ New</button>+ </div>++ <div class="filterbar">+ <span class="filter-label">Members</span>+ <div class="members">+ <span class="av av-mira">MR</span>+ <span class="av av-cale">CA</span>+ <span class="av av-pri">PB</span>+ <span class="av av-dev">DP</span>+ <span class="av" style="background: #c8cdd9; color: #5e6478;">+1</span>+ </div>+ <span class="filter-label" style="margin-left: 18px;">Labels</span>+ <div class="chip-row">+ <span class="chip active">Active sprint</span>+ <span class="chip">Bug</span>+ <span class="chip">Feature</span>+ <span class="chip">Research</span>+ </div>+ <div class="spacer"></div>+ <span class="chip">Group · Status</span>+ <span class="chip">Sort · Priority</span>+ </div>++ <div class="board">+ <div class="col">+ <div class="col-head"><div class="col-name"><span class="swatch gray"></span>Backlog</div><span class="col-count">5</span></div>+ <div class="card">+ <span class="card-tag tag-feat">Feature</span>+ <div class="card-title">Add empty-state illustration to onboarding step 2</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-dev">DP</span><span class="pts">3 pts</span></div><span>NW-241</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-design">Design</span>+ <div class="card-title">Refresh notification settings page tokens</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-mira">MR</span><span class="pts">2 pts</span></div><span>NW-237</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-research">Research</span>+ <div class="card-title">Interview 5 new Enterprise admins about 2FA enforcement</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-pri">PB</span><span class="pts">5 pts</span></div><span>NW-225</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-chore">Chore</span>+ <div class="card-title">Migrate legacy auth logs to new schema</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-cale">CA</span><span class="pts">3 pts</span></div><span>NW-219</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-bug">Bug</span>+ <div class="card-title">CSV export drops emoji from project names</div>+ <div class="card-meta"><div class="left"><span class="av-sm">+</span><span class="pts">1 pt</span></div><span>NW-244</span></div>+ </div>+ <div class="add-card">+ New card</div>+ </div>++ <div class="col">+ <div class="col-head"><div class="col-name"><span class="swatch violet"></span>In progress</div><span class="col-count">4</span></div>+ <div class="card">+ <span class="card-tag tag-feat">Feature</span>+ <div class="card-title">TOTP enrollment UI in member settings</div>+ <div class="progress"><span style="width: 70%"></span></div>+ <div class="card-meta"><div class="left"><span class="av-sm av-dev">DP</span><span class="pts">5 pts</span></div><span>NW-201</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-feat">Feature</span>+ <div class="card-title">Recovery codes — generate, download, regenerate</div>+ <div class="progress"><span style="width: 45%"></span></div>+ <div class="card-meta"><div class="left"><span class="av-sm av-pri">PB</span><span class="pts">3 pts</span></div><span>NW-202</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-bug">Bug</span>+ <div class="card-title">Fix focus-trap regression in command bar</div>+ <div class="progress"><span style="width: 80%"></span></div>+ <div class="card-meta"><div class="left"><span class="av-sm av-cale">CA</span><span class="pts">2 pts</span></div><span>NW-238</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-design">Design</span>+ <div class="card-title">2FA challenge step — visual + microcopy</div>+ <div class="progress"><span style="width: 30%"></span></div>+ <div class="card-meta"><div class="left"><span class="av-sm av-mira">MR</span><span class="pts">3 pts</span></div><span>NW-205</span></div>+ </div>+ </div>++ <div class="col">+ <div class="col-head"><div class="col-name"><span class="swatch amber"></span>In review</div><span class="col-count">3</span></div>+ <div class="card">+ <span class="card-tag tag-feat">Feature</span>+ <div class="card-title">Audit-log entries for 2FA setup events</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-pri">PB</span><span class="pts">2 pts</span></div><span>NW-198</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-design">Design</span>+ <div class="card-title">Settings nav restructure (left rail)</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-mira">MR</span><span class="pts">3 pts</span></div><span>NW-189</span></div>+ </div>+ <div class="card">+ <span class="card-tag tag-bug">Bug</span>+ <div class="card-title">Workspace switcher resets scroll on close</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-cale">CA</span><span class="pts">1 pt</span></div><span>NW-233</span></div>+ </div>+ </div>++ <div class="col">+ <div class="col-head"><div class="col-name"><span class="swatch green"></span>Done</div><span class="col-count">6</span></div>+ <div class="card" style="opacity: 0.85;">+ <span class="card-tag tag-feat">Feature</span>+ <div class="card-title">Workspace 2FA enforcement policy (admin)</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-dev">DP</span><span class="pts">5 pts</span></div><span>NW-181</span></div>+ </div>+ <div class="card" style="opacity: 0.85;">+ <span class="card-tag tag-chore">Chore</span>+ <div class="card-title">Bump auth library to 4.2.0</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-cale">CA</span><span class="pts">1 pt</span></div><span>NW-176</span></div>+ </div>+ <div class="card" style="opacity: 0.85;">+ <span class="card-tag tag-research">Research</span>+ <div class="card-title">2FA usability sessions (n=8)</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-pri">PB</span><span class="pts">3 pts</span></div><span>NW-172</span></div>+ </div>+ <div class="card" style="opacity: 0.85;">+ <span class="card-tag tag-design">Design</span>+ <div class="card-title">Settings tokens audit</div>+ <div class="card-meta"><div class="left"><span class="av-sm av-mira">MR</span><span class="pts">2 pts</span></div><span>NW-168</span></div>+ </div>+ </div>+ </div>+ </main>++ <aside class="sidebar">+ <div class="pulse">+ <div>+ <h4>Sprint pulse</h4>+ <div class="pulse-stat"><span>Completed</span><strong>22 of 38 pts</strong></div>+ <div class="pulse-bar" style="margin-top: 6px;"><span style="width: 58%"></span></div>+ </div>+ <div>+ <h4>Top contributors</h4>+ <div class="top-list">+ <div class="top-row"><span class="av-sm av-dev">DP</span><span>Devon Park</span><strong>9 pts</strong></div>+ <div class="top-row"><span class="av-sm av-mira">MR</span><span>Mira Reddy</span><strong>5 pts</strong></div>+ <div class="top-row"><span class="av-sm av-pri">PB</span><span>Priya Banerjee</span><strong>5 pts</strong></div>+ <div class="top-row"><span class="av-sm av-cale">CA</span><span>Caleb Renner</span><strong>3 pts</strong></div>+ </div>+ </div>+ <div>+ <h4>Blocked</h4>+ <div class="pill-block">+ <strong>1 ticket needs unblock.</strong>+ <p style="margin: 6px 0 0; color: var(--muted); font-size: 12.5px;">NW-205 (2FA challenge design) is waiting on a copy review from Brand. Mention @Sasha or move it back to backlog.</p>+ </div>+ </div>+ </div>+ </aside>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/live-dashboard/SKILL.md b/src/lib/templates/skills/live-dashboard/SKILL.mdnew file mode 100644index 00000000..bdd508e3--- /dev/null+++ b/src/lib/templates/skills/live-dashboard/SKILL.md@@ -0,0 +1,23 @@+---+name: live-dashboard+zh_name: "Notion 风团队仪表板"+en_name: "Live Team Dashboard"+emoji: "📈"+description: "Notion 风团队仪表板, KPI + 7 日 sparkline + activity feed + 任务表"+category: dashboard+scenario: operations+aspect_hint: "桌面长页"+featured: 1+tags: ["notion", "team", "live", "dashboard"]+---++【模板: Live Team Dashboard】+【意图】Notion 风的团队动态总览, 即使没有数据源也用 seed 数据兜底。+【布局】+- Header (团队 + 时间窗)+- KPI 卡片网格+- 7 天 sparkline 趋势+- Real-time activity feed (avatar + 动作 + 时间)+- Linked database task table (zebra + 状态 pill)+【设计细节】+- Notion-callout / toggle / 数据库表配色风格diff --git a/src/lib/templates/skills/live-dashboard/example.html b/src/lib/templates/skills/live-dashboard/example.htmlnew file mode 100644index 00000000..227d72f6--- /dev/null+++ b/src/lib/templates/skills/live-dashboard/example.html@@ -0,0 +1,946 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Acme · Team Dashboard</title>+<style>+ :root {+ --bg: #ffffff;+ --bg-soft: #f7f6f3;+ --bg-hover: #efeeec;+ --ink: #37352f;+ --ink-2: #787774;+ --ink-3: #9b9a97;+ --line: #ececea;+ --line-strong: #d3d1cb;+ --accent: #2eaadc;+ --accent-ink: #0b6e91;+ --pill-done-bg: #dbeddb; --pill-done-ink: #2b593f;+ --pill-progress-bg: #fdecc8; --pill-progress-ink: #976d23;+ --pill-blocked-bg: #ffe2dd; --pill-blocked-ink: #b13b2c;+ --pill-todo-bg: #e9e5e3; --pill-todo-ink: #5a534f;+ --pill-review-bg: #d3e5ef; --pill-review-ink: #1f5b78;+ --shadow-card: 0 1px 0 rgba(15,15,15,0.04), 0 1px 2px rgba(15,15,15,0.04);+ --radius-sm: 4px;+ --radius-md: 6px;+ --radius-lg: 10px;+ }+ * { box-sizing: border-box; }+ html, body {+ margin: 0; padding: 0;+ background: var(--bg);+ color: var(--ink);+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",+ "Noto Sans", "PingFang SC", "Hiragino Sans GB", sans-serif;+ font-size: 14px;+ line-height: 1.5;+ -webkit-font-smoothing: antialiased;+ }+ a { color: inherit; text-decoration: none; }++ /* ---------- App shell ---------- */+ .app {+ display: grid;+ grid-template-columns: 240px 1fr;+ min-height: 100vh;+ }++ /* ---------- Sidebar ---------- */+ .side {+ background: var(--bg-soft);+ border-right: 1px solid var(--line);+ padding: 14px 8px;+ user-select: none;+ }+ .ws {+ display: flex; align-items: center; gap: 8px;+ padding: 6px 8px; border-radius: var(--radius-sm);+ cursor: pointer;+ }+ .ws:hover { background: var(--bg-hover); }+ .ws-icon {+ width: 22px; height: 22px; border-radius: 4px;+ background: linear-gradient(135deg,#1f1f1f,#3a3a3a);+ color: #fff; display: grid; place-items: center;+ font-weight: 600; font-size: 12px;+ }+ .ws-name { font-weight: 600; flex: 1; font-size: 14px; }+ .ws-caret { color: var(--ink-3); font-size: 12px; }++ .side-search {+ margin: 12px 4px 6px; padding: 5px 8px;+ color: var(--ink-3); font-size: 13px;+ display: flex; align-items: center; gap: 8px;+ border-radius: var(--radius-sm); cursor: pointer;+ }+ .side-search:hover { background: var(--bg-hover); }+ .side-search kbd {+ margin-left: auto; font-family: inherit; font-size: 11px;+ color: var(--ink-3); background: #fff; border: 1px solid var(--line);+ padding: 1px 5px; border-radius: 3px;+ }++ .side-section {+ margin-top: 14px; padding: 0 8px;+ color: var(--ink-3); font-size: 12px; letter-spacing: .02em;+ text-transform: uppercase;+ }+ .nav { margin-top: 4px; display: flex; flex-direction: column; gap: 1px; }+ .nav-item {+ display: flex; align-items: center; gap: 8px;+ padding: 4px 8px; border-radius: var(--radius-sm);+ color: var(--ink); cursor: pointer;+ }+ .nav-item:hover { background: var(--bg-hover); }+ .nav-item.active { background: #e8e6e1; font-weight: 500; }+ .nav-icon { width: 18px; text-align: center; }+ .nav-caret { margin-left: auto; color: var(--ink-3); font-size: 10px; }++ /* ---------- Main ---------- */+ .main {+ display: flex; flex-direction: column;+ min-width: 0;+ }+ .topbar {+ height: 44px; padding: 0 16px;+ border-bottom: 1px solid var(--line);+ display: flex; align-items: center; gap: 12px;+ color: var(--ink-2); font-size: 13px;+ }+ .crumbs span:not(:last-child)::after {+ content: "/"; margin: 0 6px; color: var(--ink-3);+ }+ .topbar-spacer { flex: 1; }+ .pill-live {+ display: inline-flex; align-items: center; gap: 6px;+ padding: 2px 8px 2px 6px; background: #fff;+ border: 1px solid var(--line-strong); border-radius: 999px;+ font-size: 12px; color: var(--ink-2);+ }+ .pill-live .dot {+ width: 7px; height: 7px; border-radius: 50%;+ background: #2ecc71; box-shadow: 0 0 0 0 rgba(46,204,113,.55);+ animation: pulse 1.8s infinite;+ }+ .pill-live.stale .dot { background: #e6a23c; animation: none; }+ /* "Sample data" — no real connector is bound. Stays grey and static+ so the artifact does not claim a live data source it does not have. */+ .pill-live.sample {+ background: var(--bg-soft); color: var(--ink-3);+ border-color: var(--line);+ }+ .pill-live.sample .dot {+ background: var(--ink-4); animation: none; box-shadow: none;+ }+ @keyframes pulse {+ 0% { box-shadow: 0 0 0 0 rgba(46,204,113,.55); }+ 70% { box-shadow: 0 0 0 7px rgba(46,204,113,0); }+ 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }+ }++ .page {+ padding: 56px max(80px, 8vw) 80px;+ max-width: 1100px;+ width: 100%;+ align-self: center;+ }+ .page-cover {+ height: 24px; /* keep airy like Notion default */+ }+ .page-emoji {+ font-size: 64px; line-height: 1;+ margin: -4px 0 12px; cursor: default;+ }+ h1.page-title {+ font-size: 40px; line-height: 1.15;+ font-weight: 700; letter-spacing: -0.01em;+ margin: 0 0 8px; color: var(--ink);+ }+ .page-meta {+ display: flex; align-items: center; gap: 14px;+ color: var(--ink-2); font-size: 13px; margin-bottom: 28px;+ }+ .page-meta .updated { display: inline-flex; align-items: center; gap: 6px; }+ .page-meta .updated .who {+ width: 18px; height: 18px; border-radius: 50%;+ background: #f1c40f; color: #5a4500;+ display: inline-grid; place-items: center;+ font-size: 11px; font-weight: 700;+ }+ .btn {+ display: inline-flex; align-items: center; gap: 6px;+ padding: 4px 10px; font-size: 13px; color: var(--ink);+ background: #fff; border: 1px solid var(--line-strong);+ border-radius: var(--radius-sm); cursor: pointer;+ transition: background .15s ease, transform .15s ease;+ }+ .btn:hover { background: var(--bg-hover); }+ .btn .ico { width: 14px; height: 14px; display: inline-block; }+ .btn .ico.spin { animation: spin .8s linear infinite; }+ @keyframes spin { to { transform: rotate(360deg); } }+ .btn.primary { background: var(--accent); color: #fff; border-color: transparent; }+ .btn.primary:hover { background: var(--accent-ink); }+ .btn.ghost { border-color: transparent; }+ .btn.ghost:hover { background: var(--bg-hover); }++ /* ---------- Callout ---------- */+ .callout {+ background: var(--bg-soft);+ border-radius: var(--radius-md);+ padding: 14px 16px;+ display: flex; gap: 12px; align-items: flex-start;+ margin: 10px 0 28px;+ color: var(--ink);+ }+ .callout .emj { font-size: 18px; line-height: 1.4; }+ .callout small { color: var(--ink-2); }++ /* ---------- KPI grid ---------- */+ .kpis {+ display: grid; grid-template-columns: repeat(4, 1fr);+ gap: 1px; background: var(--line);+ border: 1px solid var(--line); border-radius: var(--radius-md);+ overflow: hidden; margin: 8px 0 32px;+ }+ .kpi {+ background: #fff; padding: 18px 20px;+ display: flex; flex-direction: column; gap: 4px;+ }+ .kpi .label {+ color: var(--ink-2); font-size: 12px; letter-spacing: .03em;+ text-transform: uppercase; font-weight: 500;+ }+ .kpi .value {+ font-size: 32px; font-weight: 600; letter-spacing: -0.01em;+ color: var(--ink);+ font-variant-numeric: tabular-nums;+ transition: color .25s ease;+ }+ .kpi .value.flash { color: var(--accent-ink); }+ .kpi .delta { font-size: 12px; color: var(--ink-2); }+ .kpi .delta.up { color: #2b8a3e; }+ .kpi .delta.down { color: #c0392b; }+ .kpi .delta .arr { display: inline-block; width: 10px; }++ /* ---------- Section heading ---------- */+ h2.h {+ font-size: 18px; font-weight: 600;+ margin: 32px 0 8px; letter-spacing: -0.005em;+ }+ .h-sub { color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }++ /* ---------- Two-col block ---------- */+ .two-col {+ display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px;+ margin-bottom: 8px;+ }++ /* Sparkline card */+ .card {+ background: #fff; border: 1px solid var(--line);+ border-radius: var(--radius-md); padding: 16px 18px;+ }+ .card-title {+ display: flex; align-items: center; justify-content: space-between;+ font-size: 13px; color: var(--ink-2); margin-bottom: 8px;+ }+ .card-title strong { color: var(--ink); font-weight: 600; }+ .spark { width: 100%; height: 120px; }+ .spark-axis { color: var(--ink-3); font-size: 11px; }+ .spark-fill { fill: rgba(46,170,220,.10); }+ .spark-line { fill: none; stroke: var(--accent); stroke-width: 2; }+ .spark-dot { fill: var(--accent); }+ .spark-grid line { stroke: var(--line); stroke-dasharray: 2 3; }++ /* Activity feed */+ .feed { display: flex; flex-direction: column; }+ .feed-row {+ display: flex; gap: 12px; padding: 10px 4px;+ border-bottom: 1px solid var(--line);+ }+ .feed-row:last-child { border-bottom: none; }+ .feed-row .av {+ flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;+ display: grid; place-items: center;+ color: #fff; font-size: 11px; font-weight: 700;+ }+ .feed-row .body { flex: 1; min-width: 0; font-size: 13px; }+ .feed-row .body .who { font-weight: 600; }+ .feed-row .body .what { color: var(--ink); }+ .feed-row .body .target { color: var(--accent-ink); border-bottom: 1px dotted var(--accent); cursor: pointer; }+ .feed-row .time { color: var(--ink-3); font-size: 12px; flex: 0 0 auto; }+ .feed-row.new { background: rgba(46,170,220,.06); }+ .feed-row.new .body .who::before {+ content: "•"; color: var(--accent); margin-right: 6px;+ }++ /* ---------- Database table ---------- */+ .db {+ border: 1px solid var(--line); border-radius: var(--radius-md);+ overflow: hidden; margin-top: 4px;+ background: #fff;+ }+ .db-head, .db-row {+ display: grid;+ grid-template-columns: 32px 2.4fr 1fr 1fr 0.9fr 0.9fr;+ align-items: center;+ padding: 8px 12px;+ border-bottom: 1px solid var(--line);+ font-size: 13px;+ }+ .db-head {+ background: var(--bg-soft); color: var(--ink-2);+ font-size: 12px; text-transform: uppercase; letter-spacing: .03em;+ font-weight: 500;+ }+ .db-row:last-child { border-bottom: none; }+ .db-row:hover { background: var(--bg-soft); }+ .db-row.changed { animation: rowflash 1.4s ease; }+ @keyframes rowflash {+ 0% { background: rgba(46,170,220,.18); }+ 100% { background: transparent; }+ }+ .db-cell.title { font-weight: 500; display: flex; align-items: center; gap: 6px; min-width: 0; }+ .db-cell.title .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+ .db-cell .pill {+ display: inline-flex; align-items: center; gap: 4px;+ padding: 2px 8px; border-radius: 3px;+ font-size: 12px; font-weight: 500;+ }+ .pill.done { background: var(--pill-done-bg); color: var(--pill-done-ink); }+ .pill.progress { background: var(--pill-progress-bg); color: var(--pill-progress-ink); }+ .pill.blocked { background: var(--pill-blocked-bg); color: var(--pill-blocked-ink); }+ .pill.todo { background: var(--pill-todo-bg); color: var(--pill-todo-ink); }+ .pill.review { background: var(--pill-review-bg); color: var(--pill-review-ink); }++ .person {+ display: inline-flex; align-items: center; gap: 6px;+ }+ .person .av {+ width: 18px; height: 18px; border-radius: 50%;+ color: #fff; display: grid; place-items: center;+ font-size: 10px; font-weight: 700;+ }++ /* ---------- Footer ---------- */+ .footer {+ margin-top: 32px; padding-top: 16px;+ border-top: 1px solid var(--line);+ color: var(--ink-3); font-size: 12px;+ display: flex; align-items: center; gap: 8px;+ }+ .footer .key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;+ background: var(--bg-soft); padding: 1px 5px; border-radius: 3px; color: var(--ink-2); }++ /* ---------- Toast ---------- */+ .toast {+ position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);+ background: #1f1f1f; color: #fff; padding: 8px 14px;+ border-radius: 8px; font-size: 13px;+ opacity: 0; pointer-events: none;+ transition: opacity .2s ease, transform .2s ease;+ }+ .toast.show { opacity: 1; transform: translateX(-50%) translateY(-2px); }++ @media (prefers-reduced-motion: reduce) {+ *, *::before, *::after { animation: none !important; transition: none !important; }+ }++ @media (max-width: 980px) {+ .app { grid-template-columns: 1fr; }+ .side { display: none; }+ .page { padding: 32px 20px 64px; }+ .kpis { grid-template-columns: repeat(2, 1fr); }+ .two-col { grid-template-columns: 1fr; }+ .db-head, .db-row { grid-template-columns: 24px 1.8fr 0.8fr 0.8fr; }+ .db-cell.due, .db-cell.priority { display: none; }+ }+</style>+</head>+<body>+<div class="app">++ <!-- ============ SIDEBAR ============ -->+ <!-- Sidebar rows are interactive — every clickable .ws / .side-search /+ .nav-item carries role="button" + tabindex="0" so keyboard users+ can reach them. Activation handlers are wired in the script below. -->+ <aside class="side">+ <div class="ws" role="button" tabindex="0">+ <div class="ws-icon">A</div>+ <div class="ws-name">Acme Studio</div>+ <div class="ws-caret">⌄</div>+ </div>++ <div class="side-search" role="button" tabindex="0">+ <span>🔎</span><span>Search</span><kbd>⌘K</kbd>+ </div>+ <div class="side-search" role="button" tabindex="0">+ <span>⌚</span><span>Updates</span>+ </div>+ <div class="side-search" role="button" tabindex="0">+ <span>⚙️</span><span>Settings & members</span>+ </div>++ <div class="side-section">Workspace</div>+ <div class="nav">+ <div class="nav-item active" role="button" tabindex="0" aria-current="page">+ <span class="nav-icon">📊</span><span>Team Dashboard</span>+ </div>+ <div class="nav-item" role="button" tabindex="0">+ <span class="nav-icon">✅</span><span>Tasks</span>+ <span class="nav-caret">›</span>+ </div>+ <div class="nav-item" role="button" tabindex="0">+ <span class="nav-icon">📓</span><span>Docs</span>+ <span class="nav-caret">›</span>+ </div>+ <div class="nav-item" role="button" tabindex="0">+ <span class="nav-icon">🚀</span><span>Roadmap</span>+ </div>+ <div class="nav-item" role="button" tabindex="0">+ <span class="nav-icon">🧠</span><span>Brain dump</span>+ </div>+ </div>++ <div class="side-section">Private</div>+ <div class="nav">+ <div class="nav-item" role="button" tabindex="0"><span class="nav-icon">🗒️</span><span>Daily journal</span></div>+ <div class="nav-item" role="button" tabindex="0"><span class="nav-icon">📥</span><span>Inbox</span></div>+ </div>++ <div class="side-section">Connections</div>+ <div class="nav">+ <div class="nav-item" role="button" tabindex="0"><span class="nav-icon">🔌</span><span>Notion · acme.so</span></div>+ </div>+ </aside>++ <!-- ============ MAIN ============ -->+ <main class="main">++ <div class="topbar">+ <div class="crumbs">+ <span>Acme Studio</span>+ <span>Workspace</span>+ <span>Team Dashboard</span>+ </div>+ <div class="topbar-spacer"></div>+ <div class="pill-live sample" id="livePill" title="No connector bound — values below are seeded sample data">+ <span class="dot"></span>+ <span id="liveText">Sample data</span>+ </div>+ </div>++ <div class="page">+ <div class="page-cover"></div>+ <div class="page-emoji">📊</div>+ <h1 class="page-title">Team Dashboard</h1>+ <div class="page-meta">+ <div class="updated">+ <span class="who">SC</span>+ <span>Last edited by <strong>Sarah Chen</strong></span>+ </div>+ <span>·</span>+ <span id="updatedAt">Last refreshed just now</span>+ <span style="flex:1"></span>+ <button class="btn ghost" id="autoBtn" title="Auto refresh every 30s">+ <span>⏱</span><span id="autoLbl">Auto · on</span>+ </button>+ <button class="btn primary" id="refreshBtn" title="Pull latest from Notion (sample mode — refreshes seeded data)">+ <span class="ico" id="refreshIco">↻</span>+ <span>Refresh from Notion</span>+ </button>+ </div>++ <div class="callout">+ <div class="emj">💡</div>+ <div>+ <div><strong>This page is a Live Artifact running on sample data.</strong>+ The shape mirrors what the <strong>Acme Studio</strong> Notion workspace+ would return through the Composio connector — but the numbers, names,+ tasks and activity below are seeded fixtures, not a real workspace.</div>+ <small>When a connector is bound, the pill switches to <em>Live · synced</em>+ and the same renderer paints real data. Until then, refreshes only+ tween the seeded fixture so the live behaviors stay demo-able offline.</small>+ </div>+ </div>++ <!-- KPI -->+ <div class="kpis">+ <div class="kpi">+ <div class="label">Total tasks</div>+ <div class="value" id="kTotal">142</div>+ <div class="delta up"><span class="arr">↑</span> 6 vs last week</div>+ </div>+ <div class="kpi">+ <div class="label">Done this week</div>+ <div class="value" id="kDone">23</div>+ <div class="delta up"><span class="arr">↑</span> 4 vs last week</div>+ </div>+ <div class="kpi">+ <div class="label">Active members</div>+ <div class="value" id="kPeople">11<span style="color:var(--ink-3); font-size:18px; font-weight:500"> / 14</span></div>+ <div class="delta">· Stable</div>+ </div>+ <div class="kpi">+ <div class="label">Docs awaiting review</div>+ <div class="value" id="kReview">7</div>+ <div class="delta down"><span class="arr">↓</span> 2 vs last week</div>+ </div>+ </div>++ <!-- Two col -->+ <div class="two-col">++ <div class="card">+ <div class="card-title">+ <strong>Tasks created · last 7 days</strong>+ <span id="sparkSum">98 total</span>+ </div>+ <svg class="spark" viewBox="0 0 600 140" preserveAspectRatio="none" id="sparkSvg">+ <!-- grid -->+ <g class="spark-grid">+ <line x1="0" y1="35" x2="600" y2="35"/>+ <line x1="0" y1="70" x2="600" y2="70"/>+ <line x1="0" y1="105" x2="600" y2="105"/>+ </g>+ <path class="spark-fill" id="sparkFill" d=""></path>+ <path class="spark-line" id="sparkLine" d=""></path>+ <g id="sparkDots"></g>+ <g id="sparkLabels" class="spark-axis"></g>+ </svg>+ </div>++ <div class="card">+ <div class="card-title">+ <strong>Recent activity</strong>+ <span>From <span style="color:var(--accent-ink)">Notion</span></span>+ </div>+ <div class="feed" id="feed"></div>+ </div>++ </div>++ <!-- Database -->+ <h2 class="h">📋 Tasks · Active sprint</h2>+ <div class="h-sub">Linked database · filtered by Status ≠ Done · sorted by Updated time</div>+ <div class="db" id="db">+ <div class="db-head">+ <div></div>+ <div>Name</div>+ <div>Status</div>+ <div>Assignee</div>+ <div class="db-cell due">Due</div>+ <div class="db-cell priority">Priority</div>+ </div>+ <!-- rows injected -->+ </div>++ <div class="footer">+ <span>Source: Notion API · workspace <strong>acme.so</strong></span>+ <span>·</span>+ <span>Connector <span class="key">composio.notion</span></span>+ <span>·</span>+ <span id="footerTime"></span>+ </div>++ </div>+ </main>+</div>++<div class="toast" id="toast">Synced — 3 changes from Notion</div>++<script>+(function(){+ // ---------- Fake data state ----------+ const PEOPLE = [+ { id: "SC", name: "Sarah Chen", color: "#f1c40f" },+ { id: "MK", name: "Mike Park", color: "#3498db" },+ { id: "LZ", name: "Lisa Zhao", color: "#e67e22" },+ { id: "DT", name: "Dave Torres", color: "#9b59b6" },+ { id: "AN", name: "Anna Nakamura",color: "#1abc9c" },+ { id: "RJ", name: "Raj Patel", color: "#e74c3c" }+ ];++ const ROW_POOL = [+ { icon: "🚀", title: "Q3 Roadmap planning", status: "progress", who: "SC", due: "May 12", prio: "High" },+ { icon: "📐", title: "Design tokens v2 spec", status: "review", who: "LZ", due: "May 14", prio: "Med" },+ { icon: "🐛", title: "Fix mobile nav overflow on iOS", status: "blocked", who: "MK", due: "May 09", prio: "High" },+ { icon: "📊", title: "Pricing experiment readout", status: "todo", who: "DT", due: "May 18", prio: "Low" },+ { icon: "✍️", title: "Launch blog draft · Live Artifacts", status: "progress", who: "AN", due: "May 11", prio: "High" },+ { icon: "🔐", title: "Rotate Notion integration token", status: "todo", who: "RJ", due: "May 20", prio: "Med" },+ { icon: "🧪", title: "QA onboarding flow regressions", status: "review", who: "MK", due: "May 16", prio: "Med" },+ { icon: "🎨", title: "Refresh marketing OG images", status: "progress", who: "LZ", due: "May 13", prio: "Low" }+ ];++ const ACTIVITY_TEMPLATES = [+ (p, t) => ({ who: p, action: "moved", target: t, suffix: "to Done", icon: "✅" }),+ (p, t) => ({ who: p, action: "created", target: t, suffix: "in Tasks", icon: "➕" }),+ (p, t) => ({ who: p, action: "commented on", target: t, suffix: "", icon: "💬" }),+ (p, t) => ({ who: p, action: "updated", target: t, suffix: "properties", icon: "✏️" }),+ (p, t) => ({ who: p, action: "shared", target: t, suffix: "with Marketing", icon: "🔗" }),+ (p, t) => ({ who: p, action: "added", target: t, suffix: "to sprint", icon: "📌" })+ ];++ const SEED_FEED = [+ { who: "Sarah Chen", action: "moved", target: "Q3 Roadmap planning", suffix: "to In progress", icon: "🚀", mins: 3 },+ { who: "Mike Park", action: "commented on", target: "Fix mobile nav overflow on iOS", suffix: "", icon: "💬", mins: 11 },+ { who: "Lisa Zhao", action: "created", target: "Design tokens v2 spec", suffix: "in Docs", icon: "📐", mins: 26 },+ { who: "Anna Nakamura",action: "shared", target: "Launch blog draft · Live Artifacts", suffix: "with Marketing", icon: "🔗", mins: 41 },+ { who: "Dave Torres", action: "updated", target: "Pricing experiment readout", suffix: "properties", icon: "✏️", mins: 58 }+ ];++ let kpi = { total: 142, done: 23, people: 11, peopleAll: 14, review: 7 };+ let series = [8, 12, 15, 9, 18, 22, 14];+ let dayLabels = ["Wed","Thu","Fri","Sat","Sun","Mon","Tue"];+ let lastRefresh = new Date();+ let autoOn = true;+ let autoTimer = null;++ // ---------- DOM refs ----------+ const $ = (id) => document.getElementById(id);+ const refreshBtn = $("refreshBtn");+ const refreshIco = $("refreshIco");+ const autoBtn = $("autoBtn");+ const autoLbl = $("autoLbl");+ const updatedAt = $("updatedAt");+ const liveText = $("liveText");+ const livePill = $("livePill");+ const toast = $("toast");+ const footerTime = $("footerTime");++ // ---------- Helpers ----------+ // Every dynamic value rendered into innerHTML below goes through e():+ // task titles / activity strings / person names can come from a+ // connector payload, and unescaped innerHTML is a working XSS sink.+ function e(v) {+ return String(v == null ? "" : v)+ .replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">")+ .replaceAll('"', """).replaceAll("'", "'");+ }+ function avatar(personId) {+ const p = PEOPLE.find(x => x.id === personId);+ if (!p) return "";+ return `<span class="av" style="background:${e(p.color)}">${e(p.id)}</span>`;+ }+ function personChip(personId) {+ const p = PEOPLE.find(x => x.id === personId);+ if (!p) return "";+ return `<span class="person">${avatar(personId)}<span>${e(p.name)}</span></span>`;+ }+ function timeAgo(date) {+ const s = Math.max(0, Math.floor((Date.now() - date.getTime()) / 1000));+ if (s < 5) return "just now";+ if (s < 60) return s + "s ago";+ const m = Math.floor(s / 60);+ if (m < 60) return m + " min ago";+ const h = Math.floor(m / 60);+ if (h < 24) return h + " h ago";+ return Math.floor(h/24) + " d ago";+ }+ function fmtDateTime(d) {+ return d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) ++ " · " + d.toLocaleDateString([], { month: "short", day: "numeric" });+ }+ function rand(arr) { return arr[Math.floor(Math.random() * arr.length)]; }+ // Reduced-motion gate. The CSS @media block above already neutralizes+ // CSS animations/transitions, but tweenText() schedules JS rAF updates+ // and flash() toggles a transient highlight class — both keep moving+ // for opted-out users unless we short-circuit them here.+ function reduceMotion() {+ return typeof window !== "undefined"+ && typeof window.matchMedia === "function"+ && window.matchMedia("(prefers-reduced-motion: reduce)").matches;+ }+ function tween(el, from, to, ms = 600) {+ if (!el) return;+ if (from === to || reduceMotion()) {+ el.firstChild ? (el.childNodes[0].nodeValue = to) : (el.textContent = to);+ return;+ }+ const start = performance.now();+ function step(now) {+ const t = Math.min(1, (now - start) / ms);+ const eased = 1 - Math.pow(1 - t, 3);+ const v = Math.round(from + (to - from) * eased);+ el.firstChild ? (el.childNodes[0].nodeValue = v) : (el.textContent = v);+ if (t < 1) requestAnimationFrame(step);+ }+ requestAnimationFrame(step);+ }++ // ---------- Render: KPI ----------+ function renderKpi(prev) {+ const flash = (el) => {+ if (!el || reduceMotion()) return;+ el.classList.add("flash");+ setTimeout(() => el.classList.remove("flash"), 700);+ };+ if (prev) {+ tweenText($("kTotal"), prev.total, kpi.total); if (prev.total !== kpi.total) flash($("kTotal"));+ tweenText($("kDone"), prev.done, kpi.done); if (prev.done !== kpi.done) flash($("kDone"));+ tweenText($("kReview"), prev.review, kpi.review); if (prev.review !== kpi.review) flash($("kReview"));+ // people render keeps html — numeric values are safe but pass them+ // through e() anyway so connector-driven payloads can flow through+ // this same path without revisiting the markup.+ $("kPeople").innerHTML = e(kpi.people) + `<span style="color:var(--ink-3); font-size:18px; font-weight:500"> / ${e(kpi.peopleAll)}</span>`;+ if (prev.people !== kpi.people) flash($("kPeople"));+ } else {+ $("kTotal").textContent = kpi.total;+ $("kDone").textContent = kpi.done;+ $("kReview").textContent = kpi.review;+ $("kPeople").innerHTML = e(kpi.people) + `<span style="color:var(--ink-3); font-size:18px; font-weight:500"> / ${e(kpi.peopleAll)}</span>`;+ }+ }+ function tweenText(el, from, to, ms = 600) {+ if (!el) return;+ if (from === to || reduceMotion()) { el.textContent = String(to); return; }+ const start = performance.now();+ function step(now) {+ const t = Math.min(1, (now - start) / ms);+ const eased = 1 - Math.pow(1 - t, 3);+ const v = Math.round(from + (to - from) * eased);+ el.textContent = v;+ if (t < 1) requestAnimationFrame(step);+ }+ requestAnimationFrame(step);+ }++ // ---------- Render: sparkline ----------+ function renderSpark() {+ const W = 600, H = 140, padL = 24, padR = 16, padT = 10, padB = 24;+ const max = Math.max(...series, 1);+ const stepX = (W - padL - padR) / (series.length - 1);+ const pts = series.map((v, i) => {+ const x = padL + i * stepX;+ const y = padT + (1 - v / (max * 1.15)) * (H - padT - padB);+ return [x, y];+ });+ const linePath = "M " + pts.map(p => p.join(" ")).join(" L ");+ const fillPath = linePath + ` L ${pts[pts.length-1][0]} ${H - padB} L ${pts[0][0]} ${H - padB} Z`;+ $("sparkLine").setAttribute("d", linePath);+ $("sparkFill").setAttribute("d", fillPath);++ const dots = pts.map(([x,y]) => `<circle class="spark-dot" cx="${x}" cy="${y}" r="3"/>`).join("");+ $("sparkDots").innerHTML = dots;++ const labels = dayLabels.map((d, i) => {+ const x = padL + i * stepX;+ return `<text x="${x}" y="${H - 6}" text-anchor="middle">${d}</text>`;+ }).join("");+ $("sparkLabels").innerHTML = labels;++ $("sparkSum").textContent = series.reduce((a,b)=>a+b,0) + " total";+ }++ // ---------- Render: feed ----------+ let feed = SEED_FEED.map(x => ({...x, when: new Date(Date.now() - x.mins * 60 * 1000), id: cryptoRandomId() }));+ function cryptoRandomId() { return "f" + Math.random().toString(36).slice(2, 9); }+ function renderFeed(highlightId) {+ const el = $("feed");+ // Drop the transient .new highlight under reduced-motion so the row+ // doesn't get a coloured background pulse for users who opted out.+ const effectiveHighlight = reduceMotion() ? null : highlightId;+ el.innerHTML = feed.slice(0, 6).map(item => {+ const initials = String(item.who||"").split(" ").map(s => s[0]).join("").slice(0,2).toUpperCase();+ const color = personColor(item.who);+ const cls = item.id === effectiveHighlight ? "feed-row new" : "feed-row";+ const suffixHtml = item.suffix ? `<span class="what"> ${e(item.suffix)}</span>` : "";+ return `+ <div class="${cls}" data-id="${e(item.id)}">+ <span class="av" style="background:${e(color)}">${e(initials)}</span>+ <div class="body">+ <span class="who">${e(item.who)}</span>+ <span class="what"> ${e(item.action)}</span>+ <span class="target"> ${e(item.icon || "")} ${e(item.target)}</span>+ ${suffixHtml}+ </div>+ <div class="time" title="${e(item.when.toLocaleString())}">${e(timeAgo(item.when))}</div>+ </div>`;+ }).join("");+ }+ function personColor(name) {+ const p = PEOPLE.find(x => x.name === name);+ return p ? p.color : "#7f8c8d";+ }++ // ---------- Render: db rows ----------+ let rows = ROW_POOL.slice(0, 6).map((r, i) => ({...r, id: "r"+i, updated: Date.now() - (i+1)*1800000 }));+ function renderRows(changedId) {+ const head = document.querySelector(".db-head");+ const db = $("db");+ [...db.querySelectorAll(".db-row")].forEach(n => n.remove());+ const sorted = [...rows].sort((a,b) => b.updated - a.updated);+ const STATUS_LABEL = { done: "Done", progress: "In progress", blocked: "Blocked", todo: "To do", review: "In review" };+ // Same reduced-motion gate as renderFeed: skip the .changed+ // row-flash class so we don't paint a transient highlight for+ // opted-out users (the rowflash CSS animation is already neutralized+ // by the prefers-reduced-motion @media block above, but the class+ // would still imply intent).+ const effectiveChanged = reduceMotion() ? null : changedId;+ sorted.forEach(r => {+ const div = document.createElement("div");+ div.className = "db-row" + (r.id === effectiveChanged ? " changed" : "");+ div.dataset.id = r.id;+ const statusKey = STATUS_LABEL[r.status] ? r.status : "todo";+ const statusLabel = STATUS_LABEL[statusKey];+ div.innerHTML = `+ <div class="db-cell">${e(r.icon)}</div>+ <div class="db-cell title"><span class="t">${e(r.title)}</span></div>+ <div class="db-cell"><span class="pill ${statusKey}">${e(statusLabel)}</span></div>+ <div class="db-cell">${personChip(r.who)}</div>+ <div class="db-cell due">${e(r.due)}</div>+ <div class="db-cell priority">${e(r.prio)}</div>+ `;+ db.appendChild(div);+ });+ }++ // ---------- Refresh logic (the live bit) ----------+ let busy = false;+ async function refresh({silent = false} = {}) {+ if (busy) return;+ busy = true;+ refreshIco.classList.add("spin");+ livePill.classList.remove("stale");+ liveText.textContent = "Syncing…";++ // Simulate latency to a Notion API call.+ await new Promise(r => setTimeout(r, 700 + Math.random() * 600));++ const prev = {...kpi};+ const changes = [];++ // Mutate state in plausible directions.+ const newDone = Math.random() < 0.7 ? 1 : 0;+ if (newDone) {+ kpi.done += 1;+ kpi.total += Math.random() < 0.5 ? 1 : 0;+ // flip a row to done+ const candidates = rows.filter(r => r.status !== "done");+ if (candidates.length) {+ const r = rand(candidates);+ r.status = "done";+ r.updated = Date.now();+ changes.push({ kind: "row", id: r.id, row: r });+ }+ } else {+ // a brand new task created+ const rest = ROW_POOL.filter(p => !rows.some(r => r.title === p.title));+ const tmpl = rest.length ? rand(rest) : rand(ROW_POOL);+ const r = { ...tmpl, id: "r" + Date.now(), status: "todo", updated: Date.now() };+ rows = [r, ...rows].slice(0, 8);+ kpi.total += 1;+ changes.push({ kind: "row", id: r.id, row: r });+ }++ if (Math.random() < 0.4) {+ kpi.review = Math.max(0, kpi.review + (Math.random() < 0.5 ? -1 : 1));+ }+ if (Math.random() < 0.25) {+ kpi.people = Math.min(kpi.peopleAll, Math.max(6, kpi.people + (Math.random() < 0.5 ? -1 : 1)));+ }++ // Series shift: today's bucket gains 1-3+ series = series.slice();+ series[series.length - 1] = series[series.length - 1] + 1 + Math.floor(Math.random()*2);++ // Add a new feed item+ const lastChange = changes[changes.length - 1];+ const person = rand(PEOPLE);+ const tmpl = rand(ACTIVITY_TEMPLATES);+ const targetTitle = lastChange ? lastChange.row.title : rand(ROW_POOL).title;+ const evt = tmpl(person.name, targetTitle);+ evt.when = new Date();+ evt.id = cryptoRandomId();+ feed = [evt, ...feed].slice(0, 8);++ lastRefresh = new Date();+ busy = false;+ refreshIco.classList.remove("spin");+ // Only mock-mode here — keep the "Sample data" badge so the artifact+ // never falsely claims a real connector is bound.+ liveText.textContent = "Sample data";+ livePill.classList.remove("stale");+ livePill.classList.add("sample");++ renderKpi(prev);+ renderSpark();+ renderFeed(evt.id);+ renderRows(lastChange ? lastChange.id : null);+ updateTimes();++ if (!silent) showToast("Refreshed sample data · 1 task moved, 1 activity added");+ }++ function showToast(msg) {+ toast.textContent = msg;+ toast.classList.add("show");+ clearTimeout(showToast._t);+ showToast._t = setTimeout(() => toast.classList.remove("show"), 1800);+ }++ function updateTimes() {+ updatedAt.textContent = "Last refreshed " + timeAgo(lastRefresh);+ footerTime.textContent = "Last sync · " + fmtDateTime(lastRefresh);+ // Sample mode (no connector bound) is sticky — the artifact never+ // claims "Live · synced" against fixture data. The pill only escalates+ // to "Stale · …" if even the sample-refresh loop has not run for a+ // while (e.g. the auto-refresh was paused).+ if ((Date.now() - lastRefresh.getTime()) > 90 * 1000) {+ livePill.classList.add("stale");+ livePill.classList.remove("sample");+ liveText.textContent = "Stale · " + timeAgo(lastRefresh);+ } else {+ livePill.classList.remove("stale");+ livePill.classList.add("sample");+ liveText.textContent = "Sample data";+ }+ }++ // ---------- Keyboard activation for role=button divs ----------+ // .ws / .side-search / .nav-item are styled as clickable rows but they+ // are <div>, so keyboard users get nothing for free. Map Enter/Space+ // onto a synthetic click and prevent the default Space scroll.+ document.addEventListener("keydown", (ev) => {+ if (ev.key !== "Enter" && ev.key !== " ") return;+ const t = ev.target;+ if (!(t instanceof HTMLElement)) return;+ if (t.getAttribute("role") !== "button") return;+ if (t.matches("button, a, input, select, textarea")) return;+ ev.preventDefault();+ t.click();+ });++ // ---------- Init ----------+ function init() {+ renderKpi();+ renderSpark();+ renderFeed();+ renderRows();+ updateTimes();+ // "Refresh on open" — the moment the artifact mounts.+ setTimeout(() => refresh({silent: true}), 600);+ }++ // ---------- Wire events ----------+ refreshBtn.addEventListener("click", () => refresh());+ autoBtn.addEventListener("click", () => {+ autoOn = !autoOn;+ autoLbl.textContent = "Auto · " + (autoOn ? "on" : "off");+ if (autoOn) startAuto(); else stopAuto();+ });+ function startAuto() { stopAuto(); autoTimer = setInterval(() => refresh({silent: true}), 30 * 1000); }+ function stopAuto() { if (autoTimer) clearInterval(autoTimer); autoTimer = null; }++ setInterval(updateTimes, 5 * 1000);++ // Tick relative timestamps in feed every 15s+ setInterval(() => renderFeed(), 15 * 1000);++ startAuto();+ init();+})();+</script>+</body>+</html>diff --git a/src/lib/templates/skills/magazine-poster/SKILL.md b/src/lib/templates/skills/magazine-poster/SKILL.mdnew file mode 100644index 00000000..e757f92b--- /dev/null+++ b/src/lib/templates/skills/magazine-poster/SKILL.md@@ -0,0 +1,24 @@+---+name: magazine-poster+zh_name: "杂志风海报"+en_name: "Magazine Poster"+emoji: "🗞️"+description: "Sunday-paper 风格, 大字 serif headline + 双栏正文 + 编号 sections"+category: poster+scenario: marketing+aspect_hint: "竖版长图"+recommended: 4+tags: ["magazine", "newsprint", "editorial", "manifesto"]+---++【模板: 杂志风海报 / Magazine Poster】+【意图】Newsprint editorial 风格的长图海报, 读起来像一篇报纸全版。+【布局】+- Dateline 顶栏 (publication / date / issue)+- Oversized serif headline (含 strike-through 词 + 斜体 accent)+- 双栏 body 正文+- 6 个编号 sections, 每个含小标题 + 1-2 段 + pull-quote+- 底部署名 + 小 ornament+【设计细节】+- 纸感: 暖灰 cream 背景 + 细 dot pattern, 黑字+- 字体: Playfair Display + IBM Plex Serif + JetBrains Monodiff --git a/src/lib/templates/skills/magazine-poster/example.html b/src/lib/templates/skills/magazine-poster/example.htmlnew file mode 100644index 00000000..7cd4329a--- /dev/null+++ b/src/lib/templates/skills/magazine-poster/example.html@@ -0,0 +1,207 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>You don't need a designer to ship your first draft anymore — AI Enthusiast</title>+ <style>+ :root {+ --paper: #f3eee2;+ --ink: #1f1c17;+ --muted: #6e6a5d;+ --rule: #d3cdbe;+ --accent: #b85a3a;+ --tint: #ece5d3;+ --serif-display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;+ --serif-body: 'Iowan Old Style', 'Charter', Georgia, serif;+ --mono: 'IBM Plex Mono', ui-monospace, 'JetBrains Mono', monospace;+ }+ * { box-sizing: border-box; }+ body {+ margin: 0; color: var(--ink);+ background:+ radial-gradient(circle, rgba(31,28,23,0.05) 1px, transparent 1.4px) 0 0 / 16px 16px,+ var(--paper);+ font: 14px/1.55 var(--serif-body);+ }+ .page {+ max-width: 1180px;+ margin: 0 auto;+ padding: 36px 56px 48px;+ }++ .top-rule {+ display: flex; justify-content: space-between; align-items: center;+ font: 10.5px/1.4 var(--mono);+ color: var(--muted);+ letter-spacing: 0.18em;+ text-transform: uppercase;+ padding-bottom: 10px;+ border-bottom: 1px solid var(--ink);+ }+ .eyebrow-row {+ padding: 14px 0 28px;+ font: 10.5px/1.4 var(--mono);+ color: var(--muted);+ letter-spacing: 0.18em;+ text-transform: uppercase;+ }++ h1.headline {+ font-family: var(--serif-display);+ font-weight: 800;+ font-size: clamp(56px, 7vw, 96px);+ line-height: 0.98;+ letter-spacing: -0.012em;+ margin: 0 0 16px;+ max-width: 18ch;+ }+ h1.headline .strike { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--ink); color: var(--ink); }+ h1.headline .accent { font-style: italic; color: var(--accent); font-weight: 700; }++ .deck {+ max-width: 78ch;+ font: italic 18px/1.45 var(--serif-body);+ color: var(--ink);+ margin: 0 0 22px;+ }+ .deck b { font-style: normal; color: var(--accent); font-weight: 600; padding: 0 4px; background: var(--tint); border-radius: 2px; }++ .accent-rule { width: 80px; height: 3px; background: var(--accent); margin: 6px 0 32px; }++ .grid {+ display: grid;+ grid-template-columns: 1fr 1fr;+ gap: 28px 56px;+ padding-top: 4px;+ border-top: 1px solid var(--rule);+ }+ .cell { padding: 28px 0 4px; border-bottom: 1px solid var(--rule); }+ .cell:nth-last-child(-n+2) { border-bottom: none; }+ .cell .num {+ font: 10.5px/1.4 var(--mono);+ letter-spacing: 0.18em;+ text-transform: uppercase;+ color: var(--accent);+ margin-bottom: 6px;+ display: flex; align-items: center; gap: 10px;+ }+ .cell .num span.bar { display: inline-block; width: 20px; height: 1px; background: var(--accent); opacity: 0.6; }+ .cell h3 {+ font: 700 22px/1.2 var(--serif-display);+ letter-spacing: -0.005em;+ margin: 0 0 10px;+ }+ .cell p { margin: 0 0 14px; font-size: 15px; line-height: 1.55; max-width: 46ch; color: var(--ink); }+ .cell .quote {+ background: var(--tint);+ border-left: 2px solid var(--accent);+ padding: 10px 12px;+ font: 12px/1.55 var(--mono);+ color: var(--ink);+ max-width: 50ch;+ }+ .cell .quote::before { content: '"'; }+ .cell .quote::after { content: '"'; }++ .footer {+ margin-top: 40px;+ padding-top: 16px;+ border-top: 1px solid var(--ink);+ display: grid;+ grid-template-columns: auto 1fr auto;+ gap: 24px;+ align-items: center;+ font: 10.5px/1.4 var(--mono);+ color: var(--muted);+ letter-spacing: 0.18em;+ text-transform: uppercase;+ }+ .pro-tip {+ display: flex; gap: 12px; align-items: center;+ padding: 10px 14px;+ border: 1px solid var(--rule);+ background: var(--paper);+ max-width: 78%;+ }+ .pro-tip .badge { font: 9.5px/1 var(--mono); letter-spacing: 0.2em; padding: 6px 8px; border: 1px solid var(--ink); color: var(--ink); }+ .pro-tip .text { font: italic 13px/1.4 var(--serif-body); color: var(--ink); text-transform: none; letter-spacing: 0; }+ .pro-tip .text b { color: var(--accent); font-style: normal; font-weight: 600; }++ @media (max-width: 900px) {+ .grid { grid-template-columns: 1fr; }+ .cell { border-bottom: 1px solid var(--rule); }+ .cell:last-child { border-bottom: none; }+ .page { padding: 24px 24px 32px; }+ }+ </style>+</head>+<body>+ <div class="page">+ <div class="top-rule" data-od-id="top-rule">+ <span>01 · AI ENTHUSIAST</span>+ <span>17 · APR · 2026</span>+ </div>+ <div class="eyebrow-row" data-od-id="eyebrow">— POSTED TODAY</div>++ <h1 class="headline" data-od-id="headline">+ You don't need <span class="strike">a designer</span><br />+ to ship your <span class="accent">first draft</span><br />+ anymore.+ </h1>++ <p class="deck" data-od-id="deck">+ Six honest ways I'm using AI to move faster from idea → artifact this week — <b>what works</b>, what I'd still hand to a human, and the exact prompts that got me there.+ </p>+ <div class="accent-rule"></div>++ <div class="grid" data-od-id="grid">+ <section class="cell" data-od-id="cell-1">+ <div class="num"><span class="bar"></span>01 · SHIP FAST</div>+ <h3>Clickable prototype in 90 seconds</h3>+ <p>Describe the flow in plain English. Get a real, tappable prototype — not static screens. Export to HTML and share the link.</p>+ <div class="quote">Onboarding flow for a fintech app — 5 screens, dark mode, rounded cards, haptic-style transitions.</div>+ </section>+ <section class="cell" data-od-id="cell-2">+ <div class="num"><span class="bar"></span>02 · PITCH</div>+ <h3>Investor deck from a napkin idea</h3>+ <p>Skip the template hunt. Draft the deck, refine it section-by-section, then export straight to PPTX or PDF — notes included.</p>+ <div class="quote">10-slide seed pitch for a RAG tool for lawyers. Keep it minimal, data-first, one chart per slide.</div>+ </section>+ <section class="cell" data-od-id="cell-3">+ <div class="num"><span class="bar"></span>03 · BRAND LOCK</div>+ <h3>Your design system, auto-applied</h3>+ <p>Point the model at your tokens, components, or a codebase. Every new asset respects your type, color, and spacing scale.</p>+ <div class="quote">Use our /design-system tokens. Build a pricing page variant. Match the radius + shadow of the marketing site.</div>+ </section>+ <section class="cell" data-od-id="cell-4">+ <div class="num"><span class="bar"></span>04 · MARKETING</div>+ <h3>Landing pages & launch collateral</h3>+ <p>One-pagers, email headers, feature comparison grids — editable, on-brand, and ready to hand off in minutes, not days.</p>+ <div class="quote">One-pager for a Series A launch. Headline, three proof points, CTA. Editorial feel, no stock photos.</div>+ </section>+ <section class="cell" data-od-id="cell-5">+ <div class="num"><span class="bar"></span>05 · HANDOFF</div>+ <h3>Design → engineering bundle</h3>+ <p>Finished the mock? Ship the whole handoff to your dev environment. Specs, tokens, components — no translation layer.</p>+ <div class="quote">Export this mock to code. Wire the auth screen to Supabase. Add a loading state and empty state.</div>+ </section>+ <section class="cell" data-od-id="cell-6">+ <div class="num"><span class="bar"></span>06 · EXPLORE</div>+ <h3>Ten directions in ten minutes</h3>+ <p>Generate N visual directions side-by-side. Use sliders to dial tone: playful, brutalist, editorial, corporate — same copy.</p>+ <div class="quote">Show six hero section variants. Same copy, different aesthetics. Label each with a mood word.</div>+ </section>+ </div>++ <div class="footer" data-od-id="footer">+ <div class="pro-tip">+ <span class="badge">PRO TIP</span>+ <span class="text">Don't prompt for <b>"a good design."</b> Prompt for a mood — <b>"serene", "brutalist", "Bloomberg terminal," "Sunday newspaper."</b> Aesthetic specificity is the unlock.</span>+ </div>+ <div></div>+ <div>SAVE · REPOST · TRY ONE THIS WEEKEND</div>+ </div>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/meeting-notes/SKILL.md b/src/lib/templates/skills/meeting-notes/SKILL.mdnew file mode 100644index 00000000..cf607a36--- /dev/null+++ b/src/lib/templates/skills/meeting-notes/SKILL.md@@ -0,0 +1,20 @@+---+name: meeting-notes+zh_name: "会议纪要"+en_name: "Meeting Notes"+emoji: "🗒️"+description: "标题 + 出席 + 议程 + 决议 + action items + 下次"+category: doc+scenario: operations+aspect_hint: "长页面"+tags: ["minutes", "meeting", "1:1", "纪要"]+---++【模板: 会议纪要】+【意图】现代会议纪要, 强 action items。+【布局】+- Title bar (会议名 + 时间 + 出席 avatars)+- Agenda checklist+- Decisions block (圆角卡片)+- Action items table (Owner / Due / Status)+- Next meeting footerdiff --git a/src/lib/templates/skills/meeting-notes/example.html b/src/lib/templates/skills/meeting-notes/example.htmlnew file mode 100644index 00000000..1d63e54e--- /dev/null+++ b/src/lib/templates/skills/meeting-notes/example.html@@ -0,0 +1,234 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Growth squad weekly · 14 Oct notes</title>+<style>+ :root {+ --bg: #fafaf8;+ --paper: #ffffff;+ --ink: #1a1d24;+ --muted: #5d6371;+ --line: #e8e9ed;+ --accent: #2c5fae;+ --accent-soft: #e8efff;+ --positive: #2c8a4f;+ --warn: #b58522;+ --danger: #b13b3b;+ --display: 'Charter', Georgia, serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14.5px; line-height: 1.6; }+ .page { max-width: 920px; margin: 24px auto; padding: 48px 56px 64px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }++ header.head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 28px; }+ .crumb { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }+ h1 { font-family: var(--display); font-size: 32px; margin: 6px 0 14px; letter-spacing: -0.005em; font-weight: 700; }+ .meta-row { display: flex; gap: 28px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }+ .meta-row strong { color: var(--ink); display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; font-weight: 500; }++ .attendees { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; background: var(--bg); border-radius: 8px; }+ .attendees-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }+ .av-row { display: flex; }+ .av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--paper); margin-left: -8px; font-size: 11px; font-weight: 700; color: white; display: inline-flex; align-items: center; justify-content: center; }+ .av:first-child { margin-left: 0; }+ .a-dp { background: linear-gradient(135deg, #2c5fae, #6e9bf0); }+ .a-mr { background: linear-gradient(135deg, #d6336c, #ff7a9b); }+ .a-pb { background: linear-gradient(135deg, #b58522, #f1b13a); }+ .a-ca { background: linear-gradient(135deg, #1a8e8e, #56c1c1); }+ .a-sl { background: linear-gradient(135deg, #5b3df0, #a991ff); }+ .away { color: var(--muted); font-size: 12.5px; }++ section { margin-top: 36px; }+ h2 { font-family: var(--display); font-size: 21px; margin: 0 0 14px; letter-spacing: -0.005em; }++ /* Agenda */+ .agenda { display: flex; flex-direction: column; gap: 8px; }+ .agenda-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border-radius: 6px; background: var(--bg); }+ .agenda-item .check { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: transparent; margin-top: 2px; }+ .agenda-item.done .check { background: var(--positive); border-color: var(--positive); color: white; }+ .agenda-item .body { flex: 1; }+ .agenda-item .body strong { font-weight: 600; }+ .agenda-item .body small { color: var(--muted); display: block; margin-top: 2px; font-size: 12.5px; }+ .agenda-item .time { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 3px; }++ /* Decisions */+ .decisions { padding: 22px 24px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; }+ .decisions h3 { font-family: var(--display); font-size: 15px; margin: 0 0 12px; color: var(--accent); }+ .decisions ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }+ .decisions li::marker { color: var(--accent); }++ /* Action items */+ table { width: 100%; border-collapse: collapse; }+ th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }+ th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }+ tr:last-child td { border-bottom: none; }+ td.owner { display: flex; align-items: center; gap: 8px; }+ .pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }+ .pill-todo { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }+ .pill-progress { background: rgba(44,95,174,0.12); color: var(--accent); }+ .pill-blocked { background: rgba(177,59,59,0.12); color: var(--danger); }+ .pill-done { background: rgba(44,138,79,0.12); color: var(--positive); }++ /* Open + next */+ .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }+ .panel { padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }+ .panel h3 { font-family: var(--display); font-size: 16px; margin: 0 0 8px; }+ .panel p { color: var(--muted); margin: 0; font-size: 13.5px; line-height: 1.55; }+ .next-meeting { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; margin-top: 10px; }+ .next-meeting strong { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); display: block; font-weight: 500; }++ footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }++ @media (max-width: 700px) {+ .page { padding: 28px 24px; margin: 0; border-radius: 0; }+ .grid { grid-template-columns: 1fr; }+ }+</style>+</head>+<body>+<div class="page">+ <header class="head">+ <div class="crumb">Northwind / Growth squad / Weeklies</div>+ <h1>Growth squad weekly · W42</h1>+ <div class="meta-row">+ <span><strong>Date</strong>Tuesday, 14 October 2025</span>+ <span><strong>Time</strong>10:00 – 11:00 PT</span>+ <span><strong>Where</strong>Zoom · meet.northwind/growth-weekly</span>+ <span><strong>Notes by</strong>Devon Park</span>+ </div>+ <div class="attendees">+ <span class="attendees-label">Present</span>+ <div class="av-row">+ <span class="av a-dp" title="Devon Park">DP</span>+ <span class="av a-mr" title="Mira Reddy">MR</span>+ <span class="av a-pb" title="Priya Banerjee">PB</span>+ <span class="av a-ca" title="Caleb Renner">CA</span>+ <span class="av a-sl" title="Sasha Lin">SL</span>+ </div>+ <span class="away">Apologies — Alvaro M. (PTO)</span>+ </div>+ </header>++ <section>+ <h2>Agenda</h2>+ <div class="agenda">+ <div class="agenda-item done">+ <div class="check">✓</div>+ <div class="body"><strong>Sprint 38 mid-sprint check</strong><small>Walk the board column by column. Reset what's stuck.</small></div>+ <div class="time">10:00 · 15m</div>+ </div>+ <div class="agenda-item done">+ <div class="check">✓</div>+ <div class="body"><strong>2FA workstream — M2 risk</strong><small>Brand microcopy review is the open dependency.</small></div>+ <div class="time">10:15 · 10m</div>+ </div>+ <div class="agenda-item done">+ <div class="check">✓</div>+ <div class="body"><strong>Onboarding metrics review</strong><small>Activation up 9 pp WoW; debrief the empty-state work.</small></div>+ <div class="time">10:25 · 10m</div>+ </div>+ <div class="agenda-item done">+ <div class="check">✓</div>+ <div class="body"><strong>Pioneer security review prep</strong><small>Sales loop-in for Thursday's call.</small></div>+ <div class="time">10:35 · 10m</div>+ </div>+ <div class="agenda-item done">+ <div class="check">✓</div>+ <div class="body"><strong>Q4 roadmap sneak peek</strong><small>Devon shares the proposed shape; we vote on top-3 themes.</small></div>+ <div class="time">10:45 · 12m</div>+ </div>+ <div class="agenda-item">+ <div class="check"></div>+ <div class="body"><strong>Open thread — anything else</strong><small>Pushed to async — see #growth-squad.</small></div>+ <div class="time">10:57 · 3m</div>+ </div>+ </div>+ </section>++ <section>+ <h2>Decisions</h2>+ <div class="decisions">+ <h3>What we agreed to, on the record</h3>+ <ul>+ <li><strong>M2 (2FA challenge step)</strong> stays at Nov 18 unless brand review slips past Wednesday EOD; Devon owns the escalation.</li>+ <li><strong>Empty-state experiment</strong> rolls to 100% on Thursday after one more 24h hold; no follow-up control needed.</li>+ <li><strong>Q4 themes</strong>: (1) Enterprise-readiness (auth + audit), (2) Onboarding 2.0, (3) Mobile-first settings. Sasha to write up the one-pagers.</li>+ <li><strong>Weekly format</strong>: starting next week, demos move to Friday async-video; Tuesday is decisions + board only.</li>+ </ul>+ </div>+ </section>++ <section>+ <h2>Action items</h2>+ <table>+ <thead><tr><th>Action</th><th>Owner</th><th>Due</th><th>Status</th></tr></thead>+ <tbody>+ <tr>+ <td>Escalate brand microcopy review to Sasha + Brand lead</td>+ <td class="owner"><span class="av a-dp">DP</span>Devon</td>+ <td>Wed Oct 15</td>+ <td><span class="pill pill-progress">In progress</span></td>+ </tr>+ <tr>+ <td>Roll empty-state to 100% (with monitoring window)</td>+ <td class="owner"><span class="av a-mr">MR</span>Mira</td>+ <td>Thu Oct 16</td>+ <td><span class="pill pill-todo">To do</span></td>+ </tr>+ <tr>+ <td>Pair with Sales on Pioneer call prep</td>+ <td class="owner"><span class="av a-pb">PB</span>Priya</td>+ <td>Thu Oct 16</td>+ <td><span class="pill pill-todo">To do</span></td>+ </tr>+ <tr>+ <td>Draft Q4 theme one-pagers (3)</td>+ <td class="owner"><span class="av a-sl">SL</span>Sasha</td>+ <td>Mon Oct 20</td>+ <td><span class="pill pill-todo">To do</span></td>+ </tr>+ <tr>+ <td>Audit-writer backlog dashboard</td>+ <td class="owner"><span class="av a-ca">CA</span>Caleb</td>+ <td>Tue Oct 21</td>+ <td><span class="pill pill-blocked">Blocked · awaiting Grafana ACL</span></td>+ </tr>+ <tr>+ <td>Switch weekly format to demos-on-Friday</td>+ <td class="owner"><span class="av a-dp">DP</span>Devon</td>+ <td>Mon Oct 20</td>+ <td><span class="pill pill-done">Done</span></td>+ </tr>+ </tbody>+ </table>+ </section>++ <section>+ <h2>Open questions & next meeting</h2>+ <div class="grid">+ <div class="panel">+ <h3>Open questions</h3>+ <p>Do we want a customer in the Q4 mobile-first kickoff (Pioneer would say yes), or do we keep the first session internal?</p>+ <p style="margin-top: 8px;">Should the Friday demo video be capped at 5 min, or open-ended?</p>+ </div>+ <div class="panel">+ <h3>Next meeting</h3>+ <div class="next-meeting"><strong>Date</strong>Tuesday, 21 October 2025</div>+ <div class="next-meeting"><strong>Time</strong>10:00 – 11:00 PT · Zoom</div>+ <div class="next-meeting"><strong>Pre-read</strong>Sasha's Q4 one-pagers (Mon EOD)</div>+ <div class="next-meeting"><strong>Notes by</strong>Mira Reddy (rotation)</div>+ </div>+ </div>+ </section>++ <footer>+ <span>Northwind Growth squad · Notes v1</span>+ <span>Filed in #growth-squad · 15 Oct 2025</span>+ </footer>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/mobile-app/SKILL.md b/src/lib/templates/skills/mobile-app/SKILL.mdnew file mode 100644index 00000000..3371b7f8--- /dev/null+++ b/src/lib/templates/skills/mobile-app/SKILL.md@@ -0,0 +1,21 @@+---+name: mobile-app+zh_name: "iPhone App 单屏"+en_name: "Mobile App Screen"+emoji: "📲"+description: "像素级 iPhone 15 Pro 边框, 一屏 app 截图"+category: mobile+scenario: design+aspect_hint: "iPhone 15 Pro frame"+tags: ["mobile", "ios", "app", "phone"]+---++【模板: iPhone 单屏 App】+【意图】一个屏幕的 mobile app 设计, 放在像素级 iPhone 15 Pro frame 里。+【布局】+- Status bar (时间 + 电池 + 信号)+- App header (标题 / 头像 / 搜索)+- Main content (一个清晰的 archetype: feed / list / detail / form)+- Bottom tab bar (4-5 tab)+【设计细节】+- 真实的 dynamic island; safe-area 留白diff --git a/src/lib/templates/skills/mobile-app/example.html b/src/lib/templates/skills/mobile-app/example.htmlnew file mode 100644index 00000000..386c460b--- /dev/null+++ b/src/lib/templates/skills/mobile-app/example.html@@ -0,0 +1,92 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Tomato — focus screen</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --border: #e6e4e0;+ --accent: #c96442; --surface: #ffffff;+ }+ * { box-sizing: border-box; }+ body { margin: 0; min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 32px; font: 14px/1.5 -apple-system, system-ui, sans-serif; color: var(--fg); }+ .frame { width: 390px; height: 844px; background: black; border-radius: 56px; padding: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.18); position: relative; }+ .frame::before { content: ''; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 124px; height: 36px; background: black; border-radius: 999px; z-index: 5; }+ .screen { width: 100%; height: 100%; background: var(--bg); border-radius: 44px; overflow: hidden; display: flex; flex-direction: column; }+ .status { padding: 14px 24px 6px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }+ .status .right { display: flex; gap: 6px; align-items: center; }+ .header { padding: 56px 24px 24px; }+ .header .greeting { color: var(--muted); font-size: 14px; margin: 0 0 4px; }+ .header h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }+ .timer-card { margin: 12px 24px; background: var(--accent); color: white; border-radius: 24px; padding: 28px 24px; text-align: center; }+ .timer-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; margin: 0 0 4px; }+ .timer-card .countdown { font-size: 64px; line-height: 1; letter-spacing: -0.03em; font-weight: 600; margin: 6px 0 18px; font-variant-numeric: tabular-nums; }+ .timer-card .progress { height: 6px; background: rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }+ .timer-card .progress > span { display: block; width: 38%; height: 100%; background: white; }+ .timer-card .actions { display: flex; gap: 10px; justify-content: center; }+ .timer-card button { font: inherit; cursor: pointer; padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.12); color: white; font-weight: 500; }+ .timer-card button.primary { background: white; color: var(--accent); border-color: white; }+ .section { padding: 18px 24px 0; }+ .section .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }+ .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }+ .stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }+ .stat .v { font-size: 22px; letter-spacing: -0.01em; line-height: 1; margin-bottom: 4px; }+ .stat .l { font-size: 11px; color: var(--muted); }+ .tasks { padding: 18px 24px 8px; }+ .task { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }+ .task:first-child { border-top: none; }+ .check { width: 20px; height: 20px; border: 1.5px solid var(--border); border-radius: 50%; flex-shrink: 0; }+ .task.done .check { background: var(--accent); border-color: var(--accent); }+ .task.done .check::after { content: '✓'; color: white; font-size: 13px; display: block; text-align: center; line-height: 18px; }+ .task .body { flex: 1; }+ .task .title { font-size: 14.5px; line-height: 1.3; }+ .task.done .title { color: var(--muted); text-decoration: line-through; }+ .task .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }+ .tabbar { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: 10px 16px 28px; border-top: 1px solid var(--border); background: var(--surface); }+ .tab { text-align: center; color: var(--muted); font-size: 11px; padding: 6px 0; }+ .tab.active { color: var(--accent); font-weight: 500; }+ .tab .icon { font-size: 18px; line-height: 1; margin-bottom: 4px; }+ </style>+</head>+<body>+ <div class="frame" data-od-id="frame">+ <div class="screen">+ <div class="status"><span>9:41</span><span class="right">·· 5G · 100%</span></div>+ <div class="header" data-od-id="header">+ <p class="greeting">Tuesday · April 22</p>+ <h1>Two pomodoros to lunch.</h1>+ </div>+ <div class="timer-card" data-od-id="timer">+ <p class="label">Focus session</p>+ <div class="countdown">15:42</div>+ <div class="progress"><span></span></div>+ <div class="actions">+ <button>Skip</button>+ <button class="primary">Pause</button>+ </div>+ </div>+ <div class="section" data-od-id="stats">+ <p class="label">Today</p>+ <div class="stats">+ <div class="stat"><div class="v">3</div><div class="l">Sessions</div></div>+ <div class="stat"><div class="v">75m</div><div class="l">Focused</div></div>+ <div class="stat"><div class="v">2</div><div class="l">Tasks done</div></div>+ </div>+ </div>+ <div class="tasks" data-od-id="tasks">+ <p class="section label" style="padding: 0;">Up next</p>+ <div class="task done"><div class="check"></div><div class="body"><div class="title">Review Q2 OKRs</div><div class="meta">25m · completed</div></div></div>+ <div class="task"><div class="check"></div><div class="body"><div class="title">Draft sync-engine post</div><div class="meta">2 sessions estimated</div></div></div>+ <div class="task"><div class="check"></div><div class="body"><div class="title">1:1 prep with Mira</div><div class="meta">1 session</div></div></div>+ </div>+ <nav class="tabbar" data-od-id="tabbar">+ <div class="tab active"><div class="icon">⏱</div>Focus</div>+ <div class="tab"><div class="icon">✓</div>Tasks</div>+ <div class="tab"><div class="icon">📊</div>Stats</div>+ <div class="tab"><div class="icon">⚙</div>Settings</div>+ </nav>+ </div>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/mobile-onboarding/SKILL.md b/src/lib/templates/skills/mobile-onboarding/SKILL.mdnew file mode 100644index 00000000..cb6f9b40--- /dev/null+++ b/src/lib/templates/skills/mobile-onboarding/SKILL.md@@ -0,0 +1,19 @@+---+name: mobile-onboarding+zh_name: "App 引导多屏"+en_name: "Mobile Onboarding"+emoji: "🪂"+description: "三个手机框并排: splash / value-prop / sign-in"+category: mobile+scenario: design+aspect_hint: "3 × iPhone"+featured: 13+tags: ["onboarding", "ios", "signup", "引导"]+---++【模板: App 引导三屏】+【意图】并排展示三个 mobile onboarding 关键屏。+【布局】+- Phone 1: Splash (logo + tagline)+- Phone 2: Value-prop (illustration + 1 句 + dot indicators)+- Phone 3: Sign-in (email / Apple / Google + 主 CTA)diff --git a/src/lib/templates/skills/mobile-onboarding/example.html b/src/lib/templates/skills/mobile-onboarding/example.htmlnew file mode 100644index 00000000..8dc47a2f--- /dev/null+++ b/src/lib/templates/skills/mobile-onboarding/example.html@@ -0,0 +1,206 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Lull · Mobile onboarding</title>+<style>+ :root {+ --canvas: #efece4;+ --ink: #232118;+ --muted: #76715f;+ --accent: #c66e3a;+ --warm: #e8a76e;+ --display: 'Iowan Old Style', 'Charter', Georgia, serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--canvas); font-family: var(--body); color: var(--ink); }+ .stage {+ min-height: 100vh;+ padding: 56px 32px;+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 32px;+ background:+ radial-gradient(ellipse 80% 60% at 50% -10%, rgba(232,167,110,0.35), transparent 70%),+ radial-gradient(ellipse 80% 50% at 50% 110%, rgba(198,110,58,0.16), transparent 70%),+ var(--canvas);+ }+ .stage h1 {+ font-family: var(--display);+ font-size: 28px;+ margin: 0;+ letter-spacing: -0.005em;+ }+ .stage p.lede { color: var(--muted); margin: 0; max-width: 50ch; text-align: center; }++ .phones {+ display: grid;+ grid-template-columns: repeat(3, auto);+ gap: 36px;+ align-items: center;+ }+ .phone {+ width: 320px;+ aspect-ratio: 9 / 19.5;+ background: #fff;+ border-radius: 44px;+ border: 8px solid #1a1814;+ overflow: hidden;+ position: relative;+ box-shadow:+ 0 32px 60px rgba(28,27,26,0.18),+ 0 12px 18px rgba(28,27,26,0.08);+ display: flex;+ flex-direction: column;+ }+ .phone .notch {+ position: absolute; top: 0; left: 50%; transform: translateX(-50%);+ width: 100px; height: 22px;+ background: #1a1814;+ border-bottom-left-radius: 14px;+ border-bottom-right-radius: 14px;+ z-index: 5;+ }+ .statusbar {+ display: flex; justify-content: space-between; align-items: center;+ padding: 14px 24px 4px;+ font-size: 12.5px; font-weight: 600; color: var(--ink);+ }+ .statusbar .right { display: flex; gap: 6px; align-items: center; font-size: 11px; }+ .status-icon { display: inline-block; width: 14px; height: 8px; background: var(--ink); border-radius: 2px; }++ .phone-body {+ flex: 1;+ padding: 18px 24px 24px;+ display: flex;+ flex-direction: column;+ }+ .phone-top { display: flex; justify-content: flex-end; align-items: center; }+ .skip { font-size: 13px; color: var(--muted); }++ .hero { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }+ .hero .art { width: 220px; height: 220px; }++ .copy { display: flex; flex-direction: column; gap: 10px; padding: 14px 4px; }+ .copy h2 { font-family: var(--display); font-size: 30px; line-height: 1.1; margin: 0; letter-spacing: -0.01em; font-weight: 700; }+ .copy p { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.5; }++ .pager { display: flex; justify-content: center; gap: 6px; padding: 14px 0 8px; }+ .pager span { width: 6px; height: 6px; border-radius: 50%; background: rgba(35,33,24,0.18); }+ .pager span.active { width: 22px; background: var(--accent); border-radius: 999px; }++ .cta {+ background: var(--ink); color: #fef9ee;+ padding: 16px 22px; border-radius: 999px;+ text-align: center; font-weight: 600; font-size: 15px;+ }+ .alt { text-align: center; color: var(--muted); padding-top: 12px; font-size: 13px; }+ .alt a { color: var(--accent); font-weight: 600; }++ /* Phone 3 — sign-in */+ .signin-options { display: flex; flex-direction: column; gap: 10px; }+ .opt { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid rgba(35,33,24,0.12); border-radius: 14px; font-weight: 500; font-size: 14.5px; }+ .opt .glyph { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }+ .opt.apple .glyph { background: #000; }+ .opt.google .glyph { background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4); }+ .opt.email .glyph { background: var(--accent); }++ .terms { font-size: 11px; color: var(--muted); text-align: center; padding-top: 14px; line-height: 1.5; }+ .terms a { color: var(--accent); }++ @media (max-width: 1100px) {+ .phones { grid-template-columns: 1fr; }+ .phone { width: 92vw; max-width: 360px; }+ }+</style>+</head>+<body>+<div class="stage">+ <h1>Lull · onboarding flow</h1>+ <p class="lede">Three screens, one tone of voice. Designed in the Lull design system — warm canvas, serif headings, single accent.</p>++ <div class="phones">+ <!-- Screen 1: welcome -->+ <div class="phone">+ <div class="notch"></div>+ <div class="statusbar"><span>9:41</span><div class="right"><span>5G</span><span class="status-icon"></span></div></div>+ <div class="phone-body">+ <div class="phone-top"><span class="skip">Skip</span></div>+ <div class="hero">+ <svg class="art" viewBox="0 0 220 220">+ <defs>+ <radialGradient id="moon1" cx="50%" cy="40%" r="60%">+ <stop offset="0%" stop-color="#fcebd0"/>+ <stop offset="100%" stop-color="#e8a76e"/>+ </radialGradient>+ </defs>+ <circle cx="110" cy="110" r="78" fill="url(#moon1)"/>+ <circle cx="146" cy="92" r="14" fill="#fff" opacity="0.6"/>+ <circle cx="78" cy="74" r="3" fill="#c66e3a" opacity="0.7"/>+ <circle cx="60" cy="120" r="2" fill="#c66e3a" opacity="0.5"/>+ <circle cx="170" cy="140" r="2.5" fill="#c66e3a" opacity="0.6"/>+ <path d="M 30 200 Q 110 170 200 200 L 200 220 L 30 220 Z" fill="#c66e3a" opacity="0.18"/>+ </svg>+ </div>+ <div class="copy">+ <h2>Quiet beats noise.</h2>+ <p>Twelve minutes a day. A practice that fits in a coffee break. No streaks, no badges — just a calmer evening.</p>+ </div>+ <div class="pager"><span class="active"></span><span></span><span></span></div>+ <div class="cta">Continue</div>+ </div>+ </div>++ <!-- Screen 2: value props -->+ <div class="phone">+ <div class="notch"></div>+ <div class="statusbar"><span>9:41</span><div class="right"><span>5G</span><span class="status-icon"></span></div></div>+ <div class="phone-body">+ <div class="phone-top"><span class="skip">Skip</span></div>+ <div class="hero">+ <svg class="art" viewBox="0 0 220 220">+ <rect x="38" y="48" width="144" height="100" rx="14" fill="#fff" stroke="#c66e3a" stroke-width="1.5"/>+ <rect x="56" y="68" width="56" height="6" rx="3" fill="#c66e3a"/>+ <rect x="56" y="84" width="100" height="4" rx="2" fill="#76715f" opacity="0.4"/>+ <rect x="56" y="96" width="80" height="4" rx="2" fill="#76715f" opacity="0.4"/>+ <rect x="56" y="116" width="40" height="20" rx="10" fill="#c66e3a"/>+ <circle cx="170" cy="160" r="22" fill="#e8a76e"/>+ <path d="M 162 160 L 168 166 L 178 154" stroke="#fff" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ </div>+ <div class="copy">+ <h2>Practice that meets you where you are.</h2>+ <p>Adaptive sessions that get shorter on busy days, deeper on quiet ones. The kind of routine that survives a Wednesday.</p>+ </div>+ <div class="pager"><span></span><span class="active"></span><span></span></div>+ <div class="cta">Continue</div>+ </div>+ </div>++ <!-- Screen 3: sign in -->+ <div class="phone">+ <div class="notch"></div>+ <div class="statusbar"><span>9:41</span><div class="right"><span>5G</span><span class="status-icon"></span></div></div>+ <div class="phone-body">+ <div class="phone-top"><span class="skip">Help</span></div>+ <div style="padding: 24px 0;">+ <h2 style="font-family: var(--display); font-size: 32px; margin: 0 0 8px; letter-spacing: -0.01em; line-height: 1.05; font-weight: 700;">Make a place for it.</h2>+ <p style="margin: 0; color: var(--muted); font-size: 15px;">Save your sessions across devices. We don't email, we don't share.</p>+ </div>+ <div class="signin-options">+ <div class="opt apple"><span class="glyph"></span>Continue with Apple</div>+ <div class="opt google"><span class="glyph"></span>Continue with Google</div>+ <div class="opt email"><span class="glyph">@</span>Continue with email</div>+ </div>+ <div style="flex: 1;"></div>+ <div class="terms">By continuing, you agree to Lull's <a>Terms</a> and <a>Privacy Policy</a>.</div>+ <div class="pager"><span></span><span></span><span class="active"></span></div>+ </div>+ </div>+ </div>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/mockup-device-3d/SKILL.md b/src/lib/templates/skills/mockup-device-3d/SKILL.mdnew file mode 100644index 00000000..8a055c6b--- /dev/null+++ b/src/lib/templates/skills/mockup-device-3d/SKILL.md@@ -0,0 +1,46 @@+---+name: mockup-device-3d+zh_name: "iPhone × MacBook 立体展架"+en_name: "Device 3D Showcase"+emoji: "📱"+description: "iPhone + MacBook 仿 GLTF 静态展架, 屏幕内嵌真实 HTML 内容, 玻璃镜头折射, 360° 转盘构图"+category: poster+scenario: product+aspect_hint: "1920×1080 (16:9)"+featured: 47+tags: ["device", "mockup", "iphone", "macbook", "html-in-canvas", "product"]+example_id: sample-mockup-device-3d+example_name: "iPhone × MacBook 立体展架"+example_format: markdown+example_tagline: "HTML-in-Canvas 设备秀"+example_desc: "iPhone 屏幕 + MacBook 屏幕都嵌入真实 UI 内容, 玻璃镜头折射"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · vfx-iphone-device"+---++【模板: 设备 3D 展架 (Device 3D Showcase / HTML-in-Canvas)】+【意图】产品发布、App 演示、设计稿展示。把用户提供的 UI 内容真实渲染到 iPhone / MacBook "屏幕"里, 周围用 CSS 3D transform 模拟 GLTF 模型的玻璃 / 高光 / 折射。Inspired by hyperframes vfx-iphone-device。++【硬性构图】+- **画布**: 1920×1080, 暖灰渐变背景 `radial-gradient(#1a1a1f → #0a0a0f)`, 底部反射地面 (mirror gradient)。+- **iPhone 15 Pro 模型**: 左侧 / 中部, `transform: rotateY(-12deg) rotateX(4deg) translateZ(40px)`; 边框钛金属银 `#a8a8ad` (实心 4px) + 屏幕圆角 56px; 屏幕内嵌 iframe-like div, 真实渲染用户的 HTML 内容 (mobile viewport 375×812)。+- **MacBook Pro 14"** (可选第二台): 右侧, 略小, `rotateY(8deg)`; 上盖屏幕嵌入桌面 viewport 内容 (1440×900 缩放); 底座键盘 + trackpad 用 CSS 阴影线条绘制 (不画键帽细节)。+- **玻璃 / 镜头光斑**: 顶部加 2-3 个 `radial-gradient(ellipse, rgba(255,255,255,0.4) 0%, transparent 60%)` 的椭圆 highlight, 模拟 morphing glass lens。+- **地面反射**: 设备下方 `transform: scaleY(-1)` + `mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent 70%)`。++【屏幕内容来源】+- 用户提供的是文本/数据 → 自动渲染为一个 mock app 界面 (顶部 status bar + 标题 + body + 底部 tab bar 或 home indicator)。+- 用户提供的是 HTML → 原样嵌入屏幕 div 内 (注意缩放 transform 让它适配屏幕宽高)。+- 屏幕内 UI 用 Tailwind, 字号要按 mobile 真实尺寸 (text-sm / text-base, 不要 text-9xl)。++【可选附加元素】+- 右下角 "product slug" 角标: 大 logo + 一行 tagline + 副标 hairline。+- 顶部一行 caption (英文 sans, 字号小, 透明 0.6): 产品 codename / 日期 / 版本。+- 加 8s 自动 CSS 转盘: `@keyframes turntable` rotateY -12 ↔ 12, ease-in-out infinite alternate; 可被 `prefers-reduced-motion` 关闭。++【设计细节】+- **绝不**: 用外部 mockup 图片 URL (任何 unsplash / dribbble link), 全部用 CSS / SVG 绘制设备。+- 字体: 设备外的 caption / logo 用 `Inter Tight` / `SF Pro` 风格; 设备内根据用户内容自适应。+- 背景可选 4 套调色: charcoal / pearl / midnight blue / mocha; 不要彩虹渐变。+- 单文件 HTML; iframe 不要用 srcdoc 嵌套 (容易出问题), 用 `<div class="screen">` + Tailwind 渲染内容。+- 必须用用户真实数据填充屏幕内容, 严禁 lorem ipsum 或 "Your text here"。diff --git a/src/lib/templates/skills/mockup-device-3d/example.html b/src/lib/templates/skills/mockup-device-3d/example.htmlnew file mode 100644index 00000000..0021337f--- /dev/null+++ b/src/lib/templates/skills/mockup-device-3d/example.html@@ -0,0 +1,193 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Device 3D Showcase · HTML-in-Canvas</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;600;700;800&family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" />+<style>+ body {+ font-family:'Inter','Noto Sans SC',system-ui,sans-serif;+ background: radial-gradient(ellipse at 50% 40%, #1a1a22 0%, #08080c 70%);+ color:#f5f5f7;+ min-height:100vh;+ margin:0;+ }+ .stage { perspective: 1800px; }+ .iphone {+ width:280px; height:580px;+ border-radius:46px;+ background:linear-gradient(140deg,#3a3a40 0%,#a8a8ad 35%,#1f1f24 60%,#5a5a60 100%);+ padding:7px;+ box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 60px 80px -20px rgba(0,0,0,0.7);+ transform: rotateY(-14deg) rotateX(4deg) translateZ(40px);+ transform-style: preserve-3d;+ }+ .iphone-screen {+ width:100%; height:100%; border-radius:40px;+ background:#0a0a0e;+ overflow:hidden; position:relative;+ color:#f5f5f7;+ }+ .notch { position:absolute; top:6px; left:50%; transform:translateX(-50%); width:108px; height:28px; background:#000; border-radius:18px; z-index:5; }+ .lens {+ position:absolute; pointer-events:none;+ background: radial-gradient(ellipse at center, rgba(255,255,255,0.3) 0%, transparent 60%);+ mix-blend-mode: screen;+ }+ .mbp {+ width:520px;+ transform: rotateY(10deg) rotateX(-2deg) translateZ(-20px);+ transform-style: preserve-3d;+ }+ .mbp-screen {+ width:100%; height:320px;+ border-radius:14px 14px 4px 4px;+ background:linear-gradient(135deg,#222229 0%,#0a0a0e 100%);+ border: 12px solid #1a1a1f;+ border-bottom: 16px solid #1a1a1f;+ box-shadow: 0 30px 60px -10px rgba(0,0,0,0.7);+ overflow:hidden;+ position:relative;+ color:#f5f5f7;+ }+ .mbp-base {+ width:560px;+ height:14px;+ margin:-2px auto 0;+ background:linear-gradient(180deg,#3a3a40 0%,#1a1a1f 80%);+ border-radius:0 0 14px 14px;+ box-shadow: 0 30px 40px -20px rgba(0,0,0,0.8);+ }+ .mbp-notch {+ position:absolute; top:0; left:50%; transform:translateX(-50%);+ width:90px; height:8px; background:#000; border-radius:0 0 8px 8px; z-index:5;+ }+ .ground {+ position:absolute; bottom:0; left:50%; transform:translateX(-50%);+ width:1100px; height:140px;+ background: radial-gradient(ellipse at center top, rgba(0,0,0,0.6) 0%, transparent 70%);+ }+ .chip { font-size:10px; letter-spacing:0.16em; text-transform:uppercase; }+</style>+</head>+<body class="flex flex-col items-center justify-center p-14 min-h-screen relative overflow-hidden">++ <!-- caption -->+ <header class="absolute top-10 left-12 right-12 flex items-baseline justify-between chip opacity-60">+ <span>HTML ANYTHING — CODENAME ATLAS — v0.4</span>+ <span>2026 SPRING</span>+ <span>HTML-IN-CANVAS</span>+ </header>++ <!-- devices -->+ <div class="stage relative flex items-end gap-20" style="z-index:2">++ <!-- iPhone -->+ <div class="iphone relative">+ <div class="iphone-screen">+ <div class="notch"></div>+ <!-- status bar -->+ <div class="flex items-center justify-between px-7 pt-3 text-[10px] font-semibold relative" style="z-index:6">+ <span>9:41</span>+ <span class="flex items-center gap-1">▮▮▮▮ 5G</span>+ </div>+ <!-- header -->+ <div class="px-6 pt-10">+ <div class="chip opacity-60">新建任务</div>+ <h2 class="text-[22px] font-bold mt-1 leading-tight">杂志风网页<br/>PPT</h2>+ </div>+ <!-- template tile -->+ <div class="mx-6 mt-5 rounded-xl p-3 flex items-center gap-2.5" style="background:linear-gradient(135deg,#1a1a22,#222229);border:1px solid rgba(255,255,255,0.06)">+ <span class="text-xl">📰</span>+ <div class="flex-1">+ <div class="text-[12px] font-semibold">杂志风网页 PPT</div>+ <div class="text-[10px] opacity-60">16:9 横向翻页 · 9 帧</div>+ </div>+ <span class="text-[10px] opacity-50">✓</span>+ </div>+ <!-- input -->+ <div class="mx-6 mt-3 rounded-xl p-3" style="background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.06);min-height:140px">+ <div class="text-[12px] opacity-90">// 公司 2026 Q1 路线图</div>+ <div class="text-[11px] opacity-60 mt-1">- 推出 200 个新模板</div>+ <div class="text-[11px] opacity-60">- 接入 28 个本地 agent</div>+ <div class="text-[11px] opacity-60">- 周活 12K → 80K</div>+ </div>+ <!-- CTA -->+ <div class="mx-6 mt-3 rounded-full py-3 text-center text-[13px] font-semibold" style="background:linear-gradient(135deg,#ff7849,#d97757);color:#08080c">⌘ + Enter 转换</div>+ <!-- tab bar -->+ <div class="absolute bottom-0 left-0 right-0 flex items-center justify-around py-3 backdrop-blur" style="background:rgba(10,10,14,0.85);border-top:1px solid rgba(255,255,255,0.06)">+ <span class="text-[10px] flex flex-col items-center gap-0.5" style="color:#ff7849">■<span>任务</span></span>+ <span class="text-[10px] flex flex-col items-center gap-0.5 opacity-60">▤<span>模板</span></span>+ <span class="text-[10px] flex flex-col items-center gap-0.5 opacity-60">◌<span>设置</span></span>+ </div>+ </div>+ <!-- lens flares -->+ <div class="lens" style="top:-30px;left:-20px;width:160px;height:200px;transform:rotate(-20deg)"></div>+ <div class="lens" style="bottom:50px;right:-30px;width:120px;height:160px"></div>+ </div>++ <!-- MacBook -->+ <div class="mbp relative">+ <div class="mbp-screen">+ <div class="mbp-notch"></div>+ <!-- top bar -->+ <div class="flex items-center gap-1.5 px-3 py-1.5" style="background:#161620;border-bottom:1px solid rgba(255,255,255,0.06)">+ <span class="w-2 h-2 rounded-full bg-red-500"></span>+ <span class="w-2 h-2 rounded-full bg-amber-400"></span>+ <span class="w-2 h-2 rounded-full bg-emerald-400"></span>+ <span class="ml-3 chip opacity-50">localhost:3456 — HTML Anything</span>+ </div>+ <!-- 3-pane layout mini -->+ <div class="grid grid-cols-[1fr_1.4fr_1.4fr] gap-2 p-2 h-[260px]">+ <!-- sidebar -->+ <div class="rounded-md p-2 text-[10px] opacity-80" style="background:#1a1a25;border:1px solid rgba(255,255,255,0.04)">+ <div class="opacity-50 mb-1.5">任务 / 11</div>+ <div class="space-y-1">+ <div class="rounded px-1.5 py-1 truncate" style="background:rgba(255,120,73,0.18);color:#ff7849">● 杂志风网页 PPT</div>+ <div class="rounded px-1.5 py-1 truncate opacity-60">小红书图文卡</div>+ <div class="rounded px-1.5 py-1 truncate opacity-60">Hyperframes 视频</div>+ <div class="rounded px-1.5 py-1 truncate opacity-60">Keynote PPT · 产品介绍</div>+ </div>+ </div>+ <!-- editor -->+ <div class="rounded-md p-2 text-[10px] opacity-90" style="background:#10101a;border:1px solid rgba(255,255,255,0.04);font-family:'JetBrains Mono',monospace">+ <div class="opacity-50">// 输入</div>+ <div class="mt-1"># Open Design — 2026</div>+ <div class="opacity-70">## Q1-Q4 关键指标</div>+ <div class="opacity-70">- 模板: 75 → 200</div>+ <div class="opacity-70">- WAU: 12K → 80K</div>+ <div class="opacity-70">- Agents: 17 → 28</div>+ <div class="opacity-70">- Stars: 4.2K → 25K</div>+ <div class="mt-2 opacity-50">▍</div>+ </div>+ <!-- preview -->+ <div class="rounded-md overflow-hidden relative" style="background:#002FA7">+ <div class="absolute inset-0 p-3 text-white">+ <div class="chip opacity-80">№01 / 22</div>+ <div class="mt-2 font-black text-[16px] leading-tight">Designing<br/>intelligence on<br/>warm paper.</div>+ <div class="absolute bottom-2 left-3 right-3 flex justify-between chip opacity-70">+ <span>OPEN-DESIGN</span><span>BERLIN</span>+ </div>+ </div>+ </div>+ </div>+ </div>+ <div class="mbp-base"></div>+ <!-- lens flares -->+ <div class="lens" style="top:-40px;right:60px;width:200px;height:140px;transform:rotate(10deg)"></div>+ </div>++ </div>++ <!-- ground reflection -->+ <div class="ground"></div>++ <!-- bottom slug -->+ <footer class="absolute bottom-10 left-12 right-12 flex items-baseline justify-between chip opacity-50">+ <span>HTML-ANYTHING.DEV</span>+ <span>GLTF · LIVE-HTML SCREENS · TURNTABLE</span>+ <span>STAGE — 1920 × 1080</span>+ </footer>+</body>+</html>diff --git a/src/lib/templates/skills/mockup-device-3d/example.md b/src/lib/templates/skills/mockup-device-3d/example.mdnew file mode 100644index 00000000..f6c80923--- /dev/null+++ b/src/lib/templates/skills/mockup-device-3d/example.md@@ -0,0 +1,15 @@+# HTML Anything · 移动版界面预览++> iPhone 屏幕展示一个 mock 新建任务页, MacBook 屏幕展示桌面版编辑器++## iPhone 内容+- App: HTML Anything Mobile+- 顶部: 选择模板 → 杂志风网页 PPT+- 中间: 输入框 + ⌘+Enter+- 底部: Tab bar (任务 / 模板 / 设置)++## MacBook 内容+- 桌面版三栏布局: 任务列表 / 编辑器 / 实时预览++## 标签+2026 SPRING · CODENAME ATLAS · v0.4diff --git a/src/lib/templates/skills/motion-frames/SKILL.md b/src/lib/templates/skills/motion-frames/SKILL.mdnew file mode 100644index 00000000..7320ec5c--- /dev/null+++ b/src/lib/templates/skills/motion-frames/SKILL.md@@ -0,0 +1,23 @@+---+name: motion-frames+zh_name: "动效英雄帧"+en_name: "Motion Frames"+emoji: "🌀"+description: "可循环 CSS 动效组合: 旋转环、地球仪、计时器、视差标签"+category: video+scenario: marketing+aspect_hint: "桌面 hero"+featured: 6+tags: ["motion", "title card", "loop", "video poster"]+---++【模板: Motion 帧 / Hero Loop】+【意图】一帧带循环动效的 hero, 可作为视频片头或落地页大图。+【布局】+- Rotating type ring (SVG + transform)+- Animated globe / 抽象几何+- Ticking timer (mono 字体, JS 可有可无)+- Parallax labels 浮动+【设计细节】+- 纯 CSS 动效, 流畅可循环+- 电影感调色 + 1 个霓虹 accentdiff --git a/src/lib/templates/skills/motion-frames/example.html b/src/lib/templates/skills/motion-frames/example.htmlnew file mode 100644index 00000000..36edc0ae--- /dev/null+++ b/src/lib/templates/skills/motion-frames/example.html@@ -0,0 +1,221 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Reach every country — Charlotte & Vine</title>+ <style>+ :root {+ --paper: #f3eee5;+ --ink: #1a1816;+ --muted: #7a766c;+ --accent: #c0563b;+ --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;+ --mono: ui-monospace, 'JetBrains Mono', monospace;+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; height: 100%; }+ body { background: var(--paper); color: var(--ink); font: 14px/1.5 -apple-system, system-ui, sans-serif; overflow: hidden; }+ main {+ position: relative;+ width: 100vw;+ height: 100vh;+ background:+ radial-gradient(circle at 50% 50%, rgba(26,24,22,0.04), transparent 70%),+ radial-gradient(circle, rgba(26,24,22,0.10) 1px, transparent 1.4px) 0 0 / 28px 28px,+ var(--paper);+ overflow: hidden;+ }++ .chrome { position: absolute; left: 36px; right: 36px; font: 10px/1.4 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; }+ .chrome.top { top: 28px; display: flex; justify-content: space-between; align-items: center; }+ .chrome.top .right { display: flex; align-items: center; gap: 22px; }+ .chrome.top .rule { width: 60px; height: 1px; background: var(--ink); opacity: 0.6; }+ .chrome.bot { bottom: 28px; display: flex; justify-content: space-between; align-items: center; }++ .stage {+ position: absolute;+ inset: 0;+ display: grid;+ place-items: center;+ }+ .composition {+ position: relative;+ width: min(78vh, 78vw);+ aspect-ratio: 1 / 1;+ }++ .ring {+ position: absolute;+ inset: 0;+ border-radius: 50%;+ border: 1px solid rgba(26,24,22,0.45);+ animation: spin 60s linear infinite;+ }+ .ring.r2 {+ inset: 4%;+ border-color: rgba(26,24,22,0.30);+ animation-duration: 90s;+ animation-direction: reverse;+ }+ .ring.r3 {+ inset: 10%;+ border-color: rgba(26,24,22,0.22);+ border-style: dashed;+ animation-duration: 180s;+ }+ .ring.r4 {+ inset: 18%;+ border-color: rgba(26,24,22,0.12);+ animation-duration: 36s;+ }++ .ring-labels { position: absolute; inset: 0; animation: spin 60s linear infinite; }+ .ring-labels span {+ position: absolute;+ left: 50%; top: 50%;+ font: 12px/1 var(--serif);+ font-style: italic;+ color: var(--ink);+ letter-spacing: 0.02em;+ transform-origin: 0 0;+ white-space: nowrap;+ }+ .ring-labels span.l1 { transform: rotate(-12deg) translate(0, -49vh); }+ .ring-labels span.l2 { transform: rotate(34deg) translate(0, -49vh); }+ .ring-labels span.l3 { transform: rotate(78deg) translate(0, -49vh); }+ .ring-labels span.l4 { transform: rotate(132deg) translate(0, -49vh); }+ .ring-labels span.l5 { transform: rotate(178deg) translate(0, -49vh); }+ .ring-labels span.l6 { transform: rotate(224deg) translate(0, -49vh); }+ .ring-labels span.l7 { transform: rotate(266deg) translate(0, -49vh); }+ .ring-labels span.l8 { transform: rotate(312deg) translate(0, -49vh); }+ .ring-labels span i { display: inline-block; transform: rotate(0deg); /* counter rotation handled inside */ }++ .globe {+ position: absolute;+ inset: 22%;+ border-radius: 50%;+ animation: spin 38s linear infinite reverse;+ transform-style: preserve-3d;+ }+ .globe svg { width: 100%; height: 100%; display: block; }++ .focal-dot {+ position: absolute;+ left: 50%; top: 50%;+ width: 7px; height: 7px;+ background: var(--accent);+ border-radius: 50%;+ transform: translate(-50%,-50%);+ animation: pulse 2.6s ease-in-out infinite;+ box-shadow: 0 0 0 0 rgba(192,86,59,0.35);+ }++ .meta-tl { position: absolute; top: 96px; left: 56px; font: 10px/1.5 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; }+ .meta-tl b { display: block; color: var(--ink); margin-bottom: 4px; letter-spacing: 0.12em; }+ .issue { position: absolute; top: 96px; right: 56px; font: 9px/1.3 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-align: right; text-transform: uppercase; }+ .issue .num { font: 18px/1 var(--serif); font-style: italic; color: var(--ink); display: block; letter-spacing: 0; margin-bottom: 4px; }++ .headline {+ position: absolute;+ bottom: 80px;+ left: 0; right: 0;+ text-align: center;+ font: 38px/1.1 var(--serif);+ letter-spacing: -0.005em;+ animation: type-in 1.4s cubic-bezier(.2,.7,.2,1) both;+ }+ .headline .em { font-style: italic; color: var(--ink); }+ .headline .accent { font-style: italic; color: var(--accent); padding-left: 4px; padding-right: 4px; }+ .baseline { position: absolute; bottom: 56px; left: 36px; right: 36px; height: 1px; background: rgba(26,24,22,0.25); }++ @keyframes spin {+ to { transform: rotate(360deg); }+ }+ @keyframes pulse {+ 0%, 100% { box-shadow: 0 0 0 0 rgba(192,86,59,0.45); transform: translate(-50%,-50%) scale(1); }+ 50% { box-shadow: 0 0 0 18px rgba(192,86,59,0); transform: translate(-50%,-50%) scale(1.25); }+ }+ @keyframes type-in {+ from { opacity: 0; letter-spacing: 0.06em; }+ to { opacity: 1; letter-spacing: -0.005em; }+ }+ @media (max-width: 900px) {+ .meta-tl { left: 20px; }+ .issue { right: 20px; }+ .headline { font-size: 28px; }+ }+ </style>+</head>+<body>+ <main data-od-id="stage">+ <div class="chrome top">+ <div>ANTHROPIC LABS — APR 17 · 2026</div>+ <div class="right"><div class="rule"></div><div>HOW IT WORKS</div></div>+ </div>++ <div class="meta-tl">+ <b>27 · CHARLOTTE × VINE</b>+ 19 · 2026+ </div>+ <div class="issue">+ <span class="num">175</span>+ LANGUAGES HAPPENING+ </div>++ <div class="stage">+ <div class="composition" data-od-id="composition">+ <div class="ring r1"></div>+ <div class="ring r2"></div>+ <div class="ring r3"></div>+ <div class="ring r4"></div>++ <div class="globe" data-od-id="globe">+ <svg viewBox="0 0 200 200" aria-hidden="true">+ <defs>+ <radialGradient id="globeShade" cx="35%" cy="32%" r="78%">+ <stop offset="0%" stop-color="#fffaf0"/>+ <stop offset="60%" stop-color="#ece6da"/>+ <stop offset="100%" stop-color="#cfc8b9"/>+ </radialGradient>+ </defs>+ <circle cx="100" cy="100" r="92" fill="url(#globeShade)" stroke="rgba(26,24,22,0.35)" stroke-width="0.7"/>+ <g fill="none" stroke="rgba(26,24,22,0.40)" stroke-width="0.7">+ <ellipse cx="100" cy="100" rx="92" ry="20"/>+ <ellipse cx="100" cy="100" rx="92" ry="48"/>+ <ellipse cx="100" cy="100" rx="92" ry="78"/>+ <ellipse cx="100" cy="100" rx="20" ry="92"/>+ <ellipse cx="100" cy="100" rx="48" ry="92"/>+ <ellipse cx="100" cy="100" rx="78" ry="92"/>+ </g>+ <g fill="rgba(26,24,22,0.28)" stroke="rgba(26,24,22,0.55)" stroke-width="0.6">+ <path d="M 64 70 Q 78 58 96 64 L 110 78 Q 102 92 88 96 L 70 92 Q 60 84 64 70 Z"/>+ <path d="M 116 70 Q 138 64 156 80 Q 152 96 138 100 Q 124 96 116 86 Z"/>+ <path d="M 54 110 Q 72 110 84 124 Q 80 142 64 150 Q 50 138 54 110 Z"/>+ <path d="M 102 118 Q 124 112 146 126 Q 142 144 120 152 Q 102 144 102 118 Z"/>+ <path d="M 84 36 Q 98 32 112 38 L 108 50 Q 96 56 84 50 Z"/>+ <path d="M 80 158 Q 96 156 110 162 L 104 174 Q 90 174 80 168 Z"/>+ </g>+ </svg>+ </div>++ <div class="focal-dot"></div>+ </div>+ </div>++ <div class="ring-labels" data-od-id="ring-labels" aria-hidden="true">+ <!-- positioned around the outer ring; co-rotates with .ring -->+ </div>++ <div class="headline" data-od-id="headline">+ <span class="em">Reach</span> every <span class="accent">country.</span>+ </div>+ <div class="baseline"></div>++ <div class="chrome bot">+ <div>SIGNAL · LIVE</div>+ <div>BROADCASTING / 0001</div>+ </div>+ </main>+</body>+</html>diff --git a/src/lib/templates/skills/pm-spec/SKILL.md b/src/lib/templates/skills/pm-spec/SKILL.mdnew file mode 100644index 00000000..5bb357c7--- /dev/null+++ b/src/lib/templates/skills/pm-spec/SKILL.md@@ -0,0 +1,22 @@+---+name: pm-spec+zh_name: "PRD / 产品 Spec"+en_name: "Product Spec / PRD"+emoji: "🧭"+description: "问题 + 成功指标 + 范围 + user stories + 设计 + 发布 + 待解决"+category: doc+scenario: product+aspect_hint: "长页面"+tags: ["prd", "spec", "需求", "product"]+---++【模板: PRD / Product Spec】+【意图】产品需求文档单页, 结构清晰。+【布局】+- Title bar + 状态 pill (draft/approved/shipped)+- Problem & Why now+- Success metrics (3-5 个 KPI)+- Scope (in / out)+- User stories (Given/When/Then)+- Design notes (含占位 mockup)+- Rollout plan + Open questionsdiff --git a/src/lib/templates/skills/pm-spec/example.html b/src/lib/templates/skills/pm-spec/example.htmlnew file mode 100644index 00000000..1d646722--- /dev/null+++ b/src/lib/templates/skills/pm-spec/example.html@@ -0,0 +1,248 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Spec — Two-factor authentication for Northwind</title>+<style>+ :root {+ --bg: #f5f7fa;+ --paper: #ffffff;+ --ink: #0e1322;+ --muted: #5a647a;+ --line: #e2e6ee;+ --line-strong: #c8cfdb;+ --accent: #4a36e3;+ --accent-soft: #ece8ff;+ --warn: #b8741a;+ --positive: #1f8a5a;+ --display: 'Charter', Georgia, serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14.5px; line-height: 1.6; }+ .page { max-width: 1080px; margin: 28px auto; padding: 0 32px 64px; }++ header.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 28px; }+ .top-left { display: flex; align-items: center; gap: 14px; }+ .crumb { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }+ .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }+ .pill.draft { background: var(--accent-soft); color: var(--accent); }+ .pill.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }+ .top-actions { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); }+ .top-actions span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; }++ h1 { font-family: var(--display); font-size: 42px; line-height: 1.06; letter-spacing: -0.015em; margin: 8px 0 8px; max-width: 22ch; font-weight: 700; }+ .summary { font-size: 17px; color: var(--muted); max-width: 64ch; margin: 0 0 28px; }+ .meta-row { display: flex; gap: 32px; margin: 14px 0 36px; padding: 16px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }+ .meta-row span strong { display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; font-weight: 500; }++ section { margin-top: 40px; }+ h2 { font-family: var(--display); font-size: 24px; margin: 0 0 4px; letter-spacing: -0.005em; }+ h2 small { display: block; font-family: var(--body); font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 4px; line-height: 1.5; letter-spacing: 0; }++ /* Problem */+ .problem { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-top: 14px; }+ .panel { padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }+ .quote { padding: 22px 24px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; }+ .quote .body { font-family: var(--display); font-size: 17px; line-height: 1.5; }+ .quote .author { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 12px; text-transform: uppercase; letter-spacing: 0.06em; }++ /* Goals */+ .goals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }+ .goal-list { padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }+ .goal-list h3 { font-family: var(--display); font-size: 16px; margin: 0 0 10px; }+ .goal-list h3 .tick { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; margin-right: 8px; font-size: 11px; }+ .goal-list h3 .tick.yes { background: var(--positive); color: white; }+ .goal-list h3 .tick.no { background: var(--line-strong); color: var(--muted); }+ .goal-list ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }++ /* Metrics table */+ table { width: 100%; border-collapse: collapse; margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }+ th, td { padding: 12px 18px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--line); }+ th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: #f8fafd; }+ tr:last-child td { border-bottom: none; }+ td.target { font-family: var(--mono); color: var(--accent); font-weight: 600; }++ /* Stories */+ .stories { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }+ .story { padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }+ .story-num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: 13px; }+ .story-text { font-size: 14.5px; }+ .story-text strong { color: var(--accent); }++ /* Milestones */+ .timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }+ .step { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; position: relative; }+ .step .badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; background: var(--accent-soft); color: var(--accent); }+ .step h4 { font-family: var(--display); font-size: 15px; margin: 0 0 6px; }+ .step .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 8px; }+ .step ul { padding-left: 16px; margin: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }++ /* Open questions */+ .questions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }+ .question { padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }+ .question p { margin: 0; font-size: 14px; }+ .assignee { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }+ .avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #8473ff); color: white; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }++ footer { margin-top: 60px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }++ @media (max-width: 880px) {+ .problem, .goals { grid-template-columns: 1fr; }+ .timeline { grid-template-columns: 1fr 1fr; }+ h1 { font-size: 32px; }+ }+</style>+</head>+<body>+<div class="page">+ <header class="top">+ <div class="top-left">+ <span class="crumb">Northwind / Specs / Auth</span>+ <span class="pill draft"><span class="pill dot"></span>Draft v0.4</span>+ </div>+ <div class="top-actions">+ <span>Owner · Devon Park</span>+ <span>Updated · 22 Oct 2025</span>+ <span>Reviewers · 4</span>+ </div>+ </header>++ <h1>Two-factor authentication for the Northwind app.</h1>+ <p class="summary">Add TOTP and security-key second factors to the Northwind login flow so enterprise customers can meet their internal controls and we can move from "considered" to "approved" on three pending deals.</p>++ <div class="meta-row">+ <span><strong>Squad</strong>Identity Platform</span>+ <span><strong>Engineering lead</strong>Priya Banerjee</span>+ <span><strong>Design lead</strong>Sasha Lin</span>+ <span><strong>Target launch</strong>End Q4 (Dec 18)</span>+ <span><strong>Effort</strong>~6 eng-weeks</span>+ </div>++ <section>+ <h2>Problem<small>What hurts today, and for whom.</small></h2>+ <div class="problem">+ <div class="panel">+ <p>Three of the last six enterprise security reviews flagged the absence of a second factor as a blocker. Today, password is the only thing standing between a phished credential and a workspace full of customer data — for tenants under SOC 2 Type II expectations that's not just a perception problem, it's a control-plane gap.</p>+ <p>It also affects internal staff: every engineer with prod access is on the same auth surface as a marketing-team viewer. We rely on policy, not posture.</p>+ </div>+ <div class="quote">+ <div class="body">"We love the product, but the absence of TOTP came up in two of three security reviews. Add it and we can sign."</div>+ <div class="author">— Maya Reddy · CTO, Pioneer Robotics</div>+ </div>+ </div>+ </section>++ <section>+ <h2>Goals & non-goals<small>What this spec ships, and what we're explicitly leaving for later.</small></h2>+ <div class="goals">+ <div class="goal-list">+ <h3><span class="tick yes">✓</span>Goals</h3>+ <ul>+ <li>TOTP support (Authy, 1Password, Google Authenticator) for all paid plans.</li>+ <li>Security key support (WebAuthn) for Enterprise plans.</li>+ <li>Workspace-level enforcement: admin can require 2FA for all members.</li>+ <li>Recovery codes — printable, downloadable, regeneratable.</li>+ <li>Audit log entries for setup, change, and removal events.</li>+ </ul>+ </div>+ <div class="goal-list">+ <h3><span class="tick no">×</span>Non-goals</h3>+ <ul>+ <li>SMS as a second factor (NIST deprecated; not adding).</li>+ <li>SSO replacement — SAML stays a separate workstream.</li>+ <li>Per-action step-up (future spec, owned by Identity).</li>+ <li>Custom 2FA brand voice for whitelabel deployments.</li>+ </ul>+ </div>+ </div>+ </section>++ <section>+ <h2>Success metrics<small>We'll judge this launch on the three numbers below at the 30 / 60 / 90 day marks.</small></h2>+ <table>+ <thead><tr><th>Metric</th><th>Baseline</th><th>Target (90d)</th><th>How we measure</th></tr></thead>+ <tbody>+ <tr><td>Enterprise deals unblocked by 2FA gap</td><td>0 of 3</td><td class="target">3 of 3</td><td>Sales motion notes + signed contract count</td></tr>+ <tr><td>Member 2FA adoption (paid workspaces)</td><td>n/a</td><td class="target">≥ 60%</td><td>auth.factor_enrolled events / DAU</td></tr>+ <tr><td>Account takeover incidents (rolling 30d)</td><td>4 last quarter</td><td class="target">≤ 1</td><td>Security incident tracker (SEV-3+)</td></tr>+ <tr><td>Support load from 2FA recovery</td><td>n/a</td><td class="target">< 1.5% of tickets</td><td>Tagged "auth-2fa" in Zendesk</td></tr>+ </tbody>+ </table>+ </section>++ <section>+ <h2>User stories<small>Three personas, three motions.</small></h2>+ <div class="stories">+ <div class="story">+ <div class="story-num">1</div>+ <div class="story-text">As a <strong>workspace admin</strong>, I want to require 2FA for everyone in my workspace, so that I can pass our annual SOC 2 control review.</div>+ </div>+ <div class="story">+ <div class="story-num">2</div>+ <div class="story-text">As a <strong>day-to-day member</strong>, I want to enroll a TOTP app in under two minutes, so that I'm not pulled out of work to reconfigure auth.</div>+ </div>+ <div class="story">+ <div class="story-num">3</div>+ <div class="story-text">As a <strong>support engineer</strong>, I want a clear path to help locked-out users without bypassing their second factor, so that we don't undo the security we just added.</div>+ </div>+ </div>+ </section>++ <section>+ <h2>Rollout milestones<small>Four phases. Each phase ships behind a flag.</small></h2>+ <div class="timeline">+ <div class="step">+ <span class="badge">M1 · Nov 4</span>+ <h4>TOTP enrollment</h4>+ <div class="meta">2 eng-weeks</div>+ <ul><li>Settings page UI</li><li>Recovery codes</li><li>Audit log entries</li></ul>+ </div>+ <div class="step">+ <span class="badge">M2 · Nov 18</span>+ <h4>Login flow</h4>+ <div class="meta">1.5 eng-weeks</div>+ <ul><li>Challenge step in login</li><li>Trusted-device cookie</li><li>Rate limiting</li></ul>+ </div>+ <div class="step">+ <span class="badge">M3 · Dec 2</span>+ <h4>WebAuthn + admin enforcement</h4>+ <div class="meta">2 eng-weeks</div>+ <ul><li>Security keys (Enterprise)</li><li>Workspace policy</li><li>Member nag prompt</li></ul>+ </div>+ <div class="step">+ <span class="badge">M4 · Dec 18</span>+ <h4>GA + comms</h4>+ <div class="meta">0.5 eng-weeks</div>+ <ul><li>Changelog + email</li><li>Help center articles</li><li>Sales enablement</li></ul>+ </div>+ </div>+ </section>++ <section>+ <h2>Open questions<small>Assigned. We need answers by Friday Oct 31 to keep the date.</small></h2>+ <div class="questions">+ <div class="question">+ <p>Should we let members choose between TOTP and security keys, or pick the strongest available factor for them?</p>+ <span class="assignee"><span class="avatar">DP</span>Devon Park · Oct 28</span>+ </div>+ <div class="question">+ <p>Trusted-device cookie lifetime: 7 days, 30 days, or admin-configurable?</p>+ <span class="assignee"><span class="avatar">PB</span>Priya Banerjee · Oct 29</span>+ </div>+ <div class="question">+ <p>Do we surface a member's 2FA status in the admin user list, or only in the audit log?</p>+ <span class="assignee"><span class="avatar">SL</span>Sasha Lin · Oct 30</span>+ </div>+ </div>+ </section>++ <footer>+ <span>Northwind Identity Platform · spec-2fa</span>+ <span>v0.4 · 22 October 2025</span>+ </footer>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/poster-hero/SKILL.md b/src/lib/templates/skills/poster-hero/SKILL.mdnew file mode 100644index 00000000..6e54baf0--- /dev/null+++ b/src/lib/templates/skills/poster-hero/SKILL.md@@ -0,0 +1,25 @@+---+name: poster-hero+zh_name: "营销海报"+en_name: "Marketing Poster"+emoji: "🖼️"+description: "竖版海报 / 朋友圈分享图, 强视觉冲击"+category: poster+scenario: marketing+aspect_hint: "1080×1920 竖版"+tags: ["poster", "海报", "朋友圈"]+example_id: sample-poster-launch+example_name: "营销海报 · 产品发布"+example_format: markdown+example_tagline: "9:16 朋友圈分享图"+example_desc: "高对比度发布海报, 含 QR 码占位 + 渐变 mesh + 噪点纹理"+---++【模板: 营销海报】+- 容器 `w-[1080px] h-[1920px] mx-auto`, 全屏渐变 / mesh 背景。+- 上部 30% 留白 + 一个大 emoji 或抽象几何图形。+- 中部主标题占视觉中心 (text-8xl, font-black), 一句话副标题。+- 下部信息卡片: 3-5 条核心要点用图标 + 短句。+- 底部右下角放品牌 / 二维码 (用 SVG 占位)。+- 使用大胆的色彩: 渐变背景 (from-violet-500 via-fuchsia-500 to-indigo-500 之类), 文字白色 + 1 个对比色高亮。+- 使用 SVG 做装饰性元素 (圆 / 三角 / 波浪 / 噪点纹理)。diff --git a/src/lib/templates/skills/poster-hero/example.html b/src/lib/templates/skills/poster-hero/example.htmlnew file mode 100644index 00000000..3720cf64--- /dev/null+++ b/src/lib/templates/skills/poster-hero/example.html@@ -0,0 +1,88 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>HTML Anything 0.1 海报</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@600;700;800;900&family=Noto+Sans+SC:wght@500;700;900&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">+<style>+ body { margin:0; background:#0a0a0a; font-family:'Inter Tight','Noto Sans SC',sans-serif; display:grid; place-items:center; padding:24px 0; }+ .poster { position:relative; width:1080px; max-width:96vw; aspect-ratio:9/16; border-radius:32px; overflow:hidden; color:#fff;+ background:+ radial-gradient(ellipse at 80% 0%, rgba(233,185,74,0.55), transparent 55%),+ radial-gradient(ellipse at 20% 100%, rgba(108,58,166,0.5), transparent 55%),+ linear-gradient(135deg,#c96442 0%,#15140f 60%,#1a0e2b 100%);+ display:flex; flex-direction:column; padding:80px 70px;+ box-shadow:0 40px 120px -20px rgba(0,0,0,0.7);+ }+ .grain { position:absolute; inset:0; pointer-events:none; opacity:0.18; background-image:radial-gradient(rgba(255,255,255,0.4) 1px, transparent 1px); background-size:3px 3px; }+ .label { font-size:13px; font-weight:600; letter-spacing:0.28em; text-transform:uppercase; opacity:0.85; }+ .glyph { width:120px; height:120px; border-radius:32px; display:grid; place-items:center; background:rgba(255,255,255,0.08); backdrop-filter:blur(12px); border:1px solid rgba(255,255,255,0.18); }+ h1 { font-family:'Inter Tight',sans-serif; font-weight:900; font-size:148px; line-height:0.95; letter-spacing:-0.04em; margin:0; }+ .em { font-family:Georgia, 'Noto Serif SC', serif; font-weight:700; font-style:italic; color:#e9b94a; }+ .feature { display:flex; align-items:flex-start; gap:18px; }+ .feature .ic { width:42px; height:42px; border-radius:12px; background:rgba(255,255,255,0.12); display:grid; place-items:center; font-size:22px; flex-shrink:0; }+ .feature .t { font-size:22px; font-weight:600; }+ .feature .d { font-size:15px; opacity:0.7; line-height:1.55; margin-top:4px; }+ .qr { width:120px; height:120px; border-radius:14px; background:#fff; padding:12px; }+ .qr svg { width:100%; height:100%; }+</style>+</head>+<body>+<div class="poster">+ <div class="grain"></div>++ <div class="flex items-center justify-between">+ <div class="label">RELEASE · 2026.05</div>+ <div class="glyph">+ <div style="font-family:Georgia,serif; font-style:italic; font-size:78px; font-weight:700; color:#fff">H</div>+ </div>+ </div>++ <div style="margin:auto 0; flex:none">+ <div class="label" style="margin-bottom:24px">v0.1 · 已发布 / Now Available</div>+ <h1>HTML<br/><span class="em">Anything</span></h1>+ <div style="font-size:30px; font-weight:500; opacity:0.92; margin-top:36px; max-width:560px; line-height:1.35">+ 任何文档 → 世界级好看的 HTML,<br/>+ 用你<span class="em" style="color:#e9b94a">本地</span>的 AI agent。+ </div>+ </div>++ <div style="display:grid; grid-template-columns:1fr; gap:18px; margin:48px 0 32px">+ <div class="feature"><div class="ic">🎨</div><div><div class="t">9 套世界级模板</div><div class="d">PPT · 简历 · 海报 · 小红书 · 数据报告 …</div></div></div>+ <div class="feature"><div class="ic">🔌</div><div><div class="t">8 个本地 agent 自动检测</div><div class="d">Claude / Cursor / Codex / Gemini / Copilot …</div></div></div>+ <div class="feature"><div class="ic">🗝️</div><div><div class="t">0 API Key</div><div class="d">复用你已经登录的 CLI session, 0 边际成本</div></div></div>+ <div class="feature"><div class="ic">📋</div><div><div class="t">一键发布</div><div class="d">公众号 / 推特 / 知乎 / PNG, 直接粘贴</div></div></div>+ </div>++ <div style="display:flex; align-items:center; gap:24px; padding-top:24px; border-top:1px solid rgba(255,255,255,0.18)">+ <div class="qr">+ <svg viewBox="0 0 33 33" xmlns="http://www.w3.org/2000/svg">+ <rect width="33" height="33" fill="#fff"/>+ <g fill="#0a0a0a">+ <rect x="2" y="2" width="9" height="9" fill="none" stroke="#0a0a0a" stroke-width="2"/>+ <rect x="5" y="5" width="3" height="3"/>+ <rect x="22" y="2" width="9" height="9" fill="none" stroke="#0a0a0a" stroke-width="2"/>+ <rect x="25" y="5" width="3" height="3"/>+ <rect x="2" y="22" width="9" height="9" fill="none" stroke="#0a0a0a" stroke-width="2"/>+ <rect x="5" y="25" width="3" height="3"/>+ <rect x="13" y="2" width="2" height="2"/><rect x="17" y="2" width="2" height="2"/>+ <rect x="13" y="6" width="2" height="2"/><rect x="15" y="9" width="2" height="2"/>+ <rect x="2" y="13" width="2" height="2"/><rect x="6" y="13" width="2" height="2"/>+ <rect x="13" y="13" width="2" height="2"/><rect x="17" y="13" width="2" height="2"/><rect x="21" y="13" width="2" height="2"/>+ <rect x="13" y="17" width="2" height="2"/><rect x="19" y="15" width="2" height="2"/>+ <rect x="22" y="17" width="2" height="2"/><rect x="26" y="17" width="2" height="2"/>+ <rect x="13" y="21" width="2" height="2"/><rect x="17" y="21" width="2" height="2"/>+ <rect x="22" y="22" width="2" height="2"/><rect x="26" y="26" width="2" height="2"/>+ <rect x="22" y="29" width="2" height="2"/><rect x="29" y="22" width="2" height="2"/>+ </g>+ </svg>+ </div>+ <div>+ <div style="font-family:'JetBrains Mono',monospace; font-size:14px; opacity:0.95">$ pnpm dlx html-anything</div>+ <div style="font-size:14px; opacity:0.7; margin-top:6px">github.com/your-org/html-anything</div>+ </div>+ </div>+</div>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/poster-hero/example.md b/src/lib/templates/skills/poster-hero/example.mdnew file mode 100644index 00000000..b247ea10--- /dev/null+++ b/src/lib/templates/skills/poster-hero/example.md@@ -0,0 +1,13 @@+# HTML Anything 0.1 已发布++## 一句话+任何文档 → 世界级好看的 HTML, 用你本地的 AI agent++## 特性+- 9 套世界级模板+- 8 个本地 agent 自动检测+- 0 API Key, 复用本地登录 session+- 一键复制到公众号 / 推特 / 知乎++## CTA+github.com/your-org/html-anything · 一行命令跑起来diff --git a/src/lib/templates/skills/ppt-keynote/SKILL.md b/src/lib/templates/skills/ppt-keynote/SKILL.mdnew file mode 100644index 00000000..fc3f5cc5--- /dev/null+++ b/src/lib/templates/skills/ppt-keynote/SKILL.md@@ -0,0 +1,27 @@+---+name: ppt-keynote+zh_name: "Keynote 风格 PPT"+en_name: "Keynote-style Slides"+emoji: "🎬"+description: "苹果 Keynote 级别幻灯片, 一屏一卡, 键盘左右切换"+category: slides+scenario: marketing+aspect_hint: "16:9 (1280×720)"+featured: 19+tags: ["slides", "deck", "presentation", "幻灯片", "演讲"]+example_id: sample-ppt-html-anything+example_name: "Keynote PPT · 产品介绍"+example_format: markdown+example_tagline: "7 张幻灯片讲清产品"+example_desc: "苹果 Keynote 风格的产品介绍, ←/→ 切换"+---++【模板: Keynote 风格 PPT】+- 每张幻灯片是一个 `<section class="slide">`, 整体宽 1280 高 720, 居中显示, 背景渐变。+- 单页内容极简: 大标题 + 1-3 行支持文字; 或一张数据图; 或一个金句。+- 字号: 标题 `text-7xl font-semibold tracking-tight`, 副标题 `text-2xl text-neutral-500`。+- 第一页是封面 (主题 + 演讲者 / 日期), 最后一页是 "Thanks." 或行动号召。+- 顶部右上角小指示器: 当前页 / 总页数。+- 加一段 JavaScript 监听 ArrowLeft / ArrowRight / 空格键切换 slide; 同时维护 hash (#/3)。+- 每页之间用 fade-in 动画。+- 保持留白, 数据卡片用 grid 布局对齐, 颜色克制。diff --git a/src/lib/templates/skills/ppt-keynote/example.html b/src/lib/templates/skills/ppt-keynote/example.htmlnew file mode 100644index 00000000..c89af553--- /dev/null+++ b/src/lib/templates/skills/ppt-keynote/example.html@@ -0,0 +1,130 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>HTML Anything · 产品介绍</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">+<style>+ body { margin:0; background:#0a0a0a; font-family:'Inter Tight','Noto Sans SC',sans-serif; }+ .deck { display:flex; flex-direction:column; align-items:center; gap:32px; padding:40px 0; }+ .slide { position:relative; width:1280px; max-width:96vw; aspect-ratio:16/9; border-radius:18px; overflow:hidden; box-shadow:0 30px 80px -20px rgba(0,0,0,0.7); display:flex; flex-direction:column; padding:64px 80px; color:#0a0a0a; background:#fafaf7; }+ .slide.dark { background:#15140f; color:#fafaf7; }+ .slide.brand { background:linear-gradient(135deg,#c96442 0%,#e9b94a 100%); color:#fff; }+ .slide .num { position:absolute; top:24px; right:32px; font-family:'JetBrains Mono',monospace; font-size:11px; letter-spacing:0.18em; opacity:0.55; }+ .slide .eyebrow { font-size:12px; font-weight:600; letter-spacing:0.22em; text-transform:uppercase; opacity:0.65; margin-bottom:20px; }+ .slide h1 { font-size:84px; font-weight:800; line-height:1.05; letter-spacing:-0.025em; margin:0; }+ .slide h2 { font-size:64px; font-weight:700; line-height:1.1; letter-spacing:-0.02em; margin:0 0 24px; }+ .slide p { font-size:24px; line-height:1.5; opacity:0.78; max-width:65ch; }+ .grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-top:auto; }+ .card { padding:28px; border-radius:14px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.08); }+ .card .k { font-size:48px; font-weight:700; letter-spacing:-0.02em; margin-bottom:8px; }+ .card .l { font-size:14px; opacity:0.65; }+</style>+</head>+<body>+<div class="deck">++ <section class="slide brand">+ <span class="num">01 / 07</span>+ <div class="eyebrow">Product · 2026</div>+ <h1 style="margin-top:auto">HTML <em style="font-family:Georgia,serif;font-style:italic;font-weight:400">Anything</em></h1>+ <p style="font-size:28px; opacity:0.95; margin-top:24px">把任何文档、数据, 用本地 AI agent, 一键转成世界级好看的 HTML。</p>+ <div style="margin-top:auto; display:flex; align-items:center; gap:16px; font-size:14px; opacity:0.85">+ <div style="width:32px;height:32px;border-radius:999px;background:rgba(255,255,255,0.25);display:grid;place-items:center;font-family:Georgia,serif;font-style:italic;font-weight:600">H</div>+ <span>Tom Pan · 5 月 11 日</span>+ </div>+ </section>++ <section class="slide">+ <span class="num">02 / 07</span>+ <div class="eyebrow" style="color:#c96442">问题</div>+ <h2>Markdown 易写,<br/>但<span style="color:#c96442">发出去就丑</span>。</h2>+ <ul style="font-size:24px; line-height:2; opacity:0.78; list-style:none; padding:0">+ <li>· 截图发推, 默认是 14px 宋体压缩 jpg</li>+ <li>· 复制到公众号, 排版被微信彻底重写</li>+ <li>· 知乎、小红书、Notion 各家规则不一</li>+ </ul>+ </section>++ <section class="slide dark">+ <span class="num">03 / 07</span>+ <div class="eyebrow" style="color:#e9b94a">方案</div>+ <h2 style="font-size:96px; margin-top:auto; margin-bottom:auto">+ 任何输入 →<br/>+ <span style="font-family:Georgia,serif;font-style:italic;font-weight:600;color:#e9b94a">世界级 HTML</span>+ </h2>+ <p style="font-size:22px;opacity:0.6">用你本地已经登录的 Claude / Cursor / Codex, 0 API Key 边际成本。</p>+ </section>++ <section class="slide">+ <span class="num">04 / 07</span>+ <div class="eyebrow">三个核心</div>+ <h2>三件让它好用的事</h2>+ <div class="grid3" style="grid-template-columns:repeat(3,1fr); gap:20px">+ <div class="card" style="background:#f4f1ec; border-color:#e7e5e0; color:#15140f">+ <div style="font-size:36px; margin-bottom:14px">🔌</div>+ <div style="font-weight:600; font-size:18px; margin-bottom:6px">本地 Agent</div>+ <div style="font-size:14px; opacity:0.7; line-height:1.6">复用你已经登录的 CLI session, 不要求 API Key</div>+ </div>+ <div class="card" style="background:#f4f1ec; border-color:#e7e5e0; color:#15140f">+ <div style="font-size:36px; margin-bottom:14px">🎨</div>+ <div style="font-weight:600; font-size:18px; margin-bottom:6px">9 套模板</div>+ <div style="font-size:14px; opacity:0.7; line-height:1.6">PPT · 简历 · 海报 · 小红书 · 数据报告 ...</div>+ </div>+ <div class="card" style="background:#f4f1ec; border-color:#e7e5e0; color:#15140f">+ <div style="font-size:36px; margin-bottom:14px">📋</div>+ <div style="font-weight:600; font-size:18px; margin-bottom:6px">一键发布</div>+ <div style="font-size:14px; opacity:0.7; line-height:1.6">公众号 / 推特 / 知乎 / PNG, 直接粘贴</div>+ </div>+ </div>+ </section>++ <section class="slide dark">+ <span class="num">05 / 07</span>+ <div class="eyebrow" style="color:#e9b94a">数据</div>+ <h2>已经在跑</h2>+ <div class="grid3">+ <div class="card"><div class="k" style="color:#e9b94a">80<span style="font-size:24px">s</span></div><div class="l">生成 31KB 可交付文章</div></div>+ <div class="card"><div class="k" style="color:#e9b94a">9</div><div class="l">套世界级模板</div></div>+ <div class="card"><div class="k" style="color:#e9b94a">8</div><div class="l">个本地 agent 适配</div></div>+ </div>+ </section>++ <section class="slide">+ <span class="num">06 / 07</span>+ <div class="eyebrow" style="color:#c96442">为什么是现在</div>+ <h2 style="font-size:56px; margin-top:auto; margin-bottom:auto">+ Claude 团队不再用 markdown,<br/>+ <span style="font-family:Georgia,serif;font-style:italic;font-weight:600;color:#c96442">全换成了 HTML。</span>+ </h2>+ <p>HTML 是面向读者的最终形态, AI 让"啰嗦"不再是问题。</p>+ </section>++ <section class="slide brand">+ <span class="num">07 / 07</span>+ <h1 style="margin:auto 0; font-size:120px">Thanks.</h1>+ <div style="display:flex; align-items:flex-end; justify-content:space-between; font-size:18px">+ <div>+ <div style="font-family:'JetBrains Mono',monospace; font-size:16px; opacity:0.85">$ pnpm dev</div>+ <div style="opacity:0.85; margin-top:6px">→ http://localhost:3000 → ⌘+Enter</div>+ </div>+ <div style="opacity:0.7">github.com/your-org/html-anything</div>+ </div>+ </section>++</div>+<script>+ // ←/→ scroll between slides; current implementation just smooth-scrolls+ const slides=document.querySelectorAll('.slide');+ let i=0;+ document.addEventListener('keydown', e=>{+ if(e.key==='ArrowRight') i=Math.min(i+1, slides.length-1);+ else if(e.key==='ArrowLeft') i=Math.max(i-1,0);+ else return;+ slides[i].scrollIntoView({behavior:'smooth', block:'center'});+ });+</script>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/ppt-keynote/example.md b/src/lib/templates/skills/ppt-keynote/example.mdnew file mode 100644index 00000000..595bb9f6--- /dev/null+++ b/src/lib/templates/skills/ppt-keynote/example.md@@ -0,0 +1,25 @@+# HTML Anything · 产品介绍++## 我们解决的问题+- Markdown 易写但发出去丑+- 截图发推丑得离谱+- 公众号 / 知乎 各家排版规则不一++## 我们的方案+**任何输入 → 世界级 HTML**, 用你本地的 AI agent++## 三个核心+1. 复用你已经登录的本地 agent (Claude / Cursor / Codex), 不要 API Key+2. 9 套世界级模板 (PPT / 简历 / 海报 / 小红书 / 数据报告 ...)+3. 一键复制到公众号 / 推特 / 知乎, 或导出 PNG++## 数据+- 80 秒生成 31KB 的可交付文章+- 9 套模板, 8 个本地 agent 适配+- 0 API Key, 100% 复用本地 session++## 为什么是现在+Claude 团队不再用 markdown, 全换成 HTML 了。HTML 是面向读者的最终形态, AI 让"啰嗦"不再是问题。++## 立即开始+`pnpm dev` → 打开浏览器 → ⌘+Enterdiff --git a/src/lib/templates/skills/pricing-page/SKILL.md b/src/lib/templates/skills/pricing-page/SKILL.mdnew file mode 100644index 00000000..26a00b8b--- /dev/null+++ b/src/lib/templates/skills/pricing-page/SKILL.md@@ -0,0 +1,20 @@+---+name: pricing-page+zh_name: "定价页"+en_name: "Pricing Page"+emoji: "💳"+description: "三档定价 + 特性对比表 + FAQ"+category: prototype+scenario: sales+aspect_hint: "桌面 1440"+tags: ["pricing", "plans", "定价"]+---++【模板: 定价页】+【意图】标准 SaaS 三档定价页, 一眼对齐价值与价格。+【布局】+- Header + monthly/annual 切换+- 3 档定价卡片 (Free / Pro / Enterprise), 中间档 popular 高亮+- 完整特性对比表 (✓ / – / 不同档勾)+- FAQ (details/summary)+- 底部 CTAdiff --git a/src/lib/templates/skills/pricing-page/example.html b/src/lib/templates/skills/pricing-page/example.htmlnew file mode 100644index 00000000..3086a6dc--- /dev/null+++ b/src/lib/templates/skills/pricing-page/example.html@@ -0,0 +1,127 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Pricing — Filebase</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --border: #e6e4e0;+ --accent: #c96442; --surface: #ffffff;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 -apple-system, system-ui, sans-serif; }+ .wrap { max-width: 1080px; margin: 0 auto; padding: 64px 32px 96px; }+ header { text-align: center; margin-bottom: 64px; }+ header h1 { font-size: clamp(40px, 5vw, 60px); letter-spacing: -0.02em; margin: 0 0 14px; }+ header p { font-size: 18px; color: var(--muted); margin: 0 auto; max-width: 50ch; }+ .toggle { display: inline-flex; margin-top: 28px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); overflow: hidden; }+ .toggle button { font: inherit; cursor: pointer; padding: 8px 18px; border: none; background: transparent; color: var(--muted); }+ .toggle button.active { background: var(--fg); color: white; }+ .tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 64px; }+ @media (max-width: 800px) { .tiers { grid-template-columns: 1fr; } }+ .tier { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 36px 32px; }+ .tier.featured { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(201,100,66,0.08); }+ .tier h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }+ .tier .desc { color: var(--muted); font-size: 14px; margin: 0 0 24px; }+ .tier .price { font-size: 48px; letter-spacing: -0.025em; line-height: 1; margin-bottom: 6px; }+ .tier .price small { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }+ .tier ul { list-style: none; padding: 0; margin: 24px 0 28px; font-size: 14px; }+ .tier ul li { padding: 8px 0; color: var(--fg); border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }+ .tier ul li::before { content: '✓'; color: var(--accent); flex-shrink: 0; }+ .tier ul li:first-child { border-top: none; }+ button.cta { font: inherit; cursor: pointer; padding: 12px 18px; border-radius: 8px; width: 100%; font-weight: 500; }+ .cta-primary { background: var(--accent); color: white; border: 1px solid var(--accent); }+ .cta-secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }+ .featured-pill { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: white; margin-bottom: 12px; letter-spacing: 0.04em; text-transform: uppercase; }+ .compare { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }+ .compare h3 { padding: 24px 28px; margin: 0; font-size: 16px; border-bottom: 1px solid var(--border); }+ table { width: 100%; border-collapse: collapse; font-size: 14px; }+ th, td { padding: 12px 18px; text-align: left; border-top: 1px solid var(--border); }+ th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; background: var(--bg); }+ td.has { color: var(--accent); font-weight: 500; }+ td.no { color: var(--muted); }+ .faq { margin-top: 56px; }+ .faq h3 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 24px; }+ details { padding: 16px 0; border-top: 1px solid var(--border); }+ details summary { font-weight: 500; cursor: pointer; }+ details p { margin: 10px 0 0; color: var(--muted); }+ </style>+</head>+<body>+ <div class="wrap">+ <header data-od-id="header">+ <h1>One flat rate. No throttling.</h1>+ <p>Start free. Pick a paid tier the day you outgrow it. Switch yearly billing for two months off.</p>+ <div class="toggle">+ <button class="active">Monthly</button>+ <button>Yearly · save 17%</button>+ </div>+ </header>++ <section class="tiers" data-od-id="tiers">+ <div class="tier">+ <h2>Solo</h2>+ <p class="desc">For individuals.</p>+ <div class="price">$8 <small>/ month</small></div>+ <ul>+ <li>1 TB storage</li>+ <li>Block-level sync</li>+ <li>2 devices</li>+ <li>Email support</li>+ </ul>+ <button class="cta cta-secondary">Choose Solo</button>+ </div>+ <div class="tier featured">+ <span class="featured-pill">Recommended</span>+ <h2>Team</h2>+ <p class="desc">For teams up to 50 people.</p>+ <div class="price">$14 <small>/ seat / month</small></div>+ <ul>+ <li>5 TB pooled storage</li>+ <li>Shared folders & granular roles</li>+ <li>Unlimited devices</li>+ <li>Audit log + usage analytics</li>+ <li>Priority support</li>+ </ul>+ <button class="cta cta-primary">Choose Team</button>+ </div>+ <div class="tier">+ <h2>Enterprise</h2>+ <p class="desc">SSO, on-prem keys, 99.99% SLA.</p>+ <div class="price">Custom</div>+ <ul>+ <li>Unlimited storage</li>+ <li>SAML / SCIM provisioning</li>+ <li>On-prem encryption keys</li>+ <li>Dedicated CSM</li>+ </ul>+ <button class="cta cta-secondary">Talk to sales</button>+ </div>+ </section>++ <section class="compare" data-od-id="compare">+ <h3>Plan comparison</h3>+ <table>+ <thead><tr><th>Feature</th><th>Solo</th><th>Team</th><th>Enterprise</th></tr></thead>+ <tbody>+ <tr><td>Block-level sync</td><td class="has">✓</td><td class="has">✓</td><td class="has">✓</td></tr>+ <tr><td>End-to-end encryption</td><td class="has">✓</td><td class="has">✓</td><td class="has">✓</td></tr>+ <tr><td>Shared folders</td><td class="no">—</td><td class="has">✓</td><td class="has">✓</td></tr>+ <tr><td>SAML / SCIM</td><td class="no">—</td><td class="no">—</td><td class="has">✓</td></tr>+ <tr><td>Audit log</td><td class="no">—</td><td class="has">✓</td><td class="has">✓</td></tr>+ <tr><td>SLA</td><td class="no">—</td><td>99.9%</td><td>99.99%</td></tr>+ <tr><td>Support</td><td>Email</td><td>Priority</td><td>Dedicated CSM</td></tr>+ </tbody>+ </table>+ </section>++ <section class="faq" data-od-id="faq">+ <h3>Common questions</h3>+ <details><summary>Can I change tiers mid-month?</summary><p>Yes. Switching upward charges a prorated difference; downgrades take effect at the next billing cycle.</p></details>+ <details><summary>Is there a free tier?</summary><p>14-day free trial on every paid tier. No credit card required.</p></details>+ <details><summary>How does seat-based billing work for Team?</summary><p>You pay per active seat per month. Inactive seats automatically free up after 30 days; we'll prorate the credit.</p></details>+ </section>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/prototype-web/SKILL.md b/src/lib/templates/skills/prototype-web/SKILL.mdnew file mode 100644index 00000000..2f2a9a20--- /dev/null+++ b/src/lib/templates/skills/prototype-web/SKILL.md@@ -0,0 +1,24 @@+---+name: prototype-web+zh_name: "Web 产品原型"+en_name: "Web Prototype"+emoji: "🛠️"+description: "可点击的功能性 Web 原型, 含导航、英雄区、特性区、CTA"+category: prototype+scenario: design+aspect_hint: "1440×900 桌面"+tags: ["prototype", "landing", "原型"]+example_id: sample-prototype-inkstack+example_name: "Web 原型 · SaaS Landing"+example_format: markdown+example_tagline: "完整可点击的 SaaS 落地页"+example_desc: "Hero / Features / How / Voices / Pricing / Footer 一步到位"+---++【模板: Web 产品原型】+- 输出一个完整的产品 landing page。+- Sections: Top Nav (logo + 导航 + CTA 按钮) → Hero (大标题 + 副标 + 双 CTA + 可视化占位) → Features (3-6 个特性卡) → How it works (步骤) → Social proof (logo wall / 评价) → Pricing (可选) → Footer。+- 使用现代 SaaS 设计趋势: 大字号、柔和渐变、glassmorphism 卡片、滚动到视图入场动画 (pure CSS 即可)。+- 响应式: 移动端单栏, 桌面多栏; 至少处理 `md:` 断点。+- 添加交互: nav 滚动变色; 特性卡 hover 浮起; FAQ 可手风琴展开 (用 `<details>`)。+- 这是高保真原型, 应该让人觉得"明天就能上线"。diff --git a/src/lib/templates/skills/prototype-web/example.html b/src/lib/templates/skills/prototype-web/example.htmlnew file mode 100644index 00000000..82d8d270--- /dev/null+++ b/src/lib/templates/skills/prototype-web/example.html@@ -0,0 +1,233 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Inkstack — 让 AI 替你写运营文档</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&display=swap" rel="stylesheet">+<style>+ body { margin:0; font-family:'Inter Tight','Noto Sans SC',sans-serif; background:#fafaf7; color:#15140f; -webkit-font-smoothing:antialiased; }+ .accent { color:#c96442; }+ .glass { background:rgba(255,255,255,0.7); backdrop-filter:blur(14px); border:1px solid rgba(21,20,15,0.06); }+ .grad-text { background:linear-gradient(120deg,#15140f 0%,#c96442 60%,#e9b94a 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }+ .gradient-bg { background:radial-gradient(ellipse at 20% 0%, rgba(201,100,66,0.18), transparent 55%), radial-gradient(ellipse at 80% 60%, rgba(233,185,74,0.15), transparent 55%); }+ details summary::-webkit-details-marker { display:none; }+ details summary { cursor:pointer; list-style:none; }+ .card-rise { transition:transform 0.25s ease, box-shadow 0.25s ease; }+ .card-rise:hover { transform:translateY(-4px); box-shadow:0 30px 60px -30px rgba(21,20,15,0.2); }+</style>+</head>+<body>++<nav class="sticky top-0 z-30 glass">+ <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between">+ <a href="#" class="flex items-center gap-2.5 font-bold tracking-tight">+ <div class="w-8 h-8 rounded-lg bg-gradient-to-br from-[#c96442] to-[#e9b94a] grid place-items-center text-white font-black">Ⅰ</div>+ <span>Inkstack</span>+ </a>+ <div class="hidden md:flex items-center gap-7 text-sm text-[#5a564e]">+ <a href="#features" class="hover:text-[#15140f]">特性</a>+ <a href="#how" class="hover:text-[#15140f]">原理</a>+ <a href="#voices" class="hover:text-[#15140f]">用户</a>+ <a href="#pricing" class="hover:text-[#15140f]">价格</a>+ </div>+ <div class="flex items-center gap-2">+ <a href="#" class="hidden sm:inline text-sm font-medium text-[#5a564e] hover:text-[#15140f] px-3 py-2">登录</a>+ <a href="#cta" class="text-sm font-semibold bg-[#15140f] text-white px-4 py-2 rounded-full hover:bg-[#2a2620] transition-colors">免费开始 →</a>+ </div>+ </div>+</nav>++<section class="gradient-bg pt-24 pb-32 px-6">+ <div class="max-w-5xl mx-auto text-center">+ <div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/70 border border-[#e7e5e0] text-xs font-medium text-[#5a564e] mb-7">+ <span class="w-1.5 h-1.5 rounded-full bg-[#c96442]"></span>+ v1.0 · 已为 800+ 团队节省 12,000+ 小时+ </div>+ <h1 class="text-6xl md:text-7xl font-extrabold tracking-tight leading-[1.05] mb-6">+ 让 <span class="grad-text">AI</span> 替你<br class="md:hidden"/>写完<span class="italic font-bold" style="font-family:Georgia,serif">那 80%</span><br/>没人愿意写的运营文档+ </h1>+ <p class="text-lg md:text-xl text-[#5a564e] max-w-2xl mx-auto leading-relaxed mb-10">+ 周报 · 产品 brief · OKR 复盘 · 客户邮件 · 社媒文案 ——<br/>+ Inkstack 帮小团队从"写文档"中解脱出来, 把时间还给真正重要的事。+ </p>+ <div class="flex items-center justify-center gap-3">+ <a href="#cta" class="inline-flex items-center gap-2 bg-[#c96442] text-white font-semibold px-6 py-3 rounded-full hover:bg-[#b25737] transition-colors shadow-[0_14px_32px_-16px_rgba(201,100,66,0.85)]">+ 免费开始 · 无需信用卡 →+ </a>+ <a href="#how" class="inline-flex items-center gap-2 bg-white border border-[#e7e5e0] font-medium text-[#15140f] px-6 py-3 rounded-full hover:border-[#15140f]/40 transition-colors">+ ▶ 看 90 秒 demo+ </a>+ </div>+ <div class="mt-14 mx-auto max-w-3xl">+ <div class="rounded-2xl bg-white shadow-[0_50px_100px_-30px_rgba(21,20,15,0.25)] border border-[#e7e5e0] p-2">+ <div class="rounded-xl bg-[#15140f] aspect-video grid place-items-center relative overflow-hidden">+ <div class="absolute inset-0 opacity-20" style="background-image:linear-gradient(#fff 1px,transparent 1px),linear-gradient(90deg,#fff 1px,transparent 1px); background-size:32px 32px;"></div>+ <div class="text-center relative z-10">+ <div class="text-7xl mb-3">▶</div>+ <div class="text-white/60 text-sm">点击播放 · 90 秒看完</div>+ </div>+ </div>+ </div>+ </div>+ </div>+</section>++<section id="features" class="py-24 px-6">+ <div class="max-w-6xl mx-auto">+ <div class="text-center mb-16">+ <div class="text-xs font-semibold tracking-[0.22em] uppercase text-[#c96442] mb-3">特性 · Features</div>+ <h2 class="text-4xl md:text-5xl font-extrabold tracking-tight">不靠堆功能, 靠流程顺。</h2>+ </div>+ <div class="grid md:grid-cols-2 lg:grid-cols-4 gap-5">++ <div class="card-rise p-7 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-3xl mb-4 accent">✦</div>+ <div class="text-lg font-bold mb-2">AI 起草</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">输入大纲或一句话, 30 秒生成完整文档, 风格可定制。</div>+ </div>++ <div class="card-rise p-7 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-3xl mb-4 accent">⌗</div>+ <div class="text-lg font-bold mb-2">团队协作</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">实时多人编辑, 评论, 完整版本历史。</div>+ </div>++ <div class="card-rise p-7 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-3xl mb-4 accent">↗</div>+ <div class="text-lg font-bold mb-2">一键发布</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">公众号 / 知乎 / Notion / 飞书 一键导出, 排版不破。</div>+ </div>++ <div class="card-rise p-7 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-3xl mb-4 accent">◐</div>+ <div class="text-lg font-bold mb-2">隐私优先</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">本地 agent 优先, 你的数据不离开你的设备。</div>+ </div>++ </div>+ </div>+</section>++<section id="how" class="py-24 px-6 bg-[#f4f1ec] border-y border-[#e7e5e0]">+ <div class="max-w-5xl mx-auto">+ <div class="text-center mb-16">+ <div class="text-xs font-semibold tracking-[0.22em] uppercase text-[#c96442] mb-3">原理 · How it works</div>+ <h2 class="text-4xl md:text-5xl font-extrabold tracking-tight">三步, 十秒上手。</h2>+ </div>+ <div class="grid md:grid-cols-3 gap-8">++ <div>+ <div class="text-5xl font-extrabold accent" style="font-family:Georgia,serif;font-style:italic">01</div>+ <div class="text-xl font-bold mt-2 mb-1.5">写大纲</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">贴一段 markdown / 草稿 / CSV / Excel, 任何格式都行。</div>+ </div>++ <div>+ <div class="text-5xl font-extrabold accent" style="font-family:Georgia,serif;font-style:italic">02</div>+ <div class="text-xl font-bold mt-2 mb-1.5">选模板</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">9 套世界级模板任选: 周报 / 简报 / 邮件 / 海报 / 卡片。</div>+ </div>++ <div>+ <div class="text-5xl font-extrabold accent" style="font-family:Georgia,serif;font-style:italic">03</div>+ <div class="text-xl font-bold mt-2 mb-1.5">按 ⌘+Enter</div>+ <div class="text-sm leading-relaxed text-[#5a564e]">本地 agent 跑起来, 几秒后右侧就是可发布的成品。</div>+ </div>++ </div>+ </div>+</section>++<section id="voices" class="py-24 px-6">+ <div class="max-w-5xl mx-auto">+ <div class="text-center mb-12">+ <div class="text-xs font-semibold tracking-[0.22em] uppercase text-[#c96442] mb-3">用户 · Voices</div>+ <h2 class="text-4xl md:text-5xl font-extrabold tracking-tight">800+ 小团队在用。</h2>+ </div>+ <div class="grid md:grid-cols-2 gap-5">+ <div class="p-7 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-2xl accent mb-3">"</div>+ <div class="text-lg font-medium leading-snug mb-5">再也不用在 5 个编辑器之间复制粘贴了。一份草稿, 直接到公众号、Notion、知乎都能用。</div>+ <div class="flex items-center gap-3">+ <div class="w-10 h-10 rounded-full bg-gradient-to-br from-[#c96442] to-[#e9b94a]"></div>+ <div><div class="font-semibold">张三</div><div class="text-xs text-[#5a564e]">内容总监 · 某新消费品牌</div></div>+ </div>+ </div>+ <div class="p-7 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-2xl accent mb-3">"</div>+ <div class="text-lg font-medium leading-snug mb-5">团队周报效率翻倍, 从每周花 2 小时降到 25 分钟。AI 起草 + 团队批注, 流程对了。</div>+ <div class="flex items-center gap-3">+ <div class="w-10 h-10 rounded-full bg-gradient-to-br from-[#6c3aa6] to-[#2348b8]"></div>+ <div><div class="font-semibold">李四</div><div class="text-xs text-[#5a564e]">产品经理 · 某 SaaS 团队</div></div>+ </div>+ </div>+ </div>+ </div>+</section>++<section id="pricing" class="py-24 px-6 bg-[#f4f1ec] border-y border-[#e7e5e0]">+ <div class="max-w-5xl mx-auto">+ <div class="text-center mb-12">+ <div class="text-xs font-semibold tracking-[0.22em] uppercase text-[#c96442] mb-3">价格 · Pricing</div>+ <h2 class="text-4xl md:text-5xl font-extrabold tracking-tight">小团队也能用得起。</h2>+ </div>+ <div class="grid md:grid-cols-3 gap-5">+ <div class="p-8 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-sm font-semibold text-[#5a564e] mb-2">个人</div>+ <div class="text-5xl font-extrabold tracking-tight">¥0</div>+ <div class="text-xs text-[#5a564e] mt-1 mb-6">永久免费</div>+ <ul class="space-y-2 text-sm text-[#262421] mb-6">+ <li>· 5 文档 / 月</li><li>· 9 套模板</li><li>· 本地 agent 接入</li>+ </ul>+ <button class="w-full py-2.5 rounded-full border border-[#15140f]/15 hover:border-[#15140f]/40 font-medium text-sm">开始</button>+ </div>+ <div class="p-8 rounded-2xl bg-[#15140f] text-white border border-[#15140f] ring-2 ring-[#c96442]/30 relative">+ <div class="absolute -top-3 left-1/2 -translate-x-1/2 px-3 py-0.5 rounded-full bg-[#c96442] text-white text-[10px] font-bold tracking-wider">推荐</div>+ <div class="text-sm font-semibold opacity-70 mb-2">Pro</div>+ <div class="text-5xl font-extrabold tracking-tight">¥39<span class="text-base opacity-60 font-medium">/月</span></div>+ <div class="text-xs opacity-60 mt-1 mb-6">不限量, 团队协作</div>+ <ul class="space-y-2 text-sm opacity-90 mb-6">+ <li>· 不限文档数</li><li>· 团队 5 人协作</li><li>· 优先支持</li>+ </ul>+ <button class="w-full py-2.5 rounded-full bg-[#c96442] hover:bg-[#b25737] font-semibold text-sm">升级 Pro</button>+ </div>+ <div class="p-8 rounded-2xl bg-white border border-[#e7e5e0]">+ <div class="text-sm font-semibold text-[#5a564e] mb-2">Team</div>+ <div class="text-5xl font-extrabold tracking-tight">¥99<span class="text-base text-[#5a564e] font-medium">/人/月</span></div>+ <div class="text-xs text-[#5a564e] mt-1 mb-6">企业级权限</div>+ <ul class="space-y-2 text-sm text-[#262421] mb-6">+ <li>· 不限座位</li><li>· SSO / 审计日志</li><li>· 专属客户经理</li>+ </ul>+ <button class="w-full py-2.5 rounded-full border border-[#15140f]/15 hover:border-[#15140f]/40 font-medium text-sm">联系销售</button>+ </div>+ </div>+ </div>+</section>++<section id="cta" class="py-32 px-6 text-center">+ <h2 class="text-5xl md:text-6xl font-extrabold tracking-tight mb-5">少写文档, 多做事。</h2>+ <p class="text-lg text-[#5a564e] mb-8">免费开始, 不需要信用卡, 90 秒上手。</p>+ <a href="#" class="inline-flex items-center gap-2 bg-[#c96442] text-white font-semibold px-7 py-3.5 rounded-full hover:bg-[#b25737] transition-colors shadow-[0_14px_32px_-16px_rgba(201,100,66,0.85)]">+ 立即开始 →+ </a>+</section>++<footer class="border-t border-[#e7e5e0] py-10 px-6">+ <div class="max-w-6xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4 text-sm text-[#5a564e]">+ <div class="flex items-center gap-2.5">+ <div class="w-7 h-7 rounded-md bg-gradient-to-br from-[#c96442] to-[#e9b94a] grid place-items-center text-white text-xs font-black">Ⅰ</div>+ <span class="font-semibold text-[#15140f]">Inkstack</span>+ <span class="opacity-50">© 2026</span>+ </div>+ <div class="flex gap-5">+ <a href="#" class="hover:text-[#15140f]">隐私</a>+ <a href="#" class="hover:text-[#15140f]">条款</a>+ <a href="#" class="hover:text-[#15140f]">联系我们</a>+ </div>+ </div>+</footer>++</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/prototype-web/example.md b/src/lib/templates/skills/prototype-web/example.mdnew file mode 100644index 00000000..08ad9e04--- /dev/null+++ b/src/lib/templates/skills/prototype-web/example.md@@ -0,0 +1,22 @@+# Inkstack — 让 AI 替你写运营文档++## 定位+小团队的 AI 文档协作平台++## 核心特性+- AI 起草: 输入大纲, 30 秒一份完整文档+- 团队协作: 实时多人编辑, 评论, 历史版本+- 一键发布: 公众号 / 知乎 / Notion 一键导出+- 隐私优先: 本地 agent 优先, 数据不离开你的设备++## 用户评价+- "再也不用在编辑器之间复制粘贴了" — 张三, 内容总监+- "团队周报效率翻倍" — 李四, 产品经理++## 价格+- 免费: 个人, 5 文档/月+- Pro: ¥39/月, 不限量, 团队协作+- Team: ¥99/人/月, 企业级权限++## CTA+立即免费开始 · 无需信用卡diff --git a/src/lib/templates/skills/resume-modern/SKILL.md b/src/lib/templates/skills/resume-modern/SKILL.mdnew file mode 100644index 00000000..577b0335--- /dev/null+++ b/src/lib/templates/skills/resume-modern/SKILL.md@@ -0,0 +1,26 @@+---+name: resume-modern+zh_name: "极简简历"+en_name: "Modern Resume"+emoji: "📄"+description: "现代极简简历, A4 单页, 适合打印或导出 PDF"+category: resume+scenario: personal+aspect_hint: "A4 (210×297mm)"+recommended: 12+tags: ["resume", "cv", "简历"]+example_id: sample-resume-frontend+example_name: "极简简历 · 前端工程师"+example_format: markdown+example_tagline: "A4 单页, 可打印 / 导出 PDF"+example_desc: "高级前端工程师简历, 两栏布局, 数字成就高亮"+---++【模板: 现代极简简历】+- 容器宽度模拟 A4: `w-[210mm] min-h-[297mm] mx-auto`, 内边距 16-20mm。+- 顶部姓名巨大 (text-4xl), 底下一行 contact (邮箱 / 电话 / 城市 / GitHub / LinkedIn), 中间用细竖线分隔。+- 主体两栏可选: 左 60% 主线(经历/项目/教育), 右 40% 副线(技能/语言/获奖)。+- 章节标题: small caps 风格, 上方一条短 accent 线 (w-8 h-0.5)。+- 经历每条: 公司 + 职位 + 时间区间 (右对齐), 下方 1-3 条 bullet 用动词开头。+- 不使用花哨颜色, 黑白灰 + 1 个 accent (深蓝 / 墨绿)。+- 添加 @media print 样式, 隐藏不必要的元素, 颜色保留。diff --git a/src/lib/templates/skills/resume-modern/example.html b/src/lib/templates/skills/resume-modern/example.htmlnew file mode 100644index 00000000..ac38b3c3--- /dev/null+++ b/src/lib/templates/skills/resume-modern/example.html@@ -0,0 +1,122 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>林清禾 · 简历</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">+<style>+ body { background:#e9e6df; font-family:'Inter','Noto Sans SC',sans-serif; color:#1a1a1a; padding:32px 0; -webkit-font-smoothing:antialiased; }+ .page { width:210mm; min-height:297mm; margin:0 auto; background:#fff; padding:18mm 16mm; box-shadow:0 30px 60px -20px rgba(0,0,0,0.18); }+ .accent { color:#1f4d8f; }+ .accent-bar { display:inline-block; width:24px; height:2px; background:#1f4d8f; vertical-align:middle; margin-right:10px; }+ .section h2 { font-size:11px; font-weight:700; letter-spacing:0.18em; text-transform:uppercase; color:#1f4d8f; margin:0 0 14px; }+ .role { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }+ .role .meta { font-size:11px; color:#6b6760; font-family:'Inter',sans-serif; white-space:nowrap; tabular-nums:auto; }+ ul.bullets { list-style:none; padding:0; margin:8px 0 16px; }+ ul.bullets li { position:relative; padding-left:14px; font-size:13px; line-height:1.65; color:#262421; margin-bottom:4px; }+ ul.bullets li::before { content:""; position:absolute; left:0; top:9px; width:5px; height:5px; background:#1f4d8f; border-radius:1px; }+ @media print { body { background:#fff; padding:0; } .page { box-shadow:none; } }+</style>+</head>+<body>+<div class="page">+ <header class="pb-7 mb-7" style="border-bottom:1px solid #e7e5e0">+ <h1 class="text-[42px] font-bold tracking-tight leading-none mb-3">林清禾</h1>+ <div class="text-[12.5px] text-[#1f4d8f] font-medium tracking-wide mb-3">高级前端工程师 · Senior Frontend Engineer</div>+ <div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-[11.5px] text-[#5a564e]">+ <span>📍 上海</span><span class="opacity-30">|</span>+ <span>✉ [email protected]</span><span class="opacity-30">|</span>+ <span>github.com/qinghelin</span><span class="opacity-30">|</span>+ <span>linkedin.com/in/qinghe</span>+ </div>+ </header>++ <section class="section mb-6">+ <h2><span class="accent-bar"></span>个人简介</h2>+ <p class="text-[13.5px] leading-[1.75] text-[#262421]">8 年前端经验, 主导过 50M+ MAU 产品的设计系统重构, 目前专注于 AI-assisted 开发工具链的产品化。</p>+ </section>++ <div class="grid grid-cols-12 gap-8">+ <div class="col-span-8">+ <section class="section mb-7">+ <h2><span class="accent-bar"></span>工作经历</h2>++ <div class="mb-5">+ <div class="role">+ <div><span class="font-semibold text-[14.5px]">Acme AI</span> <span class="text-[#5a564e] text-[13px]">— 高级前端工程师</span></div>+ <div class="meta">2023.06 - 至今</div>+ </div>+ <ul class="bullets">+ <li>设计并主导了内部 AI 编辑器产品 (从 0 到 1), 6 个月内 DAU 达到 <span class="font-semibold accent">12k</span>, 内部 NPS <span class="font-semibold accent">68</span></li>+ <li>把团队 React 16 全量升级到 React 19, <span class="font-semibold accent">0 线上回归</span>, 编译速度提升 <span class="font-semibold accent">3.2 倍</span></li>+ <li>抽象组件库, 在 7 个业务线被采用, NPM 月下载 <span class="font-semibold accent">80k+</span></li>+ </ul>+ </div>++ <div class="mb-5">+ <div class="role">+ <div><span class="font-semibold text-[14.5px]">字节跳动</span> <span class="text-[#5a564e] text-[13px]">— 前端工程师</span></div>+ <div class="meta">2020.07 - 2023.05</div>+ </div>+ <ul class="bullets">+ <li>主导抖音 PC 后台从 webpack → vite 的迁移, 冷启动从 <span class="font-semibold accent">18s</span> 降到 <span class="font-semibold accent">2.4s</span></li>+ <li>设计了一套低代码表单引擎, 服务公司 30+ 后台业务, 累计节省人天 <span class="font-semibold accent">800+</span></li>+ <li>带 4 人小队, 推动团队 TypeScript 强类型覆盖率 <span class="font-semibold accent">53% → 92%</span></li>+ </ul>+ </div>++ <div class="mb-2">+ <div class="role">+ <div><span class="font-semibold text-[14.5px]">美团</span> <span class="text-[#5a564e] text-[13px]">— 实习前端</span></div>+ <div class="meta">2019.06 - 2019.09</div>+ </div>+ <ul class="bullets">+ <li>完成外卖商家端两个核心页面的 Vue 2 → Vue 3 迁移</li>+ <li>写了一篇内部分享《组件设计的 5 个气味》, 被收藏 200+</li>+ </ul>+ </div>+ </section>++ <section class="section">+ <h2><span class="accent-bar"></span>公开项目</h2>+ <ul class="bullets">+ <li><span class="font-semibold">html-anything</span> <span class="text-[#5a564e]">(1.2k ★)</span> — 把任何文档用本地 AI agent 转成漂亮 HTML</li>+ <li><span class="font-semibold">lite-form</span> <span class="text-[#5a564e]">(450 ★)</span> — 9KB 的 React 表单库, 性能比 react-hook-form 快 1.7x</li>+ </ul>+ </section>+ </div>++ <div class="col-span-4">+ <section class="section mb-6">+ <h2><span class="accent-bar"></span>教育</h2>+ <div class="text-[13.5px] font-semibold mb-1">复旦大学</div>+ <div class="text-[12px] text-[#5a564e]">计算机科学 · 学士</div>+ <div class="text-[11.5px] text-[#5a564e] mt-1">2016 - 2020 · GPA 3.85 / 4.00</div>+ </section>++ <section class="section mb-6">+ <h2><span class="accent-bar"></span>核心技能</h2>+ <div class="flex flex-wrap gap-1.5">+ <span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">TypeScript</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">React</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">Next.js</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">Tailwind</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">Node.js</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">Vite</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">设计系统</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">性能优化</span><span class="px-2 py-0.5 rounded text-[11px]" style="background:#eef2f8; color:#1f4d8f">团队协作</span>+ </div>+ </section>++ <section class="section mb-6">+ <h2><span class="accent-bar"></span>语言</h2>+ <ul class="text-[12px] text-[#262421] space-y-1.5">+ <li class="flex justify-between"><span>中文</span><span class="text-[#5a564e]">母语</span></li>+ <li class="flex justify-between"><span>英语</span><span class="text-[#5a564e]">CET-6 615</span></li>+ <li class="flex justify-between"><span>日语</span><span class="text-[#5a564e]">N3</span></li>+ </ul>+ </section>++ <section class="section">+ <h2><span class="accent-bar"></span>兴趣</h2>+ <p class="text-[12px] text-[#262421] leading-[1.7]">长跑 (上海半马 1:42) · 摄影 · 街角咖啡馆侦探</p>+ </section>+ </div>+ </div>+</div>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/resume-modern/example.md b/src/lib/templates/skills/resume-modern/example.mdnew file mode 100644index 00000000..3d2fdd0b--- /dev/null+++ b/src/lib/templates/skills/resume-modern/example.md@@ -0,0 +1,40 @@+# 林清禾++高级前端工程师 · 上海 · [email protected] · github.com/qinghelin · linkedin.com/in/qinghe++## 个人简介++8 年前端经验, 主导过 50M+ MAU 产品的设计系统重构, 目前专注于 AI-assisted 开发工具链的产品化。++## 工作经历++**Acme AI** — 高级前端工程师 · 2023.06 - 至今+- 设计并主导了内部 AI 编辑器产品 (从 0 到 1), 6 个月内 DAU 达到 12k, 内部 NPS 68+- 把团队 React 16 全量升级到 React 19, 0 线上回归, 编译速度提升 3.2 倍+- 抽象组件库, 在 7 个业务线被采用, NPM 月下载 80k+++**字节跳动** — 前端工程师 · 2020.07 - 2023.05+- 主导抖音 PC 后台从 webpack → vite 的迁移, 冷启动从 18s 降到 2.4s+- 设计了一套低代码表单引擎, 服务公司 30+ 后台业务, 累计节省人天 800++- 带 4 人小队, 推动团队 TypeScript 强类型覆盖率 53% → 92%++**美团** — 实习前端 · 2019.06 - 2019.09+- 完成外卖商家端两个核心页面的 Vue 2 → Vue 3 迁移+- 写了一篇内部分享 (《组件设计的 5 个气味》), 被收藏 200+++## 教育++**复旦大学** · 计算机科学 · 学士 · 2016 - 2020 · GPA 3.85 / 4.00++## 技能++TypeScript / React / Next.js / Tailwind / Node.js · 设计系统 / 性能优化 / Lighthouse / 团队协作++## 公开项目++- **html-anything** (1.2k ★) — 把任何文档用本地 AI agent 转成漂亮 HTML+- **lite-form** (450 ★) — 9KB 的 React 表单库, 性能比 react-hook-form 快 1.7x++## 语言 / 兴趣++中文母语 · 英语流利 (CET-6 615) · 日语 N3 · 长跑 (上海半马 1:42) · 摄影diff --git a/src/lib/templates/skills/saas-landing/SKILL.md b/src/lib/templates/skills/saas-landing/SKILL.mdnew file mode 100644index 00000000..3e1d5d42--- /dev/null+++ b/src/lib/templates/skills/saas-landing/SKILL.md@@ -0,0 +1,26 @@+---+name: saas-landing+zh_name: "SaaS Landing"+en_name: "SaaS Landing"+emoji: "🚀"+description: "单页 SaaS 落地页, 含 hero/features/social-proof/pricing/CTA"+category: prototype+scenario: marketing+aspect_hint: "桌面 1440"+tags: ["saas", "landing", "marketing"]+---++【模板: SaaS Landing】+【意图】完整的 SaaS 产品落地页, 把用户内容映射到标准 sections。+【布局】+- Top nav (logo + 导航 + sign-in + 主 CTA)+- Hero (大标题 + 副标 + 双 CTA + 可视化占位)+- Logo wall (社会认证)+- Features (3-6 个特性卡, icon + 标题 + 描述)+- How it works (3 步流程, 数字 + 标题 + 描述)+- Pricing (2-3 档, 推荐档高亮)+- FAQ (details/summary 手风琴)+- Footer+【设计细节】+- 现代 SaaS 风: 大字号, 柔和渐变, glassmorphism 卡片, 滚动入场动画+- 至少处理 `md:` 断点, 移动端单栏diff --git a/src/lib/templates/skills/saas-landing/example.html b/src/lib/templates/skills/saas-landing/example.htmlnew file mode 100644index 00000000..57704cd5--- /dev/null+++ b/src/lib/templates/skills/saas-landing/example.html@@ -0,0 +1,153 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Filebase — sync that respects your bandwidth</title>+ <style>+ :root {+ --bg: #fafaf9; --fg: #1c1b1a; --muted: #6b6964; --border: #e6e4e0;+ --accent: #c96442; --surface: #ffffff;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 -apple-system, system-ui, sans-serif; }+ .wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }+ header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }+ .logo { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }+ nav a { color: var(--fg); text-decoration: none; margin-left: 22px; font-size: 14px; }+ button { font: inherit; cursor: pointer; padding: 11px 20px; border-radius: 8px; font-weight: 500; }+ .btn-primary { background: var(--accent); color: white; border: 1px solid var(--accent); }+ .btn-secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }+ .btn-link { background: transparent; border: none; color: var(--accent); padding: 11px 0; font-weight: 500; cursor: pointer; }+ section { padding: 80px 0; }+ .hero { padding: 100px 0; }+ .hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.05; letter-spacing: -0.02em; max-width: 17ch; margin: 0 0 22px; }+ .hero p { font-size: 19px; color: var(--muted); max-width: 56ch; margin: 0 0 36px; }+ .hero .cta { display: flex; gap: 12px; }+ .features { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }+ .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }+ @media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr; } }+ .feature h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }+ .feature .num { font-family: ui-monospace, monospace; color: var(--accent); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; display: block; }+ .feature p { margin: 0; color: var(--muted); font-size: 14.5px; }+ .proof { text-align: center; }+ .proof h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 28px; }+ .logos { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; opacity: 0.6; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }+ .pricing h2 { text-align: center; font-size: 36px; margin: 0 0 12px; letter-spacing: -0.02em; }+ .pricing .lede { text-align: center; color: var(--muted); margin: 0 0 48px; }+ .tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }+ @media (max-width: 800px) { .tiers { grid-template-columns: 1fr; } }+ .tier { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px; }+ .tier.featured { border-color: var(--accent); position: relative; }+ .tier.featured::before { content: 'Recommended'; position: absolute; top: -12px; left: 24px; background: var(--accent); color: white; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; }+ .tier h3 { margin: 0 0 8px; font-size: 18px; }+ .tier .price { font-size: 40px; letter-spacing: -0.02em; margin: 6px 0 16px; }+ .tier .price small { font-size: 14px; color: var(--muted); font-weight: 400; }+ .tier ul { list-style: none; padding: 0; margin: 16px 0 24px; color: var(--muted); font-size: 14px; }+ .tier ul li { padding: 5px 0; border-top: 1px solid var(--border); }+ .tier ul li:first-child { border-top: none; }+ .closing { background: var(--accent); color: white; text-align: center; }+ .closing h2 { font-size: 38px; letter-spacing: -0.02em; margin: 0 0 14px; }+ .closing p { opacity: 0.85; margin: 0 0 28px; }+ .closing button { background: white; color: var(--accent); border: none; }+ footer { padding: 28px 0; color: var(--muted); font-size: 13px; text-align: center; }+ </style>+</head>+<body>+ <div class="wrap">+ <header data-od-id="topnav">+ <span class="logo">◰ Filebase</span>+ <nav>+ <a href="#features">Features</a>+ <a href="#pricing">Pricing</a>+ <a href="#docs">Docs</a>+ <button class="btn-secondary" style="margin-left: 12px;">Sign in</button>+ </nav>+ </header>+ <section class="hero" data-od-id="hero">+ <h1>File sync that doesn't eat your bandwidth.</h1>+ <p>Block-level deltas, end-to-end encryption, and a pricing model that doesn't punish you for working with video.</p>+ <div class="cta">+ <button class="btn-primary">Get Filebase</button>+ <button class="btn-link">Read the whitepaper →</button>+ </div>+ </section>+ </div>++ <section class="features" id="features" data-od-id="features">+ <div class="wrap feature-grid">+ <div class="feature">+ <span class="num">01</span>+ <h3>Block-level diffs</h3>+ <p>Edit a 4 GB Final Cut project? We sync the 200 KB you changed. Not the whole file.</p>+ </div>+ <div class="feature">+ <span class="num">02</span>+ <h3>End-to-end encrypted</h3>+ <p>Files are encrypted on your laptop before they leave. We can't read them. Neither can law enforcement, by design.</p>+ </div>+ <div class="feature">+ <span class="num">03</span>+ <h3>Honest pricing</h3>+ <p>One flat rate for unlimited storage. No "fair use" clauses. No throttling at 90%.</p>+ </div>+ </div>+ </section>++ <section class="proof wrap" data-od-id="proof">+ <h2>Used by teams at</h2>+ <div class="logos"><span>Anthropic</span><span>Stripe</span><span>Linear</span><span>Vercel</span><span>Cursor</span></div>+ </section>++ <section class="pricing wrap" id="pricing" data-od-id="pricing">+ <h2>Pricing</h2>+ <p class="lede">Pick a tier. Switch or cancel any time.</p>+ <div class="tiers">+ <div class="tier">+ <h3>Solo</h3>+ <div class="price">$8<small>/mo</small></div>+ <p style="color: var(--muted); margin: 0;">For individuals.</p>+ <ul>+ <li>1 TB storage</li>+ <li>Block-level sync</li>+ <li>Email support</li>+ </ul>+ <button class="btn-secondary" style="width: 100%;">Choose Solo</button>+ </div>+ <div class="tier featured">+ <h3>Team</h3>+ <div class="price">$14<small>/seat/mo</small></div>+ <p style="color: var(--muted); margin: 0;">For teams up to 50.</p>+ <ul>+ <li>5 TB pooled storage</li>+ <li>Shared folders & roles</li>+ <li>Priority support</li>+ <li>Audit log</li>+ </ul>+ <button class="btn-primary" style="width: 100%;">Choose Team</button>+ </div>+ <div class="tier">+ <h3>Enterprise</h3>+ <div class="price">Custom</div>+ <p style="color: var(--muted); margin: 0;">SSO, on-prem keys, SLA.</p>+ <ul>+ <li>Unlimited storage</li>+ <li>SAML / SCIM</li>+ <li>Dedicated support</li>+ </ul>+ <button class="btn-secondary" style="width: 100%;">Talk to sales</button>+ </div>+ </div>+ </section>++ <section class="closing" data-od-id="closing">+ <div class="wrap">+ <h2>Sync less, ship more.</h2>+ <p>14-day free trial. No credit card needed.</p>+ <button>Get Filebase</button>+ </div>+ </section>++ <footer class="wrap" data-od-id="footer">© Filebase · Privacy · Terms · Status</footer>+</body>+</html>diff --git a/src/lib/templates/skills/social-carousel/SKILL.md b/src/lib/templates/skills/social-carousel/SKILL.mdnew file mode 100644index 00000000..3f023e5e--- /dev/null+++ b/src/lib/templates/skills/social-carousel/SKILL.md@@ -0,0 +1,22 @@+---+name: social-carousel+zh_name: "社交媒体三联"+en_name: "Social Carousel"+emoji: "🎠"+description: "三张方形卡片轮播, 标题串联, 品牌 mark + 编号"+category: card+scenario: marketing+aspect_hint: "1080×1080 ×3"+featured: 7+tags: ["instagram", "linkedin", "thread", "carousel", "三联"]+---++【模板: 三联社交轮播 / Social Carousel】+【意图】3 张 1080×1080 方形卡片, headline 跨张串联。+【布局】+- Card 1: display headline (开头) + 品牌 mark + 1/3+- Card 2: display headline (中段) + 视觉重点 + 2/3+- Card 3: display headline (结尾) + CTA + loop icon + 3/3+【设计细节】+- 颜色统一一套调色板, 卡片之间渐进切换+- 三个 headline 拼起来是完整一句话diff --git a/src/lib/templates/skills/social-carousel/example.html b/src/lib/templates/skills/social-carousel/example.htmlnew file mode 100644index 00000000..494a80a5--- /dev/null+++ b/src/lib/templates/skills/social-carousel/example.html@@ -0,0 +1,219 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Three posts. One beat. — social carousel</title>+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />+ <style>+ :root {+ --stage: #0a0a0a;+ --stage-2: #141414;+ --paper: #f4ede0;+ --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;+ --mono: 'IBM Plex Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ body {+ margin: 0;+ min-height: 100vh;+ background:+ radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,0.04), transparent 70%),+ var(--stage);+ color: #f4ede0;+ font: 14px/1.5 -apple-system, system-ui, sans-serif;+ }++ .stage {+ max-width: 1280px; margin: 0 auto; padding: 60px 32px 80px;+ }+ .stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 36px; }+ .stage-head h1 { margin: 0; font: italic 700 36px/1 var(--serif); letter-spacing: -0.005em; }+ .stage-head h1 em { font-style: normal; }+ .stage-head h1 .dot { color: #a4a09a; }+ .stage-head .lede { margin: 8px 0 0; font: 11px/1.6 var(--mono); color: rgba(244,237,224,0.5); letter-spacing: 0.06em; max-width: 60ch; text-transform: uppercase; }+ .stage-head .badge { font: 10.5px/1 var(--mono); padding: 7px 10px; border: 1px solid rgba(244,237,224,0.3); color: rgba(244,237,224,0.7); letter-spacing: 0.18em; flex-shrink: 0; }++ .row { display: flex; gap: 22px; justify-content: center; align-items: stretch; flex-wrap: wrap; }++ .card {+ width: clamp(280px, 30vw, 380px);+ aspect-ratio: 1 / 1;+ border-radius: 14px;+ border: 1px solid rgba(255,255,255,0.06);+ box-shadow: 0 30px 60px rgba(0,0,0,0.45);+ position: relative;+ overflow: hidden;+ color: #ffffff;+ }+ .card .scrim {+ position: absolute; inset: 0;+ background:+ linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);+ pointer-events: none;+ }+ .card .top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: flex-start; }+ .card .brand { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; background: rgba(255,255,255,0.10); backdrop-filter: blur(6px); border-radius: 999px; }+ .card .brand .name { font: italic 700 13px/1 var(--serif); }+ .card .brand .dot { width: 5px; height: 5px; background: var(--paper); border-radius: 50%; opacity: 0.9; }+ .card .index { font: 11px/1.4 var(--mono); color: rgba(255,255,255,0.85); letter-spacing: 0.16em; text-align: right; padding: 6px 10px; background: rgba(0,0,0,0.30); backdrop-filter: blur(4px); border-radius: 4px; }++ .card .lockup { position: absolute; left: 22px; right: 22px; bottom: 78px; }+ .card .lockup h2 { margin: 0; font: 700 60px/1 var(--serif); letter-spacing: -0.005em; color: #ffffff; }+ .card .lockup h2 em { font-style: italic; }+ .card .lockup h2 .accent { font-style: italic; }++ .card .footer { position: absolute; left: 22px; right: 22px; bottom: 22px; display: flex; justify-content: space-between; align-items: center; }+ .card .footer .caption { font: 10.5px/1.4 var(--mono); color: rgba(255,255,255,0.85); letter-spacing: 0.14em; text-transform: uppercase; max-width: 70%; }+ .card .loop { font: 10.5px/1 var(--mono); padding: 6px 8px; border: 1px solid rgba(255,255,255,0.55); border-radius: 4px; color: rgba(255,255,255,0.85); letter-spacing: 0.18em; }++ /* Card 1 — dawn meadow, blue sky */+ .card.c1 {+ background:+ linear-gradient(180deg, #5b8cb6 0%, #92aebd 32%, #b0a679 50%, #6f8a4d 70%, #2a4a2a 100%),+ #4a6a8a;+ }+ .card.c1 .figure {+ position: absolute; left: 50%; top: 56%;+ width: 80px; height: 200px;+ transform: translate(-50%, 0);+ background:+ radial-gradient(ellipse 30px 14px at 50% 30%, #2a1f15 0%, #2a1f15 60%, transparent 70%),+ linear-gradient(180deg, #2a1f15 0%, #4a3018 22%, #6a3a1a 60%, transparent 100%);+ filter: drop-shadow(0 6px 8px rgba(0,0,0,0.35));+ clip-path: polygon(35% 0%, 65% 0%, 78% 26%, 70% 60%, 70% 100%, 30% 100%, 30% 60%, 22% 26%);+ opacity: 0.92;+ }++ /* Card 2 — forest dusk, warm orange center */+ .card.c2 {+ background:+ radial-gradient(ellipse 80% 50% at 50% 100%, #f49255 0%, #c95a30 35%, transparent 60%),+ radial-gradient(ellipse 80% 80% at 50% 90%, rgba(255,180,120,0.5), transparent 60%),+ linear-gradient(180deg, #1c2a25 0%, #2a3a30 30%, #4a3a26 70%, #2a1a14 100%);+ }+ .card.c2 .trees {+ position: absolute; left: 0; right: 0; top: 0; bottom: 0;+ }+ .card.c2 .trees::before, .card.c2 .trees::after {+ content: ''; position: absolute; bottom: 0; width: 50%; height: 70%;+ background:+ radial-gradient(circle at 20% 90%, #0f1a14 6px, transparent 7px),+ radial-gradient(circle at 50% 88%, #0f1a14 8px, transparent 9px),+ radial-gradient(circle at 80% 92%, #0f1a14 6px, transparent 7px);+ }+ .card.c2 .trees::before { left: 0; background:+ linear-gradient(180deg, transparent 0%, transparent 30%, rgba(15,26,20,0.85) 30%, #0f1a14 100%);+ mask: radial-gradient(ellipse 60% 90% at 50% 100%, black 70%, transparent 100%);+ }+ .card.c2 .trees::after { right: 0; background:+ linear-gradient(180deg, transparent 0%, transparent 36%, rgba(15,26,20,0.85) 36%, #0f1a14 100%);+ mask: radial-gradient(ellipse 60% 90% at 50% 100%, black 70%, transparent 100%);+ }+ .card.c2 .figure {+ position: absolute; left: 52%; top: 56%; width: 56px; height: 130px;+ transform: translate(-50%, 0);+ background: linear-gradient(180deg, #2a1810 0%, #4a2818 100%);+ clip-path: polygon(40% 0%, 60% 0%, 70% 22%, 70% 56%, 65% 100%, 35% 100%, 30% 56%, 30% 22%);+ filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));+ }++ /* Card 3 — pink ridge / mountain */+ .card.c3 {+ background:+ linear-gradient(180deg, #1b1e3a 0%, #4a3956 28%, #c9627e 60%, #d57f86 75%, #b8d2d8 100%);+ }+ .card.c3 .ridge {+ position: absolute; inset: 0;+ background:+ linear-gradient(180deg, transparent 60%, rgba(60,30,40,0.4) 80%, rgba(40,20,30,0.7) 100%);+ }+ .card.c3 .ridge::before {+ content: ''; position: absolute; left: 0; right: 0; bottom: 24%;+ height: 30%;+ background:+ linear-gradient(180deg, #b3526a 0%, #7a3148 100%);+ clip-path: polygon(0% 60%, 12% 30%, 22% 50%, 36% 18%, 50% 40%, 60% 22%, 72% 48%, 86% 26%, 100% 50%, 100% 100%, 0% 100%);+ }+ .card.c3 .ridge::after {+ content: ''; position: absolute; left: 0; right: 0; bottom: 0;+ height: 32%;+ background: linear-gradient(180deg, #2a1f2a 0%, #1a1018 100%);+ clip-path: polygon(0% 50%, 8% 20%, 18% 38%, 30% 8%, 44% 32%, 56% 12%, 68% 36%, 82% 18%, 100% 40%, 100% 100%, 0% 100%);+ }+ .card.c3 .figure {+ position: absolute; right: 18%; bottom: 14%; width: 30px; height: 56px;+ background: #1a0d12;+ clip-path: polygon(35% 0%, 65% 0%, 75% 30%, 60% 100%, 40% 100%, 25% 30%);+ filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4));+ }++ @media (max-width: 1180px) {+ .row { flex-direction: column; align-items: center; }+ .card { width: min(96vw, 480px); }+ .card .lockup h2 { font-size: 56px; }+ }+ </style>+</head>+<body>+ <div class="stage" data-od-id="stage">+ <div class="stage-head">+ <div>+ <h1>Three posts<span class="dot">.</span> One <em>beat</em><span class="dot">.</span></h1>+ <p class="lede">1080×1080 · cinematic video loops · minimal type. Drop into Instagram, LinkedIn, or X — each post stands on its own or runs as a three-part series.</p>+ </div>+ <span class="badge">SERIES · 01 → 03</span>+ </div>++ <div class="row" data-od-id="cards">++ <article class="card c1" data-od-id="card-1">+ <div class="figure"></div>+ <div class="scrim"></div>+ <div class="top">+ <div class="brand"><span class="dot"></span><span class="name">Jerrod Lew</span></div>+ <div class="index">01 · ONWARDS</div>+ </div>+ <div class="lockup"><h2>onwards<em>.</em></h2></div>+ <div class="footer">+ <div class="caption">Man, walking forward — close.</div>+ <div class="loop">1× LOOP</div>+ </div>+ </article>++ <article class="card c2" data-od-id="card-2">+ <div class="trees"></div>+ <div class="figure"></div>+ <div class="scrim"></div>+ <div class="top">+ <div class="brand"><span class="dot"></span><span class="name">Jerrod Lew</span></div>+ <div class="index">02 · TO THE NEXT ONE</div>+ </div>+ <div class="lockup"><h2><span class="accent">to the</span><br/><em>next one.</em></h2></div>+ <div class="footer">+ <div class="caption">Woman, stepping into frame.</div>+ <div class="loop">1× LOOP</div>+ </div>+ </article>++ <article class="card c3" data-od-id="card-3">+ <div class="ridge"></div>+ <div class="figure"></div>+ <div class="scrim"></div>+ <div class="top">+ <div class="brand"><span class="dot"></span><span class="name">Jerrod Lew</span></div>+ <div class="index">03 · LOOKING AHEAD</div>+ </div>+ <div class="lockup"><h2>looking<br/><em>ahead.</em></h2></div>+ <div class="footer">+ <div class="caption">Woman, overlooking the city.</div>+ <div class="loop">1× LOOP</div>+ </div>+ </article>++ </div>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/social-media-dashboard/SKILL.md b/src/lib/templates/skills/social-media-dashboard/SKILL.mdnew file mode 100644index 00000000..2abc07ed--- /dev/null+++ b/src/lib/templates/skills/social-media-dashboard/SKILL.md@@ -0,0 +1,20 @@+---+name: social-media-dashboard+zh_name: "社媒创作者仪表板"+en_name: "Social Media Dashboard"+emoji: "📡"+description: "平台切换 + 粉丝/互动 KPI + 增长曲线 + Top post + 热门话题"+category: dashboard+scenario: creator+aspect_hint: "桌面 1440"+tags: ["social", "creator", "analytics", "x", "linkedin", "tiktok"]+---++【模板: 社媒创作者仪表板】+【意图】面向博主 / 创作者的社媒数据看板。+【布局】+- 顶部平台 switcher (X / LinkedIn / YouTube / Instagram / TikTok)+- KPI 卡片 (followers / engagement / likes / reposts)+- Follower-growth chart+- Top post this week 预览+- Side: trending topics / top commentsdiff --git a/src/lib/templates/skills/social-media-dashboard/example.html b/src/lib/templates/skills/social-media-dashboard/example.htmlnew file mode 100644index 00000000..a12e8cce--- /dev/null+++ b/src/lib/templates/skills/social-media-dashboard/example.html@@ -0,0 +1,1534 @@++<!doctype html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Open Design · Social Analytics</title>+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">+ <style>+ :root {+ /* Totality Festival Design System — bind palette */+ --surface: #121318;+ --surface-dim: #121318;+ --surface-bright: #38393f;+ --surface-container-lowest: #0d0e13;+ --surface-container-low: #1a1b21;+ --surface-container: #1e1f25;+ --surface-container-high: #292a2f;+ --surface-container-highest: #34343a;+ --on-surface: #e3e1e9;+ --on-surface-variant: #d0c6ab;+ --inverse-surface: #e3e1e9;+ --inverse-on-surface: #2f3036;+ --outline: #999077;+ --outline-variant: #4d4732;+ --surface-tint: #e9c400;+ --primary: #fff6df;+ --on-primary: #3a3000;+ --primary-container: #ffd700;+ --on-primary-container: #705e00;+ --inverse-primary: #705d00;+ --secondary: #bdf4ff;+ --on-secondary: #00363d;+ --secondary-container: #00e3fd;+ --on-secondary-container: #00616d;+ --tertiary: #fcf3ff;+ --on-tertiary: #3b2754;+ --tertiary-container: #e7d1ff;+ --on-tertiary-container: #6b5586;+ --error: #ffb4ab;+ --on-error: #690005;+ --error-container: #93000a;+ --on-error-container: #ffdad6;+ --background: #121318;+ --on-background: #e3e1e9;+ --surface-variant: #34343a;++ /* Typography */+ --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;+ --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;++ /* Spacing */+ --spacing-unit: 8px;+ --gutter: 24px;+ --margin-desktop: 64px;++ /* Premium glass levels */+ --glass-bg-level-1: rgba(52, 52, 58, 0.15);+ --glass-bg-level-2: rgba(52, 52, 58, 0.25);+ --glass-bg-level-3: rgba(52, 52, 58, 0.35);+ --glass-border: rgba(255, 255, 255, 0.12);+ --glass-border-strong: rgba(255, 255, 255, 0.2);+ }++ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }++ body {+ font-family: var(--font-body);+ background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.08) 0%, transparent 60%),+ radial-gradient(ellipse at 100% 100%, rgba(0, 227, 253, 0.06) 0%, transparent 50%),+ var(--surface);+ color: var(--on-surface);+ line-height: 1.6;+ overflow-x: hidden;+ min-height: 100vh;+ }++ /* Header */+ header {+ position: sticky;+ top: 0;+ z-index: 100;+ background: rgba(18, 19, 24, 0.75);+ backdrop-filter: blur(32px) saturate(180%);+ border-bottom: 1px solid var(--glass-border);+ padding: 16px var(--margin-desktop);+ display: flex;+ align-items: center;+ justify-content: space-between;+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);+ }++ .header-left {+ display: flex;+ align-items: center;+ gap: 16px;+ }++ .logo-block {+ display: flex;+ align-items: center;+ gap: 12px;+ }++ .logo-block img {+ height: 32px;+ width: auto;+ filter: drop-shadow(0 0 8px rgba(0, 227, 253, 0.3));+ }++ .logo-label {+ font-family: var(--font-display);+ font-size: 12px;+ font-weight: 500;+ letter-spacing: 0.1em;+ text-transform: uppercase;+ color: var(--on-surface-variant);+ }++ .platform-switcher-inline {+ display: flex;+ gap: 8px;+ margin-left: 24px;+ }++ .platform-pill {+ font-family: var(--font-display);+ font-size: 14px;+ font-weight: 500;+ padding: 6px 16px;+ border-radius: 999px;+ background: transparent;+ color: var(--on-surface-variant);+ border: 1px solid var(--outline-variant);+ cursor: pointer;+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);+ }++ .platform-pill.active {+ background: var(--glass-bg-level-2);+ color: var(--primary);+ border-color: var(--primary-container);+ box-shadow: 0 0 32px rgba(255, 215, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);+ }++ .header-right {+ display: flex;+ align-items: center;+ gap: 24px;+ }++ .time-range-tabs {+ display: flex;+ gap: 4px;+ }++ .time-tab {+ font-family: var(--font-display);+ font-size: 13px;+ font-weight: 500;+ padding: 6px 12px;+ background: transparent;+ color: var(--on-surface-variant);+ border: none;+ cursor: pointer;+ transition: color 0.2s ease;+ }++ .time-tab.active {+ color: var(--primary);+ }++ .user-block {+ display: flex;+ align-items: center;+ gap: 12px;+ }++ .user-avatar {+ width: 32px;+ height: 32px;+ border-radius: 50%;+ filter: drop-shadow(0 0 6px rgba(0, 227, 253, 0.3));+ }++ .user-info {+ display: flex;+ flex-direction: column;+ gap: 0;+ }++ .user-name {+ font-family: var(--font-display);+ font-size: 14px;+ font-weight: 600;+ color: var(--on-surface);+ }++ .user-role {+ font-size: 12px;+ color: var(--on-surface-variant);+ }++ /* Hero Strip */+ .hero-strip {+ position: sticky;+ top: 65px;+ z-index: 90;+ background: rgba(18, 19, 24, 0.85);+ backdrop-filter: blur(40px) saturate(180%);+ border-bottom: 1px solid var(--glass-border);+ padding: 32px var(--margin-desktop);+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);+ }++ .hero-content {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ gap: 32px;+ }++ .hero-text {+ flex: 1;+ }++ .hero-headline {+ font-family: var(--font-display);+ font-size: 48px;+ font-weight: 600;+ line-height: 1.2;+ letter-spacing: -0.02em;+ color: var(--primary);+ margin-bottom: 8px;+ text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);+ }++ .hero-meta {+ font-size: 14px;+ color: var(--on-surface-variant);+ }++ .hero-actions {+ display: flex;+ gap: 12px;+ }++ .btn {+ font-family: var(--font-display);+ font-size: 14px;+ font-weight: 500;+ letter-spacing: 0.05em;+ padding: 12px 24px;+ height: 48px;+ border-radius: 8px;+ border: none;+ cursor: pointer;+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);+ white-space: nowrap;+ }++ .btn-primary {+ background: var(--primary-container);+ color: var(--on-primary);+ box-shadow: 0 0 32px rgba(255, 215, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);+ }++ .btn-primary:hover {+ box-shadow: 0 0 48px rgba(255, 215, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.4);+ transform: translateY(-1px);+ }++ .btn-secondary {+ background: rgba(189, 244, 255, 0.08);+ color: var(--secondary);+ border: 1px solid var(--secondary);+ backdrop-filter: blur(12px);+ }++ .btn-secondary:hover {+ background: rgba(189, 244, 255, 0.15);+ box-shadow: 0 0 24px rgba(189, 244, 255, 0.2);+ }++ /* Ask Bar */+ .ask-bar {+ padding: 24px var(--margin-desktop);+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(20px);+ }++ .ask-input {+ width: 100%;+ font-family: var(--font-body);+ font-size: 16px;+ padding: 16px 20px;+ background: rgba(13, 14, 19, 0.6);+ color: var(--on-surface);+ border: 1px solid var(--glass-border);+ border-radius: 8px;+ transition: all 0.3s ease;+ backdrop-filter: blur(8px);+ }++ .ask-input:focus {+ outline: none;+ border-color: var(--secondary-container);+ box-shadow: 0 0 0 3px rgba(0, 227, 253, 0.15), 0 0 32px rgba(0, 227, 253, 0.2);+ background: rgba(13, 14, 19, 0.8);+ }++ .ask-input::placeholder {+ color: var(--on-surface-variant);+ opacity: 0.6;+ }++ /* Main Container */+ .container {+ max-width: 1280px;+ margin: 0 auto;+ padding: 32px var(--margin-desktop);+ }++ /* Platform Switcher Cards */+ .platform-cards {+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 16px;+ margin-bottom: 32px;+ }++ .platform-card {+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(24px) saturate(180%);+ border: 1px solid var(--glass-border);+ border-radius: 12px;+ padding: 24px;+ cursor: pointer;+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);+ position: relative;+ overflow: hidden;+ }++ .platform-card::before {+ content: '';+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 1px;+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);+ opacity: 0;+ transition: opacity 0.3s ease;+ }++ .platform-card.active::before {+ opacity: 1;+ }++ .platform-card.active {+ background: var(--glass-bg-level-2);+ border-color: var(--primary-container);+ box-shadow: 0 0 48px rgba(255, 215, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);+ }++ .platform-card:hover:not(.active) {+ background: var(--glass-bg-level-2);+ border-color: var(--glass-border-strong);+ transform: translateY(-2px);+ }++ .platform-card-header {+ display: flex;+ align-items: center;+ gap: 12px;+ margin-bottom: 8px;+ }++ .platform-icon {+ font-size: 24px;+ }++ .platform-name {+ font-family: var(--font-display);+ font-size: 18px;+ font-weight: 600;+ color: var(--on-surface);+ }++ .platform-handle {+ font-size: 14px;+ color: var(--on-surface-variant);+ }++ /* KPI Row */+ .kpi-row {+ display: grid;+ grid-template-columns: repeat(4, 1fr);+ gap: 16px;+ margin-bottom: 32px;+ }++ .kpi-card {+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(24px) saturate(180%);+ border: 1px solid var(--glass-border);+ border-radius: 12px;+ padding: 24px;+ position: relative;+ overflow: hidden;+ }++ .kpi-card::after {+ content: '';+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 1px;+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);+ }++ .kpi-label {+ font-family: var(--font-display);+ font-size: 12px;+ font-weight: 500;+ letter-spacing: 0.1em;+ text-transform: uppercase;+ color: var(--on-surface-variant);+ margin-bottom: 8px;+ }++ .kpi-value {+ font-family: var(--font-display);+ font-size: 36px;+ font-weight: 700;+ letter-spacing: -0.02em;+ color: var(--on-surface);+ margin-bottom: 4px;+ }++ .kpi-delta {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ font-size: 14px;+ color: var(--secondary);+ filter: drop-shadow(0 0 8px rgba(189, 244, 255, 0.3));+ }++ .kpi-footnote {+ font-size: 12px;+ color: var(--on-surface-variant);+ margin-top: 4px;+ }++ /* Main Grid - 3 columns */+ .main-grid {+ display: grid;+ grid-template-columns: 1fr 1fr 1fr;+ gap: 24px;+ margin-bottom: 32px;+ }++ .chart-card {+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(24px) saturate(180%);+ border: 1px solid var(--glass-border);+ border-radius: 12px;+ padding: 32px;+ position: relative;+ overflow: hidden;+ }++ .chart-card::before {+ content: '';+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 1px;+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);+ }++ .chart-header {+ font-family: var(--font-display);+ font-size: 18px;+ font-weight: 600;+ color: var(--on-surface);+ margin-bottom: 24px;+ }++ .chart-svg {+ width: 100%;+ height: 280px;+ }++ .top-post-card {+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(24px) saturate(180%);+ border: 1px solid var(--glass-border);+ border-radius: 12px;+ padding: 24px;+ position: relative;+ overflow: hidden;+ }++ .top-post-card::before {+ content: '';+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 1px;+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);+ }++ .post-header-tag {+ display: inline-block;+ font-family: var(--font-display);+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.05em;+ text-transform: uppercase;+ color: var(--on-primary-container);+ background: var(--primary-container);+ padding: 4px 12px;+ border-radius: 999px;+ margin-bottom: 16px;+ box-shadow: 0 0 24px rgba(255, 215, 0, 0.4);+ }++ .post-meta {+ display: flex;+ align-items: center;+ gap: 12px;+ margin-bottom: 12px;+ }++ .post-avatar {+ width: 40px;+ height: 40px;+ border-radius: 50%;+ border: 1px solid var(--glass-border);+ }++ .post-handle-block {+ flex: 1;+ }++ .post-handle {+ font-family: var(--font-display);+ font-size: 14px;+ font-weight: 600;+ color: var(--on-surface);+ display: flex;+ align-items: center;+ gap: 4px;+ }++ .verified-badge {+ color: var(--secondary-container);+ font-size: 16px;+ filter: drop-shadow(0 0 6px rgba(0, 227, 253, 0.5));+ }++ .post-timestamp {+ font-size: 12px;+ color: var(--on-surface-variant);+ }++ .post-body {+ font-size: 15px;+ line-height: 1.5;+ color: var(--on-surface);+ margin-bottom: 12px;+ }++ .post-media {+ position: relative;+ width: 100%;+ aspect-ratio: 16/9;+ background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(18, 19, 24, 0.9) 100%);+ border: 1px solid rgba(255, 215, 0, 0.3);+ border-radius: 8px;+ margin-bottom: 12px;+ box-shadow: 0 0 24px rgba(255, 215, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);+ overflow: hidden;+ }++ .post-media svg {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+ }++ .post-media-caption {+ position: absolute;+ left: 12px;+ bottom: 10px;+ font-family: var(--font-display);+ font-size: 11px;+ font-weight: 500;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--primary);+ opacity: 0.85;+ }++ .post-engagement {+ display: flex;+ gap: 16px;+ font-size: 13px;+ color: var(--on-surface-variant);+ }++ /* Geo Map Card */+ .geo-card {+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(24px) saturate(180%);+ border: 1px solid var(--glass-border);+ border-radius: 12px;+ padding: 32px;+ position: relative;+ overflow: hidden;+ }++ .geo-card::before {+ content: '';+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 1px;+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);+ }++ .geo-map {+ width: 100%;+ height: 200px;+ position: relative;+ }++ .geo-dot {+ position: absolute;+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--primary-container);+ box-shadow: 0 0 16px rgba(255, 215, 0, 0.6);+ animation: pulse 2s ease-in-out infinite;+ }++ @keyframes pulse {+ 0%, 100% { transform: scale(1); opacity: 1; }+ 50% { transform: scale(1.3); opacity: 0.7; }+ }++ .geo-stats {+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 12px;+ margin-top: 20px;+ }++ .geo-stat {+ font-size: 13px;+ }++ .geo-stat-label {+ color: var(--on-surface-variant);+ }++ .geo-stat-value {+ font-family: var(--font-display);+ font-weight: 600;+ color: var(--on-surface);+ }++ /* GitHub Contributors */+ .contributors-grid {+ display: grid;+ grid-template-columns: repeat(5, 1fr);+ gap: 12px;+ margin-top: 20px;+ }++ .contributor-item {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 8px;+ }++ .contributor-avatar {+ width: 48px;+ height: 48px;+ border-radius: 50%;+ border: 2px solid var(--glass-border);+ box-shadow: 0 0 16px rgba(0, 227, 253, 0.2);+ transition: all 0.3s ease;+ }++ .contributor-avatar:hover {+ border-color: var(--secondary);+ box-shadow: 0 0 24px rgba(0, 227, 253, 0.4);+ transform: scale(1.05);+ }++ .contributor-name {+ font-size: 11px;+ color: var(--on-surface-variant);+ text-align: center;+ }++ .contributor-commits {+ font-size: 10px;+ color: var(--on-surface-variant);+ opacity: 0.7;+ }++ /* Lower Grid */+ .lower-grid {+ display: grid;+ grid-template-columns: 1fr 1fr;+ gap: 24px;+ }++ .trending-card, .comments-card {+ background: var(--glass-bg-level-1);+ backdrop-filter: blur(24px) saturate(180%);+ border: 1px solid var(--glass-border);+ border-radius: 12px;+ padding: 24px;+ position: relative;+ overflow: hidden;+ }++ .trending-card::before, .comments-card::before {+ content: '';+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 1px;+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);+ }++ .section-title {+ font-family: var(--font-display);+ font-size: 18px;+ font-weight: 600;+ color: var(--on-surface);+ margin-bottom: 20px;+ }++ .trending-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ padding: 12px 0;+ border-bottom: 1px solid rgba(153, 144, 119, 0.15);+ }++ .trending-row:last-child {+ border-bottom: none;+ }++ .trending-name {+ font-family: var(--font-display);+ font-size: 15px;+ font-weight: 500;+ color: var(--on-surface);+ }++ .trending-count {+ font-size: 13px;+ color: var(--on-surface-variant);+ margin-left: 8px;+ }++ .sparkline {+ width: 60px;+ height: 20px;+ }++ .comment-item {+ padding: 16px 0;+ border-bottom: 1px solid rgba(153, 144, 119, 0.15);+ }++ .comment-item:last-child {+ border-bottom: none;+ }++ .comment-meta {+ display: flex;+ align-items: center;+ gap: 8px;+ margin-bottom: 8px;+ }++ .comment-avatar {+ width: 28px;+ height: 28px;+ border-radius: 50%;+ background: var(--glass-bg-level-2);+ border: 1px solid var(--glass-border);+ display: flex;+ align-items: center;+ justify-content: center;+ font-size: 12px;+ font-weight: 600;+ color: var(--primary);+ }++ .comment-handle {+ font-size: 13px;+ font-weight: 600;+ color: var(--on-surface);+ }++ .comment-time {+ font-size: 12px;+ color: var(--on-surface-variant);+ }++ .comment-body {+ font-size: 14px;+ line-height: 1.5;+ color: var(--on-surface-variant);+ margin-bottom: 6px;+ }++ .comment-engagement {+ font-size: 12px;+ color: var(--on-surface-variant);+ }++ /* GitHub specific styles */+ .github-chart-explosive {+ position: relative;+ }++ .milestone-marker {+ position: absolute;+ font-size: 11px;+ font-family: var(--font-display);+ font-weight: 600;+ color: var(--primary);+ background: rgba(255, 215, 0, 0.15);+ padding: 4px 8px;+ border-radius: 4px;+ border: 1px solid var(--primary-container);+ box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);+ }+ </style>+</head>+<body>+ <!--+ Global SVG defs — every avatar / brand mark on the page references+ the same teal-to-mint gradient. Defining it once here avoids per-SVG+ duplication and ensures consistent rendering when the page is+ captured headlessly.+ -->+ <svg width="0" height="0" style="position: absolute" aria-hidden="true">+ <defs>+ <linearGradient id="brandRing" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#7CFFB4"/>+ <stop offset="100%" stop-color="#1FE3D6"/>+ </linearGradient>+ </defs>+ </svg>++ <!-- Header -->+ <header data-od-id="header">+ <div class="header-left">+ <div class="logo-block">+ <svg class="brand-mark" viewBox="0 0 64 64" width="32" height="32" aria-label="Open Design">+ <circle cx="32" cy="32" r="28" fill="#1c1c20" stroke="url(#brandRing)" stroke-width="3"/>+ <path d="M22 22 L46 32 L26 36 L22 46 Z" fill="none" stroke="url(#brandRing)" stroke-width="2.6" stroke-linejoin="round" stroke-linecap="round"/>+ </svg>+ <span class="logo-label">ANALYTICS</span>+ </div>+ <div class="platform-switcher-inline">+ <button class="platform-pill active" data-platform="x">X</button>+ <button class="platform-pill" data-platform="github">GitHub</button>+ </div>+ </div>+ <div class="header-right">+ <div class="time-range-tabs">+ <button class="time-tab active">7D</button>+ <button class="time-tab">30D</button>+ <button class="time-tab">90D</button>+ <button class="time-tab">YTD</button>+ </div>+ <div class="user-block">+ <svg class="user-avatar" viewBox="0 0 64 64" aria-label="Open Design avatar">+ <circle cx="32" cy="32" r="30" fill="#1c1c20" stroke="url(#brandRing)" stroke-width="2.5"/>+ <path d="M22 22 L46 32 L26 36 L22 46 Z" fill="none" stroke="url(#brandRing)" stroke-width="2.4" stroke-linejoin="round" stroke-linecap="round"/>+ </svg>+ <div class="user-info">+ <div class="user-name">Open Design</div>+ <div class="user-role">Design agent · by Nexu Labs</div>+ </div>+ </div>+ </div>+ </header>++ <!-- Hero Strip -->+ <section class="hero-strip" data-od-id="hero">+ <div class="hero-content">+ <div class="hero-text">+ <h1 class="hero-headline" id="hero-headline">Open Design shipped 9 posts on X this week.</h1>+ <p class="hero-meta" id="hero-meta">Engagement up 0.6% vs. last week · Top thread reached 38K accounts</p>+ </div>+ <div class="hero-actions">+ <button class="btn btn-secondary">Export report</button>+ <button class="btn btn-primary" id="hero-cta">New post →</button>+ </div>+ </div>+ </section>++ <!-- Ask Bar -->+ <section class="ask-bar" data-od-id="ask">+ <input+ type="text"+ class="ask-input"+ id="ask-input"+ placeholder="Ask across your posts — 'top performing last week', 'comments from verified accounts'..."+ >+ </section>++ <!-- Main Container -->+ <div class="container">+ <!-- Platform Cards -->+ <div class="platform-cards" data-od-id="platform-switcher">+ <div class="platform-card active" data-platform-card="x">+ <div class="platform-card-header">+ <span class="platform-icon">𝕏</span>+ <div>+ <div class="platform-name">X (Twitter)</div>+ <div class="platform-handle">@opendesignhq</div>+ </div>+ </div>+ </div>+ <div class="platform-card" data-platform-card="github">+ <div class="platform-card-header">+ <span class="platform-icon">⚙</span>+ <div>+ <div class="platform-name">GitHub</div>+ <div class="platform-handle">nexu-io/open-design</div>+ </div>+ </div>+ </div>+ </div>++ <!-- KPI Row -->+ <div class="kpi-row" data-od-id="kpis">+ <div class="kpi-card">+ <div class="kpi-label" id="kpi-1-label">Followers</div>+ <div class="kpi-value" id="kpi-1-value">14,287</div>+ <div class="kpi-delta">↗ <span id="kpi-1-delta">+2.3%</span></div>+ <div class="kpi-footnote" id="kpi-1-footnote">vs. 13,968 last week</div>+ </div>+ <div class="kpi-card">+ <div class="kpi-label" id="kpi-2-label">Engagement Rate</div>+ <div class="kpi-value" id="kpi-2-value">4.80%</div>+ <div class="kpi-delta">↗ <span id="kpi-2-delta">+0.4%</span></div>+ <div class="kpi-footnote" id="kpi-2-footnote">vs. 4.4% last week</div>+ </div>+ <div class="kpi-card">+ <div class="kpi-label" id="kpi-3-label">Likes (7D)</div>+ <div class="kpi-value" id="kpi-3-value">1,842</div>+ <div class="kpi-delta">↗ <span id="kpi-3-delta">+18%</span></div>+ <div class="kpi-footnote" id="kpi-3-footnote">+280 vs. last week</div>+ </div>+ <div class="kpi-card">+ <div class="kpi-label" id="kpi-4-label">Reposts (7D)</div>+ <div class="kpi-value" id="kpi-4-value">487</div>+ <div class="kpi-delta">↗ <span id="kpi-4-delta">+22%</span></div>+ <div class="kpi-footnote" id="kpi-4-footnote">+88 vs. last week</div>+ </div>+ </div>++ <!-- Main Grid (3 columns) -->+ <div class="main-grid">+ <!-- Growth Chart -->+ <div class="chart-card" data-od-id="growth-chart">+ <h2 class="chart-header" id="chart-title">Follower Growth · 30D</h2>+ <div class="github-chart-explosive">+ <svg class="chart-svg" id="chart-svg" viewBox="0 0 600 280"></svg>+ </div>+ </div>++ <!-- Geo Distribution -->+ <div class="geo-card" data-od-id="geo-distribution">+ <h2 class="chart-header">Audience Geography</h2>+ <div class="geo-map">+ <svg width="100%" height="200" viewBox="0 0 400 200" preserveAspectRatio="xMidYMid meet">+ <!-- Simplified world map: filled silhouettes for instant recognition -->+ <g fill="rgba(208, 198, 171, 0.18)" stroke="rgba(208, 198, 171, 0.45)" stroke-width="0.6" stroke-linejoin="round">+ <!-- North America -->+ <path d="M 38,52 L 56,46 L 78,44 L 96,50 L 108,58 L 112,72 L 102,86 L 90,92 L 78,90 L 70,98 L 58,104 L 48,98 L 40,84 L 34,68 Z"/>+ <!-- Central America strip -->+ <path d="M 90,92 L 100,100 L 108,112 L 102,118 L 94,114 L 88,104 Z"/>+ <!-- South America -->+ <path d="M 110,118 L 122,120 L 130,134 L 134,150 L 130,164 L 122,176 L 114,168 L 110,150 L 108,134 Z"/>+ <!-- Greenland -->+ <path d="M 134,40 L 146,38 L 154,46 L 150,56 L 138,54 Z"/>+ <!-- Europe -->+ <path d="M 178,52 L 196,48 L 212,52 L 220,60 L 216,72 L 204,76 L 190,72 L 180,66 Z"/>+ <!-- Africa -->+ <path d="M 196,82 L 218,80 L 230,90 L 234,108 L 230,128 L 220,142 L 208,148 L 196,140 L 188,124 L 186,104 L 192,90 Z"/>+ <!-- Middle East / South Asia bridge -->+ <path d="M 230,80 L 248,76 L 256,86 L 252,96 L 240,98 L 230,92 Z"/>+ <!-- Asia (main mass) -->+ <path d="M 220,52 L 248,46 L 280,44 L 308,48 L 326,58 L 332,72 L 322,84 L 304,88 L 286,84 L 268,82 L 250,76 L 232,68 L 222,60 Z"/>+ <!-- Southeast Asia islands -->+ <path d="M 296,98 L 308,100 L 318,108 L 312,116 L 300,114 Z"/>+ <!-- Australia -->+ <path d="M 308,138 L 332,136 L 346,144 L 344,156 L 328,162 L 314,158 L 306,150 Z"/>+ <!-- Japan -->+ <path d="M 332,68 L 340,72 L 338,82 L 332,80 Z"/>+ <!-- UK / Ireland -->+ <path d="M 178,60 L 184,58 L 184,66 L 178,66 Z"/>+ <!-- New Zealand -->+ <path d="M 358,164 L 366,168 L 364,176 L 358,172 Z"/>+ </g>++ <!-- Audience cluster dots, anchored on real continents -->+ <circle cx="78" cy="72" r="6" class="geo-dot" style="animation-delay: 0s"/> <!-- USA -->+ <circle cx="200" cy="62" r="8" class="geo-dot" style="animation-delay: 0.3s"/> <!-- Europe -->+ <circle cx="276" cy="62" r="5" class="geo-dot" style="animation-delay: 0.6s"/> <!-- China -->+ <circle cx="334" cy="74" r="4" class="geo-dot" style="animation-delay: 0.9s"/> <!-- Japan -->+ <circle cx="120" cy="146" r="5" class="geo-dot" style="animation-delay: 1.2s"/> <!-- Brazil -->+ <circle cx="328" cy="148" r="4" class="geo-dot" style="animation-delay: 1.5s"/> <!-- Australia -->+ </svg>+ </div>+ <div class="geo-stats">+ <div class="geo-stat">+ <div class="geo-stat-label">North America</div>+ <div class="geo-stat-value">38%</div>+ </div>+ <div class="geo-stat">+ <div class="geo-stat-label">Europe</div>+ <div class="geo-stat-value">31%</div>+ </div>+ <div class="geo-stat">+ <div class="geo-stat-label">Asia-Pacific</div>+ <div class="geo-stat-value">22%</div>+ </div>+ <div class="geo-stat">+ <div class="geo-stat-label">Other</div>+ <div class="geo-stat-value">9%</div>+ </div>+ </div>+ </div>++ <!-- Top Post / Contributors -->+ <div class="top-post-card" data-od-id="top-post">+ <div id="post-section">+ <div class="post-header-tag" id="post-tag">Click-through rate 5.8%</div>+ <div class="post-meta">+ <svg class="post-avatar" viewBox="0 0 64 64" aria-label="Open Design avatar">+ <circle cx="32" cy="32" r="30" fill="#1c1c20" stroke="url(#brandRing)" stroke-width="2.5"/>+ <path d="M22 22 L46 32 L26 36 L22 46 Z" fill="none" stroke="url(#brandRing)" stroke-width="2.4" stroke-linejoin="round" stroke-linecap="round"/>+ </svg>+ <div class="post-handle-block">+ <div class="post-handle">+ @opendesignhq+ <span class="verified-badge">✓</span>+ </div>+ <div class="post-timestamp">4h</div>+ </div>+ </div>+ <div class="post-body" id="post-body">+ Live artifacts just shipped. Paste a DESIGN.md, get a dashboard that actually ticks. Video below.+ </div>+ <div class="post-media" aria-label="Video thumbnail">+ <svg viewBox="0 0 320 180" preserveAspectRatio="xMidYMid slice">+ <defs>+ <radialGradient id="postMediaGlow" cx="50%" cy="50%" r="55%">+ <stop offset="0%" stop-color="rgba(255,215,0,0.55)"/>+ <stop offset="60%" stop-color="rgba(255,215,0,0.15)"/>+ <stop offset="100%" stop-color="rgba(18,19,24,0)"/>+ </radialGradient>+ <linearGradient id="postMediaLine" x1="0%" y1="100%" x2="100%" y2="0%">+ <stop offset="0%" stop-color="rgba(189,244,255,0.0)"/>+ <stop offset="50%" stop-color="rgba(189,244,255,0.65)"/>+ <stop offset="100%" stop-color="rgba(255,215,0,0.95)"/>+ </linearGradient>+ </defs>+ <rect width="320" height="180" fill="rgba(13,14,19,0.85)"/>+ <circle cx="160" cy="92" r="80" fill="url(#postMediaGlow)"/>+ <!-- Faint chart curve evoking the live dashboard inside the video -->+ <path d="M 8,148 C 60,140 90,128 120,114 S 180,84 220,68 S 280,38 312,30"+ fill="none" stroke="url(#postMediaLine)" stroke-width="2.5" stroke-linecap="round"/>+ <!-- Three pulse dots along the curve, suggesting live data -->+ <circle cx="120" cy="114" r="3.5" fill="rgba(189,244,255,0.9)"/>+ <circle cx="220" cy="68" r="4" fill="rgba(255,215,0,0.95)"/>+ <circle cx="312" cy="30" r="3.5" fill="rgba(255,215,0,0.9)"/>+ <!-- Play icon centered -->+ <g transform="translate(146,80)">+ <circle cx="14" cy="14" r="14" fill="rgba(18,19,24,0.6)" stroke="rgba(255,215,0,0.9)" stroke-width="1.5"/>+ <path d="M 11,8 L 11,20 L 21,14 Z" fill="rgba(255,215,0,0.95)"/>+ </g>+ </svg>+ <span class="post-media-caption">Live · 0:22</span>+ </div>+ <div class="post-engagement" id="post-engagement">+ <span>❤ <span id="post-likes">312</span></span>+ <span>🔁 <span id="post-reposts">48</span></span>+ <span>💬 <span id="post-comments">22</span></span>+ </div>+ </div>++ <div id="contributors-section" style="display: none;">+ <h3 class="section-title">Top Contributors</h3>+ <div class="contributors-grid" id="contributors-grid"></div>+ </div>+ </div>+ </div>++ <!-- Lower Grid -->+ <div class="lower-grid">+ <!-- Trending -->+ <div class="trending-card" data-od-id="trending">+ <h3 class="section-title" id="trending-title">Trending in AI × Design</h3>+ <div id="trending-list">+ <div class="trending-row">+ <div>+ <span class="trending-name">design.md</span>+ <span class="trending-count">142 posts</span>+ </div>+ <svg class="sparkline" viewBox="0 0 60 20">+ <polyline points="0,15 10,12 20,14 30,10 40,8 50,5 60,3" fill="none" stroke="var(--primary)" stroke-width="2"/>+ </svg>+ </div>+ <div class="trending-row">+ <div>+ <span class="trending-name">claude design</span>+ <span class="trending-count">98 posts</span>+ </div>+ <svg class="sparkline" viewBox="0 0 60 20">+ <polyline points="0,18 10,16 20,14 30,12 40,9 50,7 60,4" fill="none" stroke="var(--primary)" stroke-width="2"/>+ </svg>+ </div>+ <div class="trending-row">+ <div>+ <span class="trending-name">live artifacts</span>+ <span class="trending-count">87 posts</span>+ </div>+ <svg class="sparkline" viewBox="0 0 60 20">+ <polyline points="0,16 10,15 20,13 30,11 40,10 50,6 60,2" fill="none" stroke="var(--primary)" stroke-width="2"/>+ </svg>+ </div>+ <div class="trending-row">+ <div>+ <span class="trending-name">vibecoding</span>+ <span class="trending-count">72 posts</span>+ </div>+ <svg class="sparkline" viewBox="0 0 60 20">+ <polyline points="0,17 10,16 20,15 30,13 40,11 50,8 60,5" fill="none" stroke="var(--primary)" stroke-width="2"/>+ </svg>+ </div>+ <div class="trending-row">+ <div>+ <span class="trending-name">agent os</span>+ <span class="trending-count">64 posts</span>+ </div>+ <svg class="sparkline" viewBox="0 0 60 20">+ <polyline points="0,18 10,17 20,16 30,14 40,12 50,10 60,7" fill="none" stroke="var(--primary)" stroke-width="2"/>+ </svg>+ </div>+ <div class="trending-row">+ <div>+ <span class="trending-name">dogfooding</span>+ <span class="trending-count">58 posts</span>+ </div>+ <svg class="sparkline" viewBox="0 0 60 20">+ <polyline points="0,19 10,18 20,17 30,15 40,14 50,11 60,8" fill="none" stroke="var(--primary)" stroke-width="2"/>+ </svg>+ </div>+ </div>+ </div>++ <!-- Top Comments -->+ <div class="comments-card" data-od-id="top-comments">+ <h3 class="section-title" id="comments-title">Top Comments · This Week</h3>+ <div id="comments-list">+ <div class="comment-item">+ <div class="comment-meta">+ <div class="comment-avatar">JD</div>+ <span class="comment-handle">@designerjames</span>+ <span class="verified-badge">✓</span>+ <span class="comment-time">2d</span>+ </div>+ <div class="comment-body">This is insane. The annotation dots on the chart especially — that's the level of craft I want from design tools.</div>+ <div class="comment-engagement">❤ 87 · 💬 12</div>+ </div>+ <div class="comment-item">+ <div class="comment-meta">+ <div class="comment-avatar">SK</div>+ <span class="comment-handle">@sarahkim_design</span>+ <span class="comment-time">3d</span>+ </div>+ <div class="comment-body">Finally — a design system tool that doesn't feel like it was built by engineers for engineers. The glass aesthetic is 🔥</div>+ <div class="comment-engagement">❤ 64 · 💬 8</div>+ </div>+ <div class="comment-item">+ <div class="comment-meta">+ <div class="comment-avatar">MC</div>+ <span class="comment-handle">@mikecode</span>+ <span class="verified-badge">✓</span>+ <span class="comment-time">5d</span>+ </div>+ <div class="comment-body">Tried the live artifacts preview today. Went from DESIGN.md → working dashboard in 90 seconds. This changes everything.</div>+ <div class="comment-engagement">❤ 112 · 💬 24</div>+ </div>+ </div>+ </div>+ </div>+ </div>++ <script>+ // Real GitHub contributors — only verified avatar IDs to avoid 404s+ const githubContributors = [+ { login: "pftom", avatar: "https://avatars.githubusercontent.com/u/26423749?v=4", contributions: 26 },+ { login: "lefarcen", avatar: "https://avatars.githubusercontent.com/u/20859779?v=4", contributions: 18 },+ { login: "Sid-Qin", avatar: "https://avatars.githubusercontent.com/u/201593046?v=4", contributions: 17 },+ { login: "nettee", avatar: "https://avatars.githubusercontent.com/u/3953668?v=4", contributions: 10 },+ { login: "alchemistklk", avatar: "https://avatars.githubusercontent.com/u/56862773?v=4", contributions: 8 }+ ];++ // Platform data+ const platformData = {+ x: {+ heroHeadline: "Open Design shipped 9 posts on X this week.",+ heroMeta: "Engagement up 0.6% vs. last week · Top thread reached 38K accounts",+ heroCta: "New post →",+ askPlaceholder: "Ask across your posts — 'top performing last week', 'comments from verified accounts'...",+ kpis: [+ { label: "Followers", value: 14287, format: "int", delta: "+2.3%", footnote: "vs. 13,968 last week" },+ { label: "Engagement Rate", value: 4.8, format: "percent", delta: "+0.4%", footnote: "vs. 4.4% last week" },+ { label: "Likes (7D)", value: 1842, format: "int", delta: "+18%", footnote: "+280 vs. last week" },+ { label: "Reposts (7D)", value: 487, format: "int", delta: "+22%", footnote: "+88 vs. last week" }+ ],+ chartTitle: "Follower Growth · 30D",+ chartType: "smooth",+ chartAnnotations: [+ { x: 180, y: 120, label: "Thread: live artifacts +412" },+ { x: 480, y: 60, label: "Launch week +1.1K" }+ ],+ postTag: "Click-through rate 5.8%",+ postBody: "Live artifacts just shipped. Paste a DESIGN.md, get a dashboard that actually ticks. Video below.",+ postEngagement: { likes: 312, reposts: 48, comments: 22 },+ trendingTitle: "Trending in AI × Design",+ commentsTitle: "Top Comments · This Week"+ },+ github: {+ heroHeadline: "Open Design hit 30K stars on GitHub — 9 days in.",+ heroMeta: "Explosive growth: 3 days → 10K, 9 days → 30K · 127 contributors total",+ heroCta: "New release →",+ askPlaceholder: "Ask across your repo — 'stale PRs', 'issues tagged good-first-issue'...",+ kpis: [+ { label: "Stars", value: 30124, format: "int", delta: "+3,284%", footnote: "9 days since launch" },+ { label: "Forks", value: 2847, format: "int", delta: "+412%", footnote: "vs. 556 at day 3" },+ { label: "Pull Requests (7D)", value: 38, format: "int", delta: "+156%", footnote: "18 merged this week" },+ { label: "Contributors", value: 127, format: "int", delta: "+217%", footnote: "vs. 40 at day 3" }+ ],+ chartTitle: "Star Growth · Explosive Trajectory (9D)",+ chartType: "explosive",+ chartAnnotations: [+ { x: 180, y: 180, label: "Day 3 · 10K stars" },+ { x: 540, y: 20, label: "Day 9 · 30K stars" }+ ],+ postTag: "127 contributors · 30K stars",+ postBody: "From 0 → 30K stars in 9 days. This is the fastest-growing design tool in GitHub history.",+ postEngagement: { likes: 842, reposts: 217, comments: 94 },+ trendingTitle: "Top Issues & Discussions",+ commentsTitle: "Top Issue Replies · This Week"+ }+ };++ let activePlatform = 'x';+ let chartBaseData = [];++ // Generate chart data based on platform+ function generateChartData(platform) {+ if (platform === 'x') {+ // Smooth follower growth+ return Array.from({ length: 30 }, (_, i) => ({+ x: i * 20,+ y: 200 - (i * 4) + Math.sin(i / 3) * 20+ }));+ } else {+ // Explosive GitHub star growth (9 days, steep curve)+ return [+ { x: 0, y: 250 }, // Day 0+ { x: 60, y: 240 }, // Day 1+ { x: 120, y: 220 }, // Day 2+ { x: 180, y: 180 }, // Day 3: 10K milestone+ { x: 240, y: 140 }, // Day 4+ { x: 300, y: 110 }, // Day 5+ { x: 360, y: 80 }, // Day 6+ { x: 420, y: 60 }, // Day 7+ { x: 480, y: 40 }, // Day 8+ { x: 540, y: 20 } // Day 9: 30K milestone+ ];+ }+ }++ // Initialize chart+ function renderChart() {+ const svg = document.getElementById('chart-svg');+ svg.innerHTML = '';+ const data = platformData[activePlatform];+ chartBaseData = generateChartData(activePlatform);++ // Background grid+ for (let i = 0; i <= 5; i++) {+ const y = i * 56;+ const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');+ line.setAttribute('x1', '0');+ line.setAttribute('y1', y);+ line.setAttribute('x2', '600');+ line.setAttribute('y2', y);+ line.setAttribute('stroke', 'var(--outline-variant)');+ line.setAttribute('stroke-width', '0.5');+ line.setAttribute('opacity', '0.3');+ svg.appendChild(line);+ }++ // Area fill+ const areaPoints = chartBaseData.map(d => `${d.x},${d.y}`).join(' ');+ const area = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');+ area.setAttribute('points', `0,280 ${areaPoints} 600,280`);+ area.setAttribute('fill', 'rgba(255, 215, 0, 0.12)');+ svg.appendChild(area);++ // Line+ const linePoints = chartBaseData.map(d => `${d.x},${d.y}`).join(' ');+ const line = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');+ line.setAttribute('points', linePoints);+ line.setAttribute('fill', 'none');+ line.setAttribute('stroke', 'var(--primary-container)');+ line.setAttribute('stroke-width', activePlatform === 'github' ? '4' : '3');+ line.setAttribute('filter', 'drop-shadow(0 0 8px rgba(255, 215, 0, 0.4))');+ line.id = 'chart-line';+ svg.appendChild(line);++ // Annotations — place label above the dot when there's room overhead,+ // otherwise place it below so the text never collides with the curve.+ data.chartAnnotations.forEach(ann => {+ const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');+ circle.setAttribute('cx', ann.x);+ circle.setAttribute('cy', ann.y);+ circle.setAttribute('r', '7');+ circle.setAttribute('fill', 'var(--primary-container)');+ circle.setAttribute('stroke', 'var(--surface)');+ circle.setAttribute('stroke-width', '3');+ circle.setAttribute('filter', 'drop-shadow(0 0 12px rgba(255, 215, 0, 0.6))');+ svg.appendChild(circle);++ // Anchor near edges so the label doesn't get cropped on the right side.+ const anchor = ann.x > 540 ? 'end' : (ann.x < 60 ? 'start' : 'middle');+ // Below the dot when the dot is too high to leave label room.+ const placeBelow = ann.y < 40;+ const labelY = placeBelow ? ann.y + 22 : ann.y - 14;++ // Soft pill background behind the text so it stays legible across the+ // gold gradient + chart line, without using a heavy rect.+ const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');+ text.setAttribute('x', ann.x);+ text.setAttribute('y', labelY);+ text.setAttribute('fill', 'var(--primary)');+ text.setAttribute('font-size', '12');+ text.setAttribute('font-family', 'var(--font-display)');+ text.setAttribute('font-weight', '600');+ text.setAttribute('text-anchor', anchor);+ text.setAttribute('paint-order', 'stroke');+ text.setAttribute('stroke', 'rgba(18, 19, 24, 0.85)');+ text.setAttribute('stroke-width', '4');+ text.setAttribute('stroke-linejoin', 'round');+ text.setAttribute('filter', 'drop-shadow(0 0 8px rgba(255, 215, 0, 0.35))');+ text.textContent = ann.label;+ svg.appendChild(text);+ });+ }++ // Render contributors+ function renderContributors() {+ const grid = document.getElementById('contributors-grid');+ grid.innerHTML = '';+ githubContributors.forEach(contributor => {+ const item = document.createElement('div');+ item.className = 'contributor-item';+ item.innerHTML = `+ <img src="${contributor.avatar}" alt="${contributor.login}" class="contributor-avatar"+ onerror="this.style.display='none'; this.nextElementSibling.style.fontWeight='600';">+ <div class="contributor-name">${contributor.login}</div>+ <div class="contributor-commits">${contributor.contributions} commits</div>+ `;+ grid.appendChild(item);+ });+ }++ // Switch platform+ function switchPlatform(platform) {+ activePlatform = platform;+ const data = platformData[platform];++ // Update hero+ document.getElementById('hero-headline').textContent = data.heroHeadline;+ document.getElementById('hero-meta').textContent = data.heroMeta;+ document.getElementById('hero-cta').textContent = data.heroCta;++ // Update ask bar+ document.getElementById('ask-input').placeholder = data.askPlaceholder;++ // Update KPIs+ data.kpis.forEach((kpi, i) => {+ document.getElementById(`kpi-${i + 1}-label`).textContent = kpi.label;+ document.getElementById(`kpi-${i + 1}-value`).textContent = formatKpi(kpi);+ document.getElementById(`kpi-${i + 1}-delta`).textContent = kpi.delta;+ document.getElementById(`kpi-${i + 1}-footnote`).textContent = kpi.footnote;+ });++ // Update chart+ document.getElementById('chart-title').textContent = data.chartTitle;+ renderChart();++ // Toggle between post and contributors+ if (platform === 'github') {+ document.getElementById('post-section').style.display = 'none';+ document.getElementById('contributors-section').style.display = 'block';+ renderContributors();+ } else {+ document.getElementById('post-section').style.display = 'block';+ document.getElementById('contributors-section').style.display = 'none';+ }++ // Update top post/stats+ document.getElementById('post-tag').textContent = data.postTag;+ document.getElementById('post-body').textContent = data.postBody;+ document.getElementById('post-likes').textContent = data.postEngagement.likes;+ document.getElementById('post-reposts').textContent = data.postEngagement.reposts;+ document.getElementById('post-comments').textContent = data.postEngagement.comments;++ // Update section titles+ document.getElementById('trending-title').textContent = data.trendingTitle;+ document.getElementById('comments-title').textContent = data.commentsTitle;++ // Update active states+ document.querySelectorAll('.platform-pill').forEach(pill => {+ pill.classList.toggle('active', pill.dataset.platform === platform);+ });+ document.querySelectorAll('.platform-card').forEach(card => {+ card.classList.toggle('active', card.dataset.platformCard === platform);+ });+ }++ // Format a KPI value for display, based on its `format` flag.+ function formatKpi(kpi) {+ if (kpi.format === 'percent') return kpi.value.toFixed(2) + '%';+ if (typeof kpi.value === 'number') return kpi.value.toLocaleString();+ return String(kpi.value);+ }++ // Live updates — every 2 seconds, nudge each numeric KPI by a small,+ // realistic delta. Counters tick up; the engagement rate jitters by a+ // fraction of a percent so it visibly breathes without drifting absurdly.+ function animateNumbers() {+ const data = platformData[activePlatform];+ data.kpis.forEach((kpi, i) => {+ const valueEl = document.getElementById(`kpi-${i + 1}-value`);+ if (kpi.format === 'percent') {+ // Random walk in ±0.04% range, clamped to a believable band.+ kpi.value += (Math.random() - 0.5) * 0.08;+ kpi.value = Math.max(3.5, Math.min(6.0, kpi.value));+ valueEl.textContent = formatKpi(kpi);+ } else if (typeof kpi.value === 'number') {+ const delta = Math.floor(Math.random() * (activePlatform === 'github' ? 8 : 3)) + 1;+ kpi.value += delta;+ valueEl.textContent = formatKpi(kpi);+ }+ });++ // Update post engagement+ const postData = data.postEngagement;+ postData.likes += Math.floor(Math.random() * (activePlatform === 'github' ? 4 : 2));+ postData.reposts += Math.random() > 0.7 ? 1 : 0;+ postData.comments += Math.random() > 0.8 ? 1 : 0;+ document.getElementById('post-likes').textContent = postData.likes;+ document.getElementById('post-reposts').textContent = postData.reposts;+ document.getElementById('post-comments').textContent = postData.comments;++ // Breathe the chart+ if (activePlatform === 'x') {+ const lastPoint = chartBaseData[chartBaseData.length - 1];+ lastPoint.y += (Math.random() - 0.5) * 4;+ lastPoint.y = Math.max(40, Math.min(200, lastPoint.y));++ const linePoints = chartBaseData.map(d => `${d.x},${d.y}`).join(' ');+ const line = document.getElementById('chart-line');+ if (line) {+ line.setAttribute('points', linePoints);+ }+ }+ }++ // Event listeners+ document.querySelectorAll('.platform-pill').forEach(pill => {+ pill.addEventListener('click', () => switchPlatform(pill.dataset.platform));+ });++ document.querySelectorAll('.platform-card').forEach(card => {+ card.addEventListener('click', () => switchPlatform(card.dataset.platformCard));+ });++ // Initialize+ renderChart();+ setInterval(animateNumbers, 2000);+ </script>+</body>+</html>diff --git a/src/lib/templates/skills/social-media-matrix/SKILL.md b/src/lib/templates/skills/social-media-matrix/SKILL.mdnew file mode 100644index 00000000..bac7e014--- /dev/null+++ b/src/lib/templates/skills/social-media-matrix/SKILL.md@@ -0,0 +1,23 @@+---+name: social-media-matrix+zh_name: "社媒矩阵追踪面板"+en_name: "Social Media Matrix Tracker"+emoji: "🛰️"+description: "电影感多平台社媒分析: 互动图、悬浮洞察、区间对比、明暗主题"+category: dashboard+scenario: creator+aspect_hint: "桌面长页"+featured: 1+tags: ["matrix", "tracker", "multi-platform"]+---++【模板: 社媒矩阵追踪 (Social Matrix Tracker)】+【意图】电影感、数据密集的多平台社媒看板。+【布局】+- Hero header (统一品牌 + 时间窗 + 主题切换)+- Multi-platform KPI matrix (横 platform × 纵 metric)+- 交互式 charts (hover tooltip + range compare)+- Insights drawer (右抽屉, 文字洞察)+- Top posts grid+【设计细节】+- dark / light 切换; 数据用 seed 兜底diff --git a/src/lib/templates/skills/social-media-matrix/example.html b/src/lib/templates/skills/social-media-matrix/example.htmlnew file mode 100644index 00000000..a3db6432--- /dev/null+++ b/src/lib/templates/skills/social-media-matrix/example.html@@ -0,0 +1,1258 @@+<!doctype html>+<html lang="zh-CN" data-theme="dark">+<head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>Social Media Management Dashboard</title>+ <style>+ :root {+ --bg0:#040612;+ --bg1:#070b1a;+ --panel:rgba(12,18,34,.66);+ --panel-2:rgba(10,15,30,.86);+ --line:rgba(163,180,220,.13);+ --line-strong:rgba(163,180,220,.24);+ --text:#edf2ff;+ --muted:#9ea9c5;+ --soft:#636f8b;+ --chip:rgba(18,25,47,.8);+ --hover:rgba(255,255,255,.06);+ --good:#68e4bd;+ --blue:#67b9ff;+ --violet:#9a86ff;+ --yellow:#f3d26e;+ --pink:#cc8cff;+ --danger:#ff7d94;+ --shadow:0 1px 0 rgba(255,255,255,.05) inset,0 18px 52px rgba(0,0,0,.45);+ }+ html[data-theme="light"] {+ --bg0:#ece7db;+ --bg1:#f8f4eb;+ --panel:rgba(255,255,255,.88);+ --panel-2:rgba(255,255,255,.97);+ --line:rgba(24,29,46,.1);+ --line-strong:rgba(24,29,46,.18);+ --text:#12182b;+ --muted:#65708a;+ --soft:#8d96ab;+ --chip:rgba(243,245,250,.97);+ --hover:rgba(8,14,30,.07);+ --good:#16976d;+ --blue:#2f8ec6;+ --violet:#7350ff;+ --yellow:#bf8f0d;+ --pink:#9b4ad5;+ --danger:#cf3e60;+ --shadow:0 1px 0 rgba(255,255,255,.8) inset,0 14px 38px rgba(20,30,60,.14);+ }++ *{box-sizing:border-box}+ html,body{height:100%}+ body{+ margin:0;+ font-family:Inter,"SF Pro Display","Segoe UI",Arial,sans-serif;+ color:var(--text);+ background:+ radial-gradient(840px 460px at 88% -20%,rgba(126,104,255,.17),transparent 65%),+ radial-gradient(950px 520px at 10% -8%,rgba(90,196,255,.16),transparent 68%),+ linear-gradient(180deg,var(--bg1),var(--bg0));+ padding:20px;+ -webkit-font-smoothing:antialiased;+ overflow-y:auto;+ }++ .cinematic-bg{+ position:fixed;+ inset:-10% -5%;+ pointer-events:none;+ z-index:0;+ opacity:.92;+ filter:saturate(1.28) contrast(1.05);+ background:+ radial-gradient(420px 280px at 18% 20%,rgba(84,216,255,.22),transparent 70%),+ radial-gradient(500px 360px at 80% 12%,rgba(174,125,255,.2),transparent 70%),+ radial-gradient(520px 420px at 50% 85%,rgba(255,202,114,.15),transparent 72%);+ animation:bgDrift 15s ease-in-out infinite alternate;+ }+ .cinematic-bg::before,+ .cinematic-bg::after{+ content:"";+ position:absolute;+ width:40vw;+ height:40vw;+ border-radius:50%;+ filter:blur(28px);+ opacity:.22;+ mix-blend-mode:screen;+ }+ .cinematic-bg::before{left:8%;top:24%;background:conic-gradient(from 80deg,#4f83ff,#8b6dff,#df82ff,#58c4ff,#4f83ff);animation:orb1 18s linear infinite}+ .cinematic-bg::after{right:6%;bottom:8%;background:conic-gradient(from 180deg,#f1b04d,#d67dff,#68e4bd,#f1b04d);animation:orb2 20s linear infinite}+ .cinematic-bg .grain{+ position:absolute;inset:0;opacity:.12;mix-blend-mode:soft-light;pointer-events:none;+ background-image:radial-gradient(rgba(255,255,255,.35) .45px, transparent .45px);+ background-size:3px 3px;+ }+ .cinematic-bg .streak{+ position:absolute;inset:-20% -20% auto auto;width:75vw;height:35vh;pointer-events:none;+ transform:rotate(-8deg);+ background:linear-gradient(90deg,transparent,rgba(133,183,255,.16),rgba(216,140,255,.12),transparent);+ filter:blur(10px);+ animation:streakMove 9s ease-in-out infinite alternate;+ }++ @keyframes bgDrift{from{transform:translate3d(0,0,0)}to{transform:translate3d(0,-18px,0)}}+ @keyframes orb1{to{transform:rotate(360deg)}}+ @keyframes orb2{to{transform:rotate(-360deg)}}+ @keyframes streakMove{from{transform:rotate(-8deg) translateX(-2%)}to{transform:rotate(-8deg) translateX(8%)}}++ .app{max-width:1540px;margin:0 auto;position:relative;z-index:2}+ .app::before{+ content:"";+ position:fixed;+ left:-8vw; bottom:-18vh;+ width:48vw; height:48vw;+ border-radius:50%;+ background:radial-gradient(circle,rgba(255,94,170,.14),rgba(125,80,255,.06) 45%,transparent 75%);+ filter:blur(8px);+ pointer-events:none;+ z-index:-1;+ }+ .topbar{display:flex;justify-content:space-between;align-items:center;padding:8px 2px 16px}+ .brand{display:flex;align-items:center;gap:12px;font-weight:700}+ .tag{font-size:10px;letter-spacing:1.7px;text-transform:uppercase;color:#d3f9ee;padding:5px 10px;border-radius:999px;background:linear-gradient(90deg,rgba(104,228,189,.35),rgba(103,185,255,.22),rgba(204,140,255,.26));border:1px solid rgba(220,240,255,.35);box-shadow:0 0 20px rgba(104,228,189,.28)}+ .user{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}+ .avatar{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,#2e354d,#0e1222);border:1px solid var(--line-strong)}+ .chip{height:30px;border:1px solid var(--line-strong);background:var(--chip);color:var(--text);border-radius:999px;padding:0 12px;font-size:11px;font-weight:600;letter-spacing:.8px;text-transform:uppercase;cursor:pointer;transition:.2s}+ .chip:hover{transform:translateY(-1px);background:var(--hover)}+ .chip.active{color:#fff;background:#0f152a;border-color:rgba(255,255,255,.2)}+ html[data-theme="light"] .chip.active{color:#fff;background:#111727;border-color:#111727}++ .frame{+ border:1px solid var(--line);+ background:linear-gradient(180deg,var(--panel),var(--panel-2));+ border-radius:18px;+ box-shadow:var(--shadow);+ padding:16px;+ backdrop-filter: blur(14px);+ position:relative;+ overflow:hidden;+ transform-style:preserve-3d;+ transition:transform .25s ease;+ }+ .frame::before{+ content:"";+ position:absolute;+ inset:-80px -60px auto auto;+ width:460px;+ height:460px;+ border-radius:50%;+ background:radial-gradient(circle,rgba(136,106,255,.22),transparent 70%);+ pointer-events:none;+ animation:glowMove 8s ease-in-out infinite alternate;+ }+ .frame::after{+ content:"";+ position:absolute;inset:0;+ border-radius:18px;+ border:1px solid rgba(255,255,255,.08);+ background:linear-gradient(120deg,rgba(255,255,255,.08),transparent 34%,transparent 66%,rgba(143,193,255,.09));+ pointer-events:none;+ mix-blend-mode:screen;+ }+ .frame .aura{+ position:absolute;+ right:-120px;+ top:120px;+ width:300px;+ height:300px;+ border-radius:50%;+ background:radial-gradient(circle,rgba(209,138,255,.24),rgba(119,182,255,.16),transparent 68%);+ filter:blur(3px);+ animation:auraFloat 7s ease-in-out infinite alternate;+ pointer-events:none;+ }+ @keyframes glowMove{from{transform:translate3d(0,0,0)}to{transform:translate3d(-22px,14px,0)}}+ @keyframes auraFloat{from{transform:translateY(0) translateX(0)}to{transform:translateY(-18px) translateX(-14px)}}++ .headline{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:4px 4px 14px;position:relative;z-index:2}+ .headline h1{+ margin:0;+ font-size:50px;+ line-height:1;+ font-family:"Cormorant Garamond",serif;+ font-weight:700;+ letter-spacing:-1px;+ background:linear-gradient(92deg,#ffffff 0%,#cce3ff 32%,#e4c7ff 66%,#ffe2ad 100%);+ -webkit-background-clip:text;+ background-clip:text;+ color:transparent;+ text-shadow:0 6px 26px rgba(118,166,255,.22);+ }+ .sub{margin-top:8px;color:var(--muted);font-size:13px}+ .actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}+ .btn{height:34px;border-radius:10px;border:1px solid var(--line-strong);background:var(--chip);color:var(--text);font-size:12px;padding:0 12px;cursor:pointer;transition:.2s;box-shadow:0 0 0 rgba(113,169,255,0)}+ .btn:hover{transform:translateY(-1px);box-shadow:0 0 24px rgba(113,169,255,.28)}+ .btn.primary{background:#f2b93f;color:#0f1220;border-color:#f2b93f;font-weight:700}++ .search{margin:0 4px 14px;border:1px solid var(--line);border-radius:12px;height:42px;display:flex;align-items:center;padding:0 14px;color:var(--muted);background:linear-gradient(90deg,rgba(0,0,0,.18),rgba(76,96,160,.12),rgba(0,0,0,.12));position:relative;z-index:2}+ html[data-theme="light"] .search{background:rgba(255,255,255,.62)}++ .platforms,.kpis,.grid,.bottom,.deep-grid{position:relative;z-index:2}+ .platforms{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 4px 14px}+ .platform{border:1px solid var(--line);border-radius:12px;padding:12px;background:linear-gradient(135deg,rgba(83,112,188,.14),rgba(199,135,255,.08) 45%,var(--panel));box-shadow:0 0 0 1px rgba(255,255,255,.03) inset}+ .platform .name{font-size:12px;color:var(--muted)}+ .platform b{display:block;margin-top:4px;font-size:18px}++ .kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 4px 14px}+ .kpi{border:1px solid var(--line);border-radius:14px;background:linear-gradient(130deg,rgba(255,255,255,.05),rgba(103,185,255,.08),rgba(198,138,255,.08),rgba(255,255,255,.01));padding:14px;animation:fadeUp .45s ease both;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}+ .kpi .label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1px}+ .kpi .value{margin-top:8px;font-size:44px;line-height:1;font-family:"Cormorant Garamond",serif}+ .kpi .delta{font-size:12px;color:var(--good)}++ .grid{display:grid;grid-template-columns:2fr 1.2fr;gap:10px;margin:0 4px 12px}+ .bottom{display:grid;grid-template-columns:1.1fr 1.3fr 1fr;gap:10px;margin:0 4px 12px}+ .deep-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:10px;margin:0 4px 12px}+ .deep-stack{display:grid;grid-template-columns:1fr 1fr;gap:10px}+ .tri-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin:0 4px 12px}++ .card{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:14px;transition:.24s;animation:fadeUp .45s ease both;position:relative;overflow:hidden}+ .card::before{+ content:"";position:absolute;inset:auto -50% -1px -50%;height:2px;+ background:linear-gradient(90deg,transparent,rgba(109,186,255,.85),rgba(198,138,255,.95),transparent);+ opacity:0;transition:opacity .25s ease;+ }+ .card::after{+ content:"";+ position:absolute;+ inset:-40% auto auto -20%;+ width:180px; height:180px;+ background:radial-gradient(circle,rgba(137,172,255,.16),transparent 70%);+ pointer-events:none;+ transition:opacity .25s ease;+ opacity:.35;+ }+ .card:hover{transform:translateY(-3px);border-color:var(--line-strong);box-shadow:0 14px 28px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.05) inset}+ .card:hover::before{opacity:.95}+ .card h3{margin:0;font-size:11px;letter-spacing:1.3px;text-transform:uppercase;color:var(--muted)}++ .chart{height:220px;margin-top:16px;position:relative;border-radius:10px;overflow:hidden;background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0))}+ .curve{position:absolute;inset:0}+ .legend{display:flex;gap:16px;margin-top:8px;color:var(--muted);font-size:11px;flex-wrap:wrap}+ .dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:6px}++ .post{margin-top:10px;border:1px solid var(--line);border-radius:12px;padding:12px;background:rgba(0,0,0,.15)}+ html[data-theme="light"] .post{background:rgba(0,0,0,.03)}+ .post .head{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}+ .post p{font-size:13px;line-height:1.55;margin:10px 0}+ .thumb{+ height:120px;border-radius:10px;+ background:+ radial-gradient(140px 70px at 70% 20%,rgba(255,255,255,.35),transparent 60%),+ radial-gradient(120px 90px at 20% 80%,rgba(86,212,255,.35),transparent 70%),+ linear-gradient(140deg,#1b2550,#6f89ff 48%,#cf7cff 78%,#ffbf6e 100%);+ animation:pulseLight 5s ease-in-out infinite;+ box-shadow:0 0 36px rgba(142,162,255,.34) inset, 0 8px 24px rgba(0,0,0,.22);+ }+ @keyframes pulseLight{0%,100%{filter:saturate(1)}50%{filter:saturate(1.2) brightness(1.08)}}++ .list .row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}+ .list .row:last-child{border-bottom:0}+ .pill{font-size:10px;padding:3px 8px;border-radius:999px;border:1px solid var(--line-strong);text-transform:uppercase;letter-spacing:.8px}+ .pill.good{color:var(--good);background:rgba(104,228,189,.15)}+ .table .row{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:6px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}+ .table .head{color:var(--soft);font-size:10px;letter-spacing:1px;text-transform:uppercase}++ .theme-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border-radius:999px;border:1px solid var(--line-strong);background:var(--chip)}+ .theme-switch button{height:24px;border-radius:999px;border:0;padding:0 10px;background:transparent;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.8px;cursor:pointer}+ .theme-switch button.active{background:var(--hover);color:var(--text)}++ .canvas-wrap{height:220px;margin-top:12px}+ canvas{width:100%;height:100%;border:1px solid var(--line);border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,0));cursor:crosshair}++ .bar-list{margin-top:10px;display:grid;gap:10px}+ .bar-item{font-size:12px}+ .bar-head{display:flex;justify-content:space-between;color:var(--muted);margin-bottom:6px}+ .track{height:8px;border-radius:999px;background:rgba(255,255,255,.06);overflow:hidden}+ .track span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--blue),var(--violet));animation:grow 1.1s ease both}+ @keyframes grow{from{width:0!important}}++ .heatmap{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;margin-top:12px}+ .heatmap div{aspect-ratio:1;border-radius:6px;background:rgba(255,255,255,.08);animation:glint 2.6s ease-in-out infinite;cursor:pointer;transition:transform .15s ease, box-shadow .15s ease}+ .heatmap div:hover{transform:translateY(-2px) scale(1.08);box-shadow:0 0 0 1px rgba(255,255,255,.3) inset, 0 8px 16px rgba(0,0,0,.25)}+ .heatmap div:nth-child(odd){animation-delay:.3s}+ .heatmap div:nth-child(3n){animation-delay:.7s}+ @keyframes glint{0%,100%{opacity:.35}50%{opacity:1}}++ .footer-note{margin:8px 6px 2px;color:var(--soft);font-size:11px;text-align:right}+ .chart-tooltip{+ position:fixed;+ z-index:30;+ pointer-events:none;+ border:1px solid var(--line-strong);+ background:var(--panel-2);+ color:var(--text);+ padding:8px 10px;+ border-radius:10px;+ font-size:11px;+ line-height:1.35;+ box-shadow:0 10px 24px rgba(0,0,0,.28);+ backdrop-filter:blur(8px);+ opacity:0;+ transform:translateY(4px);+ transition:opacity .12s ease, transform .12s ease;+ white-space:nowrap;+ }+ .chart-tooltip.show{opacity:1;transform:translateY(0)}+ .insights-panel{+ position:sticky;+ top:12px;+ z-index:8;+ margin:0 4px 14px;+ border:1px solid var(--line);+ border-radius:12px;+ padding:10px 12px;+ background:linear-gradient(110deg,rgba(120,140,255,.16),rgba(182,132,255,.09) 45%,rgba(120,222,206,.06));+ backdrop-filter:blur(8px);+ display:grid;+ grid-template-columns:1.3fr 1fr 1fr 1.2fr;+ gap:10px;+ font-size:11px;+ box-shadow:0 10px 30px rgba(86,122,255,.22), 0 0 0 1px rgba(255,255,255,.05) inset;+ }+ .insights-panel .k{+ color:var(--soft);+ text-transform:uppercase;+ letter-spacing:1px;+ font-size:10px;+ margin-bottom:4px;+ }+ .insights-panel .v{color:var(--text)}+ .insights-panel b{font-size:13px}++ @keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}++ @media (max-width:1260px){+ .kpis,.platforms{grid-template-columns:repeat(2,minmax(0,1fr))}+ .grid,.bottom,.deep-grid,.deep-stack,.tri-grid{grid-template-columns:1fr}+ .headline h1{font-size:38px}+ .insights-panel{grid-template-columns:1fr}+ }+ </style>+</head>+<body>+ <div class="cinematic-bg"><div class="streak"></div><div class="grain"></div></div>+ <div class="app">+ <div class="topbar">+ <div class="brand">+ <span>Jerrod Lew</span>+ <span class="tag">Analytics</span>+ </div>+ <div class="user">+ <div class="theme-switch">+ <button id="darkBtn" class="active">Dark</button>+ <button id="lightBtn">Light</button>+ </div>+ <button class="chip">7D</button>+ <button class="chip active">30D</button>+ <button class="chip">90D</button>+ <button class="chip">YTD</button>+ <span style="font-size:12px;color:var(--muted)">Jerrod Lew</span>+ <span class="avatar"></span>+ </div>+ </div>++ <div class="frame">+ <div class="aura"></div>+ <div class="headline">+ <div>+ <h1 id="title">You shipped 14 posts on X this week.</h1>+ <div class="sub" id="subtitle">Engagement up 0.4% vs last week. Your top post reached 4.2M accounts.</div>+ </div>+ <div class="actions">+ <button class="btn">Export report</button>+ <button class="btn">Auto-summary</button>+ <button class="btn primary">New post +</button>+ </div>+ </div>++ <div class="search">Ask across your posts - top performing last week, comments from verified accounts...</div>+ <div class="insights-panel" id="insightsPanel">+ <div><div class="k">Insight Focus</div><div class="v" id="insightFocus"><b>Live overview</b><br/>Hover charts to inspect details.</div></div>+ <div><div class="k">Pinned Point</div><div class="v" id="insightPin">None</div></div>+ <div><div class="k">Range Compare</div><div class="v" id="insightRange">No active range</div></div>+ <div><div class="k">A/B Compare</div><div class="v" id="insightAB">Save 2 ranges with Shift+Drag</div></div>+ </div>++ <div class="platforms" id="platforms"></div>+ <div class="kpis" id="kpis"></div>++ <div class="grid">+ <div class="card">+ <h3>Follower Growth - 30D</h3>+ <div style="font-size:54px;margin-top:10px;font-family:Cormorant Garamond,serif" id="growthValue">184.3K</div>+ <div class="sub" id="growthDelta">+4.2K net new</div>+ <div class="chart">+ <svg class="curve" viewBox="0 0 600 220" preserveAspectRatio="none">+ <defs>+ <linearGradient id="lineGrad" x1="0" y1="0" x2="1" y2="0">+ <stop offset="0%" stop-color="var(--yellow)" />+ <stop offset="100%" stop-color="var(--pink)" />+ </linearGradient>+ </defs>+ <path id="growthPath" d="M30 185 C120 165, 165 140, 250 130 C340 120, 430 90, 570 55" stroke="url(#lineGrad)" stroke-width="4" fill="none" stroke-linecap="round"/>+ </svg>+ </div>+ <div class="legend">+ <span><i class="dot" style="background:var(--yellow)"></i>Newsletter drop +642</span>+ <span><i class="dot" style="background:var(--pink)"></i>Viral thread +1.2K</span>+ <span><i class="dot" style="background:var(--blue)"></i>Collab campaign +860</span>+ </div>+ </div>++ <div class="card">+ <h3>Top Post - This Week</h3>+ <div class="post">+ <div class="head"><span>@jerrodlew</span><span id="postPlatform">X</span></div>+ <p id="postText">Stopped chasing the perfect prompt. Started shipping ugly drafts. My output 5x'd in a month.</p>+ <div class="thumb"></div>+ </div>+ <div class="bar-list">+ <div class="bar-item"><div class="bar-head"><span>Reach quality</span><span>82%</span></div><div class="track"><span style="width:82%"></span></div></div>+ <div class="bar-item"><div class="bar-head"><span>Audience retention</span><span>67%</span></div><div class="track"><span style="width:67%"></span></div></div>+ </div>+ </div>+ </div>++ <div class="bottom">+ <div class="card list">+ <h3>Upcoming + Drafts</h3>+ <div class="row"><span>Thread: the untold content frontier</span><span class="pill good">Scheduled</span></div>+ <div class="row"><span>Carousel: studio night shots</span><span class="pill">Draft</span></div>+ <div class="row"><span>Essay: why I stopped chasing prompts</span><span class="pill good">Scheduled</span></div>+ <div class="row"><span>Case study: enterprise AI workshop</span><span class="pill">Idea</span></div>+ </div>++ <div class="card table">+ <h3>Competitor Benchmark</h3>+ <div class="row head"><span>Creator</span><span>Followers</span><span>Growth</span><span>Eng.</span></div>+ <div class="row"><span>You (Jerrod)</span><span>610.4K</span><span style="color:var(--good)">+4.2%</span><span>6.8%</span></div>+ <div class="row"><span>Marques Brownlee</span><span>4.8M</span><span>+1.8%</span><span>5.4%</span></div>+ <div class="row"><span>Ali Abdaal</span><span>2.2M</span><span>+2.4%</span><span>4.1%</span></div>+ <div class="row"><span>Thomas Frank</span><span>850K</span><span>+1.2%</span><span>3.8%</span></div>+ </div>++ <div class="card list">+ <h3>Engagement Rate</h3>+ <div style="font-size:48px;margin:12px 0 4px;font-family:Cormorant Garamond,serif" id="engValue">4.8%</div>+ <div class="sub">Breakdown this week</div>+ <div class="row"><span>Likes</span><span>64%</span></div>+ <div class="row"><span>Comments</span><span>19%</span></div>+ <div class="row"><span>Reposts</span><span>12%</span></div>+ <div class="row"><span>Saves</span><span>5%</span></div>+ </div>+ </div>++ <div class="deep-grid">+ <div class="card">+ <h3>Engagement by Hour (UTC+8)</h3>+ <div class="canvas-wrap"><canvas id="hourChart" width="880" height="220"></canvas></div>+ <div class="sub">Hover: details · Click: pin point · Drag: interval stats · Shift+Drag: save multi ranges · Double click: reset</div>+ </div>+ <div class="deep-stack">+ <div class="card">+ <h3>Audience Heatmap</h3>+ <div class="heatmap" id="heatmap"></div>+ </div>+ <div class="card">+ <h3>Sentiment Mix</h3>+ <div class="canvas-wrap" style="height:152px"><canvas id="sentimentChart" width="420" height="152"></canvas></div>+ </div>+ </div>+ </div>++ <div class="deep-grid">+ <div class="card">+ <h3>Content Mix Performance</h3>+ <div class="canvas-wrap"><canvas id="mixChart" width="880" height="220"></canvas></div>+ </div>+ <div class="card list">+ <h3>Trend Radar</h3>+ <div class="row"><span>AI</span><span style="color:var(--good)">+28%</span></div>+ <div class="row"><span>Midjourney v7</span><span style="color:var(--good)">+19%</span></div>+ <div class="row"><span>Seedance</span><span style="color:var(--good)">+15%</span></div>+ <div class="row"><span>#CreatorEconomy</span><span style="color:var(--danger)">-4%</span></div>+ <div class="row"><span>Sora 2</span><span style="color:var(--danger)">-8%</span></div>+ <div class="row"><span>#BuildInPublic</span><span style="color:var(--good)">+11%</span></div>+ </div>+ </div>++ <div class="deep-grid">+ <div class="card">+ <h3>Cross-platform Conversion Funnel</h3>+ <div class="bar-list">+ <div class="bar-item"><div class="bar-head"><span>Impressions</span><span>4.2M</span></div><div class="track"><span style="width:100%"></span></div></div>+ <div class="bar-item"><div class="bar-head"><span>Profile Visits</span><span>428K</span></div><div class="track"><span style="width:41%"></span></div></div>+ <div class="bar-item"><div class="bar-head"><span>Subscribed</span><span>49K</span></div><div class="track"><span style="width:24%"></span></div></div>+ <div class="bar-item"><div class="bar-head"><span>Paid Leads</span><span>8.2K</span></div><div class="track"><span style="width:11%"></span></div></div>+ </div>+ </div>+ <div class="card">+ <h3>Response SLA</h3>+ <div class="canvas-wrap" style="height:170px"><canvas id="slaChart" width="420" height="170"></canvas></div>+ <div class="sub">Median response time: 34m (target < 45m) · supports pin & drag analysis</div>+ </div>+ </div>++ <div class="tri-grid">+ <div class="card">+ <h3>Revenue vs Content Cost</h3>+ <div class="canvas-wrap" style="height:190px"><canvas id="roiChart" width="420" height="190"></canvas></div>+ <div class="sub">Track profitability trend from content operations.</div>+ </div>+ <div class="card">+ <h3>Audience Cohort Retention</h3>+ <div class="canvas-wrap" style="height:190px"><canvas id="cohortChart" width="420" height="190"></canvas></div>+ <div class="sub">Week-over-week retention quality by cohort.</div>+ </div>+ <div class="card">+ <h3>Geo Contribution Share</h3>+ <div class="canvas-wrap" style="height:190px"><canvas id="geoChart" width="420" height="190"></canvas></div>+ <div class="sub">Region contribution to total conversions.</div>+ </div>+ </div>++ <div class="footer-note">Interactive preview · scroll for more insights</div>+ </div>+ </div>++ <script>+ const data = {+ x:{title:"You shipped 14 posts on X this week.",subtitle:"Engagement up 0.4% vs last week. Your top post reached 4.2M accounts.",growth:"184.3K",growthDelta:"+4.2K net new",post:"Stopped chasing the perfect prompt. Started shipping ugly drafts. My output 5x'd in a month.",postPlatform:"X",eng:"4.8%",kpis:[["Followers","184.3K","+4.18%"],["Engagement Rate","4.8%","+0.4%"],["Likes - 7D","12.8K","+18%"],["Reposts - 7D","3.1K","+9%"]],platforms:[["X","184.3K followers","+2.1K"],["LinkedIn","42.7K followers","+1.6K"],["YouTube","287K subscribers","+4.3K"],["Instagram","96.4K followers","+1.9K"]]},+ linkedin:{title:"You shipped 6 posts on LinkedIn this week.",subtitle:"Engagement up 0.6% vs last week. Your top post reached 980K accounts.",growth:"42.7K",growthDelta:"+1.6K net new",post:"I built a 30-second film in a weekend. No studio, no crew, one laptop.",postPlatform:"LinkedIn",eng:"7.2%",kpis:[["Followers","42.7K","+3.7%"],["Engagement Rate","7.2%","+0.3%"],["Likes - 7D","6.4K","+10%"],["Reposts - 7D","914","+9%"]],platforms:[["X","184.3K followers","+2.1K"],["LinkedIn","42.7K followers","+1.6K"],["YouTube","287K subscribers","+4.3K"],["Instagram","96.4K followers","+1.9K"]]},+ youtube:{title:"You shipped 3 posts on YouTube this week.",subtitle:"Engagement up 0.8% vs last week. Your top post reached 1.8M accounts.",growth:"287K",growthDelta:"+4.3K net new",post:"I built a movie in a weekend using AI tools and one clean pipeline.",postPlatform:"YouTube",eng:"9.4%",kpis:[["Followers","287K","+1.5%"],["Engagement Rate","9.4%","+0.6%"],["Likes - 7D","48.2K","+18%"],["Shares - 7D","2.2K","+9%"]],platforms:[["X","184.3K followers","+2.1K"],["LinkedIn","42.7K followers","+1.6K"],["YouTube","287K subscribers","+4.3K"],["Instagram","96.4K followers","+1.9K"]]},+ instagram:{title:"You shipped 9 posts on Instagram this week.",subtitle:"Engagement up 0.5% vs last week. Your top post reached 1.1M accounts.",growth:"96.4K",growthDelta:"+1.9K net new",post:"Studio lights, no tricks. Simplicity outperforms over-editing.",postPlatform:"Instagram",eng:"6.1%",kpis:[["Followers","96.4K","+2.01%"],["Engagement Rate","6.1%","+0.5%"],["Likes - 7D","22.8K","+18%"],["Shares - 7D","1.4K","+9%"]],platforms:[["X","184.3K followers","+2.1K"],["LinkedIn","42.7K followers","+1.6K"],["YouTube","287K subscribers","+4.3K"],["Instagram","96.4K followers","+1.9K"]]}+ };++ const ids = {+ title: document.getElementById('title'), subtitle: document.getElementById('subtitle'), growthValue: document.getElementById('growthValue'), growthDelta: document.getElementById('growthDelta'), postText: document.getElementById('postText'), postPlatform: document.getElementById('postPlatform'), kpis: document.getElementById('kpis'), platforms: document.getElementById('platforms'), engValue: document.getElementById('engValue')+ };++ function numberTween(el, toText){+ const target = parseFloat(toText.replace(/[^0-9.]/g,''));+ if(Number.isNaN(target)){el.textContent = toText; return;}+ const suffix = toText.replace(/[0-9.]/g,'');+ const start = 0;+ const t0 = performance.now();+ const dur = 700;+ function tick(t){+ const p = Math.min((t - t0)/dur,1);+ const v = start + (target - start) * (1 - Math.pow(1-p,3));+ el.textContent = (target >= 100 ? v.toFixed(1) : v.toFixed(1)) + suffix;+ if(p < 1) requestAnimationFrame(tick); else el.textContent = toText;+ }+ requestAnimationFrame(tick);+ }++ function renderNetwork(network){+ const d = data[network];+ ids.title.textContent = d.title;+ ids.subtitle.textContent = d.subtitle;+ numberTween(ids.growthValue, d.growth);+ ids.growthDelta.textContent = d.growthDelta;+ ids.postText.textContent = d.post;+ ids.postPlatform.textContent = d.postPlatform;+ numberTween(ids.engValue, d.eng);+ ids.platforms.innerHTML = d.platforms.map(p => `<div class="platform"><div class="name">${p[0]}</div><b>${p[1]}</b><div style="margin-top:5px;color:var(--good);font-size:12px">${p[2]}</div></div>`).join('');+ ids.kpis.innerHTML = d.kpis.map((k,i) => `<div class="kpi" style="animation-delay:${i*0.05}s"><div class="label">${k[0]}</div><div class="value">${k[1]}</div><div class="delta">${k[2]}</div></div>`).join('');+ }++ function setTheme(mode){+ document.documentElement.setAttribute('data-theme', mode);+ darkBtn.classList.toggle('active', mode === 'dark');+ lightBtn.classList.toggle('active', mode === 'light');+ drawAllCharts();+ }++ const chartState = {};+ const interactionState = {+ line: {+ hourChart: { pin: null, dragStart: null, dragEnd: null, dragging: false, ranges: [] },+ slaChart: { pin: null, dragStart: null, dragEnd: null, dragging: false, ranges: [] },+ roiChart: { pin: null, dragStart: null, dragEnd: null, dragging: false, ranges: [] },+ cohortChart: { pin: null, dragStart: null, dragEnd: null, dragging: false, ranges: [] }+ }+ };+ const insights = {+ focus: document.getElementById('insightFocus'),+ pin: document.getElementById('insightPin'),+ range: document.getElementById('insightRange'),+ ab: document.getElementById('insightAB')+ };+ let tooltipEl = null;+ function axisColor(){return getComputedStyle(document.documentElement).getPropertyValue('--line').trim();}+ function textColor(){return getComputedStyle(document.documentElement).getPropertyValue('--muted').trim();}+ function mainTextColor(){return getComputedStyle(document.documentElement).getPropertyValue('--text').trim();}++ function ensureTooltip(){+ if(tooltipEl) return;+ tooltipEl = document.createElement('div');+ tooltipEl.className = 'chart-tooltip';+ document.body.appendChild(tooltipEl);+ }+ function showTooltip(html, x, y){+ ensureTooltip();+ tooltipEl.innerHTML = html;+ // Position off-screen first so we can measure the actual size, then clamp inside the viewport+ tooltipEl.style.left = '-9999px';+ tooltipEl.style.top = '-9999px';+ tooltipEl.classList.add('show');+ const rect = tooltipEl.getBoundingClientRect();+ const margin = 8;+ const vw = window.innerWidth || document.documentElement.clientWidth;+ const vh = window.innerHeight || document.documentElement.clientHeight;+ let left = x + 14;+ let top = y + 14;+ if(left + rect.width + margin > vw) left = Math.max(margin, x - rect.width - 14);+ if(top + rect.height + margin > vh) top = Math.max(margin, y - rect.height - 14);+ if(left < margin) left = margin;+ if(top < margin) top = margin;+ tooltipEl.style.left = `${left}px`;+ tooltipEl.style.top = `${top}px`;+ }+ function hideTooltip(){+ if(!tooltipEl) return;+ tooltipEl.classList.remove('show');+ }+ function updateInsights(partial = {}){+ if(partial.focus !== undefined) insights.focus.innerHTML = partial.focus;+ if(partial.pin !== undefined) insights.pin.innerHTML = partial.pin;+ if(partial.range !== undefined) insights.range.innerHTML = partial.range;+ if(partial.ab !== undefined) insights.ab.innerHTML = partial.ab;+ }+ function calcRangeStats(st, range){+ const rs = Math.min(range[0], range[1]);+ const re = Math.max(range[0], range[1]);+ const seg = st.values.slice(rs, re + 1);+ const avg = seg.reduce((a,b)=>a+b,0) / seg.length;+ const variance = seg.reduce((a,b)=>a + Math.pow(b-avg,2),0) / seg.length;+ const volatility = Math.sqrt(variance);+ const peakVal = Math.max(...seg);+ const peakIndex = st.values.findIndex((v, idx)=> idx >= rs && idx <= re && v === peakVal);+ return {+ rs,+ re,+ avg,+ volatility,+ peakVal,+ peakLabel: st.labels[peakIndex] || st.labels[rs]+ };+ }+ function updateABInsight(id, st, ranges){+ if(!ranges || ranges.length < 2){+ updateInsights({ ab: 'Save 2 ranges with Shift+Drag' });+ return;+ }+ const a = calcRangeStats(st, ranges[ranges.length - 2]);+ const b = calcRangeStats(st, ranges[ranges.length - 1]);+ const avgDelta = a.avg === 0 ? 0 : ((b.avg - a.avg) / a.avg) * 100;+ const volDelta = a.volatility === 0 ? 0 : ((b.volatility - a.volatility) / a.volatility) * 100;+ const nMap = { hourChart:'Hourly', slaChart:'SLA', roiChart:'ROI', cohortChart:'Cohort' };+ updateInsights({+ ab: `<b>${nMap[id] || 'Metric'} A/B</b><br/>Avg ${avgDelta>=0?'+':''}${avgDelta.toFixed(1)}% · Vol ${volDelta>=0?'+':''}${volDelta.toFixed(1)}%<br/>Peak ${a.peakLabel}:${a.peakVal}${st.unit} -> ${b.peakLabel}:${b.peakVal}${st.unit}`+ });+ }++ function drawLineChart(id, arr, colorA, colorB, cfg = {}){+ const c = document.getElementById(id); if(!c) return;+ const ctx = c.getContext('2d'); const w = c.width; const h = c.height;+ ctx.clearRect(0,0,w,h);+ const padLeft = 42, padRight = 16, padTop = 18, padBottom = 26;+ // Guard against empty / single-point datasets so adapters that pass+ // sparse data don't divide by zero (NaN axis labels) or pick Infinity+ // as min/max+ if(!Array.isArray(arr) || arr.length === 0){+ ctx.fillStyle = textColor(); ctx.font = '11px Inter';+ ctx.fillText('No data', padLeft, h / 2);+ chartState[id] = { type:'line', points: [], values: [], labels: [], unit: cfg.unit || '', decimals: cfg.decimals ?? 0, isShortSeries: true };+ return;+ }+ if(arr.length === 1){+ // Render a single dot + value label rather than crashing on `arr.length-1`+ const cx = (padLeft + w - padRight) / 2;+ const cy = (padTop + h - padBottom) / 2;+ ctx.beginPath(); ctx.arc(cx, cy, 5, 0, Math.PI*2); ctx.fillStyle = colorA; ctx.fill();+ ctx.fillStyle = textColor(); ctx.font = '11px Inter';+ ctx.fillText(`${arr[0]}${cfg.unit || ''}`, cx + 10, cy + 4);+ chartState[id] = { type:'line', points: [{ x: cx, y: cy }], values: arr.slice(), labels: cfg.xLabels || ['1'], unit: cfg.unit || '', decimals: cfg.decimals ?? 0, isShortSeries: true };+ return;+ }+ const min = Math.min(...arr), max = Math.max(...arr);+ for(let i=0;i<5;i++){+ const y = padTop + (h-padTop-padBottom) * (i/4);+ const val = (max - ((max-min)*(i/4))).toFixed(cfg.decimals ?? 0);+ ctx.strokeStyle = axisColor(); ctx.lineWidth = 1; ctx.beginPath(); ctx.moveTo(padLeft,y); ctx.lineTo(w-padRight,y); ctx.stroke();+ ctx.fillStyle = textColor(); ctx.font='10px Inter'; ctx.fillText(val, 6, y + 3);+ }+ ctx.fillStyle = textColor(); ctx.font='10px Inter';+ (cfg.xLabels || arr.map((_,i)=>String(i+1))).forEach((lb,i)=>{+ const x = padLeft + (w-padLeft-padRight)*(i/(arr.length-1));+ ctx.fillText(lb, x - 9, h - 8);+ });+ const pts = arr.map((_,i)=>({x:0, y:0}));+ for(let i=0;i<pts.length;i++){+ pts[i].x = padLeft + (w-padLeft-padRight)*(i/(arr.length-1));+ pts[i].y = h-padBottom-((arr[i]-min)/(Math.max(max-min,1)))*(h-padTop-padBottom);+ }+ const grad = ctx.createLinearGradient(0,0,w,0); grad.addColorStop(0,colorA); grad.addColorStop(1,colorB);+ ctx.strokeStyle = grad; ctx.lineWidth = 3; ctx.beginPath(); pts.forEach((p,i)=> i?ctx.lineTo(p.x,p.y):ctx.moveTo(p.x,p.y)); ctx.stroke();+ ctx.beginPath(); ctx.moveTo(pts[0].x,h-padBottom); pts.forEach((p)=>ctx.lineTo(p.x,p.y)); ctx.lineTo(pts[pts.length-1].x,h-padBottom); ctx.closePath();+ const fill = ctx.createLinearGradient(0,padTop,0,h-padBottom); fill.addColorStop(0,'rgba(120,170,255,.24)'); fill.addColorStop(1,'rgba(120,170,255,0)');+ ctx.fillStyle = fill; ctx.fill();+ pts.forEach((p)=>{ctx.beginPath();ctx.arc(p.x,p.y,3,0,Math.PI*2);ctx.fillStyle=colorB;ctx.fill();});+ if(Array.isArray(cfg.savedRanges)){+ cfg.savedRanges.forEach((r,idx)=>{+ const rs = Math.min(r[0], r[1]);+ const re = Math.max(r[0], r[1]);+ if(pts[rs] && pts[re]){+ const x1 = pts[rs].x, x2 = pts[re].x;+ ctx.fillStyle = idx % 2 ? 'rgba(120,180,255,.1)' : 'rgba(255,220,130,.12)';+ ctx.fillRect(x1, padTop, x2 - x1, h - padTop - padBottom);+ ctx.strokeStyle = 'rgba(255,255,255,.18)';+ ctx.strokeRect(x1, padTop, x2 - x1, h - padTop - padBottom);+ }+ });+ }+ if(typeof cfg.rangeStart === 'number' && typeof cfg.rangeEnd === 'number'){+ const rs = Math.min(cfg.rangeStart, cfg.rangeEnd);+ const re = Math.max(cfg.rangeStart, cfg.rangeEnd);+ if(pts[rs] && pts[re]){+ const x1 = pts[rs].x, x2 = pts[re].x;+ ctx.fillStyle = 'rgba(255,255,255,.08)';+ ctx.fillRect(x1, padTop, x2 - x1, h - padTop - padBottom);+ ctx.strokeStyle = 'rgba(255,255,255,.25)';+ ctx.strokeRect(x1, padTop, x2 - x1, h - padTop - padBottom);+ }+ }+ if(typeof cfg.hoverIndex === 'number' && pts[cfg.hoverIndex]){+ const hp = pts[cfg.hoverIndex];+ ctx.strokeStyle = 'rgba(255,255,255,.35)';+ ctx.setLineDash([4,4]);+ ctx.beginPath(); ctx.moveTo(hp.x, padTop); ctx.lineTo(hp.x, h-padBottom); ctx.stroke();+ ctx.setLineDash([]);+ ctx.beginPath(); ctx.arc(hp.x, hp.y, 6, 0, Math.PI*2); ctx.fillStyle = mainTextColor(); ctx.fill();+ ctx.beginPath(); ctx.arc(hp.x, hp.y, 3, 0, Math.PI*2); ctx.fillStyle = colorB; ctx.fill();+ }+ if(typeof cfg.pinIndex === 'number' && pts[cfg.pinIndex]){+ const pp = pts[cfg.pinIndex];+ ctx.beginPath(); ctx.arc(pp.x, pp.y, 8, 0, Math.PI*2); ctx.fillStyle = 'rgba(255,255,255,.18)'; ctx.fill();+ ctx.beginPath(); ctx.arc(pp.x, pp.y, 4, 0, Math.PI*2); ctx.fillStyle = '#ffd166'; ctx.fill();+ }+ chartState[id] = {+ type:'line',+ points: pts,+ values: arr,+ labels: cfg.xLabels || arr.map((_,i)=>String(i+1)),+ unit: cfg.unit || '',+ decimals: typeof cfg.decimals === 'number' ? cfg.decimals : 0,+ // guard against single-point datasets when an adapter passes one value+ isShortSeries: arr.length < 2+ };+ }++ function drawStackBars(id, hoverIndex = -1){+ const c = document.getElementById(id); if(!c) return;+ const ctx = c.getContext('2d'); const w=c.width,h=c.height;+ ctx.clearRect(0,0,w,h);+ const groups = [[42,28,16],[55,20,10],[48,30,14],[61,22,12],[50,32,18],[66,24,14]];+ const colors = ['#68e4bd','#67b9ff','#9a86ff'];+ const yTicks = [0,20,40,60,80];+ const gap = 18, bw = (w-70-gap*(groups.length-1))/groups.length;+ let x = 40;+ yTicks.forEach((tick,i)=>{+ const y = h - 30 - (i/4)*(h-56);+ ctx.strokeStyle = axisColor(); ctx.beginPath(); ctx.moveTo(36,y); ctx.lineTo(w-14,y); ctx.stroke();+ ctx.fillStyle = textColor(); ctx.font='10px Inter'; ctx.fillText(String(tick), 8, y+3);+ });+ const bars = [];+ groups.forEach(g=>{+ let y = h-30;+ const startX = x;+ g.forEach((v,idx)=>{+ const hh = v*2.1;+ ctx.fillStyle = colors[idx];+ ctx.fillRect(x,y-hh,bw,hh);+ y -= hh;+ });+ bars.push({x:startX, yTop:y, yBottom:h-30, w:bw, stack:g});+ x += bw + gap;+ });+ ctx.fillStyle = textColor(); ctx.font='11px Inter';+ const dayLabels = ['Mon','Tue','Wed','Thu','Fri','Sat'];+ dayLabels.forEach((d,i)=>ctx.fillText(d, 42+i*(bw+gap), h-10));+ if(hoverIndex >= 0 && bars[hoverIndex]){+ const b = bars[hoverIndex];+ ctx.strokeStyle = 'rgba(255,255,255,.45)';+ ctx.strokeRect(b.x-2, b.yTop-2, b.w+4, b.yBottom-b.yTop+4);+ }+ chartState[id] = { type:'stack', bars, labels: dayLabels };+ }++ function drawDonut(id, hoverIndex = -1){+ const c = document.getElementById(id); if(!c) return;+ const ctx = c.getContext('2d'); const w=c.width,h=c.height;+ ctx.clearRect(0,0,w,h);+ const vals=[58,28,14], labels=['Positive','Neutral','Negative'], colors=['#68e4bd','#67b9ff','#ff8aa3'];+ const total = vals.reduce((a,b)=>a+b,0);+ let start = -Math.PI/2;+ const cx = w/2, cy = h/2, radius = 52;+ const arcs = [];+ vals.forEach((v,i)=>{+ const ang = (v/total)*Math.PI*2;+ ctx.beginPath();+ ctx.arc(cx,cy,hoverIndex===i?radius+2:radius,start,start+ang);+ ctx.strokeStyle=colors[i];+ ctx.lineWidth=20;+ ctx.stroke();+ arcs.push({start, end:start+ang, value:v, label:labels[i], color:colors[i]});+ start += ang;+ });+ ctx.fillStyle = mainTextColor();+ const centerValue = hoverIndex >= 0 ? `${vals[hoverIndex]}%` : '58%';+ ctx.font='600 24px Inter'; ctx.fillText(centerValue, cx-22, cy+8);+ ctx.fillStyle = textColor(); ctx.font='10px Inter'; ctx.fillText(hoverIndex >= 0 ? labels[hoverIndex] : 'Positive', cx-24, cy+22);+ chartState[id] = { type:'donut', arcs, cx, cy, radius };+ }+ function drawGeoBars(id, hoverIndex = -1){+ const c = document.getElementById(id); if(!c) return;+ const ctx = c.getContext('2d'); const w = c.width, h = c.height;+ ctx.clearRect(0,0,w,h);+ const labels = ['US','UK','DE','IN','SEA'];+ const values = [38,22,14,18,8];+ const barH = 18, gap = 12, left = 60, top = 22, maxW = w - left - 24;+ ctx.fillStyle = textColor(); ctx.font = '11px Inter';+ const bars = [];+ labels.forEach((lb,i)=>{+ const y = top + i*(barH+gap);+ const ww = maxW * (values[i]/40);+ ctx.fillStyle = axisColor();+ ctx.fillRect(left, y, maxW, barH);+ ctx.fillStyle = hoverIndex===i ? '#8ec5ff' : '#67b9ff';+ ctx.fillRect(left, y, ww, barH);+ ctx.fillStyle = textColor();+ ctx.fillText(lb, 18, y+13);+ ctx.fillText(values[i] + '%', left + ww + 8, y+13);+ bars.push({x:left,y,w:ww,h:barH,label:lb,value:values[i]});+ });+ chartState[id] = { type:'geo', bars };+ }++ function buildHeatmap(){+ const box = document.getElementById('heatmap');+ if(!box || box.children.length) return;+ for(let i=0;i<72;i++){+ const cell = document.createElement('div');+ const a = 0.15 + Math.random()*0.85;+ cell.style.background = `rgba(120,170,255,${a.toFixed(2)})`;+ if(i%5===0) cell.style.background = `rgba(204,140,255,${(0.25 + Math.random()*0.7).toFixed(2)})`;+ if(i%7===0) cell.style.background = `rgba(104,228,189,${(0.2 + Math.random()*0.75).toFixed(2)})`;+ cell.title = `Slot ${i+1} · engagement ${(42 + (i%13)*3)}%`;+ box.appendChild(cell);+ }+ }++ function bindChartInteractions(){+ const lineIds = ['hourChart','slaChart','roiChart','cohortChart'];+ lineIds.forEach((id)=>{+ const c = document.getElementById(id);+ if(!c || c.dataset.bound) return;+ c.dataset.bound = '1';+ const colorMap = {+ hourChart: ['#67b9ff','#cc8cff'],+ slaChart: ['#68e4bd','#67b9ff'],+ roiChart: ['#f3d26e','#cc8cff'],+ cohortChart: ['#68e4bd','#67b9ff']+ };+ const nameMap = {+ hourChart: 'Engagement by Hour',+ slaChart: 'Response SLA',+ roiChart: 'Revenue vs Cost',+ cohortChart: 'Cohort Retention'+ };+ const colors = colorMap[id];+ const redraw = (extra = {})=>{+ const st = chartState[id];+ if(!st) return;+ const local = interactionState.line[id];+ drawLineChart(id, st.values, colors[0], colors[1], {+ xLabels: st.labels,+ unit: st.unit,+ decimals: st.decimals,+ pinIndex: local.pin,+ rangeStart: local.dragStart,+ rangeEnd: local.dragEnd,+ savedRanges: local.ranges,+ ...extra+ });+ };+ const nearestByMouse = (e)=>{+ const st = chartState[id]; if(!st) return -1;+ const rect = c.getBoundingClientRect();+ const mx = (e.clientX - rect.left) * (c.width / rect.width);+ let nearest = 0, minDist = Infinity;+ st.points.forEach((p,i)=>{ const d = Math.abs(p.x - mx); if(d < minDist){minDist = d; nearest = i;} });+ return nearest;+ };+ // Touch support — call the same logical handlers directly with a+ // plain pointer object instead of dispatching synthetic Events. This+ // avoids assigning to read-only Event fields (Event.target/etc.) which+ // would throw a TypeError before reaching the real handler.+ const buildPointer = (touch, originalEvent)=>({+ clientX: touch.clientX,+ clientY: touch.clientY,+ shiftKey: !!(originalEvent && originalEvent.shiftKey)+ });+ const handleTouchStart = (p)=>{+ const local = interactionState.line[id];+ const nearest = nearestByMouse(p);+ if(nearest < 0) return;+ local.dragStart = nearest;+ local.dragEnd = nearest;+ local.dragging = true;+ redraw();+ };+ const handleTouchMove = (p)=>{+ const st = chartState[id]; if(!st) return;+ const nearest = nearestByMouse(p);+ const local = interactionState.line[id];+ if(!local.dragging){+ redraw({ hoverIndex: nearest });+ updateInsights({+ focus: `<b>${nameMap[id]}</b><br/>${st.labels[nearest]} = ${st.values[nearest]}${st.unit}`+ });+ showTooltip(`<b>${st.labels[nearest]}</b><br/>Value: ${st.values[nearest]}${st.unit}`, p.clientX, p.clientY);+ return;+ }+ local.dragEnd = nearest;+ redraw();+ const rs = Math.min(local.dragStart, local.dragEnd);+ const re = Math.max(local.dragStart, local.dragEnd);+ const seg = st.values.slice(rs, re + 1);+ const avg = (seg.reduce((a,b)=>a+b,0) / seg.length).toFixed(1);+ updateInsights({+ focus: `<b>${nameMap[id]}</b><br/>Selecting ${st.labels[rs]} - ${st.labels[re]}`,+ range: `Avg <b>${avg}${st.unit}</b>`+ });+ showTooltip(`<b>${st.labels[rs]} → ${st.labels[re]}</b><br/>Avg: ${avg}${st.unit}`, p.clientX, p.clientY);+ };+ const handleTouchEnd = (p)=>{+ const st = chartState[id];+ const local = interactionState.line[id];+ if(!local.dragging) return;+ const moved = local.dragStart !== local.dragEnd;+ local.dragging = false;+ if(!moved){+ // tap-to-pin+ local.pin = local.pin === local.dragStart ? null : local.dragStart;+ local.dragStart = null;+ local.dragEnd = null;+ redraw({ hoverIndex: local.pin });+ if(local.pin !== null){+ updateInsights({ pin: `<b>${nameMap[id]} @ ${st.labels[local.pin]}</b><br/>${st.values[local.pin]}${st.unit}` });+ showTooltip(`<b>Pinned: ${st.labels[local.pin]}</b><br/>Value: ${st.values[local.pin]}${st.unit}`, p.clientX, p.clientY);+ } else { updateInsights({ pin: 'None' }); hideTooltip(); }+ return;+ }+ local.dragStart = null;+ local.dragEnd = null;+ redraw();+ };+ c.addEventListener('touchstart',(e)=>{+ if(!e.touches || e.touches.length === 0) return;+ e.preventDefault();+ handleTouchStart(buildPointer(e.touches[0], e));+ }, { passive: false });+ c.addEventListener('touchmove',(e)=>{+ if(!e.touches || e.touches.length === 0) return;+ e.preventDefault();+ handleTouchMove(buildPointer(e.touches[0], e));+ }, { passive: false });+ c.addEventListener('touchend',(e)=>{+ const t = (e.changedTouches && e.changedTouches[0]) || null;+ if(!t) return;+ e.preventDefault();+ handleTouchEnd(buildPointer(t, e));+ }, { passive: false });+ c.addEventListener('touchcancel',()=>{+ const local = interactionState.line[id];+ local.dragging = false;+ local.dragStart = null;+ local.dragEnd = null;+ hideTooltip();+ redraw({ hoverIndex: local.pin });+ });+ // Keyboard arrow keys: step through indices for accessibility (a11y).+ // Tab focus the canvas first, then ←/→ to move the pin one step.+ if(!c.hasAttribute('tabindex')) c.setAttribute('tabindex', '0');+ c.addEventListener('keydown',(e)=>{+ const st = chartState[id]; if(!st || !st.points || st.points.length === 0) return;+ const local = interactionState.line[id];+ const last = st.points.length - 1;+ if(e.key === 'ArrowLeft' || e.key === 'ArrowRight'){+ e.preventDefault();+ const cur = local.pin == null ? 0 : local.pin;+ const next = e.key === 'ArrowLeft' ? Math.max(0, cur - 1) : Math.min(last, cur + 1);+ local.pin = next;+ redraw({ hoverIndex: next });+ updateInsights({+ focus: `<b>${nameMap[id]}</b><br/>${st.labels[next]} = ${st.values[next]}${st.unit}`,+ pin: `<b>${nameMap[id]} @ ${st.labels[next]}</b><br/>${st.values[next]}${st.unit}`+ });+ } else if(e.key === 'Escape'){+ e.preventDefault();+ local.pin = null; local.dragStart = null; local.dragEnd = null; local.dragging = false;+ redraw();+ updateInsights({ pin: 'None' });+ hideTooltip();+ }+ });+ c.addEventListener('mousedown',(e)=>{+ const local = interactionState.line[id];+ const nearest = nearestByMouse(e);+ if(nearest < 0) return;+ local.dragStart = nearest;+ local.dragEnd = nearest;+ local.dragging = true;+ redraw();+ });+ c.addEventListener('mousemove',(e)=>{+ const st = chartState[id]; if(!st) return;+ const nearest = nearestByMouse(e);+ const local = interactionState.line[id];+ if(local.dragging){+ local.dragEnd = nearest;+ redraw();+ const rs = Math.min(local.dragStart, local.dragEnd);+ const re = Math.max(local.dragStart, local.dragEnd);+ const seg = st.values.slice(rs, re + 1);+ const avg = (seg.reduce((a,b)=>a+b,0) / seg.length).toFixed(1);+ const peak = Math.max(...seg);+ const low = Math.min(...seg);+ updateInsights({+ focus: `<b>${nameMap[id]}</b><br/>Selecting ${st.labels[rs]} - ${st.labels[re]}`,+ range: `Avg <b>${avg}${st.unit}</b> · Peak <b>${peak}${st.unit}</b> · Low <b>${low}${st.unit}</b>`+ });+ showTooltip(`<b>${st.labels[rs]} → ${st.labels[re]}</b><br/>Avg: ${avg}${st.unit} · Peak: ${peak}${st.unit} · Low: ${low}${st.unit}`, e.clientX, e.clientY);+ return;+ }+ const prev = nearest > 0 ? st.values[nearest - 1] : st.values[nearest];+ const mom = prev === 0 ? 0 : ((st.values[nearest] - prev) / prev) * 100;+ const baseline = st.values.reduce((a,b)=>a+b,0) / st.values.length;+ const yoy = baseline === 0 ? 0 : ((st.values[nearest] - baseline) / baseline) * 100;+ redraw({ hoverIndex: nearest });+ updateInsights({+ focus: `<b>${nameMap[id]}</b><br/>${st.labels[nearest]} = ${st.values[nearest]}${st.unit}`,+ range: `环比 <b>${mom>=0?'+':''}${mom.toFixed(1)}%</b> · 同比(基线) <b>${yoy>=0?'+':''}${yoy.toFixed(1)}%</b>`+ });+ showTooltip(`<b>${st.labels[nearest]}</b><br/>Value: ${st.values[nearest]}${st.unit}<br/>环比: ${mom>=0?'+':''}${mom.toFixed(1)}% · 同比(基线): ${yoy>=0?'+':''}${yoy.toFixed(1)}%`, e.clientX, e.clientY);+ });+ c.addEventListener('mouseup',(e)=>{+ const st = chartState[id];+ const local = interactionState.line[id];+ if(!local.dragging) return;+ const moved = local.dragStart !== local.dragEnd;+ local.dragging = false;+ if(!moved){+ local.pin = local.pin === local.dragStart ? null : local.dragStart;+ local.dragStart = null;+ local.dragEnd = null;+ redraw({ hoverIndex: local.pin });+ if(local.pin !== null){+ const st = chartState[id];+ updateInsights({ pin: `<b>${nameMap[id]} @ ${st.labels[local.pin]}</b><br/>${st.values[local.pin]}${st.unit}` });+ showTooltip(`<b>Pinned: ${st.labels[local.pin]}</b><br/>Value: ${st.values[local.pin]}${st.unit}`, e.clientX, e.clientY);+ } else { updateInsights({ pin: 'None' }); hideTooltip(); }+ return;+ }+ if(e.shiftKey){+ local.ranges.push([local.dragStart, local.dragEnd]);+ if(local.ranges.length > 4) local.ranges.shift();+ const rs = Math.min(local.dragStart, local.dragEnd);+ const re = Math.max(local.dragStart, local.dragEnd);+ const seg = st.values.slice(rs, re + 1);+ const avg = (seg.reduce((a,b)=>a+b,0) / seg.length).toFixed(1);+ updateInsights({+ range: `Saved #${local.ranges.length}: ${st.labels[rs]}-${st.labels[re]} · Avg <b>${avg}${st.unit}</b>`+ });+ updateABInsight(id, st, local.ranges);+ }+ // Clear active drag state BEFORE redraw so the live overlay is+ // not painted onto the final frame (saved ranges still render+ // via local.ranges)+ local.dragStart = null;+ local.dragEnd = null;+ redraw();+ });+ c.addEventListener('mouseleave',()=>{+ const local = interactionState.line[id];+ // If the pointer leaves the canvas mid-drag we must abandon the+ // active range, otherwise a stale overlay sticks around until+ // the next interaction+ local.dragging = false;+ local.dragStart = null;+ local.dragEnd = null;+ hideTooltip();+ redraw({ hoverIndex: local.pin });+ });+ c.addEventListener('dblclick', ()=>{+ const local = interactionState.line[id];+ local.ranges = [];+ local.pin = null;+ local.dragStart = null;+ local.dragEnd = null;+ redraw();+ updateInsights({ pin: 'None', range: 'No active range', ab: 'Save 2 ranges with Shift+Drag', focus: '<b>Live overview</b><br/>Hover charts to inspect details.' });+ });+ });++ const mix = document.getElementById('mixChart');+ if(mix && !mix.dataset.bound){+ mix.dataset.bound = '1';+ mix.addEventListener('mousemove',(e)=>{+ const st = chartState.mixChart; if(!st) return;+ const rect = mix.getBoundingClientRect();+ const mx = (e.clientX - rect.left) * (mix.width / rect.width);+ let hit = -1;+ st.bars.forEach((b,i)=>{ if(mx >= b.x && mx <= b.x + b.w) hit = i; });+ drawStackBars('mixChart', hit);+ if(hit >= 0){+ const s = st.bars[hit].stack;+ showTooltip(`<b>${st.labels[hit]}</b><br/>Video ${s[0]} · Thread ${s[1]} · Carousel ${s[2]}`, e.clientX, e.clientY);+ updateInsights({+ focus: `<b>Content Mix · ${st.labels[hit]}</b><br/>Video ${s[0]} · Thread ${s[1]} · Carousel ${s[2]}`+ });+ } else hideTooltip();+ });+ mix.addEventListener('mouseleave',()=>{ hideTooltip(); drawStackBars('mixChart'); });+ }++ const donut = document.getElementById('sentimentChart');+ if(donut && !donut.dataset.bound){+ donut.dataset.bound = '1';+ donut.addEventListener('mousemove',(e)=>{+ const st = chartState.sentimentChart; if(!st) return;+ const rect = donut.getBoundingClientRect();+ const mx = (e.clientX - rect.left) * (donut.width / rect.width);+ const my = (e.clientY - rect.top) * (donut.height / rect.height);+ const dx = mx - st.cx, dy = my - st.cy;+ const dist = Math.hypot(dx,dy);+ const angRaw = Math.atan2(dy,dx);+ const ang = angRaw < -Math.PI/2 ? angRaw + Math.PI*2 : angRaw;+ let hit = -1;+ st.arcs.forEach((a,i)=>{ if(dist > st.radius-14 && dist < st.radius+14 && ang >= a.start && ang <= a.end) hit = i; });+ drawDonut('sentimentChart', hit);+ if(hit >= 0){+ const a = st.arcs[hit];+ showTooltip(`<b>${a.label}</b><br/>Share: ${a.value}%`, e.clientX, e.clientY);+ updateInsights({+ focus: `<b>Sentiment · ${a.label}</b><br/>Share: ${a.value}%`+ });+ } else hideTooltip();+ });+ donut.addEventListener('mouseleave',()=>{ hideTooltip(); drawDonut('sentimentChart'); });+ }+ const geo = document.getElementById('geoChart');+ if(geo && !geo.dataset.bound){+ geo.dataset.bound = '1';+ geo.addEventListener('mousemove',(e)=>{+ const st = chartState.geoChart; if(!st) return;+ const rect = geo.getBoundingClientRect();+ const mx = (e.clientX - rect.left) * (geo.width / rect.width);+ const my = (e.clientY - rect.top) * (geo.height / rect.height);+ let hit = -1;+ st.bars.forEach((b,i)=>{ if(mx>=b.x && mx<=b.x+b.w && my>=b.y && my<=b.y+b.h) hit = i; });+ drawGeoBars('geoChart', hit);+ if(hit >= 0){+ const b = chartState.geoChart.bars[hit];+ showTooltip(`<b>${b.label}</b><br/>Conversion share: ${b.value}%`, e.clientX, e.clientY);+ updateInsights({ focus: `<b>Geo Contribution</b><br/>${b.label} contributes ${b.value}% conversions` });+ } else hideTooltip();+ });+ geo.addEventListener('mouseleave',()=>{ hideTooltip(); drawGeoBars('geoChart'); });+ }+ document.addEventListener('mouseup', ()=>{+ ['hourChart','slaChart','roiChart','cohortChart'].forEach((id)=>{+ const local = interactionState.line[id];+ if(local && local.dragging) local.dragging = false;+ });+ });+ }++ function drawAllCharts(){+ drawLineChart('hourChart',[21,18,25,33,42,54,48,59,64,58,52,46],'#67b9ff','#cc8cff',{+ xLabels:['00','02','04','06','08','10','12','14','16','18','20','22'],+ unit:'%',+ pinIndex: interactionState.line.hourChart.pin,+ rangeStart: interactionState.line.hourChart.dragStart,+ rangeEnd: interactionState.line.hourChart.dragEnd,+ savedRanges: interactionState.line.hourChart.ranges+ });+ drawStackBars('mixChart');+ drawDonut('sentimentChart');+ drawLineChart('slaChart',[28,40,36,31,42,35,30],'#68e4bd','#67b9ff',{+ xLabels:['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],+ unit:'m',+ pinIndex: interactionState.line.slaChart.pin,+ rangeStart: interactionState.line.slaChart.dragStart,+ rangeEnd: interactionState.line.slaChart.dragEnd,+ savedRanges: interactionState.line.slaChart.ranges+ });+ drawLineChart('roiChart',[1.2,1.4,1.3,1.7,1.9,2.1,2.4],'#f3d26e','#cc8cff',{+ xLabels:['W1','W2','W3','W4','W5','W6','W7'],+ unit:'x',+ pinIndex: interactionState.line.roiChart.pin,+ rangeStart: interactionState.line.roiChart.dragStart,+ rangeEnd: interactionState.line.roiChart.dragEnd,+ savedRanges: interactionState.line.roiChart.ranges,+ decimals:1+ });+ drawLineChart('cohortChart',[92,81,73,67,61,58,54],'#68e4bd','#67b9ff',{+ xLabels:['C1','C2','C3','C4','C5','C6','C7'],+ unit:'%',+ pinIndex: interactionState.line.cohortChart.pin,+ rangeStart: interactionState.line.cohortChart.dragStart,+ rangeEnd: interactionState.line.cohortChart.dragEnd,+ savedRanges: interactionState.line.cohortChart.ranges+ });+ drawGeoBars('geoChart');+ }++ const networks = ['x','linkedin','youtube','instagram'];+ let idx = 0;+ renderNetwork(networks[idx]);+ buildHeatmap();+ drawAllCharts();+ bindChartInteractions();+ updateInsights({+ focus: '<b>Live overview</b><br/>Hover charts to inspect details.',+ pin: 'None',+ range: 'No active range',+ ab: 'Save 2 ranges with Shift+Drag'+ });++ setInterval(()=>{ idx = (idx + 1) % networks.length; renderNetwork(networks[idx]); }, 3600);++ const darkBtn = document.getElementById('darkBtn');+ const lightBtn = document.getElementById('lightBtn');+ darkBtn.addEventListener('click', ()=> setTheme('dark'));+ lightBtn.addEventListener('click', ()=> setTheme('light'));+ const frameEl = document.querySelector('.frame');+ window.addEventListener('mousemove',(e)=>{+ if(!frameEl) return;+ const x = (e.clientX / window.innerWidth - .5) * 6;+ const y = (e.clientY / window.innerHeight - .5) * -4;+ frameEl.style.transform = `perspective(1200px) rotateY(${x.toFixed(2)}deg) rotateX(${y.toFixed(2)}deg)`;+ });+ window.addEventListener('mouseleave',()=>{ if(frameEl) frameEl.style.transform = 'perspective(1200px) rotateY(0deg) rotateX(0deg)'; });+ </script>+</body>+</html>diff --git a/src/lib/templates/skills/social-reddit-card/SKILL.md b/src/lib/templates/skills/social-reddit-card/SKILL.mdnew file mode 100644index 00000000..45a2eb7e--- /dev/null+++ b/src/lib/templates/skills/social-reddit-card/SKILL.md@@ -0,0 +1,51 @@+---+name: social-reddit-card+zh_name: "Reddit 帖子卡"+en_name: "Reddit Post Card"+emoji: "🔺"+description: "拟真 Reddit 帖子卡 + 上下投票 + 评论数, 适合视频叠加 / 故事分享"+category: card+scenario: marketing+aspect_hint: "1280×720 或 800×600"+featured: 42+tags: ["reddit", "social", "card", "overlay", "story"]+example_id: sample-social-reddit-card+example_name: "Reddit 帖子 · r/programming"+example_format: markdown+example_tagline: "Reddit dark mode + vote rail"+example_desc: "一条 AITA 风格故事 + 12.3k upvotes + 1.2k comments"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · reddit-post"+---++【模板: Reddit 帖子卡】+【意图】把一段故事 / 提问 / 段子, 渲染成 Reddit 帖子卡片, 用于视频叠加、社媒故事分享。Inspired by hyperframes reddit-post。++【画布】1280×720 (视频叠加) 或 800×600 (单卡分享); 背景透明或暗色 `#0b1416`。++【卡片结构】+- 外框: 圆角 16px, bg 白 `#ffffff` (light) 或 `#1a1a1b` (dark, 推荐 video overlay), border 1px `#edeff1` / `#343536`。+- 左侧 **vote rail** (40-56px 宽):+ - 上箭头 ▲ (16px, `#878a8c`, hover 变橙 `#ff4500`)。+ - 票数 (Inter, 17px, weight 700, 居中, 颜色: 0 灰 / 正橙 / 负蓝); 大数字用 `12.3k` 格式。+ - 下箭头 ▼ (hover 变蓝 `#7193ff`)。+- 主体区:+ - 顶部 meta row: 子版块图标 (CSS 圆形 + 字母) + `r/subreddit` (粗) + `· Posted by u/username · 3h` (小字灰)。+ - **标题** (Inter / IBM Plex Sans, 22-28px, weight 500, dark text)。+ - 内容: 16px body 或 引用块或 1 张图 (CSS 渐变占位)。+ - 底部 action row: 💬 `1.2k Comments` · 🏆 Awards · ⤴️ Share · ⋯ icon。+- 顶部右上角 Reddit Snoo logo (内联 SVG, 橙色 `#ff4500`)。++【字体】+- 主: `IBM Plex Sans` → fallback `Inter`, weight 400/500/700。+- 数字: 同主字体。+- 中文: `Noto Sans SC`。++【设计细节】+- Light mode: bg `#fff`, text `#1c1c1c`, secondary `#7c7c7c`。+- Dark mode (推荐): bg `#1a1a1b`, text `#d7dadc`, secondary `#818384`, border `#343536`。+- 票数颜色: 正 = `#ff4500`, 负 = `#7193ff`, 0 = `#878a8c`。+- 标题点击区可加微妙背景 hover。+- 严禁外链图片; 图片占位用 CSS 渐变 + 描述。+- 必须用用户提供的内容; 自动生成合理的 subreddit / username / 票数。+- 单文件 HTML; icon 内联 SVG (上下箭头、评论气泡、奖杯)。diff --git a/src/lib/templates/skills/social-reddit-card/example.html b/src/lib/templates/skills/social-reddit-card/example.htmlnew file mode 100644index 00000000..9dec62ac--- /dev/null+++ b/src/lib/templates/skills/social-reddit-card/example.html@@ -0,0 +1,56 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Reddit Post · r/programming</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" />+<style>+ body { font-family: 'IBM Plex Sans','Noto Sans SC',system-ui,sans-serif; background: radial-gradient(circle at 30% 20%, #1a2026 0%, #050507 80%); }+</style>+</head>+<body class="min-h-screen flex items-center justify-center p-12">+ <article class="w-[720px] rounded-2xl flex" style="background:#1a1a1b;border:1px solid #343536;box-shadow:0 30px 60px -20px rgba(0,0,0,0.6)">+ <!-- vote rail -->+ <aside class="w-12 py-4 flex flex-col items-center gap-1.5 shrink-0" style="background:#161617;border-right:1px solid #343536;border-top-left-radius:1rem;border-bottom-left-radius:1rem">+ <button class="text-[#878a8c] hover:text-[#ff4500]"><svg viewBox="0 0 24 24" class="w-5 h-5" fill="currentColor"><path d="M12 4l8 10h-5v6h-6v-6H4z"/></svg></button>+ <span class="font-bold text-[15px]" style="color:#ff4500">12.3k</span>+ <button class="text-[#878a8c] hover:text-[#7193ff]"><svg viewBox="0 0 24 24" class="w-5 h-5" fill="currentColor"><path d="M12 20l-8-10h5V4h6v6h5z"/></svg></button>+ </aside>+ <!-- body -->+ <div class="flex-1 p-5 min-w-0" style="color:#d7dadc">+ <!-- meta -->+ <div class="flex items-center gap-2 text-[12px]" style="color:#818384">+ <div class="w-5 h-5 rounded-full flex items-center justify-center text-white text-[10px] font-bold" style="background:#ff4500">r/</div>+ <span class="font-bold" style="color:#d7dadc">r/programming</span>+ <span>·</span>+ <span>Posted by u/code_quality_guy · 4h ago</span>+ <span class="ml-auto text-[10px] uppercase tracking-wider px-2 py-0.5 rounded" style="background:#272729;color:#d7dadc">TIL</span>+ </div>+ <!-- title -->+ <h1 class="mt-3 text-[22px] font-medium leading-snug" style="color:#d7dadc">TIL my code reviewer asks LLMs to roast my PRs before approving</h1>+ <!-- body -->+ <p class="mt-3 text-[15px] leading-relaxed" style="color:#d7dadc">+ So I started doing this thing where I run my diff through Claude with the prompt "be brutally honest, find anything that would embarrass me at code review". The team lead picked up on the patterns and now does it as a first-pass before he even reads the PR.+ </p>+ <p class="mt-3 text-[15px] leading-relaxed" style="color:#d7dadc">Productivity up, ego down. 10/10 would recommend.</p>+ <!-- actions -->+ <div class="mt-4 flex items-center gap-3 text-[12.5px] font-semibold" style="color:#818384">+ <button class="flex items-center gap-1.5 hover:text-[#d7dadc] px-2 py-1 rounded hover:bg-[#272729]">+ <svg viewBox="0 0 24 24" class="w-4 h-4" fill="currentColor"><path d="M20 2H4a2 2 0 00-2 2v12a2 2 0 002 2h4l4 4 4-4h4a2 2 0 002-2V4a2 2 0 00-2-2z"/></svg>+ <span>1.2k Comments</span>+ </button>+ <button class="flex items-center gap-1.5 hover:text-[#d7dadc] px-2 py-1 rounded hover:bg-[#272729]">+ <svg viewBox="0 0 24 24" class="w-4 h-4" fill="currentColor"><path d="M12 2l3 7h7l-5.5 4.5 2 7L12 16l-6.5 4.5 2-7L2 9h7z"/></svg>+ <span>7 Awards</span>+ </button>+ <button class="flex items-center gap-1.5 hover:text-[#d7dadc] px-2 py-1 rounded hover:bg-[#272729]">+ <svg viewBox="0 0 24 24" class="w-4 h-4" fill="currentColor"><path d="M18 8a3 3 0 11-2.83-3H15l-7 4-1.17-1A3 3 0 113 11l5-3-4-3a3 3 0 11.83-1.83L9 6l7-4z"/></svg>+ <span>Share</span>+ </button>+ <button class="ml-auto px-2 py-1 rounded hover:bg-[#272729]">⋯</button>+ </div>+ </div>+ </article>+</body>+</html>diff --git a/src/lib/templates/skills/social-reddit-card/example.md b/src/lib/templates/skills/social-reddit-card/example.mdnew file mode 100644index 00000000..afdd817c--- /dev/null+++ b/src/lib/templates/skills/social-reddit-card/example.md@@ -0,0 +1,6 @@+## TIL my code reviewer asks LLMs to roast my PRs before approving++So I started doing this thing where I run my diff through Claude with the prompt "be brutally honest, find anything that would embarrass me at code review". The team lead picked up on the patterns and now does it as a first-pass before he even reads the PR. Productivity up, ego down.++Posted in r/programming by u/code_quality_guy · 4h ago+Upvotes: 12.3k · Comments: 1.2k · Awards: 7diff --git a/src/lib/templates/skills/social-spotify-card/SKILL.md b/src/lib/templates/skills/social-spotify-card/SKILL.mdnew file mode 100644index 00000000..96446a97--- /dev/null+++ b/src/lib/templates/skills/social-spotify-card/SKILL.md@@ -0,0 +1,50 @@+---+name: social-spotify-card+zh_name: "Spotify 正在播放卡"+en_name: "Spotify Now-Playing Card"+emoji: "🎵"+description: "Spotify Now Playing 风格卡: 专辑封面 + 进度条 + 播放控制, 适配视频叠加 / 个人主页"+category: card+scenario: personal+aspect_hint: "1280×720 或 600×200"+featured: 43+tags: ["spotify", "music", "now-playing", "card", "overlay"]+example_id: sample-social-spotify-card+example_name: "Spotify Now Playing · Lo-Fi"+example_format: markdown+example_tagline: "Spotify 经典 dark 卡"+example_desc: "Lo-Fi Beats · Chillhop 进度条 1:24 / 3:42 + 控制行"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · spotify-card"+---++【模板: Spotify Now-Playing 卡】+【意图】把一首歌、一段播客、或一段个人介绍渲染成 Spotify 正在播放卡, 适合 video overlay / 个人 about page / 创作者 hero。Inspired by hyperframes spotify-card。++【画布】两个尺寸:+- 横版视频叠加: 1280×720, 卡片居中或左下角浮动。+- 紧凑横条 widget: 600×200, 可嵌入到任何 hero。++【卡片结构】+- 外框: 圆角 12-16px; bg 用专辑封面色提取的暗渐变 (e.g. `linear-gradient(135deg, #1e3264 0%, #0d1f3d 100%)`) 或 Spotify 经典 `#121212`; 边缘有 1px subtle border。+- 左侧: **专辑封面** (CSS 渐变 + 大字 monogram 或抽象几何描绘, 不能外链图片), 圆角 6px, 60-200px 方形。+- 右侧:+ - 顶部 `NOW PLAYING` (uppercase letterspace 0.14em, 11px, 绿色 `#1DB954`)。+ - **歌名 / 标题** (Inter / Spotify Circular, 22-28px, weight 700, 白色)。+ - **艺人 / 副标** (16px, weight 400, opacity 0.7)。+ - 进度条: 4px 高, 圆角, 灰色背景 + 白色 fill (`width: 38%`); 两端时间戳 `1:24 / 3:42` (mono, 11px, 灰)。+ - 控制行: ⏮ ⏯ ⏭ icon (inline SVG, 24px, 白色 fill), shuffle / repeat icon 较小。+- 右上角: Spotify logo (内联 SVG, 绿色 `#1DB954` 圆 + 三道白色波纹)。+- 可选: 右下角小型音波动效 (3 个 bar `@keyframes`)。++【字体】+- 主: `Spotify Circular` → fallback `Inter` / `Inter Tight`, weight 400 / 700。+- 数字: 同主字体, 不用 mono 太多。++【设计细节】+- Spotify 经典 dark mode: `#121212` bg, `#1DB954` accent, `#b3b3b3` secondary text。+- 若用户输入是文本/标题 → 把 "标题" 当歌名, "副标/作者" 当艺人, 估算"时长" 3:42 默认。+- 若用户输入是音乐相关 → 直接对应。+- 严禁外链图片; 封面用 CSS 渐变 + 文字 logo / 几何描绘。+- 微动效: 音波动效用 `@keyframes`, 可被 `prefers-reduced-motion` 关闭。+- 单文件 HTML。diff --git a/src/lib/templates/skills/social-spotify-card/example.html b/src/lib/templates/skills/social-spotify-card/example.htmlnew file mode 100644index 00000000..efc3923d--- /dev/null+++ b/src/lib/templates/skills/social-spotify-card/example.html@@ -0,0 +1,70 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Spotify Now Playing · Lo-Fi</title>+<script src="https://cdn.tailwindcss.com"></script>+<link rel="preconnect" href="https://fonts.googleapis.com" />+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" />+<style>+ body { font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif; background: radial-gradient(circle at 30% 30%, #1a1a1f 0%, #050507 70%); }+ .cover {+ background:+ radial-gradient(circle at 30% 25%, #ffb1c3 0%, transparent 40%),+ radial-gradient(circle at 75% 70%, #6b46c1 0%, transparent 50%),+ linear-gradient(135deg, #1e1247 0%, #2c0f3f 100%);+ }+ .bar { background: rgba(255,255,255,0.18); }+ .bar-fill { background: #fff; }+ @keyframes wave { 0%,100%{transform:scaleY(0.4)} 50%{transform:scaleY(1)} }+ .wave i { display:inline-block; width:3px; margin-right:2px; background:#1DB954; transform-origin:bottom; animation: wave 1s ease-in-out infinite; }+ .wave i:nth-child(2){animation-delay:.15s} .wave i:nth-child(3){animation-delay:.3s} .wave i:nth-child(4){animation-delay:.45s}+</style>+</head>+<body class="min-h-screen flex items-center justify-center p-12">+ <div class="w-[640px] rounded-2xl p-6 flex gap-5 items-stretch" style="background:linear-gradient(135deg,#1e3264 0%,#0d1f3d 100%);border:1px solid rgba(255,255,255,0.08);box-shadow:0 30px 60px -20px rgba(0,0,0,0.6)">+ <!-- album cover -->+ <div class="cover w-44 h-44 rounded-md flex flex-col justify-between p-4 shrink-0 relative overflow-hidden">+ <div class="text-[10px] uppercase tracking-[0.22em] text-white/70 font-semibold">Chillhop</div>+ <div class="text-white">+ <div class="text-[22px] font-bold leading-tight">Lo-Fi<br/>Essentials</div>+ <div class="text-[10px] opacity-70 mt-1">Spring · 2026</div>+ </div>+ </div>+ <!-- right -->+ <div class="flex-1 flex flex-col justify-between min-w-0">+ <div>+ <div class="flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] font-semibold" style="color:#1DB954">+ <svg viewBox="0 0 24 24" class="w-4 h-4" fill="currentColor"><path d="M12 0a12 12 0 100 24 12 12 0 000-24zm5.52 17.36a.75.75 0 01-1.03.25c-2.83-1.73-6.4-2.12-10.6-1.16a.75.75 0 11-.34-1.46c4.6-1.05 8.55-.6 11.72 1.34.36.22.47.69.25 1.03zm1.47-3.27a.94.94 0 01-1.29.3c-3.24-1.99-8.17-2.57-12-1.4a.94.94 0 11-.55-1.8c4.4-1.34 9.83-.7 13.55 1.6.45.27.6.86.29 1.3zm.13-3.4c-3.88-2.3-10.3-2.51-14.01-1.4a1.13 1.13 0 11-.66-2.16c4.27-1.3 11.36-1.04 15.81 1.6a1.13 1.13 0 11-1.14 1.96z"/></svg>+ <span>Now Playing</span>+ <span class="wave ml-auto h-3 flex items-end"><i></i><i></i><i></i><i></i></span>+ </div>+ <h1 class="mt-3 text-white text-2xl font-bold leading-tight">Sunday Afternoon</h1>+ <p class="text-white/70 text-base mt-1">j'san · evil needle</p>+ </div>+ <div class="mt-4">+ <div class="flex items-center gap-3 text-[11px] font-mono text-white/60">+ <span>1:24</span>+ <div class="flex-1 h-[3px] rounded-full bar relative">+ <div class="bar-fill h-full rounded-full" style="width:38%"></div>+ <div class="absolute w-2.5 h-2.5 rounded-full bg-white" style="left:38%;top:50%;transform:translate(-50%,-50%);"></div>+ </div>+ <span>3:42</span>+ </div>+ <!-- controls -->+ <div class="flex items-center justify-between mt-4 text-white">+ <svg viewBox="0 0 24 24" class="w-4 h-4 opacity-60" fill="currentColor"><path d="M10 17l-5-5 5-5v3h7v4h-7v3z"/></svg>+ <div class="flex items-center gap-5">+ <svg viewBox="0 0 24 24" class="w-5 h-5 opacity-80" fill="currentColor"><path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/></svg>+ <button class="w-11 h-11 rounded-full bg-white flex items-center justify-center text-black">+ <svg viewBox="0 0 24 24" class="w-5 h-5" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>+ </button>+ <svg viewBox="0 0 24 24" class="w-5 h-5 opacity-80" fill="currentColor"><path d="M16 18h2V6h-2zM6 18l8.5-6L6 6z"/></svg>+ </div>+ <svg viewBox="0 0 24 24" class="w-4 h-4 opacity-60" fill="currentColor"><path d="M19 7v4l5-5-5-5v3a8 8 0 00-8 8 8 8 0 008 8v-2a6 6 0 010-12z"/></svg>+ </div>+ </div>+ </div>+ </div>+</body>+</html>diff --git a/src/lib/templates/skills/social-spotify-card/example.md b/src/lib/templates/skills/social-spotify-card/example.mdnew file mode 100644index 00000000..9d536887--- /dev/null+++ b/src/lib/templates/skills/social-spotify-card/example.md@@ -0,0 +1,8 @@+## Lo-Fi Beats · Chillhop Essentials++A daily-driver mix for deep work and late-night writing. 8 hours of mellow beats, soft jazz, and rainy-day ambient — curated by Chillhop Music.++- Now playing: **Sunday Afternoon** — j'san · evil needle+- Progress: 1:24 / 3:42+- Album: *Chillhop Essentials Spring 2026*+- Listeners this week: 2.4Mdiff --git a/src/lib/templates/skills/social-x-post-card/SKILL.md b/src/lib/templates/skills/social-x-post-card/SKILL.mdnew file mode 100644index 00000000..eade4f9b--- /dev/null+++ b/src/lib/templates/skills/social-x-post-card/SKILL.md@@ -0,0 +1,48 @@+---+name: social-x-post-card+zh_name: "X (Twitter) 帖子卡"+en_name: "X / Twitter Post Card"+emoji: "𝕏"+description: "拟真 X 推文卡片 + 互动数据 (likes/reposts/views), 适配视频叠加或图卡分享"+category: card+scenario: marketing+aspect_hint: "1280×720 或 1080×1080"+featured: 44+tags: ["twitter", "x", "social", "card", "overlay"]+example_id: sample-social-x-post-card+example_name: "X 帖子卡 · AlchainHust 金句"+example_format: markdown+example_tagline: "X dark mode + 互动数据"+example_desc: "一条金句推文 + 12.3K likes / 1.2K reposts + 蓝勾"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · x-post"+---++【模板: X (Twitter) 帖子卡】+【意图】把一段推文内容 (或用户的金句) 渲染成一张拟真度极高的 X 帖子卡片, 用于视频叠加、推特发图、知识沉淀。Inspired by hyperframes x-post。++【画布】1280×720 或 1080×1080, 暗背景 `#0f1419` 或亮背景 `#ffffff` (按 X 主题); 卡片居中, 阴影柔和。++【卡片结构】+- 外框: 圆角 16px, 1px border `#2f3336` (dark) / `#eff3f4` (light), 内边距 16px。+- 顶部 row: 头像 (48×48 圆形, 用 CSS gradient 占位) + 用户名 + handle `@username` + verified 蓝勾 + 时间 (mono, 12px, 灰)。+- 正文: 17-22px, 字重 400; 链接用 X 蓝 `#1d9bf0`; hashtag 同色; mention 同色; 段落间空 0.6em。+- 可选: 引用卡 (小卡内嵌, 灰底, 圆角 12px)。+- 可选: 1 张图 (CSS 渐变 + 描述占位, 不能外链图片), 比例 16:9, 圆角 12px。+- 互动 row: 4 个 icon + 数字 (回复 / 转推 / 引用 / 点赞), icon 用 inline SVG (X 官方风格), 灰色, hover 时变色。+- 顶部右上 X logo 单线 SVG。+- 浏览量 row: 👁️ + 数字 (小字)。++【字体】+- 西文: `Chirp` (X 的字体) → fallback `Inter` 或 `Segoe UI`。+- 中文: `Noto Sans SC` / `PingFang SC`。+- 数字: 同主字体, 不用 mono。++【设计细节】+- 配色 light: bg `#fff`, text `#0f1419`, secondary `#536471`, border `#eff3f4`, accent `#1d9bf0`。+- 配色 dark (推荐, 视频叠加用): bg `#000`, text `#e7e9ea`, secondary `#71767b`, border `#2f3336`, accent `#1d9bf0`。+- 数字格式化: 1.2K / 4.5M (不要原始 1234)。+- 内容必须来自用户输入, 不能编造推文。+- 若用户输入是数据 → 自动总结成一句"金句"推文 (≤ 280 字符)。+- 单文件 HTML; icon 内联 SVG; 不要任何外部图片 URL。+- 可选: 卡片背后加微妙径向高光 `radial-gradient(...)` 增加视频叠加的可读性。diff --git a/src/lib/templates/skills/social-x-post-card/example.html b/src/lib/templates/skills/social-x-post-card/example.htmlnew file mode 100644index 00000000..799f8fa5--- /dev/null+++ b/src/lib/templates/skills/social-x-post-card/example.html@@ -0,0 +1,53 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>X Post Card · Markdown is Dead</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" />+<style>+ body { font-family: 'Inter','Noto Sans SC',system-ui,sans-serif; background: radial-gradient(circle at 50% 30%, #1a1f2e 0%, #050507 70%); color: #e7e9ea; }+</style>+</head>+<body class="min-h-screen flex items-center justify-center p-12">+ <article class="w-[640px] rounded-2xl p-5" style="background:#000;border:1px solid #2f3336;box-shadow:0 30px 60px -20px rgba(0,0,0,0.6)">+ <!-- header -->+ <header class="flex items-start gap-3">+ <div class="w-12 h-12 rounded-full shrink-0" style="background:linear-gradient(135deg,#ff7e5f 0%,#feb47b 100%)"></div>+ <div class="flex-1 min-w-0">+ <div class="flex items-center gap-1 flex-wrap">+ <span class="font-bold">AlchainHust</span>+ <svg viewBox="0 0 24 24" class="w-4 h-4" fill="#1d9bf0"><path d="M22.5 12.5c0-1.6-.9-3-2.2-3.8.4-.2.7-.5 1-.8.4-.6.6-1.3.6-2 0-1.7-1.4-3-3-3-.5 0-1 .1-1.4.3-.4-1.3-1.6-2.2-3-2.2-1.7 0-3 1.3-3 3 0 .3 0 .5.1.8C9.1.7 7.7 0 6 0 4 0 2.5 1.5 2.5 3.5c0 .9.3 1.7.9 2.3-.5.2-1 .5-1.4.9C.5 7.5 0 8.7 0 10c0 1.6.9 3 2.2 3.7-.7.7-1.2 1.7-1.2 2.8 0 2 1.5 3.5 3.5 3.5.8 0 1.6-.3 2.2-.7.5 1.4 1.7 2.4 3.3 2.4 1.4 0 2.6-.9 3-2.1.5.5 1.2.8 2 .8 1.7 0 3-1.3 3-3 0-.5-.1-.9-.3-1.3 1.6-.2 2.8-1.6 2.8-3.3 0-1.1-.5-2-1.3-2.6.8-.6 1.3-1.6 1.3-2.7zm-12.6 4.8l-3.6-3.6 1.6-1.6 2 2 4.6-4.6 1.6 1.6-6.2 6.2z"/></svg>+ <span class="text-[#71767b] text-[14px]">@AlchainHust</span>+ <span class="text-[#71767b]">·</span>+ <span class="text-[#71767b] text-[14px]">14h</span>+ <div class="ml-auto text-[#71767b]"><svg viewBox="0 0 24 24" class="w-5 h-5" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg></div>+ </div>+ <p class="mt-2 text-[17px] leading-snug">Claude Code 团队不再用 markdown 写文档了, <span style="color:#1d9bf0">全部用 HTML</span>。</p>+ <p class="mt-3 text-[17px] leading-snug">理由很简单 —— markdown 是给作者爽的, HTML 是给读者爽的。<span style="color:#1d9bf0">最终形态是 HTML</span>, markdown 只是写作中的中间过程。</p>+ <p class="mt-3 text-[15px] text-[#71767b]">2026/05/11 · X for Web</p>+ </div>+ </header>+ <!-- engagement -->+ <div class="mt-4 flex items-center justify-between text-[#71767b] text-[13px] max-w-[440px]">+ <button class="flex items-center gap-1.5 hover:text-[#1d9bf0]">+ <svg viewBox="0 0 24 24" class="w-[18px] h-[18px]" fill="currentColor"><path d="M1.75 4c-.97 0-1.75.78-1.75 1.75v12.5c0 .97.78 1.75 1.75 1.75h13.5c.97 0 1.75-.78 1.75-1.75V14h-1.5v4.25H1.5V5.75h17V8h1.5V5.75c0-.97-.78-1.75-1.75-1.75H1.75z"/><path d="M11.6 9.4l1.7 2.3-1.7 2.3h2.7l1.7-2.3-1.7-2.3z"/></svg>+ <span>482</span>+ </button>+ <button class="flex items-center gap-1.5 hover:text-[#00ba7c]">+ <svg viewBox="0 0 24 24" class="w-[18px] h-[18px]" fill="currentColor"><path d="M4.5 3.88l4.4 4.4H5v8.83H1V19h6v-2.5H8V8.28zm15 8.13h-1V21H10v-2.5h7V12h1l-4 .5-4-4.5zm-9 6.5h-1V8H6V6h6v12.51z"/></svg>+ <span>1.2K</span>+ </button>+ <button class="flex items-center gap-1.5 hover:text-[#f91880]">+ <svg viewBox="0 0 24 24" class="w-[18px] h-[18px]" fill="currentColor"><path d="M16.7 5c-2 0-3.5 1.6-4.7 3-1.2-1.4-2.7-3-4.7-3C4.4 5 2 7.4 2 10.4c0 2.3 1 4.6 4 7.4 1.8 1.7 4 3.4 4.7 3.9.4.3.9.3 1.3 0 .8-.5 3-2.3 4.7-3.9 3-2.8 4-5 4-7.4 0-3-2.4-5.4-4-5.4z"/></svg>+ <span style="color:#f91880">12.3K</span>+ </button>+ <button class="flex items-center gap-1.5 hover:text-[#1d9bf0]">+ <svg viewBox="0 0 24 24" class="w-[18px] h-[18px]" fill="currentColor"><path d="M8 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>+ <span>2.1M</span>+ </button>+ <button class="hover:text-[#1d9bf0]"><svg viewBox="0 0 24 24" class="w-[18px] h-[18px]" fill="currentColor"><path d="M12 2.5l-4 4h3v7h2v-7h3l-4-4z"/><path d="M3 14v6h18v-6h-2v4H5v-4z"/></svg></button>+ </div>+ </article>+</body>+</html>diff --git a/src/lib/templates/skills/social-x-post-card/example.md b/src/lib/templates/skills/social-x-post-card/example.mdnew file mode 100644index 00000000..06441e3b--- /dev/null+++ b/src/lib/templates/skills/social-x-post-card/example.md@@ -0,0 +1,9 @@+## Tweet body++The team at Claude Code just stopped writing markdown. They write everything in HTML now.++Why? Markdown is for the writer. HTML is for the reader. The final form is HTML — markdown is just an intermediate step in writing.++Author: @AlchainHust+Time: 14h+Likes: 12.3K · Reposts: 1.2K · Replies: 482 · Views: 2.1Mdiff --git a/src/lib/templates/skills/sprite-animation/SKILL.md b/src/lib/templates/skills/sprite-animation/SKILL.mdnew file mode 100644index 00000000..0107bf3a--- /dev/null+++ b/src/lib/templates/skills/sprite-animation/SKILL.md@@ -0,0 +1,24 @@+---+name: sprite-animation+zh_name: "像素动画解说"+en_name: "Sprite Animation"+emoji: "🕹️"+description: "像素美术 + kinetic 字体的解说帧, 纯 CSS 循环, 可录视频"+category: poster+scenario: marketing+aspect_hint: "竖版/横版均可"+featured: 8+tags: ["pixel", "8-bit", "复古", "explainer"]+---++【模板: 像素 / 8-bit 动画解说】+【意图】教育型动画的单帧海报, 纯 CSS keyframes 循环, 不用 JS。+【布局】+- Full-bleed cream stage+- Bold display year / 大字数字+- 中心一个像素艺术 mascot (SVG 或纯 CSS 绘制)+- kinetic 中文 / 日文 display 字+- 底部 timeline ribbon 一直走+【设计细节】+- 动画用 @keyframes, 不依赖 JS+- 复古调色板: 红 / 米 / 墨绿diff --git a/src/lib/templates/skills/sprite-animation/example.html b/src/lib/templates/skills/sprite-animation/example.htmlnew file mode 100644index 00000000..238340ac--- /dev/null+++ b/src/lib/templates/skills/sprite-animation/example.html@@ -0,0 +1,271 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Nintendo, 1889 — sprite animation</title>+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=IBM+Plex+Mono:wght@400;500&family=Noto+Serif+JP:wght@500;700&family=Press+Start+2P&display=swap" rel="stylesheet" />+ <style>+ :root {+ --paper: #f5efe2;+ --paper-2: #ede4d0;+ --ink: #181612;+ --accent: #d92b1c;+ --muted: #6f6a60;+ --serif: 'DM Serif Display', 'Iowan Old Style', Georgia, serif;+ --jp: 'Noto Serif JP', serif;+ --mono: 'IBM Plex Mono', ui-monospace, monospace;+ --pixel: 'Press Start 2P', monospace;+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; }+ body {+ min-height: 100vh;+ background: #1a1816;+ color: var(--ink);+ font: 14px/1.5 -apple-system, system-ui, sans-serif;+ display: flex; align-items: center; justify-content: center;+ padding: 24px;+ }++ .stage {+ width: min(1280px, 100%);+ aspect-ratio: 16 / 9;+ position: relative;+ overflow: hidden;+ background: var(--paper);+ background-image:+ radial-gradient(rgba(120,90,40,0.06) 1px, transparent 1px),+ radial-gradient(rgba(120,90,40,0.04) 1px, transparent 1px);+ background-size: 4px 4px, 7px 7px;+ background-position: 0 0, 2px 3px;+ box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.05);+ border-radius: 4px;+ }+ .stage::before {+ content: ''; position: absolute; inset: 0;+ background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, transparent 8%, transparent 92%, rgba(0,0,0,0.05) 100%);+ pointer-events: none;+ }++ /* top bar */+ .topbar { position: absolute; top: 0; left: 0; right: 0; padding: 22px 32px; display: flex; justify-content: space-between; align-items: center; font: 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; }+ .topbar .slug { display: inline-flex; align-items: center; gap: 10px; }+ .topbar .slug .jp { font-family: var(--jp); font-weight: 700; color: var(--ink); letter-spacing: 0.05em; text-transform: none; font-size: 13px; }+ .topbar .slug .en { color: var(--muted); }+ .topbar .progress { display: inline-flex; align-items: center; gap: 12px; }+ .topbar .progress .dots { display: inline-flex; gap: 4px; }+ .topbar .progress .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); display: inline-block; opacity: 0.18; }+ .topbar .progress .dots i.on { opacity: 1; }+ .topbar .rec { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--ink); color: var(--ink); }+ .topbar .rec::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.2s steps(2) infinite; }+ @keyframes blink { 50% { opacity: 0.2; } }++ /* big year */+ .year { position: absolute; left: 6%; bottom: 14%; font: 700 200px/0.85 var(--serif); color: var(--ink); letter-spacing: -0.03em; }+ .year .num { display: inline-block; position: relative; }+ .year .num .glitch {+ position: absolute; left: 0; top: 0; color: var(--accent);+ clip-path: inset(0 0 70% 0);+ animation: glitch 4s steps(8) infinite;+ mix-blend-mode: multiply;+ }+ @keyframes glitch {+ 0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0,0); opacity: 0; }+ 89% { clip-path: inset(20% 0 60% 0); transform: translate(2px, -1px); opacity: 0.7; }+ 91% { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 1px); opacity: 0.7; }+ 94% { clip-path: inset(40% 0 40% 0); transform: translate(1px, 0); opacity: 0.6; }+ 97% { clip-path: inset(0 0 100% 0); transform: translate(0,0); opacity: 0; }+ }+ .year .jp-suffix { font-family: var(--jp); font-weight: 700; font-size: 0.6em; vertical-align: 0.16em; margin-left: 0.04em; }++ .year-label { position: absolute; left: 6%; bottom: calc(14% + 200px + 12px); font: 11px/1.2 var(--mono); letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; }+ .year-label::before { content: ''; display: inline-block; width: 24px; height: 1px; background: var(--ink); vertical-align: middle; margin-right: 10px; opacity: 0.5; }++ /* sprite card */+ .sprite-stack {+ position: absolute; right: 12%; top: 22%;+ display: flex; flex-direction: column; align-items: center; gap: 22px;+ animation: bob 2.4s ease-in-out infinite;+ }+ @keyframes bob {+ 0%, 100% { transform: translateY(0); }+ 50% { transform: translateY(-8px); }+ }+ .sprite-card {+ width: 168px; height: 252px;+ background: var(--paper-2);+ border: 4px solid var(--ink);+ border-radius: 10px;+ box-shadow: 8px 8px 0 var(--ink);+ position: relative;+ padding: 12px;+ display: flex; flex-direction: column; align-items: center;+ image-rendering: pixelated;+ }+ .sprite-card::before, .sprite-card::after {+ content: ''; position: absolute; left: 8px; right: 8px; height: 4px; background: var(--ink);+ }+ .sprite-card::before { top: 14px; }+ .sprite-card::after { bottom: 14px; }++ .sprite-card svg { display: block; image-rendering: pixelated; shape-rendering: crispEdges; margin-top: 18px; }++ .sprite-tag { font-family: var(--jp); font-weight: 700; font-size: 28px; color: var(--accent); margin-top: auto; line-height: 1; letter-spacing: 0.06em; }+ .sprite-tag small { display: block; font-family: var(--mono); font-weight: 500; font-size: 10px; color: var(--muted); letter-spacing: 0.18em; margin-top: 4px; text-transform: uppercase; }++ /* kinetic kana */+ .kana { position: absolute; right: 6%; top: 12%; font-family: var(--jp); font-weight: 700; font-size: 96px; color: var(--ink); line-height: 1; letter-spacing: 0; }+ .kana span { display: inline-block; opacity: 0; animation: kana-in 4s ease-in-out infinite; }+ .kana span:nth-child(1) { animation-delay: 0s; }+ .kana span:nth-child(2) { animation-delay: 0.4s; }+ @keyframes kana-in {+ 0% { opacity: 0; transform: translateY(-12px); }+ 18%, 78% { opacity: 1; transform: translateY(0); }+ 100% { opacity: 0; transform: translateY(8px); }+ }++ /* caption block */+ .caption {+ position: absolute; left: 6%; right: 50%; bottom: 6%;+ font: 12px/1.5 var(--mono); color: var(--ink);+ letter-spacing: 0.04em;+ max-width: 32ch;+ }+ .caption strong { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 18px; letter-spacing: -0.005em; margin-bottom: 6px; color: var(--ink); }++ /* tick ribbon */+ .ribbon {+ position: absolute; left: 0; right: 0; bottom: 0;+ height: 36px;+ background: var(--ink);+ color: var(--paper);+ overflow: hidden;+ display: flex; align-items: center;+ }+ .ribbon-track {+ display: inline-flex; gap: 64px;+ padding: 0 32px;+ animation: scroll-left 22s linear infinite;+ white-space: nowrap;+ flex-shrink: 0;+ }+ .ribbon-track .tick { display: inline-flex; align-items: center; gap: 8px; font: 11px/1 var(--mono); letter-spacing: 0.22em; }+ .ribbon-track .tick .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }+ .ribbon-track .tick .label { color: var(--paper); }+ .ribbon-track .tick .note { color: rgba(245,239,226,0.55); text-transform: uppercase; }+ @keyframes scroll-left {+ from { transform: translateX(0); }+ to { transform: translateX(-50%); }+ }++ /* corner registration marks */+ .reg { position: absolute; width: 14px; height: 14px; border: 1px solid var(--ink); opacity: 0.35; }+ .reg.tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }+ .reg.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; }+ .reg.bl { bottom: 50px; left: 14px; border-right: none; border-top: none; }+ .reg.br { bottom: 50px; right: 14px; border-left: none; border-top: none; }++ @media (max-width: 900px) {+ .year { font-size: 120px; bottom: 18%; }+ .year-label { bottom: calc(18% + 120px + 8px); }+ .kana { font-size: 64px; }+ .sprite-stack { right: 8%; top: 26%; }+ .sprite-card { width: 124px; height: 184px; }+ }+ </style>+</head>+<body>+ <div class="stage" data-od-id="stage">++ <span class="reg tl"></span>+ <span class="reg tr"></span>+ <span class="reg bl"></span>+ <span class="reg br"></span>++ <div class="topbar" data-od-id="topbar">+ <div class="slug">+ <span class="jp">名次の番組</span>+ <span class="en">EP. 01 · NINTENDO TRIVIA</span>+ </div>+ <div class="progress">+ <span class="dots"><i class="on"></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></span>+ <span>01 / 12</span>+ <span class="rec">REC</span>+ </div>+ </div>++ <div class="kana" data-od-id="kana"><span>花</span><span>札</span></div>++ <div class="year-label" data-od-id="year-label">CHAPTER 01 · KYOTO · A PLAYING-CARD COMPANY</div>+ <div class="year" data-od-id="year">+ <span class="num">+ 1889+ <span class="glitch" aria-hidden="true">1889</span>+ </span><span class="jp-suffix">年</span>+ </div>++ <div class="sprite-stack" data-od-id="sprite">+ <div class="sprite-card">+ <!-- Hanafuda card sprite — pixel-art flower -->+ <svg width="120" height="160" viewBox="0 0 24 32" xmlns="http://www.w3.org/2000/svg" aria-label="Hanafuda card">+ <!-- background -->+ <rect x="0" y="0" width="24" height="32" fill="#f5efe2"/>+ <!-- moon glow -->+ <rect x="3" y="2" width="18" height="10" fill="#1a1614"/>+ <!-- moon -->+ <rect x="14" y="4" width="5" height="5" fill="#f7c95b"/>+ <rect x="13" y="5" width="1" height="3" fill="#f7c95b"/>+ <rect x="19" y="5" width="1" height="3" fill="#f7c95b"/>+ <!-- petals (red) -->+ <rect x="9" y="14" width="6" height="2" fill="#d92b1c"/>+ <rect x="7" y="16" width="10" height="2" fill="#d92b1c"/>+ <rect x="6" y="18" width="12" height="2" fill="#d92b1c"/>+ <rect x="7" y="20" width="10" height="2" fill="#d92b1c"/>+ <rect x="9" y="22" width="6" height="2" fill="#d92b1c"/>+ <!-- petal highlights -->+ <rect x="10" y="15" width="2" height="1" fill="#ff6b5e"/>+ <rect x="8" y="17" width="2" height="1" fill="#ff6b5e"/>+ <rect x="14" y="19" width="2" height="1" fill="#ff6b5e"/>+ <!-- center -->+ <rect x="11" y="18" width="2" height="2" fill="#f7c95b"/>+ <!-- stem / leaves -->+ <rect x="11" y="24" width="2" height="6" fill="#3b6b3b"/>+ <rect x="8" y="26" width="3" height="2" fill="#3b6b3b"/>+ <rect x="13" y="27" width="3" height="2" fill="#3b6b3b"/>+ </svg>+ <div class="sprite-tag">花<small>HANA · FLOWER</small></div>+ </div>+ </div>++ <div class="caption" data-od-id="caption">+ <strong>Nintendo started as a hanafuda maker.</strong>+ Founded in Kyoto by Fusajiro Yamauchi to print hand-painted playing+ cards. Mario wouldn’t show up for another <em>ninety-six</em> years.+ </div>++ <div class="ribbon" data-od-id="ribbon">+ <div class="ribbon-track">+ <div class="tick"><span class="dot"></span><span class="label">1889</span><span class="note">HANAFUDA · KYOTO</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1907</span><span class="note">WESTERN CARDS</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1949</span><span class="note">YAMAUCHI III</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1977</span><span class="note">COLOR TV-GAME</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1985</span><span class="note">SUPER MARIO BROS.</span></div>+ <div class="tick"><span class="dot"></span><span class="label">2006</span><span class="note">WII</span></div>+ <div class="tick"><span class="dot"></span><span class="label">2017</span><span class="note">SWITCH</span></div>++ <div class="tick"><span class="dot"></span><span class="label">1889</span><span class="note">HANAFUDA · KYOTO</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1907</span><span class="note">WESTERN CARDS</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1949</span><span class="note">YAMAUCHI III</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1977</span><span class="note">COLOR TV-GAME</span></div>+ <div class="tick"><span class="dot"></span><span class="label">1985</span><span class="note">SUPER MARIO BROS.</span></div>+ <div class="tick"><span class="dot"></span><span class="label">2006</span><span class="note">WII</span></div>+ <div class="tick"><span class="dot"></span><span class="label">2017</span><span class="note">SWITCH</span></div>+ </div>+ </div>++ </div>+</body>+</html>diff --git a/src/lib/templates/skills/team-okrs/SKILL.md b/src/lib/templates/skills/team-okrs/SKILL.mdnew file mode 100644index 00000000..30a8619c--- /dev/null+++ b/src/lib/templates/skills/team-okrs/SKILL.md@@ -0,0 +1,19 @@+---+name: team-okrs+zh_name: "团队 OKR 追踪"+en_name: "Team OKRs"+emoji: "🎯"+description: "季度 banner + 3 个目标 + KR 进度条 + owner + 状态 pill"+category: dashboard+scenario: product+aspect_hint: "桌面 1440"+tags: ["okr", "objectives", "key results", "目标"]+---++【模板: Team OKRs】+【意图】OKR 追踪页, 一眼看出进度。+【布局】+- Quarter banner (Q? + 主题)+- 3 个 objectives 列, 每个含一组 KR+- 每个 KR 一条进度条 + 数值 + owner avatar + 状态 pill+- 右侧 'this quarter at a glance' 摘要diff --git a/src/lib/templates/skills/team-okrs/example.html b/src/lib/templates/skills/team-okrs/example.htmlnew file mode 100644index 00000000..3e6fb824--- /dev/null+++ b/src/lib/templates/skills/team-okrs/example.html@@ -0,0 +1,207 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Northwind · Q4 FY25 OKRs</title>+<style>+ :root {+ --bg: #f5f6f9;+ --paper: #ffffff;+ --ink: #161924;+ --muted: #5d6678;+ --line: #e3e6ee;+ --accent: #2c4ee8;+ --accent-soft: #eaeefe;+ --positive: #1f8a5a;+ --warn: #b58522;+ --danger: #b13b3b;+ --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;+ --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;+ --mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.55; }+ .app { display: grid; grid-template-columns: 1fr 320px; min-height: 100vh; }+ main { padding: 28px 32px 56px; min-width: 0; }+ aside.side { padding: 28px 28px 56px; background: var(--paper); border-left: 1px solid var(--line); }++ .crumb { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }+ .quarter-banner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 28px 32px; background: linear-gradient(135deg, var(--ink), #2a3050); color: white; border-radius: 16px; margin: 6px 0 28px; }+ .quarter-banner h1 { margin: 6px 0 4px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }+ .quarter-banner .meta { color: rgba(255,255,255,0.72); font-size: 13.5px; }+ .qb-progress { text-align: right; }+ .qb-progress .num { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #b3c0ff; }+ .qb-progress .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); margin-top: 4px; }++ /* Objective cards */+ .objectives { display: flex; flex-direction: column; gap: 16px; }+ .obj { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }+ .obj-head { padding: 22px 26px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; }+ .obj-title { display: flex; flex-direction: column; gap: 4px; }+ .obj-num { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }+ .obj-name { font-size: 19px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; max-width: 60ch; }+ .obj-owner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }+ .av { width: 30px; height: 30px; border-radius: 50%; color: white; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }+ .av-mr { background: linear-gradient(135deg, #d6336c, #ff7a9b); }+ .av-pb { background: linear-gradient(135deg, #b58522, #f1b13a); }+ .av-dp { background: linear-gradient(135deg, #2c4ee8, #6e85ff); }+ .pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }+ .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }+ .pill.on-track { background: rgba(31,138,90,0.12); color: var(--positive); }+ .pill.at-risk { background: rgba(181,133,34,0.12); color: var(--warn); }+ .pill.off-track { background: rgba(177,59,59,0.12); color: var(--danger); }++ .krs { padding: 8px 0; }+ .kr { display: grid; grid-template-columns: 1fr 200px 110px; gap: 18px; padding: 16px 26px; border-top: 1px solid var(--line); align-items: center; }+ .kr:first-child { border-top: none; }+ .kr-name { font-size: 14px; }+ .kr-name strong { display: block; font-weight: 500; }+ .kr-name small { color: var(--muted); display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; }+ .kr-bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; position: relative; }+ .kr-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #6e85ff); }+ .kr-fill.warn { background: linear-gradient(90deg, var(--warn), #f1b13a); }+ .kr-fill.danger { background: linear-gradient(90deg, var(--danger), #d8625e); }+ .kr-pct { font-family: var(--mono); font-size: 13px; font-weight: 600; text-align: right; }++ /* Sidebar */+ aside.side h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 12px; font-weight: 500; }+ aside.side h3:first-child { margin-top: 0; }+ .stat { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }+ .stat:first-of-type { border-top: none; padding-top: 4px; }+ .stat strong { font-family: var(--mono); }+ .stat strong.up { color: var(--positive); }+ .stat strong.down { color: var(--danger); }++ .mover { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 13px; align-items: center; }+ .mover:first-of-type { border-top: none; padding-top: 0; }+ .mover .delta { font-family: var(--mono); font-size: 11.5px; color: var(--positive); }+ .mover .delta.down { color: var(--danger); }++ .blocker { padding: 16px; background: rgba(177,59,59,0.06); border: 1px solid rgba(177,59,59,0.2); border-radius: 10px; margin-top: 10px; }+ .blocker strong { color: var(--danger); }+ .blocker p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }++ @media (max-width: 1080px) {+ .app { grid-template-columns: 1fr; }+ aside.side { border-left: none; border-top: 1px solid var(--line); }+ .obj-head { grid-template-columns: 1fr; }+ .kr { grid-template-columns: 1fr; }+ .kr-pct { text-align: left; }+ }+</style>+</head>+<body>+<div class="app">+ <main>+ <div class="crumb">Northwind / OKRs / FY25 / Q4</div>+ <div class="quarter-banner">+ <div>+ <h1>Q4 FY25 · Northwind</h1>+ <div class="meta">14 October → 31 December 2025 · Owner Devon Park · 3 objectives · 9 key results</div>+ </div>+ <div class="qb-progress">+ <div class="num">42%</div>+ <div class="label">Quarter through · 47% time elapsed</div>+ </div>+ </div>++ <section class="objectives">+ <article class="obj">+ <div class="obj-head">+ <div class="obj-title"><span class="obj-num">Objective 1</span><span class="obj-name">Make Northwind feel finished to the Enterprise buyer.</span></div>+ <div class="obj-owner"><span class="av av-mr">MR</span>Mira Reddy</div>+ <span class="pill on-track"><span class="dot"></span>On track</span>+ </div>+ <div class="krs">+ <div class="kr">+ <div class="kr-name"><strong>Close 3 of 3 stalled enterprise deals</strong><small>auth-gap blocker · sales: Devon</small></div>+ <div class="kr-bar"><span class="kr-fill" style="width: 67%"></span></div>+ <div class="kr-pct">2 of 3</div>+ </div>+ <div class="kr">+ <div class="kr-name"><strong>Reach SOC 2 Type II readiness</strong><small>controls: 14 / 16 implemented</small></div>+ <div class="kr-bar"><span class="kr-fill" style="width: 88%"></span></div>+ <div class="kr-pct">88%</div>+ </div>+ <div class="kr">+ <div class="kr-name"><strong>Ship workspace 2FA enforcement (TOTP + WebAuthn)</strong><small>M3 lands Dec 2 · Devon</small></div>+ <div class="kr-bar"><span class="kr-fill" style="width: 60%"></span></div>+ <div class="kr-pct">60%</div>+ </div>+ </div>+ </article>++ <article class="obj">+ <div class="obj-head">+ <div class="obj-title"><span class="obj-num">Objective 2</span><span class="obj-name">Cut time-to-value for new sign-ups in half.</span></div>+ <div class="obj-owner"><span class="av av-dp">DP</span>Devon Park</div>+ <span class="pill at-risk"><span class="dot"></span>At risk</span>+ </div>+ <div class="krs">+ <div class="kr">+ <div class="kr-name"><strong>Median activation time ≤ 30 min</strong><small>baseline 72 min · current 47 min</small></div>+ <div class="kr-bar"><span class="kr-fill warn" style="width: 64%"></span></div>+ <div class="kr-pct">64%</div>+ </div>+ <div class="kr">+ <div class="kr-name"><strong>Activation rate ≥ 50% of new signups</strong><small>current 38% · last quarter 29%</small></div>+ <div class="kr-bar"><span class="kr-fill warn" style="width: 76%"></span></div>+ <div class="kr-pct">76%</div>+ </div>+ <div class="kr">+ <div class="kr-name"><strong>Ship onboarding redesign v2 to 100%</strong><small>currently at 25% experiment</small></div>+ <div class="kr-bar"><span class="kr-fill warn" style="width: 25%"></span></div>+ <div class="kr-pct">25%</div>+ </div>+ </div>+ </article>++ <article class="obj">+ <div class="obj-head">+ <div class="obj-title"><span class="obj-num">Objective 3</span><span class="obj-name">Make the platform feel native on mobile.</span></div>+ <div class="obj-owner"><span class="av av-pb">PB</span>Priya Banerjee</div>+ <span class="pill off-track"><span class="dot"></span>Off track</span>+ </div>+ <div class="krs">+ <div class="kr">+ <div class="kr-name"><strong>Mobile DAU as % of total ≥ 35%</strong><small>current 22% · last quarter 19%</small></div>+ <div class="kr-bar"><span class="kr-fill danger" style="width: 22%"></span></div>+ <div class="kr-pct">22%</div>+ </div>+ <div class="kr">+ <div class="kr-name"><strong>Ship redesigned mobile settings + auth surfaces</strong><small>scope locked Nov 1 · build started</small></div>+ <div class="kr-bar"><span class="kr-fill danger" style="width: 18%"></span></div>+ <div class="kr-pct">18%</div>+ </div>+ <div class="kr">+ <div class="kr-name"><strong>App Store rating ≥ 4.6 (currently 4.2)</strong><small>10-week rolling, requires sustained release cadence</small></div>+ <div class="kr-bar"><span class="kr-fill danger" style="width: 10%"></span></div>+ <div class="kr-pct">10%</div>+ </div>+ </div>+ </article>+ </section>+ </main>++ <aside class="side">+ <h3>This quarter at a glance</h3>+ <div class="stat"><span>Objectives on track</span><strong class="up">1 of 3</strong></div>+ <div class="stat"><span>Key results green</span><strong>4 of 9</strong></div>+ <div class="stat"><span>Days remaining</span><strong>53 of 78</strong></div>+ <div class="stat"><span>Risk score</span><strong class="down">Medium</strong></div>++ <h3>Top movers (this week)</h3>+ <div class="mover"><span class="av av-mr" style="width:24px;height:24px;font-size:9.5px;">MR</span><span>Enterprise deal #2 — closed</span><span class="delta">+33%</span></div>+ <div class="mover"><span class="av av-dp" style="width:24px;height:24px;font-size:9.5px;">DP</span><span>Activation rate · funnel B</span><span class="delta">+9 pp</span></div>+ <div class="mover"><span class="av av-pb" style="width:24px;height:24px;font-size:9.5px;">PB</span><span>Mobile signup completion</span><span class="delta down">−2.4%</span></div>++ <h3>Blockers</h3>+ <div class="blocker">+ <strong>Mobile O3 is off-track.</strong>+ <p>Two engineers were borrowed for the 2FA push. Either we drop the auth-surface redesign from O3, or we backfill with contractors by Nov 4. Decision needed Friday.</p>+ </div>+ </aside>+</div>+</body>+</html>diff --git a/src/lib/templates/skills/vfx-text-cursor/SKILL.md b/src/lib/templates/skills/vfx-text-cursor/SKILL.mdnew file mode 100644index 00000000..5b79bb8c--- /dev/null+++ b/src/lib/templates/skills/vfx-text-cursor/SKILL.md@@ -0,0 +1,47 @@+---+name: vfx-text-cursor+zh_name: "VFX 文字光标"+en_name: "VFX Text Cursor"+emoji: "✨"+description: "光标拖光 + 彩色像散射线 + 定向光斑, 适合视频片头逐字揭示金句"+category: video+scenario: video+aspect_hint: "1920×1080 (16:9)"+featured: 38+recommended: 7+tags: ["vfx", "text", "cursor", "chromatic", "reveal", "frame"]+example_id: sample-vfx-text-cursor+example_name: "VFX 光标 · 开场金句"+example_format: markdown+example_tagline: "逐字揭示 + chromatic 拖光"+example_desc: "光标打字 hot pink + cyan 像散, 视频开场用"+example_source_url: "https://hyperframes.heygen.com/catalog"+example_source_label: "hyperframes · vfx-text-cursor"+---++【模板: VFX 文字光标 (Text Cursor)】+【意图】视频开场/Hero 帧 —— 光标在画布上"打字", 文字逐字浮现, 后面拖着彩色像散尾迹 + 定向光斑。Inspired by hyperframes vfx-text-cursor。++【画布】1920×1080, 背景 `#06070a` 暗哑黑 或 `#0a0d12` (有暖偏蓝); 加微妙 vignette。++【内容】+- 一句金句 (中英不限), 居中, 字号 6-8vw, weight 700, 字体 `Inter Tight` / `Source Sans 3` / `Noto Sans SC`。+- 逐字揭示, 每个字符 80ms 间隔; 当前字符后面跟着一个 cursor `▍` (或细 vertical bar)。+- 已揭示文字默认白色 `#f5f5f7`, opacity 1; 即将揭示位置加 chromatic ghost: 一份 `text-shadow: 2px 0 #ff3b6f, -2px 0 #00d4ff` 在 reveal 瞬间, 200ms 内收敛回正常。+- 光标本身: 16px 宽矩形, 颜色 = accent (取 1: hot pink `#ff3b6f` / cyan `#00d4ff` / amber `#ffb547`), 闪烁 `@keyframes` 1.0s 周期; 后面拖一条 60-120px 的 motion blur trail (径向渐变到透明)。++【光斑 / 射线】+- 在打字位置附近随机生成 3-5 道**定向光斑** (light leak): 用 `linear-gradient(45deg, transparent, accent20, transparent)` 的细长矩形 + `mix-blend-mode: screen`, 不规则角度。+- 当文字打完, 整段文字加 0.5s shimmer sweep (光带横扫)。++【字段】+- 顶部 caption (uppercase letterspace 0.18em, 11px, opacity 0.5): "FRAME 01 · OPENING"。+- 文字底下副标 (24-28px, opacity 0.6): 来源 / 章节。+- 右下角 timecode (`00:03:21` mono)。++【设计细节】+- **绝不**: 多色彩虹 chromatic (只用 1 个 hot pink + cyan 这种二元像散, 不要 R/G/B 全色)。+- 字体: 西文 `Inter Tight` Bold; 中文 `Noto Sans SC` Bold; 严禁衬线。+- 动效用 `@keyframes` + JS 计时器 (`setTimeout` 逐字), 可被 `prefers-reduced-motion` 关闭 (直接显示所有字)。+- 必须用用户提供的金句; 不要捏造。+- 单文件 HTML, 不要外链字体以外的资源。diff --git a/src/lib/templates/skills/vfx-text-cursor/example.html b/src/lib/templates/skills/vfx-text-cursor/example.htmlnew file mode 100644index 00000000..e31126f1--- /dev/null+++ b/src/lib/templates/skills/vfx-text-cursor/example.html@@ -0,0 +1,65 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>VFX Text Cursor · Opening</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700;800;900&family=Noto+Sans+SC:wght@400;700;900&family=JetBrains+Mono&display=swap" rel="stylesheet" />+<style>+ body { font-family:'Inter Tight','Noto Sans SC',system-ui,sans-serif; background:#06070a; color:#f5f5f7; margin:0; min-height:100vh; overflow:hidden; position:relative; }+ .vignette { position:absolute; inset:0; background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,0.8) 100%); z-index:1; }+ .grain { position:absolute; inset:0; opacity:0.06; mix-blend-mode:overlay; pointer-events:none; z-index:2;+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E"); }+ .mono { font-family:'JetBrains Mono',ui-monospace,monospace; }+ .chip { font-size:11px; letter-spacing:0.18em; text-transform:uppercase; }+ @keyframes blink { 0%, 50% { opacity:1 } 51%, 100% { opacity:0 } }+ .cursor { display:inline-block; width:18px; height:1.05em; background:#ff3b6f; margin-left:6px; vertical-align:text-bottom; animation: blink 1s steps(1) infinite;+ box-shadow: 0 0 24px #ff3b6f, 0 0 8px #ff3b6f, 60px 0 80px rgba(255,59,111,0.6); }+ .chroma {+ text-shadow:+ 3px 0 #00d4ff,+ -3px 0 #ff3b6f,+ 0 0 40px rgba(255,59,111,0.3);+ }+ .text-line { position:relative; }+ /* directional light leaks */+ .ray { position:absolute; mix-blend-mode:screen; pointer-events:none; z-index:1; }+ .ray-1 { top:30%; left:-10%; width:60%; height:6px; transform:rotate(-12deg); background:linear-gradient(90deg, transparent, rgba(255,59,111,0.6), transparent); filter: blur(8px); }+ .ray-2 { top:55%; right:-10%; width:50%; height:4px; transform:rotate(15deg); background:linear-gradient(90deg, transparent, rgba(0,212,255,0.5), transparent); filter: blur(6px); }+ .ray-3 { top:70%; left:10%; width:40%; height:3px; transform:rotate(-8deg); background:linear-gradient(90deg, transparent, rgba(255,181,71,0.5), transparent); filter: blur(5px); }+</style>+</head>+<body class="flex flex-col items-center justify-center relative">++ <header class="absolute top-12 left-12 right-12 flex items-baseline justify-between chip opacity-50 z-10 mono">+ <span>FRAME 01 · OPENING</span>+ <span>VFX · TEXT CURSOR</span>+ <span>00:03:21</span>+ </header>++ <!-- light rays -->+ <div class="ray ray-1"></div>+ <div class="ray ray-2"></div>+ <div class="ray ray-3"></div>++ <main class="relative z-10 text-center max-w-[1280px] px-12">+ <h1 class="chroma font-black leading-[1.05] tracking-[-0.02em]" style="font-size:clamp(48px,7vw,108px)">+ Markdown 是给作者的<br/>+ 中间过程, <span style="color:#ff3b6f">HTML</span> 才是<br/>+ 给读者的最终形态<span class="cursor"></span>+ </h1>+ <p class="mt-10 text-[22px] opacity-60 font-medium">+ — Claude Code 团队, 2026+ </p>+ </main>++ <div class="vignette"></div>+ <div class="grain"></div>++ <footer class="absolute bottom-12 left-12 right-12 flex items-baseline justify-between chip opacity-40 z-10 mono">+ <span>HTML-ANYTHING · VFX-TEXT-CURSOR</span>+ <span>HOT PINK × CYAN CHROMATIC</span>+ <span>REC ●</span>+ </footer>+</body>+</html>diff --git a/src/lib/templates/skills/vfx-text-cursor/example.md b/src/lib/templates/skills/vfx-text-cursor/example.mdnew file mode 100644index 00000000..9f50b054--- /dev/null+++ b/src/lib/templates/skills/vfx-text-cursor/example.md@@ -0,0 +1,12 @@+# VFX 光标开场帧++> 逐字揭示 + chromatic 拖光, hot pink + cyan++## 金句+Markdown 是给作者的中间过程, HTML 才是给读者的最终形态。++## 章节标记+FRAME 01 · OPENING++## Timecode+00 : 03 : 21diff --git a/src/lib/templates/skills/video-hyperframes/SKILL.md b/src/lib/templates/skills/video-hyperframes/SKILL.mdnew file mode 100644index 00000000..91d45ff9--- /dev/null+++ b/src/lib/templates/skills/video-hyperframes/SKILL.md@@ -0,0 +1,29 @@+---+name: video-hyperframes+zh_name: "Hyperframes 视频脚本"+en_name: "Hyperframes Video"+emoji: "🎞️"+description: "Hyperframes / Remotion 兼容的连续帧动画, 可自动播放"+category: video+scenario: video+aspect_hint: "1920×1080 (16:9)"+recommended: 5+tags: ["video", "hyperframes", "remotion", "视频"]+example_id: sample-hyperframes-workflow+example_name: "Hyperframes · AI workflow 视频"+example_format: markdown+example_tagline: "8 帧自动播放, 含进度条 + 元数据"+example_desc: "电影感动画脚本, 可直接喂给 Remotion 做成 mp4"+example_source_url: "https://github.com/heygen-com/hyperframes"+example_source_label: "heygen-com/hyperframes"+---++【模板: Hyperframes 视频帧】+- 输出 6-10 个连续 `<section class="frame">`, 每个 `w-[1920px] h-[1080px]`。+- 每帧表达一个镜头/概念: 文字 + 视觉构图 (中央构图 / 黄金分割 / 三分法)。+- 每帧底部隐藏标记 `<!-- frame:N duration:3000 transition:fade -->` 供后续 Remotion / Hyperframes 渲染脚本读取。+- 顶部加一段 JavaScript 自动播放: 每 3 秒切换到下一帧, 也支持点击 / 方向键控制; 角落显示进度条。+- 第 1 帧是 hook (一个数据 / 一个反常识 / 一个问题), 第 2-N 是论证, 最后是结论 + CTA。+- 字号巨大 (text-9xl), 一句话即可, 不要堆砌。+- 配色统一一套电影感 (深色背景 + 1 个霓虹强调色)。+- 输出最后包含一段简短注释 `<!-- HYPERFRAMES_META: ... -->`, 包含每帧 duration / transition / sceneSummary 的 JSON 元数据, 用于后续转 Remotion。diff --git a/src/lib/templates/skills/video-hyperframes/example.html b/src/lib/templates/skills/video-hyperframes/example.htmlnew file mode 100644index 00000000..63d3fdee--- /dev/null+++ b/src/lib/templates/skills/video-hyperframes/example.html@@ -0,0 +1,140 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<title>Hyperframes · AI workflow 三件套</title>+<script src="https://cdn.tailwindcss.com"></script>+<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@600;800;900&family=Noto+Sans+SC:wght@600;700;900&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">+<style>+ body { margin:0; background:#000; font-family:'Inter Tight','Noto Sans SC',sans-serif; color:#fff; -webkit-font-smoothing:antialiased; }+ .frame { position:fixed; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:96px; opacity:0; transition:opacity 0.6s ease; pointer-events:none; }+ .frame.active { opacity:1; pointer-events:auto; }+ .grid-bg::before { content:""; position:absolute; inset:0; opacity:0.08; background-image:linear-gradient(#fff 1px,transparent 1px),linear-gradient(90deg,#fff 1px,transparent 1px); background-size:64px 64px; }+ .glow { position:absolute; width:1000px; height:1000px; border-radius:50%; filter:blur(180px); pointer-events:none; }+ .num { position:absolute; top:48px; left:48px; font-family:'JetBrains Mono',monospace; font-size:14px; letter-spacing:0.18em; opacity:0.55; }+ .controls { position:fixed; bottom:32px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:14px; padding:10px 18px; border-radius:999px; background:rgba(255,255,255,0.06); backdrop-filter:blur(12px); border:1px solid rgba(255,255,255,0.12); font-family:'JetBrains Mono',monospace; font-size:12px; z-index:50; }+ .controls button { background:none; border:none; color:#fff; cursor:pointer; opacity:0.7; }+ .controls button:hover { opacity:1; }+ .progress { position:fixed; top:0; left:0; height:3px; background:#e9b94a; transition:width 0.2s linear; z-index:50; }+ h1 { font-family:'Inter Tight',sans-serif; font-weight:900; line-height:0.95; letter-spacing:-0.04em; margin:0; text-align:center; }+ .hook h1 { font-size:160px; }+ .em { font-family:Georgia,serif; font-style:italic; font-weight:700; color:#e9b94a; }+ .label { font-size:14px; font-weight:600; letter-spacing:0.28em; text-transform:uppercase; opacity:0.55; margin-bottom:32px; }+</style>+</head>+<body>++<div class="progress" id="progress" style="width:0%"></div>++<section class="frame active hook" data-duration="3000">+ <div class="num">FRAME 01 / 08 · HOOK</div>+ <div class="glow" style="background:#c96442; top:-200px; left:-200px"></div>+ <div class="label">观察</div>+ <h1>80% 的 AI 工具用户,<br/>都<span class="em">没用对</span> prompt。</h1>+</section>++<section class="frame" data-duration="3000">+ <div class="num">FRAME 02 / 08</div>+ <h1 style="font-size:128px">不是因为<br/><span class="em">prompt 难写</span>。</h1>+</section>++<section class="frame" data-duration="3000">+ <div class="num">FRAME 03 / 08</div>+ <h1 style="font-size:128px">是因为他们<br/>一直在 <span class="em">重写</span>。</h1>+</section>++<section class="frame" data-duration="4000">+ <div class="num">FRAME 04 / 08</div>+ <div class="label" style="color:#e9b94a">解</div>+ <h1 style="font-size:140px">真正高效的人,<br/>用<span class="em">模板</span>。</h1>+</section>++<section class="frame grid-bg" data-duration="4000">+ <div class="num">FRAME 05 / 08</div>+ <div class="label">公式</div>+ <h1 style="font-size:88px; max-width:24ch">+ 模板 = <span style="color:#c96442">提示词</span><br/>+ + <span style="color:#e9b94a">设计 system</span><br/>+ + <span style="color:#6c3aa6">输出格式</span>+ </h1>+</section>++<section class="frame" data-duration="5000">+ <div class="num">FRAME 06 / 08</div>+ <div class="glow" style="background:#e9b94a; bottom:-300px; right:-200px"></div>+ <h1 style="font-size:120px">HTML <span class="em">Anything</span><br/>把这三件事<br/>打包好了。</h1>+</section>++<section class="frame" data-duration="5000">+ <div class="num">FRAME 07 / 08</div>+ <div class="label" style="color:#e9b94a">行动</div>+ <h1 style="font-size:160px"><span class="em">9 套模板,</span><br/>一个动作:<br/><span style="font-family:'JetBrains Mono',monospace; font-style:normal; color:#fff">⌘+Enter</span></h1>+</section>++<section class="frame" data-duration="3000">+ <div class="num">FRAME 08 / 08 · CTA</div>+ <div class="glow" style="background:#c96442; top:50%; left:50%; transform:translate(-50%,-50%); opacity:0.6"></div>+ <h1 style="font-size:96px">现在试试 →</h1>+ <div style="font-family:'JetBrains Mono',monospace; font-size:24px; margin-top:36px; opacity:0.85">github.com/your-org/html-anything</div>+</section>++<div class="controls">+ <button id="prev" title="上一帧">‹</button>+ <button id="play" title="播放 / 暂停">⏸</button>+ <button id="next" title="下一帧">›</button>+ <span id="counter" style="opacity:0.55">01 / 08</span>+</div>++<!-- HYPERFRAMES_META: {"frames":[+ {"i":1,"duration":3000,"transition":"fade","scene":"Hook: 80% 的人没用对 prompt"},+ {"i":2,"duration":3000,"transition":"fade","scene":"不是因为难写"},+ {"i":3,"duration":3000,"transition":"fade","scene":"是因为重写"},+ {"i":4,"duration":4000,"transition":"fade","scene":"真正高效的用模板"},+ {"i":5,"duration":4000,"transition":"fade","scene":"模板 = 提示词 + 设计 + 格式"},+ {"i":6,"duration":5000,"transition":"fade","scene":"HTML Anything 打包"},+ {"i":7,"duration":5000,"transition":"fade","scene":"9 套模板, ⌘+Enter"},+ {"i":8,"duration":3000,"transition":"fade","scene":"CTA: github.com/your-org/html-anything"}+]} -->++<script>+const frames = Array.from(document.querySelectorAll('.frame'));+const total = frames.length;+const counter = document.getElementById('counter');+const playBtn = document.getElementById('play');+const progress = document.getElementById('progress');+let i = 0;+let playing = true;+let frameStart = Date.now();+let timer;++function show(n) {+ i = (n + total) % total;+ frames.forEach((f,k)=>f.classList.toggle('active', k===i));+ counter.textContent = String(i+1).padStart(2,'0') + ' / ' + String(total).padStart(2,'0');+ frameStart = Date.now();+ if (playing) schedule();+}+function schedule() {+ clearTimeout(timer);+ const d = Number(frames[i].dataset.duration) || 3000;+ timer = setTimeout(()=> show(i+1), d);+}+function tick() {+ const d = Number(frames[i].dataset.duration) || 3000;+ const pct = Math.min(1, (Date.now()-frameStart)/d) * 100;+ progress.style.width = pct + '%';+ requestAnimationFrame(tick);+}+document.getElementById('prev').onclick = ()=>show(i-1);+document.getElementById('next').onclick = ()=>show(i+1);+playBtn.onclick = ()=> { playing=!playing; playBtn.textContent = playing?'⏸':'▶'; if(playing){schedule(); frameStart=Date.now();} else clearTimeout(timer); };+document.addEventListener('keydown', e => {+ if (e.key==='ArrowRight') show(i+1);+ else if (e.key==='ArrowLeft') show(i-1);+ else if (e.key===' ') { e.preventDefault(); playBtn.click(); }+});+show(0);+tick();+</script>+</body>+</html>\ No newline at end of filediff --git a/src/lib/templates/skills/video-hyperframes/example.md b/src/lib/templates/skills/video-hyperframes/example.mdnew file mode 100644index 00000000..68d60085--- /dev/null+++ b/src/lib/templates/skills/video-hyperframes/example.md@@ -0,0 +1,25 @@+# Hyperframes 视频脚本: AI workflow 三件套++## 帧 1 (hook, 3s)+80% 的 AI 工具用户, 都没用对 prompt。++## 帧 2 (3s)+不是因为 prompt 难写。++## 帧 3 (3s)+是因为他们一直在重写。++## 帧 4 (4s)+真正高效的人, 用模板。++## 帧 5 (4s)+模板 = 提示词 + 设计 system + 输出格式++## 帧 6 (5s)+HTML Anything 把这三件事打包好了。++## 帧 7 (5s)+9 套模板, 一个动作: ⌘+Enter++## 帧 8 (CTA, 3s)+github.com/your-org/html-anythingdiff --git a/src/lib/templates/skills/waitlist-page/SKILL.md b/src/lib/templates/skills/waitlist-page/SKILL.mdnew file mode 100644index 00000000..deb51488--- /dev/null+++ b/src/lib/templates/skills/waitlist-page/SKILL.md@@ -0,0 +1,23 @@+---+name: waitlist-page+zh_name: "等候名单页"+en_name: "Waitlist Page"+emoji: "✉️"+description: "极简产品预发布落地页, 含邮箱捕获、logo、装饰图层"+category: prototype+scenario: marketing+aspect_hint: "桌面 1440"+featured: 1+tags: ["waitlist", "launch", "预发布"]+---++【模板: 等候名单页 / Waitlist】+【意图】为新产品 / 早鸟内测做一张极简等候页。+【布局】+- 居中布局: brand logo + 一行 tagline + 大字 hero (说清楚做什么)+- 邮箱捕获 input + submit 按钮 (合并成一个 pill)+- 下方 3 个小卖点 (icon + 一行字)+- 底部 founders note + 社交链接+【设计细节】+- 装饰: SVG 渐变 mesh / 噪点纹理 / 一颗星轨+- 成功提交后给一个微动效 (✓ + 文案变化)diff --git a/src/lib/templates/skills/waitlist-page/example.html b/src/lib/templates/skills/waitlist-page/example.htmlnew file mode 100644index 00000000..8dd97563--- /dev/null+++ b/src/lib/templates/skills/waitlist-page/example.html@@ -0,0 +1,400 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Meridian — Coming Soon</title>+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap" rel="stylesheet">+ <style>+ :root {+ --bg: #FDE8DF;+ --fg: #1A1410;+ --color-ink: #1A1410;+ --accent: #1A1410;+ --deco: #E8835A;+ --deco-logo: #E8522A;+ --deco-stripe: #F5A623;+ --input-border: rgba(196, 169, 154, 0.38);+ --success: #2D6A4F;+ --btn-label: #FDE8DF;+ --ticker-bg: rgba(0, 0, 0, 0.9);+ --ticker-fg: rgba(255, 255, 255, 0.9);+ --deco-stroke: rgba(0, 0, 0, 0.12);+ --logo-shadow: rgba(0, 0, 0, 0.08);+ --font-body: 'DM Sans', sans-serif;+ --font-display: 'Syne', sans-serif;+ }+ *, *::before, *::after {+ box-sizing: border-box;+ margin: 0;+ padding: 0;+ }+ html, body {+ height: 100%;+ overflow-x: hidden;+ }+ .logo {+ position: absolute;+ top: 20px;+ left: 24px;+ display: flex;+ align-items: center;+ gap: 14px;+ z-index: 10;+ }+ .logo-container {+ width: 48px;+ height: 48px;+ flex-shrink: 0;+ border-radius: 50%;+ background: linear-gradient(135deg, var(--deco-logo) 0%, var(--deco) 100%);+ display: flex;+ align-items: center;+ justify-content: center;+ overflow: hidden;+ box-shadow: 0 2px 8px var(--logo-shadow);+ }+ .logo-svg {+ width: 100%;+ height: 100%;+ object-fit: contain;+ padding: 2px;+ }+ .logo-text {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-shrink: 0;+ }+ .logo-name {+ font-family: var(--font-display);+ font-weight: 700;+ font-size: 18px;+ letter-spacing: -0.02em;+ color: var(--color-ink);+ }+ .logo-dot {+ font-size: 10px;+ color: var(--deco-logo);+ opacity: 0.6;+ }+ body {+ font-family: var(--font-body);+ background-color: var(--bg);+ color: var(--fg);+ display: flex;+ flex-direction: column;+ min-height: 100svh;+ overflow-x: hidden;+ overflow-y: auto;+ }+ .upper {+ flex: 0 0 auto;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ text-align: center;+ padding: 60px 24px 40px;+ position: relative;+ z-index: 2;+ }+ .headline {+ font-family: var(--font-display);+ font-weight: 800;+ font-size: clamp(56px, 8vw, 96px);+ letter-spacing: -0.03em;+ line-height: 1.0;+ color: var(--fg);+ text-align: center;+ max-width: 900px;+ margin: 0 auto 22px;+ }+ .subtext {+ font-size: clamp(15px, 1.5vw, 18px);+ font-weight: 400;+ line-height: 1.6;+ color: var(--fg);+ max-width: 420px;+ margin-bottom: 44px;+ }+ .form-row {+ display: flex;+ gap: 8px;+ width: 100%;+ max-width: 560px;+ justify-content: center;+ }+ .form-row input {+ flex: 1;+ min-width: 0;+ padding: 14px 18px;+ font-family: var(--font-body);+ font-size: 15px;+ color: var(--color-ink);+ background: transparent;+ border: 1.5px solid var(--input-border);+ border-radius: 4px;+ outline: none;+ transition: border-color 0.2s;+ }+ .form-row input::placeholder {+ color: var(--input-border);+ }+ .form-row input:focus {+ border-color: var(--fg);+ outline: 2px solid var(--fg);+ outline-offset: 2px;+ }+ .form-row button {+ flex-shrink: 0;+ padding: 14px 22px;+ font-family: var(--font-body);+ font-size: 15px;+ font-weight: 500;+ color: var(--btn-label);+ background: var(--accent);+ border: none;+ border-radius: 2px;+ cursor: pointer;+ white-space: nowrap;+ transition: opacity 0.15s, transform 0.1s;+ }+ .form-row button:hover {+ opacity: 0.85;+ }+ .form-row button:active {+ transform: scale(0.98);+ }+ .success-msg {+ display: none;+ margin-top: 18px;+ font-size: 15px;+ font-weight: 500;+ color: var(--success);+ }+ .success-msg.visible {+ display: block;+ }+ .deco-section {+ flex: 1;+ position: relative;+ overflow: hidden;+ min-height: 25vh;+ display: flex;+ flex-direction: column;+ }+ .coil-row {+ display: block;+ width: 100%;+ height: 60px;+ flex-shrink: 0;+ background: var(--bg);+ }+ .stripe {+ width: 100%;+ height: 14px;+ background: var(--deco-stripe);+ flex-shrink: 0;+ }+ .grid-floor {+ flex: 1;+ position: relative;+ background-color: var(--deco);+ min-height: 80px;+ }+ .grid-svg {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+ }+ .ticker-wrap {+ width: 100%;+ overflow: hidden;+ background: var(--ticker-bg);+ padding: 10px 0;+ flex-shrink: 0;+ }+ .ticker-track {+ display: flex;+ gap: 24px;+ white-space: nowrap;+ animation: ticker-scroll 20s linear infinite;+ }+ .ticker-unit {+ font-family: var(--font-body);+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.15em;+ text-transform: uppercase;+ color: var(--ticker-fg);+ flex-shrink: 0;+ display: flex;+ align-items: center;+ gap: 12px;+ margin-right: -12px;+ }+ .ticker-star {+ color: var(--deco-stripe);+ margin-right: 4px;+ }+ @keyframes ticker-scroll {+ from { transform: translateX(0); }+ to { transform: translateX(-50%); }+ }++ @media (prefers-reduced-motion: reduce) {+ .ticker-track {+ animation: none;+ }+ }+ @media (max-width: 600px) {+ .logo {+ left: 16px;+ top: 16px;+ gap: 10px;+ }+ .logo-container {+ width: 40px;+ height: 40px;+ }+ .logo-name {+ font-size: 14px;+ }+ .upper {+ padding: 30px 16px;+ flex: 0 0 50vh;+ }+ .form-row {+ flex-direction: column;+ align-items: stretch;+ }+ .form-row input,+ .form-row button {+ width: 100%;+ }+ }+ </style>+</head>+<body>++ <div class="logo">+ <div class="logo-container">+ <svg class="logo-svg" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">+ <circle cx="50" cy="50" r="48" fill="var(--deco-logo)"/>+ <text x="50" y="60" font-family="'DM Sans', sans-serif" font-size="42" font-weight="700" text-anchor="middle" fill="var(--btn-label)" letter-spacing="-1">Md</text>+ </svg>+ </div>+ <div class="logo-text">+ <span class="logo-name">Meridian</span>+ <span class="logo-dot">·</span>+ </div>+ </div>++ <section class="upper">+ <h1 class="headline">Meridian is<br>almost here</h1>+ <p class="subtext">The workspace that connects your ideas before you've finished thinking them.</p>++ <form class="form-row" id="waitlist-form">+ <input type="text" name="firstname" placeholder="First name" autocomplete="given-name">+ <input type="email" name="email" placeholder="Work email" autocomplete="email" required>+ <button type="submit">Join the Waitlist</button>+ </form>+ <p class="success-msg" id="success-msg" role="status">You're on the list! We'll be in touch.</p>+ </section>++ <div class="deco-section">++ <svg class="coil-row" viewBox="0 0 1440 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">+ <g fill="none" style="stroke: var(--deco-stroke);" stroke-width="1.5">+ <path d="M 9,60 A 41,30 0 0 1 91,60"/>+ <path d="M 94,60 A 41,30 0 0 1 176,60"/>+ <path d="M 179,60 A 41,30 0 0 1 261,60"/>+ <path d="M 264,60 A 41,30 0 0 1 346,60"/>+ <path d="M 349,60 A 41,30 0 0 1 431,60"/>+ <path d="M 434,60 A 41,30 0 0 1 516,60"/>+ <path d="M 519,60 A 41,30 0 0 1 601,60"/>+ <path d="M 604,60 A 41,30 0 0 1 686,60"/>+ <path d="M 689,60 A 41,30 0 0 1 771,60"/>+ <path d="M 774,60 A 41,30 0 0 1 856,60"/>+ <path d="M 859,60 A 41,30 0 0 1 941,60"/>+ <path d="M 944,60 A 41,30 0 0 1 1026,60"/>+ <path d="M 1029,60 A 41,30 0 0 1 1111,60"/>+ <path d="M 1114,60 A 41,30 0 0 1 1196,60"/>+ <path d="M 1199,60 A 41,30 0 0 1 1281,60"/>+ <path d="M 1284,60 A 41,30 0 0 1 1366,60"/>+ <path d="M 1369,60 A 41,30 0 0 1 1451,60"/>+ </g>+ </svg>++ <div class="stripe"></div>++ <div class="grid-floor">+ <svg class="grid-svg" viewBox="0 0 1280 400" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">+ <g style="stroke: var(--deco-stroke);" stroke-width="1" fill="none">+ <line x1="640" y1="0" x2="0" y2="400"/>+ <line x1="640" y1="0" x2="128" y2="400"/>+ <line x1="640" y1="0" x2="256" y2="400"/>+ <line x1="640" y1="0" x2="384" y2="400"/>+ <line x1="640" y1="0" x2="512" y2="400"/>+ <line x1="640" y1="0" x2="640" y2="400"/>+ <line x1="640" y1="0" x2="768" y2="400"/>+ <line x1="640" y1="0" x2="896" y2="400"/>+ <line x1="640" y1="0" x2="1024" y2="400"/>+ <line x1="640" y1="0" x2="1152" y2="400"/>+ <line x1="640" y1="0" x2="1280" y2="400"/>+ <line x1="0" y1="80" x2="1280" y2="80"/>+ <line x1="0" y1="160" x2="1280" y2="160"/>+ <line x1="0" y1="240" x2="1280" y2="240"/>+ <line x1="0" y1="320" x2="1280" y2="320"/>+ <line x1="0" y1="390" x2="1280" y2="390"/>+ </g>+ </svg>+ </div>+ </div>++ <div class="ticker-wrap" aria-hidden="true">+ <div class="ticker-track">+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ <span class="ticker-unit">COMING SOON <span class="ticker-star">✳</span></span>+ </div>+ </div>++ <script>+ document.getElementById('waitlist-form').addEventListener('submit', function(e) {+ e.preventDefault();+ if (!this.checkValidity()) {+ this.reportValidity();+ return;+ }+ this.style.display = 'none';+ document.getElementById('success-msg').classList.add('visible');+ });+ </script>+</body>+</html>diff --git a/src/lib/templates/skills/web-proto-brutalist/SKILL.md b/src/lib/templates/skills/web-proto-brutalist/SKILL.mdnew file mode 100644index 00000000..b8724b43--- /dev/null+++ b/src/lib/templates/skills/web-proto-brutalist/SKILL.md@@ -0,0 +1,20 @@+---+name: web-proto-brutalist+zh_name: "Brutalist 原型"+en_name: "Brutalist Prototype"+emoji: "⬛"+description: "Swiss industrial-print 风: 单字 grotesque、巨数字、ASCII 装饰"+category: prototype+scenario: design+aspect_hint: "桌面 1440"+recommended: 10+tags: ["brutalist", "swiss", "industrial", "hairline"]+---++【模板: Brutalist 网页原型】+【意图】Swiss Industrial Print 风格, 不柔和不友好, 强权威感。+【布局】+- Newsprint canvas + hairline grid dividers+- Monolithic black grotesque 标题, viewport-bleeding 巨数字+- Hazard-red accent + ASCII 装饰 (┌─┘ 等)+- Sections 用极简数字编号diff --git a/src/lib/templates/skills/web-proto-brutalist/example.html b/src/lib/templates/skills/web-proto-brutalist/example.htmlnew file mode 100644index 00000000..f125830b--- /dev/null+++ b/src/lib/templates/skills/web-proto-brutalist/example.html@@ -0,0 +1,449 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>FIELD UNIT 04 // INSTRUMENT FOR THE LEGIBLE WEB</title>+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">+ <style>+ :root {+ --paper: #F4F4F0;+ --paper-2: #EAE8E3;+ --ink: #060606;+ --ink-soft: #1A1A18;+ --hazard: #E61919;+ --rule: #060606;+ --display: 'Archivo Black', 'Neue Haas Grotesk', 'Inter', sans-serif;+ --sans: 'Archivo', 'Inter', system-ui, sans-serif;+ --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; padding: 0; }+ body {+ background: var(--paper);+ color: var(--ink);+ font-family: var(--sans);+ font-size: 15px;+ line-height: 1.5;+ -webkit-font-smoothing: antialiased;+ font-feature-settings: "tnum", "ss01";+ }+ a { color: inherit; text-decoration: none; }+ a:hover { background: var(--ink); color: var(--paper); }++ .mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; }+ .mono-md { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; }+ .red { color: var(--hazard); }+ .ink { color: var(--ink); }++ hr.rule { border: 0; border-top: 1px solid var(--ink); margin: 0; }+ hr.thick { border: 0; border-top: 4px solid var(--ink); margin: 0; }+ hr.hazard { border: 0; border-top: 1px solid var(--hazard); margin: 0; }++ /* ========= TOP REGISTER STRIP ========= */+ .strip {+ border-top: 1px solid var(--ink);+ border-bottom: 1px solid var(--ink);+ padding: 8px 22px;+ display: grid;+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr;+ gap: 22px;+ font-family: var(--mono);+ text-transform: uppercase;+ letter-spacing: 0.1em;+ font-size: 11px;+ }+ .strip > div { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }+ .strip b { color: var(--ink); }+ .strip span { color: var(--ink-soft); }++ /* ========= NAV ========= */+ .nav {+ padding: 14px 22px;+ display: flex; align-items: baseline; justify-content: space-between;+ border-bottom: 4px solid var(--ink);+ }+ .brand {+ font-family: var(--display); font-size: 22px; letter-spacing: -0.04em; line-height: 1; text-transform: uppercase;+ }+ .brand sup { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; font-weight: 400; vertical-align: top; margin-left: 4px; color: var(--hazard); }+ .nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }+ .nav ul a {+ font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;+ padding: 4px 7px; border: 1px solid var(--ink);+ }+ .nav .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }++ /* ========= HERO ========= */+ .hero {+ display: grid;+ grid-template-columns: 1.4fr 1fr;+ border-bottom: 1px solid var(--ink);+ }+ .hero .num {+ font-family: var(--display);+ font-size: clamp(220px, 36vw, 540px);+ line-height: 0.78;+ letter-spacing: -0.07em;+ padding: 24px 0 0 22px;+ color: var(--ink);+ position: relative;+ overflow: visible;+ }+ .hero .num::after {+ content: '®';+ font-size: 0.18em; letter-spacing: 0; vertical-align: top;+ color: var(--hazard); margin-left: 6px;+ }+ .hero .meta-col {+ border-left: 1px solid var(--ink);+ padding: 22px;+ display: flex; flex-direction: column; gap: 22px;+ font-family: var(--mono);+ }+ .hero .meta-col h2 {+ font-family: var(--display); font-size: clamp(38px, 4.5vw, 64px); line-height: 0.9; letter-spacing: -0.03em;+ text-transform: uppercase; margin: 0;+ }+ .hero .meta-col p { font-family: var(--sans); font-size: 14px; line-height: 1.55; margin: 0; max-width: 38ch; text-align: justify; }+ .meta-row { display: grid; grid-template-columns: 8ch 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ink); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; }+ .meta-row b { color: var(--hazard); font-weight: 500; }++ .ascii-frame {+ font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;+ display: flex; align-items: center; gap: 10px;+ padding: 6px 0; color: var(--ink);+ }+ .ascii-frame::before { content: '['; color: var(--hazard); }+ .ascii-frame::after { content: ']'; color: var(--hazard); }++ /* ========= ABSTRACT / LEAD ========= */+ .abstract {+ padding: 56px 22px;+ display: grid;+ grid-template-columns: 8ch 1fr 30ch;+ gap: 32px;+ border-bottom: 1px solid var(--ink);+ }+ .abstract .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--hazard); padding-top: 6px; }+ .abstract .body {+ font-family: var(--sans); font-size: 22px; line-height: 1.4; letter-spacing: -0.012em;+ max-width: 50ch;+ }+ .abstract .body span.drop {+ font-family: var(--display); font-size: 64px; line-height: 0.85; float: left;+ margin: 4px 10px -4px 0; letter-spacing: -0.04em; text-transform: uppercase;+ }+ .abstract .credits { font-family: var(--mono); font-size: 10.5px; line-height: 1.7; text-transform: uppercase; letter-spacing: 0.1em; }+ .abstract .credits hr { margin: 8px 0; border: 0; border-top: 1px solid var(--ink); }+ .abstract .credits b { color: var(--hazard); font-weight: 500; }++ /* ========= MANIFEST (numbered theses) ========= */+ .manifest { padding: 56px 22px; border-bottom: 4px solid var(--ink); }+ .manifest h2 {+ font-family: var(--display);+ font-size: clamp(56px, 8vw, 120px);+ line-height: 0.86;+ letter-spacing: -0.05em;+ text-transform: uppercase;+ margin: 0 0 28px;+ max-width: 16ch;+ }+ .manifest h2 em { font-style: normal; color: var(--hazard); }+ .thesis-list { display: grid; grid-template-columns: 1fr; }+ .thesis {+ display: grid;+ grid-template-columns: 6ch 1fr 14ch;+ gap: 32px;+ padding: 22px 0;+ border-top: 1px solid var(--ink);+ align-items: baseline;+ }+ .thesis:last-child { border-bottom: 1px solid var(--ink); }+ .thesis .num {+ font-family: var(--display); font-size: 44px; line-height: 0.9; letter-spacing: -0.04em;+ }+ .thesis .num small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; vertical-align: top; }+ .thesis h3 {+ font-family: var(--display); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.05;+ letter-spacing: -0.025em; text-transform: uppercase; margin: 0 0 8px; max-width: 28ch;+ }+ .thesis p { margin: 0; font-size: 14px; line-height: 1.55; max-width: 56ch; color: var(--ink-soft); }+ .thesis .tag {+ font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;+ text-align: right; color: var(--hazard);+ }++ /* ========= INDEX (1px grid) ========= */+ .index-section { border-bottom: 1px solid var(--ink); }+ .index-head {+ padding: 22px;+ display: flex; justify-content: space-between; align-items: baseline; gap: 24px;+ border-bottom: 1px solid var(--ink);+ }+ .index-head h2 { font-family: var(--display); font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; margin: 0; }+ .index-head .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }+ .index-grid {+ display: grid;+ grid-template-columns: 4ch 1.3fr 1fr 1fr 0.8fr 0.8fr;+ gap: 1px;+ background: var(--ink);+ font-family: var(--mono);+ font-size: 11.5px;+ letter-spacing: 0.06em;+ text-transform: uppercase;+ }+ .index-grid > div { background: var(--paper); padding: 12px 14px; }+ .index-grid .header { background: var(--ink); color: var(--paper); font-weight: 500; }+ .index-grid .right { text-align: right; }+ .index-grid .red { color: var(--hazard); }++ /* ========= SPECIMEN ========= */+ .specimen { border-bottom: 4px solid var(--ink); padding: 56px 22px; }+ .specimen-head { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }+ .specimen-head h2 { font-family: var(--display); font-size: 28px; letter-spacing: -0.03em; text-transform: uppercase; margin: 0; line-height: 1; }+ .specimen-head .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }+ .spec-row {+ display: grid;+ grid-template-columns: 12ch 1fr 12ch;+ align-items: baseline;+ gap: 22px;+ padding: 14px 0;+ border-bottom: 1px solid var(--ink);+ }+ .spec-row .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hazard); }+ .spec-row .glyph { font-family: var(--display); letter-spacing: -0.04em; line-height: 0.95; text-transform: uppercase; }+ .spec-row .glyph.s1 { font-size: clamp(36px, 5vw, 64px); }+ .spec-row .glyph.s2 { font-size: clamp(60px, 9vw, 120px); }+ .spec-row .glyph.s3 { font-size: clamp(120px, 16vw, 220px); }+ .spec-row .stats { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; text-align: right; line-height: 1.6; }++ /* ========= ALERT BLOCK ========= */+ .alert {+ border-bottom: 1px solid var(--ink);+ padding: 22px;+ display: grid;+ grid-template-columns: 18ch 1fr;+ gap: 28px;+ background:+ repeating-linear-gradient(135deg, transparent 0 14px, rgba(230,25,25,0.06) 14px 28px);+ }+ .alert .label { font-family: var(--display); font-size: 28px; letter-spacing: -0.03em; line-height: 1; text-transform: uppercase; color: var(--hazard); border: 2px solid var(--hazard); padding: 10px 12px; align-self: start; }+ .alert .body { font-family: var(--sans); font-size: 15.5px; line-height: 1.5; max-width: 64ch; }+ .alert .body strong { background: var(--ink); color: var(--paper); padding: 0 4px; font-weight: 500; }++ /* ========= COLOPHON ========= */+ .colophon {+ padding: 32px 22px 36px;+ display: grid;+ grid-template-columns: 1fr 1fr;+ gap: 32px;+ font-family: var(--mono);+ font-size: 11px;+ letter-spacing: 0.1em;+ text-transform: uppercase;+ line-height: 1.85;+ border-top: 1px solid var(--ink);+ }+ .colophon dl { display: grid; grid-template-columns: 16ch 1fr; gap: 6px 16px; margin: 0; }+ .colophon dt { color: var(--hazard); }+ .colophon dd { margin: 0; }+ .colophon .credit { font-family: var(--display); font-size: 38px; letter-spacing: -0.03em; line-height: 1; text-transform: uppercase; color: var(--ink); }+ .colophon .credit small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; margin-top: 8px; color: var(--ink-soft); }++ /* ========= RESPONSIVE ========= */+ @media (max-width: 880px) {+ .strip { grid-template-columns: 1fr 1fr; gap: 8px 22px; }+ .strip > div:nth-child(n+5) { display: none; }+ .nav ul { display: none; }+ .hero { grid-template-columns: 1fr; }+ .hero .num { font-size: 36vw; }+ .hero .meta-col { border-left: none; border-top: 1px solid var(--ink); }+ .abstract { grid-template-columns: 1fr; }+ .thesis { grid-template-columns: 6ch 1fr; }+ .thesis .tag { display: none; }+ .index-grid { grid-template-columns: 4ch 1fr 1fr; font-size: 10px; }+ .index-grid > div:nth-child(6n+4),+ .index-grid > div:nth-child(6n+5),+ .index-grid > div:nth-child(6n) { display: none; }+ .alert { grid-template-columns: 1fr; }+ .colophon { grid-template-columns: 1fr; }+ }+ </style>+</head>+<body>+ <div class="strip">+ <div><b>VOL.</b><span>04 / FIELD UNIT</span></div>+ <div><b>ISS.</b><span>2026 · MAY · QRTLY</span></div>+ <div><b>LAT.</b><span>44.8404° N</span></div>+ <div><b>LON.</b><span>−0.5805° W</span></div>+ <div><b>STATUS</b><span class="red">⬤ TRANSMITTING</span></div>+ </div>++ <header class="nav" data-od-id="topnav">+ <span class="brand">FIELD/UNIT/04<sup>® EST 2026</sup></span>+ <ul>+ <li><a href="#abstract">[ ABSTRACT ]</a></li>+ <li><a href="#manifest">[ MANIFEST ]</a></li>+ <li><a href="#index">[ INDEX ]</a></li>+ <li><a href="#specimen">[ SPECIMEN ]</a></li>+ </ul>+ <span class="meta">FILE NO. <span class="red">04 / 0731</span></span>+ </header>++ <section class="hero" data-od-id="hero">+ <div class="num">04</div>+ <div class="meta-col">+ <span class="ascii-frame">PRINTED MATTER · FOR THE WEB</span>+ <h2>Instrument for the legible web<span class="red">.</span></h2>+ <p>Field Unit 04 is a quarterly instrument: thirty-two pages of writing, type, infrastructure photography, and notes from the workshops of practitioners who would rather measure twice than ship a parallax. Issued in print & on this surface — set in Archivo Black & JetBrains Mono.</p>+ <div>+ <div class="meta-row"><b>EDITOR</b><span>Q. ALBRECHT</span></div>+ <div class="meta-row"><b>PRESS</b><span>ATELIER NORD-OUEST</span></div>+ <div class="meta-row"><b>STOCK</b><span>FEDRIGONI ARENA · 120GSM</span></div>+ <div class="meta-row"><b>BIND</b><span>SECTION-SEWN · OPEN SPINE</span></div>+ <div class="meta-row"><b>EDITION</b><span>2,400 / NUMBERED</span></div>+ </div>+ </div>+ </section>++ <section class="abstract" id="abstract" data-od-id="abstract">+ <div class="label">[ ABSTRACT ]<br>///</div>+ <div class="body">+ <span class="drop">T</span>he web has stopped reading like a document and started reading like a billboard. This issue is a small protest — practical, technical, and stubbornly print-shaped — collecting fourteen pieces by writers, typographers, and engineers who still believe a page can hold a line of thought without an animation tax.+ </div>+ <div class="credits">+ <hr>+ <b>CONTRIBUTORS</b><br>+ Q. ALBRECHT (FR)<br>+ H. NAITŌ (JP)<br>+ M. ANDREJEVIĆ (HR)<br>+ P. NWACHUKWU (NG)<br>+ L. ARROYAVE (CO)<br>+ <hr>+ <b>FILED UNDER</b><br>+ Typography · Print<br>+ Web · Editorial<br>+ Infrastructure+ </div>+ </section>++ <section class="manifest" id="manifest" data-od-id="manifest">+ <h2>Six theses on a <em>quieter</em> web<span class="red">.</span></h2>+ <div class="thesis-list">+ <div class="thesis">+ <div class="num">01<small>/06</small></div>+ <div>+ <h3>The page is not a stage. It is a desk.</h3>+ <p>A reader sits at it. They do not need a curtain. They need a margin, a column measure they trust, and the dignity of being trusted with a paragraph longer than nine words.</p>+ </div>+ <div class="tag">>>> TYPOGRAPHY</div>+ </div>+ <div class="thesis">+ <div class="num">02<small>/06</small></div>+ <div>+ <h3>White space is not waste. It is the wage of attention.</h3>+ <p>Compress everything into a viewport and the reader pays in tab-switches. Build the page like a book and they pay in time, which is what you wanted.</p>+ </div>+ <div class="tag">>>> RHYTHM</div>+ </div>+ <div class="thesis">+ <div class="num">03<small>/06</small></div>+ <div>+ <h3>If the type is not the strongest signal on the page, the page is wrong.</h3>+ <p>Image, motion, gradient, glow — all answer to the line. If the line cannot survive a 320-pixel screen at noon, neither can the rest of the project.</p>+ </div>+ <div class="tag">>>> HIERARCHY</div>+ </div>+ <div class="thesis">+ <div class="num">04<small>/06</small></div>+ <div>+ <h3>A grid is a contract, not a costume.</h3>+ <p>You either keep the contract — or you break it once, deliberately, with the loudest line on the page. Drift through it and the reader stops believing in the structure.</p>+ </div>+ <div class="tag">>>> STRUCTURE</div>+ </div>+ <div class="thesis">+ <div class="num">05<small>/06</small></div>+ <div>+ <h3>Motion is a citation, not a chorus.</h3>+ <p>If a thing must move, it must move because the body of the work calls it forth. Otherwise it is the equivalent of underlining every word — a defence against being read.</p>+ </div>+ <div class="tag">>>> MOTION</div>+ </div>+ <div class="thesis">+ <div class="num">06<small>/06</small></div>+ <div>+ <h3>The button is the only ornament you are allowed.</h3>+ <p>Make it weigh something. Make it the thing the reader reaches for. Then leave the rest of the page alone.</p>+ </div>+ <div class="tag">>>> COMPONENTS</div>+ </div>+ </div>+ </section>++ <section class="index-section" id="index" data-od-id="index">+ <div class="index-head">+ <h2>Index of issue 04 <span class="red">///</span></h2>+ <span class="meta">14 ENTRIES · PP. 8 — 96</span>+ </div>+ <div class="index-grid">+ <div class="header">№</div><div class="header">TITLE</div><div class="header">AUTHOR</div><div class="header">DEPT.</div><div class="header right">PP.</div><div class="header right">TIME</div>++ <div>01</div><div>SET IN COLD METAL</div><div>H. Naitō</div><div class="red">TYPE</div><div class="right">8 — 14</div><div class="right">12 MIN</div>+ <div>02</div><div>A YEAR WITHOUT A FRAMEWORK</div><div>Q. Albrecht</div><div>WEB</div><div class="right">15 — 23</div><div class="right">18 MIN</div>+ <div>03</div><div>NOTES FROM A LETTERPRESS</div><div>M. Andrejević</div><div class="red">TYPE</div><div class="right">24 — 31</div><div class="right">14 MIN</div>+ <div>04</div><div>THE LATENCY DIET</div><div>P. Nwachukwu</div><div>INFRA</div><div class="right">32 — 40</div><div class="right">22 MIN</div>+ <div>05</div><div>EVERY PAGE IS A LETTER</div><div>L. Arroyave</div><div class="red">EDIT</div><div class="right">41 — 47</div><div class="right">11 MIN</div>+ <div>06</div><div>FILE FORMATS AS POLITICS</div><div>Q. Albrecht</div><div>INFRA</div><div class="right">48 — 56</div><div class="right">19 MIN</div>+ <div>07</div><div>THE COLUMN MEASURE</div><div>H. Naitō</div><div class="red">TYPE</div><div class="right">57 — 60</div><div class="right">7 MIN</div>+ <div>08</div><div>WORKING IN PUBLIC, QUIETLY</div><div>L. Arroyave</div><div class="red">EDIT</div><div class="right">61 — 68</div><div class="right">15 MIN</div>+ </div>+ </section>++ <section class="specimen" id="specimen" data-od-id="specimen">+ <div class="specimen-head">+ <h2>Specimen ///</h2>+ <span class="meta">ARCHIVO BLACK · 1 STYLE · 1 WEIGHT</span>+ </div>+ <div class="spec-row">+ <span class="label">36 / 64</span>+ <div class="glyph s1">A QUIET PAGE IS A LOUD ARGUMENT.</div>+ <div class="stats">tracking −0.04em<br>leading 0.95<br>case upper</div>+ </div>+ <div class="spec-row">+ <span class="label">60 / 120</span>+ <div class="glyph s2">PRINT THE WEB.</div>+ <div class="stats">tracking −0.05em<br>leading 0.88<br>case upper</div>+ </div>+ <div class="spec-row">+ <span class="label">120 / 220</span>+ <div class="glyph s3">04®</div>+ <div class="stats">tracking −0.06em<br>leading 0.78<br>register glyph</div>+ </div>+ </section>++ <section class="alert" data-od-id="alert">+ <div class="label">!! BUY<br>ISSUE 04</div>+ <div class="body">+ Issue 04 ships from the bindery on <strong>14 JUNE 2026</strong>. Pre-order at <strong>€18 / shipped</strong>, or subscribe to the four-issue ring at <strong>€60 / year</strong>. Pre-orders include the loose folio insert printed risograph, a 600-mm fold-out specimen poster, and the digital edition of every back-issue rendered to the same column measure. <span class="red">>>> PRE-ORDER · SHIP 14.JUN</span>+ </div>+ </section>++ <footer class="colophon" data-od-id="colophon">+ <dl>+ <dt>SET IN</dt><dd>Archivo Black · JetBrains Mono · Archivo</dd>+ <dt>PRESS</dt><dd>Atelier Nord-Ouest · Bordeaux</dd>+ <dt>PAPER</dt><dd>Fedrigoni Arena Smooth Extra White 120gsm</dd>+ <dt>BINDING</dt><dd>Section-sewn · open spine · 32pp</dd>+ <dt>EDITION</dt><dd>2,400 numbered · 14 lettered AP</dd>+ <dt>RIGHTS</dt><dd>CC BY-NC-ND 4.0 · except contributor work</dd>+ </dl>+ <div>+ <div class="credit">FIELD UNIT 04<small>® / SET 2026 · BORDEAUX · FR / © FIELD UNIT EDITIONS</small></div>+ </div>+ </footer>+</body>+</html>diff --git a/src/lib/templates/skills/web-proto-editorial/SKILL.md b/src/lib/templates/skills/web-proto-editorial/SKILL.mdnew file mode 100644index 00000000..7e3e9a46--- /dev/null+++ b/src/lib/templates/skills/web-proto-editorial/SKILL.md@@ -0,0 +1,19 @@+---+name: web-proto-editorial+zh_name: "Editorial 原型"+en_name: "Editorial Prototype"+emoji: "📜"+description: "Editorial-minimalist: 暖色单色 canvas + serif display + grotesque body"+category: prototype+scenario: design+aspect_hint: "桌面 1440"+tags: ["editorial", "minimalist", "serif"]+---++【模板: Editorial 网页原型】+【意图】杂志感 minimalist, 大量留白 + 微动效。+【布局】+- Warm monochrome canvas+- Serif display + grotesque body + mono meta+- 1px hairline borders, 极柔和 chip+- Macro-whitespace, ambient micro-motiondiff --git a/src/lib/templates/skills/web-proto-editorial/example.html b/src/lib/templates/skills/web-proto-editorial/example.htmlnew file mode 100644index 00000000..59cd8f6d--- /dev/null+++ b/src/lib/templates/skills/web-proto-editorial/example.html@@ -0,0 +1,392 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Quartz — quiet workspace for technical writers</title>+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter+Tight:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">+ <style>+ :root {+ --canvas: #FBFBFA;+ --surface: #FFFFFF;+ --ink: #1A1A19;+ --muted: #787774;+ --hairline: #EAEAEA;+ --pale-red-bg: #FDEBEC; --pale-red-fg: #9F2F2D;+ --pale-blue-bg: #E1F3FE; --pale-blue-fg: #1F6C9F;+ --pale-green-bg: #EDF3EC; --pale-green-fg: #346538;+ --pale-yellow-bg: #FBF3DB; --pale-yellow-fg: #956400;+ --display: 'Instrument Serif', 'Newsreader', 'Lyon Text', Georgia, serif;+ --sans: 'Inter Tight', 'Switzer', 'SF Pro Display', system-ui, sans-serif;+ --mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; padding: 0; }+ body {+ background: var(--canvas);+ color: var(--ink);+ font-family: var(--sans);+ font-size: 16px;+ line-height: 1.55;+ -webkit-font-smoothing: antialiased;+ text-rendering: optimizeLegibility;+ }+ .wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }++ /* ============ NAV (floating pill) ============ */+ .nav {+ position: sticky; top: 16px; z-index: 50;+ margin: 16px auto 0;+ display: flex; align-items: center; justify-content: space-between;+ max-width: 920px;+ padding: 10px 14px 10px 20px;+ background: rgba(251,251,250,0.78);+ backdrop-filter: saturate(140%) blur(16px);+ -webkit-backdrop-filter: saturate(140%) blur(16px);+ border: 1px solid var(--hairline);+ border-radius: 999px;+ }+ .nav .brand { font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }+ .nav .brand em { font-style: italic; color: var(--muted); }+ .nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }+ .nav ul a { color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }+ .nav ul a:hover { color: var(--muted); }+ .nav .cta {+ font: 500 13px/1 var(--sans);+ padding: 9px 14px; border-radius: 999px;+ background: var(--ink); color: var(--canvas);+ border: 1px solid var(--ink);+ transition: transform 200ms cubic-bezier(0.16,1,0.3,1);+ }+ .nav .cta:active { transform: scale(0.98); }++ /* ============ HERO (asymmetric, eyebrow + serif display) ============ */+ .hero { padding: 96px 0 80px; }+ .eyebrow {+ display: inline-flex; align-items: center; gap: 8px;+ font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;+ text-transform: uppercase; color: var(--muted);+ padding: 5px 11px; border: 1px solid var(--hairline);+ border-radius: 999px; background: var(--surface);+ }+ .eyebrow .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--pale-green-fg); }+ .hero h1 {+ font-family: var(--display);+ font-size: clamp(48px, 7vw, 96px);+ line-height: 1.02;+ letter-spacing: -0.025em;+ margin: 22px 0 0;+ max-width: 16ch;+ font-weight: 400;+ }+ .hero h1 em { font-style: italic; color: var(--muted); }+ .hero .lede {+ font-size: 18.5px; color: var(--muted);+ max-width: 52ch; margin: 24px 0 36px;+ line-height: 1.55;+ }+ .hero .actions { display: flex; gap: 12px; align-items: center; }+ .btn {+ font: 500 14px/1 var(--sans);+ padding: 13px 22px; border-radius: 8px;+ cursor: pointer; transition: transform 200ms cubic-bezier(0.16,1,0.3,1), box-shadow 200ms ease;+ }+ .btn-primary { background: var(--ink); color: var(--canvas); border: 1px solid var(--ink); }+ .btn-primary:hover { background: #2A2A28; }+ .btn-primary:active { transform: scale(0.98); }+ .btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }+ .btn-link { background: transparent; border: none; color: var(--ink); padding: 13px 0; font: 500 14px/1 var(--sans); cursor: pointer; }+ .btn-link::after { content: ' →'; color: var(--muted); }++ .keystroke {+ font-family: var(--mono); font-size: 11.5px;+ padding: 3px 7px; border: 1px solid var(--hairline);+ border-radius: 4px; background: var(--surface);+ color: var(--muted);+ }++ /* ============ BENTO (uneven grid, hairline only) ============ */+ .bento {+ padding: 72px 0;+ border-top: 1px solid var(--hairline);+ }+ .bento-grid {+ display: grid;+ grid-template-columns: repeat(6, 1fr);+ grid-auto-rows: minmax(180px, auto);+ gap: 0;+ border: 1px solid var(--hairline);+ background: var(--hairline);+ }+ .bento-grid > .cell {+ background: var(--surface);+ padding: 28px 30px;+ }+ .cell--hero { grid-column: span 4; grid-row: span 2; padding: 36px 40px; }+ .cell--tall { grid-column: span 2; grid-row: span 2; }+ .cell--wide { grid-column: span 4; }+ .cell--small { grid-column: span 2; }+ .cell h3 { font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: -0.02em; margin: 0 0 8px; line-height: 1.15; }+ .cell h4 { font-size: 14px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.005em; }+ .cell p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; max-width: 38ch; }+ .cell .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 22px; }++ .chip {+ display: inline-block; font-family: var(--mono); font-size: 10.5px;+ letter-spacing: 0.08em; text-transform: uppercase;+ padding: 3px 8px; border-radius: 999px; margin-right: 6px;+ }+ .chip--green { background: var(--pale-green-bg); color: var(--pale-green-fg); }+ .chip--blue { background: var(--pale-blue-bg); color: var(--pale-blue-fg); }+ .chip--red { background: var(--pale-red-bg); color: var(--pale-red-fg); }+ .chip--yellow { background: var(--pale-yellow-bg); color: var(--pale-yellow-fg); }++ .doclines {+ font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.85;+ border-top: 1px dashed var(--hairline); padding-top: 14px; margin-top: 20px;+ }+ .doclines b { color: var(--ink); font-weight: 500; }++ /* ============ CONTRAST BLOCK (no card, hairline only) ============ */+ .contrast {+ padding: 88px 0;+ border-top: 1px solid var(--hairline);+ }+ .contrast .columns {+ display: grid; grid-template-columns: 1fr 1fr; gap: 64px;+ }+ .contrast h2 {+ font-family: var(--display); font-size: clamp(34px, 4.4vw, 56px);+ line-height: 1.05; letter-spacing: -0.025em; margin: 0;+ max-width: 14ch; font-weight: 400;+ }+ .contrast .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--hairline); margin-top: 24px; }+ .contrast .pair > div { padding: 22px 0; border-bottom: 1px solid var(--hairline); }+ .contrast .pair > div + div { border-left: 1px solid var(--hairline); padding-left: 22px; }+ .contrast .pair > div:nth-child(odd) { padding-right: 22px; }+ .contrast .pair .label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 8px; }+ .contrast .pair p { margin: 0; font-size: 14.5px; line-height: 1.55; }+ .contrast .pair .strike { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }++ /* ============ PRICING band (no card overuse) ============ */+ .pricing { padding: 88px 0; border-top: 1px solid var(--hairline); }+ .pricing-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 36px; }+ .pricing-head h2 { font-family: var(--display); font-size: clamp(32px, 4vw, 48px); margin: 0; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; max-width: 18ch; }+ .pricing-head p { color: var(--muted); margin: 0; max-width: 38ch; font-size: 14.5px; }+ .tiers { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--hairline); }+ .tier { padding: 32px 28px; }+ .tier + .tier { border-left: 1px solid var(--hairline); }+ .tier h3 { font-family: var(--display); font-size: 24px; font-weight: 400; margin: 0 0 4px; letter-spacing: -0.01em; }+ .tier .sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }+ .tier .price { font-family: var(--display); font-size: 44px; letter-spacing: -0.025em; line-height: 1; margin-bottom: 18px; font-weight: 400; }+ .tier .price small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 6px; }+ .tier ul { list-style: none; padding: 0; margin: 0 0 24px; }+ .tier ul li { font-size: 13.5px; padding: 8px 0; border-top: 1px solid var(--hairline); color: var(--ink); }+ .tier ul li:first-child { border-top: none; }+ .tier ul li::before { content: '— '; color: var(--muted); }+ .tier .btn { width: 100%; }+ .tier--highlight { background: var(--canvas); position: relative; }+ .tier--highlight::after {+ content: 'recommended';+ position: absolute; top: 16px; right: 16px;+ font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;+ color: var(--pale-green-fg); background: var(--pale-green-bg);+ padding: 3px 8px; border-radius: 999px;+ }++ /* ============ FOOTER ============ */+ footer {+ border-top: 1px solid var(--hairline);+ padding: 32px 0;+ font-family: var(--mono); font-size: 11.5px; color: var(--muted);+ letter-spacing: 0.04em;+ }+ footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }+ footer a { color: var(--muted); text-decoration: none; }+ footer a:hover { color: var(--ink); }++ /* ============ RESPONSIVE ============ */+ @media (max-width: 880px) {+ .nav ul { display: none; }+ .bento-grid { grid-template-columns: 1fr; }+ .cell--hero, .cell--tall, .cell--wide, .cell--small { grid-column: span 1; grid-row: auto; }+ .contrast .columns, .pricing-head, .tiers { grid-template-columns: 1fr; display: block; }+ .tier + .tier { border-left: none; border-top: 1px solid var(--hairline); }+ .pricing-head p { margin-top: 12px; }+ }++ /* ============ MOTION (entry, subtle) ============ */+ .reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms cubic-bezier(0.16,1,0.3,1), transform 600ms cubic-bezier(0.16,1,0.3,1); }+ .reveal.is-in { opacity: 1; transform: none; }+ @media (prefers-reduced-motion: reduce) {+ .reveal { opacity: 1; transform: none; transition: none; }+ }+ </style>+</head>+<body>++ <header class="nav" data-od-id="topnav">+ <span class="brand">Quartz<em> · workspace</em></span>+ <ul>+ <li><a href="#bento">Surfaces</a></li>+ <li><a href="#contrast">What it isn't</a></li>+ <li><a href="#pricing">Plans</a></li>+ <li><a href="#changelog">Changelog</a></li>+ </ul>+ <button class="cta">Open workspace</button>+ </header>++ <main>+ <section class="wrap hero reveal" data-od-id="hero">+ <span class="eyebrow"><span class="dot"></span>Now in private beta · build 0.4.7</span>+ <h1>A quiet place to write the <em>docs nobody read</em>, and have them read.</h1>+ <p class="lede">Quartz is a workspace for technical writers who'd rather ship a clean changelog than win a Notion-template contest. Outline, draft, review, publish — without leaving the keyboard.</p>+ <div class="actions">+ <button class="btn btn-primary">Request access</button>+ <button class="btn-link">Read the manual</button>+ <span class="keystroke">⌘ K</span>+ </div>+ </section>++ <section class="wrap bento reveal" id="bento" data-od-id="bento">+ <div class="bento-grid">+ <div class="cell cell--hero">+ <span class="num">01 / outline</span>+ <span class="chip chip--green">Editor</span>+ <h3>An outline that doubles as a typewriter.</h3>+ <p>Drag headings to restructure. Toggle a heading to focus mode and the rest of the page dims to a hairline. No floating toolbars, no popover bingo — just the line you're typing.</p>+ <div class="doclines">+ <b>↳</b> ⌘ ⇧ O toggle outline<br>+ <b>↳</b> ⌘ J focus mode<br>+ <b>↳</b> ⌘ ⏎ publish draft+ </div>+ </div>+ <div class="cell cell--tall" data-od-id="bento-review">+ <span class="num">02 / review</span>+ <span class="chip chip--blue">Review</span>+ <h4 style="margin-top: 14px;">Inline review, no Slack thread</h4>+ <p>Reviewers leave threaded comments anchored to a single line. Resolve to archive — never lose context to a "what was this about" two weeks later.</p>+ </div>+ <div class="cell cell--small" data-od-id="bento-export">+ <span class="num">03 / export</span>+ <h4>Markdown out, always</h4>+ <p>Export round-trips: a doc opened in Quartz writes the same .md it read.</p>+ </div>+ <div class="cell cell--small" data-od-id="bento-history">+ <span class="num">04 / history</span>+ <span class="chip chip--yellow">Audit</span>+ <h4 style="margin-top: 8px;">Git-grade history</h4>+ <p>Every save is a commit. Diff two revisions in three keystrokes.</p>+ </div>+ <div class="cell cell--wide" data-od-id="bento-stack">+ <span class="num">05 / stack</span>+ <span class="chip chip--red">Integrations</span>+ <h4 style="margin-top: 14px;">Plays nicely with Linear, GitHub, and your CMS</h4>+ <p>Quartz reads Linear ticket IDs in your prose and surfaces the parent issue in the side rail. Push a published doc to a GitHub repo or a static site — no plugin marketplace required.</p>+ </div>+ </div>+ </section>++ <section class="wrap contrast reveal" id="contrast" data-od-id="contrast">+ <div class="columns">+ <h2>Quartz isn't trying to be a wiki. Or a CMS. Or a second brain.</h2>+ <div>+ <div class="pair">+ <div>+ <div class="label">Doesn't</div>+ <p class="strike">Auto-generate three-column landing pages from your outline.</p>+ </div>+ <div>+ <div class="label">Does</div>+ <p>Publish what you wrote, in the structure you wrote it in.</p>+ </div>+ <div>+ <div class="label">Doesn't</div>+ <p class="strike">Suggest emojis, AI summaries, "callout" blocks.</p>+ </div>+ <div>+ <div class="label">Does</div>+ <p>Honour the page break. Set the typography. Get out of the way.</p>+ </div>+ <div>+ <div class="label">Doesn't</div>+ <p class="strike">Sync to a database, then pretend the database doesn't exist.</p>+ </div>+ <div>+ <div class="label">Does</div>+ <p>Write Markdown to disk. Read Markdown from disk. Done.</p>+ </div>+ </div>+ </div>+ </div>+ </section>++ <section class="wrap pricing reveal" id="pricing" data-od-id="pricing">+ <div class="pricing-head">+ <h2>One plan for the writer. One for the team. The rest is sales calls.</h2>+ <p>Free for fourteen days. We don't ask for a card and we don't email you afterwards unless you write back first.</p>+ </div>+ <div class="tiers">+ <div class="tier">+ <h3>Solo</h3>+ <p class="sub">For one writer with strong opinions.</p>+ <div class="price">$9<small>/ month</small></div>+ <ul>+ <li>Unlimited documents</li>+ <li>Local-first, encrypted sync</li>+ <li>Markdown export & import</li>+ <li>Three custom themes</li>+ </ul>+ <button class="btn btn-ghost">Start solo</button>+ </div>+ <div class="tier tier--highlight">+ <h3>Studio</h3>+ <p class="sub">For docs teams up to twelve.</p>+ <div class="price">$22<small>/ seat / month</small></div>+ <ul>+ <li>Everything in Solo</li>+ <li>Inline review & approvals</li>+ <li>GitHub & Linear sync</li>+ <li>Audit log with diff history</li>+ <li>Static-site publish target</li>+ </ul>+ <button class="btn btn-primary">Start studio</button>+ </div>+ <div class="tier">+ <h3>Press</h3>+ <p class="sub">For publishers and large orgs.</p>+ <div class="price">Talk<small>/ to us</small></div>+ <ul>+ <li>SSO (SAML, OIDC)</li>+ <li>Self-hosted deployment</li>+ <li>Custom export pipelines</li>+ <li>Named support engineer</li>+ </ul>+ <button class="btn btn-ghost">Open a thread</button>+ </div>+ </div>+ </section>+ </main>++ <footer>+ <div class="wrap row">+ <span>Quartz · Bordeaux, FR · v0.4.7 · 2026</span>+ <span>+ <a href="#">Manual</a> · <a href="#">Changelog</a> · <a href="#">Status</a> · <a href="#">Privacy</a>+ </span>+ </div>+ </footer>++ <script>+ // Intersection-observer reveal — never window scroll listeners.+ const io = new IntersectionObserver((entries) => {+ for (const e of entries) {+ if (e.isIntersecting) { e.target.classList.add('is-in'); io.unobserve(e.target); }+ }+ }, { threshold: 0.08, rootMargin: '0px 0px -40px 0px' });+ document.querySelectorAll('.reveal').forEach((el) => io.observe(el));+ </script>+</body>+</html>diff --git a/src/lib/templates/skills/web-proto-soft/SKILL.md b/src/lib/templates/skills/web-proto-soft/SKILL.mdnew file mode 100644index 00000000..b5cd6171--- /dev/null+++ b/src/lib/templates/skills/web-proto-soft/SKILL.md@@ -0,0 +1,19 @@+---+name: web-proto-soft+zh_name: "Apple Soft 原型"+en_name: "Apple-tier Soft Prototype"+emoji: "🫧"+description: "Apple 调: 银/奶 canvas + 双层斜面卡片 + button-in-button + spring"+category: prototype+scenario: design+aspect_hint: "桌面 1440"+tags: ["apple", "soft", "squircle", "spring"]+---++【模板: Apple Soft 原型】+【意图】Apple-tier 软质感, squircle + spring motion + ambient mesh。+【布局】+- Silver / cream canvas + ambient mesh background+- Double-bezel 卡片 (内外两层圆角 + 高光)+- Button-in-button CTA+- Spring motion (微反弹的 hover)diff --git a/src/lib/templates/skills/web-proto-soft/example.html b/src/lib/templates/skills/web-proto-soft/example.htmlnew file mode 100644index 00000000..acff2e16--- /dev/null+++ b/src/lib/templates/skills/web-proto-soft/example.html@@ -0,0 +1,542 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Halcyon — calmer infrastructure for AI agents</title>+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">+ <style>+ :root {+ --canvas: #F2F2F0;+ --canvas-2: #E8E8E5;+ --ink: #0A0A0A;+ --ink-2: #18181B; /* zinc-900 */+ --muted: #57575A;+ --hairline: rgba(10,10,10,0.08);+ --hairline-strong: rgba(10,10,10,0.12);+ --innerlight: rgba(255,255,255,0.65);+ --accent: #1F4D3F; /* deep sage */+ --accent-glow: #5A8C7A;+ --sans: 'Plus Jakarta Sans', 'Geist', 'Cabinet Grotesk', system-ui, sans-serif;+ --mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;+ --ease: cubic-bezier(0.32, 0.72, 0, 1);+ --ease-spring: cubic-bezier(0.16, 1.16, 0.3, 1);+ --shell-radius: 2.25rem;+ --core-radius: calc(2.25rem - 0.4rem);+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; padding: 0; }+ body {+ background: var(--canvas);+ color: var(--ink);+ font-family: var(--sans);+ font-size: 16px;+ line-height: 1.5;+ letter-spacing: -0.005em;+ -webkit-font-smoothing: antialiased;+ overflow-x: hidden;+ }+ .wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }++ /* ============ AMBIENT MESH (fixed, pointer-events-none) ============ */+ .mesh {+ position: fixed; inset: 0; z-index: 0; pointer-events: none;+ overflow: hidden;+ }+ .mesh::before, .mesh::after {+ content: ''; position: absolute; border-radius: 50%; filter: blur(90px);+ opacity: 0.18; will-change: transform;+ }+ .mesh::before {+ width: 720px; height: 720px;+ background: radial-gradient(circle at 30% 30%, var(--accent-glow), transparent 60%);+ top: -180px; left: -160px;+ animation: drift1 28s var(--ease) infinite alternate;+ }+ .mesh::after {+ width: 560px; height: 560px;+ background: radial-gradient(circle at 60% 60%, #C9B79A, transparent 60%);+ top: 120px; right: -140px;+ animation: drift2 36s var(--ease) infinite alternate;+ }+ @keyframes drift1 { from { transform: translate3d(0,0,0); } to { transform: translate3d(80px, 60px, 0); } }+ @keyframes drift2 { from { transform: translate3d(0,0,0); } to { transform: translate3d(-60px, 40px, 0); } }+ @media (prefers-reduced-motion: reduce) { .mesh::before, .mesh::after { animation: none; } }++ main, header, footer { position: relative; z-index: 1; }++ /* ============ FLOATING PILL NAV ============ */+ .nav-shell {+ position: sticky; top: 24px; z-index: 50;+ margin: 24px auto 0;+ padding: 6px;+ width: max-content; max-width: calc(100% - 56px);+ border-radius: 999px;+ background: rgba(255,255,255,0.42);+ backdrop-filter: saturate(160%) blur(22px);+ -webkit-backdrop-filter: saturate(160%) blur(22px);+ box-shadow:+ 0 1px 0 rgba(255,255,255,0.45) inset,+ 0 0 0 1px rgba(10,10,10,0.05),+ 0 12px 36px -18px rgba(10,10,10,0.18);+ }+ .nav {+ display: flex; align-items: center; gap: 18px;+ padding: 6px 8px 6px 18px;+ border-radius: 999px;+ background: rgba(255,255,255,0.55);+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);+ }+ .nav .brand { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; }+ .nav .brand-mark {+ width: 22px; height: 22px; border-radius: 8px;+ background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 1px 2px rgba(10,10,10,0.18);+ }+ .nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }+ .nav ul a {+ display: inline-block; padding: 9px 14px; border-radius: 999px;+ color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500;+ transition: background 300ms var(--ease);+ }+ .nav ul a:hover { background: rgba(10,10,10,0.05); }++ .pill {+ display: inline-flex; align-items: center; gap: 6px;+ padding: 7px 7px 7px 16px;+ border-radius: 999px;+ background: var(--ink); color: var(--canvas);+ font: 600 13px/1 var(--sans); cursor: pointer; border: none;+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);+ transition: transform 300ms var(--ease);+ }+ .pill .icon-wrap {+ width: 26px; height: 26px; border-radius: 999px;+ background: rgba(255,255,255,0.14);+ display: inline-flex; align-items: center; justify-content: center;+ transition: transform 360ms var(--ease-spring), background 300ms var(--ease);+ }+ .pill:hover .icon-wrap { transform: translate(2px, -1px) scale(1.06); background: rgba(255,255,255,0.22); }+ .pill:active { transform: scale(0.98); }+ .pill svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }++ /* ============ HERO ============ */+ .hero {+ min-height: 100dvh;+ padding: 96px 0 120px;+ display: grid;+ grid-template-columns: 1.05fr 0.95fr;+ gap: 48px;+ align-items: center;+ }+ .eyebrow {+ display: inline-flex; align-items: center; gap: 8px;+ padding: 6px 12px; border-radius: 999px;+ background: rgba(255,255,255,0.6);+ box-shadow: inset 0 0 0 1px var(--hairline);+ font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;+ color: var(--muted);+ }+ .eyebrow .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(31,77,63,0.18); }+ .hero h1 {+ font-size: clamp(48px, 7vw, 92px);+ font-weight: 700;+ line-height: 0.96;+ letter-spacing: -0.038em;+ margin: 22px 0 28px;+ max-width: 14ch;+ }+ .hero h1 .soft { color: var(--muted); font-weight: 500; }+ .hero p.lede {+ color: var(--muted);+ font-size: 18px;+ max-width: 52ch;+ margin: 0 0 34px;+ line-height: 1.55;+ }+ .hero .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }+ .ghost {+ display: inline-flex; align-items: center; gap: 8px;+ padding: 11px 18px; border-radius: 999px;+ background: rgba(255,255,255,0.5);+ box-shadow: inset 0 0 0 1px var(--hairline-strong);+ font: 500 13.5px/1 var(--sans); color: var(--ink); cursor: pointer; border: none;+ transition: background 300ms var(--ease), transform 300ms var(--ease);+ }+ .ghost:hover { background: rgba(255,255,255,0.85); }+ .ghost:active { transform: scale(0.98); }++ /* ============ HERO PREVIEW (DOUBLE-BEZEL CARD) ============ */+ .hero-preview {+ position: relative;+ padding: 10px;+ border-radius: var(--shell-radius);+ background: rgba(255,255,255,0.45);+ box-shadow:+ inset 0 1px 0 var(--innerlight),+ 0 0 0 1px var(--hairline),+ 0 30px 60px -28px rgba(10,10,10,0.22),+ 0 12px 24px -16px rgba(10,10,10,0.10);+ }+ .hero-preview .core {+ position: relative;+ border-radius: var(--core-radius);+ background: linear-gradient(180deg, #FAFAF7 0%, #EFEFEB 100%);+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), inset 0 0 0 1px var(--hairline);+ padding: 22px;+ overflow: hidden;+ }+ .preview-bar {+ display: flex; gap: 6px; margin-bottom: 18px;+ }+ .preview-bar span { width: 10px; height: 10px; border-radius: 999px; background: rgba(10,10,10,0.10); }+ .preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }+ .pv-cell {+ border-radius: 16px;+ background: rgba(255,255,255,0.8);+ box-shadow: inset 0 0 0 1px var(--hairline), inset 0 1px 0 rgba(255,255,255,0.8);+ padding: 14px;+ }+ .pv-cell.span2 { grid-column: span 2; }+ .pv-cell h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: -0.01em; }+ .pv-cell p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }+ .pv-cell .meta { font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }+ .pv-cell .num { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-top: 4px; }+ .pv-cell .num small { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 500; }+ .ring {+ width: 38px; height: 38px; border-radius: 999px;+ background: conic-gradient(var(--accent) 0 67%, rgba(10,10,10,0.08) 67% 100%);+ mask: radial-gradient(circle 14px, transparent 12px, black 13px);+ -webkit-mask: radial-gradient(circle 14px, transparent 12px, black 13px);+ margin-top: 6px;+ }+ .pv-cell .row { display: flex; align-items: center; gap: 10px; }+ .pulse {+ width: 8px; height: 8px; border-radius: 999px; background: var(--accent);+ box-shadow: 0 0 0 0 rgba(31,77,63,0.4);+ animation: pulse 2.4s var(--ease) infinite;+ }+ @keyframes pulse {+ 0% { box-shadow: 0 0 0 0 rgba(31,77,63,0.4); }+ 70% { box-shadow: 0 0 0 10px rgba(31,77,63,0); }+ 100% { box-shadow: 0 0 0 0 rgba(31,77,63,0); }+ }++ /* ============ SECTION DEFAULTS ============ */+ section.block { padding: 112px 0; position: relative; }+ .section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }+ .section-head h2 {+ font-size: clamp(38px, 5vw, 64px);+ font-weight: 700;+ letter-spacing: -0.035em;+ line-height: 1;+ margin: 16px 0 0;+ max-width: 14ch;+ }+ .section-head p { color: var(--muted); font-size: 16.5px; max-width: 46ch; margin: 0; line-height: 1.55; }++ /* ============ BENTO (double-bezel cards) ============ */+ .bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }+ .b-card {+ padding: 8px;+ border-radius: var(--shell-radius);+ background: rgba(255,255,255,0.5);+ box-shadow:+ inset 0 1px 0 var(--innerlight),+ 0 0 0 1px var(--hairline),+ 0 24px 48px -28px rgba(10,10,10,0.18);+ transition: transform 600ms var(--ease), box-shadow 600ms var(--ease);+ }+ .b-card:hover {+ transform: translateY(-3px);+ box-shadow:+ inset 0 1px 0 var(--innerlight),+ 0 0 0 1px var(--hairline),+ 0 30px 70px -22px rgba(10,10,10,0.22);+ }+ .b-card .core {+ border-radius: var(--core-radius);+ background: #FCFCFA;+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), inset 0 0 0 1px var(--hairline);+ padding: 32px;+ height: 100%;+ display: flex; flex-direction: column;+ }+ .b-card.dark .core {+ background: linear-gradient(180deg, #1A1A1A 0%, #0F0F0F 100%);+ color: #ECECEA;+ }+ .b-card.dark .core .meta { color: rgba(255,255,255,0.55); }+ .b-card.dark .core p { color: rgba(255,255,255,0.6); }+ .b-card .meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }+ .b-card h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 10px; }+ .b-card.dark h3 { color: #FFFFFF; }+ .b-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.55; max-width: 36ch; }++ .span-3 { grid-column: span 3; }+ .span-2 { grid-column: span 2; }+ .span-4 { grid-column: span 4; }+ .span-6 { grid-column: span 6; }+ .row-2 { grid-row: span 2; }++ .stat { display: flex; align-items: baseline; gap: 8px; margin-top: 24px; }+ .stat .big { font-size: 56px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }+ .stat .unit { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }++ .codeblock {+ margin-top: auto; padding: 18px;+ border-radius: 18px;+ background: #0E0E0E; color: #ECECEA;+ font-family: var(--mono); font-size: 12px; line-height: 1.65;+ box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);+ overflow: hidden;+ }+ .codeblock .k { color: #5A8C7A; }+ .codeblock .s { color: #C9B79A; }+ .codeblock .c { color: rgba(236,236,234,0.4); }++ /* ============ MARQUEE ============ */+ .marquee {+ padding: 56px 0;+ overflow: hidden;+ mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);+ -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);+ }+ .marquee-track {+ display: flex; gap: 64px; width: max-content;+ animation: track 32s linear infinite;+ will-change: transform;+ }+ .marquee:hover .marquee-track { animation-play-state: paused; }+ @keyframes track { from { transform: translateX(0); } to { transform: translateX(-50%); } }+ .marquee-item {+ font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--ink);+ opacity: 0.55;+ white-space: nowrap;+ }+ .marquee-item em { font-style: normal; color: var(--muted); margin: 0 12px; }++ /* ============ CLOSING (inverted soft surface) ============ */+ .closing {+ padding: 112px 0;+ margin: 56px 28px 28px;+ border-radius: 40px;+ background: linear-gradient(180deg, #131313 0%, #050505 100%);+ color: #F2F2F0;+ position: relative; overflow: hidden;+ box-shadow:+ inset 0 1px 0 rgba(255,255,255,0.08),+ 0 30px 80px -40px rgba(10,10,10,0.6);+ }+ .closing::before {+ content: ''; position: absolute; inset: 0;+ background: radial-gradient(700px 360px at 30% 0%, rgba(90,140,122,0.32), transparent 70%);+ pointer-events: none;+ }+ .closing-inner { position: relative; max-width: 1040px; padding: 0 32px; margin: 0 auto; text-align: center; }+ .closing h2 { font-size: clamp(40px, 5.5vw, 76px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; margin: 0 0 18px; max-width: 18ch; margin-inline: auto; }+ .closing p { color: rgba(242,242,240,0.65); font-size: 17px; margin: 0 auto 32px; max-width: 48ch; line-height: 1.55; }+ .closing .pill { background: var(--canvas); color: var(--ink); }+ .closing .pill .icon-wrap { background: rgba(10,10,10,0.08); }++ /* ============ FOOTER ============ */+ footer {+ padding: 36px 28px 28px;+ font-family: var(--mono); font-size: 11px; color: var(--muted);+ letter-spacing: 0.06em;+ }+ footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1240px; margin: 0 auto; padding: 0 28px; }+ footer a { color: var(--muted); text-decoration: none; }+ footer a:hover { color: var(--ink); }++ /* ============ RESPONSIVE COLLAPSE ============ */+ @media (max-width: 980px) {+ .hero { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 80px; }+ .nav ul { display: none; }+ .section-head { grid-template-columns: 1fr; gap: 18px; }+ .bento { grid-template-columns: 1fr; }+ .span-3, .span-2, .span-4, .span-6 { grid-column: span 1; }+ .row-2 { grid-row: auto; }+ .closing { margin: 28px 16px; padding: 80px 0; }+ }++ /* ============ MOTION ENTRY ============ */+ .reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 800ms var(--ease), transform 800ms var(--ease), filter 800ms var(--ease); }+ .reveal.is-in { opacity: 1; transform: none; filter: none; }+ @media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; filter: none; transition: none; } }+ </style>+</head>+<body>+ <div class="mesh" aria-hidden="true"></div>++ <div class="nav-shell" data-od-id="topnav">+ <header class="nav">+ <span class="brand"><span class="brand-mark"></span>Halcyon</span>+ <ul>+ <li><a href="#bento">Platform</a></li>+ <li><a href="#metrics">Metrics</a></li>+ <li><a href="#docs">Docs</a></li>+ <li><a href="#changelog">Changelog</a></li>+ </ul>+ <button class="pill">+ <span>Get started</span>+ <span class="icon-wrap"><svg viewBox="0 0 12 12" stroke-width="1.6"><path d="M2.5 6h7M6 2.5L9.5 6 6 9.5"/></svg></span>+ </button>+ </header>+ </div>++ <main>+ <section class="wrap hero reveal" data-od-id="hero">+ <div class="hero-copy">+ <span class="eyebrow"><span class="dot"></span>Series A · 2026 · Bordeaux</span>+ <h1>Calmer infrastructure for the agents <span class="soft">already running your business.</span></h1>+ <p class="lede">Halcyon is a runtime for long-running AI agents that need stable identity, predictable cost, and an audit trail you can hand to legal. We replace the YAML scaffolding teams keep rebuilding from scratch.</p>+ <div class="actions">+ <button class="pill">+ <span>Open the console</span>+ <span class="icon-wrap"><svg viewBox="0 0 12 12" stroke-width="1.6"><path d="M2.5 6h7M6 2.5L9.5 6 6 9.5"/></svg></span>+ </button>+ <button class="ghost">+ Read the runtime spec+ </button>+ </div>+ </div>++ <aside class="hero-preview" data-od-id="hero-preview">+ <div class="core">+ <div class="preview-bar"><span></span><span></span><span></span></div>+ <div class="preview-grid">+ <div class="pv-cell span2">+ <div class="meta">runtime · live</div>+ <div class="row" style="justify-content: space-between;">+ <div>+ <h4 style="font-size: 14px;">research-agent / tier-3</h4>+ <div class="row" style="margin-top: 4px;"><span class="pulse"></span><p style="margin:0; font-size: 11px;">healthy · 7d 14h uptime</p></div>+ </div>+ <div class="ring" aria-hidden="true"></div>+ </div>+ </div>+ <div class="pv-cell">+ <div class="meta">spend / 24h</div>+ <div class="num">$47.18<small>USD</small></div>+ </div>+ <div class="pv-cell">+ <div class="meta">tasks / 24h</div>+ <div class="num">1,284<small>ok</small></div>+ </div>+ <div class="pv-cell span2">+ <div class="meta">audit · last entry</div>+ <p style="font-size: 11.5px; line-height: 1.6;">+ <code style="font-family: var(--mono); color: var(--accent);">04:12:09</code> · ticket <code style="font-family: var(--mono);">PRD-4731</code> dispatched to <b>research-agent/tier-3</b> by <b>quentin.albrecht</b>. Resolved in 41.7s.+ </p>+ </div>+ </div>+ </div>+ </aside>+ </section>++ <section class="block reveal" id="bento">+ <div class="wrap">+ <div class="section-head">+ <span class="eyebrow"><span class="dot"></span>02 · platform</span>+ <p>Five primitives. No agent framework lock-in. Bring your own model, your own tools, your own sandbox — keep the runtime, the policies, and the bill in one place.</p>+ </div>+ <div class="section-head" style="margin-bottom: 56px;">+ <h2>The runtime is the boring part. We're <em style="font-weight:500; color: var(--muted); font-style: normal;">obsessed</em> with the boring part.</h2>+ <span></span>+ </div>++ <div class="bento">+ <div class="b-card span-3 row-2">+ <div class="core">+ <div class="meta">01 · identity</div>+ <h3>Stable identities, not session tokens.</h3>+ <p>Every agent gets a long-lived identity with revocable credentials, scoped policies, and a portable memory layer that survives model swaps. Rotate keys without re-onboarding the agent.</p>+ <div class="codeblock">+ <span class="c">// stable across model swaps</span><br>+ <span class="k">agent</span>.identity = {<br>+ id: <span class="s">"agent_q7_research"</span>,<br>+ policy: <span class="s">"tier-3:read-only"</span>,<br>+ memory: halcyon.memory(<span class="s">"q7"</span>),<br>+ };+ </div>+ </div>+ </div>+ <div class="b-card span-3">+ <div class="core">+ <div class="meta">02 · spend</div>+ <h3>One bill. One cap. One alarm.</h3>+ <p>Set budgets per agent, per workspace, per provider. Halcyon throttles before the bill becomes a Slack post-mortem.</p>+ <div class="stat"><span class="big">$0.018</span><span class="unit">avg / task</span></div>+ </div>+ </div>+ <div class="b-card span-3 dark">+ <div class="core">+ <div class="meta">03 · audit</div>+ <h3>An audit log shaped like an audit log.</h3>+ <p>Append-only. Cryptographically chained. Streams to your SIEM. Every tool call, every prompt, every model swap, every refund — in one place legal can actually subpoena.</p>+ </div>+ </div>+ <div class="b-card span-2">+ <div class="core">+ <div class="meta">04 · sandbox</div>+ <h3>Real sandboxes.</h3>+ <p>Firecracker microVMs per task. Boots in 110ms.</p>+ </div>+ </div>+ <div class="b-card span-2">+ <div class="core">+ <div class="meta">05 · routing</div>+ <h3>Model-agnostic routing.</h3>+ <p>Cheapest model that passes your eval. Updated nightly.</p>+ </div>+ </div>+ <div class="b-card span-2">+ <div class="core">+ <div class="meta">06 · ergonomics</div>+ <h3>Three SDKs. Two CLIs.</h3>+ <p>Python, TypeScript, Go. <code style="font-family: var(--mono); color: var(--accent);">halcyon</code> & <code style="font-family: var(--mono); color: var(--accent);">hl</code>.</p>+ </div>+ </div>+ </div>+ </div>+ </section>++ <section class="marquee reveal">+ <div class="marquee-track">+ <span class="marquee-item">Anthropic<em>·</em>Stripe<em>·</em>Linear<em>·</em>Vercel<em>·</em>Cursor<em>·</em>Brex<em>·</em>Ramp<em>·</em>Replicate<em>·</em>Hex<em>·</em>Notion<em>·</em></span>+ <span class="marquee-item" aria-hidden="true">Anthropic<em>·</em>Stripe<em>·</em>Linear<em>·</em>Vercel<em>·</em>Cursor<em>·</em>Brex<em>·</em>Ramp<em>·</em>Replicate<em>·</em>Hex<em>·</em>Notion<em>·</em></span>+ </div>+ </section>++ <section class="closing reveal" data-od-id="closing">+ <div class="closing-inner">+ <h2>Less duct tape between the model and the bill.</h2>+ <p>14-day evaluation, then choose pay-as-you-go or annual. We'll send a real engineer for setup. No SDR funnel.</p>+ <button class="pill">+ <span>Talk to an engineer</span>+ <span class="icon-wrap"><svg viewBox="0 0 12 12" stroke-width="1.6"><path d="M2.5 6h7M6 2.5L9.5 6 6 9.5"/></svg></span>+ </button>+ </div>+ </section>+ </main>++ <footer>+ <div class="row">+ <span>Halcyon Runtime · SOC 2 · ISO 27001 · v2026.05</span>+ <span><a href="#">Docs</a> · <a href="#">Changelog</a> · <a href="#">Status</a> · <a href="#">Privacy</a> · <a href="#">Contact</a></span>+ </div>+ </footer>++ <script>+ const io = new IntersectionObserver((entries) => {+ for (const e of entries) {+ if (e.isIntersecting) { e.target.classList.add('is-in'); io.unobserve(e.target); }+ }+ }, { threshold: 0.1, rootMargin: '0px 0px -10% 0px' });+ document.querySelectorAll('.reveal').forEach((el) => io.observe(el));+ </script>+</body>+</html>diff --git a/src/lib/templates/skills/weekly-update/SKILL.md b/src/lib/templates/skills/weekly-update/SKILL.mdnew file mode 100644index 00000000..1dfabbb7--- /dev/null+++ b/src/lib/templates/skills/weekly-update/SKILL.md@@ -0,0 +1,25 @@+---+name: weekly-update+zh_name: "团队周报 Deck"+en_name: "Weekly Update Deck"+emoji: "🗓️"+description: "6-8 页横向滑动周报: 已发布 / 进行中 / 阻塞 / 指标 / 求助"+category: slides+scenario: operations+aspect_hint: "16:9 ×8"+featured: 23+tags: ["weekly", "周报", "status"]+---++【模板: 团队周报 Deck】+【意图】6-8 页 horizontal-swipe slides, 周报固定结构。+【布局】+- Cover (周次 + 团队 + 一句话主题)+- Shipped (列表 + owner)+- In flight (进度条)+- Blocked (红色 callout)+- Metrics (KPI 卡片网格 + 周对比)+- Asks (求助清单)+- Thanks 收尾+【设计细节】+- 键盘左右切换, hash 同步diff --git a/src/lib/templates/skills/weekly-update/example.html b/src/lib/templates/skills/weekly-update/example.htmlnew file mode 100644index 00000000..368de4fd--- /dev/null+++ b/src/lib/templates/skills/weekly-update/example.html@@ -0,0 +1,320 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>Growth · Weekly update · W42</title>+<style>+ :root {+ --bg: #0e0d12;+ --paper: #19171f;+ --paper-2: #221f2a;+ --ink: #f4f0e6;+ --muted: #a09aaf;+ --line: #2c2935;+ --accent: #ffcc4d;+ --accent-2: #b388ff;+ --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;+ --mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;+ }+ * { box-sizing: border-box; }+ html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--display); }+ body { overflow: hidden; }+ .deck {+ display: flex;+ width: 100vw; height: 100vh;+ overflow-x: auto;+ overflow-y: hidden;+ scroll-snap-type: x mandatory;+ scroll-behavior: smooth;+ scrollbar-width: none;+ }+ .deck::-webkit-scrollbar { display: none; }+ .slide {+ flex: 0 0 100vw; height: 100vh;+ display: flex; align-items: center; justify-content: center;+ padding: 56px 80px;+ scroll-snap-align: start;+ position: relative;+ }+ .slide-inner { width: 100%; max-width: 1100px; }+ .crumb {+ position: absolute; top: 24px; left: 32px;+ font-family: var(--mono); font-size: 11px; color: var(--muted);+ text-transform: uppercase; letter-spacing: 0.1em;+ }+ .pageno {+ position: absolute; bottom: 24px; right: 32px;+ font-family: var(--mono); font-size: 11px; color: var(--muted);+ }+ .nav {+ position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);+ display: flex; gap: 6px; z-index: 5;+ }+ .nav .dot {+ width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2);+ cursor: pointer;+ }+ .nav .dot.active { background: var(--accent); }++ /* Cover */+ .cover { display: flex; flex-direction: column; gap: 28px; }+ .cover .badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); align-self: flex-start; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }+ .cover .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }+ .cover h1 { font-size: clamp(56px, 8vw, 110px); margin: 0; line-height: 0.96; letter-spacing: -0.03em; font-weight: 800; }+ .cover h1 em { font-style: normal; color: var(--accent); }+ .cover .meta { display: flex; gap: 36px; color: var(--muted); font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }++ /* Headline */+ .headline { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }+ .headline-num { font-size: clamp(120px, 18vw, 220px); line-height: 0.9; letter-spacing: -0.04em; font-weight: 800; color: var(--accent); }+ .headline-num small { display: block; font-size: 18px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 12px; font-family: var(--mono); text-transform: uppercase; }+ .headline-text h2 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 18px; font-weight: 700; }+ .headline-text p { color: var(--muted); font-size: 18px; max-width: 36ch; line-height: 1.5; }++ /* Section title */+ .section-title { font-size: clamp(32px, 4vw, 56px); margin: 0 0 36px; line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }+ .section-title em { font-style: normal; color: var(--accent); }++ /* Lists of items */+ .item-list { display: flex; flex-direction: column; gap: 14px; }+ .item { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }+ .item-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }+ .item-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }+ .item-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }+ .av-row { display: flex; }+ .av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--paper); margin-left: -8px; font-size: 11px; font-weight: 700; color: var(--bg); display: inline-flex; align-items: center; justify-content: center; background: var(--accent); }+ .av:first-child { margin-left: 0; }+ .av-2 { background: var(--accent-2); color: white; }+ .av-3 { background: #ff6f91; color: white; }++ /* Blocked */+ .blocked-block { padding: 36px 40px; background: linear-gradient(135deg, rgba(255,111,145,0.18), rgba(255,204,77,0.08)); border: 1px solid rgba(255,111,145,0.4); border-radius: 18px; }+ .blocked-block h3 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }+ .blocked-block p { color: var(--muted); margin: 0 0 18px; font-size: 16px; }+ .blocked-ask { display: inline-flex; padding: 10px 22px; background: var(--accent); color: var(--bg); border-radius: 999px; font-weight: 600; font-size: 14px; }++ /* Charts */+ .chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }+ .chart { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }+ .chart h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }+ .chart .sub { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }+ .chart svg { width: 100%; height: 220px; display: block; margin-top: 16px; }+ .big-num { font-size: 72px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent); margin-top: 16px; }+ .delta { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-top: 8px; }+ .delta.warn { color: #ff6f91; }++ /* Asks */+ .asks { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }+ .ask { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; }+ .ask .who { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }+ .ask h3 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }+ .ask p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }++ /* Closer */+ .closer { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }+ .closer h2 { font-size: clamp(44px, 6vw, 84px); margin: 0; line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; }+ .closer h2 em { font-style: normal; color: var(--accent); }+ .closer p { color: var(--muted); font-size: 18px; max-width: 56ch; }+ .closer .signature { display: flex; align-items: center; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line); width: 100%; }+ .closer .signature .av { width: 44px; height: 44px; font-size: 16px; }+ .closer .signature strong { display: block; font-size: 16px; }+ .closer .signature span { color: var(--muted); font-size: 13px; }++ @media (max-width: 760px) {+ .slide { padding: 48px 28px; }+ .headline { grid-template-columns: 1fr; }+ .chart-grid, .asks { grid-template-columns: 1fr; }+ }+</style>+</head>+<body>+<div class="deck" id="deck">++ <!-- 1. Cover -->+ <section class="slide">+ <span class="crumb">Growth squad · weekly</span>+ <div class="slide-inner cover">+ <div class="badge"><span class="dot"></span>Week 42 · 14 → 18 Oct</div>+ <h1>Hello, week <em>forty‑two</em>.</h1>+ <div class="meta">+ <span>Author · Devon Park</span>+ <span>Audience · Squad + leadership</span>+ <span>5 min read</span>+ </div>+ </div>+ <span class="pageno">01 / 08</span>+ </section>++ <!-- 2. Headline number -->+ <section class="slide">+ <span class="crumb">Headline</span>+ <div class="slide-inner headline">+ <div class="headline-num">+22%<small>Net new MRR vs Q3 weekly avg</small></div>+ <div class="headline-text">+ <h2>The week the funnel started feeling fast again.</h2>+ <p>Onboarding completion is up 9 pp, signup→activation cut to 47 minutes from 1h12, and we shipped the first piece of the 2FA workstream.</p>+ </div>+ </div>+ <span class="pageno">02 / 08</span>+ </section>++ <!-- 3. Shipped -->+ <section class="slide">+ <span class="crumb">What shipped</span>+ <div class="slide-inner">+ <h2 class="section-title">Shipped, <em>top to bottom</em>.</h2>+ <div class="item-list">+ <div class="item"><span class="item-num">01</span><span class="item-title">TOTP enrollment in member settings</span><span class="item-meta">NW-201 · Devon</span></div>+ <div class="item"><span class="item-num">02</span><span class="item-title">Onboarding empty-state illustrations</span><span class="item-meta">NW-241 · Mira</span></div>+ <div class="item"><span class="item-num">03</span><span class="item-title">Audit-log entries for auth events</span><span class="item-meta">NW-198 · Priya</span></div>+ <div class="item"><span class="item-num">04</span><span class="item-title">Workspace-switcher scroll-reset fix</span><span class="item-meta">NW-233 · Caleb</span></div>+ </div>+ </div>+ <span class="pageno">03 / 08</span>+ </section>++ <!-- 4. In flight -->+ <section class="slide">+ <span class="crumb">In flight</span>+ <div class="slide-inner">+ <h2 class="section-title">In flight, <em>landing soon</em>.</h2>+ <div class="item-list">+ <div class="item"><span class="item-num">01</span><span class="item-title">Recovery codes — generate, download, regenerate</span><div class="av-row"><span class="av">PB</span></div></div>+ <div class="item"><span class="item-num">02</span><span class="item-title">2FA challenge step — visual + microcopy</span><div class="av-row"><span class="av av-2">MR</span><span class="av">SL</span></div></div>+ <div class="item"><span class="item-num">03</span><span class="item-title">Settings nav restructure (left rail)</span><div class="av-row"><span class="av av-2">MR</span></div></div>+ <div class="item"><span class="item-num">04</span><span class="item-title">Audit-writer backlog dashboard</span><div class="av-row"><span class="av av-3">CA</span></div></div>+ </div>+ </div>+ <span class="pageno">04 / 08</span>+ </section>++ <!-- 5. Blocked -->+ <section class="slide">+ <span class="crumb">Blocked</span>+ <div class="slide-inner">+ <h2 class="section-title">One thing's <em>stuck</em>.</h2>+ <div class="blocked-block">+ <h3>Brand copy review for the 2FA challenge step.</h3>+ <p>Sasha needs Brand to review the new microcopy by Wednesday EOD or M2 (Nov 18) slips. The doc is tagged in <code style="font-family: var(--mono);">#brand-reviews</code>; we just need eyes.</p>+ <span class="blocked-ask">Ask: Brand — please review by Wed</span>+ </div>+ </div>+ <span class="pageno">05 / 08</span>+ </section>++ <!-- 6. Metrics -->+ <section class="slide">+ <span class="crumb">Metrics</span>+ <div class="slide-inner">+ <h2 class="section-title">Metrics that <em>moved</em>.</h2>+ <div class="chart-grid">+ <div class="chart">+ <h4>Activation rate · 4-week trailing</h4>+ <div class="sub">Higher is better</div>+ <svg viewBox="0 0 600 220" preserveAspectRatio="none">+ <defs><linearGradient id="lg1" x1="0" x2="0" y1="0" y2="1"><stop offset="0%" stop-color="#ffcc4d" stop-opacity="0.4"/><stop offset="100%" stop-color="#ffcc4d" stop-opacity="0"/></linearGradient></defs>+ <polygon fill="url(#lg1)" points="20,210 20,160 110,150 200,140 290,124 380,108 470,80 560,52 580,52 580,210" />+ <polyline fill="none" stroke="#ffcc4d" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"+ points="20,160 110,150 200,140 290,124 380,108 470,80 560,52" />+ <circle cx="560" cy="52" r="5" fill="#ffcc4d"/>+ </svg>+ <div class="big-num">38%</div>+ <div class="delta">▲ +9 pp this week</div>+ </div>+ <div class="chart">+ <h4>Time-to-activation · median</h4>+ <div class="sub">Lower is better</div>+ <svg viewBox="0 0 600 220" preserveAspectRatio="none">+ <defs><linearGradient id="lg2" x1="0" x2="0" y1="0" y2="1"><stop offset="0%" stop-color="#b388ff" stop-opacity="0.4"/><stop offset="100%" stop-color="#b388ff" stop-opacity="0"/></linearGradient></defs>+ <polygon fill="url(#lg2)" points="20,210 20,60 110,72 200,90 290,108 380,124 470,148 560,164 580,164 580,210" />+ <polyline fill="none" stroke="#b388ff" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"+ points="20,60 110,72 200,90 290,108 380,124 470,148 560,164" />+ <circle cx="560" cy="164" r="5" fill="#b388ff"/>+ </svg>+ <div class="big-num" style="color: #b388ff;">47 min</div>+ <div class="delta">▼ −25 min this week</div>+ </div>+ </div>+ </div>+ <span class="pageno">06 / 08</span>+ </section>++ <!-- 7. Asks -->+ <section class="slide">+ <span class="crumb">Asks</span>+ <div class="slide-inner">+ <h2 class="section-title">Asks for <em>next week</em>.</h2>+ <div class="asks">+ <div class="ask">+ <div class="who"><span class="av av-2">SL</span>Brand</div>+ <h3>Review the 2FA challenge microcopy by Wednesday EOD.</h3>+ <p>Doc is tagged in <code style="font-family: var(--mono);">#brand-reviews</code>. Without it, M2 ships late and the Pioneer deal slips.</p>+ </div>+ <div class="ask">+ <div class="who"><span class="av av-3">PB</span>Security</div>+ <h3>Pair on the KMS rotation rehearsal Thursday 14:00.</h3>+ <p>30 minutes. We want to dry-run the procedure before we touch prod next quarter.</p>+ </div>+ <div class="ask">+ <div class="who"><span class="av">DP</span>Sales</div>+ <h3>Loop us in to the Pioneer security review call.</h3>+ <p>We can answer the 2FA questions live; will save a round-trip.</p>+ </div>+ <div class="ask">+ <div class="who"><span class="av av-2">MR</span>Research</div>+ <h3>Five recruits for the Enterprise admin study by next Friday.</h3>+ <p>Existing customers preferred. We have an Airtable form ready.</p>+ </div>+ </div>+ </div>+ <span class="pageno">07 / 08</span>+ </section>++ <!-- 8. Closing -->+ <section class="slide">+ <span class="crumb">Thanks</span>+ <div class="slide-inner closer">+ <h2>That's the <em>week</em>.</h2>+ <p>Thanks for the focus. The 2FA push is paying off and the funnel work landed harder than I expected. Special thanks to Mira for the empty-state work — small change, big lift on activation.</p>+ <div class="signature">+ <span class="av">DP</span>+ <div><strong>Devon Park</strong><span>Growth squad lead · ping me in #growth-squad</span></div>+ </div>+ </div>+ <span class="pageno">08 / 08</span>+ </section>+</div>++<div class="nav" id="nav"></div>++<script>+ const deck = document.getElementById('deck');+ const slides = deck.querySelectorAll('.slide');+ const nav = document.getElementById('nav');+ slides.forEach((_, i) => {+ const d = document.createElement('span');+ d.className = 'dot' + (i === 0 ? ' active' : '');+ d.addEventListener('click', () => deck.scrollTo({ left: window.innerWidth * i, behavior: 'smooth' }));+ nav.appendChild(d);+ });+ function activeIndex() {+ return Math.round(deck.scrollLeft / window.innerWidth);+ }+ deck.addEventListener('scroll', () => {+ const idx = activeIndex();+ nav.querySelectorAll('.dot').forEach((d, i) => d.classList.toggle('active', i === idx));+ }, { passive: true });+ document.addEventListener('keydown', (e) => {+ const idx = activeIndex();+ if (e.key === 'ArrowRight' || e.key === 'PageDown') {+ const next = Math.min(slides.length - 1, idx + 1);+ deck.scrollTo({ left: window.innerWidth * next, behavior: 'smooth' });+ } else if (e.key === 'ArrowLeft' || e.key === 'PageUp') {+ const prev = Math.max(0, idx - 1);+ deck.scrollTo({ left: window.innerWidth * prev, behavior: 'smooth' });+ }+ });+</script>+</body>+</html>diff --git a/src/lib/templates/skills/wireframe-sketch/SKILL.md b/src/lib/templates/skills/wireframe-sketch/SKILL.mdnew file mode 100644index 00000000..8d378fb6--- /dev/null+++ b/src/lib/templates/skills/wireframe-sketch/SKILL.md@@ -0,0 +1,22 @@+---+name: wireframe-sketch+zh_name: "手绘线框图"+en_name: "Wireframe Sketch"+emoji: "✏️"+description: "网格背景 + marker 笔触 + 多 tab + sticky note + scribble 图表"+category: prototype+scenario: design+aspect_hint: "桌面 1440"+recommended: 11+tags: ["wireframe", "lo-fi", "sketch", "草稿", "手绘"]+---++【模板: 手绘 Wireframe】+【意图】白板 / 草稿前阶段的 wireframe 探索。+【布局】+- Graph-paper 背景+- 多 tab labels (variants 标签)+- scribbled chart placeholders + hatched fills+- Sticky-note annotations (黄色, 旋转一点点)+【设计细节】+- 字体: Caveat / Architects Daughter; 不要规规矩矩的对齐diff --git a/src/lib/templates/skills/wireframe-sketch/example.html b/src/lib/templates/skills/wireframe-sketch/example.htmlnew file mode 100644index 00000000..6316e219--- /dev/null+++ b/src/lib/templates/skills/wireframe-sketch/example.html@@ -0,0 +1,256 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Zentou AI Portal — Wireframe v0.1</title>+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@500;700&family=Patrick+Hand&family=DM+Serif+Display&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />+ <style>+ :root {+ --paper: #fbf6ec;+ --paper-tint: #f5eedf;+ --ink: #2b2620;+ --pencil: #4d473d;+ --rule: #c8bfa9;+ --grid: #e3d8b8;+ --accent: #d8482b;+ --highlight: #f9d27c;+ --note-yellow: #fff19a;+ --note-pink: #ffd5c9;+ --serif: 'DM Serif Display', 'Iowan Old Style', Georgia, serif;+ --hand: 'Patrick Hand', 'Caveat', cursive;+ --hand-bold: 'Caveat', 'Patrick Hand', cursive;+ --mono: 'IBM Plex Mono', ui-monospace, monospace;+ }+ * { box-sizing: border-box; }+ body {+ margin: 0;+ color: var(--ink);+ background:+ radial-gradient(circle, rgba(43,38,32,0.04) 1px, transparent 1.4px) 0 0 / 22px 22px,+ var(--paper);+ font: 16px/1.5 var(--hand);+ }+ .page { padding: 32px 48px 56px; max-width: 1320px; margin: 0 auto; }++ .head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }+ .head h1 { font: 800 56px/1 var(--serif); margin: 0; letter-spacing: -0.005em; display: flex; align-items: center; gap: 18px; }+ .head h1 em { font-style: italic; }+ .pin { display: inline-flex; align-items: center; gap: 8px; font: 12px/1 var(--mono); padding: 6px 10px; border: 1.5px dashed var(--accent); color: var(--accent); transform: rotate(-2.2deg); letter-spacing: 0.18em; background: var(--paper); }+ .pin .x { width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }+ .head .sub { font: 18px/1.4 var(--hand); color: var(--pencil); }+ .head .meta { font: 11px/1.4 var(--mono); color: var(--pencil); letter-spacing: 0.14em; text-align: right; text-transform: uppercase; }+ .head .meta b { color: var(--ink); }++ .tabs { display: flex; gap: 8px; padding: 18px 0 12px; flex-wrap: wrap; }+ .tab { font: 16px/1 var(--hand); padding: 10px 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--pencil); position: relative; transform: rotate(-0.4deg); }+ .tab .num { font: 11px/1 var(--mono); color: var(--pencil); padding: 4px 6px; border: 1.5px solid var(--pencil); letter-spacing: 0.06em; }+ .tab.active { color: var(--ink); }+ .tab.active::before { content: ''; position: absolute; left: -2px; right: -2px; top: 4px; bottom: 6px; background: var(--highlight); transform: skew(-8deg); z-index: -1; opacity: 0.85; }+ .tab.active .num { border-color: var(--ink); color: var(--ink); }+ .tab .glyph { width: 14px; height: 14px; border: 1.5px solid currentColor; display: inline-block; }++ .canvas {+ position: relative;+ background:+ repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 24px),+ repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 24px),+ var(--paper-tint);+ border: 3px solid var(--ink);+ border-radius: 14px;+ padding: 26px 26px 32px;+ box-shadow: 6px 8px 0 -4px rgba(43,38,32,0.18);+ }+ .canvas .section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }+ .canvas h2 { font: 800 30px/1 var(--serif); margin: 0; }+ .canvas .pill { font: 12px/1 var(--mono); padding: 5px 9px; border: 1.5px solid var(--pencil); border-radius: 999px; color: var(--pencil); letter-spacing: 0.12em; transform: rotate(1.2deg); }+ .canvas .lede { font: 17px/1.5 var(--hand); color: var(--pencil); margin: 0 0 18px; max-width: 70ch; }++ .browser { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 2px solid var(--pencil); border-radius: 999px; background: var(--paper); margin-bottom: 16px; }+ .browser .dots { display: flex; gap: 6px; }+ .browser .dots span { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--pencil); }+ .browser .url { flex: 1; font: 14px/1 var(--hand); color: var(--pencil); }+ .browser .user { font: 14px/1 var(--hand); color: var(--pencil); }++ .layout { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }+ aside.nav { padding: 10px 0; }+ aside.nav .brand { font: 800 28px/1 var(--serif); font-style: italic; padding: 4px 6px; border-bottom: 2px solid var(--ink); display: inline-block; margin-bottom: 18px; }+ aside.nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }+ aside.nav li { font: 17px/1.2 var(--hand); display: flex; align-items: center; gap: 10px; padding: 6px 6px; position: relative; }+ aside.nav li .square { width: 14px; height: 14px; border: 1.5px solid var(--pencil); display: inline-block; flex-shrink: 0; }+ aside.nav li.active { color: var(--ink); }+ aside.nav li.active::before {+ content: ''; position: absolute; left: -4px; right: -8px; top: 4px; bottom: 6px;+ background: var(--highlight); opacity: 0.6; transform: skew(-6deg); z-index: -1;+ }++ .greeting { font: 14px/1.4 var(--hand); color: var(--pencil); }+ .name { font: 800 28px/1 var(--serif); font-style: italic; margin: 2px 0 4px; }+ .toggle-row { display: inline-flex; gap: 6px; padding: 4px; border: 1.5px solid var(--pencil); border-radius: 999px; }+ .toggle-row .tag { font: 13px/1 var(--hand); padding: 6px 10px; border-radius: 999px; color: var(--pencil); }+ .toggle-row .tag.active { background: var(--highlight); color: var(--ink); }++ .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }+ .kpi { border: 2px solid var(--pencil); border-radius: 10px; padding: 14px; background: var(--paper); position: relative; }+ .kpi .label { font: 13px/1 var(--mono); color: var(--pencil); letter-spacing: 0.14em; text-transform: uppercase; }+ .kpi .value { font: 800 44px/1 var(--serif); margin-top: 8px; color: var(--accent); }+ .kpi .value.ink { color: var(--ink); }+ .kpi .small { font: 12px/1.4 var(--hand); color: var(--pencil); margin-top: 6px; }+ .kpi.tilt-1 { transform: rotate(-0.6deg); }+ .kpi.tilt-2 { transform: rotate(0.4deg); }+ .kpi.tilt-3 { transform: rotate(-0.2deg); }+ .kpi.tilt-4 { transform: rotate(0.7deg); }++ .panels { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }+ .panel { border: 2px solid var(--pencil); border-radius: 10px; padding: 14px; background: var(--paper); position: relative; }+ .panel h3 { font: 700 16px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 14px; color: var(--pencil); display: flex; align-items: center; gap: 8px; }+ .panel h3 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }+ .panel svg.scribble { width: 100%; height: 160px; display: block; }++ .sticky {+ position: absolute;+ padding: 10px 12px;+ font: 16px/1.3 var(--hand);+ box-shadow: 4px 6px 0 -2px rgba(43,38,32,0.18);+ max-width: 220px;+ }+ .sticky.sn1 { top: 20px; right: 30px; background: var(--note-yellow); transform: rotate(2.4deg); }+ .sticky.sn2 { top: 380px; right: 90px; background: var(--note-pink); transform: rotate(-3.2deg); }+ .sticky .tape { position: absolute; top: -10px; left: 30px; width: 70px; height: 18px; background: rgba(43,38,32,0.18); transform: rotate(-4deg); }+ .sticky b { font-family: var(--hand-bold); font-weight: 700; }++ .events { padding: 12px 14px; border: 2px dashed var(--pencil); border-radius: 10px; margin-top: 14px; background: var(--paper); }+ .events .label { font: 13px/1 var(--mono); letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }+ .events .lines span { display: block; height: 8px; background: var(--pencil); opacity: 0.18; border-radius: 4px; margin: 6px 0; }+ .events .lines span:nth-child(1) { width: 80%; }+ .events .lines span:nth-child(2) { width: 60%; }+ .events .lines span:nth-child(3) { width: 70%; }++ .next-step { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 2px solid var(--accent); border-radius: 10px; background: var(--paper); margin-top: 14px; }+ .next-step .head { font: 13px/1 var(--mono); letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase; }+ .next-step ul { padding: 0 0 0 18px; margin: 6px 0 0; font: 15px/1.4 var(--hand); color: var(--ink); }++ @media (max-width: 1000px) {+ .layout { grid-template-columns: 1fr; }+ .kpis { grid-template-columns: 1fr 1fr; }+ .panels { grid-template-columns: 1fr; }+ .sticky.sn1 { display: none; }+ .sticky.sn2 { display: none; }+ }+ </style>+</head>+<body>+ <div class="page">+ <div class="head" data-od-id="head">+ <h1><em>Zentou AI · Portal</em>+ <span class="pin"><span class="x"></span>WIREFRAME v0.1</span>+ </h1>+ <div class="sub">受験者画面のレイアウト探索 — 4案 + 元画面の再整理</div>+ <div class="meta"><b>DATE</b> 2026-04-18 · <b>DEVICE</b> DESKTOP 1440 · <b>FIDELITY</b> LOW</div>+ </div>++ <div class="tabs" data-od-id="tabs">+ <div class="tab"><span class="glyph"></span><span class="num">00</span>ALL</div>+ <div class="tab"><span class="glyph"></span><span class="num">01</span>A · 整理型 (元画面ベース)</div>+ <div class="tab active"><span class="glyph"></span><span class="num">02</span>B · ダッシュボード (KPI)</div>+ <div class="tab"><span class="glyph"></span><span class="num">03</span>C · タイムライン (次の試験)</div>+ <div class="tab"><span class="glyph"></span><span class="num">04</span>D · 学習体験型</div>+ </div>++ <div class="canvas" data-od-id="canvas">+ <div class="section-label">+ <h2>B · ダッシュボード</h2>+ <span class="pill">DATA-FORWARD</span>+ </div>+ <p class="lede">KPIを最上段に。「今の自分の位置」を一目で把握 → 詳細は下へスクロール。</p>++ <div class="browser" data-od-id="browser"><div class="dots"><span></span><span></span><span></span></div><div class="url">zentou-ai.jp / portal / dashboard</div><div class="user">motoki.daisuke</div></div>++ <div class="layout">+ <aside class="nav" data-od-id="sidebar">+ <span class="brand">全統 AI</span>+ <ul>+ <li class="active"><span class="square"></span>ダッシュボード</li>+ <li><span class="square"></span>試験日程</li>+ <li><span class="square"></span>成績一覧</li>+ <li><span class="square"></span>練習問題</li>+ <li><span class="square"></span>学習計画</li>+ </ul>+ </aside>++ <div data-od-id="main">+ <div style="display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;">+ <div>+ <div class="greeting">おかえりなさい</div>+ <div class="name">motoki.daisuke <span style="font-size:18px;color:var(--pencil);">さん</span></div>+ </div>+ <div class="toggle-row">+ <span class="tag">今週</span>+ <span class="tag active">今月</span>+ <span class="tag">通算</span>+ </div>+ </div>++ <div class="kpis" data-od-id="kpis">+ <div class="kpi tilt-1"><div class="label">認定ランク</div><div class="value">A2</div><div class="small">基礎認定</div></div>+ <div class="kpi tilt-2"><div class="label">偏差値</div><div class="value ink" style="color:#3b6e8e;">39</div><div class="small">↑ +3.2 前回比</div></div>+ <div class="kpi tilt-3"><div class="label">次回まで</div><div class="value">1日</div><div class="small">04/19 10:00</div></div>+ <div class="kpi tilt-4"><div class="label">練習進捗</div><div class="value ink" style="color:#3b6e8e;">62%</div><div class="small">▰▰▰▰▰▱▱▱</div></div>+ </div>++ <div class="panels" data-od-id="panels">+ <div class="panel" data-od-id="chart">+ <h3><span class="dot"></span>CHART · 偏差値推移</h3>+ <svg class="scribble" viewBox="0 0 480 160" aria-hidden="true">+ <path d="M 14 142 L 460 142" stroke="#4d473d" stroke-width="1.6" fill="none"/>+ <path d="M 14 14 L 14 142" stroke="#4d473d" stroke-width="1.6" fill="none"/>+ <path d="M 18 110 C 80 96, 130 102, 180 92 S 280 60, 340 50 S 440 32, 460 22"+ stroke="#d8482b" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round"/>+ <circle cx="80" cy="98" r="4" fill="#d8482b"/>+ <circle cx="200" cy="86" r="4" fill="#d8482b"/>+ <circle cx="320" cy="56" r="4" fill="#d8482b"/>+ <circle cx="440" cy="28" r="4" fill="#d8482b"/>+ </svg>+ </div>+ <div class="panel" data-od-id="bars">+ <h3><span class="dot"></span>SUBJECTS · 科目別</h3>+ <svg class="scribble" viewBox="0 0 320 160" aria-hidden="true">+ <defs>+ <pattern id="hatch" patternUnits="userSpaceOnUse" width="6" height="6" patternTransform="rotate(45)">+ <line x1="0" y1="0" x2="0" y2="6" stroke="#2b2620" stroke-width="1.6"/>+ </pattern>+ </defs>+ <path d="M 14 142 L 306 142" stroke="#4d473d" stroke-width="1.6" fill="none"/>+ <rect x="30" y="60" width="38" height="82" fill="url(#hatch)" stroke="#2b2620" stroke-width="1.4"/>+ <rect x="86" y="38" width="38" height="104" fill="url(#hatch)" stroke="#2b2620" stroke-width="1.4"/>+ <rect x="142" y="78" width="38" height="64" fill="url(#hatch)" stroke="#2b2620" stroke-width="1.4"/>+ <rect x="198" y="22" width="38" height="120" fill="url(#hatch)" stroke="#2b2620" stroke-width="1.4"/>+ <rect x="254" y="50" width="38" height="92" fill="url(#hatch)" stroke="#2b2620" stroke-width="1.4"/>+ <text x="14" y="158" font-family="IBM Plex Mono, monospace" font-size="11" fill="#4d473d">開発 / 国 / 数 / 英 / 理</text>+ </svg>+ </div>+ </div>++ <div class="events" data-od-id="events">+ <div class="label">📣 お知らせ (直近 3 件)</div>+ <div class="lines"><span></span><span></span><span></span></div>+ </div>++ <div class="next-step" data-od-id="next-step">+ <div class="head">● NEXT STEP / 次にやること</div>+ <ul>+ <li>試験の申込を完了する</li>+ <li>弱点「論理」を10問だけ解く</li>+ </ul>+ </div>+ </div>+ </div>++ <div class="sticky sn1" data-od-id="sticky-1"><div class="tape"></div>一日目から触りたくなる画面に</div>+ <div class="sticky sn2" data-od-id="sticky-2"><div class="tape"></div><b>page-1 / 5</b><br/>余白は気持ちよく。<br/>密度は B 案ぐらい。</div>+ </div>+ </div>+</body>+</html>diff --git a/src/lib/use-autosave.ts b/src/lib/use-autosave.tsnew file mode 100644index 00000000..756a9c0d--- /dev/null+++ b/src/lib/use-autosave.ts@@ -0,0 +1,79 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { useStore, selectActiveTask } from "./store";+import { snapshotDraft } from "./drafts";++/**+ * Watches editor content and reports save status.+ *+ * The zustand store's `persist` middleware already writes content to+ * localStorage on every change (debounced by React reconciliation), so the+ * "save" itself is automatic. This hook produces the *visible* state:+ * - "saving" briefly after the user types+ * - "saved" once persist has written, with a timestamp+ * - additionally, periodically snapshots a versioned draft to drafts.ts+ */+export type SaveStatus = "idle" | "saving" | "saved" | "error";++export function useAutosave() {+ const content = useStore((s) => selectActiveTask(s)?.content ?? "");+ const format = useStore((s) => selectActiveTask(s)?.format ?? "text");+ const filename = useStore((s) => selectActiveTask(s)?.filename);+ const [status, setStatus] = useState<SaveStatus>("idle");+ const [savedAt, setSavedAt] = useState<number | null>(null);+ const lastContentRef = useRef(content);+ const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);++ // initial: if content already exists (rehydrated from persist), mark saved+ useEffect(() => {+ if (content && status === "idle") {+ setStatus("saved");+ setSavedAt(Date.now());+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);++ useEffect(() => {+ if (content === lastContentRef.current) return;+ lastContentRef.current = content;+ setStatus("saving");+ if (timerRef.current) clearTimeout(timerRef.current);+ timerRef.current = setTimeout(() => {+ try {+ // zustand persist has already saved by now; we additionally snapshot+ snapshotDraft(content, format, filename);+ setStatus("saved");+ setSavedAt(Date.now());+ } catch {+ setStatus("error");+ }+ }, 600);+ return () => {+ if (timerRef.current) clearTimeout(timerRef.current);+ };+ }, [content, format, filename]);++ return { status, savedAt };+}++export function relativeTime(ts: number | null): string {+ if (!ts) return "";+ const diff = Math.max(0, Date.now() - ts) / 1000;+ if (diff < 5) return "刚刚";+ if (diff < 60) return `${Math.round(diff)} 秒前`;+ if (diff < 3600) return `${Math.round(diff / 60)} 分钟前`;+ if (diff < 86400) return `${Math.round(diff / 3600)} 小时前`;+ return new Date(ts).toLocaleString();+}++/**+ * Tracks whether the component is mounted on the client. Use to gate any+ * value derived from `Date.now()` or other browser-only state so SSR and+ * the first client render produce the same HTML.+ */+export function useMounted() {+ const [mounted, setMounted] = useState(false);+ useEffect(() => setMounted(true), []);+ return mounted;+}diff --git a/src/lib/use-convert.ts b/src/lib/use-convert.tsnew file mode 100644index 00000000..8a054682--- /dev/null+++ b/src/lib/use-convert.ts@@ -0,0 +1,271 @@+"use client";++import { useCallback } from "react";+import { useStore } from "./store";+import { summarizeForAgent } from "./parsers/auto";++type ConvertReq = {+ taskId: string;+ agent: string;+ templateId: string;+ content: string;+ format?: string;+ /** Optional model override. "default" / undefined → no --model flag. */+ model?: string;+};++/** prefix logged when the run is sent in diff-edit mode (vs full regeneration) */+const DIFF_LOG_PREFIX = "🔁 diff-edit 模式";++// per-task abort controllers — multiple tasks can stream concurrently+const controllers = new Map<string, AbortController>();++export function useConvert() {+ const cancel = useCallback((taskId: string) => {+ const ctl = controllers.get(taskId);+ if (ctl) {+ ctl.abort();+ controllers.delete(taskId);+ }+ useStore.getState().setStatusFor(taskId, "idle");+ }, []);++ const run = useCallback(+ async (req: ConvertReq) => {+ const { taskId } = req;+ cancel(taskId);+ const ctl = new AbortController();+ controllers.set(taskId, ctl);+ const store = useStore.getState();+ store.setStatusFor(taskId, "running");+ store.resetHtmlFor(taskId);+ store.clearLogFor(taskId);+ store.resetStatsFor(taskId);+ const startedAt = Date.now();+ store.patchStatsFor(taskId, { startedAt });++ const summary = summarizeForAgent(req.content);+ const enrichedContent =+ summary.preview && summary.format !== "markdown" && summary.format !== "html" && summary.format !== "text"+ ? `${summary.preview}\n\n--- 原始内容 ---\n${summary.raw}`+ : summary.raw;++ const useModel = req.model && req.model !== "default" ? req.model : undefined;++ // diff-edit mode: if the task was loaded from a sample (or the user has+ // already converted once) AND the content has actually changed, we ship+ // the previous (baseContent, baseHtml) so the API can ask the agent for+ // minimal edits instead of a fresh regeneration. This preserves the+ // design system AND saves output tokens.+ const task = store.tasks.find((t) => t.id === taskId);+ const isEdit =+ !!task?.baseHtml &&+ !!task?.baseContent &&+ task.baseContent.trim() !== req.content.trim();+ const editPayload = isEdit+ ? {+ editFromHtml: task!.baseHtml!,+ editFromContent: task!.baseContent!,+ }+ : null;++ const payload = {+ agent: req.agent,+ templateId: req.templateId,+ content: enrichedContent,+ format: req.format ?? summary.format,+ ...(useModel ? { model: useModel } : {}),+ ...(editPayload ?? {}),+ };++ const sizeNote = `输入 ${enrichedContent.length.toLocaleString()} 字符 (${summary.format})`;+ store.pushLogFor(taskId, {+ kind: "info",+ text: isEdit+ ? `${DIFF_LOG_PREFIX} · ${req.agent}${useModel ? ` · 模型 ${useModel}` : ""} · 模板 ${req.templateId} · ${sizeNote} · 原 HTML ${(task!.baseHtml!.length / 1024).toFixed(1)} KB`+ : `准备调用 ${req.agent}${useModel ? ` · 模型 ${useModel}` : ""} · 模板 ${req.templateId} · ${sizeNote}`,+ });++ try {+ const res = await fetch("/api/convert", {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify(payload),+ signal: ctl.signal,+ });+ if (!res.ok || !res.body) {+ const text = await res.text().catch(() => res.statusText);+ throw new Error(`HTTP ${res.status}: ${text}`);+ }++ const reader = res.body.getReader();+ const dec = new TextDecoder();+ let buf = "";+ let lastEvent = "";++ while (true) {+ const { value, done } = await reader.read();+ if (done) break;+ buf += dec.decode(value, { stream: true });++ let blank: number;+ while ((blank = buf.indexOf("\n\n")) !== -1) {+ const block = buf.slice(0, blank);+ buf = buf.slice(blank + 2);+ const lines = block.split("\n");+ let event = lastEvent;+ const dataLines: string[] = [];+ for (const l of lines) {+ if (l.startsWith("event:")) event = l.slice(6).trim();+ else if (l.startsWith("data:")) dataLines.push(l.slice(5).trim());+ }+ lastEvent = event;+ if (!dataLines.length) continue;+ const dataStr = dataLines.join("\n");+ let data: unknown;+ try {+ data = JSON.parse(dataStr);+ } catch {+ continue;+ }+ handleEvent(taskId, event, data, startedAt);+ }+ }+ const endedAt = Date.now();+ useStore.getState().patchStatsFor(taskId, { endedAt, durationMs: endedAt - startedAt });+ useStore.getState().setStatusFor(taskId, "done");+ // record the just-finished (content, html) as the new diff-edit baseline+ // so the user's next edit goes through diff mode instead of full regen+ useStore.getState().commitBaseFor(taskId);+ } catch (err) {+ if ((err as Error)?.name === "AbortError") {+ useStore.getState().pushLogFor(taskId, { kind: "info", text: "已取消" });+ useStore.getState().setStatusFor(taskId, "idle");+ return;+ }+ useStore.getState().pushLogFor(taskId, {+ kind: "error",+ text: (err as Error)?.message ?? String(err),+ });+ useStore.getState().setStatusFor(taskId, "error");+ } finally {+ if (controllers.get(taskId) === ctl) controllers.delete(taskId);+ }+ },+ [cancel],+ );++ return { run, cancel };+}++function handleEvent(taskId: string, event: string, data: unknown, startedAt: number) {+ const d = data as Record<string, unknown>;+ const store = useStore.getState();+ const elapsed = Date.now() - startedAt;+ switch (event) {+ case "start": {+ const bin = String(d.bin ?? "");+ const promptBytes = Number(d.promptBytes ?? 0);+ store.patchStatsFor(taskId, { bin, promptBytes });+ store.pushLogFor(taskId, {+ kind: "start",+ elapsed,+ text: `spawn ${shortPath(bin)} · prompt ${formatBytes(promptBytes)}`,+ data: { argv: d.argv },+ });+ break;+ }+ case "delta": {+ if (typeof d.text === "string") store.appendHtmlFor(taskId, d.text);+ break;+ }+ case "meta": {+ const key = String(d.key);+ const value = d.value;+ const patch: Partial<import("./store").RunStats> = {};+ if (key === "model" && typeof value === "string") patch.model = value;+ if (key === "duration_ms" && typeof value === "number") patch.durationMs = value;+ if (key === "cost_usd" && typeof value === "number") patch.costUsd = value;+ if (key === "usage" && value && typeof value === "object") {+ const u = value as Record<string, number>;+ patch.inputTokens = u.input_tokens;+ patch.outputTokens = u.output_tokens;+ patch.cacheReadTokens = u.cache_read_input_tokens;+ patch.cacheCreateTokens = u.cache_creation_input_tokens;+ }+ if (Object.keys(patch).length) store.patchStatsFor(taskId, patch);+ store.pushLogFor(taskId, {+ kind: "meta",+ elapsed,+ text: formatMeta(key, value),+ data: value,+ });+ break;+ }+ case "stderr": {+ if (typeof d.text === "string")+ store.pushLogFor(taskId, {+ kind: "stderr",+ elapsed,+ text: String(d.text).trim(),+ });+ break;+ }+ case "raw": {+ if (typeof d.text === "string")+ store.pushLogFor(taskId, { kind: "raw", elapsed, text: String(d.text) });+ break;+ }+ case "done": {+ store.pushLogFor(taskId, {+ kind: "done",+ elapsed,+ text: `agent 进程退出 (exit=${d.code ?? "?"})`,+ });+ break;+ }+ case "error": {+ store.pushLogFor(taskId, {+ kind: "error",+ elapsed,+ text: String(d.message ?? "agent error"),+ });+ break;+ }+ }+}++function formatBytes(n: number) {+ if (n < 1024) return `${n} B`;+ if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;+ return `${(n / 1024 / 1024).toFixed(2)} MB`;+}++function shortPath(p: string) {+ if (!p) return "";+ return p.replace(/^.*\//, "…/");+}++function formatMeta(key: string, value: unknown): string {+ if (key === "model") return `model = ${value}`;+ if (key === "session") return `session = ${value}`;+ if (key === "cwd") return `cwd = ${value}`;+ if (key === "duration_ms") return `duration = ${value} ms`;+ if (key === "cost_usd") return `cost ≈ $${(value as number).toFixed(4)}`;+ if (key === "result") return `result = ${value}`;+ if (key === "rate_limit" && value && typeof value === "object") {+ const r = value as { status?: string; rateLimitType?: string };+ return `rate-limit: ${r.status} (${r.rateLimitType})`;+ }+ if (key === "usage" && value && typeof value === "object") {+ const u = value as Record<string, number>;+ const parts: string[] = [];+ if (u.input_tokens) parts.push(`in=${u.input_tokens}`);+ if (u.output_tokens) parts.push(`out=${u.output_tokens}`);+ if (u.cache_read_input_tokens) parts.push(`cache-read=${u.cache_read_input_tokens}`);+ if (u.cache_creation_input_tokens) parts.push(`cache-create=${u.cache_creation_input_tokens}`);+ return `usage: ${parts.join(" · ")}`;+ }+ if (key === "thinking") return `thinking ${(value as string).slice(0, 80)}…`;+ return `${key}: ${typeof value === "object" ? JSON.stringify(value).slice(0, 120) : String(value)}`;+}diff --git a/tsconfig.json b/tsconfig.jsonnew file mode 100644index 00000000..cf9c65d3--- /dev/null+++ b/tsconfig.json@@ -0,0 +1,34 @@+{+ "compilerOptions": {+ "target": "ES2017",+ "lib": ["dom", "dom.iterable", "esnext"],+ "allowJs": true,+ "skipLibCheck": true,+ "strict": true,+ "noEmit": true,+ "esModuleInterop": true,+ "module": "esnext",+ "moduleResolution": "bundler",+ "resolveJsonModule": true,+ "isolatedModules": true,+ "jsx": "react-jsx",+ "incremental": true,+ "plugins": [+ {+ "name": "next"+ }+ ],+ "paths": {+ "@/*": ["./src/*"]+ }+ },+ "include": [+ "next-env.d.ts",+ "**/*.ts",+ "**/*.tsx",+ ".next/types/**/*.ts",+ ".next/dev/types/**/*.ts",+ "**/*.mts"+ ],+ "exclude": ["node_modules"]+}