An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
feat(linear-algebra): cover, contents, licence note; chapter 1 polish
yzrd074feb39f6c
diff --git a/site/linear-algebra/LICENSE.txt b/site/linear-algebra/LICENSE.txtnew file mode 100644index 0000000..adf5eed--- /dev/null+++ b/site/linear-algebra/LICENSE.txt@@ -0,0 +1,13 @@+Linear Algebra (site/linear-algebra/) — licence++This book is based on MIT OpenCourseWare 18.06 Linear Algebra, Spring 2010, by Gilbert Strang+(https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/), used under the Creative Commons+Attribution-NonCommercial-ShareAlike 4.0 International licence+(https://creativecommons.org/licenses/by-nc-sa/4.0/).++Changes: the lectures were retold in new words for high-school readers, split into short chapters,+with new examples, exercises, drawings, animation, interaction and narration.++The book's content (the chapters' text, narration, audio, drawings and exercises) is shared under the+same licence, CC BY-NC-SA 4.0. The engine and the code in lib/ that the rest of Papermorph shares+stay under the repository's MIT licence. This book is not affiliated with or endorsed by MIT.diff --git a/site/linear-algebra/index.html b/site/linear-algebra/index.htmlindex a3be85b..2f54447 100644--- a/site/linear-algebra/index.html+++ b/site/linear-algebra/index.html@@ -3,8 +3,8 @@<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">-<title>BOOK TITLE</title>-<meta name="description" content="ONE SENTENCE ABOUT THE BOOK.">+<title>Linear Algebra</title>+<meta name="description" content="Linear algebra you can see and move, from the first equation up: change a number and the lines, planes and arrows move; move them and the numbers change. After MIT OCW 18.06."><link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%231d2b27'/%3E%3Ctext x='32' y='45' text-anchor='middle' font-size='48' fill='%23f0b45a'%3E∞%3C/text%3E%3C/svg%3E"><link rel="stylesheet" href="lib/units.css"><link rel="stylesheet" href="lib/contents.css">@@ -13,6 +13,13 @@<script src="unit-art.js"></script><!-- <script src="refs.js"></script> a book that cites works: its reference list, built by the skill's scripts/refs.py --><link rel="expect" href="#ch01" blocking="render">+<style>+.credit { max-width: 40rem; margin: 1.6rem auto 0; font-size: .82rem; line-height: 1.5; opacity: .62; text-align: center; }+.credit a { color: inherit; }+.seen .unit-art .ping { transform-box: fill-box; transform-origin: center; animation: ping 2.4s ease-in-out 2s infinite; }+@keyframes ping { 50% { transform: scale(1.7); } }+@media (prefers-reduced-motion: reduce) { .seen .unit-art .ping { animation: none; } }+</style><!-- The book's own look, if it differs from the chalkboard: override the tokens of lib/contents.css here, e.g.<style>:root { --board: #fcfaf3; --chalk: #26241f; --top-bg: rgba(252, 250, 243, .9); --top-line: #ddd5c3; color-scheme: light; }@@ -21,25 +28,26 @@<body><section id="cover"><div class="chalk" aria-hidden="true"><!-- a few faint formulas or phrases from the book, drawn in chalk -->- <span style="left:7%;top:13%;--d:1.6">PHRASE ONE</span>- <span style="right:8%;top:17%;--d:1.9">PHRASE TWO</span>- <span style="left:5%;bottom:20%;--d:2.2">PHRASE THREE</span>- <span style="right:6%;bottom:15%;--d:2.5">PHRASE FOUR</span>+ <span style="left:7%;top:13%;--d:1.6">2x − y = 0</span>+ <span style="right:8%;top:17%;--d:1.9">−x + 2y = 3</span>+ <span style="left:5%;bottom:20%;--d:2.2">Ax = b</span>+ <span style="right:6%;bottom:15%;--d:2.5">x·col 1 + y·col 2 = b</span></div><svg class="mascot draw" id="guide" width="210" height="147"></svg><p class="kicker">An animated book</p>- <h1>BOOK <i>&</i> TITLE</h1>- <p class="lede">ONE OR TWO SENTENCES ABOUT WHAT THE READER WILL SEE AND DO.</p>+ <h1>Linear <i>Algebra</i></h1>+ <p class="lede">Equations you can see and move. Change a number and the lines, planes and arrows move with it; drag the picture and the numbers follow.</p><div class="acts"><a class="btn go" href="#contents" data-t="open">Open the book<svg viewBox="0 0 16 16"><path d="M6 2.5 11.5 8 6 13.5 4.6 12.1 8.7 8 4.6 3.9z"/></svg></a><a class="btn quiet" id="resume" hidden></a></div><p class="meta" id="meta"></p>+ <p class="credit">Based on <a href="https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/">MIT OpenCourseWare 18.06, Linear Algebra</a> by Gilbert Strang, used under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>. Retold, redrawn and animated by Papermorph; this book is shared under the same licence. Not affiliated with or endorsed by MIT.</p></section><main id="contents"><header class="top">- <a class="home" href="#book" aria-label="Back to the cover" data-t-label="toCover"><svg class="mascot" id="guideSmall" width="52" height="36"></svg><strong>BOOK <i>&</i> TITLE</strong></a>+ <a class="home" href="#book" aria-label="Back to the cover" data-t-label="toCover"><svg class="mascot" id="guideSmall" width="52" height="36"></svg><strong>Linear <i>Algebra</i></strong></a><span class="prog" id="prog"></span></header><div id="units"></div>@@ -64,7 +72,7 @@Contents.book({start: { unit: 1, chapter: 1 },units: [ // [unit title, [[chapter title, minutes], ...]]- ['First unit', [['First chapter', 8]]],+ ['The Geometry of Linear Equations', [['One Equation, One Line', 10]]],],hues: ['#f4a48c', '#86c9e8', '#f3c95c', '#e8a0c8', '#8fd6b0', '#bba8ee', '#f0b45a'], // one colour per unit, cycling});diff --git a/site/linear-algebra/unit-art.js b/site/linear-algebra/unit-art.jsindex daaa2cb..74b7856 100644--- a/site/linear-algebra/unit-art.js+++ b/site/linear-algebra/unit-art.js@@ -15,9 +15,10 @@const reset = s => { k = 0; return s; };window.UNIT_ART = [- // 1 An example: a number line with a dot hopping along it.- reset(P('M228 130H572') + Array.from({ length: 7 }, (_, i) => P(`M${250 + i * 50} 122v16`, 'a')).join('') +- `<circle class="t hop" r="8" fill="currentColor" stroke="none" style="--k:${k++};offset-path:path('M250 116Q275 84 300 116Q325 84 350 116Q375 84 400 116')"/>` +- Tx(250, 60, 'a sketch of this unit', 26) + C(530, 70, 24, 'a')),+ // 1 The geometry of linear equations: two lines meet at a point; the same point is a mix of two arrows.+ reset(P('M240 160L420 20') + P('M232 60L428 140', 'a') ++ `<circle class="t ping" cx="330" cy="91" r="9" fill="currentColor" stroke="none" style="--k:${k++}"/>` ++ P('M470 150L540 120', '', 'stroke-width="5"') + P('M540 120L520 60', 'a', 'stroke-width="5"') + P('M470 150L520 60', 'faint', 'stroke-dasharray="6 6"') ++ Tx(230, 176, 'row picture', 18, 'a') + Tx(470, 176, 'column picture', 18, 'a')),];})();