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.

Merge branch 'main' into int/home2

matin113362f64639
diff --cc tests/pages.test.js
index 82d2ce34,424ae8d9..9fa437be
--- a/tests/pages.test.js
+++ b/tests/pages.test.js
@@@ -416,17 -415,11 +416,18 @@@ test('the home page uses Schibsted Grot
assert.ok(HOME.includes("url('assets/fonts/schibsted-latin.woff2')"), 'Latin font file');
assert.ok(HOME.includes("url('assets/fonts/schibsted-latin-ext.woff2')"), 'Latin Extended font file');
for (const old of ['Bricolage', 'PlexMono', 'var(--mono)', '--mono:']) assert.ok(!HOME.includes(old), `still uses ${old}`);
- assert.ok(HOME.includes('See 129 web animations move, learn when to use each one, and copy a prompt to build it.'));
+ assert.ok(HOME.includes('<h1 class="h1" id="hero-title">What do you want to animate?</h1>'), 'heading');
+ assert.ok(HOME.includes('Pick a place, or describe it in your own words. Every animation plays live, and each one comes with a ready-made prompt for your AI assistant.'), 'intro line');
+});
+
+test('the counts written on the home page match its cards', () => {
+ const cards = homeConst('CATS').reduce((n, cat) => n + cat.entries.length, 0);
+ assert.ok(HOME.includes(`${cards} free animations · no coding needed`), 'hero pill');
+ assert.ok(HOME.includes(`<span id="more-label">Browse all ${cards} animations</span>`), 'Browse all button');
});
- // The value of `const NAME=` in the home page's script: an array or object literal of plain data, read with vm.
+ // The value of `const NAME=` in the home page's script: an array or object literal of plain data, read with vm. Looking for the end
+ // of the literal, it steps over strings and // comments, so a quote or bracket inside either does not count.
function homeConst(name) {
const start = HOME.indexOf(`const ${name}=`);
assert.ok(start >= 0, `const ${name} in index.html`);