myst/web/app/static/css/input.css
Zach Tatman 200226015e
[codex] Update boilerplate UI design system (#12)
* feat(web): Jinja2 + HTMX + Pico CSS boilerplate

- Add jinja2, aiofiles, jinja2-fragments, python-multipart deps
- Wire up Jinja2Blocks (jinja2-fragments) and static file serving
- Create base.html (Pico Jade theme, HTMX, nav with auth state)
- Create index.html (landing) and dashboard.html (user profile)
- Add get_optional_session dependency for anonymous template context
- Refactor get_current_session to share session lookup logic

* feat(web): replace Pico CSS with Tailwind standalone CLI (dark+pink theme)

- Download Tailwind v4.3.0 standalone CLI binary (gitignored)
- Define custom dark+pink theme tokens in input.css
- Add dev.sh for parallel Tailwind watcher + uvicorn
- Update Dockerfile to build Tailwind during image build
- Update templates with Tailwind utility classes
- Generate minified output.css at build time

* Update boilerplate UI design system

* Refine Forgejo sign-in button

* feat(ui): adjust starting ui template html structure and theme styling

* refactor(ui): normalize Tailwind design tokens

* refactor(ui): fix Forgejo token input styling and validation styling

* refactor(ui): move panel titles and sub titles outside panels

* refactor(ui): vendor forgejo logo svg from /web/static/img
2026-05-26 22:50:25 -04:00

201 lines
6.1 KiB
CSS

@import "tailwindcss";
@theme {
--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
--color-background: oklch(98.6% 0.008 255);
--color-foreground: oklch(20.8% 0.04 255);
--color-card: oklch(100% 0 0);
--color-card-foreground: oklch(20.8% 0.04 255);
--color-muted: oklch(96.9% 0.012 255);
--color-muted-foreground: oklch(48.5% 0.03 255);
--color-accent: oklch(94.8% 0.025 255);
--color-accent-foreground: oklch(25.4% 0.045 255);
--color-primary: oklch(45.2% 0.115 235);
--color-primary-foreground: oklch(100% 0 0);
--color-primary-hover: oklch(37.8% 0.098 235);
--color-primary-muted: oklch(45.2% 0.115 235 / 12%);
--color-secondary: oklch(94.8% 0.025 255);
--color-secondary-foreground: oklch(34.5% 0.04 255);
--color-border: oklch(91.9% 0.016 255);
--color-border-subtle: oklch(96.8% 0.01 255);
--color-input: oklch(100% 0 0);
--color-ring: oklch(45.2% 0.115 235);
--color-ring-muted: oklch(45.2% 0.115 235 / 12%);
--shadow-card: 0 12px 32px oklch(20.8% 0.04 255 / 6%);
--color-success: oklch(47.8% 0.13 150);
--color-success-foreground: oklch(47.8% 0.13 150);
--color-success-muted: oklch(94.8% 0.055 150);
--color-warning: oklch(54.7% 0.13 65);
--color-warning-foreground: oklch(54.7% 0.13 65);
--color-warning-muted: oklch(96.3% 0.052 85);
--color-danger: oklch(50.6% 0.18 27);
--color-danger-foreground: oklch(50.6% 0.18 27);
--color-danger-muted: oklch(93.6% 0.04 27);
--color-expired: oklch(55.8% 0.025 255);
--color-expired-foreground: oklch(55.8% 0.025 255);
--color-expired-muted: oklch(96.8% 0.01 255);
--radius-sm: 0.125rem;
--radius-md: 0.25rem;
--radius-lg: 0.375rem;
--radius-xl: 0.5rem;
--radius-2xl: 0.75rem;
}
@custom-variant dark (&:where(.dark, .dark *));
.dark {
--color-background: oklch(18.4% 0.035 255);
--color-foreground: oklch(96.5% 0.012 255);
--color-card: oklch(22.8% 0.035 255);
--color-card-foreground: oklch(96.5% 0.012 255);
--color-muted: oklch(27% 0.032 255);
--color-muted-foreground: oklch(72% 0.025 255);
--color-accent: oklch(30.8% 0.04 255);
--color-accent-foreground: oklch(96.5% 0.012 255);
--color-primary: oklch(72% 0.125 235);
--color-primary-foreground: oklch(16% 0.03 255);
--color-primary-hover: oklch(78% 0.115 235);
--color-primary-muted: oklch(72% 0.125 235 / 18%);
--color-secondary: oklch(30.8% 0.04 255);
--color-secondary-foreground: oklch(90% 0.018 255);
--color-border: oklch(34% 0.035 255);
--color-border-subtle: oklch(29% 0.03 255);
--color-input: oklch(22.8% 0.035 255);
--color-ring: oklch(72% 0.125 235);
--color-ring-muted: oklch(72% 0.125 235 / 20%);
--shadow-card: 0 18px 44px oklch(0% 0 0 / 22%);
--color-success: oklch(75% 0.12 150);
--color-success-foreground: oklch(82% 0.12 150);
--color-success-muted: oklch(32% 0.07 150);
--color-warning: oklch(82% 0.13 75);
--color-warning-foreground: oklch(86% 0.13 75);
--color-warning-muted: oklch(35% 0.075 75);
--color-danger: oklch(76% 0.15 27);
--color-danger-foreground: oklch(82% 0.13 27);
--color-danger-muted: oklch(34% 0.08 27);
--color-expired: oklch(74% 0.025 255);
--color-expired-foreground: oklch(78% 0.025 255);
--color-expired-muted: oklch(30% 0.03 255);
}
@layer base {
* {
@apply border-border;
}
html {
@apply bg-background text-foreground;
font-family: var(--font-sans);
}
body {
@apply bg-background text-foreground antialiased;
letter-spacing: 0;
}
code {
font-family: var(--font-mono);
}
}
@layer components {
.btn {
@apply inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2.5 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50;
}
.btn-sm {
@apply px-3 py-2;
}
.btn-primary {
@apply bg-primary text-primary-foreground hover:bg-primary-hover;
}
.btn-secondary {
@apply border border-border bg-card text-secondary-foreground hover:border-ring hover:bg-accent hover:text-accent-foreground;
}
.btn-nav {
@apply text-muted-foreground hover:bg-accent hover:text-accent-foreground;
}
.section-header-primary {
@apply text-xs font-semibold uppercase tracking-[0.05em] text-primary;
}
.section-header-subtle {
@apply text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground;
}
.badge {
@apply rounded-full px-2.5 py-1 text-xs font-medium;
}
.badge-success {
@apply rounded-full bg-success-muted px-2.5 py-1 text-xs font-medium text-success-foreground;
}
.badge-warning {
@apply rounded-full bg-warning-muted px-2.5 py-1 text-xs font-medium text-warning-foreground;
}
.badge-danger {
@apply rounded-full bg-danger-muted px-2.5 py-1 text-xs font-medium text-danger-foreground;
}
.badge-expired {
@apply rounded-full bg-expired-muted px-2.5 py-1 text-xs font-medium text-expired-foreground;
}
.card {
@apply rounded-lg border border-border bg-card text-card-foreground;
box-shadow: var(--shadow-card);
}
.card-header {
@apply border-b border-border px-4 py-3;
}
.card-header-label {
@apply text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground;
}
.card-header-title {
@apply mt-1 text-base font-semibold text-card-foreground;
}
.card-body {
@apply px-4 py-4;
}
.input-mono {
@apply rounded-md border border-border bg-input px-3 py-2 font-mono text-[13px] leading-5 text-foreground transition placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring-muted;
}
.input-error {
@apply text-sm font-medium text-danger-foreground;
}
}