From ca487f19791af334ab495a0fafb5e8fdb3b22d19 Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Mon, 23 Feb 2026 14:58:18 -0500 Subject: [PATCH] more Signed-off-by: Andrew Duffy --- CLAUDE.md | 116 ++--------------------------------------------------- README.md | 15 +++++++ index.ts | 14 +++++-- styles.css | 31 ++++++++++++++ 4 files changed, 59 insertions(+), 117 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b0bd496..e9a0782 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,12 +1,12 @@ # Vortex RFC Site -Static site generator for Vortex RFC proposals. +Static site generator for Vortex RFC proposals built with Bun. ## Project Structure ``` index.ts - Main build script and dev server -styles.css - Site styling (light/dark themes, monospace aesthetic) +styles.css - Site styling (light/dark themes) proposals/ - RFC markdown files (format: NNNN-slug.md) dist/ - Build output (gitignored) ``` @@ -33,125 +33,15 @@ bun run clean # Remove dist/ - Uses `Bun.serve()` to serve static files from `dist/` - Watches `proposals/` and `styles.css` for changes - SSE endpoint at `/__reload` for live reload -- Live reload script only injected in dev mode ## Styling - CSS custom properties for theming (`--bg`, `--fg`, `--link`, etc.) - System preference detection via `prefers-color-scheme` -- Three-state toggle: auto → dark → light → auto +- Two-state toggle: dark ↔ light - Theme persisted to localStorage ## Adding Features - Keep dependencies minimal (only `@types/bun` currently) - Use Bun built-ins: `Bun.file`, `Bun.Glob`, `Bun.markdown`, `Bun.serve` -- Maintain the retro monospace aesthetic - ---- - -Default to using Bun instead of Node.js. - -- Use `bun ` instead of `node ` or `ts-node ` -- Use `bun test` instead of `jest` or `vitest` -- Use `bun build ` instead of `webpack` or `esbuild` -- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install` -- Use `bun run - - -``` - -With the following `frontend.tsx`: - -```tsx#frontend.tsx -import React from "react"; -import { createRoot } from "react-dom/client"; - -// import .css files directly and it works -import './index.css'; - -const root = createRoot(document.body); - -export default function Frontend() { - return

Hello, world!

; -} - -root.render(); -``` - -Then, run index.ts - -```sh -bun --hot ./index.ts -``` - -For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`. diff --git a/README.md b/README.md index 0d0a4b3..2ad20ea 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,21 @@ This repo is used to store and discuss design decisions, features and significant changes in Vortex, either in specific APIs, 3rd-party integrations or the conceptual model. +## What needs an RFC? + +Vortex is a rapidly changing open source project that provides a file format, a compute toolkit, and a set of Rust libraries implementing a range of state-of-the-art compression codecs. + +Most development decisions in Vortex happen through the Discussions functionality. Simply open a new discussion describing the kind of change you'd like to make to the project, and if the maintainers like it, open a PR. + +This is a great process for bug fixes, simple features and purely additive changes. + +However, if you are making a significant change to the way Vortex functions, you may need to write an RFC first. Some example changes that would require an RFC: + +* Making a risky change to the format, such as adding new required fields to file metadata +* Rearchitecting core components of Vortex, or wide-ranging refactors that might break language bindings +* Creating new libraries or SDKs that we expect others to adopt +* Making changes to subsystems that are likely to affect performance if not done thoughfully, such as the core IO traits + ## Process The general process is that changes should be opened as PRs, with the discussion happening in comments on top of it. diff --git a/index.ts b/index.ts index 4eacd73..2b86537 100644 --- a/index.ts +++ b/index.ts @@ -42,6 +42,8 @@ const ICON_MOON = ``; +const ICON_GITHUB = ``; + const TOGGLE_SCRIPT = ` function toggleTheme() { const root = document.documentElement; @@ -72,8 +74,9 @@ const LIVE_RELOAD_SCRIPT = ` })(); `; -function baseHTML(title: string, content: string, cssPath: string = "styles.css", liveReload: boolean = false): string { +function baseHTML(title: string, content: string, cssPath: string = "styles.css", liveReload: boolean = false, repoUrl: string | null = null): string { const basePath = cssPath === "styles.css" ? "./" : "../"; + const githubLink = repoUrl ? `${ICON_GITHUB}` : ""; return ` @@ -91,7 +94,10 @@ function baseHTML(title: string, content: string, cssPath: string = "styles.css"

Vortex RFCs

- +
+ ${githubLink} + +
${content} @@ -147,7 +153,7 @@ function indexPage(rfcs: RFC[], repoUrl: string | null, liveReload: boolean = fa ${list} `; - return baseHTML("Vortex RFCs", content, "styles.css", liveReload); + return baseHTML("Vortex RFCs", content, "styles.css", liveReload, repoUrl); } function formatDate(date: Date): string { @@ -212,7 +218,7 @@ function rfcPage(rfc: RFC, repoUrl: string | null, liveReload: boolean = false): ${rfc.html} `; - return baseHTML(`RFC ${rfc.number} - ${rfc.title}`, content, "../styles.css", liveReload); + return baseHTML(`RFC ${rfc.number} - ${rfc.title}`, content, "../styles.css", liveReload, repoUrl); } function parseRFCNumber(filename: string): string { diff --git a/styles.css b/styles.css index 5b3ffb0..d95ca22 100644 --- a/styles.css +++ b/styles.css @@ -116,6 +116,37 @@ header h1 a:hover { color: var(--link); } +.header-actions { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.github-link { + display: flex; + align-items: center; + justify-content: center; + width: 36px; + height: 36px; + border-radius: 50%; + color: var(--fg-muted); + transition: color 0.15s ease, box-shadow 0.15s ease; +} + +.github-link:hover { + color: var(--fg); + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15); + text-decoration: none; +} + +:root[data-theme="dark"] .github-link:hover { + box-shadow: 0 2px 12px rgba(255, 255, 255, 0.1); +} + +.github-link svg { + display: block; +} + .theme-toggle { display: flex; align-items: center;