跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。

关于这个模板

互动课程幻灯片是一套在浏览器中直接运行的课程幻灯片,而不是介绍它的落地页。打开后直接进入幻灯片:左侧是课程大纲,中间是 16:9 的黑板绿幻灯片舞台,下方是简洁的控制栏,包含进度、幻灯片编号、绘图工具和复制链接按钮。十二张幻灯片带你走完一节关于排序的示例课程,每种幻灯片类型的行为各不相同。选择题在学员点击的瞬间显示答案和简短解析,得分会在大纲中一路跟随到总结页。拖拽排序题和填空题以其他方式检验记忆。实时代码幻灯片将编辑器和控制台配对,控制台在无网络访问的沙箱 iframe 中运行 JavaScript,因此错误和死循环都被限制在内部。

它适合教师、课程创作者、训练营讲师和工作坊负责人,他们想要一套在教学过程中就能检验理解程度的幻灯片,并且愿意托管一个静态站点。没有后端:答案、编辑过的代码和笔迹都留在学员的浏览器中,每张幻灯片都有自己的 URL,可以粘贴到聊天或教案中。

设计上将温暖的纸色面板与深绿色黑板搭配,辅以一抹马克笔黄色点缀和友好的衬线标题。图表用 SVG 绘制,线条略带粉笔的粗糙感,代码主题也由同一套配色构建。在手机上,大纲变为抽屉,代码面板纵向堆叠。

要改编它,先修改学校、课程标题、课程标签、讲师和受众,然后让你的 agent 重写单个内容文件。幻灯片类型、顺序和布局保持不变,因此统计课或数据工作坊也能保持同样的外观。把讲师头像换成你自己的照片即可。

模板提示词

在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。

# Interactive Lesson Slides

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
Build a real, working lesson deck web app for [BRAND]: the lesson "[LESSON_TITLE]" ([COURSE_LABEL]), taught by [INSTRUCTOR] to [AUDIENCE]. There is no marketing page. The app opens directly on the deck, and the working product is the hero: a collapsible outline sidebar, a 16:9 slide stage, and a slim control bar. Twelve slides use seven slide types that behave differently (title, concept with diagram, multiple-choice quiz, reorder check, fill-in check, live code playground, recap), all driven from one typed content file. Learners get instant quiz feedback and a running score, run real JavaScript in a sandboxed iframe, draw on any slide, and link to any slide with a URL like #/slide/7.

- Audience: Teachers, course creators and workshop leads who want a deck that checks understanding and runs code live, plus the learners who follow along on a laptop or phone.
- Goal: Within seconds of opening, a visitor sees a polished lesson deck, clicks a quiz answer, runs the code slide or draws on a slide, and understands they can teach their own lesson with it by changing the content file.
- Tone: Warm classroom editorial. A good teacher talking: plain, specific, encouraging, a little wry. Short sentences, concrete numbers, no corporate language and no exclamation marks.

## Stack
- Framework: Vite 5 + React 18 + TypeScript
- Styling: Tailwind CSS 3.4
- Libraries: react (MIT), react-dom (MIT), codemirror (MIT), @codemirror/view (MIT), @codemirror/state (MIT), @codemirror/language (MIT), @codemirror/lang-javascript (MIT), @lezer/highlight (MIT), lucide-react (ISC), @fontsource-variable/fraunces (OFL-1.1), @fontsource/atkinson-hyperlegible (OFL-1.1), @fontsource-variable/jetbrains-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - vite.config.ts: base './', build.sourcemap false, @vitejs/plugin-react. Do not change the stack unless the user asks.
  - tailwind.config: add every color in Design as a named theme color (paper, panel, line, ink, muted, board, boardDeep, console, chalk, chalkDim, marker, mint, clay, sky, ledge) and fontFamily display, sans, mono. Keyframes live in src/index.css.
  - Keep all copy in src/content/lesson.ts: variables at the top, then UI labels, the outline groups, and the slides array. If the variable values differ from the defaults, rewrite every slide's teaching content, the starter code, the check answers and the explanations for the new lesson and audience, but keep the 12 slides, their types and their order. The starter code must stay runnable plain JavaScript that logs its results.
  - In lesson.ts define type Slide = TitleSlide | ConceptSlide | QuizSlide | ReorderSlide | FillSlide | CodeSlide | RecapSlide, discriminated by a kind field. Each type has its own component in src/slides/. ConceptSlide has a variant field: 'photo', 'stepper', 'bars' or 'board'. The stepper takes steps: { values: number[]; sortedUpTo: number; active: number | null; shifts: number; caption: string }[], so it can draw any lesson that works on a row of numbers.
  - Routing is hash only: #/slide/N is the single source of truth, read through a hashchange listener. Navigating sets location.hash so browser back and forward work. An empty or out-of-range hash is corrected with location.replace to #/slide/1 or the nearest valid slide.
  - Persist one JSON object in localStorage under a key built from a slug of [BRAND] plus [LESSON_TITLE], with { answers, code, marks, sidebarCollapsed }. Wrap every read and write in try/catch and work normally when storage is unavailable.
  - Stage scaling: at viewport widths of 768px and up, each slide is authored on a fixed 1280x720 canvas and scaled with transform: scale(min(availableWidth/1280, availableHeight/720)), measured with ResizeObserver and centered. Below 768px there is no scaling: use the flow layout described under Mobile layout. Minimum text on the canvas is 20px, so it stays readable when scaled.
  - Code runner: on Run, remove any previous iframe and create a hidden iframe with sandbox="allow-scripts" (never allow-same-origin) and srcdoc. The srcdoc has a meta CSP of default-src 'none'; script-src 'unsafe-inline', a harness script, then the learner's code in its own script tag on a known line, with every </script in the code escaped as <\/script. The harness replaces console.log, info, warn and error with parent.postMessage calls, formats values with JSON.stringify where needed, catches errors through window.onerror (returning true so nothing reaches the page console) and reports the message and the line number minus the harness offset, then posts a done message. The parent accepts messages only when event.source is that iframe's contentWindow. If done has not arrived after 3000 ms, remove the iframe and show the timeout message from the slide 7 section.
  - CodeMirror: use basicSetup from codemirror with javascript() from @codemirror/lang-javascript, plus an original EditorView.theme and a HighlightStyle from @lezer/highlight using only the Design palette: keywords marker, strings mint, numbers clay, comments chalkDim, function names chalk at weight 600, active line background rgba(243,240,227,0.05), selection rgba(245,207,58,0.25), gutter text chalkDim. Add a Mod-Enter keymap for Run. Use a current @codemirror/view release, which handles a scaled parent correctly.
  - Global keyboard handler: ignore key events whose target is an input, textarea or .cm-editor. Ignore Space when the target is a button.

## Variables
- [BRAND] — School or course provider (default: "Tallow Street Code School"). Shows in the outline header, browser title and recap. Also seeds the small square brand mark.
- [LESSON_TITLE] — Lesson title (default: "How Sorting Works"). The lesson the 12 slides teach. Changing it means rewriting all slide content.
- [COURSE_LABEL] — Course and lesson position (default: "Intro to Programming, Unit 4, Lesson 2"). Shows above the title on slide 1 and under the brand in the outline.
- [INSTRUCTOR] — Instructor name (default: "Ines Halloran"). Shows beside the portrait on slide 1, in the outline footer and on the recap.
- [AUDIENCE] — Who the lesson is for (default: "Tuesday evening beginners"). Shows on slide 1 and sets the reading level of the lesson copy.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/interactive-lesson-slides in the footer (default: yes; delete this line to remove it)

The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.

## Design
### Colors
- Paper `#F6F0E2` — App background around the stage
- Panel `#FFFBF1` — Sidebar, control bar, quiz option cards, overlays
- Line `#DDD2BA` — Hairlines and panel borders on paper
- Ink `#25302A` — Text on paper and panels
- Muted `#5E695D` — Secondary text on paper
- Board `#1F4A3C` — Chalk-green slide surface, the main stage color
- Board Deep `#173A2F` — Editor background and inset panels on the board
- Console `#122B23` — Console output pane
- Chalk `#F3F0E3` — Headlines, text and diagram lines on the board
- Chalk Dim `#B9C9B8` — Secondary text on the board, code comments
- Marker `#F5CF3A` — The one accent: current slide, primary buttons, active bar, underline. Text on it is Ink.
- Mint `#8FD3A8` — Correct feedback only, always with a check icon; also code strings
- Clay `#E58E73` — Wrong feedback and errors only, always with an X icon; also code numbers
- Sky `#9CCBE0` — Annotation swatch only, never in the UI
- Ledge `#C8B48F` — 6px chalk-tray strip under the slide

### Typography
- Display: slide headlines, big numbers, lesson name in the outline. Line height 1.02, tracking -0.01em.: Fraunces Variable (OFL), weights 500/600
- Text: UI, body copy, quiz options. Chosen for classroom legibility. Line height 1.45.: Atkinson Hyperlegible (OFL), weights 400/700
- Mono: editor, console, slide numbers, kickers, keyboard keys. Kickers are uppercase with 0.08em tracking.: JetBrains Mono Variable (OFL), weights 400/600

### Layout & motion
- Spacing: 4px base. App: sidebar 280px expanded, 60px rail collapsed; control bar 56px; 24px padding around the stage. On the 1280x720 slide canvas: 64px outer padding, 32px between major blocks, 16px inside groups. Canvas type sizes: headline 56px, title-slide headline 88px, question 38px, body 24px, options 22px, kicker 18px, code 18px.
- Radius: Slide surface 14px on top corners, square at the bottom where it meets the ledge. Cards, inputs and option rows 10px. Buttons 8px. Chips and the annotation toolbar are full pills. Photos on slides 6px with a 10px Panel border.
- Motion: Slide change: 180ms ease-out fade with a 12px horizontal shift in the direction of travel. Nothing else moves on the shell.
- Motion: Progress bar width eases over 240ms. The outline's current-slide bar snaps with no animation.
- Motion: Quiz feedback: the chosen option gets one 320ms outward ring pulse in Mint or Clay, and the explanation fades in over 160ms.
- Motion: Title underline: the Marker SVG stroke draws once over 600ms using stroke-dashoffset. Stepper bars move with a 220ms transform transition. Bars on slide 9 grow once over 400ms.
- Motion: Under prefers-reduced-motion: reduce, remove all of the above, including stepper autoplay. State changes apply instantly.
- Imagery: One shoot: warm documentary photographs in a classroom with low window light, oak, cloth-bound books and a green chalkboard, used on slides 1, 2 and 12 and for the instructor portrait. Photos sit on the board as printed pictures with a 10px Panel border, slight rotation and two semi-transparent paper tape strips drawn in CSS. All diagrams are original inline SVG with a rough chalk line (a feTurbulence plus feDisplacementMap filter at scale 2 on Chalk strokes). The board surface has a faint chalk smudge: two large radial gradients of Chalk at 4% plus an inline SVG feTurbulence noise at 5% opacity. No character illustrations.

## Pages & Sections
### [LESSON_TITLE] | [BRAND] (`index.html`)
1. **App shell** — Single-page app with hash routes #/slide/1 to #/slide/12. It always opens on the deck view with no splash, loader or landing section. If the hash is empty, slide 1 shows. Browser title is [LESSON_TITLE] | [BRAND]. The favicon is an inline SVG: a Board square with a Marker underline.
   Layout: Full viewport with no page scroll (height 100dvh). CSS grid with two columns: sidebar on the left, main column on the right. The main column has two rows: stage area (1fr, Paper background, 24px padding, slide centered) and control bar (56px). The slide sits on a 6px Ledge strip that is exactly slide width, like a chalk tray, with a soft shadow beneath (0 18px 40px rgba(37,48,42,0.18)).
   Motion: See Design. The sidebar width animates over 180ms when collapsing.
2. **Outline sidebar** — Header: 32px square brand mark (Board background, first letter of [BRAND] in Fraunces Chalk, a 3px Marker underline), then [BRAND] in 15px bold, then [COURSE_LABEL] in 13px Muted, then [LESSON_TITLE] in Fraunces 24px. Score row: the label 'Checks' and a pill reading '0/5' that counts correct checks, with a 5-segment bar under it where each segment is empty, Mint or Clay. Outline groups, with mono uppercase labels: Warm up (1 How Sorting Works, 2 Why order matters, 3 Check: doubling the shelf); The idea (4 Insertion sort, step by step, 5 Check: put the steps in order, 6 Check: how many shifts?); Hands on (7 Live code: sort the shelf, 8 Check: the easy case); Going further (9 Best and worst shelves, 10 Check: the hardest shelf, 11 Mark it up); Wrap up (12 Recap). Footer: 36px round instructor portrait, [INSTRUCTOR], the line 'Press ? for shortcuts' as a button, and a collapse button using the lucide PanelLeftClose icon. If the Credit section supplies a [CREDIT] link, place it in 12px Muted at the very bottom of this footer.
   Layout: 280px wide, Panel background, 1px Line right border, flex column, with the outline list scrolling on its own. Each row is 40px: mono number, 15px title truncated with an ellipsis, right-aligned state icon. Row icons by type at 16px in Muted before the title: Presentation for title, Shapes for concept, CircleHelp for checks, Code for code, Flag for recap. State icon: nothing when untouched, a Mint Check when correct, a Clay X when wrong, a Play icon after the code slide has been run, and a small Pen icon in Muted when that slide has marks. The current row has a Paper background and a 3px Marker bar on its left edge. Collapsed state is a 60px rail showing only slide numbers with state dots, plus the expand button. The collapsed state persists in localStorage.
   Motion: Width transition 180ms. Rows have a Paper hover background at 120ms.
3. **Control bar** — From left to right: Previous and Next buttons (ChevronLeft, ChevronRight); a progress bar; the slide number in mono as '7 / 12'; Draw (Pencil icon, label 'Draw'); Copy link (Link2 icon, label 'Copy link'); Shortcuts (Keyboard icon); Present (Maximize icon), which hides the sidebar and calls requestFullscreen inside try/catch, with Esc restoring. Copy link copies location.href with the Clipboard API and falls back to a hidden textarea and execCommand. For 1.6 seconds the label reads 'Link to slide 7 copied' with a Check icon and is announced through an aria-live region.
   Layout: 56px tall, Panel background, 1px Line top border, 16px side padding, single row with 12px gaps. The progress bar fills the free space: 6px tall, Line track, Marker fill, with 12 tick divisions, and clicking a position jumps to that slide. Previous is disabled on slide 1 and Next on slide 12. An active Draw button uses a Marker background with Ink text. Buttons are 36px tall with 8px radius, and show a 2px Ink focus ring.
   Motion: Progress fill 240ms. The confirmation label swaps without movement.
4. **Annotation layer and toolbar** — Draw mode works on every slide. Tools in order: Pen (4 canvas px, full opacity), Highlighter (22 canvas px, alpha 0.4, square caps), Eraser (removes any whole stroke the pointer touches), four swatches (Marker #F5CF3A, Chalk #F3F0E3, Clay #E58E73, Sky #9CCBE0), Undo (Undo2), Clear slide (Trash2), and Done (X). Marks are stored per slide as strokes with coordinates normalized from 0 to 1 against the slide surface, saved on pointerup, and restored when returning to the slide or reloading. Undo keeps up to 30 snapshots per slide. Slide 11 starts with instructor marks from its content entry, which can be erased like any other stroke.
   Layout: A canvas absolutely positioned over the slide surface, sized for devicePixelRatio and redrawn from strokes on any resize. It has pointer-events none outside draw mode so slide controls stay usable with marks visible. In draw mode it has pointer-events auto, touch-action none and a crosshair cursor, and slide controls are inert. Use Pointer Events with setPointerCapture and getCoalescedEvents, and smooth with quadratic curves through midpoints. The toolbar is a floating Panel pill with a 1px Line border and soft shadow, centered 16px above the bottom of the stage area, with 36px buttons. The active tool has a Marker background and the active swatch a 2px Ink ring.
   Motion: Toolbar fades in over 120ms.
5. **Keyboard shortcuts overlay** — Title: 'Keyboard shortcuts'. Rows: Left / Right or Page Up / Page Down: previous and next slide. Space: next slide. Home / End: first and last slide. O: toggle outline. D: toggle draw. P, H, E: pen, highlighter, eraser. Z or Cmd/Ctrl+Z: undo mark. 1 to 4: choose a quiz answer. C: copy link. F: present. ?: this list. Esc: close.
   Layout: Modal 640px wide, Panel background, 14px radius, over a scrim of rgba(37,48,42,0.45). Two-column grid of rows, with keys rendered as mono chips (Paper background, 1px Line border, 6px radius). Close button top right. Focus moves into the modal and returns on close.
   Motion: Fade over 120ms.
6. **Mobile layout (under 768px)** — A 52px top bar replaces the sidebar: menu button (Menu icon), [LESSON_TITLE] truncated, and the score pill. The menu button opens the outline as a 304px left drawer over a scrim, closing on scrim tap, Esc or choosing a slide. The bottom control bar keeps Previous, Next, the slide number, Draw and Copy link, with the progress bar as a 3px strip along its top edge; Present and Shortcuts are hidden. Touch targets are at least 44px.
   Layout: No scaled canvas. The Board surface fills the space between the bars edge to edge and scrolls vertically inside itself, with no page scroll and no horizontal overflow at 390px. Each slide becomes a single column with 20px padding: headline 32px, question 26px, body 17px, options 17px, code 14px. Photos go full width and unrotated. The stepper SVG scales to width, with controls wrapping beneath it. The code slide stacks the editor (height 300px) above the console (min-height 180px). The annotation canvas covers the full scrollable slide height and locks scrolling while in draw mode, and the toolbar wraps to two rows above the control bar.
   Motion: Drawer slides in over 180ms; instant under reduced motion.
7. **Slide 1: Title (#/slide/1)** — Kicker in mono: [COURSE_LABEL]. Headline: [LESSON_TITLE], with a hand-drawn Marker SVG underline beneath the last word. Subhead: 'Put eight books in order by hand, then teach a computer to do it.' Instructor row: 56px round portrait, [INSTRUCTOR], then '[AUDIENCE] · Room 3 · 45 minutes'. Primary button: 'Start the lesson' with ArrowRight, going to #/slide/2. Secondary text button: 'Jump to live code', going to #/slide/7. Right side: the desk photo, and a Panel chip overlapping its lower-left corner that reads '12 slides · 5 checks · 1 live code'. Along the bottom of the slide, eight chalk SVG bars of heights 5, 2, 8, 3, 7, 1, 6, 4.
   Layout: Canvas split: left column 660px holds kicker, headline at 88px, subhead at 26px, instructor row and buttons, vertically centered. Right column is the 500x375 photo rotated -1.5deg with a Panel border and two tape strips, sitting in the upper right. The chalk bars run along the bottom right under the photo, 460px wide and 110px tall, with the third bar filled Marker. This must read as a rich first screen, never type on a flat background.
   Motion: Underline draws once on first view. Standard slide transition.
8. **Slide 2: Why order matters, concept with photo (#/slide/2)** — Kicker: 'Warm up'. Headline: 'A messy shelf makes every search slow.' Body: 'Looking for one title on an unsorted shelf means checking book after book. Sort the shelf and you can open in the middle, see which half to keep, and ignore the rest.' Two big stats: '1,000' with the label 'looks at most on 1,000 unsorted books' and '10' in Marker with the label 'looks at most once they are sorted'. Footnote: 'Halve 1,000 ten times and you are down to one book.'
   Layout: Left 56%: kicker, headline, body, then the two stats side by side in Fraunces 84px, separated by a 1px Chalk line at 30% opacity. Right 44%: the shelf photo at 4:3, rotated 1deg, with a Panel border and tape strips.
   Motion: Standard slide transition only.
9. **Quiz behavior (slides 3, 6 and 10)** — Clicking an option or pressing 1 to 4 answers immediately and locks all options. The chosen option shows Mint with a Check or Clay with an X. If the choice was wrong, the correct option also gets a Mint outline. An explanation panel appears with a one-line verdict and the explanation, a 'Try again' button that unlocks the options and clears the result, and a 'Next slide' primary button. The sidebar score and segment bar update at once. Each answer record stores the selection, whether it is correct, and the attempt count.
   Layout: Left 5/12 of the canvas: mono kicker 'Check 1 of 5' and the question in Fraunces 38px. Right 7/12: a vertical stack of four 72px Panel rows with Ink text. Each has a mono letter A to D in a 36px circle with a 1px Line border, then the option text. Hover and focus give a 2px Marker border. All option rows look identical until answered: no colored tiles and no shapes. The explanation sits below the options as a Board Deep inset with Chalk text and 10px radius.
   Motion: One 320ms ring pulse on the chosen option. Explanation fades in over 160ms.
10. **Slide 3: Check, doubling the shelf (#/slide/3)** — Kicker 'Check 1 of 5'. Question: 'A sorted shelf grows from 1,000 books to 2,000. Using the halving method, how many extra looks do you need at most?' A: 'About 1 more' (correct). B: 'About 10 more'. C: 'About 1,000 more'. D: 'Twice as many'. Correct verdict: 'Right.' Wrong verdict: 'Not quite.' Explanation for both: 'One look halves the shelf, so 2,000 books are back to 1,000 after a single look. From there nothing changes.'
   Layout: Uses the quiz layout.
   Motion: Uses the quiz motion.
11. **Slide 4: Insertion sort stepper, concept with diagram (#/slide/4)** — Headline: 'Take the next book and slide it into place.' A stepper with 8 steps over the shelf. Captions and running shifts: (1) values 5 2 8 3 7 1 6 4, 'The first book alone is a sorted shelf of one.', 0 shifts. (2) values 2 5 8 3 7 1 6 4, 'Pick up 2. The 5 is larger, so it moves right.', 1. (3) values 2 5 8 3 7 1 6 4, 'Pick up 8. Nothing is larger, so it stays.', 1. (4) values 2 3 5 8 7 1 6 4, 'Pick up 3. The 5 and 8 move right.', 3. (5) values 2 3 5 7 8 1 6 4, 'Pick up 7. Only the 8 moves.', 4. (6) values 1 2 3 5 7 8 6 4, 'Pick up 1. Everything moves. Five shifts for one book.', 9. (7) values 1 2 3 5 6 7 8 4, 'Pick up 6. The 7 and 8 move.', 11. (8) values 1 2 3 4 5 6 7 8, 'Pick up 4. Four books move, and the shelf is sorted.', 15. Controls: Back, Next, Play / Pause (1200ms per step, disabled under reduced motion), step dots, and a counter 'Shifts so far: 15' in mono.
   Layout: Headline at the top, 44px. Below it, an SVG diagram 1152px wide and 340px tall with 8 bars on a chalk baseline. Bar width 96px, height proportional to the value, number in mono above each bar. Sorted bars are filled Chalk at 85% with Ink numbers, the active bar is filled Marker, and unsorted bars are rough Chalk outlines with no fill. Below the diagram, a row: caption at 24px on the left and controls plus the counter on the right. The stepper has its own buttons and does not capture the arrow keys, which always change slides.
   Motion: Each bar is keyed by its value and moves to its new position with a 220ms transform. Autoplay stops at the last step.
12. **Slide 5: Reorder check (#/slide/5)** — Kicker 'Check 2 of 5'. Question: 'Put the steps of insertion sort in order.' Rows in their starting order: 'Compare it with the sorted books, moving right to left'; 'Drop the book into the gap and repeat'; 'Treat the first book as a sorted shelf of one'; 'Shift each larger book one place right'; 'Pick up the next unsorted book'. Correct order: Treat the first book; Pick up the next; Compare it; Shift each larger; Drop the book. Button: 'Check order'. Feedback marks each row with a Mint Check or Clay X by position. Correct verdict: 'That is the whole algorithm.' Wrong verdict: 'Close. The marked rows are out of place.' Explanation: 'You cannot shift books until you have compared them, and the drop always comes last.' 'Try again' keeps the current order and clears the marks.
   Layout: Left 4/12: kicker and question. Right 8/12: a stack of five 64px Panel rows, each with a GripVertical handle, a position number in mono, the step text, and up and down arrow buttons for keyboard and touch users. Drag with Pointer Events on the handle (touch-action none on the handle only). The dragged row lifts with a shadow and a 2px Marker border, and other rows make room.
   Motion: Rows shift with a 160ms transform; instant under reduced motion. One 320ms pulse on Check.
13. **Slide 6: Check, how many shifts (#/slide/6)** — Kicker 'Check 3 of 5'. Question: 'The sorted part is 2 3 5 8. The next book is 4. How many books shift right?' Include a small chalk SVG of the four sorted bars and a Marker bar labeled 4 under the question. A: '1'. B: '2' (correct). C: '3'. D: '4'. Explanation: 'Only books larger than 4 move: the 5 and the 8. The 2 and 3 stay put.'
   Layout: Uses the quiz layout, with the 360x120 SVG under the question in the left column.
   Motion: Uses the quiz motion.
14. **Slide 7: Live code playground (#/slide/7)** — Headline: 'Now teach the computer.' Task line: 'Press Run to watch each pass. Then change one character so the shelf sorts largest first.' Editor file label: 'sandbox.js'. Starter code, exactly:

// Sort the shelf, smallest book first.
function insertionSort(books) {
  for (let i = 1; i < books.length; i++) {
    const current = books[i];
    let gap = i;
    while (gap > 0 && books[gap - 1] > current) {
      books[gap] = books[gap - 1]; // shift right
      gap--;
    }
    books[gap] = current; // drop into the gap
    console.log("pass " + i + ":", books.join(" "));
  }
  return books;
}

const shelf = [5, 2, 8, 3, 7, 1, 6, 4];
console.log("start: ", shelf.join(" "));
console.log("sorted:", insertionSort(shelf).join(" "));

Buttons: 'Run' (Play icon, Marker background, shows a Cmd/Ctrl+Enter hint) and 'Reset' (RotateCcw icon, ghost button; restores the starter code and clears the console). Console header: 'Console' with a status at right: 'Not run yet', 'Ran in 3 ms' or 'Error on line 6'. Empty console text: 'Press Run to see each pass.' Log lines render in Chalk mono. Errors render in Clay with an X icon, showing the message and line number. Timeout message: 'Stopped after 3 seconds. Look for a loop that never ends.' Edits persist in localStorage. Running the slide adds the Play state icon in the outline.
   Layout: Top 96px: headline at 40px and the task line at 22px. Below it, two panes filling the remaining canvas with a 16px gap. Left 60%: Board Deep editor with a 44px toolbar (file label on the left, Run and Reset on the right), CodeMirror at 18px JetBrains Mono, scrolling internally. Right 40%: Console background pane with a 44px header and scrolling log at 18px. Both have 10px radius and a 1px Chalk border at 15% opacity. Clicking in the editor must place the caret correctly while the canvas is scaled.
   Motion: Status text swaps instantly. New console lines appear without animation.
15. **Slide 8: Fill-in check (#/slide/8)** — Kicker 'Check 4 of 5'. Sentence with two inputs: 'On a shelf that is already sorted, insertion sort compares each book once with its neighbor, so 8 books take [ ] comparisons and [ ] shifts.' Answers: 7 (also accepts 'seven') and 0 (also accepts 'zero' or 'none'), trimmed and case-insensitive. Button: 'Check answers', also triggered by Enter. Each input shows a Mint Check or Clay X. Correct verdict: 'Exactly. The best case does almost no work.' Wrong verdict: 'Not yet. Trace the first two books by hand.' Explanation: 'Every book after the first gets one comparison, finds a smaller neighbor, and stays put.' 'Try again' clears only the wrong inputs.
   Layout: Centered column 960px wide. Kicker, then the sentence in Fraunces 38px with line height 1.4, with inline 96px inputs in mono, transparent background, Marker 3px bottom border, Chalk text and a centered value. Below: the button and then the explanation inset as in the quiz layout.
   Motion: One 320ms pulse on each input after Check. Explanation fades in over 160ms.
16. **Slide 9: Best and worst shelves, concept with bars (#/slide/9)** — Kicker: 'Going further'. Headline: 'Same eight books, very different work.' Horizontal bars with labels and values: 'Already sorted' 0 shifts; 'Our shelf from earlier' 15 shifts; 'Exactly reversed' 28 shifts. Side callout: '499,500' in Fraunces 72px Marker, with the label 'shifts to sort 1,000 reversed books'. Closing line: 'That is why insertion sort is great for short or nearly sorted lists, and why long lists need something faster. That is next lesson.'
   Layout: Left 66%: kicker, headline, then three rows of SVG bars. Label 22px above each bar, a 40px tall bar with a rough Chalk outline, filled Chalk at 85%, width proportional to 28, value in mono at the end. A zero value renders as a 4px tick. Right 34%: Board Deep inset with the callout and closing line.
   Motion: Bars grow from zero once over 400ms the first time the slide is shown.
17. **Slide 10: Check, the hardest shelf (#/slide/10)** — Kicker 'Check 5 of 5'. Question: 'Which shelf makes insertion sort do the most shifts?' Options in mono: A: '1 2 3 4 5 6'. B: '2 1 4 3 6 5'. C: '6 5 4 3 2 1' (correct). D: '1 2 3 6 5 4'. Explanation: 'In reversed order every book has to pass all the books before it. That is 15 shifts for six books.'
   Layout: Uses the quiz layout, with option text in JetBrains Mono.
   Motion: Uses the quiz motion.
18. **Slide 11: Mark it up, board slide (#/slide/11)** — Kicker: 'Your turn at the board'. Headline: 'Circle every book that has to shift.' Body: 'The sorted part is 2 4 7 9. The next book is 5. I have marked where it lands. Press D and finish the job.' Signed '[INSTRUCTOR]'. Diagram: five bars for 2, 4, 7, 9 and 5, with the 5 in Marker. Seeded marks in the content entry, in Marker with the Pen tool: a loose hand-drawn ellipse around the 5 bar and a curved arrow from it to the gap between the 4 and the 7. A 'Start drawing' button (Pencil icon) turns on draw mode and selects the Pen.
   Layout: Left 34%: kicker, headline at 48px, body and button. Right 66%: a large open area of bare board holding the SVG bars on a chalk baseline with plenty of room for marks. Bars are 110px wide.
   Motion: Standard slide transition only. Seeded marks appear without animation.
19. **Slide 12: Recap (#/slide/12)** — Headline: 'What you can do now'. Score block: live score such as '4 / 5' in Fraunces 96px, the line '3 on the first try', and five chips labeled Check 1 to Check 5, each showing untouched, correct or wrong state and linking to that slide. With nothing answered it reads '0 / 5' and 'Five checks are waiting for you.' Buttons: 'Retry what I missed' (goes to the first wrong or untouched check; hidden at 5 of 5) and a 'Reset my progress' text button that clears answers, code and marks after an inline confirm. Takeaways: 'Insertion sort grows a sorted part one book at a time.' 'The starting order sets the work: 0 shifts when sorted, 28 when reversed, for eight books.' 'Sorted data is what makes fast search possible.' Homework card: photo of hands arranging cards, then 'Before Tuesday: sort ten cards by this method, then again from reversed order. Count the shifts and bring both numbers.' Next: 'Next up: Lesson 3, merge sort. Tuesday at 6:30 pm.' Office hours with the small portrait: '[INSTRUCTOR], Thursdays 5:30 to 6:15 pm, Room 3, 14 Tallow Street, [BRAND].'
   Layout: Three columns with 32px gaps and the headline above. Left 30%: score block and buttons. Middle 34%: takeaways as a numbered list with mono numerals and 1px Chalk dividers at 20% opacity. Right 36%: a Panel card with Ink text, the 16:9 crop of the photo on top, then homework, next lesson and office hours.
   Motion: Standard slide transition only. The score does not count up.

## Assets
- image: Download https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/lesson-desk.webp to public/images/lesson-desk.webp. Alt: 'Stack of plain cloth-bound books and chalk on an oak classroom desk in front of a green chalkboard'. Used on slide 1. Generated by VibeFather with qwen-image-3.0-pro, redistributable with this template.
- image: Download https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/instructor.webp to public/images/instructor.webp. Alt: 'The lesson instructor at a green chalkboard, seen from behind'. Used on slide 1, the outline footer and slide 12. A fictional person and a placeholder for the user's own photo. Generated by VibeFather with qwen-image-3.0-pro, redistributable with this template.
- image: Download https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/uneven-shelf.webp to public/images/uneven-shelf.webp. Alt: 'Wooden shelf of plain books in uneven heights and no particular order'. Used on slide 2. Generated by VibeFather with qwen-image-3.0-pro, redistributable with this template.
- image: Download https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/arranging-cards.webp to public/images/arranging-cards.webp. Alt: 'Hands arranging blank index cards in a row on an oak desk'. Used on the slide 12 homework card. Generated by VibeFather with qwen-image-3.0-pro, redistributable with this template.
- image: Drawn in code as original inline SVG or CSS: all bars and diagrams, the title underline, tape strips, chalk texture, the brand mark and the favicon. No image files.
- icon: lucide-react (ISC), installed from npm: PanelLeftClose, PanelLeftOpen, Presentation, Shapes, CircleHelp, Code, Flag, Check, X, Play, Pause, Pen, Pencil, Highlighter, Eraser, Undo2, Trash2, Link2, Keyboard, Maximize, ChevronLeft, ChevronRight, ArrowRight, RotateCcw, GripVertical, ChevronUp, ChevronDown, Menu.
- font: Self-host through Fontsource npm packages, imported in src/main.tsx: @fontsource-variable/fraunces, @fontsource/atkinson-hyperlegible (400, 700), @fontsource-variable/jetbrains-mono. All OFL-1.1.
- image: Create ASSETS.md at the project root listing every third-party file: path, source URL, author and license. The four photos above are credited as 'Generated by VibeFather with qwen-image-3.0-pro, redistributable with this template'. Also list the fonts (OFL-1.1) and lucide-react (ISC).

## Don'ts
- No backend: no server code, API routes, databases, auth, third-party APIs or forms that submit anywhere. Quiz answers, code and annotations stay in localStorage.
- No CDN script or link tags, no analytics, no network requests at runtime. Download all images into the project and never hotlink.
- Self-host every font through Fontsource. Never load from fonts.googleapis.com, fonts.gstatic.com, Adobe Fonts or any other CDN. No commercial classroom or handwriting fonts.
- Build static files to dist/ with one command, using relative asset paths (base './'). No source maps and no src/ in dist/. Keep dist/ under 20 MB.
- Internal navigation uses hash routes on ./index.html, never a bare directory path.
- No console errors at 1440x900 or 390x844. Learner code errors must be caught and shown in the slide console, never leaked to the page console.
- The code iframe must never have allow-same-origin, network access or access to the parent page.
- Respect prefers-reduced-motion: no transitions, pulses, draw-in effects or stepper autoplay.
- Do not add a landing page, marketing hero, pricing section, sign-up or splash screen. The app opens on the deck.
- No logos, product names, default themes or starter deck layouts of any existing presentation tool, slide framework or quiz platform.
- No game-show quiz look: no answer-shape and color pairings, colored answer tiles, lobby or podium screens, countdown timers, leaderboards, mascots or sound effects. All options look the same until answered.
- No copy, lesson text, diagrams or exercises from real textbooks, online courses, school curricula or published lectures. All lesson content is invented.
- No real schools, school crests, exam board marks or real teachers. The instructor and school are invented.
- No editor themes, icons or branding that identify a specific code editor or online playground. Use the original syntax theme from this prompt.
- No mascots, character illustrations or signature drawings from learning apps. Diagrams are drawn in SVG or CSS for this template.
- No lorem ipsum. Do not add accent colors beyond Marker: Mint and Clay are for feedback only, and Sky is for annotation only.
- No SEO work: a plain title with [BRAND] and a favicon are enough. No mention of VibeFather in the site except the optional [CREDIT] link. All copy is in US English.

---
— Prompt by VibeFather · https://vibefather.ai/t/interactive-lesson-slides · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 交互式课程幻灯片

完全按照以下描述构建此网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。

## 简介
为 [BRAND] 构建一个真实、可用的课程幻灯片 Web 应用:课程“[LESSON_TITLE]”([COURSE_LABEL]),由 [INSTRUCTOR] 教授给 [AUDIENCE]。没有营销页面。应用直接打开幻灯片,可用的产品就是主角:可折叠的大纲侧边栏、16:9 的幻灯片舞台和一条纤细的控制栏。十二张幻灯片使用七种行为不同的幻灯片类型(标题、带图的概念、多项选择测验、排序检查、填空检查、实时代码游乐场、回顾),全部由一个带类型的内容文件驱动。学习者获得即时测验反馈和累计得分,在沙箱 iframe 中运行真实 JavaScript,可在任意幻灯片上绘图,并可通过类似 #/slide/7 的 URL 链接到任意幻灯片。

- 受众:希望幻灯片能检查理解并实时运行代码的教师、课程创作者和研讨会负责人,以及在笔记本电脑或手机上跟随学习的学员。
- 目标:打开后几秒内,访问者看到一套精致的课程幻灯片,点击测验答案、运行代码幻灯片或在幻灯片上绘图,并理解他们可以通过更改内容文件用它来教授自己的课程。
- 语气:温暖的课堂编辑风格。像一位好老师在说话:平实、具体、鼓励、略带揶揄。短句、具体数字,不用企业语言,不用感叹号。

## 技术栈
- 框架:Vite 5 + React 18 + TypeScript
- 样式:Tailwind CSS 3.4
- 库:react(MIT)、react-dom(MIT)、codemirror(MIT)、@codemirror/view(MIT)、@codemirror/state(MIT)、@codemirror/language(MIT)、@codemirror/lang-javascript(MIT)、@lezer/highlight(MIT)、lucide-react(ISC)、@fontsource-variable/fraunces(OFL-1.1)、@fontsource/atkinson-hyperlegible(OFL-1.1)、@fontsource-variable/jetbrains-mono(OFL-1.1)
- 构建:`npm run build` → 静态文件输出到 `dist/`。无后端、无服务端代码、无外部 API。
- 配置:
  - vite.config.ts:base 设为 './',build.sourcemap 设为 false,使用 @vitejs/plugin-react。除非用户要求,否则不要更改技术栈。
  - tailwind.config:将设计中每个颜色添加为具名主题颜色(paper、panel、line、ink、muted、board、boardDeep、console、chalk、chalkDim、marker、mint、clay、sky、ledge),并添加 fontFamily 的 display、sans、mono。关键帧(keyframes)放在 src/index.css 中。
  - 将所有文案保留在 src/content/lesson.ts 中:顶部是变量,然后是 UI 标签、大纲分组和 slides 数组。如果变量值与默认值不同,则为新的课程和受众重写每一张幻灯片的讲解内容、起始代码、检查答案和解释,但保留 12 张幻灯片、它们的类型和顺序。起始代码必须保持为可运行的纯 JavaScript,并输出其结果。
  - 在 lesson.ts 中定义 type Slide = TitleSlide | ConceptSlide | QuizSlide | ReorderSlide | FillSlide | CodeSlide | RecapSlide,通过 kind 字段进行区分。每种类型在 src/slides/ 中都有自己的组件。ConceptSlide 有一个 variant 字段:'photo'、'stepper'、'bars' 或 'board'。stepper 接受 steps: { values: number[]; sortedUpTo: number; active: number | null; shifts: number; caption: string }[],因此它可以绘制任何基于一行数字的课程。
  - 路由仅使用 hash:#/slide/N 是唯一事实来源,通过 hashchange 监听器读取。导航时设置 location.hash,以便浏览器前进和后退正常工作。空或超出范围的 hash 通过 location.replace 修正为 #/slide/1 或最近的有效幻灯片。
  - 在 localStorage 中持久化一个 JSON 对象,键由 [BRAND] 加上 [LESSON_TITLE] 的 slug 构建,值为 { answers, code, marks, sidebarCollapsed }。将每次读写都包裹在 try/catch 中,并在存储不可用时正常工作。
  - 舞台缩放:在视口宽度为 768px 及以上时,每张幻灯片在固定的 1280x720 画布上编写,并使用 transform: scale(min(availableWidth/1280, availableHeight/720)) 进行缩放,通过 ResizeObserver 测量并居中。低于 768px 时不缩放:使用移动端布局下描述的流式布局。画布上的最小文字为 20px,因此缩放后仍保持可读。
  - 代码运行器:点击 Run 时,移除之前的 iframe,并创建一个隐藏的 iframe,设置 sandbox="allow-scripts"(绝不允许 allow-same-origin)和 srcdoc。srcdoc 包含 meta CSP default-src 'none'; script-src 'unsafe-inline'、一个 harness 脚本,然后学习者的代码放在其自己的 script 标签中,位于已知行,代码中的每个 </script 都转义为 <\/script。harness 将 console.log、info、warn 和 error 替换为 parent.postMessage 调用,在需要时使用 JSON.stringify 格式化值,通过 window.onerror 捕获错误(返回 true,使任何内容都不会到达页面控制台)并报告消息和减去 harness 偏移量的行号,然后发送 done 消息。父页面仅在 event.source 是该 iframe 的 contentWindow 时接受消息。如果 3000 ms 后 done 尚未到达,则移除 iframe 并显示第 7 张幻灯片部分中的超时消息。
  - CodeMirror:使用 codemirror 的 basicSetup 和 @codemirror/lang-javascript 的 javascript(),外加一个原创的 EditorView.theme 和来自 @lezer/highlight 的 HighlightStyle,仅使用设计调色板:关键字 marker,字符串 mint,数字 clay,注释 chalkDim,函数名 chalk 字重 600,活动行背景 rgba(243,240,227,0.05),选区 rgba(245,207,58,0.25),装订线文本 chalkDim。添加 Mod-Enter 键位映射用于 Run。使用当前的 @codemirror/view 版本,它能正确处理缩放后的父元素。
  - 全局键盘处理器:忽略目标为 input、textarea 或 .cm-editor 的按键事件。当目标是 button 时忽略 Space。

## 变量
- [BRAND] — 学校或课程提供方(默认:"Tallow Street Code School")。显示在大纲页眉、浏览器标题和回顾页中。同时用于生成小方形品牌标记。
- [LESSON_TITLE] — 课程标题(默认:"How Sorting Works")。即 12 张幻灯片所讲授的课程。更改它意味着重写所有幻灯片内容。
- [COURSE_LABEL] — 课程与课节位置(默认:"Intro to Programming, Unit 4, Lesson 2")。显示在第 1 张幻灯片标题上方,以及大纲中品牌名称下方。
- [INSTRUCTOR] — 讲师姓名(默认:"Ines Halloran")。显示在第 1 张幻灯片肖像旁、大纲页脚和回顾页中。
- [AUDIENCE] — 课程面向的人群(默认:"Tuesday evening beginners")。显示在第 1 张幻灯片上,并决定课程文案的阅读难度。
- [CREDIT] — 在页脚保留一个小型 "Template by VibeFather" 链接,指向 https://vibefather.ai/t/interactive-lesson-slides(默认:是;删除此行即可移除)

Pages & Sections 下的文案是按默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便日后无需改动组件即可替换内容。

## 设计
### 颜色
- Paper `#F6F0E2` — 舞台周围的应用背景
- Panel `#FFFBF1` — 侧边栏、控制栏、测验选项卡片、浮层
- Line `#DDD2BA` — 纸面上的细线和面板边框
- Ink `#25302A` — 纸面和面板上的文字
- Muted `#5E695D` — 纸面上的次要文字
- Board `#1F4A3C` — 黑板绿幻灯片表面,主舞台颜色
- Board Deep `#173A2F` — 编辑器背景和黑板上的内嵌面板
- Console `#122B23` — 控制台输出窗格
- Chalk `#F3F0E3` — 黑板上的标题、文字和图表线条
- Chalk Dim `#B9C9B8` — 黑板上的次要文字、代码注释
- Marker `#F5CF3A` — 唯一强调色:当前幻灯片、主按钮、活动条、下划线。其上的文字为 Ink。
- Mint `#8FD3A8` — 仅用于正确反馈,始终搭配对勾图标;也用于代码字符串
- Clay `#E58E73` — 仅用于错误反馈和错误提示,始终搭配 X 图标;也用于代码数字
- Sky `#9CCBE0` — 仅用于标注色板,绝不用于 UI
- Ledge `#C8B48F` — 幻灯片下方 6px 的粉笔槽条带

### 字体排印
- Display:幻灯片标题、大数字、大纲中的课程名称。行高 1.02,字距 -0.01em。:Fraunces Variable(OFL),字重 500/600
- Text:UI、正文、测验选项。为课堂可读性而选择。行高 1.45。:Atkinson Hyperlegible(OFL),字重 400/700
- Mono:编辑器、控制台、幻灯片编号、kicker、键盘按键。Kicker 为大写,字距 0.08em。:JetBrains Mono Variable(OFL),字重 400/600

### 布局与动效
- 间距:4px 基准。应用:侧边栏展开 280px,收起为 60px 轨道;控制栏 56px;舞台周围 24px 内边距。在 1280x720 幻灯片画布上:外内边距 64px,主要区块之间 32px,组内 16px。画布字号:标题 56px,标题幻灯片标题 88px,问题 38px,正文 24px,选项 22px,kicker 18px,代码 18px。
- 圆角:幻灯片表面顶部两角 14px,底部与粉笔槽相接处为直角。卡片、输入框和选项行 10px。按钮 8px。标签和标注工具栏为完整胶囊形。幻灯片上的照片 6px,带 10px Panel 边框。
- 动效:幻灯片切换:180ms ease-out 淡入,并沿切换方向水平位移 12px。外壳上其他元素不动。
- 动效:进度条宽度以 240ms 缓动。大纲中当前幻灯片条无动画直接跳变。
- 动效:测验反馈:所选选项获得一次 320ms 向外的圆环脉冲,颜色为 Mint 或 Clay,解释在 160ms 内淡入。
- 动效:标题下划线:Marker SVG 描边使用 stroke-dashoffset 在 600ms 内绘制一次。步骤条以 220ms transform 过渡移动。第 9 张幻灯片上的条在 400ms 内增长一次。
- 动效:在 prefers-reduced-motion: reduce 下,移除以上所有动效,包括步骤条自动播放。状态变化立即生效。
- 图像:一次拍摄:温暖纪实风格照片,教室中低角度窗光、橡木、布面书籍和绿色黑板,用于第 1、2 和 12 张幻灯片以及讲师肖像。照片以印刷图片形式置于黑板上,带 10px Panel 边框、轻微旋转,以及两条用 CSS 绘制的半透明纸胶带。所有图表均为原创内联 SVG,带有粗糙粉笔线条(在 Chalk 描边上使用 scale 2 的 feTurbulence 加 feDisplacementMap 滤镜)。黑板表面有淡淡的粉笔污迹:两个 4% 的 Chalk 大径向渐变,加上一个 5% 不透明度的内联 SVG feTurbulence 噪点。无角色插画。

## 页面与区块
### [LESSON_TITLE] | [BRAND] (`index.html`)
1. **应用外壳** — 单页应用,哈希路由为 #/slide/1 到 #/slide/12。始终以幻灯片视图打开,没有启动画面、加载器或落地区块。如果哈希为空,则显示第 1 张幻灯片。浏览器标题为 [LESSON_TITLE] | [BRAND]。favicon 为内联 SVG:一个 Board 方块,下方带 Marker 下划线。
   布局:全视口,无页面滚动(高度 100dvh)。CSS 网格分两列:左侧边栏,右侧主列。主列有两行:舞台区(1fr,Paper 背景,24px 内边距,幻灯片居中)和控制栏(56px)。幻灯片位于一条 6px 的 Ledge 条上,该条宽度与幻灯片完全一致,如同粉笔槽,下方有柔和阴影(0 18px 40px rgba(37,48,42,0.18))。
   动效:见设计。侧边栏折叠时宽度以 180ms 动画过渡。
2. **大纲侧边栏** — 头部:32px 方形品牌标记(Board 背景,[BRAND] 首字母使用 Fraunces Chalk,3px Marker 下划线),然后是 15px 粗体的 [BRAND],接着是 13px Muted 的 [COURSE_LABEL],再是 Fraunces 24px 的 [LESSON_TITLE]。得分行:标签 'Checks' 和一个显示 '0/5' 的胶囊,统计正确检查数,下方有 5 段条,每段为空、Mint 或 Clay。大纲分组,带等宽大写标签:Warm up(1 How Sorting Works,2 Why order matters,3 Check: doubling the shelf);The idea(4 Insertion sort, step by step,5 Check: put the steps in order,6 Check: how many shifts?);Hands on(7 Live code: sort the shelf,8 Check: the easy case);Going further(9 Best and worst shelves,10 Check: the hardest shelf,11 Mark it up);Wrap up(12 Recap)。页脚:36px 圆形讲师头像、[INSTRUCTOR]、作为按钮的 'Press ? for shortcuts' 一行,以及使用 lucide PanelLeftClose 图标的折叠按钮。如果 Credit 区块提供了 [CREDIT] 链接,将其以 12px Muted 放在此页脚最底部。
   布局:宽 280px,Panel 背景,1px Line 右边框,flex 列布局,大纲列表独立滚动。每行 40px:等宽编号、15px 标题以省略号截断、右对齐状态图标。标题前的类型图标为 16px Muted:标题用 Presentation,概念用 Shapes,检查用 CircleHelp,代码用 Code,回顾用 Flag。状态图标:未触碰时无,正确时 Mint Check,错误时 Clay X,代码幻灯片运行后显示 Play 图标,该幻灯片有标记时显示小的 Muted Pen 图标。当前行有 Paper 背景,左边缘有 3px Marker 条。折叠状态为 60px 轨道,仅显示幻灯片编号和状态点,加上展开按钮。折叠状态持久化在 localStorage 中。
   动效:宽度过渡 180ms。行悬停背景 Paper,120ms。
3. **控制栏** — 从左到右:Previous 和 Next 按钮(ChevronLeft、ChevronRight);进度条;等宽显示的幻灯片编号 '7 / 12';Draw(Pencil 图标,标签 'Draw');Copy link(Link2 图标,标签 'Copy link');Shortcuts(Keyboard 图标);Present(Maximize 图标),隐藏侧边栏并在 try/catch 中调用 requestFullscreen,Esc 恢复。Copy link 使用 Clipboard API 复制 location.href,回退到隐藏 textarea 和 execCommand。1.6 秒内标签显示 'Link to slide 7 copied' 并带 Check 图标,通过 aria-live 区域播报。
   布局:高 56px,Panel 背景,1px Line 上边框,16px 侧内边距,单行,12px 间距。进度条填充剩余空间:高 6px,Line 轨道,Marker 填充,带 12 个刻度分区,点击某位置跳转到该幻灯片。第 1 张时 Previous 禁用,第 12 张时 Next 禁用。激活的 Draw 按钮使用 Marker 背景和 Ink 文字。按钮高 36px,8px 圆角,显示 2px Ink 焦点环。
   动效:进度填充 240ms。确认标签切换无位移。
4. **注释层和工具栏** — 绘制模式适用于每张幻灯片。工具顺序:Pen(4 画布 px,完全不透明)、Highlighter(22 画布 px,alpha 0.4,方形端点)、Eraser(移除指针触碰到的整条笔画)、四个色板(Marker #F5CF3A、Chalk #F3F0E3、Clay #E58E73、Sky #9CCBE0)、Undo(Undo2)、Clear slide(Trash2)和 Done(X)。标记按幻灯片存储为笔画,坐标相对于幻灯片表面归一化为 0 到 1,在 pointerup 时保存,返回该幻灯片或重新加载时恢复。Undo 每张幻灯片最多保留 30 个快照。第 11 张幻灯片以其内容条目中的讲师标记开始,可像其他笔画一样擦除。
   布局:画布绝对定位在幻灯片表面之上,按 devicePixelRatio 调整尺寸,并在任何尺寸变化时从笔画重绘。绘制模式外 pointer-events 为 none,以便标记可见时幻灯片控件仍可用。绘制模式下 pointer-events 为 auto,touch-action 为 none,光标为十字准线,幻灯片控件不可交互。使用 Pointer Events 配合 setPointerCapture 和 getCoalescedEvents,并通过中点二次曲线平滑。工具栏是浮动 Panel 胶囊,1px Line 边框和柔和阴影,居中于舞台区底部上方 16px,按钮 36px。激活工具使用 Marker 背景,激活色板有 2px Ink 圆环。
   动效:工具栏 120ms 淡入。
5. **键盘快捷键浮层** — 标题:'Keyboard shortcuts'。行:Left / Right 或 Page Up / Page Down:上一张和下一张幻灯片。Space:下一张幻灯片。Home / End:第一张和最后一张幻灯片。O:切换大纲。D:切换绘制。P、H、E:钢笔、荧光笔、橡皮擦。Z 或 Cmd/Ctrl+Z:撤销标记。1 到 4:选择测验答案。C:复制链接。F:演示。?:此列表。Esc:关闭。
   布局:模态框宽 640px,Panel 背景,14px 圆角,覆盖在 rgba(37,48,42,0.45) 的遮罩上。两列行网格,按键渲染为等宽芯片(Paper 背景,1px Line 边框,6px 圆角)。右上角关闭按钮。焦点移入模态框,关闭时返回。
   动效:120ms 淡入。
6. **移动端布局(768px 以下)** — 52px 顶栏替代侧边栏:菜单按钮(Menu 图标)、截断的 [LESSON_TITLE] 和得分胶囊。菜单按钮将大纲作为 304px 左侧抽屉打开,覆盖在遮罩上,点击遮罩、按 Esc 或选择幻灯片时关闭。底部控制栏保留 Previous、Next、幻灯片编号、Draw 和 Copy link,进度条作为其顶部边缘的 3px 条;Present 和 Shortcuts 隐藏。触摸目标至少 44px。
   布局:无缩放画布。Board 表面在两条栏之间边到边填充空间,并在自身内部垂直滚动,无页面滚动,在 390px 下无水平溢出。每张幻灯片变为单列,20px 内边距:标题 32px,问题 26px,正文 17px,选项 17px,代码 14px。照片全宽且不旋转。步进器 SVG 缩放到宽度,控件在其下方换行。代码幻灯片将编辑器(高度 300px)堆叠在控制台(最小高度 180px)上方。注释画布覆盖整个可滚动幻灯片高度,并在绘制模式下锁定滚动,工具栏在控制栏上方换行为两行。
   动效:抽屉 180ms 滑入;减少动效下即时。
7. **幻灯片 1:标题(#/slide/1)** — 等宽引题:[COURSE_LABEL]。标题:[LESSON_TITLE],最后一个词下方有手绘 Marker SVG 下划线。副标题:'Put eight books in order by hand, then teach a computer to do it.' 讲师行:56px 圆形头像、[INSTRUCTOR],然后是 '[AUDIENCE] · Room 3 · 45 minutes'。主按钮:'Start the lesson' 带 ArrowRight,前往 #/slide/2。次要文本按钮:'Jump to live code',前往 #/slide/7。右侧:桌面照片,以及一个 Panel 芯片重叠在其左下角,内容为 '12 slides · 5 checks · 1 live code'。沿幻灯片底部,八条粉笔 SVG 条,高度为 5、2、8、3、7、1、6、4。
   布局:画布分割:左列 660px 容纳引题、88px 标题、26px 副标题、讲师行和按钮,垂直居中。右列为 500x375 照片,旋转 -1.5deg,带 Panel 边框和两条胶带,位于右上。粉笔条沿照片下方右下延伸,宽 460px 高 110px,第三条填充 Marker。这必须读作丰富的首屏,绝不能在平坦背景上打字。
   动效:下划线首次查看时绘制一次。标准幻灯片过渡。
8. **幻灯片 2:为什么顺序重要,带照片的概念(#/slide/2)** — 引题:'Warm up'。标题:'A messy shelf makes every search slow.' 正文:'Looking for one title on an unsorted shelf means checking book after book. Sort the shelf and you can open in the middle, see which half to keep, and ignore the rest.' 两个大统计:'1,000' 带标签 'looks at most on 1,000 unsorted books',以及 Marker 色的 '10' 带标签 'looks at most once they are sorted'。脚注:'Halve 1,000 ten times and you are down to one book.'
   布局:左侧 56%:kicker、headline、body,然后是两个统计数字并排,使用 Fraunces 84px,中间用一条 1px Chalk 线分隔,不透明度 30%。右侧 44%:书架照片,4:3 比例,旋转 1deg,带 Panel 边框和胶带条。
   动效:仅使用标准幻灯片切换。
9. **测验行为(幻灯片 3、6 和 10)** — 点击选项或按 1 到 4 会立即作答并锁定所有选项。所选选项显示 Mint 配 Check 或 Clay 配 X。如果选择错误,正确选项也会获得 Mint 描边。出现一个解释面板,包含一行判定和解释、一个 'Try again' 按钮(解锁选项并清除结果)以及一个 'Next slide' 主按钮。侧边栏分数和分段条立即更新。每条答案记录存储选择、是否正确以及尝试次数。
   布局:画布左侧 5/12:等宽 kicker 'Check 1 of 5' 和 Fraunces 38px 的问题。右侧 7/12:四行 72px Panel 行的垂直堆叠,使用 Ink 文字。每行有一个等宽字母 A 到 D,位于 36px 圆形中,带 1px Line 边框,然后是选项文本。悬停和聚焦时给出 2px Marker 边框。所有选项行在作答前看起来完全相同:没有彩色块,也没有形状。解释位于选项下方,作为 Board Deep 内嵌,使用 Chalk 文字和 10px 圆角。
   动效:所选选项上有一个 320ms 的环形脉冲。解释在 160ms 内淡入。
10. **幻灯片 3:检查,书架翻倍(#/slide/3)** — Kicker 'Check 1 of 5'。问题:'A sorted shelf grows from 1,000 books to 2,000. Using the halving method, how many extra looks do you need at most?' A:'About 1 more'(正确)。B:'About 10 more'。C:'About 1,000 more'。D:'Twice as many'。正确判定:'Right.' 错误判定:'Not quite.' 两者的解释:'One look halves the shelf, so 2,000 books are back to 1,000 after a single look. From there nothing changes.'
   布局:使用测验布局。
   动效:使用测验动效。
11. **幻灯片 4:插入排序步进器,带图的概念(#/slide/4)** — 标题:'Take the next book and slide it into place.' 一个在书架上方的 8 步步进器。说明文字和累计移动次数:(1) 值 5 2 8 3 7 1 6 4,'The first book alone is a sorted shelf of one.',0 次移动。(2) 值 2 5 8 3 7 1 6 4,'Pick up 2. The 5 is larger, so it moves right.',1。(3) 值 2 5 8 3 7 1 6 4,'Pick up 8. Nothing is larger, so it stays.',1。(4) 值 2 3 5 8 7 1 6 4,'Pick up 3. The 5 and 8 move right.',3。(5) 值 2 3 5 7 8 1 6 4,'Pick up 7. Only the 8 moves.',4。(6) 值 1 2 3 5 7 8 6 4,'Pick up 1. Everything moves. Five shifts for one book.',9。(7) 值 1 2 3 5 6 7 8 4,'Pick up 6. The 7 and 8 move.',11。(8) 值 1 2 3 4 5 6 7 8,'Pick up 4. Four books move, and the shelf is sorted.',15。控件:Back、Next、Play / Pause(每步 1200ms,在减少动效下禁用)、步骤圆点,以及一个等宽的计数器 'Shifts so far: 15'。
   布局:标题在顶部,44px。其下方是一个 SVG 图,宽 1152px、高 340px,在粉笔基线上有 8 个条形。条形宽度 96px,高度与值成比例,每个条形上方用等宽字体显示数字。已排序的条形填充 Chalk 85%,数字为 Ink,活动条形填充 Marker,未排序的条形是粗糙的 Chalk 轮廓,无填充。图下方一行:左侧是 24px 的说明文字,右侧是控件加计数器。步进器有自己的按钮,不捕获方向键,方向键始终切换幻灯片。
   动效:每个条形以其值为键,通过 220ms 的 transform 移动到新位置。自动播放在最后一步停止。
12. **幻灯片 5:重排检查(#/slide/5)** — Kicker 'Check 2 of 5'。问题:'Put the steps of insertion sort in order.' 按起始顺序排列的行:'Compare it with the sorted books, moving right to left';'Drop the book into the gap and repeat';'Treat the first book as a sorted shelf of one';'Shift each larger book one place right';'Pick up the next unsorted book'。正确顺序:Treat the first book;Pick up the next;Compare it;Shift each larger;Drop the book。按钮:'Check order'。反馈按位置用 Mint Check 或 Clay X 标记每一行。正确判定:'That is the whole algorithm.' 错误判定:'Close. The marked rows are out of place.' 解释:'You cannot shift books until you have compared them, and the drop always comes last.' 'Try again' 保持当前顺序并清除标记。
   布局:左侧 4/12:kicker 和问题。右侧 8/12:五行 64px Panel 行的堆叠,每行有一个 GripVertical 手柄、一个等宽的位置编号、步骤文本,以及供键盘和触摸用户使用的上下箭头按钮。在手柄上使用 Pointer Events 拖动(仅手柄上 touch-action none)。被拖动的行抬起,带阴影和 2px Marker 边框,其他行让出空间。
   动效:行以 160ms 的 transform 移动;在减少动效下为即时。Check 上有一个 320ms 脉冲。
13. **幻灯片 6:检查,多少次移动(#/slide/6)** — Kicker 'Check 3 of 5'。问题:'The sorted part is 2 3 5 8. The next book is 4. How many books shift right?' 在问题下方包含一个小的粉笔 SVG,显示四个已排序条形和一个标记为 4 的 Marker 条形。A:'1'。B:'2'(正确)。C:'3'。D:'4'。解释:'Only books larger than 4 move: the 5 and the 8. The 2 and 3 stay put.'
   布局:使用测验布局,左列问题下方有 360x120 的 SVG。
   动效:使用测验动效。
14. **幻灯片 7:实时代码游乐场(#/slide/7)** — 标题:'Now teach the computer.' 任务行:'Press Run to watch each pass. Then change one character so the shelf sorts largest first.' 编辑器文件标签:'sandbox.js'。起始代码,完全如下:

// Sort the shelf, smallest book first.
function insertionSort(books) {
  for (let i = 1; i < books.length; i++) {
    const current = books[i];
    let gap = i;
    while (gap > 0 && books[gap - 1] > current) {
      books[gap] = books[gap - 1]; // shift right
      gap--;
    }
    books[gap] = current; // drop into the gap
    console.log("pass " + i + ":", books.join(" "));
  }
  return books;
}

const shelf = [5, 2, 8, 3, 7, 1, 6, 4];
console.log("start: ", shelf.join(" "));
console.log("sorted:", insertionSort(shelf).join(" "));

按钮:'Run'(播放图标,Marker 背景,显示 Cmd/Ctrl+Enter 提示)和 'Reset'(RotateCcw 图标,幽灵按钮;恢复初始代码并清空控制台)。控制台标题:'Console',右侧显示状态:'Not run yet'、'Ran in 3 ms' 或 'Error on line 6'。控制台空状态文本:'Press Run to see each pass.' 日志行以 Chalk mono 渲染。错误以 Clay 渲染并带 X 图标,显示消息和行号。超时消息:'Stopped after 3 seconds. Look for a loop that never ends.' 编辑内容持久化到 localStorage。运行该幻灯片会在大纲中添加 Play 状态图标。
   布局:顶部 96px:标题 40px,任务行 22px。其下两个窗格填满剩余画布,间距 16px。左侧 60%:Board Deep 编辑器,带 44px 工具栏(左侧文件标签,右侧 Run 和 Reset),CodeMirror 18px JetBrains Mono,内部滚动。右侧 40%:Console 背景窗格,带 44px 标题栏和 18px 滚动日志。两者均有 10px 圆角和 15% 不透明度的 1px Chalk 边框。在画布缩放时点击编辑器必须正确放置光标。
   动效:状态文本即时切换。新控制台行无动画出现。
15. **幻灯片 8:填空检查(#/slide/8)** — 引导语 'Check 4 of 5'。带两个输入的句子:'On a shelf that is already sorted, insertion sort compares each book once with its neighbor, so 8 books take [ ] comparisons and [ ] shifts.' 答案:7(也接受 'seven')和 0(也接受 'zero' 或 'none'),去除首尾空格且不区分大小写。按钮:'Check answers',也可由 Enter 触发。每个输入显示 Mint Check 或 Clay X。正确判定:'Exactly. The best case does almost no work.' 错误判定:'Not yet. Trace the first two books by hand.' 解释:'Every book after the first gets one comparison, finds a smaller neighbor, and stays put.' 'Try again' 仅清除错误的输入。
   布局:居中列宽 960px。引导语,然后句子用 Fraunces 38px、行高 1.4,内联 96px 输入框用 mono,透明背景,Marker 3px 下边框,Chalk 文本且值居中。下方:按钮,然后解释内嵌如测验布局。
   动效:每次 Check 后每个输入一次 320ms 脉冲。解释在 160ms 内淡入。
16. **幻灯片 9:最好和最差的架子,带条形图的概念(#/slide/9)** — 引导语:'Going further'。标题:'Same eight books, very different work.' 水平条形图带标签和值:'Already sorted' 0 次移动;'Our shelf from earlier' 15 次移动;'Exactly reversed' 28 次移动。侧边标注:'499,500' 用 Fraunces 72px Marker,标签 'shifts to sort 1,000 reversed books'。结尾句:'That is why insertion sort is great for short or nearly sorted lists, and why long lists need something faster. That is next lesson.'
   布局:左侧 66%:引导语、标题,然后三行 SVG 条形图。每个条形上方标签 22px,40px 高条形带粗糙 Chalk 轮廓,填充 Chalk 85%,宽度与 28 成比例,值用 mono 在末端。零值渲染为 4px 刻度。右侧 34%:Board Deep 内嵌,带标注和结尾句。
   动效:首次显示幻灯片时条形图在 400ms 内从零增长一次。
17. **幻灯片 10:检查,最难的架子(#/slide/10)** — 引导语 'Check 5 of 5'。问题:'Which shelf makes insertion sort do the most shifts?' 选项用 mono:A:'1 2 3 4 5 6'。B:'2 1 4 3 6 5'。C:'6 5 4 3 2 1'(正确)。D:'1 2 3 6 5 4'。解释:'In reversed order every book has to pass all the books before it. That is 15 shifts for six books.'
   布局:使用测验布局,选项文本用 JetBrains Mono。
   动效:使用测验动效。
18. **幻灯片 11:标记它,白板幻灯片(#/slide/11)** — 引导语:'Your turn at the board'。标题:'Circle every book that has to shift.' 正文:'The sorted part is 2 4 7 9. The next book is 5. I have marked where it lands. Press D and finish the job.' 署名 '[INSTRUCTOR]'。图表:五个条形图对应 2、4、7、9 和 5,其中 5 用 Marker。内容条目中预置标记,用 Marker 和 Pen 工具:围绕 5 条形的松散手绘椭圆,以及从它到 4 和 7 之间空隙的弯曲箭头。'Start drawing' 按钮(铅笔图标)开启绘制模式并选择 Pen。
   布局:左侧 34%:引导语、标题 48px、正文和按钮。右侧 66%:大片空白板区域,SVG 条形图位于粉笔基线上,有充足空间做标记。条形宽 110px。
   动效:仅标准幻灯片过渡。预置标记无动画出现。
19. **幻灯片 12:回顾(#/slide/12)** — 标题:'What you can do now'。得分块:实时得分如 '4 / 5' 用 Fraunces 96px,行 '3 on the first try',以及五个标签为 Check 1 到 Check 5 的芯片,每个显示未触碰、正确或错误状态并链接到该幻灯片。无任何回答时显示 '0 / 5' 和 'Five checks are waiting for you.' 按钮:'Retry what I missed'(转到第一个错误或未触碰的检查;5/5 时隐藏)和一个 'Reset my progress' 文本按钮,内联确认后清除答案、代码和标记。要点:'Insertion sort grows a sorted part one book at a time.' 'The starting order sets the work: 0 shifts when sorted, 28 when reversed, for eight books.' 'Sorted data is what makes fast search possible.' 作业卡片:手排列卡片的照片,然后 'Before Tuesday: sort ten cards by this method, then again from reversed order. Count the shifts and bring both numbers.' 下一步:'Next up: Lesson 3, merge sort. Tuesday at 6:30 pm.' 办公时间带小肖像:'[INSTRUCTOR], Thursdays 5:30 to 6:15 pm, Room 3, 14 Tallow Street, [BRAND].'
   布局:三列,间距 32px,标题在上方。左侧 30%:得分块和按钮。中间 34%:要点为编号列表,mono 数字和 20% 不透明度的 1px Chalk 分隔线。右侧 36%:Panel 卡片带 Ink 文本,顶部 16:9 裁剪照片,然后作业、下一课和办公时间。
   动效:仅标准幻灯片过渡。得分不递增计数。

## 资源

- 图片:将 https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/lesson-desk.webp 下载到 public/images/lesson-desk.webp。替代文本:'Stack of plain cloth-bound books and chalk on an oak classroom desk in front of a green chalkboard'。用于第 1 张幻灯片。由 VibeFather 使用 qwen-image-3.0-pro 生成,可随本模板再分发。
- 图片:将 https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/instructor.webp 下载到 public/images/instructor.webp。替代文本:'The lesson instructor at a green chalkboard, seen from behind'。用于第 1 张幻灯片、大纲页脚和第 12 张幻灯片。为虚构人物,是用户本人照片的占位符。由 VibeFather 使用 qwen-image-3.0-pro 生成,可随本模板再分发。
- 图片:将 https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/uneven-shelf.webp 下载到 public/images/uneven-shelf.webp。替代文本:'Wooden shelf of plain books in uneven heights and no particular order'。用于第 2 张幻灯片。由 VibeFather 使用 qwen-image-3.0-pro 生成,可随本模板再分发。
- 图片:将 https://media.vibefather.ai/assets/979b73ac-0de6-4168-9126-974bb813156d/arranging-cards.webp 下载到 public/images/arranging-cards.webp。替代文本:'Hands arranging blank index cards in a row on an oak desk'。用于第 12 张幻灯片的作业卡片。由 VibeFather 使用 qwen-image-3.0-pro 生成,可随本模板再分发。
- 图片:以原始内联 SVG 或 CSS 在代码中绘制:所有条形图和图表、标题下划线、胶带条、粉笔纹理、品牌标识和 favicon。不使用图像文件。
- 图标:lucide-react(ISC),从 npm 安装:PanelLeftClose、PanelLeftOpen、Presentation、Shapes、CircleHelp、Code、Flag、Check、X、Play、Pause、Pen、Pencil、Highlighter、Eraser、Undo2、Trash2、Link2、Keyboard、Maximize、ChevronLeft、ChevronRight、ArrowRight、RotateCcw、GripVertical、ChevronUp、ChevronDown、Menu。
- 字体:通过 Fontsource npm 包自托管,在 src/main.tsx 中导入:@fontsource-variable/fraunces、@fontsource/atkinson-hyperlegible(400、700)、@fontsource-variable/jetbrains-mono。均为 OFL-1.1。
- 图片:在项目根目录创建 ASSETS.md,列出每个第三方文件:路径、来源 URL、作者和许可证。上述四张照片的署名标注为 'Generated by VibeFather with qwen-image-3.0-pro, redistributable with this template'。同时列出字体(OFL-1.1)和 lucide-react(ISC)。

## 不要做
- 无后端:没有服务器代码、API 路由、数据库、认证、第三方 API 或会向任何地方提交的表单。测验答案、代码和注释都保存在 localStorage 中。
- 不使用 CDN 的 script 或 link 标签,不使用分析工具,运行时无网络请求。将所有图片下载到项目中,绝不外链。
- 通过 Fontsource 自托管所有字体。绝不从 fonts.googleapis.com、fonts.gstatic.com、Adobe Fonts 或任何其他 CDN 加载。不使用商业课堂字体或手写字体。
- 用一条命令将静态文件构建到 dist/,使用相对资源路径(base './')。不生成 source map,dist/ 中不包含 src/。保持 dist/ 在 20 MB 以下。
- 内部导航使用 ./index.html 上的 hash 路由,绝不使用裸目录路径。
- 在 1440x900 或 390x844 下无控制台错误。学习者代码错误必须被捕获并显示在幻灯片控制台中,绝不泄漏到页面控制台。
- 代码 iframe 绝不能有 allow-same-origin、网络访问或对父页面的访问权限。
- 尊重 prefers-reduced-motion:无过渡、脉冲、绘制进入效果或步进器自动播放。
- 不要添加落地页、营销主视觉、定价区块、注册或启动画面。应用直接打开到演示文稿。
- 不使用任何现有演示工具、幻灯片框架或测验平台的标志、产品名称、默认主题或起始幻灯片布局。
- 不要游戏节目式的测验外观:不要答案形状与颜色的配对、彩色答案块、大厅或领奖台屏幕、倒计时器、排行榜、吉祥物或音效。所有选项在被回答前看起来都一样。
- 不使用真实教科书、在线课程、学校课程或已出版讲座中的文案、课程文本、图表或练习。所有课程内容均为虚构。
- 不使用真实学校、校徽、考试委员会标记或真实教师。讲师和学校均为虚构。
- 不使用能识别特定代码编辑器或在线游乐场的编辑器主题、图标或品牌标识。使用本提示词中的原始语法主题。
- 不使用学习应用中的吉祥物、角色插画或标志性绘图。图表使用 SVG 或 CSS 为本模板绘制。
- 不使用 lorem ipsum。不要添加除 Marker 之外的重点色:Mint 和 Clay 仅用于反馈,Sky 仅用于注释。
- 不做 SEO 工作:一个带有 [BRAND] 的普通标题和一个 favicon 就足够了。除可选的 [CREDIT] 链接外,网站中不提及 VibeFather。所有文案均为美式英语。

---
— Prompt by VibeFather · https://vibefather.ai/t/interactive-lesson-slides · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.

DESIGN.md

单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。

---
name: "Interactive Lesson Slides"
colors:
  paper: "#F6F0E2"
  panel: "#FFFBF1"
  line: "#DDD2BA"
  ink: "#25302A"
  muted: "#5E695D"
  board: "#1F4A3C"
  board_deep: "#173A2F"
  console: "#122B23"
  chalk: "#F3F0E3"
  chalk_dim: "#B9C9B8"
  marker: "#F5CF3A"
  mint: "#8FD3A8"
  clay: "#E58E73"
  sky: "#9CCBE0"
  ledge: "#C8B48F"
typography:
  display_slide_headlines_big_numbers_lesson_name_in_the_outline_line_height_1_02_tracking_0_01em: { family: "Fraunces Variable", weights: [500, 600] }
  text_ui_body_copy_quiz_options_chosen_for_classroom_legibility_line_height_1_45: { family: "Atkinson Hyperlegible", weights: [400, 700] }
  mono_editor_console_slide_numbers_kickers_keyboard_keys_kickers_are_uppercase_with_0_08em_tracking: { family: "JetBrains Mono Variable", weights: [400, 600] }
spacing: "4px base. App: sidebar 280px expanded, 60px rail collapsed; control bar 56px; 24px padding around the stage. On the 1280x720 slide canvas: 64px outer padding, 32px between major blocks, 16px inside groups. Canvas type sizes: headline 56px, title-slide headline 88px, question 38px, body 24px, options 22px, kicker 18px, code 18px."
radius: "Slide surface 14px on top corners, square at the bottom where it meets the ledge. Cards, inputs and option rows 10px. Buttons 8px. Chips and the annotation toolbar are full pills. Photos on slides 6px with a 10px Panel border."
---

# Interactive Lesson Slides — Design System

Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.

## Colors
- **Paper** `#F6F0E2` — App background around the stage
- **Panel** `#FFFBF1` — Sidebar, control bar, quiz option cards, overlays
- **Line** `#DDD2BA` — Hairlines and panel borders on paper
- **Ink** `#25302A` — Text on paper and panels
- **Muted** `#5E695D` — Secondary text on paper
- **Board** `#1F4A3C` — Chalk-green slide surface, the main stage color
- **Board Deep** `#173A2F` — Editor background and inset panels on the board
- **Console** `#122B23` — Console output pane
- **Chalk** `#F3F0E3` — Headlines, text and diagram lines on the board
- **Chalk Dim** `#B9C9B8` — Secondary text on the board, code comments
- **Marker** `#F5CF3A` — The one accent: current slide, primary buttons, active bar, underline. Text on it is Ink.
- **Mint** `#8FD3A8` — Correct feedback only, always with a check icon; also code strings
- **Clay** `#E58E73` — Wrong feedback and errors only, always with an X icon; also code numbers
- **Sky** `#9CCBE0` — Annotation swatch only, never in the UI
- **Ledge** `#C8B48F` — 6px chalk-tray strip under the slide

## Typography
- **Display: slide headlines, big numbers, lesson name in the outline. Line height 1.02, tracking -0.01em.** — Fraunces Variable (OFL), weights 500/600. Self-host the font files.
- **Text: UI, body copy, quiz options. Chosen for classroom legibility. Line height 1.45.** — Atkinson Hyperlegible (OFL), weights 400/700. Self-host the font files.
- **Mono: editor, console, slide numbers, kickers, keyboard keys. Kickers are uppercase with 0.08em tracking.** — JetBrains Mono Variable (OFL), weights 400/600. Self-host the font files.

## Spacing & shape
- Spacing: 4px base. App: sidebar 280px expanded, 60px rail collapsed; control bar 56px; 24px padding around the stage. On the 1280x720 slide canvas: 64px outer padding, 32px between major blocks, 16px inside groups. Canvas type sizes: headline 56px, title-slide headline 88px, question 38px, body 24px, options 22px, kicker 18px, code 18px.
- Radius: Slide surface 14px on top corners, square at the bottom where it meets the ledge. Cards, inputs and option rows 10px. Buttons 8px. Chips and the annotation toolbar are full pills. Photos on slides 6px with a 10px Panel border.

## Motion
- Slide change: 180ms ease-out fade with a 12px horizontal shift in the direction of travel. Nothing else moves on the shell.
- Progress bar width eases over 240ms. The outline's current-slide bar snaps with no animation.
- Quiz feedback: the chosen option gets one 320ms outward ring pulse in Mint or Clay, and the explanation fades in over 160ms.
- Title underline: the Marker SVG stroke draws once over 600ms using stroke-dashoffset. Stepper bars move with a 220ms transform transition. Bars on slide 9 grow once over 400ms.
- Under prefers-reduced-motion: reduce, remove all of the above, including stepper autoplay. State changes apply instantly.

## Imagery
One shoot: warm documentary photographs in a classroom with low window light, oak, cloth-bound books and a green chalkboard, used on slides 1, 2 and 12 and for the instructor portrait. Photos sit on the board as printed pictures with a 10px Panel border, slight rotation and two semi-transparent paper tape strips drawn in CSS. All diagrams are original inline SVG with a rough chalk line (a feTurbulence plus feDisplacementMap filter at scale 2 on Chalk strokes). The board surface has a faint chalk smudge: two large radial gradients of Chalk at 4% plus an inline SVG feTurbulence noise at 5% opacity. No character illustrations.

## Tone
Warm classroom editorial. A good teacher talking: plain, specific, encouraging, a little wry. Short sentences, concrete numbers, no corporate language and no exclamation marks.

---
— Prompt by VibeFather · https://vibefather.ai/t/interactive-lesson-slides · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 统计课教师:将 BRAND 设为你的学校,LESSON_TITLE 设为你的主题,然后重写步进器和条形图,绘制你自己的数据。
  • 编程训练营讲师:保留实时代码幻灯片,但将起始 JavaScript 和检查答案替换为你的语言基础内容。
  • 举办数据工作坊的负责人:将 AUDIENCE 设为你的群体,并把选择题幻灯片改为关于你的数据集的问题。
  • 独立课程创作者:将 INSTRUCTOR 设为你的名字,更换头像,并重写总结幻灯片以指向你的下一课。

互动课程幻灯片:常见问题

如何更改互动课程幻灯片模板中的课程内容?

互动课程幻灯片模板将所有文案放在一个内容文件中,顶部有 BRAND、LESSON_TITLE、COURSE_LABEL、INSTRUCTOR 和 AUDIENCE 五个变量。让你的 AI agent 设置这五个值,然后为你的课程重写十二张幻灯片的教学文本、起始代码、检查答案和解析。保持幻灯片类型、顺序和布局不变,幻灯片的行为就保持一致。

怎么用 AI 做一个互动课程幻灯片?

复制本页的提示词,或者运行 npx vibefather add interactive-lesson-slides,把 [BRAND]、[AUDIENCE]、[INSTRUCTOR]、[COURSE_LABEL] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。