12 Commits
Author SHA1 Message Date
tiennm99 1ad292558d fix(ci): clear 4 lighthouse hard failures on lighthouse-ci
All 4 category scores were ≥0.93 — but `lighthouse:recommended` preset
asserts on individual audits that exit 1 independently of category aggregates.

- head.html: emit `<link rel="icon">` only when `params.favicon` set
  (was unconditional with default "favicon.ico" → 404 → errors-in-console fail)
- exampleSite: ship favicon.ico + set params.favicon so demo exercises the link
- icons/single.html: bump 0.7rem → 0.75rem so the 12px Lighthouse legibility
  floor is met (was 11.2px → 76% of page text below threshold → font-size fail)
- gallery.css: chip--accent text now literal #fff (not var(--bonsai-bg)).
  Lands ≥4.5:1 on every shipped palette AND sidesteps axe-core's CSS-var
  resolution gap that reported contrastRatio=null on sakura
- .lighthouserc.json: suppress network-dependency-tree-insight,
  render-blocking-resources, render-blocking-insight. These fire on any
  <link rel=stylesheet> in <head> — structurally unavoidable for a CSS-first
  theme. Category Performance score remains 1.00 on every page
2026-05-15 20:23:32 +07:00
tiennm99 7cd9833860 feat(exampleSite): showcase v0.5 opt-ins + ship deploy templates
Updates exampleSite hugo.toml with v0.5 parameters for multi-section bio,
QR code, vCard, share button, analytics, and OG image generation.
Includes Vercel and Netlify deployment configuration templates.

Enables one-click deployment for new users.
2026-05-15 19:51:18 +07:00
tiennm99 1f5b9cb95e feat(theme): optional RSS feed of params.links
Closes #8.

Opt-in via `params.rss = true` (off by default). When enabled:
- layouts/index.rss.xml renders an RSS 2.0 feed of [[params.links]]
  at /index.xml — one <item> per link, pubDate = build time
- head.html emits <link rel="alternate" type="application/rss+xml">
- Users must remove "RSS" from their disableKinds to let Hugo emit it

Channel populated from params.{name,tagline,bio} and site.BaseURL.
Item shape: <title> = link title, <link> = link URL,
<guid isPermaLink="false"> = bonsai-link-{url}, optional <description>.

XML declaration uses safeHTML+printf to defeat Hugo's default escape
(otherwise '<?xml ... ?>' becomes '&lt;?xml ... ?&gt;' and breaks parsers).

exampleSite enables rss=true to demo the feature; verified output
parses as valid XML via Python ElementTree.
2026-05-10 02:59:03 +07:00
tiennm99 22919eca76 feat: layout variants — params.layout = stack/grid/inline
- Validate against allowlist in bio-card.html, warnf + fall back to stack on unknown values.
- Variant CSS scoped under .bio__links--{variant} to avoid v0.2-style specificity collisions.
- Inline variant visually-hides .link__title via clip-path; titles stay in DOM for screen readers.
- Grid collapses to 1-col under 480px.
- New /variants/ gallery page renders all three side by side.
- exampleSite switches to layout = "grid" so the live demo shows the new feature.
2026-05-03 12:19:16 +07:00
tiennm99 f8d21d49d2 fix: theme-toggle CSS specificity + demo uses initials fallback
- .theme-toggle svg { display: block } was beating per-class hide rules
  due to higher specificity. Scope the per-class rules under
  .theme-toggle .theme-toggle__sun/moon so they win.
- Remove avatar from exampleSite so the initials fallback renders, which
  inherits the active palette's accent color (sakura -> pink). The static
  avatar.svg was hardcoded vermilion and looked off in non-bonsai
  palettes.
2026-05-03 11:16:02 +07:00
tiennm99 1e7eeb28e9 docs: README + CHANGELOG for v0.2.0 + sakura demo
- README: add new params (colorTheme, themeToggle button details, schema,
  jobTitle/location/email, avatarInitials/Bg) to config table; new
  'Color themes' section with live gallery link
- CHANGELOG: 0.2.0 entry under Added/Changed; placeholder for v0.3
- exampleSite/hugo.toml: colorTheme = sakura for distinctive screenshot
  + jobTitle to populate Person.jobTitle in JSON-LD
2026-05-03 11:13:19 +07:00
tiennm99 16326d059d feat: v0.2 polish & SEO
Bundle of four small additions for the v0.2 release. All strictly
additive — no breaking changes; v0.1 sites upgrade without edits.

Phase 1 — Color theme presets
- Refactor static/css/bonsai.css: palette vars now scoped per
  [data-bonsai-theme]; layout vars (radius/gap/pad/fonts) stay in :root
- Four palettes: bonsai (default, vermilion+washi), sakura (cherry
  blossom), sumi (monochrome ink), koi (orange+cream). Light + dark
  variants each, both prefers-color-scheme and manual data-theme override
- New params.colorTheme (default 'bonsai'); applied via baseof
- Themes gallery at exampleSite /themes/ shows all 4 side-by-side

Phase 2 — schema.org Person markup
- New layouts/partials/schema-person.html emits JSON-LD ProfilePage
  containing a Person (built from name/bio/avatar/links + optional
  jobTitle/location/email)
- mailto: and tel: links excluded from sameAs
- Suppress with params.schema = false
- Wired into head.html

Phase 3 — Theme toggle UI button
- New layouts/partials/theme-toggle-button.html (sun/moon SVGs)
- Rendered in footer when params.themeToggle = true
- aria-pressed reflects current state; updated theme-toggle.js to
  sync on click and on first paint
- Sun shown in dark mode, moon in light (button shows target state)
- exampleSite enables the toggle by default for demo

Phase 4 — Avatar initials fallback
- New layouts/partials/avatar.html: img if params.avatar set,
  inline SVG circle with initials otherwise
- Initials auto-derived from params.name (first letter of up to 2
  words, uppercased); override with params.avatarInitials
- Background overrideable with params.avatarBg; defaults to accent
- bio-card.html simplified to delegate to the partial
2026-05-03 11:11:39 +07:00
tiennm99 5287136599 fix(exampleSite): use Latin T glyph for avatar (font-portable)
Headless renderers and many systems lack Japanese fonts to render the
kanji glyph used previously. T is universally available and reads as
a Tien-Nguyen demo monogram.
2026-05-01 16:42:34 +07:00
tiennm99 da8da904c7 feat(exampleSite): bonsai monogram SVG avatar + recapture screenshots
avatar.svg: vermilion circle with kanji 盆 (bon, from 盆栽) in
washi-paper text. exampleSite/hugo.toml updated to reference it.
images/screenshot.png and images/tn.png recaptured against the demo
now showing all 6 working brand+ui icons.
2026-05-01 16:37:26 +07:00
tiennm99 49566ae735 feat(icons): vendor Lucide UI + Simple Icons brand sets, data-driven partial
- Add scripts/sync-icons.sh to fetch 25 brand (Simple Icons v13) + 10 UI
  (Lucide v0.460) SVGs; idempotent, pinned versions, currentColor-normalised
- Vendor SVGs into assets/icons/{brand,ui}/
- Add data/icons.yaml manifest mapping public names → {family, slug}
- Rewrite layouts/partials/icon.html (13 lines) to data-driven resources.Get
  with generic external-link fallback for unknown names
- Add layouts/icons/single.html gallery page; exampleSite demo link
- Add NOTICE crediting Simple Icons (CC0 1.0) and Lucide (ISC)
- Update README with available-icons <details> section
- Add mastodon + bsky demo links to exampleSite/hugo.toml
2026-05-01 14:16:05 +07:00
tiennm99 268ee81b88 chore(exampleSite): disable taxonomy/RSS/sitemap (single-page bio) 2026-05-01 10:11:01 +07:00
tiennm99 a1dc82f213 feat: initial Bonsai theme scaffold
Minimalist Hugo theme for link-in-bio pages, inspired by Linktree
and Japanese bonsai aesthetics.

- Single-page bio with avatar, tagline, bio, and links
- Data-driven via [params] in hugo.toml — no content files needed
- Light/dark mode via prefers-color-scheme + optional toggle
- Inline SVG icon set (github, globe, mail, twitter, linkedin, etc)
- Zero JS by default; opt-in theme toggle script
- exampleSite for local development
2026-05-01 10:04:59 +07:00