Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Workflow-specific AI prompts live in [`.claude/commands/`](../.claude/commands/)
| --- | --- |
| `add-solution.md` | Generate a TypeScript solution walkthrough for a challenge from any input format |
| `a11y-audit.md` | Accessibility audit using persona simulation, semantic code review, and axe output |
| `create-presentation.md` | Create a Reveal.js or PowerPoint presentation deck |
| `create-presentation.md` | Create a Slidev or PowerPoint presentation deck |
| `keyboard.md` | Keyboard accessibility rules for interactive UI elements |
| `navigation.md` | Navigation landmark structure and accessibility rules |
| `progressive-enhancement.md` | Progressive enhancement rules for web features |
Expand All @@ -30,5 +30,5 @@ Reusable files for contributors.
| --- | --- |
| `solution/beginner.ts` | Annotated TypeScript template for writing a solution walkthrough |
| `generate-pptx.mjs` | Script that generates `public/downloads/offon-deck-template.pptx` |
| `generate-reveal-zip.mjs` | Script that generates `public/downloads/offon-reveal-template.zip` |
| `generate-slidev-zip.mjs` | Script that generates `public/downloads/offon-slidev-template.zip` |
| `bg.png` | Pre-rendered firefly gradient background for presentation slides |
75 changes: 0 additions & 75 deletions .ai/templates/generate-reveal-zip.mjs

This file was deleted.

45 changes: 45 additions & 0 deletions .ai/templates/generate-slidev-zip.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Bundles the pre-built Slidev template from public/decks/template/ into a
* self-contained zip. Users download, unzip, and open index.html locally.
*
* The zip uses relative paths so it works unpacked anywhere.
*
* Run: node .ai/templates/generate-slidev-zip.mjs
*
* Requires jszip (devDependency). The Slidev output must already be built:
* cd decks/template && pnpm build
*/

import JSZip from 'jszip'
import { resolve, dirname, relative } from 'node:path'
import { fileURLToPath } from 'node:url'
import { readFileSync, writeFileSync, readdirSync, statSync } from 'node:fs'

const __dir = dirname(fileURLToPath(import.meta.url))
const ROOT = resolve(__dir, '../..')
const SRC = resolve(ROOT, 'public/decks/template')
const OUT = resolve(ROOT, 'public/downloads/offon-slidev-template.zip')

function addDir(zip, fsDir) {
for (const entry of readdirSync(fsDir)) {
const fsPath = resolve(fsDir, entry)
const zipPath = relative(SRC, fsPath)
if (statSync(fsPath).isDirectory()) {
addDir(zip, fsPath)
} else {
zip.file(zipPath, readFileSync(fsPath))
}
}
}

const zip = new JSZip()
const dir = zip.folder('offon-slidev-template')
addDir(dir, SRC)

const output = await zip.generateAsync({
type: 'nodebuffer',
compression: 'DEFLATE',
compressionOptions: { level: 6 },
})
writeFileSync(OUT, output)
console.log('Done → public/downloads/offon-slidev-template.zip')
Loading
Loading