Skip to content

UI polish, colour themes, and a redesigned landing - #2

Merged
jjsnack merged 22 commits into
mainfrom
feat/ui-themes
Jul 28, 2026
Merged

UI polish, colour themes, and a redesigned landing#2
jjsnack merged 22 commits into
mainfrom
feat/ui-themes

Conversation

@jjsnack

@jjsnack jjsnack commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Branch of UI fixes plus a multi-theme colour system.

UI

  • Larger topic pills; hover colour-fills across UI elements
  • Sticky top nav; footer fixed to the bottom-left corner (no divider)
  • Larger list titles; full-row hover fill; vertically-centred dates
  • Console hidden on touch devices; console + button persist on every desktop page
  • Removed the theme toggle — theme now follows the system, changed via the console

Themes

  • Multi-colour "pop" themes (not monochrome) picked from the console: paper, dracula, valentine
  • Themes colour selection highlight, inline code, syntax highlighting, and mermaid diagrams
  • Semantic sets (link / pill / row / terminal / focus) so a theme can tint each surface independently
  • Each theme is its own file under assets/css/themes/*.css, auto-discovered and concatenated after main.css
  • Colourable surfaces + a "how to add a theme" recipe documented in CLAUDE.md

Landing & console (this round)

  • Landing reworked into a front door: greeting, featured latest post (title, date, topics, summary, read link), a short recents list, topics, and a link to the archive — no longer a clone of /posts/
  • /posts/ is the full archive: paginator moved here
  • Console ↑/↓ walks previous commands, shell-style
  • Raised post-nav and added page-bottom padding so content clears the fixed footer
  • Added a code-heavy example post and pagination config

Verification

node assets/js/console.js self-check passes; hugo --minify builds clean (23 pages). Not yet eyeballed in a live browser.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW

jjsnack and others added 22 commits July 28, 2026 08:32
Bump topic-cloud pill font (0.78→0.85rem) and padding for a larger tap
target.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
The keyboard-driven terminal has no place on small touch screens, so
hide the launcher and window below 34rem. JS still loads but the UI stays
gone; !important beats the hidden-attr removal JS does on enhance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Make the site header position:sticky so it stays at the top while
scrolling. Opaque bg and z-index so content scrolls cleanly underneath.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Topic pills, the console launcher, and the console bar buttons now fill
with the accent colour on hover/focus, flipping text to a new --accent-fg
var. Adds a 0.15s transition. Inline nav and prose links stay colour-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Bump list title to 1.25rem. On hover the whole row fills with the accent
colour, text flipping to --accent-fg. Negative inline margin cancels the
new padding so text stays aligned at rest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Add two rich, multi-hue themes (paper, dracula) pickable from the console
(`theme set <name>`), replacing the earlier monochrome set. Introduces:

- a pop palette (--c-red..--c-pink) defined on light/dark bases so every
  theme has vivid source colours, feeding UI, selection, and mermaid
- semantic sets (--link, --pill, --row, --term, --focus, each with a
  fill-fg) so a theme can tint each surface independently — e.g. dracula
  keeps the selection grey but makes pills green, rows purple, console pink
- ::selection highlight and per-theme --selection / --code vars
- mermaid diagrams tinted from the active theme's CSS vars (theme: base)

The pre-paint script now applies any saved theme, not just light/dark, so
colour themes no longer flash on load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Switch Chroma to class-based output (markup.highlight.noClasses = false)
and map the token classes to the pop palette, so fenced code blocks colour
themselves per theme instead of using Chroma's baked-in hex. Also tint
inline `code` with the theme's --code var.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
The mobile hide keyed on max-width: 34rem, which also fired on a narrow
desktop window and made the console vanish. Key on pointer type instead
(hover: none and pointer: coarse) so only real touch devices lose it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Add a Themes section to CLAUDE.md covering every colourable surface (core,
selection, inline code, syntax, mermaid, pop palette), the semantic sets
table, and a recipe for adding a new theme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Remove the toggle button next to the site title and its inline script.
Theme now follows the OS by default (no data-theme), and is changed via the
console (`theme set <name>`); persistence/no-flash stays in the baseof
pre-paint script. Deletes the now-dead .theme-toggle CSS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Move the console partial from index.html into baseof.html so the launcher
and window appear on all pages (posts, lists, taxonomies), not only the
home page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
A post full of fenced code (Python, JS, Go, Rust, Bash, CSS) plus inline
code, so the theme-aware syntax highlighting has somewhere to show off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Switch the row flex alignment from baseline to center so the small mono
date sits mid-row instead of low on the title's baseline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Each named theme now lives in assets/css/themes/<name>.css instead of
main.css. baseof.html concatenates main.css + every theme file (themes
last, so their :root[data-theme] blocks still win by source order) into one
fingerprinted bundle via resources.Match + resources.Concat. New themes are
picked up by the glob automatically. Docs updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Blush ground, burgundy ink, all pinks + rose/crimson pops (no purple).
Adds valentine.css and registers it in the console theme modes + self-check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Pull the footer out of the centred content column and pin it to the
viewport's bottom-left (mirroring the console launcher on the right).
Remove the border-top divider.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Paginate posts on the home page via .Paginate with pagerSize = 12, plus a
minimal mono pager (newer / n / total / older) that only renders past one
page. Keeps long archives from turning into an endless scroll.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Shell-style recall: ArrowUp steps back through the session's command
history, ArrowDown forward, and down past the newest clears the line.
Submitting resets the cursor. Caret jumps to end on recall.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
The fixed footer overlapped the tail of long pages, and post-nav sat
too far down. Add 6rem bottom padding to main so content scrolls clear
of the footer, and drop post-nav margin-top 4rem -> 2rem.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
The home page duplicated /posts/: both showed the topic cloud and the
full post list. Make the landing distinct — a greeting, the latest post
featured (large title, date, topics, summary excerpt, read link), a
short "more writing" list of recents, topics, then a link to the full
archive. Move the paginator to /posts/ (list.html) so the firehose and
pager live in one place. Shorten the hero description copy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
`relURL "/"` returns a bare "/", so on a project-subpath deploy (e.g.
GitHub Pages at /basic/) the title linked to the domain root and broke
the site. Use site.Home.RelPermalink, which prepends the subpath like
the nav links already do.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
Make the landing greeting pop and retint per theme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
@jjsnack
jjsnack merged commit ea0c45a into main Jul 28, 2026
1 check passed
@jjsnack
jjsnack deleted the feat/ui-themes branch July 28, 2026 00:17
@jjsnack

jjsnack commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

Review — UI polish, colour themes, redesigned landing

Reviewed against frontend-UI / accessibility and JS best-practice lenses. Solid PR — the theme "sets" architecture is clean, the self-check is extended, and the ponytail: comments name the shortcuts. node assets/js/console.js passes. Findings ranked by severity.

Accessibility

1. Home page has no h1. layouts/index.html — the top heading is <h2 class="lead__title">. The site-title in the header is a link, not a heading, so the page jumps straight to h2. Every other layout (list, single, taxonomy) has an h1. This breaks the document outline and hurts SEO. Cheapest fix: promote the greeting to the h1:

{{ with $intro }}<h1 class="intro">{{ . }}</h1>{{ end }}

2. Syntax + comment colours fail WCAG AA on the light themes. In main.css the light-base pop palette on white: --c-yellow #b8860b (strings) ≈ 3.2:1, --c-green #2e8b57 (functions) ≈ 3.7:1 — both under the 4.5:1 needed for normal-size text (code counts). Comments use --muted; valentine's --muted #a86b7e on #fff0f5 ≈ 3:1. Darken the light/paper yellow + green and the valentine muted. (Computed, not rendered — please eyeball after.)

UX tradeoffs (deliberate — flagging so they're conscious calls)

3. Touch devices lose all manual theme control. The console is hidden on touch and the toggle was removed, so on mobile the theme is 100% OS-driven with no in-page override. The PR body frames this as intentional — noting it here.

4. Fixed footer can overlap content. .site-footer { position: fixed; bottom-left } relies on a magic main { padding-bottom: 6rem } to clear it. On short viewports / large zoom the footer sits over the last post rows and the pager, and the 6rem breaks if the footer ever grows past one line.

JS / robustness (nits)

5. Pre-paint script trusts any stored theme string. baseof.html: if (t) document.documentElement.dataset.theme = t; — a stale or removed theme name is still applied (falls back to dark-base via :not([data-theme="light"])). A whitelist check against the known modes would be safer. Optional.

6. Arrow-key keydown precedence reads ambiguous. console.js: if (e.key !== "ArrowUp" && e.key !== "ArrowDown" || !cmdHistory.length) — correct (&& binds first) but parenthesize the arrow test for clarity.

Keep as-is (good)

  • Console focus management (input ↔ launch on open/close, Escape to close) is correct.
  • Pager disabled states use <span>, not dead <a> — right call.
  • The sets pattern (each surface defaults to --accent) keeps theme files ~14 lines.
  • History recall (histIdx == length means the current line) matches shell semantics.

Fixes for #1, #2, and #6 in a follow-up PR.

🤖 Generated with Claude Code

jjsnack added a commit that referenced this pull request Jul 28, 2026
Addresses PR #2 review:
- home page had no h1 (top heading was h2) — add a visually-hidden
  h1 with the site title so the document outline is complete without
  changing the front-door layout
- light-base + paper syntax yellow/green and valentine/paper muted
  were below WCAG AA 4.5:1 as code text — darken them
- parenthesise the ArrowUp/ArrowDown keydown test for clarity


Claude-Session: https://claude.ai/code/session_01RbMGFzZfHUfbhid95FjBKb

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant