Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

62 changes: 62 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Contributing

## HTML

- Semantic elements over generic `div`/`span`
- Minimal wrappers; avoid nesting without purpose
- Minimal classes; prefer element and attribute selectors
- ARIA attributes where native semantics fall short
- No inline styles; keep presentation in CSS
- Use `<code-block lang="...">` for fenced code examples

## CSS

- Native CSS nesting; no preprocessors
- `light-dark()` for theming via `color-scheme`
- CSS custom properties for shared values
- Specific `transition` properties, not `all`
- Gate motion behind `prefers-reduced-motion`
- Mobile breakpoint at `768px`

## JavaScript

- Functional style; `const`, arrow functions, expressions
- Minimal intermediates; prefer composition
- No frameworks or external dependencies
- Handle async errors (e.g. `.catch` on clipboard)
- No DOM writes from user input without escaping

## General

- Avoid dependencies if possible; prefer `npx` for external tools
- Single file; CSS and JS are embedded in `index.html`
- Keep the page under 1000 lines total
- Test in both light and dark mode
- Verify mobile layout before committing
- Fix lint warnings in prose, not in the linter config

## Server

### Add a new page

1. Place an `.html` file in the project root
2. Register it in `app.js`: `.get('/path', 'file.html')`

### Serve custom content

1. Add a text route in `app.js`: `.get('/path', 'body')`

Omit the body to respond with `ok`: `.get('/health')`

### Serve static files

1. Place files in a directory (e.g. `assets/`)
2. Register in `app.js`: `.static('/assets')`

### Notes

- Only `GET` requests; everything else returns `405`
- File extensions must have a known MIME type (see `Server.DEFAULTS.mime`)
- Pages are loaded into memory at startup; restart to pick up changes
- Static directories must be within the project root
- `index.html` at root is auto-detected and served at `/`
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
*.DS_STORE
.DS_Store
tmp
.claude/
286 changes: 0 additions & 286 deletions CHANGELOG.md

This file was deleted.

Loading
Loading