@henryqw/theme
v0.3.0
Published
Henry style: tokens, base styles, and Astro components for Henry Wang's sites.
Readme
@henryqw/theme
Henry style for Henry Wang's sites: color tokens, base styles, and Astro components. Used by henry.wang and pi.henry.wang.
Files
| Import | Use |
| --- | --- |
| @henryqw/theme/tokens.css | --ui-* custom properties. Safe in any site. |
| @henryqw/theme/base.css | Element rules (body, links, focus ring). Standalone sites only. |
| @henryqw/theme/components.css | Styles for the components below, scoped to their classes. |
| @henryqw/theme/blume.css | Maps the tokens to Blume --blume-* variables (light and dark). |
| @henryqw/theme/tokens | The same colors as strings, for config files such as blume.config.ts. |
| @henryqw/theme/fonts | geist, the Geist entry for the Astro fonts config. |
| @henryqw/theme/projects | Henry's projects and the author line. footer(site, repo) is the whole Blume footer of a project site. |
Components (@henryqw/theme/components/*.astro): SiteHeader, Footer, SocialLinks,
ExternalLink, Icon, Reveal, RowReveal.
Standalone Astro site
@import "tailwindcss";
@import "@henryqw/theme/tokens.css";
@import "@henryqw/theme/base.css";
@import "@henryqw/theme/components.css";// astro.config.mjs
import { geist } from "@henryqw/theme/fonts";
export default defineConfig({ fonts: [geist] });Render <Font cssVariable="--font-geist" preload /> from astro:assets in the page head.
Blume site
/* theme.css */
@import "@henryqw/theme/tokens.css";
@import "@henryqw/theme/blume.css";// blume.config.ts
import { colors } from "@henryqw/theme/tokens";Reveal
Reveal and RowReveal animate with CSS. A "view" reveal starts hidden only when scripts
run and the reader allows motion, so content stays visible without JavaScript.
Development
npm testTo try a change in a site before a release, link the local copy from the site:
pnpm link /path/to/theme, then remove the link when done.
Release
- Update
versioninpackage.jsonand merge tomain. - The Publish workflow runs the tests, publishes the new version to npm (trusted publishing, no token) and pushes the tag
v<version>. A push that keeps the version publishes nothing.
License
MIT
