deck-ljg-present
Casts an outline 1:1 into a color-block, large-type manifesto deck, styling the presentation without altering the original text. Features three theme tiers: black / red / yellow.
1How It Works & Mechanism
The core premise of the entire template is "the outline is the ground truth, and the skill is the renderer": an iron rule strictly prohibits changing any words or their order, with the only permitted action being physical pagination for overly long paragraphs. This directly eliminates the information loss most commonly caused by "AI extraction + rewriting".
- 标题不改字, 段落不改字, 列表不改字, 顺序不重排
Markdown elements map one-to-one to slide types: H1 → emphasis cover slide, H2 → dedicated theme slide, paragraphs tiered by character count, lists split by item count, `---` → solid-color rest slide, and `**emphasis**` → hl highlight.
| `# 一级标题` | 独占 **emphasis** 封面页(accent 底色, 通常单字/单短词) |
Theme colors are inferred from the document tone, allowing only one per presentation: default black (contemplation/argumentation), manifesto-style red, and satirical/critical yellow; each theme also binds default background colors, emphasis slide backgrounds, and hl colors.
| 沉思 / 论证 / 笔记(默认) | **black** | 黑底白字 | 红底白字 | 红 `#E63956` |
Font sizes are computed at runtime rather than chosen manually: SKILL.md provides a tier table weighting CJK characters at 1.8, while lengthTier() in the skeleton JS selects the clamp tier using "longest line character count + (line count - 1) × 4". The example calculates single/short/medium/long across 8 slides respectively.
| single | ≤2 | `clamp(320px, 80vmin, 1100px)` |
SKILL.md embeds a complete, runnable HTML skeleton (inline CSS + JS), explicitly instructing models to reuse it without modification, only populating SLIDES / title / subtitle / data-theme; the example file represents the completed output.
完整 HTML 骨架(agent 应**复用 CSS 与 JS 不要改**, 只填 SLIDES / title / subtitle / data-theme):
The skeleton includes full interactive controls: keyboard (→/←/space/Enter/j/k/PageUp/PageDown/Home/End/F for fullscreen), touch swipe (±40px threshold), and half-screen clicks to navigate, with escapeHtml() escaping all text injected into SLIDES.
return c.hl ? '<span class="hl">' + t + '</span>' : t;
The example is a "faithful rendering of the identical outline": example.md provides an 8-paragraph AI speech outline (including one `---` divider), and SLIDES in example.html contains exactly 8 items—the first emphasis item "AI" corresponds to `# AI`, the divider corresponds to an empty emphasis rest slide, and the final slide concludes with a rhetorical question.
{ emphasis: true, lines: [] },
The only strict prohibition is external resources: the skeleton contains no CDN or external font links, relying solely on system font stacks (Helvetica Neue / Arial Black / PingFang SC), allowing the output to be opened offline by double-clicking.
**不要外链 CDN, 不要外部资源**。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| package | 无外部依赖:字体走系统栈(Helvetica Neue / Arial Black / PingFang SC),骨架不引任何 CDN |
| network | 宿主共享指令声明的 Tailwind CDN(宿主侧默认,本模板显式禁止使用) |
| network | 第三方 skill 来源标注(frontmatter example_source_url,仅作出处记录,非运行时调用) |
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text, containing no script execution or external impact
5Second-Pass Verification
- [ok] 「1:1 铸页」是否在示例中真实成立 — example.md 的结构(# AI / ## 两个二级标题 / 两个列表 / --- / ## 收束问句)与 example.html 的 8 项 SLIDES 逐项对应:首项 emphasis 单字 AI、列表项按 indent:1 渲染、--- 变成空 lines 的 emphasis 休止页、末页 emphasis 收束。
- [ok] 字号档位是否由代码而非人工决定 — lengthTier() 以「最长行字符数 +(行数-1)×4」判断档位,lineCharLen() 对 CJK 字符计权 1.8,与 SKILL.md 的档位表一致。
- [ok] 「不要外链 CDN」是否被示例遵守 — example.html 与 SKILL.md 各自的 http(s):// 计数均为 0;SKILL.md 内有 2 处 github.com 链接(frontmatter example_source_url 与正文致谢的上游 ljg-skills 出处),属第三方来源标注而非运行时资源。内嵌骨架本身不含任何 CDN / 字体外链,字体走系统栈,产物可离线双击打开。
- [ok] 注入面:SLIDES 文本是否被转义 — escapeHtml() 对 & < > " ' 做实体转义,再拼进 innerHTML;SLIDES 内容来自用户大纲,属必要防护。
- [discrepancy] example.html 的 <script> 是否属模板自带可执行代码 — 是(本批 deck 示例里唯一有 1 个 <script> 的目录)。该脚本是 SKILL.md 内嵌骨架的一部分(翻页交互 + 字号分档),只会操作 DOM 与读取键盘/触摸事件,无网络请求、无存储、无凭证访问;展示层按「模板自带脚本」理解即可,不影响判档(仍为 green:无外发、无写盘)。
- [ok] pin commit 与路径 — HEAD = 553ed98c283f9c0f489902d035416a972d6a9699;skill.path = next/src/lib/templates/skills/deck-ljg-present,含 SKILL.md。
- [discrepancy] README 收录一致性 — README 的 deck 表列出 20 个 deck-* 模板,但没有 deck-ljg-present(该 pin 下 deck-* 实为 21 个)。文档滞后,不影响模板行为。
6Verdict & Scenarios
d549ea071c2237ec…