Communitygithub.com

lainshao/modern-ppt

Generate a modern, single-file HTML presentation deck for screen sharing with one sentence: professional minimalist style, 12 layouts, 3 color schemes, interactive animations.

What is modern-ppt?

This AI agent skill, `lainshao/modern-ppt`, creates a polished, single-file HTML presentation deck optimized for screen projection. It enforces a professional minimalist design with 12 built-in layouts (cover, agenda, data charts, comparison matrices, timelines, etc.), three switchable color schemes (default safety orange, bright blue, soft salmon pink) controllable via keyboard (1/2/3) during slideshow, and interactive elements like count-up animations, Chart.js charts, and thumbnail wall. Designed for platforms like Claude Code, Cursor, and Codex, the skill provides a full workflow: clarify the user's needs (audience, duration, default color scheme), draft an outline using a narrative arc, copy the template, produce sample pages for review, then generate the rest while adhering to strict typographic and layout rules. The generated deck is a self-contained HTML file that works offline with keyboard, scroll, and touch navigation. This skill is a derivative of guizang-ppt-skill under AGPL-3.0, so redistributing the skill itself requires retaining the license and attribution, but the final decks produced do not require attribution.

Works with~Claude Code~Codex CLI~Cursor
npx skills add lainshao/modern-ppt

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Modern PPT · Modern On-Screen Deck

Generate a single-file HTML horizontal flip deck: professional minimalist style, clean and restrained typography, with 12 built-in layouts + interactions + 3 color schemes (default safety orange, switch to bright blue/soft salmon pink by pressing 1/2/3 during presentation). Navigate with keyboard ← →, scroll wheel, or touch, press ESC for index, and B for static mode. It's a ready-to-use deck for direct projection or sharing with colleagues for forking.

Source & License (Required Reading): This skill is derived from guizang-ppt-skill(© op7418, AGPL-3.0) — reusing its Swiss template base, WebGL/ASCII backgrounds, slide navigation/index/effects engine. On top of that, it adds: safety orange theme (now expanded to 3 switchable color schemes), a complete set of projection typography rules (below), 12 layouts + interactive animations, verified layout clipping, and fixed template bugs. Therefore this skill is still AGPL-3.0: redistribution must retain the LICENSE + this attribution paragraph + note changes; check open source compliance before placing in a company repository (AGPL is often prohibited). The final generated deck does not require attribution. Template example pages use only generic/public content, do not bake in project-specific materials (otherwise, strip them before sharing — this skill has learned that lesson).

Workflow (Follow Before Action)

  1. Clarify (when user only gives a topic/vague idea): Audience and scenario? Duration (15min ≈ 10 pages / 30min ≈ 18-22 pages)? Default color scheme (❶ Black+Orange / ❷ Bright Blue / ❸ Soft Salmon Pink — all 3 are built-in, switch anytime during presentation with 1/2/3, just set a default; if unsure, use default black+orange)? Any materials/data? Hard constraints (must include X / must not include Y)? Numbers always come from user's materials; if missing, mark as "To be added" — never fabricate.
  2. Draft Outline First: When making a deck from source documents/URLs, first find that one thesis as the anchor (e.g., "Context fills up and it gets stupid"), structure the whole deck around it, conclusions first. Each page has one point (title = point); use a "narrative arc" (hook → set tone → body → twist → closure); for multi-act long decks, insert a divider every 4-5 pages (dark ink background + ghost number, see typography rules §9). Align outline with user before writing. Cut before writing: the first draft is always overloaded; deleting pages/reframing is more impressive than piling on (comprehensive ≠ persuasive).
  3. Copy template: cp assets/template.html project/index.html. It's a complete finished product — 18 pages demonstrating all 12 layouts + 3 color schemes + interactions (count-up / Chart.js / thumbnail wall / chapter dividers), already containing all CSS/JS. Change <title>, keep the layout pages you need, delete the others, replace content with user's.
  4. Sample pages first, then mass produce: First create cover + 2-3 representative pages → screenshot review (see "Verification" below) → user approves → then batch produce remaining pages. Screenshot at each round.
  5. Self-check: Go through each hard rule below + references/typography-rules.md; grep for naked font-size (body size should approach 0).

Typography Hard Rules (Key to Consistency · See references/typography-rules.md for Details)

  1. Body text uses a single --fs-body token (projection ≈21px; video editing change to 32px). All descriptions/paragraphs/card captions/table cells use var(--fs-body), do not write individual bare font-size.
  2. Each page has ≤ a few font-size levels: page title / card title / body text / mono footnote + large number exception. Font-size encoding hierarchy.
  3. Column titles rely on "separator line + whitespace + role contrast" to stand, not on larger font size. Use .col-head (quiet gray text + border-bottom: 2px solid ink). Larger/bolder font fights with body text and is harder to read.
  4. Body text does not use color: accent/brand color only for title keywords, chart data, 1px separator lines; body emphasis = black bold, no italics.
  5. Content follows title closely, not anchored to bottom: Avoid margin-top: auto pushing content to the bottom of a card, creating "title in the sky, content in the basement."
  6. Bottom safe zone ≥6vh (.canvas-card bottom padding): Full-height content blocks should not touch bottom navigation hints/page dots.
  7. Numbered lists (01/02/03) use a single grid sharing column tracks + font-feature-settings:'tnum', otherwise proportional fonts cause varying digit widths and uneven left edges of titles.
  8. Strength/weakness uses a 5-block scale (leading = 5 full blocks), scannable horizontally; don't just write text.
  9. Card's "small label on top" rather than superscript top-right (long titles overlap with superscript); for a group of cards, don't casually add a single spotlight (spotlight either carries data/focus semantics or don't add it).
  10. Accent color not used full-screen (safety orange full-screen is glaring): covers/section covers use dark ink background + colored keywords; split closing pages with half-screen orange is acceptable.

12 Layouts (Template already includes example pages; copy template and change copy)

Three-layer classification, each layer divided by section dividers (see typography rules §9):

  • ① Basic Skeleton: Cover · Agenda · Page divider · Closing
  • ② Data · Comparison · Charts: Stat grid (large numbers count-up from 0) · Chart (Chart.js bar+line, bars rise sequentially/auto draw line + hover tooltip + line labels show QoQ%) · Comparison matrix (standard × options + 5-block scale, highlight recommended column)
  • ③ Narrative · Flow · Content: Two-column text+image (right column can be image/mockup/chart/terminal) · Three-column cards (3-grid) · Strategy house diagram (SVG OGSM: orange roof mission + topic columns × numbered goal cards + value foundation) · Process/Timeline · Quote
  • Plus Thumbnail wall: live clones all layouts, one-screen preview, auto-follows color scheme.

Verified Layout Components (Use Only These, Don't Invent)

  • Cards: .sub-card(.accent/.ink), .sub-grid-3-2 (six-grid), .triad (3-grid three-column cards)
  • Data: .cnt (count-up numbers), .stat-card, canvas[data-chart="bar|line"] (Chart.js), 5-block scale, .cmp (comparison matrix)
  • Structure: .stack-row/.stack-block, .duo-compare (dual-track comparison + .vrule), .timeline-v/.timeline-h, .house-svg (strategy house diagram)
  • Text: .h-xl-zh (page title), .lead/.body (body), .t-cat/.t-meta (mono footnote), .mk (accent keyword)
  • Layout: .split-half (closing), slide.dark + ghost large number (chapter divider), .code-card (terminal), .chart-card, .dot-mat (dot matrix)
  • The 18-page example is a living sample of these components; directly copy and change copy is fastest.

Interactions / Animations (Template already connected, IIFE before </body> auto-runs)

  • Number count-up: <span class="cnt" data-to="85" data-dec="0">85</span> → scroll to that page, it rolls from 0 to 85 (tnum anti-shake).
  • Charts: <canvas data-chart="bar"> / data-chart="line", auto-initializes on page entry, bars rise sequentially / auto-draw line + hover tooltip; each point on line labels QoQ%. Change data in IIFE's chartConfig.
  • Agenda step-by-step highlighting: .agenda-list[data-agenda-steps] → ←→ highlights one item at a time, next page only after last item.
  • Thumbnail wall: .thumb-wall[data-thumb-wall] → clone all layouts as thumbnails on page entry, auto-follows color scheme.

Color Schemes (3 Sets · Switch during presentation with 1/2/3 or URL ?scheme=)

  • 1 = Black+Orange (default, dark pages remain) · 2 = Bright Blue (pure white background) · 3 = Soft Salmon Pink (warm white background).
  • Blue/pink schemes automatically add .lite to <body> → dark pages (cover/data/section/quote) flip to light background. To add/change a scheme: modify the SCHEMES object in IIFE (override --paper/--ink/--accent etc. CSS variables). Each scheme uses only one accent color.
  • Set default scheme (if user chose blue/pink during clarification): add a line applyScheme('blue') (or 'salmon') at the end of IIFE, this deck opens with that scheme; 1/2/3 can still switch on the fly.

Known Pitfalls (Avoid Stepping On)

  • Screenshot verification trap: Chrome background tabs freeze animation clock, screenshots will capture "animation first frame = blank" — not a bug, works fine in foreground presentation. To verify animations, press B to switch to static mode (window.__setLowPowerMode(true,{persist:false})) then take screenshots page by page.
  • Only use components listed above: Untested CSS layouts (matrix/four-cards/loop, etc.) not included in template will break if used directly.
  • When editing a single file with scripts/regex: anchor unique strings, after editing count the number of sections to self-check (duplicate anchor strings can accidentally delete pages).
  • Color scheme flips to light background (.lite) overrides inline white text: motion animations may normalize inline color:#fff to color: rgb(255, 255, 255), the selector for body.lite .slide.dark must match both #fff and rgb(255, 255, 255) syntax, otherwise white text becomes invisible on light background.

Preview

open project/index.html   # macOS, no server needed; motion auto-degrades to no-animation readable mode when offline

Related Skills