跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

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

关于这个模板

一个单页单词拼图:在厚实的奶油色棋盘上用六次机会猜出一个五字母单词。字母方块会逐个依次翻转,标记命中、接近命中和未命中;无效猜测会抖动;屏幕键盘会同步显示每个字母的状态,同时也支持物理键盘操作。获胜或失败时会显示结果面板,包含答案和可复制到剪贴板的结果行(原创字符格式——没有 emoji 网格);统计数据(已玩场次、胜率、当前连胜和最佳连胜、猜测分布)会保存在 localStorage 中。帮助弹窗通过示例讲解规则。每轮之间,下一个单词从原创精选列表中提供,按完成的游戏轮换,并标记为示例轮换——没有真实日期,没有每日锁定。外观是暖色街机风:奶油色底色、墨色方块、单一万寿菊色点缀、圆角按键,以及安静无纸屑的庆祝效果。一切都在本地运行,数据不会离开浏览器。

模板提示词

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

# Daily Word Puzzle Game

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

## Brief
A single-page word game called [GAME]: guess the hidden five-letter word in six tries. Tile flips, a state-mirroring keyboard, stats in localStorage, a copyable original-format results row, a help modal, and the next puzzle served from an original curated list themed around [FLAVOR] per completed round. One page, index.html; everything runs in the browser.

- Audience: People with four minutes and a keyboard: commuters, queue-standers, and the 'one more word' crowd. They want crisp feedback and zero friction.
- Goal: Play, win, share. Within ten seconds a first guess is typed; within a round the player has opened stats or copied their result.
- Tone: Warm-arcade: short, kind, lightly teasing on a loss. One dry line in the help modal.

## Stack
- Framework: Vite 5 + React 18 + TypeScript
- Styling: Tailwind CSS 3.4
- Libraries: react (MIT), react-dom (MIT), motion (motion.dev, import from 'motion/react') (MIT), lucide-react (ISC), tailwindcss (MIT), postcss (MIT), autoprefixer (MIT), vite (MIT), @vitejs/plugin-react (MIT), typescript (Apache-2.0), @fontsource-variable/bricolage-grotesque (OFL-1.1), @fontsource-variable/inter (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Scaffold with npm create vite@latest using the react-ts template (pin the version if the latest template targets newer majors), then keep one real HTML page: index.html (entry src/main.tsx).
  - vite.config.ts: base './', plugins [react()], build { outDir 'dist', sourcemap false, assetsInlineLimit 0 }. Do not copy src/ into dist/.
  - Tailwind 3.4 through PostCSS, content ['./index.html', './src/**/*.{ts,tsx}']. In tailwind.config.ts add every color under Design to theme.extend.colors with kebab-case keys (cream, panel, card, line, ink, softink, marigold, marigold-deep, marigold-mist, hit, near, miss, slateink, good) and fontFamily display ['Bricolage Grotesque Variable', 'system-ui', 'sans-serif'], sans ['Inter Variable', 'system-ui', 'sans-serif']. Set borderRadius DEFAULT to 12px and add maxWidth { shell: '560px' }.
  - In src/fonts.ts import '@fontsource-variable/bricolage-grotesque' and '@fontsource-variable/inter'; import src/fonts.ts and src/index.css from the entry file.
  - File layout: src/content.ts (game name, help copy, stats labels, every string, and two word lists — answers: 40 curated five-letter words themed around [FLAVOR]; accepted: the answers plus 80 more common five-letter words; both lists plain string arrays), src/lib/brand.ts (gameSlug = [GAME] lowercased with every run of non-alphanumeric characters replaced by '-', storageKey = gameSlug + ':stats'), src/lib/game.ts (pure logic: pickAnswer(index), judge(guess, answer) → five letter-states resolving duplicate letters correctly, isValid(word)), src/lib/share.ts (buildResultRow(statesByRow) → an original multi-line text format using unicode box-drawing characters like ▉ ◪ ▢ plus a header '[GAME] — solved in 4/6 (sample puzzle)', never colored-square emoji).
  - State: src/store/game.ts is a tiny external store (useSyncExternalStore) holding { rowIndex, rows: string[] (committed guesses), current: string (in-progress letters), status: 'playing'|'won'|'lost', answerIndex, shakeAt } plus stats { played, wins, streak, best, distribution: number[6] } persisted to localStorage under storageKey.
  - Components in src/components/: TopBar.tsx (Wordmark, HelpButton, StatsButton), Board.tsx (TileRow.tsx, Tile.tsx), Keyboard.tsx (Key.tsx), ResultPanel.tsx (StatsBlock.tsx with DistributionRow.tsx, ShareRow.tsx), HelpModal.tsx (ExampleTile.tsx), Toast.tsx. src/pages/Game.tsx composes them.
  - Input: one window keydown listener — letters a–z append (max 5), Enter commits (invalid → shakeAt bump + toast 'Not in the word list'), Backspace removes; the on-screen Keyboard mirrors the same actions. Physical input works whether or not the Keyboard is focused; every Key is a real button for touch.
  - Tile flip: on commit, each tile of the row flips (rotateX 0→90→0, 520ms total) with a 110ms per-tile stagger, revealing its state color at the 90° midpoint; the Keyboard's matching keys update as each tile lands. Invalid shake: the row translates ±6px three times (300ms). Reduced motion: states swap instantly, no shake translation (a toast still explains invalidity).
  - End state: after the flip completes, ResultPanel slides up in-sheet (not a modal): the answer in display type, 'solved in N/6' or 'the word was …', StatsBlock (played, win %, current streak, best streak, and a six-bar distribution with the winning bar in Marigold), ShareRow ('Copy result' → clipboard + toast 'Copied — paste it anywhere'), and 'Next puzzle' serving pickAnswer(next) with the quiet label 'Sample rotation · puzzle 7 of 40 (no dates here)'.
  - Keyboard: QWERTY rows plus Enter/Backspace keys; key letter-states: hit (Marigold fill, Slate Ink text), near (Cocoa outline + dot), miss (Miss gray, text at 40%). Physical keyboards get the same feedback only through the board; the Keyboard is stateless to typing.
  - HelpModal: rules in four lines with a worked ExampleTile trio (one hit, one near, one miss with one-line explanations), the dry line ('No letters are reused in scoring unless the word reuses them — fairness beats cleverness.'), and a close X. Focus-trapped, Escape closes.
  - Stats persist across rounds; Reset stats lives inside StatsBlock as a quiet 'reset' link with a confirm popover.
  - public/favicon.svg as described under Assets. index.html: lang en, <meta name='theme-color' content='#FBF3E4'>, <link rel='icon' href='./favicon.svg' type='image/svg+xml'>, <title>[GAME] — a five-letter puzzle</title>.
  - Write ASSETS.md at the project root as described under Assets.
  - dist/ holds index.html, hashed JS/CSS, the woff2 fonts and favicon.svg. Keep it under 3 MB.

## Variables
- [GAME] — Game name (default: "Larkspur"). The invented game's name, one word. Used in the wordmark, title, share text and localStorage key. Never a real game.
- [FLAVOR] — Word theme (default: "everyday English words"). One lowercase phrase naming the answer list's flavor. Rewrites the 40 answers (and the help copy) so the list fits. Keep words common and five letters exactly.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/daily-word-puzzle-game 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
- Cream `#FBF3E4` — Page background — warm arcade daylight.
- Panel `#FFFBF0` — Result panel, help modal.
- Card `#FFFFFF` — Tiles before commit, keys, toasts.
- Line `#E5D9C0` — 2px tile and key borders (1px on panels).
- Ink `#241F16` — Tile letters pre-commit, headings, body.
- Soft Ink `#6E6552` — Hints, stats labels, the sample-rotation line.
- Marigold `#E8A33C` — The one accent: hit tiles, primary buttons, winning distribution bar, focus ring, wordmark dot.
- Marigold Deep `#C4842A` — Hover/pressed primary.
- Marigold Mist `#F8E8CB` — Toast fills, selected states.
- Hit `#E8A33C` — Correct-letter tile fill (same as the accent — the game owns it).
- Near `#F3D9A4` — Present-elsewhere tile fill: a paler marigold with a Cocoa 2px border so it never reads as the hit color.
- Miss `#D8CFBC` — Absent-letter tile fill and disabled keys.
- Slate Ink `#241F16` — Text on marigold fills (kept dark for warmth).
- Good `#5E8C4A` — Streak ticks, copied confirmation.

### Typography
- Display: wordmark, result headings, big answer reveal — Bricolage Grotesque: Bricolage Grotesque (OFL), weights 400/600
- Text and UI: tiles, keys, stats, help — Inter; tabular numerals for stats: Inter (OFL), weights 400/500/700

### Layout & motion
- Spacing: 8px base unit. Shell max-width 560px centered; board 350px wide (tiles 62px, gap 8px; scales to 92vw with tiles at min(62px, 16vw)); keyboard full shell width, keys 40px tall with 6px gaps. Top bar 56px. Type scale: wordmark 22px Bricolage 600; tile letters Inter 700 26px uppercase; key letters Inter 600 14px uppercase; result heading 24px Bricolage 600; stats numerals Inter 700 22px tabular; body and help 14.5px / 1.6; toasts 13px. Buttons: height 44px, Inter 600 13.5px; primary Marigold fill with Slate Ink text, ghost 1px Line border. Focus everywhere: 2px Marigold outline, 3px offset.
- Radius: 12px on tiles and primary buttons; 10px on keys; 8px on panels and modals; 999px for toasts and pills.
- Motion: Easing: --ease-io cubic-bezier(0.65, 0, 0.35, 1) for flips; a spring (stiffness 420, damping 26) for the result panel. Arcade-crisp, never sluggish.
- Motion: Tile typing: each letter pops in (scale 0.9→1, 90ms) as it's typed.
- Motion: Tile flip: the row's five tiles flip in sequence (110ms stagger, 520ms each: rotateX 0→90→0) revealing state colors at midpoint; keys recolor as each lands.
- Motion: Invalid shake: row ±6px, three cycles, 300ms total, then rest.
- Motion: Win: the completed row's tiles bounce once in sequence (translateY -8px, 80ms each, staggered) — small joy, no confetti.
- Motion: ResultPanel: slides up in-sheet with the spring; distribution bars grow from 0 over 400ms staggered 40ms; the winning bar carries a Marigold fill.
- Motion: Help modal: scrim 160ms, panel scale 0.96→1 with the spring.
- Motion: Toast: rises 6px, 160ms, auto-dismiss 2.2s.
- Motion: prefers-reduced-motion: reduce — states swap instantly (no flips, no shake translation, no bounce), bars render at full width, panel fades only; the game stays fully playable. Use CSS @media in index.css plus Motion's useReducedMotion.
- Imagery: No images at all: tiles, keys, chips, the distribution chart and the favicon are drawn in code. The share format uses unicode box characters in plain text — never colored-square emoji. Icons: lucide-react only, stroke width 1.75.

## Pages & Sections
### Game (`index.html`)
1. **Content file and copy rules** — All copy below is written for the defaults ([GAME] = Larkspur, [FLAVOR] = everyday English words). Put every string and both word lists in src/content.ts and render from it. If any variable differs, rewrite the 40 answers and 80 accepted extras so they fit [FLAVOR] (all exactly five letters, common, US spellings), and adjust the help copy's example words. Help copy: 'Guess the word in six tries.' / 'Each guess must be a five-letter word we know (the list is kind, not huge).' / 'After each guess, the tiles show how close you are.' / Examples: 'STARE — the S is in the word and in place (a full marigold tile)'; 'CRANE — the R is in the word, wrong spot (pale tile with a border)'; 'PLUMB — the U isn't in the word at all (gray tile).' / Dry line: 'No letters are double-counted unless the word doubles them — fairness beats cleverness.' / Loss line: 'The word was {answer}. Tomorrow's word forgives everything. (There's no tomorrow — just press next.)' Sample answers list (40, write them all in content.ts): CRANE, PLANT, BRICK, MOUSE, DRIFT, SPARK, GLOVE, TIDAL, MARCH, QUITE, FROST, GRAPE, SWORD, HONEY, PEARL, CLOUD, SHINE, BREAD, RIVER, STONE, LEAFY, MIRTH, VOCAL, WIDEN, ZESTY, BLAZE, CHARM, DWELL, EAGER, FLINT, GRASP, HABIT, IVORY, JOUST, KNEEL, LUNAR, MEDAL, NOBLE, ORBIT, PIQUE. Accepted extras (80 more; write plausible common five-letter words in the same voice). Stats labels: 'Played', 'Win %', 'Streak', 'Best'; distribution heading 'Guesses it took'; sample-rotation line 'Sample rotation · puzzle {n} of 40 · no dates here'.
   Layout: n/a
   Motion: n/a
2. **Top bar** — Left: the wordmark '[GAME]' (Bricolage 600 22px) with a Marigold dot. Right: two icon buttons — HelpButton (CircleHelp) and StatsButton (ChartNoAxesColumn) opening HelpModal and (between rounds) the ResultPanel's stats respectively. Under 400px the wordmark shrinks, buttons persist.
   Layout: 56px row, Cream background, Line bottom border; sticky.
3. **Board** — Six TileRows of five Tiles. Empty tiles: Card fill, 2px Line border, no letter. Typing fills the current row's tiles letter by letter (pop-in). Committed rows keep their letters with state fills (hit Marigold / near pale-with-border / miss gray) and Ink-to-white text contrast per state. The current row sits at rest. Below the board, one quiet status line while playing: 'Puzzle {n} · six tries' (Soft Ink, 12.5px).
   Layout: Centered; board width min(350px, 92vw); 28px above the keyboard.
4. **Keyboard** — Three rows: QWERTYUIOP / ASDFGHJKL / (Enter) ZXCVBNM (Backspace). Keys are real buttons; state fills per Design; Enter primary-wide (70px), Backspace with Delete icon. Hover lifts 1px; active presses 1px.
   Layout: Full shell width at bottom; keys height 44px (52px on the Enter row), 6px gaps; margin-bottom safe-area aware.
5. **Result panel and help modal** — ResultPanel (in-sheet, replaces the keyboard area after a round ends): heading 'Solved in {n}/6' or 'Out of tries'; the answer in Bricolage 600 26px; StatsBlock (four numerals + distribution); ShareRow ('Copy result' primary + quiet 'Next puzzle' ghost with the sample-rotation line); a 'reset stats' link opening a confirm popover ('Reset your stats? The tiles forget faster than you will.'). HelpModal: rules, three ExampleTile lines, the dry line, close X; opens from HelpButton and auto-opens on a visitor's very first game (a localStorage flag).
   Layout: ResultPanel max-width 420px centered; modal 420px centered over a scrim.

## Assets
- image: No images at all: every visual is drawn in code. Do not fetch or hotlink anything.
- image: Write ASSETS.md at the project root listing the code-drawn assets (tiles, keys, distribution bars, favicon — 'drawn in code, original') and the npm packages: @fontsource-variable/bricolage-grotesque and @fontsource-variable/inter (OFL-1.1) and lucide-react (ISC). State that word lists are original curated lists.
- icon: lucide-react only: ChartNoAxesColumn, Check, CircleHelp, Copy, Delete, X. Stroke width 1.75, 16–20px, color inherits. public/favicon.svg: viewBox 0 0 32 32, a 32x32 rounded square filled #241F16, a marigold (#E8A33C) five-tile row glyph (five small rounded squares, the middle one filled marigold, the rest outlined). No brand logos.
- font: Install @fontsource-variable/bricolage-grotesque and @fontsource-variable/inter and import them in src/fonts.ts as listed in Setup. Vite bundles the woff2 files into dist/.

## Don'ts
- No backend, no form submission, no fetch to API, no network: stats and state persist to localStorage only; the share row copies to clipboard.
- Every internal link is the game itself (./index.html) — never to a bare directory; there is exactly one page.
- No resemblance to Wordle or any real word game: different name, colors, tile shape, share format (unicode box characters, never colored-square emoji), and original word lists — no scraped dictionaries.
- No daily lockout or real dates: puzzles rotate per completed round with an honest 'sample rotation' label; nothing prints today's date or years.
- No images, photos or logos; everything is code-drawn.
- Self-host everything: fonts through Fontsource, icons as npm packages or inline SVG. No CDN <script> or <link> tags, no Google Fonts, no analytics.
- Production build: minified, no source maps, no src/ copied into dist/, single command npm run build, output in dist/ under 3 MB.
- Never mention VibeFather inside the game except a footer-corner credit line 'Built with a VibeFather template' linking https://vibefather.ai under the keyboard, one quiet row.
- Respect prefers-reduced-motion: instant state swaps, no shake/bounce; the game stays fully playable by keyboard and touch.
- The game must work at 1440x900 desktop and 390x844 mobile with zero console errors; physical and on-screen keyboards both play; help modal, stats and copy buttons work with keyboard only and visible focus rings.
- Accessibility: tiles carry aria-labels describing letter and state; status changes announce via aria-live politely; the keyboard is real buttons; color never carries meaning alone (near tiles get a border + dot).

---
— Prompt by VibeFather · https://vibefather.ai/t/daily-word-puzzle-game · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 每日单词拼图游戏

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

## 简介
一个名为 [GAME] 的单页文字游戏:在六次尝试中猜出隐藏的五字母单词。方块翻转、状态镜像键盘、localStorage 中的统计数据、可复制的原始格式结果行、帮助弹窗,以及每完成一轮后从围绕 [FLAVOR] 主题的原创精选列表中提供下一个谜题。单页,index.html;一切都在浏览器中运行。

- 受众:有四分钟和一块键盘的人:通勤者、排队站立者,以及“再来一个词”的人群。他们想要清晰的反馈和零摩擦。
- 目标:游玩、获胜、分享。十秒内输入第一次猜测;一轮之内玩家已打开统计数据或复制了他们的结果。
- 语气:温暖街机风:简短、友善、失败时略带调侃。帮助弹窗中有一句冷面台词。

## 技术栈(Stack)
- 框架(Framework):Vite 5 + React 18 + TypeScript
- 样式(Styling):Tailwind CSS 3.4
- 库(Libraries):react(MIT)、react-dom(MIT)、motion(motion.dev,从 'motion/react' 导入)(MIT)、lucide-react(ISC)、tailwindcss(MIT)、postcss(MIT)、autoprefixer(MIT)、vite(MIT)、@vitejs/plugin-react(MIT)、typescript(Apache-2.0)、@fontsource-variable/bricolage-grotesque(OFL-1.1)、@fontsource-variable/inter(OFL-1.1)
- 构建(Build):`npm run build` → 静态文件输出到 `dist/`。无后端、无服务端代码、无外部 API。
- 初始化(Setup):
  - 使用 npm create vite@latest 并选择 react-ts 模板进行脚手架搭建(如果最新模板指向更高主版本,则锁定版本),然后保留一个真实的 HTML 页面:index.html(入口 src/main.tsx)。
  - vite.config.ts:base './',plugins [react()],build { outDir 'dist', sourcemap false, assetsInlineLimit 0 }。不要将 src/ 复制到 dist/。
  - 通过 PostCSS 使用 Tailwind 3.4,content ['./index.html', './src/**/*.{ts,tsx}']。在 tailwind.config.ts 中,将设计(Design)下的每种颜色以 kebab-case 键添加到 theme.extend.colors(cream、panel、card、line、ink、softink、marigold、marigold-deep、marigold-mist、hit、near、miss、slateink、good),并设置 fontFamily display ['Bricolage Grotesque Variable', 'system-ui', 'sans-serif']、sans ['Inter Variable', 'system-ui', 'sans-serif']。将 borderRadius DEFAULT 设为 12px,并添加 maxWidth { shell: '560px' }。
  - 在 src/fonts.ts 中导入 '@fontsource-variable/bricolage-grotesque' 和 '@fontsource-variable/inter';从入口文件导入 src/fonts.ts 和 src/index.css。
  - 文件布局:src/content.ts(游戏名称、帮助文案、统计标签、所有字符串,以及两个单词列表——answers:40 个围绕 [FLAVOR] 主题的精选五字母单词;accepted:answers 加上另外 80 个常见五字母单词;两个列表均为纯字符串数组)、src/lib/brand.ts(gameSlug = [GAME] 转为小写,并将每一段非字母数字字符替换为 '-',storageKey = gameSlug + ':stats')、src/lib/game.ts(纯逻辑:pickAnswer(index)、judge(guess, answer) → 五个字母状态,正确解析重复字母、isValid(word))、src/lib/share.ts(buildResultRow(statesByRow) → 一种原创的多行文本格式,使用 ▉ ◪ ▢ 等 Unicode 制表符,外加标题 '[GAME] — solved in 4/6 (sample puzzle)',绝不使用彩色方块 emoji)。
  - 状态(State):src/store/game.ts 是一个小型外部 store(useSyncExternalStore),持有 { rowIndex, rows: string[](已提交的猜测)、current: string(进行中的字母)、status: 'playing'|'won'|'lost'、answerIndex、shakeAt } 以及 stats { played, wins, streak, best, distribution: number[6] },持久化到 localStorage 的 storageKey 下。
  - src/components/ 中的组件:TopBar.tsx(Wordmark、HelpButton、StatsButton)、Board.tsx(TileRow.tsx、Tile.tsx)、Keyboard.tsx(Key.tsx)、ResultPanel.tsx(StatsBlock.tsx 含 DistributionRow.tsx、ShareRow.tsx)、HelpModal.tsx(ExampleTile.tsx)、Toast.tsx。src/pages/Game.tsx 组合它们。
  - 输入(Input):一个 window keydown 监听器——字母 a–z 追加(最多 5 个),Enter 提交(无效 → shakeAt 递增 + toast 'Not in the word list'),Backspace 删除;屏幕上的 Keyboard 镜像相同操作。物理输入无论 Keyboard 是否聚焦都有效;每个 Key 都是真实 button 以支持触摸。
  - 方块翻转(Tile flip):提交时,该行的每个方块翻转(rotateX 0→90→0,总计 520ms),每个方块错开 110ms,在 90° 中点显示其状态颜色;Keyboard 的对应键在每个方块落定时更新。无效抖动:该行平移 ±6px 三次(300ms)。减少动态效果(Reduced motion):状态立即切换,无抖动平移(toast 仍解释无效性)。
  - 结束状态(End state):翻转完成后,ResultPanel 在表内滑入(非模态):答案以展示字体显示、'solved in N/6' 或 'the word was …'、StatsBlock(played、win %、current streak、best streak,以及六条分布条,获胜条为 Marigold)、ShareRow('Copy result' → 剪贴板 + toast 'Copied — paste it anywhere'),以及 'Next puzzle' 提供 pickAnswer(next),并带有低调标签 'Sample rotation · puzzle 7 of 40 (no dates here)'。
  - 键盘(Keyboard):QWERTY 行加上 Enter/Backspace 键;键字母状态:hit(Marigold 填充,Slate Ink 文字)、near(Cocoa 描边 + 点)、miss(Miss 灰色,文字 40% 不透明度)。物理键盘仅通过棋盘获得相同反馈;Keyboard 对打字无状态。
  - HelpModal:规则四行,配一个示例 ExampleTile 三件套(一个 hit、一个 near、一个 miss,各带一行解释)、一句干巴巴的话('No letters are reused in scoring unless the word reuses them — fairness beats cleverness.'),以及关闭 X。焦点陷阱,Escape 关闭。
  - 统计跨轮次持久化;重置统计(Reset stats)位于 StatsBlock 内,作为低调的 'reset' 链接,带确认弹出框。
  - public/favicon.svg 如资源(Assets)部分所述。index.html:lang en,<meta name='theme-color' content='#FBF3E4'>,<link rel='icon' href='./favicon.svg' type='image/svg+xml'>,<title>[GAME] — a five-letter puzzle</title>。
  - 在项目根目录编写 ASSETS.md,如资源(Assets)部分所述。
  - dist/ 包含 index.html、带哈希的 JS/CSS、woff2 字体和 favicon.svg。保持在 3 MB 以下。

## 变量
- [GAME] — 游戏名称(默认:“Larkspur”)。虚构游戏的名称,一个单词。用于字标、标题、分享文本和 localStorage 键。绝不使用真实游戏名。
- [FLAVOR] — 词汇主题(默认:“everyday English words”)。一个小写短语,命名答案列表的主题。重写 40 个答案(以及帮助文案)以适配该列表。保持单词常见且恰好五个字母。
- [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接,指向 https://vibefather.ai/t/daily-word-puzzle-game(默认:是;删除此行即可移除)

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

## 设计
### 颜色(Colors)
- 奶油色(Cream)`#FBF3E4` — 页面背景 — 温暖的街机日光。
- 面板色(Panel)`#FFFBF0` — 结果面板、帮助弹窗。
- 卡片色(Card)`#FFFFFF` — 提交前的方块、按键、提示条。
- 线条色(Line)`#E5D9C0` — 方块和按键的 2px 边框(面板上为 1px)。
- 墨色(Ink)`#241F16` — 提交前的方块字母、标题、正文。
- 柔和墨色(Soft Ink)`#6E6552` — 提示、统计标签、示例轮换行。
- 万寿菊色(Marigold)`#E8A33C` — 唯一强调色:命中方块、主按钮、获胜分布条、焦点环、字标圆点。
- 深万寿菊色(Marigold Deep)`#C4842A` — 主按钮的悬停/按下态。
- 万寿菊雾色(Marigold Mist)`#F8E8CB` — 提示条填充、选中态。
- 命中色(Hit)`#E8A33C` — 正确字母方块填充(与强调色相同——由游戏独占)。
- 近似色(Near)`#F3D9A4` — 存在但位置错误的方块填充:更浅的万寿菊色,配可可色 2px 边框,使其永远不会被误读为命中色。
- 未命中色(Miss)`#D8CFBC` — 不存在字母的方块填充和禁用按键。
- 石板墨色(Slate Ink)`#241F16` — 万寿菊填充上的文字(保持深色以维持温暖感)。
- 良好色(Good)`#5E8C4A` — 连续记录刻度、复制确认。

### 字体排印(Typography)
- 展示字体:字标、结果标题、大号答案揭晓 — Bricolage Grotesque:Bricolage Grotesque(OFL),字重 400/600
- 文本与界面:方块、按键、统计、帮助 — Inter;统计使用等宽数字:Inter(OFL),字重 400/500/700

### 布局与动效(Layout & motion)
- 间距:8px 基准单位。外壳最大宽度 560px 居中;棋盘宽 350px(方块 62px,间隙 8px;缩放至 92vw,方块为 min(62px, 16vw));键盘占满外壳宽度,按键高 40px,间隙 6px。顶栏 56px。字号体系:字标 22px Bricolage 600;方块字母 Inter 700 26px 大写;按键字母 Inter 600 14px 大写;结果标题 24px Bricolage 600;统计数字 Inter 700 22px 等宽;正文和帮助 14.5px / 1.6;提示条 13px。按钮:高度 44px,Inter 600 13.5px;主按钮万寿菊填充配石板墨色文字,幽灵按钮 1px 线条色边框。全局焦点:2px 万寿菊色轮廓,3px 偏移。
- 圆角:方块和主按钮 12px;按键 10px;面板和弹窗 8px;提示条和胶囊 999px。
- 动效:缓动:翻转使用 --ease-io cubic-bezier(0.65, 0, 0.35, 1);结果面板使用弹簧(刚度 420,阻尼 26)。街机般干脆,绝不拖沓。
- 动效:方块输入:每个字母在输入时弹入(缩放 0.9→1,90ms)。
- 动效:方块翻转:该行的五个方块依次翻转(110ms 错峰,每个 520ms:rotateX 0→90→0),在中点揭示状态颜色;按键在每次落定时重新着色。
- 动效:无效抖动:行 ±6px,三个周期,总计 300ms,然后静止。
- 动效:获胜:完成行的方块依次弹跳一次(translateY -8px,每个 80ms,错峰)——小小的喜悦,没有彩纸。
- 动效:结果面板(ResultPanel):以弹簧效果在表内向上滑入;分布条在 400ms 内从 0 增长,错峰 40ms;获胜条带有万寿菊色填充。
- 动效:帮助弹窗:遮罩 160ms,面板以弹簧效果从 0.96→1 缩放。
- 动效:提示条:上升 6px,160ms,2.2s 后自动消失。
- 动效:prefers-reduced-motion: reduce — 状态即时切换(无翻转、无抖动位移、无弹跳),分布条以全宽渲染,面板仅淡入;游戏保持完全可玩。在 index.css 中使用 CSS @media 以及 Motion 的 useReducedMotion。
- 图像:完全无图片:方块、按键、标签、分布图和 favicon 均以代码绘制。分享格式使用纯文本中的 unicode 方框字符——绝不使用彩色方块 emoji。图标:仅 lucide-react,描边宽度 1.75。

## 页面与区块
### 游戏 (`index.html`)
1. **内容文件与文案规则** — 以下所有文案均针对默认值编写([GAME] = Larkspur,[FLAVOR] = everyday English words)。将所有字符串和两个词表放入 src/content.ts 并从中渲染。若任何变量不同,请重写 40 个答案和 80 个可接受额外词,使其符合 [FLAVOR](均为恰好五个字母、常见、美式拼写),并调整帮助文案中的示例词。帮助文案:'Guess the word in six tries.' / 'Each guess must be a five-letter word we know (the list is kind, not huge).' / 'After each guess, the tiles show how close you are.' / 示例:'STARE — the S is in the word and in place (a full marigold tile)';'CRANE — the R is in the word, wrong spot (pale tile with a border)';'PLUMB — the U isn't in the word at all (gray tile).' / 冷面台词:'No letters are double-counted unless the word doubles them — fairness beats cleverness.' / 失败台词:'The word was {answer}. Tomorrow's word forgives everything. (There's no tomorrow — just press next.)' 示例答案列表(40 个,全部写入 content.ts):CRANE, PLANT, BRICK, MOUSE, DRIFT, SPARK, GLOVE, TIDAL, MARCH, QUITE, FROST, GRAPE, SWORD, HONEY, PEARL, CLOUD, SHINE, BREAD, RIVER, STONE, LEAFY, MIRTH, VOCAL, WIDEN, ZESTY, BLAZE, CHARM, DWELL, EAGER, FLINT, GRASP, HABIT, IVORY, JOUST, KNEEL, LUNAR, MEDAL, NOBLE, ORBIT, PIQUE。可接受额外词(另 80 个;以相同语气写出合理的常见五字母词)。统计标签:'Played'、'Win %'、'Streak'、'Best';分布标题 'Guesses it took';示例轮换行 'Sample rotation · puzzle {n} of 40 · no dates here'。
   布局:不适用
   动效:不适用
2. **顶栏** — 左侧:字标 '[GAME]'(Bricolage 600 22px)带一个 Marigold(万寿菊色)圆点。右侧:两个图标按钮——HelpButton(CircleHelp)和 StatsButton(ChartNoAxesColumn),分别打开 HelpModal 和(回合之间)ResultPanel 的统计。400px 以下字标缩小,按钮保留。
   布局:56px 行高,Cream(奶油色)背景,Line(线条色)底边框;粘性定位。
3. **棋盘** — 六个 TileRow,每行五个 Tile。空 Tile:Card(卡片色)填充,2px Line 边框,无字母。输入时逐字母填充当前行的 Tile(弹入)。已提交的行保留字母并带状态填充(命中 Marigold(万寿菊色)/ 接近为带边框的浅色 / 未中为灰色),每种状态使用 Ink(墨色)到白色的文字对比。当前行静止。棋盘下方,游戏进行中显示一行安静的状态文字:'Puzzle {n} · six tries'(Soft Ink(柔和墨色),12.5px)。
   布局:居中;棋盘宽度 min(350px, 92vw);键盘上方 28px。
4. **键盘** — 三行:QWERTYUIOP / ASDFGHJKL / (Enter) ZXCVBNM (Backspace)。按键为真实按钮;状态填充按设计规范;Enter 主键加宽(70px),Backspace 带 Delete 图标。悬停上浮 1px;按下下沉 1px。
   布局:底部全壳宽度;按键高度 44px(Enter 行 52px),6px 间距;margin-bottom 适配安全区域。
5. **结果面板与帮助弹窗** — ResultPanel(内嵌于面板,回合结束后替换键盘区域):标题 'Solved in {n}/6' 或 'Out of tries';答案以 Bricolage 600 26px 显示;StatsBlock(四个数字 + 分布);ShareRow('Copy result' 主按钮 + 安静的 'Next puzzle' 幽灵按钮,带示例轮换行);一个 'reset stats' 链接,打开确认弹出框('Reset your stats? The tiles forget faster than you will.')。HelpModal:规则、三行 ExampleTile、冷面台词、关闭 X;从 HelpButton 打开,并在访客首次游戏时自动打开(localStorage 标记)。
   布局:ResultPanel 最大宽度 420px 居中;弹窗 420px 居中于遮罩之上。

## 资产(Assets)
- 图片(image):完全不使用图片:所有视觉元素都用代码绘制。不要获取或热链任何内容。
- 图片(image):在项目根目录写入 ASSETS.md,列出代码绘制的资产(tiles、keys、distribution bars、favicon——“drawn in code, original”)以及 npm 包:@fontsource-variable/bricolage-grotesque 和 @fontsource-variable/inter(OFL-1.1)以及 lucide-react(ISC)。说明词表是原创精选列表。
- 图标(icon):仅使用 lucide-react:ChartNoAxesColumn、Check、CircleHelp、Copy、Delete、X。描边宽度 1.75,16–20px,颜色继承。public/favicon.svg:viewBox 0 0 32 32,一个 32x32 的圆角方块填充 #241F16,一个万寿菊色(#E8A33C)五格行字形(五个小圆角方块,中间一个填充万寿菊色,其余为描边)。不使用品牌标志。
- 字体(font):安装 @fontsource-variable/bricolage-grotesque 和 @fontsource-variable/inter,并在 src/fonts.ts 中按 Setup 中列出的方式导入它们。Vite 会将 woff2 文件打包到 dist/ 中。

## 禁止事项(Don'ts)
- 无后端、无表单提交、无 API 请求、无网络:统计和状态仅持久化到 localStorage;分享行复制到剪贴板。
- 每个内部链接都是游戏本身(./index.html)——绝不指向裸目录;只有一个页面。
- 不得与 Wordle 或任何真实单词游戏相似:不同的名称、颜色、方块形状、分享格式(unicode 方块字符,绝不用彩色方块 emoji),以及原创词表——不得抓取词典。
- 无每日锁定或真实日期:谜题按完成的回合轮换,并带有诚实的“sample rotation”标签;不打印今天的日期或年份。
- 无图片、照片或 logo;一切皆为代码绘制。
- 自托管一切:字体通过 Fontsource,图标作为 npm 包或内联 SVG。无 CDN <script> 或 <link> 标签,无 Google Fonts,无分析。
- 生产构建:压缩,无 source maps,不将 src/ 复制到 dist/,单条命令 npm run build,输出在 dist/ 下小于 3 MB。
- 绝不在游戏内提及 VibeFather,除了键盘下方页脚角落的一行署名“Built with a VibeFather template”,链接到 https://vibefather.ai,安静的一行。
- 尊重 prefers-reduced-motion:即时状态切换,无抖动/弹跳;游戏保持完全可通过键盘和触摸游玩。
- 游戏必须在 1440x900 桌面和 390x844 移动端零控制台错误运行;物理键盘和屏幕键盘均可游玩;帮助模态框、统计和复制按钮仅用键盘即可操作,并有可见的焦点环。
- 无障碍:方块带有 aria-labels 描述字母和状态;状态变化通过 aria-live 礼貌播报;键盘是真实按钮;颜色绝不单独承载含义(接近的方块获得边框 + 圆点)。

---
— Prompt by VibeFather · https://vibefather.ai/t/daily-word-puzzle-game · 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: "Daily Word Puzzle Game"
colors:
  cream: "#FBF3E4"
  panel: "#FFFBF0"
  card: "#FFFFFF"
  line: "#E5D9C0"
  ink: "#241F16"
  soft_ink: "#6E6552"
  marigold: "#E8A33C"
  marigold_deep: "#C4842A"
  marigold_mist: "#F8E8CB"
  hit: "#E8A33C"
  near: "#F3D9A4"
  miss: "#D8CFBC"
  slate_ink: "#241F16"
  good: "#5E8C4A"
typography:
  display_wordmark_result_headings_big_answer_reveal_bricolage_grotesque: { family: "Bricolage Grotesque", weights: [400, 600] }
  text_and_ui_tiles_keys_stats_help_inter_tabular_numerals_for_stats: { family: "Inter", weights: [400, 500, 700] }
spacing: "8px base unit. Shell max-width 560px centered; board 350px wide (tiles 62px, gap 8px; scales to 92vw with tiles at min(62px, 16vw)); keyboard full shell width, keys 40px tall with 6px gaps. Top bar 56px. Type scale: wordmark 22px Bricolage 600; tile letters Inter 700 26px uppercase; key letters Inter 600 14px uppercase; result heading 24px Bricolage 600; stats numerals Inter 700 22px tabular; body and help 14.5px / 1.6; toasts 13px. Buttons: height 44px, Inter 600 13.5px; primary Marigold fill with Slate Ink text, ghost 1px Line border. Focus everywhere: 2px Marigold outline, 3px offset."
radius: "12px on tiles and primary buttons; 10px on keys; 8px on panels and modals; 999px for toasts and pills."
---

# Daily Word Puzzle Game — 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
- **Cream** `#FBF3E4` — Page background — warm arcade daylight.
- **Panel** `#FFFBF0` — Result panel, help modal.
- **Card** `#FFFFFF` — Tiles before commit, keys, toasts.
- **Line** `#E5D9C0` — 2px tile and key borders (1px on panels).
- **Ink** `#241F16` — Tile letters pre-commit, headings, body.
- **Soft Ink** `#6E6552` — Hints, stats labels, the sample-rotation line.
- **Marigold** `#E8A33C` — The one accent: hit tiles, primary buttons, winning distribution bar, focus ring, wordmark dot.
- **Marigold Deep** `#C4842A` — Hover/pressed primary.
- **Marigold Mist** `#F8E8CB` — Toast fills, selected states.
- **Hit** `#E8A33C` — Correct-letter tile fill (same as the accent — the game owns it).
- **Near** `#F3D9A4` — Present-elsewhere tile fill: a paler marigold with a Cocoa 2px border so it never reads as the hit color.
- **Miss** `#D8CFBC` — Absent-letter tile fill and disabled keys.
- **Slate Ink** `#241F16` — Text on marigold fills (kept dark for warmth).
- **Good** `#5E8C4A` — Streak ticks, copied confirmation.

## Typography
- **Display: wordmark, result headings, big answer reveal — Bricolage Grotesque** — Bricolage Grotesque (OFL), weights 400/600. Self-host the font files.
- **Text and UI: tiles, keys, stats, help — Inter; tabular numerals for stats** — Inter (OFL), weights 400/500/700. Self-host the font files.

## Spacing & shape
- Spacing: 8px base unit. Shell max-width 560px centered; board 350px wide (tiles 62px, gap 8px; scales to 92vw with tiles at min(62px, 16vw)); keyboard full shell width, keys 40px tall with 6px gaps. Top bar 56px. Type scale: wordmark 22px Bricolage 600; tile letters Inter 700 26px uppercase; key letters Inter 600 14px uppercase; result heading 24px Bricolage 600; stats numerals Inter 700 22px tabular; body and help 14.5px / 1.6; toasts 13px. Buttons: height 44px, Inter 600 13.5px; primary Marigold fill with Slate Ink text, ghost 1px Line border. Focus everywhere: 2px Marigold outline, 3px offset.
- Radius: 12px on tiles and primary buttons; 10px on keys; 8px on panels and modals; 999px for toasts and pills.

## Motion
- Easing: --ease-io cubic-bezier(0.65, 0, 0.35, 1) for flips; a spring (stiffness 420, damping 26) for the result panel. Arcade-crisp, never sluggish.
- Tile typing: each letter pops in (scale 0.9→1, 90ms) as it's typed.
- Tile flip: the row's five tiles flip in sequence (110ms stagger, 520ms each: rotateX 0→90→0) revealing state colors at midpoint; keys recolor as each lands.
- Invalid shake: row ±6px, three cycles, 300ms total, then rest.
- Win: the completed row's tiles bounce once in sequence (translateY -8px, 80ms each, staggered) — small joy, no confetti.
- ResultPanel: slides up in-sheet with the spring; distribution bars grow from 0 over 400ms staggered 40ms; the winning bar carries a Marigold fill.
- Help modal: scrim 160ms, panel scale 0.96→1 with the spring.
- Toast: rises 6px, 160ms, auto-dismiss 2.2s.
- prefers-reduced-motion: reduce — states swap instantly (no flips, no shake translation, no bounce), bars render at full width, panel fades only; the game stays fully playable. Use CSS @media in index.css plus Motion's useReducedMotion.

## Imagery
No images at all: tiles, keys, chips, the distribution chart and the favicon are drawn in code. The share format uses unicode box characters in plain text — never colored-square emoji. Icons: lucide-react only, stroke width 1.75.

## Tone
Warm-arcade: short, kind, lightly teasing on a loss. One dry line in the help modal.

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

改成你自己的

  • 课堂词汇游戏:将 GAME 设置为你的测验名称,将 FLAVOR 设置为本周的拼写单词,并将 40 个答案重写为课程中的五字母术语。
  • 美食出版物的每日休息:将 FLAVOR 设置为食物单词,保留奶油色和万寿菊色调色板,并将帮助文案替换为你的编辑口吻。
  • 会议或活动展台游戏:将 GAME 设置为活动文字标识,并围绕行业主题设置 FLAVOR,让参观者可以在会议间隙游玩。
  • 创作者的社区热身:将 GAME 设置为你的账号的游戏名称,并围绕你的领域重写答案,让常客回来参与下一次示例轮换。

每日单词拼图游戏:常见问题

如何更改每日单词拼图游戏中的单词列表和主题?

每日单词拼图游戏模板在其内容文件中保留了两个纯单词列表:40 个围绕 FLAVOR 变量主题的精选五字母答案,以及 80 个额外接受的猜测词。要更换游戏主题,请将 FLAVOR 设置为一个小写短语(如 "food words"),并重写 40 个答案以匹配主题,确保每个单词恰好五个字母且足够常见以便猜测。接受列表必须包含所有答案以及额外的常见单词。

怎么用 AI 做一个每日单词拼图游戏?

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