55242caf58
P1-28: Tailwind standalone CLI wired into the Makefile. `make tailwind` downloads the pinned v3.4.17 binary into bin/tailwindcss (gitignored), builds web/styles/input.css → web/static/css/styles.css. `make build` now runs the CSS pass first; `make tailwind-watch` for dev. Output is embedded in the binary via web.FS — single static binary, no Node. The CSS source carries every component class the v1 mockups defined (status dots, buttons, host row, log viewer, progress bar, fields, chips, snippet panel, empty state) so screens that land later can just reach for them. P1-23: html/template tree at web/templates with two layouts (base with chrome, chromeless for login + bootstrap), one nav partial, and two pages (dashboard placeholder, login). internal/server/ui parses the tree at startup; ui_handlers.go in the http package wires: GET / dashboard (303 → /login when unauthed) GET /login sign-in form POST /login consume form, mint session cookie, 303 → / POST /logout drop cookie, 303 → /login GET /static/* embedded Tailwind bundle The HTML login flow shares store/session logic with /api/auth/login via a new authenticateAndSession helper — same security guarantees, two surface representations (HTML form / JSON). Verified end-to-end: bootstrap → form-login → authed dashboard → sign-out → 303 cycle works in the browser; Tailwind output emits only the component classes referenced in the live templates (9.6kB minified). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
/** @type {import('tailwindcss').Config} */
|
|
module.exports = {
|
|
// Source files Tailwind scans for class usage. Keep this list tight —
|
|
// anything outside it produces zero CSS.
|
|
content: [
|
|
'./web/templates/**/*.html',
|
|
],
|
|
theme: {
|
|
extend: {
|
|
fontFamily: {
|
|
// Used by `class="font-sans"` / `class="font-mono"`. Most code
|
|
// reaches for the explicit `.mono` component class instead.
|
|
sans: ['Inter', 'system-ui', '-apple-system', 'sans-serif'],
|
|
mono: ['"JetBrains Mono"', 'ui-monospace', 'monospace'],
|
|
},
|
|
colors: {
|
|
// Semantic tokens — match :root in web/styles/input.css.
|
|
// Tailwind utilities like `text-ink`, `bg-panel` resolve here.
|
|
bg: 'oklch(0.17 0.006 250)',
|
|
panel: 'oklch(0.20 0.007 250)',
|
|
'panel-hi': 'oklch(0.23 0.008 250)',
|
|
line: 'oklch(0.27 0.010 250)',
|
|
'line-soft': 'oklch(0.23 0.008 250)',
|
|
ink: {
|
|
DEFAULT: 'oklch(0.96 0.005 250)',
|
|
mid: 'oklch(0.78 0.005 250)',
|
|
mute: 'oklch(0.58 0.006 250)',
|
|
fade: 'oklch(0.42 0.006 250)',
|
|
},
|
|
ok: 'oklch(0.78 0.14 155)',
|
|
warn: 'oklch(0.82 0.13 80)',
|
|
bad: 'oklch(0.70 0.20 25)',
|
|
off: 'oklch(0.50 0.005 250)',
|
|
accent:'oklch(0.82 0.12 195)',
|
|
},
|
|
},
|
|
},
|
|
plugins: [],
|
|
};
|