Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

docs: the README shows the new pictures, with a phone version, a still for reduced motion and a fixed size so the page does not jump, and a test that every picture it names is in the repository

matin0c2165407228
diff --git a/README.md b/README.md
index ccab3c3d..2beb9813 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
<div align="center">
-<a href="https://matinmonshizadeh.github.io/animation-handbook/"><picture><source media="(prefers-reduced-motion: reduce)" srcset="docs/hero.png"><img src="docs/hero.gif" alt="Six animations from the handbook playing at once: Text Particles, Synthwave Grid, Liquid Glass, Shatter Effect, Holographic Card and Dynamic Island. Animation Handbook — 166 web animation techniques with live demos" width="820"></picture></a>
+<a href="https://matinmonshizadeh.github.io/animation-handbook/"><picture><source media="(prefers-reduced-motion: reduce) and (max-width: 600px)" srcset="docs/hero-phone-still.webp" width="820" height="922"><source media="(prefers-reduced-motion: reduce)" srcset="docs/hero-still.webp"><source media="(max-width: 600px)" srcset="docs/hero-phone.webp" width="820" height="922"><img src="docs/hero.webp" alt="Six animations from the handbook playing at once: Text Particles, Synthwave Grid, Liquid Glass, Shatter Effect, Holographic Card, and Dynamic Island, six of its 166 web animation techniques" width="820" height="354"></picture></a>
# Animation Handbook
@@ -27,7 +27,7 @@ Everything is plain HTML, CSS, and JavaScript: no build step, no frameworks, no
3. **Copy the prompt.** Paste it into your AI assistant. It describes the animation in plain words, with your settings. The cards on the home page have a Copy prompt button too.
<div align="center">
-<a href="https://matinmonshizadeh.github.io/animation-handbook/"><img src="docs/demo.gif" alt="Screen recording: pressing Buttons on the home page brings up cards with live animations, Success Confetti opens and plays its demo, and Copy prompt shows Copied" width="820"></a>
+<a href="https://matinmonshizadeh.github.io/animation-handbook/"><picture><source media="(prefers-reduced-motion: reduce) and (max-width: 600px)" srcset="docs/demo-phone-still.webp" width="820" height="1531"><source media="(prefers-reduced-motion: reduce)" srcset="docs/demo-still.webp"><source media="(max-width: 600px)" srcset="docs/demo-phone.webp" width="820" height="1531"><img src="docs/demo.webp" alt="Screen recording of the handbook: on the home page, pressing Buttons brings up cards with live previews, Success Confetti opens and plays its demo, and Copy prompt shows Copied" width="820" height="522"></picture></a>
</div>
## Categories
diff --git a/tests/pages.test.js b/tests/pages.test.js
index b2793980..1a960a60 100644
--- a/tests/pages.test.js
+++ b/tests/pages.test.js
@@ -569,7 +569,9 @@ test('the Full catalog in the root README lists every card once, in home order,
test('the counts written in the root README match the cards', () => {
const cats = homeConst('CATS'), cards = totalCards();
const readme = read(path.join(ROOT, 'README.md'));
- assert.equal(numberIn(readme, /<img src="docs\/hero\.gif" alt="[^"]*?(\d+) web animation techniques/), cards, "README: the picture's alt text");
+ assert.equal(numberIn(readme, /<img src="docs\/hero\.webp" alt="[^"]*?(\d+) web animation techniques/), cards, "README: the picture's alt text");
+ // Every picture the README shows (img src and source srcset) is in the repository.
+ for (const [, file] of readme.matchAll(/\s(?:src|srcset)="(docs\/[^"]+)"/g)) assert.ok(fs.existsSync(path.join(ROOT, file)), `README: ${file} is in the repository`);
assert.equal(numberIn(readme, /^\*\*A visual reference of (\d+) web animation techniques/m), cards, 'README: the intro line');
assert.equal(numberIn(readme, /badge\/techniques-(\d+)-/), cards, 'README: the techniques badge');
assert.equal(numberIn(readme, /^All (\d+) techniques, each linked to its live demo\.$/m), cards, 'README: the Full catalog line');