An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
revert(skill): keep the quiz card fix in the science book only
yzr30ede19f1509
diff --git a/.claude/skills/papermorph/assets/engine/engine.css b/.claude/skills/papermorph/assets/engine/engine.cssindex 902eea8..17c8684 100644--- a/.claude/skills/papermorph/assets/engine/engine.css+++ b/.claude/skills/papermorph/assets/engine/engine.css@@ -38,13 +38,11 @@ button[hidden] { display: none; }/* Question cards inside the picture. */.card { position: absolute; padding: 20px 26px; border-radius: 20px; background: rgba(34, 50, 45, .97); border: 1.5px solid var(--edge); border-left: 7px solid var(--quiz); box-shadow: 0 14px 44px rgba(0, 0, 0, .35); }-/* Band card: prompt and buttons on top, answers below at full width, feedback last. A prompt beside the answers- lost the width race to long choices or answer rows (it was squeezed to a word per line, worst in Firefox). */-.card.band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pic head acts" "pic body body" "pic fb fb"; column-gap: 28px; row-gap: 12px; align-items: center; align-content: center; min-height: 150px; }+.card.band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "pic head body acts" "pic fb body acts"; column-gap: 28px; align-items: center; align-content: center; min-height: 150px; }.band .mascot { grid-area: pic; }-.band .head { grid-area: head; }-.band .fb { grid-area: fb; margin-top: 0; }-.band .body { grid-area: body; min-width: 0; }+.band .head { grid-area: head; align-self: end; }+.band .fb { grid-area: fb; align-self: start; }+.band .body { grid-area: body; }.band .acts { grid-area: acts; }.side .mascot { float: right; margin: -2px -4px 6px 10px; }.kicker { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: var(--quiz); }diff --git a/.claude/skills/papermorph/assets/engine/engine.js b/.claude/skills/papermorph/assets/engine/engine.jsindex 5328dc6..fb64425 100644--- a/.claude/skills/papermorph/assets/engine/engine.js+++ b/.claude/skills/papermorph/assets/engine/engine.js@@ -85,7 +85,7 @@ const UI = '"Avenir Next","Segoe UI","Helvetica Neue",Arial,sans-serif';const MATH = '"STIX Two Text","Cambria Math","Iowan Old Style",Palatino,Georgia,serif';const NAME = { nat: 'Natural', whole: 'Whole', int: 'Integers', rat: 'Rational', irr: 'Irrational', real: 'Real' };// Card positions inside the 1600×900 picture.-const BAND = { x: 96, y: 686, w: 1408, cls: 'band' }; // bottom band (moves up when taller than the space left)+const BAND = { x: 96, y: 686, w: 1408, cls: 'band' }; // below the number lineconst RIGHT = { x: 1258, y: 546, w: 330, cls: 'side', maxH: 346 }; // right of the number mapconst TOPR = { x: 960, y: 70, w: 624, cls: 'side', maxH: 470 }; // top right, above the number lineconst SCREEN = { x: 0, y: 0, w: 1600, cls: 'screen' };@@ -1011,19 +1011,11 @@ function rich(parts, size = 28) {for (const p of [].concat(parts)) s.append(typeof p === 'string' || p instanceof Node ? p : mathEl(p.m, size));return s;}-// A card at pos; a band card keeps its bottom on the stage: when its content grows (a long question, feedback),-// it moves up rather than running under the player bar.function card(pos, cls) {const c = h('div', `card ${pos.cls} ${cls}`);Object.assign(c.style, { left: pos.x + 'px', top: pos.y + 'px', width: pos.w + 'px' });if (pos.maxH) c.style.maxHeight = pos.maxH + 'px';$('ui').append(c);- if (pos.cls === 'band') {- const fit = () => { c.style.top = Math.max(16, Math.min(pos.y, 900 - 16 - c.offsetHeight)) + 'px'; };- const ro = new ResizeObserver(fit);- ro.observe(c); fit();- P.cleanup.push(() => ro.disconnect());- }return c;}// The guide: an infinity sign whose two loops are its eyes. Drawn in SVG so it can blink, hop and wobble.