html-slideshow
A responsive slideshow bundled into one self-contained, minified .html.
Author slides in HTML; the engine (assets/base.css + base.js) plus a Bun build
produce the final file. Requires Bun.
Workflow
- Check the runtime —
bun --version(install from bun.sh if missing; verified with 1.4.0). - Copy the template — copy
assets/base.html,assets/base.css, andassets/base.jsinto a deck folder in the user's workspace (side by side). The.htmlcan be renamed freely (e.g.my-deck.html);base.cssandbase.jsare referenced by relative path from the.html, so renaming them requires updating those references. - Set title — in the
.html, edit<title>. The deck renders dark by default; printing switches to a forced light palette automatically. - Add slides — in
<main id="deck">, one<section class="slide">per slide:<section class="slide"> <h2>Quarterly results</h2> <ul><li>Revenue up 24%</li></ul> </section> - Custom CSS/JS — linked files only, never inline. Do not add
<style>or<script>blocks to the.html— it holds only the page skeleton and slide content; the build inlines the linked files into the final self-contained file, which keeps the source editable and the engine single-source. Two sanctioned homes for custom code: editbase.css/base.jsdirectly, or — for deck-specific styling/behavior isolated from the engine — add<link rel="stylesheet" href="extra.css">/<script src="extra.js" defer></script>(the build inlines them; keepbase.*unmodified where possible — seereferences/bundling-assets.md). (Recipes inreferences/slide-patterns.mdfollow this.) - Size with container units — never
px. Each slide is a CSS query container, so usecqw/cqh/cqminandclamp()and content scales to any screen.px/ptbreak responsiveness — don't use them (the outer frame usessvh). This is the one rule agents get wrong; full guide inreferences/responsive-units.md. Portrait viewports are handled for you: slides render at their landscape canvas and scale to fit, so wide tables/grids never overflow a phone screen (--slide-w/--slide-hon:root, default16/9). - Build — run the skill's build script:
bun scripts/build.js my-deck.html(wrapsbun build --compile --target=browser --minify my-deck.html --outdir dist; runs on any OS Bun does) →dist/my-deck.html: a single, minified, self-contained file with the CSS, JS, and any referenced assets inlined. This is the file you distribute. - Verify the built file in a browser tool (a
file://URL todist/my-deck.html). Pass: controls render; ArrowRight advances the counter to "2 / N" and setslocation.hashto#2; a ~400×800 viewport still shows one fully visible letterboxed slide;Otoggles the overview; print-media emulation yields one slide per page. Signals are documented inreferences/using-the-deck.md. If no browser tool is available, say visual verification was skipped. - Clean up — nothing beyond the build output is created; keep
my-deck.html,base.css, andbase.js(the editable source) besidedist/my-deck.html(the file you distribute). If the user wants only the single file, movedist/my-deck.htmlwherever they expect the deck and keep the deck folder as its source.
Reference index
Load on demand — not all up front:
references/using-the-deck.md— setup, the slide contract, full navigation, deep links (#5opens slide 5;#some-idopens the slide holding that id; use for citations → sources), the build, and print.references/slide-patterns.md— ready-made slide recipes + authoring guidance.references/responsive-units.md— the no-pxfluid-sizing guide.references/bundling-assets.md— inline SVG / data-URI assets (the build also inlines relative refs).references/engine-anatomy.md— map of the engine (base.html/base.css/base.js) for changing it.examples/quickstart.html— a filled deck (source; build it for a self-contained file).examples/README.md— the example deck's two forms (readable source vs built standalone) and how to rebuild the standalone after edits.
When to use
When the output should be shown one full screen at a time: a talk, lesson, demo, status update, or pitch. Not for scrolling prose or documents.