moonoops/astro-phosphor
Tentang
A 100% static 1990s CRT desk personal site template with 5 switchable retro desktop OS styles (20 presets), bilingual MDX, 5 offline games, and AI Agent Skills — Astro 5 + React 19 + Tailwind CSS v4.
Pengembangan web dan aplikasiYang dapat Anda lakukan
- Layer 2 — Peer OS Registry (src/os/): Strictly isolated html[data-os="<id>"] tokens & chrome, zero-duplication top/bottom bar chrome, and 5 dynamic SVG cursor sets (PixelCursors.tsx) matching each OS palette.
- Layer 3 — Shared Static Apps & Content: Built once against the Shared Semantic Token Contract (--os-* + legacy bridge) in docs/DESIGN.md.
- add-os-style — add a brand-new peer retro desktop OS style with isolated tokens, chrome, cursors, and Playwright checks.
- room-backdrop — generate, optimize (npm run art:room), and calibrate a custom 1990s monitor/desk room photograph and its 5 time-of-day lighting scenes.
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- Mengumpulkan riwayat
- dalam 15 hari
- Mengumpulkan riwayat
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliAstro Phosphor
English | 简体中文
A 100% static 1990s CRT desk & multi-OS personal site template hosting 5 switchable retro desktop OS styles (20 theme presets) inside a sunlit Macintosh LC monitor — built with Astro 5, React 19, and Tailwind CSS v4.
Live Template Demo: moonoops.github.io/astro-phosphor (pure static build of this repository)
Extended Live Showcase: xox.pub (a personal site built on top of this template — includes extra self-hosted backend features like Chat, Message Board, and Media Decks that are intentionally excluded from this lightweight static template; if you need backend features, you can spin them up quickly with any AI coding assistant using the included specs).
5 Retro OS Styles Showcase (CRT Monitor + Fullscreen)
Each OS style has 4 built-in theme presets (20 total), its own chrome topology, typography, dynamic SVG cursors, and seamless switching between CRT Desk (Room / Close) and 1:1 Fullscreen modes.
1. Rainbow OS (Default) — studio · marigold · sky · classic
Daylight CMY creative studio on cream drafting graph paper with a top *.fig tab bar, NOW.txt sticky card, and crisp 1px ink outlines. — Live Preview (?os=rainbow) · Spec
CRT Monitor View (Afternoon) · Rainbow Desktop |
Fullscreen View · Work Portfolio Grid |
2. Phosphor CRT OS — amber · green · blue · white
Classic single-hue glowing monochrome CRT with 0px corners, 3D extruded pixel keycaps, curved tube optics, and a Win95-inspired bottom taskbar. — Live Preview (?os=phosphor) · Spec
CRT Monitor View (Night) · Amber Phosphor Desktop |
Fullscreen View · Green Phosphor & Live 5-OS Design System |
3. Coffee OS — roast · matcha · indigo · oat
Archival editorial paper and Instrument Serif typography paired with a passive top status bar, floating bottom dock, and tilted sand NOW.txt card. — Live Preview (?os=coffee) · Spec
CRT Monitor View (Afternoon) · Coffee Editorial Desktop |
Fullscreen View · Reading Mode & Bilingual CJK MDX Journal |
4. CLI OS — claude · light · dark · matrix
Prompt-style developer terminal rendered in pure IBM Plex Mono with a numbered shell directory rail, Welcome terminal box, and pinned bottom command dock. — Live Preview (?os=cli) · Spec
CRT Monitor View (Dusk) · Prompt-Style Terminal Desktop |
Fullscreen View · Terminal Profile & Specs |
5. Pixel OS — paper · slate · mint · sky
Classic Macintosh System 7 1-bit pixel dot wallpaper with a 5-stripe retro rainbow top menu bar, 6-line pinstripe window titlebars, and right-aligned icon rail. — Live Preview (?os=pixel) · Spec
|
CRT Monitor View (Morning) · Classic Macintosh Desktop |
Fullscreen View · 5 Offline Retro Games (Magic Tower 21F) |
5 Peer Pluggable Retro Desktop OS Styles (20 Theme Presets)
Switch OS styles at runtime via the OS button in the menu bar / dock, Menu → System, /design-system, or by appending ?os=<id> to any URL (zero FOUC, per-OS theme memory):
| OS Style | data-os |
Presets (20 total) |
Aesthetic & Chrome Topology | Spec |
|---|---|---|---|---|
| Rainbow (Default) | rainbow |
studio, marigold, sky, classic |
Daylight CMY creative studio, cream drafting graph paper, top *.fig tab bar, NOW.txt sticky card, squircle windows |
docs/os/rainbow/DESIGN.md |
| Phosphor | phosphor |
amber, green, blue, white |
Classic single-hue glowing monochrome CRT (0px corners, 3D extruded pixel keys, bottom Win95-inspired taskbar) |
docs/os/phosphor/DESIGN.md |
| Coffee | coffee |
roast, matcha, indigo, oat |
Archival editorial paper & Instrument Serif, passive top status bar + floating bottom dock, tilted sand NOW.txt note |
docs/os/coffee/DESIGN.md |
| CLI | cli |
claude, light, dark, matrix |
Prompt-style developer terminal in pure IBM Plex Mono, shell directory rail, welcome box & pinned bottom command dock |
docs/os/cli/DESIGN.md |
| Pixel | pixel |
paper, slate, mint, sky |
Classic Macintosh System 7 1-bit pixel dots, top rainbow menu bar, 6-line pinstripe titlebars & right-aligned icon rail | docs/os/pixel/DESIGN.md |
Core Highlights
- Three-Layer Pluggable Architecture:
- Layer 1 — Physical Hardware Shell (
docs/os/hardware.md): Calibrated1672 × 941Macintosh LC desk plates, 5 local-clock time-of-day scenes (morning,noon,afternoon,dusk,night), 3 camera views (Room/Close/Fullscreenwith click-to-close auto-zoom), cathode-ray power collapse/warm-up physics, and curved 7-layer CRT optics (barrel curvature, scanlines, aperture grille, glass patina, reflections). - Layer 2 — Peer OS Registry (
src/os/): Strictly isolatedhtml[data-os="<id>"]tokens & chrome, zero-duplication top/bottom bar chrome, and 5 dynamic SVG cursor sets (PixelCursors.tsx) matching each OS palette. - Layer 3 — Shared Static Apps & Content: Built once against the Shared Semantic Token Contract (
--os-*+ legacy bridge) indocs/DESIGN.md.
- Layer 1 — Physical Hardware Shell (
- AI-Friendly, Spec-Driven + Built-In Agent Skills: Ships with
AGENTS.md,docs/DESIGN.md, 5 per-OS specs, plus two ready-to-use Agent Skills:add-os-style— add a brand-new peer retro desktop OS style with isolated tokens, chrome, cursors, and Playwright checks.room-backdrop— generate, optimize (npm run art:room), and calibrate a custom 1990s monitor/desk room photograph and its 5 time-of-day lighting scenes.
- 100% Static + Persistent Chrome: Compiles to plain files in
dist/with zero backend, zero database, and zero/api/requests.<ClientRouter />+transition:persistkeeps OS chrome, theme, scene, and camera zoom intact across navigations without replaying boot animations. - Bilingual MDX Journal & Reading Mode: Category/tag/keyword search, sticky scrollspy Table of Contents, OS-matched Shiki code highlighting, automatic
lang: zh-CNCJK typography rules, and one-click Reading Mode that softens CRT optics for comfortable long-form reading. - 5 Pure-Frontend Offline Retro Games: Minesweeper, Tetris, Snake, 2048, and 21-floor Magic Tower (
魔塔 21Fwith Standard & Hard difficulties, 9 monster traits, Hybrid/Full-Color toggle, and 4localStoragesave slots) — adapting live to monochrome CRT on Phosphor and vivid color palettes on Rainbow/Coffee/CLI/Pixel.
Included Routes
| Route | Description |
|---|---|
/ |
Retro desktop with 6 symmetrical shortcuts, optional NOW.txt widget, TypedText intro & hero wallpaper |
/work & /work/[slug] |
Featured portfolio grid + stacked case study windows + true-color GalleryLightbox |
/journal & /journal/[slug] |
Static bilingual MDX blog with search/category/tag filters, TOC scrollspy & Reading Mode |
/about |
Profile, pixel avatar, desk specs, SetupWizard, principles, timeline & FAQPanel |
/contact |
Retro email composer (mailto: handoff or local .txt draft download) |
/design-system |
Live 5-OS & 20-preset switcher, semantic tokens, typography scale, buttons, forms, icons & interactive specimens |
/games |
Offline Arcade hub launching Minesweeper, Tetris, Snake, 2048, and Magic Tower 21F |
/404 |
Compact retro alert dialog |
Quick Start
Requires Node.js ^20.19.0 or >= 22.12.0.
npm install
npm run dev
Open http://localhost:4321 in your browser.
Useful Commands
npm run check # Astro diagnostics + strict TypeScript check
npm run build # Build 100% static site into dist/
npm run preview # Preview the production dist/ build locally
npm run art:room # Optimize custom 5-scene room plates into responsive WebP
npm run test:browser # Run Playwright multi-OS & offline E2E checks (requires Chrome)
Personalize & Customize with AI
- Site Identity & Links: Edit
src/site.tsandsrc/data/page-copy.json. - Portfolio Projects: Replace the sample
.mdxcase studies (field-guide,signal-kit,trail-map) insrc/content/projects/and place covers inpublic/media/work/. - Journal Essays: Add
.mdxposts insrc/content/journal/. Setlang: zh-CNfor Chinese articles ordraft: trueto hide drafts. - Default OS & URL Previews: Change
DEFAULT_OSinsrc/os/registry.ts, or preview any combination via URL query params:?os=rainbow|phosphor|coffee|cli|pixeland?scene=morning|noon|afternoon|dusk|night. - Contact Email & Site Origin: Copy
.env.exampleto.env:- Set
PUBLIC_CONTACT_EMAILto enablemailto:handoff from/contact(leave blank to let visitors download.txtdrafts locally). - Set
SITE_URL(and optionallySITE_BASEfor subpath hosting) beforenpm run build.
- Set
- Add a New OS Style or Swap the Desk Backdrop (Built-in Agent Skills):
- Ask your AI coding assistant to follow
.agents/skills/add-os-style/SKILL.mdto craft a 6th peer OS style. - Ask it to follow
.agents/skills/room-backdrop/SKILL.mdto generate and calibrate a custom 5-scene desk backdrop withnpm run art:room.
- Ask your AI coding assistant to follow
Deploy Anywhere (Static Hosting)
- GitHub Pages (Included Workflow): Click Use this template, enable Settings → Pages → Source: GitHub Actions, and every push to
mainautomatically deploys via.github/workflows/deploy-pages.yml(subpathSITE_BASEis configured automatically viawithBase()). - Cloudflare Pages / Vercel / Netlify: Connect the repository, set build command
npm run buildand output directorydist.
Make sure your host serves dist/404.html for missing routes so the retro error dialog appears automatically.
Credits & License
- Design Inspiration: Thanks to @realmehedi1 for the free Framer template (Nostalgia Computer) that inspired the original Phosphor CRT aesthetic, along with classic retro OS craft (Amara Makes, Prompt OS, Vintage OS, Macintosh System 7). All code, pixel icons, optical shaders, and desk artwork in this repository are independently authored/generated.
- Community: Special thanks to the LINUX DO community for the open-source spirit, discussions, and feedback.
- Offline RPG: Magic Tower (魔塔 21F) combat & critical formulas inspired by
ckcz123/mota-js(BSD-3-Clause), rebuilt from scratch in TypeScript and Canvas. - Self-Hosted Fonts (via Fontsource): Jersey 10, Chivo Mono, Instrument Serif, DM Sans, DM Mono, Outfit, IBM Plex Mono, Geist Pixel, Pixelify Sans, Geist, and Geist Mono.
Licensed under the MIT License.
Jelajahi proyek terkait
Memuat…