From ad5bca4aa60741cd5f3d50cd1c81002924041d4b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 03:40:25 +0000 Subject: [PATCH] Studio: How it works (in progress): the animations (learn.js) and the view; the content (learn-fm.json, learn-byte.json) to come Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UVqsRnhKjiABTzc6Ety3dd --- .github/workflows/emulator.yml | 2 +- web/studio/index.html | 51 ++++ web/studio/learn.js | 420 +++++++++++++++++++++++++++++++++ web/studio/studio.js | 64 ++++- web/studio/studio_test.mjs | 4 +- 5 files changed, 537 insertions(+), 4 deletions(-) create mode 100644 web/studio/learn.js diff --git a/.github/workflows/emulator.yml b/.github/workflows/emulator.yml index f6d78561..700014f0 100644 --- a/.github/workflows/emulator.yml +++ b/.github/workflows/emulator.yml @@ -226,7 +226,7 @@ jobs: # (studio) JIANT Studio: install, edit, the screen, the emulator and recording for JIANT FM and JIANT BYTE in one # page (web/studio; it shows JIANT BYTE's tools from /JIANT-BYTE/, the same origin) mkdir -p build/pages/studio - cp web/studio/index.html web/studio/studio.js web/studio/studio-lib.js web/studio/daw.js web/studio/recorder-worklet.js web/fm1backup.js build/pages/studio/ + cp web/studio/index.html web/studio/studio.js web/studio/studio-lib.js web/studio/daw.js web/studio/recorder-worklet.js web/studio/learn.js web/studio/learn-fm.json web/studio/learn-byte.json web/fm1backup.js build/pages/studio/ cp -r web/studio/img build/pages/studio/img # (studio) FM-1 Rescue's builder and base firmware for Studio's Rescue tab; its own page at rescue/ mkdir -p build/pages/studio/rescue/base build/pages/rescue diff --git a/web/studio/index.html b/web/studio/index.html index 8130f666..cda9cd60 100644 --- a/web/studio/index.html +++ b/web/studio/index.html @@ -228,6 +228,36 @@ @media (max-width: 720px) { .bkrow { grid-template-columns: minmax(0, 1fr); } .bkrow .acts { justify-content: flex-start; } } .bkempty { color: var(--dim); font-size: 14px; padding: 6px 0; } .chk { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--dim); } + /* how it works: sectors, the items, one card with its animation */ + .lrsec { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; } + .lrsec button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: var(--border) solid var(--line); font-size: 14px; color: var(--dim); } + .lrsec button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); } + .lrsec button b { font-weight: 500; opacity: .7; margin-left: 6px; font-size: 12px; } + .lrlead { margin: 0 0 14px; max-width: 70ch; } + .lrbody { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; } + .lritems { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow: auto; position: sticky; top: 12px; } + .lritems button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: var(--radius-s); border: var(--border) solid transparent; } + .lritems button b { font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .02em; } + .lritems button span { font-size: 12px; color: var(--dim); } + .lritems button:hover { border-color: var(--line); } + .lritems button[aria-selected="true"] { border-color: var(--accent); background: var(--field); } + .lrcard { display: flex; flex-direction: column; gap: 12px; } + .lrstage { aspect-ratio: 16 / 8; border-radius: var(--radius-s); background: var(--field); border: var(--border) solid var(--line); overflow: hidden; } + .lrstage canvas { width: 100%; height: 100%; display: block; } + .lrhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } + .lrhead h2 { margin: 0; font-size: clamp(22px, 3vw, 32px); } + .lrtag { font-family: var(--mono); font-size: 13px; color: var(--accent); } + .lrstate { margin: 0; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; max-width: 62ch; } + .lrhow { margin: 0; padding-left: 20px; color: var(--dim); } + .lrhow li { margin: 4px 0; max-width: 70ch; } + .lrwhere { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--fg); background: var(--field); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 var(--radius-s) var(--radius-s) 0; } + .lrnav { justify-content: space-between; } + @media (max-width: 820px) { + .lrbody { grid-template-columns: minmax(0, 1fr); } + .lritems { flex-direction: row; overflow-x: auto; max-height: none; position: static; padding-bottom: 4px; } + .lritems button { flex: none; max-width: 200px; } + .lrstage { aspect-ratio: 4 / 3; } + } /* rescue: numbered steps (done: ticked), the board's wiring drawn, the LED's colours */ .badge.warn { font-family: var(--mono, monospace); font-size: 12px; padding: 6px 10px; border-radius: 999px; border: var(--border) solid var(--accent); color: var(--accent); white-space: nowrap; } .rsfirst { border-color: var(--accent); margin-bottom: 16px; } @@ -355,6 +385,7 @@ + @@ -480,6 +511,26 @@ + + +