From b152e246ff6e21c91bd910a799937dd8e756a02e Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sun, 10 May 2026 19:25:51 +0200 Subject: [PATCH] style: format remaining files --- README.md | 34 +++++++++++++++++----------------- cmd/README.md | 8 ++++---- sqlc.yaml | 12 ++++++------ static/style.css | 4 ++-- templates/components/README.md | 25 +++++++++++++------------ tsconfig.json | 4 +--- 6 files changed, 43 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 804af9d..dd3abd5 100644 --- a/README.md +++ b/README.md @@ -52,16 +52,16 @@ Upstream APIs can fail transiently with `429` and `5xx` responses, so the app fa The codebase follows standard Go project layout conventions. -| Path | Purpose | -| --- | --- | -| `api/*` | Feature routes: anime, auth, playback, watchlist | -| `cmd/server` | Application entrypoint and CLI commands | -| `integrations/*` | External API clients and scraping | -| `internal/*` | Core services: db, middleware, server, worker | -| `pkg/middleware` | Generic HTTP middleware | -| `templates/*` | Server-rendered HTML templates | -| `migrations` | Schema evolution | -| `static` / `dist` | Frontend assets | +| Path | Purpose | +| ----------------- | ------------------------------------------------ | +| `api/*` | Feature routes: anime, auth, playback, watchlist | +| `cmd/server` | Application entrypoint and CLI commands | +| `integrations/*` | External API clients and scraping | +| `internal/*` | Core services: db, middleware, server, worker | +| `pkg/middleware` | Generic HTTP middleware | +| `templates/*` | Server-rendered HTML templates | +| `migrations` | Schema evolution | +| `static` / `dist` | Frontend assets | ## Getting started @@ -108,13 +108,13 @@ docker exec mal ./cmd/user ## Configuration -| Variable | Default | Description | -| --- | --- | --- | -| `PORT` | `3000` | HTTP listen port | -| `DATABASE_FILE` | `mal.db` | SQLite database file path | -| `ENV` | _(empty)_ | Set to `production` to enable secure session cookies | -| `MIGRATIONS_DIR` | _(auto-discovered)_ | Optional explicit path to migration files | -| `PLAYBACK_PROXY_SECRET` | _(required)_ | HMAC secret for signed playback proxy tokens (min 32 chars) | +| Variable | Default | Description | +| ----------------------- | ------------------- | ----------------------------------------------------------- | +| `PORT` | `3000` | HTTP listen port | +| `DATABASE_FILE` | `mal.db` | SQLite database file path | +| `ENV` | _(empty)_ | Set to `production` to enable secure session cookies | +| `MIGRATIONS_DIR` | _(auto-discovered)_ | Optional explicit path to migration files | +| `PLAYBACK_PROXY_SECRET` | _(required)_ | HMAC secret for signed playback proxy tokens (min 32 chars) | ## Testing diff --git a/cmd/README.md b/cmd/README.md index 16dfe33..bb9a5f6 100644 --- a/cmd/README.md +++ b/cmd/README.md @@ -2,7 +2,7 @@ Executables live here. -| binary | purpose | -| --- | --- | -| `cmd/server` | web server | -| `cmd/user` | user creation CLI | +| binary | purpose | +| ------------ | ----------------- | +| `cmd/server` | web server | +| `cmd/user` | user creation CLI | diff --git a/sqlc.yaml b/sqlc.yaml index 07c0027..90145be 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -1,12 +1,12 @@ -version: "2" +version: '2' sql: - - engine: "sqlite" - queries: "internal/db/queries.sql" - schema: "migrations/" + - engine: 'sqlite' + queries: 'internal/db/queries.sql' + schema: 'migrations/' gen: go: - package: "db" - out: "internal/db" + package: 'db' + out: 'internal/db' emit_json_tags: true emit_prepared_queries: false emit_interface: true diff --git a/static/style.css b/static/style.css index b631cc1..41dcfec 100644 --- a/static/style.css +++ b/static/style.css @@ -60,11 +60,11 @@ --radius: 6px; } -[data-theme="light"] { +[data-theme='light'] { color-scheme: light; } -[data-theme="dark"] { +[data-theme='dark'] { color-scheme: dark; } diff --git a/templates/components/README.md b/templates/components/README.md index b2b6e3c..05bfb43 100644 --- a/templates/components/README.md +++ b/templates/components/README.md @@ -2,17 +2,17 @@ ## Available Templates -| Component | File | Purpose | -|-----------|------|---------| -| Anime Card | `anime_card.gohtml` | Poster card with hover reveal | -| Continue Watching | `continue_watching.gohtml` | Continue watching row | -| Dropdown | `dropdown.gohtml` | Dropdown wrapper (also uses ``) | -| Filter Bar | `filter_bar.gohtml` | Search + filters for browse | -| Header | `header.gohtml` | Sticky header with nav | -| Navigation | `navigation.gohtml` | Sidebar navigation | -| Video Player | `video_player.gohtml` | Episode video container | -| Watchlist Actions | `watchlist_actions.gohtml` | Add/remove watchlist button | -| Watch Order | `watch_order.gohtml` | Watch order queue | +| Component | File | Purpose | +| ----------------- | -------------------------- | -------------------------------------------- | +| Anime Card | `anime_card.gohtml` | Poster card with hover reveal | +| Continue Watching | `continue_watching.gohtml` | Continue watching row | +| Dropdown | `dropdown.gohtml` | Dropdown wrapper (also uses ``) | +| Filter Bar | `filter_bar.gohtml` | Search + filters for browse | +| Header | `header.gohtml` | Sticky header with nav | +| Navigation | `navigation.gohtml` | Sidebar navigation | +| Video Player | `video_player.gohtml` | Episode video container | +| Watchlist Actions | `watchlist_actions.gohtml` | Add/remove watchlist button | +| Watch Order | `watch_order.gohtml` | Watch order queue | ## Usage @@ -27,6 +27,7 @@ All components are exposed as Go templates. Import by name: ## Props Convention Components accept a `dict` with named keys: + - `dict "Key" .Value "Key2" .Value2` -This keeps prop names explicit and self-documenting. \ No newline at end of file +This keeps prop names explicit and self-documenting. diff --git a/tsconfig.json b/tsconfig.json index df5ef7b..0b8f55a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,5 @@ "removeComments": false, "skipLibCheck": true }, - "include": [ - "static/*.ts" - ] + "include": ["static/*.ts"] }