feat(design): editorial 'Letter' layout adapted from Claude Design#47
Closed
ditvor wants to merge 1 commit into
Closed
feat(design): editorial 'Letter' layout adapted from Claude Design#47ditvor wants to merge 1 commit into
ditvor wants to merge 1 commit into
Conversation
Adapts the Trailpath / Claude Design exploration into the editorial style. Black ink on cream paper (OKLCH tokens for paper / ink / rule / hairline, dark-mode swap via prefers-color-scheme). System serif stack (Charter / Iowan Old Style / Apple Garamond / Hoefler fallbacks) and system mono — deliberately no Google Fonts CDN so the page stays readable offline (ADR-001). The Newsreader serif the design used will land later as a base64-embedded subset; the system stack is the right interim because Charter ships on every Apple device, where the bulk of recipients will read. Markup changes: - Masthead: mono-uppercase eyebrow (uses narrative.milestone), large editorial title, balanced dek (uses narrative.subtitle), delicate byline-and-date meta line. - First paragraph carries a serif drop cap; siblings in inactive languages are display:none, so ::first-letter automatically selects the active language's first character — no per-language dropcap variants needed. - Pull quote uses a single left-rule italic treatment, not a tinted box. Hero photo crops 16:9 mobile / 2.35:1 desktop with a saturate(0.92) contrast(1.02) print-magazine filter. - Photos 2 and 3 float as inline asymmetric figures (right then left) inside the prose at desktop widths; on mobile they fall into the flow at full bleed. Any photo not claimed by hero or inline placement falls through to an asymmetric scrapbook grid. Photo-count contract unchanged: every selected photo embeds exactly once. - Sticky marginalia sidebar on >= 900px holds a mono-uppercase facts table (Where/When/Distance/Ascent/Time/Summit) and the elevation sparkline. On mobile the marginalia collapses to a closing reference under the prose. - Three discrete EN / RU / DE pills replace the cycling single button. Each is click-targetable, aria-pressed reflects state, and the class-swap mechanism (ADR-005) is unchanged. The pull-quote class, drop-cap class, and marginalia sidebar are new contract markers — codified in test_styles.py so future refactors can't silently drift the polished default. log and encyclopedia styles are intentionally untouched. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Owner
Author
|
Closing per request — jumped straight to implementation when the right move was to stop at the critique and align on what to keep/adapt/drop first. |
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
Adopts the Trailpath / Claude Design "Letter" layout for the editorial style. Black ink on cream paper, system serif + system mono, drop cap, single-rule pull quote, asymmetric inline photos, marginalia sidebar with sparkline. Magazine vocabulary, not dashboard vocabulary.
logandencyclopediastyles are intentionally untouched in this PR — they get their own design pass later.Critique of the Claude Design source (UI/UX evangelist read)
What's exceptional:
oklch(0.972 0.008 80)/oklch(0.18 0.01 80)). Warm in a way no hex/rgb pairing achieves. Magazine warmth, not iOS blue.saturate(0.92) contrast(1.02)filter. A uniform grid would have killed this; the asymmetry is the taste.What didn't fit (and what I did instead):
NarrativeOutputhas flat paragraphs (3-5) + photo indices (6-8). Adopting the chapter shape exactly would have meant a schema change and a prompt-tuning ceremony. Adapted instead: paragraphs render as prose with the same editorial typography, photos placed asymmetrically by paragraph index.GpxStatsonly carries a normalised elevation profile, not waypoint coordinates. Sparkline kept; track-line dropped pending a model extension.< 900pxto a single column with marginalia sitting after the prose as a closing reference. Mobile-first survives.What changed
templates/styles/editorial.html.j2— full rewrite: design tokens, masthead, drop cap, pull quote, hero photo, two-column body grid, marginalia sidebar with facts + sparkline, asymmetric scrapbook, restyled share row. Three EN/RU/DE pills replace the cycling button.tests/test_styles.py::test_editorial_style_keeps_existing_visual_identity— refreshed identity markers for the new design (eyebrow, drop cap, pull-class, marginalia, three pills) so future refactors can't silently drift it.tests/golden/test-render-editorial.html— refreshed (one style only; log + encyclopedia goldens untouched).CHANGELOG.md— entry under### Changed.Constraints respected
data:image/jpeg;base64URI. No external network at view time. No CDN fonts. Photo-count contract preserved: each selected photo renders exactly once (hero, inline, or scrapbook — never both).body.lang-en/.lang-ru/.lang-de). No prompt changes.prefers-color-scheme: darkpalette swap andprefers-reduced-motion: reduceboth honored.Test plan
make cipasses locally — 301 tests, 95.30% coverage. The new pull-quote, drop-cap, marginalia, and three-pill markers are now contract-checked.make test-render STYLE=editorialproduces a clean render against fixture data; opened in a browser at 375 / 768 / 1440 widths and dark mode.logandencyclopediagoldens unchanged — the redesign is scoped strictly to editorial.Follow-ups (not in this PR)
pyftsubset.GpxStatswith waypoint coordinates (or a normalised track shape), then render the ink-on-paper Track SVG from the design as an additional marginalia element.LocalizedParagraphsfield onNarrativeOutput. Captions-as-micro-stories was Phase 3.5 of the prior design plan; needs the full prompt-tuning ceremony from CLAUDE.md.🤖 Generated with Claude Code