An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
feat(site): a bookshelf you can see is a bookshelf
yzrfec6f84f8c5e
diff --git a/site/assets/covers/elementary-algebra.webp b/site/assets/covers/elementary-algebra.webpnew file mode 100644index 0000000..29fc563Binary files /dev/null and b/site/assets/covers/elementary-algebra.webp differdiff --git a/site/assets/covers/joke-collection.webp b/site/assets/covers/joke-collection.webpnew file mode 100644index 0000000..e1c8fd1Binary files /dev/null and b/site/assets/covers/joke-collection.webp differdiff --git a/site/assets/covers/little-red-riding-hood.webp b/site/assets/covers/little-red-riding-hood.webpnew file mode 100644index 0000000..2a4159cBinary files /dev/null and b/site/assets/covers/little-red-riding-hood.webp differdiff --git a/site/assets/covers/madness.webp b/site/assets/covers/madness.webpnew file mode 100644index 0000000..ee2ca8dBinary files /dev/null and b/site/assets/covers/madness.webp differdiff --git a/site/assets/covers/math-notebook.webp b/site/assets/covers/math-notebook.webpnew file mode 100644index 0000000..c5e1c9bBinary files /dev/null and b/site/assets/covers/math-notebook.webp differdiff --git a/site/assets/covers/pandemic.webp b/site/assets/covers/pandemic.webpnew file mode 100644index 0000000..e45fd3aBinary files /dev/null and b/site/assets/covers/pandemic.webp differdiff --git a/site/assets/covers/science.webp b/site/assets/covers/science.webpnew file mode 100644index 0000000..e8dda6eBinary files /dev/null and b/site/assets/covers/science.webp differdiff --git a/site/assets/covers/shooting-an-elephant.webp b/site/assets/covers/shooting-an-elephant.webpnew file mode 100644index 0000000..80afc35Binary files /dev/null and b/site/assets/covers/shooting-an-elephant.webp differdiff --git a/site/assets/covers/three-little-pigs.webp b/site/assets/covers/three-little-pigs.webpnew file mode 100644index 0000000..ee0eda3Binary files /dev/null and b/site/assets/covers/three-little-pigs.webp differdiff --git a/site/assets/shelf/bay1.webp b/site/assets/shelf/bay1.webpnew file mode 100644index 0000000..69929e4Binary files /dev/null and b/site/assets/shelf/bay1.webp differdiff --git a/site/assets/shelf/bay2.webp b/site/assets/shelf/bay2.webpnew file mode 100644index 0000000..89a0a91Binary files /dev/null and b/site/assets/shelf/bay2.webp differdiff --git a/site/assets/shelf/bay3.webp b/site/assets/shelf/bay3.webpnew file mode 100644index 0000000..be8582dBinary files /dev/null and b/site/assets/shelf/bay3.webp differdiff --git a/site/assets/shelf/bay4.webp b/site/assets/shelf/bay4.webpnew file mode 100644index 0000000..20bcd80Binary files /dev/null and b/site/assets/shelf/bay4.webp differdiff --git a/site/assets/shelf/cap.webp b/site/assets/shelf/cap.webpnew file mode 100644index 0000000..290e99cBinary files /dev/null and b/site/assets/shelf/cap.webp differdiff --git a/site/assets/shelf/drawers.webp b/site/assets/shelf/drawers.webpnew file mode 100644index 0000000..4b49c27Binary files /dev/null and b/site/assets/shelf/drawers.webp differdiff --git a/site/assets/shelf/lip1.webp b/site/assets/shelf/lip1.webpnew file mode 100644index 0000000..9c03097Binary files /dev/null and b/site/assets/shelf/lip1.webp differdiff --git a/site/assets/shelf/lip2.webp b/site/assets/shelf/lip2.webpnew file mode 100644index 0000000..df58f96Binary files /dev/null and b/site/assets/shelf/lip2.webp differdiff --git a/site/assets/shelf/lip3.webp b/site/assets/shelf/lip3.webpnew file mode 100644index 0000000..be078e5Binary files /dev/null and b/site/assets/shelf/lip3.webp differdiff --git a/site/assets/shelf/lip4.webp b/site/assets/shelf/lip4.webpnew file mode 100644index 0000000..5da7b81Binary files /dev/null and b/site/assets/shelf/lip4.webp differdiff --git a/site/assets/shelf/wall.webp b/site/assets/shelf/wall.webpnew file mode 100644index 0000000..227ee47Binary files /dev/null and b/site/assets/shelf/wall.webp differdiff --git a/site/index.html b/site/index.htmlindex e15fa22..488f17a 100644--- a/site/index.html+++ b/site/index.html@@ -19,66 +19,123 @@<script src="lib/bookshelf.js" defer></script></head><body>-<main id="shelf" aria-labelledby="shelf-title">- <header class="shelf-top">- <h1 id="shelf-title"><a class="shelf-brand" href="./"><span aria-hidden="true">∞</span> Papermorph</a></h1>- <p>Animated books · A growing collection</p>- </header>- <figure class="photo-shelf" aria-label="Three shelves: STEM, picture books for children, and video essays">- <img class="shelf-photo" src="assets/bookshelf.webp" width="1086" height="1448" alt="A wooden bookshelf. Algebra, mathematics and physics books on the top shelf marked STEM; picture books on the middle shelf: The Three Little Pigs, Little Red Riding Hood and Joke Collection; philosophy and history books on the bottom shelf marked Video Essay, among them Shooting an Elephant and The Pandemic; two drawers below, marked GitHub and YouTube." fetchpriority="high">- <div id="shelf-books">- <section class="shelf-tier" aria-labelledby="stem-title">- <h2 class="visually-hidden" id="stem-title">STEM · Mathematics</h2>- <a class="book-hotspot algebra-book" data-book="elementary-algebra" href="elementary-algebra/" aria-label="Open Elementary Algebra, 68 narrated chapters">- <span class="book-caption"><strong>Elementary Algebra <span aria-hidden="true">↗</span></strong><small>68 narrated chapters</small></span>+<main id="shelf">+ <div class="scene">+ <h1 class="banner">+ <button type="button" id="shelf-about-button" aria-label="Papermorph: about this bookshelf" aria-haspopup="dialog">+ <svg viewBox="0 0 1000 176" role="img" aria-hidden="true">+ <defs>+ <pattern id="cloth" width="28" height="28" patternUnits="userSpaceOnUse"><rect width="28" height="28" fill="#1c1f1d"/><path d="M0 28 14 4 28 28M0 0l14 24L28 0" fill="none" stroke="#e9e4d6" stroke-opacity=".16" stroke-width="1.2"/><circle cx="14" cy="14" r="1.6" fill="#e9e4d6" fill-opacity=".3"/></pattern>+ <pattern id="trim" width="22" height="16" patternUnits="userSpaceOnUse"><rect width="22" height="16" fill="#131514"/><circle cx="11" cy="8" r="4.5" fill="none" stroke="#e9e4d6" stroke-opacity=".7" stroke-width="1.4"/></pattern>+ <pattern id="w1" width="10" height="10" patternUnits="userSpaceOnUse"><rect width="10" height="10" fill="#f3efe3"/><circle cx="5" cy="5" r="1.2" fill="#2a2a26"/></pattern>+ <pattern id="w2" width="12" height="12" patternUnits="userSpaceOnUse" patternTransform="rotate(35)"><rect width="12" height="12" fill="#f3efe3"/><path d="M0 6h12" stroke="#2a2a26" stroke-width="1.3"/></pattern>+ <pattern id="w3" width="16" height="16" patternUnits="userSpaceOnUse"><rect width="16" height="16" fill="#efeadc"/><path d="M8 2 14 14H2Z" fill="none" stroke="#2a2a26" stroke-width="1.1"/></pattern>+ <pattern id="b1" width="12" height="12" patternUnits="userSpaceOnUse"><rect width="12" height="12" fill="#1a8ce8"/><circle cx="3" cy="3" r="1.6" fill="#a6dcff"/><circle cx="9" cy="9" r="1.1" fill="#0b4fa8"/></pattern>+ <pattern id="b2" width="14" height="14" patternUnits="userSpaceOnUse" patternTransform="rotate(-25)"><rect width="14" height="14" fill="#0f6fd6"/><path d="M0 7q3.5-5 7 0t7 0" fill="none" stroke="#9fd6ff" stroke-width="1.2"/></pattern>+ <filter id="cut" x="-5%" y="-10%" width="110%" height="125%">+ <feTurbulence type="fractalNoise" baseFrequency=".8" numOctaves="1" seed="4"/>+ <feDisplacementMap in="SourceGraphic" scale="3.2"/>+ <feDropShadow dx="2" dy="4" stdDeviation="2.2" flood-color="#000" flood-opacity=".55"/>+ </filter>+ </defs>+ <rect width="1000" height="176" fill="url(#cloth)"/>+ <text x="500" y="146" text-anchor="middle" textLength="940" lengthAdjust="spacing" filter="url(#cut)"+ font-family="Oswald, 'Arial Narrow', sans-serif" font-weight="600" font-size="150"><tspan fill="url(#w1)">P</tspan><tspan fill="url(#b1)">A</tspan><tspan fill="url(#w2)">P</tspan><tspan fill="url(#w3)">E</tspan><tspan fill="url(#b2)">R</tspan><tspan fill="url(#w1)">M</tspan><tspan fill="url(#w3)">O</tspan><tspan fill="url(#b1)">R</tspan><tspan fill="url(#w2)">P</tspan><tspan fill="url(#b2)">H</tspan></text>+ <rect y="160" width="1000" height="16" fill="url(#trim)"/>+ </svg>+ <span class="visually-hidden">Papermorph</span>+ </button>+ </h1>++ <div class="case">+ <div class="cap" aria-hidden="true"></div>+ <section class="shelf lessons" aria-labelledby="lessons-title">+ <div class="row">+ <a class="book" data-book="elementary-algebra" href="elementary-algebra/">+ <span class="doc"><img src="assets/covers/elementary-algebra.webp" width="960" height="540" alt=""><span class="ct" aria-hidden="true">Elementary Algebra</span></span>+ <span class="tag"><b>Elementary Algebra</b><em>Lessons · 68 chapters</em><span>Pre-algebra and algebra, narrated and animated, with quick checks and chapter practice.</span></span></a>- <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 23 narrated chapters">- <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>23 narrated chapters</small></span>+ <div class="book soon">+ <span class="doc"></span>+ <span class="tag"><b>Linear Algebra</b><em>In the works</em><span>Vectors and matrices on a plane you can drag, after MIT’s 18.06.</span></span>+ </div>+ <a class="book" data-book="math-notebook" href="math-notebook/">+ <span class="doc"><img src="assets/covers/math-notebook.webp" width="960" height="935" style="object-position: 0 40%" alt=""><span class="ct" aria-hidden="true">Elementary Mathematics</span></span>+ <span class="tag"><b>Elementary Mathematics</b><em>Lessons · 23 chapters</em><span>Middle-school mathematics, narrated and animated, with quick checks and chapter practice.</span></span></a>- <a class="book-hotspot physics-book" data-book="science" href="science/" aria-label="Open Elementary Physics, 9 narrated chapters and 2 sample chapters">- <span class="book-caption"><strong>Elementary Physics <span aria-hidden="true">↗</span></strong><small>9 narrated chapters · 2 samples</small></span>+ <a class="book" data-book="science" href="science/">+ <span class="doc"><img src="assets/covers/science.webp" width="960" height="540" alt=""><span class="ct" aria-hidden="true">Elementary Physics</span></span>+ <span class="tag"><b>Elementary Physics</b><em>Lessons · 9 chapters</em><span>Motion and forces, machines, energy, light and sound, electricity and magnetism.</span></span></a>- </section>- <section class="shelf-tier" aria-labelledby="picture-title">- <h2 class="visually-hidden" id="picture-title">Picture books for children · Three series</h2>- <a class="book-hotspot pigs-book" data-book="three-little-pigs" href="three-little-pigs/" aria-label="Open The Three Little Pigs, an animated picture book experiment and how it was made">- <span class="book-caption"><strong>The Three Little Pigs <span aria-hidden="true">↗</span></strong><small>An experiment · how it was made</small></span>+ </div>+ <div class="lip"><h2 class="label" id="lessons-title">Lessons</h2></div>+ </section>++ <section class="shelf pictures" aria-labelledby="pictures-title">+ <div class="row">+ <a class="book" data-book="three-little-pigs" href="three-little-pigs/">+ <span class="doc"><img src="assets/covers/three-little-pigs.webp" width="960" height="540" style="object-position: 72% 50%" alt=""><span class="ct" aria-hidden="true">The Three Little Pigs</span></span>+ <span class="tag"><b>The Three Little Pigs</b><em>An experiment</em><span>Art from an image model, motion from code: what we tried, and why it stayed out of the Skill.</span></span></a>- <a class="book-hotspot red-book" data-book="little-red-riding-hood" href="little-red-riding-hood/" aria-label="Open Little Red Riding Hood, a paper-cutout stop-motion picture book and how it was made">- <span class="book-caption"><strong>Little Red Riding Hood <span aria-hidden="true">↗</span></strong><small>Paper-cutout stop motion · how it was made</small></span>+ <a class="book" data-book="little-red-riding-hood" href="little-red-riding-hood/">+ <span class="doc"><img src="assets/covers/little-red-riding-hood.webp" width="960" height="540" style="object-position: 50% 40%" alt=""><span class="ct" aria-hidden="true">Little Red Riding Hood</span></span>+ <span class="tag"><b>Little Red Riding Hood</b><em>Paper cut-out</em><span>Stop motion drawn entirely in code. In the meadow, tap things to hear their names.</span></span></a>- <a class="book-hotspot joke-book" data-book="joke-collection" href="joke-collection/" aria-label="Open Joke Collection, short animated jokes, seven episodes">- <span class="book-caption"><strong>Joke Collection <span aria-hidden="true">↗</span></strong><small>7 episodes · how they were made</small></span>+ <div class="book soon">+ <span class="doc"></span>+ <span class="tag"><b>A new picture book</b><em>In the works</em><span>The next story for the youngest readers.</span></span>+ </div>+ <a class="book" data-book="joke-collection" href="joke-collection/">+ <span class="doc"><img src="assets/covers/joke-collection.webp" width="960" height="540" style="object-position: 22% 50%" alt=""><span class="ct" aria-hidden="true">Joke Collection</span></span>+ <span class="tag"><b>Joke Collection</b><em>Short films · 7 episodes</em><span>Painted sets and paper puppets moved by code, one joke an episode.</span></span></a>- </section>- <section class="shelf-tier" aria-labelledby="curious-title">- <h2 class="visually-hidden" id="curious-title">Video essays · Documentaries</h2>- <a class="book-hotspot foucault-book" data-book="madness" href="madness/" aria-label="Open Madness and Civilization, a ten-minute documentary on Michel Foucault's book">- <span class="book-caption"><strong>Madness and Civilization <span aria-hidden="true">↗</span></strong><small>A documentary · Michel Foucault</small></span>+ </div>+ <div class="lip"><h2 class="label" id="pictures-title">Picture books</h2></div>+ </section>++ <section class="shelf films" aria-labelledby="films-title">+ <div class="row">+ <a class="book" data-book="madness" href="madness/">+ <span class="doc"><img src="assets/covers/madness.webp" width="652" height="952" style="object-position: 50% 30%" alt=""><span class="ct" aria-hidden="true">Madness and Civilization</span></span>+ <span class="tag"><b>Madness and Civilization</b><em>Documentary · 10 min</em><span>Michel Foucault’s book as a short film, and the same story as upright shorts.</span></span></a>- <a class="book-hotspot elephant-book" data-book="shooting-an-elephant" href="shooting-an-elephant/" aria-label="Open Shooting an Elephant, an interactive documentary of George Orwell's essay">- <span class="book-caption"><strong>Shooting an Elephant <span aria-hidden="true">↗</span></strong><small>An interactive documentary · George Orwell</small></span>+ <a class="book" data-book="pandemic" href="pandemic/">+ <span class="doc"><img src="assets/covers/pandemic.webp" width="640" height="520" style="object-position: 50% 50%" alt=""><span class="ct" aria-hidden="true">The Pandemic</span></span>+ <span class="tag"><b>The Pandemic</b><em>Documentary · 7 min</em><span>From a market in Wuhan to the count of the dead. Also as shorts and a scroll story.</span></span></a>- <a class="book-hotspot pandemic-book" data-book="pandemic" href="pandemic/" aria-label="Open The Pandemic, a seven-minute documentary on COVID-19, and how it was made">- <span class="book-caption"><strong>The Pandemic <span aria-hidden="true">↗</span></strong><small>A documentary · how it was made</small></span>+ <div class="book soon">+ <span class="doc"></span>+ <span class="tag"><b>Time of the Magicians</b><em>In the works</em><span>Europe from 1919 to 1929 on one map: four philosophers, a year at a time.</span></span>+ </div>+ <a class="book" data-book="shooting-an-elephant" href="shooting-an-elephant/">+ <span class="sign" aria-hidden="true">Interactive</span>+ <span class="doc"><img src="assets/covers/shooting-an-elephant.webp" width="960" height="631" style="object-position: 38% 50%" alt=""><span class="ct" aria-hidden="true">Shooting an Elephant</span></span>+ <span class="tag"><b>Shooting an Elephant</b><em>Interactive documentary</em><span>George Orwell’s 1936 essay in his own words. You hold the rifle.</span></span></a>- </section>- </div>- <a class="github-drawer" href="https://github.com/DozenTwelve/Papermorph" target="_blank" rel="noopener noreferrer" aria-label="Papermorph on GitHub: source and Skills"></a>- <a class="youtube-drawer" href="https://www.youtube.com/@AnotherGameDoge" target="_blank" rel="noopener noreferrer" aria-label="The films on YouTube"></a>- <noscript><p class="shelf-noscript">Book links work without JavaScript. The animated lessons require JavaScript.</p></noscript>- </figure>- <footer class="shelf-footer">- <span>Made one book at a time.</span>- <button type="button" id="shelf-about-button">About & disclaimer</button>- <span>Independent · Noncommercial</span>- </footer>+ </div>+ <div class="lip"><h2 class="label" id="films-title">Documentaries</h2></div>+ </section>++ <section class="shelf archive" aria-labelledby="archive-title">+ <div class="row spines">+ <p class="note">Books we have moved on from will rest here, spine out.</p>+ </div>+ <div class="lip"><h2 class="label" id="archive-title">Archive</h2></div>+ </section>+ <nav class="drawers" aria-label="Elsewhere">+ <a class="drawer" href="https://github.com/DozenTwelve/Papermorph" target="_blank" rel="noopener noreferrer"><span class="visually-hidden">GitHub: the source, and the Skill that makes these books</span></a>+ <a class="drawer" href="https://www.youtube.com/@AnotherGameDoge" target="_blank" rel="noopener noreferrer"><span class="visually-hidden">YouTube: the films</span></a>+ </nav>+ </div>++ </div>+<dialog class="shelf-about" id="shelf-about" aria-labelledby="shelf-about-title"><form method="dialog"><button class="about-close" aria-label="Close">×</button></form><p class="about-kicker">A note from the bookshelf</p><h2 id="shelf-about-title">About Papermorph</h2><p>An independent, noncommercial educational project. Not affiliated with the authors or publishers of the reference books. Book titles and original materials belong to their respective owners.</p>- <p>Lessons may contain errors; corrections are welcome. Reading progress stays in your browser; the site counts visits anonymously (Cloudflare Web Analytics, no cookies). Books on the future shelves are previews, not available lessons.</p>+ <p>Lessons may contain errors; corrections are welcome. Reading progress stays in your browser; the site counts visits anonymously (Cloudflare Web Analytics, no cookies). Books marked “In the works” are not available yet.</p><p>Explore the source and book-making Skill on <a href="https://github.com/DozenTwelve/Papermorph" target="_blank" rel="noopener noreferrer">GitHub</a>.</p></dialog></main>diff --git a/site/lib/bookshelf.css b/site/lib/bookshelf.cssindex 6bcde89..7c97853 100644--- a/site/lib/bookshelf.css+++ b/site/lib/bookshelf.css@@ -1,75 +1,130 @@+/* The bookshelf belongs to this website, not the book-making Skill. The scene is one photograph of a birch shelf on+ a wall, drawers and all (assets/shelf/wall.webp, 1024 x 1536); the shelf is also cut into strips (cap, each bay's+ back panel, each shelf's lip, the drawers), laid over the photo exactly where they are in it, so the lips can stand in front of the books' feet+ and, on a phone, the bays can grow to hold two rows. Books are links standing face out, each with a coloured+ label card (after Dynamicland's shelf). Adding a book is one <a class="book"> and one cover in assets/covers/.+ Sizes are in source pixels of the photo: --s is one of them. */+@font-face { font-family: Oswald; font-weight: 600; font-display: swap; src: url(fonts/Oswald-latin.woff2) format('woff2'); } /* SIL OFL, fonts/OFL-Oswald.txt */:root {--ui: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--book: "Iowan Old Style", Palatino, Georgia, serif;- color-scheme: dark;+ --ink: #26231f;+ --red: #b5383c; --blue: #2b78a6; --purple: #6a3f9c; --brown: #5b3c2d;+ color-scheme: light;}* { box-sizing: border-box; }-body { margin: 0; min-height: 100svh; background: #c4a47e; font: 18px/1.5 var(--ui); }+html { background: #151413; }+body { margin: 0; color: var(--ink); font: 16px/1.4 var(--ui); }a { color: inherit; }@view-transition { navigation: auto; }::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }-/* The photographed bookshelf belongs to this website, not the book-making Skill. */-#shelf { position: relative; width: 100%; min-height: 100dvh; margin: 0; color: #443526; }-.shelf-top { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; height: 3%; padding: 0 2.6%; }-#shelf-title { margin: 0; font: 600 clamp(14px, 1.35vw, 25px)/1 var(--ui); letter-spacing: -.4px; view-transition-name: none; }-.shelf-brand { text-decoration: none; }-.shelf-brand { display: inline-flex; align-items: center; gap: 6px; color: #352b20; text-shadow: 0 1px #ecd3a54a; }-.shelf-brand > span { font: clamp(21px, 2vw, 36px)/.7 var(--book); color: #3c3021; }-.shelf-top p { margin: 0; color: #493b2d; font: 500 clamp(10px, .9vw, 15px) var(--ui); text-shadow: 0 1px #ecd3a54a; }-.photo-shelf { position: relative; width: 100%; aspect-ratio: 3 / 4; container-type: inline-size; margin: 0; }-.shelf-photo { display: block; width: 100%; height: auto; }-.shelf-tier { display: contents; }.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }-.book-hotspot { position: absolute; display: block; top: 4.9%; height: 23.3%; text-decoration: none; border-radius: 2px; outline-offset: 4px; }-.algebra-book { left: 10.1%; width: 26.1%; }-.math-book { left: 39.9%; width: 24.5%; }-.physics-book { left: 66.8%; width: 25.3%; }-/* The middle shelf: the photographed covers of our picture books. */-.pigs-book { left: 8.1%; width: 25.8%; top: 34.5%; height: 19.6%; }-.red-book { left: 37.2%; width: 26%; top: 34.4%; height: 19.6%; }-.joke-book { left: 65.6%; width: 26.4%; top: 34.2%; height: 19.9%; }-.pigs-book .book-caption { background: linear-gradient(110deg, #7a4a1ef5, #5a3414f0); }-.red-book .book-caption { background: linear-gradient(110deg, #8a2a22f5, #5e1a16f0); }-.joke-book .book-caption { background: linear-gradient(110deg, #2f5aa8f5, #1f3d78f0); }-.foucault-book { left: 8.5%; width: 25.8%; top: 58.4%; height: 20.3%; }-.foucault-book .book-caption { background: linear-gradient(110deg, #6a1420f5, #3e0a12f2); }-.elephant-book { left: 37.1%; width: 25.6%; top: 58.4%; height: 19.9%; }-.elephant-book .book-caption { background: linear-gradient(110deg, #1d3527f5, #0e1d14f2); }-.pandemic-book { left: 65.5%; width: 25.9%; top: 58.3%; height: 20.3%; }-.pandemic-book .book-caption { background: linear-gradient(110deg, #8a2a1ef5, #2a1410f2); }-.book-hotspot:hover { box-shadow: 0 0 0 2px #f7d998b3, 0 0 28px #edc97833; }-#shelf a:focus-visible { outline: 3px solid #f4d786; outline-offset: 5px; }-.book-caption { position: absolute; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; justify-content: center; gap: .35cqw; min-height: 6.45cqw; padding: 1.1cqw 1.2cqw .9cqw; color: #faf7e9; background: linear-gradient(110deg, #263d32f5, #182a23f0); box-shadow: 0 -2px 8px #0003; font: 1.4cqw/1.25 var(--ui); transition: background .2s; }-.math-book .book-caption { background: linear-gradient(110deg, #704732f7, #503721f0); }-.physics-book .book-caption { background: linear-gradient(110deg, #1f2f4ef5, #141d33f0); }-.book-caption strong { font-weight: 600; padding-right: 1.5cqw; }-.book-caption strong > span { position: absolute; right: 1.2cqw; top: 1.1cqw; color: #e8c68b; }-.book-caption small { color: #e2dbca; font-size: 1.03cqw; letter-spacing: .03em; }-.resume-label { position: absolute; padding: .46cqw .74cqw; background: #fcf4df; color: #3c4336; box-shadow: 1px 2px 5px #0003; font: 1.03cqw var(--ui); transform: rotate(-3deg); }-.github-drawer, .youtube-drawer { position: absolute; top: 83.6%; width: 46.1%; height: 14.6%; text-decoration: none; }-.github-drawer { left: 4.1%; }-.youtube-drawer { left: 50.7%; }-.shelf-noscript { position: absolute; bottom: 0; left: 24px; margin: 0; font: 11px var(--ui); color: #352c21; }-.shelf-footer { position: absolute; inset: auto 0 0; display: flex; justify-content: center; align-items: center; gap: 3%; height: 3%; padding: 0 3%; color: #594129; font: 500 clamp(10px, .85vw, 14px)/1.4 var(--ui); text-shadow: 0 1px #ffe6bd66; }-.shelf-footer button { padding: 2px 0; border: 0; border-bottom: 1px solid #59412966; background: transparent; color: inherit; font: inherit; cursor: pointer; text-shadow: inherit; }-.shelf-footer button:hover { color: #2d2116; border-bottom-color: currentColor; }-.shelf-footer button:focus-visible { outline: 2px solid #594129; outline-offset: 5px; }+#shelf a:focus-visible, #shelf button:focus-visible, .drawer:focus-visible { outline: 3px solid #f6b741; outline-offset: 4px; }++/* The photo, as wide as the window (it is 1024 px: wider than that it softens a little). The shelf in it spans source x 82-946 and starts at y 175. */+.scene { position: relative; width: 100%; aspect-ratio: 1024 / 1536; margin: 0 auto; container-type: inline-size; background: url(../assets/shelf/wall.webp) 0 0 / 100% 100%; }+.scene > * { position: absolute; left: 8.008cqw; width: 84.375cqw; }+.banner { top: 1.37cqw; margin: 0; line-height: 0; filter: drop-shadow(3px 6px 6px #0004); }+.banner button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }+.banner button:hover { transform: translateY(-2px); }+.banner svg { display: block; width: 100%; height: auto; }+.case { --s: calc(84.375cqw / 864); top: 17.09cqw; }+.cap, .lip { background: 0 0 / 100% 100% no-repeat; }+.cap { aspect-ratio: 864 / 15; background-image: url(../assets/shelf/cap.webp); }+.shelf { position: relative; background: 0 0 / 100% 100% no-repeat; }+.lip { position: relative; z-index: 3; display: grid; place-items: center; } /* in front of the books' feet */+.shelf:nth-of-type(1) { aspect-ratio: 864 / 266; background-image: url(../assets/shelf/bay1.webp); } .shelf:nth-of-type(1) .lip { aspect-ratio: 864 / 33; background-image: url(../assets/shelf/lip1.webp); }+.shelf:nth-of-type(2) { aspect-ratio: 864 / 257; background-image: url(../assets/shelf/bay2.webp); } .shelf:nth-of-type(2) .lip { aspect-ratio: 864 / 33; background-image: url(../assets/shelf/lip2.webp); }+.shelf:nth-of-type(3) { aspect-ratio: 864 / 251; background-image: url(../assets/shelf/bay3.webp); } .shelf:nth-of-type(3) .lip { aspect-ratio: 864 / 36; background-image: url(../assets/shelf/lip3.webp); }+.shelf:nth-of-type(4) { aspect-ratio: 864 / 129; background-image: url(../assets/shelf/bay4.webp); } .shelf:nth-of-type(4) .lip { aspect-ratio: 864 / 21; background-image: url(../assets/shelf/lip4.webp); }+.shelf .lip { position: absolute; top: 100%; left: 0; right: 0; } /* the lip below the bay, where it is in the photo */+.shelf + .shelf { margin-top: calc(33 * var(--s)); }+.shelf:nth-of-type(3) { margin-top: calc(33 * var(--s)); } .shelf:nth-of-type(4) { margin-top: calc(36 * var(--s)); }+.row { --padx: calc(44 * var(--s)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 calc(12 * var(--s)); height: 100%; padding: 0 var(--padx); align-items: end; }+.row > * { margin-bottom: calc(-14 * var(--s)); }+.label { margin: 0; padding: .25em .6em .2em; background: #1e1d1b; color: #f4f1ea; font: 700 clamp(10px, calc(13 * var(--s)), 14px)/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; box-shadow: 1px 2px 3px #0004; }++/* A book: a printed cover standing at the back of the bay (185 x 247 source px on the photo), its label card+ leaning in front of the lower half. Covers sit a hair off straight, the way real ones do. */+.book { position: relative; display: block; aspect-ratio: 3 / 4; text-decoration: none; color: #fff; }+.doc { position: absolute; inset: 0 3% 0; overflow: hidden; background: #f8f6f1; box-shadow: 1px 0 0 #d9d4c8, 2px 0 0 #bdb6a8, 2px 2px 2px #0003, 7px 9px 12px #0003; transition: transform .2s; }+.doc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, #ffffff30, #fff0 32% 70%, #0000000d); pointer-events: none; }+.doc img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }+/* Covers, one look a tier. Lessons: a cream textbook with a coloured spine, a serif title and a framed plate.+ Picture books: the picture full bleed, the title in fat white letters. Documentaries: a poster, dark at the top. */+.ct { position: absolute; z-index: 1; left: 8%; right: 8%; top: 6%; }+.lessons a.book .doc { background: #f3ecdc; box-shadow: inset calc(15 * var(--s)) 0 0 var(--c), 1px 0 0 #d9d4c8, 2px 0 0 #bdb6a8, 2px 2px 2px #0003, 7px 9px 12px #0003; }+.lessons .doc img { inset: 33% 8% auto 17%; width: auto; height: 23%; outline: 1px solid #00000026; outline-offset: 2px; }+.lessons .ct { left: 17%; top: 7%; color: #2a251e; font: 600 calc(20 * var(--s))/1.02 var(--book); }+.lessons .ct::before { content: "Papermorph"; display: block; margin-bottom: calc(5 * var(--s)); color: var(--c); font: 700 calc(8 * var(--s))/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; }+.pictures .ct { text-align: center; color: #fff; font: 800 calc(19 * var(--s))/1.02 var(--ui); letter-spacing: -.01em; text-shadow: 0 1px 0 #0007, 0 0 calc(9 * var(--s)) #0006; }+.films .doc::after { background: linear-gradient(#000000b3, #0000 38%), linear-gradient(115deg, #ffffff22, #fff0 32%); }+.films .ct { z-index: 2; color: #fff; font: 600 calc(19 * var(--s))/1.02 Oswald, var(--ui); letter-spacing: .03em; text-transform: uppercase; }+.row > :nth-child(1) .doc { rotate: -.5deg; } .row > :nth-child(2) .doc { rotate: .4deg; } .row > :nth-child(3) .doc { rotate: -.2deg; } .row > :nth-child(4) .doc { rotate: .6deg; }+.tag { position: absolute; inset: 58% 0 0; display: flex; flex-direction: column; padding: 6% 7% 10%; background: var(--c); box-shadow: 1px 1px 1px #0003, 5px 6px 9px #0003; font-size: clamp(10px, calc(12 * var(--s)), 13px); line-height: 1.3; transition: transform .2s; }+.tag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(170deg, #ffffff1a, #fff0 40%); pointer-events: none; }+.tag b { font: italic 700 clamp(11.5px, calc(16 * var(--s)), 17px)/1.15 var(--ui); }+.tag em { margin-top: 2px; font-style: normal; opacity: .9; }+/* The one-line blurb shows once a book is wide enough to print it (a scene 1100 px wide); below that it is for screen readers. */+.tag > span { margin-top: .5em; opacity: .95; }+@container (max-width: 1099px) { .tag > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }+a.book:hover .doc { transform: translateY(-5px); }+a.book:hover .tag { transform: translateY(-2px); }+.lessons { --c: var(--red); }+.pictures { --c: var(--blue); }+.films { --c: var(--purple); }+.archive { --c: var(--brown); }++/* Not ready yet: a black binder in its place, the card says so, nothing to open. */+.soon .doc { background: linear-gradient(100deg, #2a2a2a, #111 45%, #262626); box-shadow: 2px 0 0 #000, 2px 2px 2px #0004, 7px 9px 12px #0003; }+.soon .doc::before { content: ""; position: absolute; inset: 0 auto 0 9%; width: 2px; background: #ffffff1c; }+.soon .tag { filter: saturate(.55) brightness(.9); }+.empty { visibility: hidden; }++/* The one that is different: a hand-made sign, like "Start here". */+.sign { position: absolute; z-index: 2; top: calc(-20 * var(--s)); left: calc(-14 * var(--s)); padding: .3em .6em .25em; background: #f6b741; border: 2px solid #1e1d1b; color: #1e1d1b; font: 700 clamp(11px, calc(15 * var(--s)), 16px)/1 Oswald, var(--ui); letter-spacing: .05em; text-transform: uppercase; transform: rotate(-7deg); box-shadow: 3px 4px 4px #0003; }++/* "Continue · Chapter N": a sticky note on the cover of a book the reader has started. */+.book-slot { position: relative; }+.resume-label { position: absolute; z-index: 4; top: 44%; right: -4px; padding: 3px 7px; background: #fff7c9; color: #3c3a2e; box-shadow: 1px 2px 5px #0003; font: clamp(10px, calc(12 * var(--s)), 13px) var(--ui); text-decoration: none; transform: rotate(3deg); }++/* The archive: books stand spine out in a row (a.spine, title written down the spine). */+.spines { display: flex; gap: calc(6 * var(--s)); align-items: end; justify-content: center; padding-bottom: calc(14 * var(--s)); }+.spine { display: block; width: calc(40 * var(--s)); height: calc(105 * var(--s)); padding: 8px 0; background: var(--c); color: #fff; text-decoration: none; writing-mode: vertical-rl; font: 600 clamp(10px, calc(14 * var(--s)), 15px)/calc(40 * var(--s)) var(--ui); box-shadow: inset -4px 0 6px #0003, 5px 6px 9px #0003; }+.note { align-self: center; margin: 0; padding: .7em 1.1em; background: var(--brown); color: #f1e9df; font: clamp(12px, calc(15 * var(--s)), 15px)/1.4 var(--ui); box-shadow: 5px 6px 9px #0003; transform: rotate(-1deg); }++/* Under the archive, the photo's own pair of drawers, GitHub and YouTube cut into them: each link is the front. */+.drawers { position: relative; aspect-ratio: 864 / 176; margin-top: calc(21 * var(--s)); background: url(../assets/shelf/drawers.webp) 0 0 / 100% 100%; }+.drawer { position: absolute; top: 0; height: 85%; border-radius: 2px; transition: background .15s; }+.drawer:nth-child(1) { left: 2.3%; width: 46.7%; }+.drawer:nth-child(2) { left: 50.9%; width: 46.7%; }+.drawer:hover { background: #ffffff1f; box-shadow: 0 0 0 2px #ffffff55; }+.shelf-about { max-width: 580px; padding: 38px 42px; border: 1px solid #a08760; border-radius: 3px; background: #f6efdf; color: #403527; box-shadow: 0 20px 80px #291b1455; }.shelf-about::backdrop { background: #20180fc4; backdrop-filter: blur(4px); }.shelf-about h2 { margin: 12px 0 20px; font: 400 32px var(--book); }.shelf-about p { font: 15px/1.7 var(--ui); }.shelf-about .about-kicker { margin: 0; color: #826545; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }.about-close { position: absolute; right: 16px; top: 12px; padding: 0 7px; background: transparent; border: 0; color: #675542; font: 26px var(--ui); cursor: pointer; }-/* On a phone the labels scaled with the photo are too small to read: the book's name gets a floor, the line under it- (also in the link's label) goes, and the footer follows the photo instead of the bottom of a taller screen. */++/* A phone: too narrow for four books a shelf. The photo goes; the strips stack down the page, two books to a row,+ each bay's panel stretched to hold both rows and a second lip under the first. */@media (max-width: 700px) {- #shelf { min-height: 0; }- .book-caption { font-size: max(10px, 1.4cqw); }- .book-caption small, .book-caption strong > span { display: none; }- .resume-label { font-size: max(10px, 1.03cqw); }- .shelf-footer { position: static; height: auto; padding: 14px 3% 22px; }+ html { background: #e9e6e1; }+ .scene { aspect-ratio: auto; width: calc(100% - 16px); padding: 12px 0 40px; background: none; }+ .scene > * { position: static; width: auto; }+ .case { --s: calc(100cqw / 864); margin-top: 0; filter: drop-shadow(5px 8px 10px #0003); }+ .shelf { aspect-ratio: auto !important; }+ .row { grid-template-columns: 1fr 1fr; gap: calc(75 * var(--s)) calc(30 * var(--s)); padding-top: calc(40 * var(--s)); padding-bottom: 0; }+ .row:not(.spines) > :first-child::after { content: ""; position: absolute; z-index: 3; top: calc(100% - 22 * var(--s)); left: calc(-1 * var(--padx)); width: 100cqw; aspect-ratio: 864 / 33; background: url(../assets/shelf/lip1.webp) 0 0 / 100% 100%; }+ .tag { inset: 56% 0 0; font-size: 10.5px; }+ .tag b { font-size: 13px; }+ .empty { display: none; }+ .sign { font-size: 12px; }+ .label { font-size: 11px; }+ .spines { min-height: calc(180 * var(--s)); align-items: center; }}@media (prefers-reduced-motion: reduce) {- .book-caption { transition: none; }+ .doc, .tag { transition: none; }::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }}diff --git a/site/lib/bookshelf.js b/site/lib/bookshelf.jsindex 2e5ea80..bbe344e 100644--- a/site/lib/bookshelf.js+++ b/site/lib/bookshelf.js@@ -1,4 +1,4 @@-/* Website-only book navigation. The picture, links and hotspot positions live in index.html/bookshelf.css. */+/* Website-only bookshelf behaviour: old root links, the About note, and a "Continue" note on books the reader has started. */'use strict';(() => {// Old root hashes referred to the first book before each book had its own folder.@@ -31,8 +31,9 @@resume.className = 'resume-label';resume.textContent = `Continue · Chapter ${saved.last} →`;resume.href = `${book.chapterBase}ch${String(saved.last).padStart(2, '0')}/`;- resume.style.left = { 'elementary-algebra': '11%', 'math-notebook': '40.8%', science: '67.7%' }[book.id];- resume.style.top = '5.7%';- document.getElementById('shelf-books').append(resume);+ const slot = document.createElement('div'); // a link can't hold a link: the note sits beside the cover, over it+ slot.className = 'book-slot';+ cover.replaceWith(slot);+ slot.append(cover, resume);}})();diff --git a/site/lib/fonts/OFL-Oswald.txt b/site/lib/fonts/OFL-Oswald.txtnew file mode 100644index 0000000..4d4e319--- /dev/null+++ b/site/lib/fonts/OFL-Oswald.txt@@ -0,0 +1,93 @@+Copyright 2016 The Oswald Project Authors (https://github.com/googlefonts/OswaldFont)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+https://scripts.sil.org/OFL+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/site/lib/fonts/Oswald-latin.woff2 b/site/lib/fonts/Oswald-latin.woff2new file mode 100644index 0000000..600dec1Binary files /dev/null and b/site/lib/fonts/Oswald-latin.woff2 differ