feat: theme-aware logo, dark/light toggle, richer project entries - #3
Closed
ronaldtse wants to merge 4 commits into
Closed
feat: theme-aware logo, dark/light toggle, richer project entries#3ronaldtse wants to merge 4 commits into
ronaldtse wants to merge 4 commits into
Conversation
Astro 7.2 requires Node >= 22.12. The previous workflows used Node 20, which caused both CI and Deploy to fail on first run. Bumps: - .github/workflows/ci.yml: node-version 20 -> 22 - .github/workflows/deploy.yml: node-version 20 -> 22 - package.json engines.node: >=20.0.0 -> >=22.12.0
Adds two icon variants of the Claricle logo: - logo-claricle_icon-light: saturated colors that pop on white - logo-claricle_icon-dark: luminous colors that glow on dark Logo.astro is the single component that picks the variant. Default is "auto" — swaps via CSS based on prefers-color-scheme OR [data-theme]. The :not([data-theme='light']) guard ensures a manual "light" choice wins even when the system preference is dark. ThemeToggle.astro adds a sun/moon button to the nav. Click sets data-theme on <html> and persists to localStorage['claricle-theme']. BaseLayout ships an inline pre-paint script that applies any stored theme before first paint — prevents FOUC. brand.css gains dark-mode overrides for all 5 spectrum tokens, so category badges, dots, and stripes shift coherently with the logo. The same :not([data-theme='light']) guard is applied to the media query so the manual toggle always wins. LogoShowcase now purposefully renders the light variant in the light card and the dark variant in the dark card, instead of the same SVG twice.
Content updates from the actual repo READMEs: - postscript: pure-Ruby PS/EPS parser, typed model, serializer (lower layer of postsvg) - postscript-guide: Jekyll reference site for 300+ PostScript operators, hosted at claricle.github.io/postscript-guide/ - postsvg: bidirectional PS/EPS to SVG transformer, no Ghostscript - pdfrb: Arlington-model-driven PDF reader/model/serializer - emf: clean-room pure-Ruby parser for WMF, EMF, and EMF+ Removed from the projects page (Claricle is a fork, not the maintainer): - pdf-core-examples - libemf2svg (the Ruby binding emf2svg-ruby remains listed) - pngcheck Project count: 17 to 14. Spec threshold lowered from 15 to 10.
The attribution already lives in the footer; repeating it in the hero crowds the logo and dilutes the headline.
Contributor
Author
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
Adds a manual dark/light theme toggle, theme-aware logo variants, and richer project content.
Theme system
ThemeToggle.astro— sun/moon button in the navdata-themeon<html>and persists tolocalStorage['claricle-theme']BaseLayoutinline pre-paint script applies stored theme before first paint (no FOUC)brand.cssadds dark-mode overrides for all 5 spectrum tokens, so badges and accents shift coherently with the logo:not([data-theme='light'])guard on@media (prefers-color-scheme: dark)ensures a manual "light" choice always wins, even on dark-pref systemsLogo variants
public/:_icon-light(saturated, pops on white) and_icon-dark(luminous, glows on dark)Logo.astrocomponent — the single source of truth for picking the variant. Used in Nav, Footer, RainbowHero.LogoShowcaseon the About page now purposefully shows the light variant in the light card and the dark variant in the dark cardProject content
postscript,postscript-guide,postsvg,pdfrb,emfpdf-core-examples,libemf2svg(keptemf2svg-ruby),pngcheckIncludes
This branch also contains the CI Node 22 fix from PR #2 (I branched off
fix/ci-node-22). Once this merges, PR #2 can be closed as superseded.Test plan
/projects/no longer lists pdf-core-examples, libemf2svg, or pngcheck/about/logo showcase displays the correct variant in each card