Repository navigation
lessons: one light/dark system with a visible course spine - #16
Merged
Merged
Conversation
Apply the Claude Design course UI handoff to tools/template.html and tools/build.py, then rebuild every generated page. Adds light and dark tokens that follow prefers-color-scheme, the course rail, the "Carried in / Today you ship / Unlocks next" spine card with the cafe/ module strip, index session cards, arc-aware section styling and an outline. Lesson wording, section order, nav, <details>, diagram markup and titles are unchanged; pages stay script-free. Fixes on top of the delivered files: - build.py: insert the index cards before the inline outline, which otherwise stopped the index pattern from matching (no cards rendered). - template: keep the list number on predict-first steps and lay the top nav out as prev / index / next, as in the approved mockup. - tests/test_course_ui.py pins the index cards, the module strip order against test_arc.SHIPS, and the optional protocols' rail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Learner-facing effect: every generated page (index, S01–S14, study plan) shares one light/dark visual system, and the course spine is visible in the first screenful: a course rail, a "Carried in / Today you ship / Unlocks next" card with the
cafe/module strip, index session cards and an outline for long pages.Concern: (a) tokens + template + build, (b) spine/rail/outline, (c) diagram plate. Kept together because the handoff delivered them as one
template.html+build.py. The marimo theme, concern (d), is stacked on top in its own PR.Author: Carlos Crespo Macaya. Design from the Claude Design course UI handoff (
design_handoff_course_ui).What changed
tools/template.htmlprefers-color-scheme), rail, spine card, module strip, arc section styles, outline, dark diagram plate. No<script>.tools/build.pyenhance(),page_chrome()) insiderender().render_body()andbuild_nav()are byte-identical to main.render()keeps its 4-argument form;chromeis optional.sessions/**/*.htmlsessions/index.html,sessions/study-plan.html,sessions/s*/lesson.html.tests/test_course_ui.pytest_arc.SHIPS, optional-protocol rail.CHANGELOG.mdFixes on top of the delivered files
enhance()inserted the inline outline right after</h1>, so the index-card pattern (</h1>\s*<p>) never matched. The index card grid now goes in first.test_course_uifailed on the delivered output and passes now.list-style: noneshowed "Predict first…" followed by "2.". The marker is kept and colored--predict(6.5:1 light, 9.8:1 dark on bg).Invariants
<main>of all 16 pages and finds no lost word.<details>blocks are identical apart from`x`→<code>x</code>.lesson-nav,static-diagram-scroll/<img>markup and every<title>are unchanged.<script>. SVGs,receipt.jsonandtoy.pyare untouched.shipped_module()matchesSHIPSfor S01–S12.check_links.pyaccepts the rail and card hrefs.Evidence
Definition of Done (committed tree, Python 3.12,
COURSE_MODE=stub, socket guard onPYTHONPATH):A second rebuild after the commit produced no HTML drift. The replay's naïve FAIL lines are the deliberate baselines.
Contrast (WCAG 2.2). Recomputed from the tokens; it matches the handoff's table.
#ccc/ plateScreenshots. Before/after sheets for the index, S05 and the S05 toy, at 375 and 1280, light and dark, were taken with Playwright and reviewed locally. The page never scrolls sideways at 375. They are not embedded here because there was no approved image host; they can be attached to this PR by hand.
Deferred (needs a maintainer decision, per the handoff): JS conveniences (theme toggle, scroll-spy, progress marks) and light-theme diagram renders.
Checklist
uv run python -m unittest discover -s tests -vuv run python tools/build.pyproduces no generated HTML driftuv run python tools/check_links.pyuv run python tools/check_sota_urls.pyuv run python tools/check_links.py --http(not applicable: no URL changes)uv run python labs/run.py --all --replaypass