Skip to content

feat: migrate site to Astro with interactive 3D wireframe logo#22

Merged
ronaldtse merged 1 commit into
mainfrom
feat/astro-site-redesign
Jul 23, 2026
Merged

feat: migrate site to Astro with interactive 3D wireframe logo#22
ronaldtse merged 1 commit into
mainfrom
feat/astro-site-redesign

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Replaces the VitePress site with an Astro + Vue + Tailwind v4 build, centered on a redesigned homepage that turns the UnitsML mark into a real 3D wireframe you can play as an instrument.

Hero: 3D wireframe logo

  • Manual SVG 3D projection of the polygon mark (no Three.js dependency)
  • 48 edges colored by Y position through the 7 official BIPM SI Brochure base-unit colors (gold→orange→red→magenta→purple→blue→green)
  • Cursor parallax that reads zero rotation when the cursor is at logo center, then tilts away
  • Hover-boost: parallax multiplier + glow halo when directly over the logo

Strummable strings

  • Every wireframe edge is a string tuned to a C major scale across 1.5 octaves: C5 A4 G4 F4 E4 D4 C4 (mapped to s/m/kg/mol/cd/K/A top→bottom)
  • Pluck on click, strum by dragging across edges
  • Three Web Audio synth voices: piano (4 sine partials), bell (5 inharmonic partials with stretched decay), electronic (square+sawtooth through resonant lowpass sweep + feedback delay)

The Units Song — 3 recognizable melodies

  • Ode to Joy (Beethoven, 1824 — public domain), piano voice
  • Amazing Grace (Newton, 1779 — public domain), bell voice
  • Twinkle, Twinkle Little Star (traditional French folk — public domain), bell voice
  • Triggerable by word (ode, grace, twinkle), by button, or via unitsmlEE.playMelody() in the console

Sounds-have-units educational readout

  • Hidden by default behind a 🎵 emoji toggle (persists to localStorage)
  • Live panel showing each note's frequency (Hz = s⁻¹), period (ms), wavelength (cm), and MIDI number
  • Footer references: speed of sound (343 m·s⁻¹), A4 = 440 Hz (ISO 16:1975), octave doubles frequency

Easter eggs (type anywhere)

  • Organizations: nist, oasis, calconnect, bipm, iec, ocx → fact card with logo
  • SI base units: meter, kilogram, second, ampere, kelvin, mole, candela → 2019 SI definition card with defining constant
  • Mascot: wappi
  • Cascades: units, unitsml, unitsdb, si, 2003, hello
  • help in the console lists every trigger
  • Hero dim-symbol collection game: click all 7 SI dimensions (L M T I Θ N J) → Master of Dimensions cascade
  • Logo 5-click combo → particle cascade

Other

  • Dark mode toggle with no-flash bootstrap script and localStorage persistence
  • Count-up UnitsDB stat counters (IntersectionObserver + rAF easing)
  • Front-page gutter fix (max-width + auto margins on .home-hero / .section)
  • GitHub text link replaced with a GitHub mark SVG button in nav
  • Content reframed as "since 2003 — 23 strong years and counting" throughout (about, history, who-uses-unitsml, WappiMascot)
  • .astro/ build cache and kimi-export-session_*.md session exports added to .gitignore

Test plan

  • npm run build succeeds locally
  • Homepage loads, wireframe logo renders with SI colors
  • Cursor parallax tracks mouse; rotation = 0 when cursor is at logo center
  • Click wireframe edges → string vibrates + tone plays
  • Drag across edges → strum
  • Click "Ode to Joy" button → recognizable melody plays
  • Type "nist" anywhere → NIST card appears
  • Type "wappi" → mascot appears
  • 🎵 toggle opens/closes the sounds-have-units readout
  • Dark mode toggle persists across reloads
  • Type help in console → lists all triggers
  • Mobile viewport: word triggers still work, wireframe scales

Notes

Please merge with rebase-merge.

Test plan

[Bulleted markdown checklist of TODOs for testing the pull request...]

Replace the VitePress site with an Astro + Vue + Tailwind v4 build, and
introduce a redesigned homepage centered on a real 3D wireframe of the
UnitsML mark.

Highlights
- 3D wireframe logo (Logo3DWireframe.vue) — manual SVG 3D projection of
  the polygon mark, edges colored by Y position through the 7 official
  BIPM SI Brochure base-unit colors. Cursor parallax (rotateX/Y) reads
  zero rotation when the cursor is at logo center, then tilts away.
- Strummable strings — each of the 48 wireframe edges is a string tuned
  to a C major scale across 1.5 octaves (C5 A4 G4 F4 E4 D4 C4).
  Pluck on click, strum on drag, with three synth voices (piano, bell,
  electronic) via Web Audio.
- The Units Song — three recognizable public-domain melodies
  (Ode to Joy, Amazing Grace, Twinkle Twinkle Little Star) triggerable
  by word, button, or console.
- Sounds-have-units educational readout — live panel showing each note's
  frequency (Hz = s-1), period (ms), wavelength (cm), and MIDI number,
  tied back to the SI base units. Toggled by a music-note emoji.
- Dark mode toggle with no-flash bootstrap and localStorage persistence.
- Hero dim-symbol collection game (L M T I Θ N J -> Master of Dimensions).
- Word-trigger easter eggs: nist, oasis, calconnect, bipm, iec, ocx,
  wappi, units, si, 2003, hello, plus SI base unit names -> fact cards.
- Count-up UnitsDB stat counters (IntersectionObserver + rAF).
- Chrome-particle logo click burst + 5-click combo cascade.

Content refresh
- Frame UnitsML as "since 2003 - 23 strong years and counting" throughout
  (about, history, who-uses-unitsml, WappiMascot facts).
- Front-page gutter fix (max-width + auto margins on home-hero and section).
- Replace GitHub text link in nav with a GitHub mark SVG button.

Build and infra
- astro.config.mjs, src/ tree, src/content collections, src/layouts,
  src/components/islands/* (Vue 3 islands via client:load and client:idle).
- .astro/ build cache and kimi-export-session_*.md added to .gitignore.
@github-actions

Copy link
Copy Markdown

🔗 Link Check Failed

@ronaldtse
ronaldtse merged commit 8891fcf into main Jul 23, 2026
3 of 5 checks passed
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