An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
style(player): refine volume capsule
yzr0a336e16adf9
diff --git a/.claude/skills/papermorph/assets/engine/engine.css b/.claude/skills/papermorph/assets/engine/engine.cssindex 6cf70a8..97169ad 100644--- a/.claude/skills/papermorph/assets/engine/engine.css+++ b/.claude/skills/papermorph/assets/engine/engine.css@@ -106,9 +106,19 @@ button[hidden] { display: none; }.seg.ask { background: #2d4a57; }.seg.ask i { background: var(--quiz); }.step { width: 300px; flex: none; color: var(--dim); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }-.volume { display: flex; align-items: center; gap: 8px; flex: none; font-size: 19px; color: var(--dim); }-.volume input { width: 120px; height: 44px; margin: 0; accent-color: var(--chalk); cursor: pointer; }-.volume input:focus-visible { outline: 3px solid var(--task); outline-offset: 2px; }+.volume { display: flex; align-items: center; gap: 10px; flex: none; height: 44px; padding: 0 12px;+ border: 1px solid var(--edge); border-radius: 999px; background: var(--panel); color: var(--chalk); }+.volume:hover { background: #2b3f36; border-color: var(--faint); }+.volume:has(input:focus-visible) { outline: 2px solid var(--task); outline-offset: 3px; }+.volume svg { width: 20px; height: 20px; flex: none; }+.volume input { appearance: none; width: 100px; height: 42px; margin: 0; background: transparent; cursor: pointer; }+.volume input:focus-visible { outline: none; }+.volume input::-webkit-slider-runnable-track { height: 4px; border-radius: 999px;+ background: linear-gradient(to right, var(--chalk) var(--volume, 100%), var(--faint) var(--volume, 100%)); }+.volume input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--chalk); }+.volume input::-moz-range-track { height: 4px; border-radius: 999px; background: var(--faint); }+.volume input::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--chalk); }+.volume input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--chalk); }/* Keep the control strip usable without scaling down its touch targets. */@media (max-width: 700px) {#frame { top: calc(50% - 50px); overflow: visible; }@@ -118,7 +128,6 @@ button[hidden] { display: none; }.step { display: none; }.segs, .volume { order: 1; }.segs { min-width: 80px; margin: 0; }- .volume { font-size: 16px; }}.sound-note { position: absolute; left: 24px; top: 20px; margin: 0; padding: 8px 18px; border-radius: 12px; background: rgba(15, 22, 19, .85); color: var(--dim); font-size: 19px; }.sound-note[hidden] { display: none; }diff --git a/.claude/skills/papermorph/assets/engine/engine.js b/.claude/skills/papermorph/assets/engine/engine.jsindex ec78183..7916378 100644--- a/.claude/skills/papermorph/assets/engine/engine.js+++ b/.claude/skills/papermorph/assets/engine/engine.js@@ -72,8 +72,12 @@ document.body.insertAdjacentHTML('afterbegin', `<div id="frame"></button><div class="segs" id="segs"></div><div class="step" id="stepName"></div>- <label class="volume" for="volume">Volume- <input id="volume" type="range" min="0" max="1" step="0.05" value="1" title="Volume (0 = muted)">+ <label class="volume" for="volume" title="Volume (0 = muted)">+ <svg viewBox="0 0 24 24" aria-hidden="true">+ <path d="M3 9v6h4l5 4V5L7 9z" fill="currentColor"/>+ <path d="M16 8a6 6 0 0 1 0 8m3-11a10 10 0 0 1 0 14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>+ </svg>+ <input id="volume" type="range" min="0" max="1" step="0.05" value="1" aria-label="Volume"></label><button class="icon txt" id="bHelp" aria-label="Keyboard shortcuts (?)" title="Keyboard shortcuts (?)">?</button><button class="icon cc" id="bCC" aria-pressed="false" aria-label="Captions (C)" title="Captions (C)">CC</button>@@ -1568,7 +1572,10 @@ $('stage').addEventListener('click', e => {if (!b.ask && !e.target.closest('.qlayer')) togglePlay();});$('bPlay').onclick = togglePlay;-$('volume').oninput = () => { if (P.audio) P.audio.volume = +$('volume').value; };+$('volume').oninput = () => {+ $('volume').style.setProperty('--volume', +$('volume').value * 100 + '%');+ if (P.audio) P.audio.volume = +$('volume').value;+};$('bBack').onclick = () => { hideCover(); back1(); };$('bRestart').onclick = restart;$('bCC').onclick = () => setCaptions(!captions);diff --git a/site/elementary-algebra/lib/engine.css b/site/elementary-algebra/lib/engine.cssindex 6cf70a8..97169ad 100644--- a/site/elementary-algebra/lib/engine.css+++ b/site/elementary-algebra/lib/engine.css@@ -106,9 +106,19 @@ button[hidden] { display: none; }.seg.ask { background: #2d4a57; }.seg.ask i { background: var(--quiz); }.step { width: 300px; flex: none; color: var(--dim); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }-.volume { display: flex; align-items: center; gap: 8px; flex: none; font-size: 19px; color: var(--dim); }-.volume input { width: 120px; height: 44px; margin: 0; accent-color: var(--chalk); cursor: pointer; }-.volume input:focus-visible { outline: 3px solid var(--task); outline-offset: 2px; }+.volume { display: flex; align-items: center; gap: 10px; flex: none; height: 44px; padding: 0 12px;+ border: 1px solid var(--edge); border-radius: 999px; background: var(--panel); color: var(--chalk); }+.volume:hover { background: #2b3f36; border-color: var(--faint); }+.volume:has(input:focus-visible) { outline: 2px solid var(--task); outline-offset: 3px; }+.volume svg { width: 20px; height: 20px; flex: none; }+.volume input { appearance: none; width: 100px; height: 42px; margin: 0; background: transparent; cursor: pointer; }+.volume input:focus-visible { outline: none; }+.volume input::-webkit-slider-runnable-track { height: 4px; border-radius: 999px;+ background: linear-gradient(to right, var(--chalk) var(--volume, 100%), var(--faint) var(--volume, 100%)); }+.volume input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--chalk); }+.volume input::-moz-range-track { height: 4px; border-radius: 999px; background: var(--faint); }+.volume input::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--chalk); }+.volume input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--chalk); }/* Keep the control strip usable without scaling down its touch targets. */@media (max-width: 700px) {#frame { top: calc(50% - 50px); overflow: visible; }@@ -118,7 +128,6 @@ button[hidden] { display: none; }.step { display: none; }.segs, .volume { order: 1; }.segs { min-width: 80px; margin: 0; }- .volume { font-size: 16px; }}.sound-note { position: absolute; left: 24px; top: 20px; margin: 0; padding: 8px 18px; border-radius: 12px; background: rgba(15, 22, 19, .85); color: var(--dim); font-size: 19px; }.sound-note[hidden] { display: none; }diff --git a/site/elementary-algebra/lib/engine.js b/site/elementary-algebra/lib/engine.jsindex 967e062..f6dcb2e 100644--- a/site/elementary-algebra/lib/engine.js+++ b/site/elementary-algebra/lib/engine.js@@ -72,8 +72,12 @@ document.body.insertAdjacentHTML('afterbegin', `<div id="frame"></button><div class="segs" id="segs"></div><div class="step" id="stepName"></div>- <label class="volume" for="volume">Volume- <input id="volume" type="range" min="0" max="1" step="0.05" value="1" title="Volume (0 = muted)">+ <label class="volume" for="volume" title="Volume (0 = muted)">+ <svg viewBox="0 0 24 24" aria-hidden="true">+ <path d="M3 9v6h4l5 4V5L7 9z" fill="currentColor"/>+ <path d="M16 8a6 6 0 0 1 0 8m3-11a10 10 0 0 1 0 14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>+ </svg>+ <input id="volume" type="range" min="0" max="1" step="0.05" value="1" aria-label="Volume"></label><button class="icon txt" id="bHelp" aria-label="Keyboard shortcuts (?)" title="Keyboard shortcuts (?)">?</button><button class="icon cc" id="bCC" aria-pressed="false" aria-label="Captions (C)" title="Captions (C)">CC</button>@@ -1568,7 +1572,10 @@ $('stage').addEventListener('click', e => {if (!b.ask && !e.target.closest('.qlayer')) togglePlay();});$('bPlay').onclick = togglePlay;-$('volume').oninput = () => { if (P.audio) P.audio.volume = +$('volume').value; };+$('volume').oninput = () => {+ $('volume').style.setProperty('--volume', +$('volume').value * 100 + '%');+ if (P.audio) P.audio.volume = +$('volume').value;+};$('bBack').onclick = () => { hideCover(); back1(); };$('bRestart').onclick = restart;$('bCC').onclick = () => setCaptions(!captions);diff --git a/site/math-notebook/lib/engine.css b/site/math-notebook/lib/engine.cssindex 6cf70a8..97169ad 100644--- a/site/math-notebook/lib/engine.css+++ b/site/math-notebook/lib/engine.css@@ -106,9 +106,19 @@ button[hidden] { display: none; }.seg.ask { background: #2d4a57; }.seg.ask i { background: var(--quiz); }.step { width: 300px; flex: none; color: var(--dim); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }-.volume { display: flex; align-items: center; gap: 8px; flex: none; font-size: 19px; color: var(--dim); }-.volume input { width: 120px; height: 44px; margin: 0; accent-color: var(--chalk); cursor: pointer; }-.volume input:focus-visible { outline: 3px solid var(--task); outline-offset: 2px; }+.volume { display: flex; align-items: center; gap: 10px; flex: none; height: 44px; padding: 0 12px;+ border: 1px solid var(--edge); border-radius: 999px; background: var(--panel); color: var(--chalk); }+.volume:hover { background: #2b3f36; border-color: var(--faint); }+.volume:has(input:focus-visible) { outline: 2px solid var(--task); outline-offset: 3px; }+.volume svg { width: 20px; height: 20px; flex: none; }+.volume input { appearance: none; width: 100px; height: 42px; margin: 0; background: transparent; cursor: pointer; }+.volume input:focus-visible { outline: none; }+.volume input::-webkit-slider-runnable-track { height: 4px; border-radius: 999px;+ background: linear-gradient(to right, var(--chalk) var(--volume, 100%), var(--faint) var(--volume, 100%)); }+.volume input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--chalk); }+.volume input::-moz-range-track { height: 4px; border-radius: 999px; background: var(--faint); }+.volume input::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--chalk); }+.volume input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--chalk); }/* Keep the control strip usable without scaling down its touch targets. */@media (max-width: 700px) {#frame { top: calc(50% - 50px); overflow: visible; }@@ -118,7 +128,6 @@ button[hidden] { display: none; }.step { display: none; }.segs, .volume { order: 1; }.segs { min-width: 80px; margin: 0; }- .volume { font-size: 16px; }}.sound-note { position: absolute; left: 24px; top: 20px; margin: 0; padding: 8px 18px; border-radius: 12px; background: rgba(15, 22, 19, .85); color: var(--dim); font-size: 19px; }.sound-note[hidden] { display: none; }diff --git a/site/math-notebook/lib/engine.js b/site/math-notebook/lib/engine.jsindex 2200961..9328b1a 100644--- a/site/math-notebook/lib/engine.js+++ b/site/math-notebook/lib/engine.js@@ -72,8 +72,12 @@ document.body.insertAdjacentHTML('afterbegin', `<div id="frame"></button><div class="segs" id="segs"></div><div class="step" id="stepName"></div>- <label class="volume" for="volume">Volume- <input id="volume" type="range" min="0" max="1" step="0.05" value="1" title="Volume (0 = muted)">+ <label class="volume" for="volume" title="Volume (0 = muted)">+ <svg viewBox="0 0 24 24" aria-hidden="true">+ <path d="M3 9v6h4l5 4V5L7 9z" fill="currentColor"/>+ <path d="M16 8a6 6 0 0 1 0 8m3-11a10 10 0 0 1 0 14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>+ </svg>+ <input id="volume" type="range" min="0" max="1" step="0.05" value="1" aria-label="Volume"></label><button class="icon txt" id="bHelp" aria-label="Keyboard shortcuts (?)" title="Keyboard shortcuts (?)">?</button><button class="icon cc" id="bCC" aria-pressed="false" aria-label="Captions (C)" title="Captions (C)">CC</button>@@ -1573,7 +1577,10 @@ $('stage').addEventListener('click', e => {if (!b.ask && !e.target.closest('.qlayer')) togglePlay();});$('bPlay').onclick = togglePlay;-$('volume').oninput = () => { if (P.audio) P.audio.volume = +$('volume').value; };+$('volume').oninput = () => {+ $('volume').style.setProperty('--volume', +$('volume').value * 100 + '%');+ if (P.audio) P.audio.volume = +$('volume').value;+};$('bBack').onclick = () => { hideCover(); back1(); };$('bRestart').onclick = restart;$('bCC').onclick = () => setCaptions(!captions);