Compare commits
15 commits
main
...
fix/dashbo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7930bfea97 | ||
|
|
25e6f794c1 | ||
|
|
0472242274 | ||
|
|
783b97498c | ||
| b2fe586b72 | |||
|
|
a7a0d1aabb | ||
|
|
1883381f3f | ||
|
|
97ded2d287 | ||
|
|
4bb8f1229d | ||
|
|
32635d9d0d | ||
|
|
a0617c6be4 | ||
|
|
e3ead49f13 | ||
|
|
8b7f2664d0 | ||
|
|
4a3d045b85 | ||
|
|
55d2718968 |
31 changed files with 1676 additions and 790 deletions
39
.agents/skills/web-design-guidelines/SKILL.md
Normal file
39
.agents/skills/web-design-guidelines/SKILL.md
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
name: web-design-guidelines
|
||||||
|
description: Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
|
||||||
|
metadata:
|
||||||
|
author: vercel
|
||||||
|
version: "1.0.0"
|
||||||
|
argument-hint: <file-or-pattern>
|
||||||
|
---
|
||||||
|
|
||||||
|
# Web Interface Guidelines
|
||||||
|
|
||||||
|
Review files for compliance with Web Interface Guidelines.
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
1. Fetch the latest guidelines from the source URL below
|
||||||
|
2. Read the specified files (or prompt user for files/pattern)
|
||||||
|
3. Check against all rules in the fetched guidelines
|
||||||
|
4. Output findings in the terse `file:line` format
|
||||||
|
|
||||||
|
## Guidelines Source
|
||||||
|
|
||||||
|
Fetch fresh guidelines before each review:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Use WebFetch to retrieve the latest rules. The fetched content contains all the rules and output format instructions.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
When a user provides a file or pattern argument:
|
||||||
|
1. Fetch guidelines from the source URL above
|
||||||
|
2. Read the specified files
|
||||||
|
3. Apply all rules from the fetched guidelines
|
||||||
|
4. Output findings using the format specified in the guidelines
|
||||||
|
|
||||||
|
If no files specified, ask the user which files to review.
|
||||||
72
agents.md
72
agents.md
|
|
@ -104,6 +104,24 @@ This file is the single source of truth for codebase obstacles, oddities, and th
|
||||||
**Solution/Workaround:** Use Tailwind v4 `@theme` tokens with semantic pairs such as `background/foreground`, `card/card-foreground`, `primary/primary-foreground`, `secondary/secondary-foreground`, `border`, `input`, and `ring`. Keep shared component structure in base classes like `.btn`, with variant classes only setting semantic colors.
|
**Solution/Workaround:** Use Tailwind v4 `@theme` tokens with semantic pairs such as `background/foreground`, `card/card-foreground`, `primary/primary-foreground`, `secondary/secondary-foreground`, `border`, `input`, and `ring`. Keep shared component structure in base classes like `.btn`, with variant classes only setting semantic colors.
|
||||||
**Preference:** Prefer semantic token names over appearance-based names; add dark mode by overriding CSS variables under `.dark`.
|
**Preference:** Prefer semantic token names over appearance-based names; add dark mode by overriding CSS variables under `.dark`.
|
||||||
|
|
||||||
|
### Dark-only Tailwind tokens live at root
|
||||||
|
**Area:** web/app/static/css/input.css, web/app/templates/*.html
|
||||||
|
**Obstacle:** The Firebreak UI is currently dark-only, but stale light theme tokens and scattered literal palette values made the active design system harder to change safely.
|
||||||
|
**Solution/Workaround:** Define Firebreak brand primitives and dark semantic roles in the root Tailwind v4 `@theme`; templates and component classes use token-backed utilities/classes instead of raw theme colors.
|
||||||
|
**Preference:** Keep palette values centralized in `@theme`; avoid arbitrary color utilities in templates. Reintroduce light mode only after defining a full paired token set.
|
||||||
|
|
||||||
|
### Button hover states belong to variants
|
||||||
|
**Area:** web/app/static/css/input.css, web/app/templates/*.html
|
||||||
|
**Obstacle:** Buttons mixed shared variants with page-specific hover utilities and ID selectors, causing inconsistent hover colors across pages.
|
||||||
|
**Solution/Workaround:** Add explicit variants such as `btn-danger` and `btn-link`; templates should choose the correct variant instead of stacking custom hover color utilities.
|
||||||
|
**Preference:** Keep hover behavior in component variants. Use `btn-link` for low-emphasis navigation actions such as returning home from an error page.
|
||||||
|
|
||||||
|
### Vercel web guideline fixes should stay template-scoped
|
||||||
|
**Area:** web/app/templates/*.html, web/app/static/css/input.css
|
||||||
|
**Obstacle:** Vercel Web Interface Guidelines flagged accessibility/theming issues such as missing skip links, missing dark `color-scheme`, non-locale date formatting, form inputs without autocomplete metadata, and motion without reduced-motion handling.
|
||||||
|
**Solution/Workaround:** Add global `color-scheme: dark`, keep form metadata in templates, format visible dates with `Intl.DateTimeFormat`, confirm destructive forms client-side, and provide `prefers-reduced-motion` CSS fallbacks.
|
||||||
|
**Preference:** Prefer lightweight template/CSS fixes for UI guideline compliance; avoid backend route changes unless the issue requires server state.
|
||||||
|
|
||||||
### Header brand SVG inherits unwanted icon styling
|
### Header brand SVG inherits unwanted icon styling
|
||||||
**Area:** web/app/templates/base.html, web/app/templates/index.html, web/app/static/css/input.css
|
**Area:** web/app/templates/base.html, web/app/templates/index.html, web/app/static/css/input.css
|
||||||
**Obstacle:** The inline Firebreak header wordmark uses hardcoded SVG fills, and page-level header rules can accidentally apply icon `stroke` styles to the brand SVG. On forced-dark landing headers, the `#17191C` wordmark fill disappears against the obsidian nav.
|
**Obstacle:** The inline Firebreak header wordmark uses hardcoded SVG fills, and page-level header rules can accidentally apply icon `stroke` styles to the brand SVG. On forced-dark landing headers, the `#17191C` wordmark fill disappears against the obsidian nav.
|
||||||
|
|
@ -127,3 +145,57 @@ This file is the single source of truth for codebase obstacles, oddities, and th
|
||||||
**Obstacle:** Theme switching and persisted localStorage theme state conflicted with the current Firebreak brand pass, especially on the cinematic landing page.
|
**Obstacle:** Theme switching and persisted localStorage theme state conflicted with the current Firebreak brand pass, especially on the cinematic landing page.
|
||||||
**Solution/Workaround:** Force the root document to use the `.dark` token set and remove the theme toggle UI/scripts.
|
**Solution/Workaround:** Force the root document to use the `.dark` token set and remove the theme toggle UI/scripts.
|
||||||
**Preference:** Keep semantic dark tokens; only reintroduce theme switching after the dark Firebreak identity is stable.
|
**Preference:** Keep semantic dark tokens; only reintroduce theme switching after the dark Firebreak identity is stable.
|
||||||
|
|
||||||
|
### Landing hero styles belong in tokenized CSS
|
||||||
|
**Area:** web/app/templates/index.html, web/app/static/css/input.css
|
||||||
|
**Obstacle:** Inline hero gradients, shadows, and hardcoded OKLCH values made the landing page harder to tune without drifting away from the Firebreak design token system.
|
||||||
|
**Solution/Workaround:** Keep landing hero structure in `index.html`, but define overlays, logo effects, proof chips, and panel styling in `input.css` using hero-specific tokens.
|
||||||
|
**Preference:** Use semantic hero/component classes for cinematic landing styling; avoid inline `<style>` blocks and template-level color literals.
|
||||||
|
|
||||||
|
### Landing hero should avoid generic card and pill treatment
|
||||||
|
**Area:** web/app/templates/index.html, web/app/static/css/input.css
|
||||||
|
**Obstacle:** Bordered hero copy cards and pill-shaped proof badges made the cinematic landing page feel like generic SaaS UI instead of a Firebreak title card.
|
||||||
|
**Solution/Workaround:** Put hero copy directly over the video using tuned overlays, text shadow, a soft invisible copy scrim, a small burn-line accent, and bottom-anchored inline metadata separated by ember dots.
|
||||||
|
**Preference:** Preserve the video-led title-card feel; use red sparingly as an accent rather than wrapping hero content in panels or badges.
|
||||||
|
|
||||||
|
### Dashboard avoids card-heavy summary UI
|
||||||
|
**Area:** web/app/templates/dashboard.html, web/app/static/css/input.css
|
||||||
|
**Obstacle:** Dashboard summary metrics used repeated bordered cards and page-specific disabled button utilities, which made the UI feel generic and inconsistent with Firebreak's darker operational tone.
|
||||||
|
**Solution/Workaround:** Use a metric strip with hairline dividers, notice rails, tokenized table styles, and shared button disabled/hover variants.
|
||||||
|
**Preference:** Favor operational density, hairline separation, and semantic component classes over cards, pills, and one-off utility stacks.
|
||||||
|
|
||||||
|
### FastAPI drops `Depends` on params typed with TYPE_CHECKING-only forward refs
|
||||||
|
**Area:** web/app/config.py, any FastAPI dependency function
|
||||||
|
**Obstacle:** A dependency function (`get_app_settings`) had a parameter typed `Annotated[AppSettings | None, Depends(current_app_settings)]`, but `AppSettings` was imported only under `TYPE_CHECKING`. FastAPI introspects a dependency's signature at *runtime*; the unresolved forward ref made the annotation fail to evaluate, so FastAPI silently discarded the `Depends(...)` marker and treated `settings` as a **required query parameter**. Every gated route then 422'd demanding `?settings=...`. Route registration did not error — it only surfaced at request time.
|
||||||
|
**Solution/Workaround:** Required-settings dependency takes only `request: Request` and *calls* `current_app_settings(request)` internally (mirroring how `get_current_session` calls `lookup_session`), rather than declaring the accessor as a sub-`Depends` with a forward-ref-typed param.
|
||||||
|
**Preference:** Never give a FastAPI dependency/route a parameter whose type is a TYPE_CHECKING-only forward ref. Build required dependencies by *calling* the plain accessor, not by `Depends`-ing on it with a typed param. Verify dependency wiring by inspecting `route.dependant.query_params`, not by calling the function directly.
|
||||||
|
|
||||||
|
### Forgejo API access goes through app/services/forgejo.py
|
||||||
|
**Area:** web/app/services/forgejo.py, web/app/routers/auth.py, web/app/routers/dashboard.py
|
||||||
|
**Obstacle:** Forgejo HTTP calls (httpx client, base-URL joining, error handling) were duplicated across the OAuth flow and the dashboard, and a hand-built authorize URL re-introduced a trailing-slash double-slash hazard.
|
||||||
|
**Solution/Workaround:** All Forgejo HTTP goes through the `forgejo` service module: `get`/`post`, plus OAuth ops `authorize_url`/`exchange_code`/`fetch_user`. Base-URL joining is centralized in `_url()` with a defensive `rstrip('/')`. Failures raise a typed `ForgejoError` (with `.unreachable`); routers translate it — OAuth routes to HTTP 502, the dashboard to an inline message.
|
||||||
|
**Preference:** Add new Forgejo operations as `forgejo.*` functions; routers orchestrate (cookies, sessions, error mapping) but never build URLs or call httpx directly. Import the module (`from app.services import forgejo` → `forgejo.get(...)`), not individual functions.
|
||||||
|
|
||||||
|
### Credential encryption is centralized in app/auth/tokens.py
|
||||||
|
**Area:** web/app/auth/tokens.py, web/app/routers/settings.py, web/app/routers/setup.py, web/app/routers/auth.py
|
||||||
|
**Obstacle:** The `get_fernet()` + crypto-primitive + which-column pattern was scattered across routers and handlers, leaking the at-rest encryption detail into the web layer and duplicating it (e.g. the client-secret encrypt block appeared twice in setup.py).
|
||||||
|
**Solution/Workaround:** `app.auth.tokens` is the single app-aware layer pairing the app Fernet cipher with a model column: `decrypt_pat`/`set_pat` (PAT, keeps `pat_registered_at` in sync) and `set_client_secret`/`decrypt_client_secret`. It sits one level above `app.auth.crypto` (the primitives, which take a `fernet` and know nothing about the app).
|
||||||
|
**Preference:** Routers/handlers call `tokens.*`, never `get_fernet()` + crypto inline. Access-token encryption in `auth/identity.py` is intentionally left there — it is already cohesive in one domain function. Key rotation should be a one-file change in `tokens.py`/`crypto.py`.
|
||||||
|
|
||||||
|
### App settings exposed as required/optional FastAPI dependencies
|
||||||
|
**Area:** web/app/config.py, web/app/middleware.py, web/app/routers/setup.py
|
||||||
|
**Obstacle:** `app.state.app_settings` was read/written raw in many places, and the lone `get_app_settings` was typed `-> AppSettings` while actually returning `None` before setup — its non-None guarantee silently depended on `SetupRequiredMiddleware` having gated the route.
|
||||||
|
**Solution/Workaround:** Mirror the `session.py` trio: `current_app_settings(request) -> AppSettings | None` (honest accessor, used by middleware and setup), `get_app_settings(request) -> AppSettings` (required dependency; raises HTTP 500 if reached unconfigured), and `set_app_settings(app, row)` (single write path, used by lifespan and setup).
|
||||||
|
**Preference:** Routes that require config use `Depends(get_app_settings)`; None-tolerant readers (setup, middleware) use `current_app_settings`. Never read/write `app.state.app_settings` raw outside config.py.
|
||||||
|
|
||||||
|
### main.py is a composition root, not a route module
|
||||||
|
**Area:** web/app/main.py, web/app/errors.py, web/app/routers/dashboard.py, web/app/routers/dev.py
|
||||||
|
**Obstacle:** main.py held the lifespan, app wiring, the global exception handler, page route handlers, and a dev-only endpoint — feature logic mixed into the composition root, inconsistent with the per-feature router convention.
|
||||||
|
**Solution/Workaround:** Page routes live in `routers/dashboard.py`; the content-negotiated error handler in `errors.py` (wired via `register_error_handlers(app)`); dev-only endpoints in `routers/dev.py`, included only when `get_settings().debug`. main.py keeps lifespan + wiring + the trivial `/` landing route. An app factory (`create_app()`) is a deferred goal for when tests are added.
|
||||||
|
**Preference:** New feature routes get their own `routers/*.py`. Keep dev-only endpoints out of production by gating the `include_router` on the debug flag rather than guarding individual routes.
|
||||||
|
|
||||||
|
### Dashboard repositories load lazily; dev CSS reload is debug-gated
|
||||||
|
**Area:** web/app/routers/dashboard.py, web/app/templates/dashboard.html, web/app/templates/base.html
|
||||||
|
**Obstacle:** The dashboard blocked first paint on a live Forgejo fetch (up to 15s if the instance was slow/unreachable), and a dev CSS live-reload script polled an endpoint every 500ms in *all* environments, including production.
|
||||||
|
**Solution/Workaround:** `/dashboard` renders instantly; the repo list loads via an htmx fragment (`/dashboard/repositories` → `partials/dashboard_repositories.html`) after first paint, with a 10s timeout. The live-reload `<script>` and the `/api/dev/css-mtime` endpoint are both gated on the `debug` flag (a Jinja `debug` global + conditional `include_router`). Forgejo-supplied `html_url` is sanitized to drop non-`http(s)` schemes before rendering into an `href` (XSS guard).
|
||||||
|
**Preference:** Never block a page render on an external API; lazy-load via htmx. Keep dev tooling behind the debug flag. Treat external-API string fields as untrusted in templates.
|
||||||
|
|
|
||||||
11
skills-lock.json
Normal file
11
skills-lock.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"skills": {
|
||||||
|
"web-design-guidelines": {
|
||||||
|
"source": "vercel-labs/agent-skills",
|
||||||
|
"sourceType": "github",
|
||||||
|
"skillPath": "skills/web-design-guidelines/SKILL.md",
|
||||||
|
"computedHash": "f3bc47f890f42a44db1007ab390709ec368e4b8c089baee6b0007182236ac474"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
54
web/app/auth/tokens.py
Normal file
54
web/app/auth/tokens.py
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
"""App-aware token encryption.
|
||||||
|
|
||||||
|
The single place that pairs the application Fernet cipher (`get_fernet`) with a
|
||||||
|
model's ciphertext column. Routers and handlers call these helpers instead of
|
||||||
|
deriving the cipher and touching the encrypted columns directly, so the at-rest
|
||||||
|
encryption detail — and any future key rotation — lives in one file.
|
||||||
|
|
||||||
|
This sits one layer above `app.auth.crypto`, which holds the cipher primitives
|
||||||
|
and knows nothing about the application or its models.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from datetime import UTC, datetime
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
from app.auth.crypto import decrypt_optional, decrypt_token, encrypt_optional, encrypt_token
|
||||||
|
from app.config import get_fernet
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from app.models.app_settings import AppSettings
|
||||||
|
from app.models.user import User
|
||||||
|
|
||||||
|
|
||||||
|
def decrypt_pat(user: User) -> str | None:
|
||||||
|
"""Return the user's decrypted Forgejo PAT, or None if none is stored."""
|
||||||
|
return decrypt_optional(get_fernet(), user.pat_encrypted)
|
||||||
|
|
||||||
|
|
||||||
|
def set_pat(user: User, raw: str | None) -> None:
|
||||||
|
"""Store (or clear) a user's Forgejo PAT.
|
||||||
|
|
||||||
|
Passing None clears it. The registered-at stamp is kept in sync with the
|
||||||
|
ciphertext so the two columns can never drift apart.
|
||||||
|
"""
|
||||||
|
user.pat_encrypted = encrypt_optional(get_fernet(), raw)
|
||||||
|
user.pat_registered_at = datetime.now(UTC) if raw else None
|
||||||
|
|
||||||
|
|
||||||
|
def set_client_secret(app_settings: AppSettings, raw: str) -> None:
|
||||||
|
"""Encrypt and store the Forgejo OAuth client secret.
|
||||||
|
|
||||||
|
Raises ValueError (from `get_fernet`) when the encryption key is unavailable.
|
||||||
|
"""
|
||||||
|
app_settings.forgejo_oauth_client_secret_encrypted = encrypt_token(get_fernet(), raw)
|
||||||
|
|
||||||
|
|
||||||
|
def decrypt_client_secret(app_settings: AppSettings) -> str:
|
||||||
|
"""Return the decrypted Forgejo OAuth client secret.
|
||||||
|
|
||||||
|
Raises ValueError when the key is unavailable or the ciphertext can't be
|
||||||
|
decrypted (e.g. the encryption key changed).
|
||||||
|
"""
|
||||||
|
return decrypt_token(get_fernet(), app_settings.forgejo_oauth_client_secret_encrypted)
|
||||||
|
|
@ -5,7 +5,7 @@ from pathlib import Path
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from cryptography.fernet import Fernet
|
from cryptography.fernet import Fernet
|
||||||
from fastapi import Request
|
from fastapi import FastAPI, HTTPException, Request, status
|
||||||
from pydantic import SecretStr
|
from pydantic import SecretStr
|
||||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||||
|
|
||||||
|
|
@ -27,6 +27,7 @@ class Settings(BaseSettings):
|
||||||
app_name: str = "Firebreak"
|
app_name: str = "Firebreak"
|
||||||
database_url: str = "postgresql+asyncpg://firebreak:firebreak@db:5432/firebreak_db"
|
database_url: str = "postgresql+asyncpg://firebreak:firebreak@db:5432/firebreak_db"
|
||||||
token_encryption_key: str = ""
|
token_encryption_key: str = ""
|
||||||
|
debug: bool = False
|
||||||
|
|
||||||
model_config = SettingsConfigDict(env_file=str(_env_file))
|
model_config = SettingsConfigDict(env_file=str(_env_file))
|
||||||
|
|
||||||
|
|
@ -56,6 +57,32 @@ def get_fernet() -> Fernet:
|
||||||
return fernet
|
return fernet
|
||||||
|
|
||||||
|
|
||||||
def get_app_settings(request: Request) -> AppSettings:
|
def current_app_settings(request: Request) -> AppSettings | None:
|
||||||
"""FastAPI dependency returning the AppSettings row from app state."""
|
"""Get AppSettings row, or None if not available.
|
||||||
|
|
||||||
|
This is the source of truth for the live AppSettings row
|
||||||
|
"""
|
||||||
return request.app.state.app_settings
|
return request.app.state.app_settings
|
||||||
|
|
||||||
|
|
||||||
|
def get_app_settings(request: Request) -> AppSettings:
|
||||||
|
"""FastAPI dependency that requires configured app settings.
|
||||||
|
|
||||||
|
Calls `current_app_settings` directly (rather than depending on it) so the
|
||||||
|
only injected parameter is the runtime-resolvable `request` — mirroring how
|
||||||
|
`get_current_session` calls `lookup_session`. Raises HTTP 500 when settings
|
||||||
|
are unavailable, which should only happen if a route that requires settings
|
||||||
|
is reached before setup completes (i.e. not gated by setup middleware).
|
||||||
|
"""
|
||||||
|
settings = current_app_settings(request)
|
||||||
|
if settings is None:
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
|
detail="App settings unavailable — route not gated by setup middleware.",
|
||||||
|
)
|
||||||
|
return settings
|
||||||
|
|
||||||
|
|
||||||
|
def set_app_settings(app: FastAPI, row: AppSettings | None) -> None:
|
||||||
|
"""Set application settings on the FastAPI app state."""
|
||||||
|
app.state.app_settings = row
|
||||||
|
|
|
||||||
67
web/app/errors.py
Normal file
67
web/app/errors.py
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
"""Application error rendering — content-negotiated HTML/JSON error responses."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from fastapi import FastAPI, Request
|
||||||
|
from fastapi.responses import JSONResponse
|
||||||
|
from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||||
|
from starlette.responses import Response
|
||||||
|
|
||||||
|
from app.auth.session import SESSION_COOKIE, lookup_session
|
||||||
|
from app.templating import templates
|
||||||
|
|
||||||
|
ERROR_TITLES = {
|
||||||
|
400: "Bad Request",
|
||||||
|
401: "Unauthorized",
|
||||||
|
403: "Forbidden",
|
||||||
|
404: "Not Found",
|
||||||
|
500: "Internal Server Error",
|
||||||
|
503: "Service Unavailable",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async def _optional_user(request: Request):
|
||||||
|
"""Best-effort session lookup so error pages render the right header.
|
||||||
|
|
||||||
|
Exception handlers run outside FastAPI's dependency injection, so the
|
||||||
|
session is resolved by hand here. Any failure degrades to None — error
|
||||||
|
rendering must never itself raise. A missing/invalid cookie (e.g. a 401)
|
||||||
|
correctly yields None, so those pages still show the signed-out header.
|
||||||
|
"""
|
||||||
|
session_factory = getattr(request.app.state, "db_session", None)
|
||||||
|
token = request.cookies.get(SESSION_COOKIE)
|
||||||
|
if session_factory is None or not token:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
async with session_factory() as db:
|
||||||
|
sess = await lookup_session(db, token)
|
||||||
|
return sess.user if sess else None
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
async def http_exception_handler(request: Request, exc: Exception) -> Response:
|
||||||
|
"""Render a styled error page for browser requests, JSON for API clients."""
|
||||||
|
# Starlette only routes StarletteHTTPException here; narrow for the type
|
||||||
|
# checker and re-raise anything unexpected to the default handler.
|
||||||
|
if not isinstance(exc, StarletteHTTPException):
|
||||||
|
raise exc
|
||||||
|
accept = request.headers.get("accept", "")
|
||||||
|
if "text/html" in accept:
|
||||||
|
return templates.TemplateResponse(
|
||||||
|
request,
|
||||||
|
"error.html",
|
||||||
|
{
|
||||||
|
"status_code": exc.status_code,
|
||||||
|
"title": ERROR_TITLES.get(exc.status_code, "Error"),
|
||||||
|
"detail": exc.detail,
|
||||||
|
"user": await _optional_user(request),
|
||||||
|
},
|
||||||
|
status_code=exc.status_code,
|
||||||
|
)
|
||||||
|
return JSONResponse({"detail": exc.detail}, status_code=exc.status_code)
|
||||||
|
|
||||||
|
|
||||||
|
def register_error_handlers(app: FastAPI) -> None:
|
||||||
|
"""Wire the application's exception handlers onto the app."""
|
||||||
|
app.add_exception_handler(StarletteHTTPException, http_exception_handler)
|
||||||
|
|
@ -5,21 +5,21 @@ from pathlib import Path
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
|
|
||||||
from fastapi import Depends, FastAPI, Request
|
from fastapi import Depends, FastAPI, Request
|
||||||
from fastapi.responses import HTMLResponse, JSONResponse
|
from fastapi.responses import HTMLResponse
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
from starlette.exceptions import HTTPException as StarletteHTTPException
|
|
||||||
from starlette.responses import Response
|
from starlette.responses import Response
|
||||||
from sqlalchemy import func as sql_func, select
|
from sqlalchemy import func as sql_func, select
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
||||||
|
|
||||||
from app import models as _models # noqa: F401 - register ORM tables on metadata
|
from app import models as _models # noqa: F401 - register ORM tables on metadata
|
||||||
from app.auth.session import get_current_session, get_optional_session
|
from app.auth.session import get_optional_session
|
||||||
from app.config import get_settings
|
from app.config import get_settings, set_app_settings
|
||||||
from app.database import Base
|
from app.database import Base
|
||||||
|
from app.errors import register_error_handlers
|
||||||
from app.middleware import SetupRequiredMiddleware
|
from app.middleware import SetupRequiredMiddleware
|
||||||
from app.models.app_settings import AppSettings
|
from app.models.app_settings import AppSettings
|
||||||
from app.models.session import Session as UserBrowserSession
|
from app.models.session import Session as UserBrowserSession
|
||||||
from app.routers import auth, links, settings, setup
|
from app.routers import auth, dashboard, dev, links, settings, setup
|
||||||
from app.templating import templates
|
from app.templating import templates
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ async def lifespan(app: FastAPI):
|
||||||
row = result.scalar_one_or_none()
|
row = result.scalar_one_or_none()
|
||||||
user_count = await db.scalar(select(sql_func.count()).select_from(User))
|
user_count = await db.scalar(select(sql_func.count()).select_from(User))
|
||||||
|
|
||||||
app.state.app_settings = row
|
set_app_settings(app, row)
|
||||||
|
|
||||||
# Generate a setup token whenever no users exist yet — whether it's
|
# Generate a setup token whenever no users exist yet — whether it's
|
||||||
# a fresh install or a retry after bad OAuth config.
|
# a fresh install or a retry after bad OAuth config.
|
||||||
|
|
@ -74,36 +74,14 @@ app.add_middleware(SetupRequiredMiddleware)
|
||||||
|
|
||||||
app.mount("/static", StaticFiles(directory=Path(__file__).parent / "static"), name="static")
|
app.mount("/static", StaticFiles(directory=Path(__file__).parent / "static"), name="static")
|
||||||
app.include_router(auth.router)
|
app.include_router(auth.router)
|
||||||
|
app.include_router(dashboard.router)
|
||||||
app.include_router(links.router)
|
app.include_router(links.router)
|
||||||
app.include_router(settings.router)
|
app.include_router(settings.router)
|
||||||
app.include_router(setup.router)
|
app.include_router(setup.router)
|
||||||
|
if get_settings().debug:
|
||||||
|
app.include_router(dev.router)
|
||||||
|
|
||||||
ERROR_TITLES = {
|
register_error_handlers(app)
|
||||||
400: "Bad Request",
|
|
||||||
401: "Unauthorized",
|
|
||||||
403: "Forbidden",
|
|
||||||
404: "Not Found",
|
|
||||||
500: "Internal Server Error",
|
|
||||||
503: "Service Unavailable",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@app.exception_handler(StarletteHTTPException)
|
|
||||||
async def http_exception_handler(request: Request, exc: StarletteHTTPException) -> Response:
|
|
||||||
"""Render a styled error page for browser requests, JSON for API clients."""
|
|
||||||
accept = request.headers.get("accept", "")
|
|
||||||
if "text/html" in accept:
|
|
||||||
return templates.TemplateResponse(
|
|
||||||
request,
|
|
||||||
"error.html",
|
|
||||||
{
|
|
||||||
"status_code": exc.status_code,
|
|
||||||
"title": ERROR_TITLES.get(exc.status_code, "Error"),
|
|
||||||
"detail": exc.detail,
|
|
||||||
},
|
|
||||||
status_code=exc.status_code,
|
|
||||||
)
|
|
||||||
return JSONResponse({"detail": exc.detail}, status_code=exc.status_code)
|
|
||||||
|
|
||||||
|
|
||||||
@app.get("/", response_class=HTMLResponse)
|
@app.get("/", response_class=HTMLResponse)
|
||||||
|
|
@ -115,17 +93,3 @@ async def root(
|
||||||
"index.html",
|
"index.html",
|
||||||
{"user": sess.user if sess else None},
|
{"user": sess.user if sess else None},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/dashboard", response_class=HTMLResponse)
|
|
||||||
async def dashboard(
|
|
||||||
request: Request, sess: Annotated[UserBrowserSession, Depends(get_current_session)]
|
|
||||||
) -> Response:
|
|
||||||
return templates.TemplateResponse(
|
|
||||||
request,
|
|
||||||
"dashboard.html",
|
|
||||||
{
|
|
||||||
"user": sess.user,
|
|
||||||
"pat_registered": sess.user.has_pat,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ from starlette.middleware.base import BaseHTTPMiddleware
|
||||||
from starlette.requests import Request
|
from starlette.requests import Request
|
||||||
from starlette.responses import RedirectResponse, Response
|
from starlette.responses import RedirectResponse, Response
|
||||||
|
|
||||||
|
from app.config import current_app_settings
|
||||||
|
|
||||||
|
|
||||||
class SetupRequiredMiddleware(BaseHTTPMiddleware):
|
class SetupRequiredMiddleware(BaseHTTPMiddleware):
|
||||||
"""Redirect all requests to /setup when the app has not been configured yet."""
|
"""Redirect all requests to /setup when the app has not been configured yet."""
|
||||||
|
|
@ -11,7 +13,7 @@ class SetupRequiredMiddleware(BaseHTTPMiddleware):
|
||||||
if path.startswith("/setup") or path.startswith("/static") or path == "/favicon.ico":
|
if path.startswith("/setup") or path.startswith("/static") or path == "/favicon.ico":
|
||||||
return await call_next(request)
|
return await call_next(request)
|
||||||
|
|
||||||
if request.app.state.app_settings is None:
|
if current_app_settings(request) is None:
|
||||||
if request.headers.get("HX-Request"):
|
if request.headers.get("HX-Request"):
|
||||||
response = Response(status_code=200)
|
response = Response(status_code=200)
|
||||||
response.headers["HX-Redirect"] = "/setup"
|
response.headers["HX-Redirect"] = "/setup"
|
||||||
|
|
|
||||||
|
|
@ -3,60 +3,32 @@ from __future__ import annotations
|
||||||
import secrets
|
import secrets
|
||||||
from datetime import UTC, datetime, timedelta
|
from datetime import UTC, datetime, timedelta
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
from urllib.parse import urlencode
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
from fastapi import APIRouter, Cookie, Depends, HTTPException, Request, status
|
from fastapi import APIRouter, Cookie, Depends, HTTPException, Request, status
|
||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
from app.auth.crypto import decrypt_token
|
from app.auth import tokens
|
||||||
from app.auth.identity import find_or_create_user
|
from app.auth.identity import find_or_create_user
|
||||||
from app.auth.session import create_session, revoke_session
|
from app.auth.session import create_session, revoke_session
|
||||||
from app.config import get_app_settings, get_fernet
|
from app.config import get_app_settings
|
||||||
from app.deps import get_db
|
from app.deps import get_db
|
||||||
from app.models.app_settings import AppSettings
|
from app.models.app_settings import AppSettings
|
||||||
|
from app.services import forgejo
|
||||||
|
|
||||||
router = APIRouter(prefix="/auth", tags=["auth"])
|
router = APIRouter(prefix="/auth", tags=["auth"])
|
||||||
|
|
||||||
|
|
||||||
# ── Forgejo API client ──
|
# ── Forgejo OAuth error translation ──
|
||||||
|
|
||||||
|
|
||||||
async def _forgejo_post(app_settings: AppSettings, path: str, data: dict) -> dict:
|
def _oauth_gateway_error(exc: forgejo.ForgejoError) -> HTTPException:
|
||||||
url = f"{app_settings.forgejo_base_url}{path}"
|
"""Translate a Forgejo failure into the OAuth flow's 502 response."""
|
||||||
try:
|
if exc.unreachable:
|
||||||
async with httpx.AsyncClient(timeout=30.0) as client:
|
detail = "Cannot reach Forgejo. Check your connection settings."
|
||||||
resp = await client.post(url, data=data, headers={"Accept": "application/json"})
|
else:
|
||||||
except httpx.RequestError:
|
detail = f"Forgejo returned an error ({exc.status_code}). Verify your OAuth configuration."
|
||||||
raise HTTPException(
|
return HTTPException(status_code=status.HTTP_502_BAD_GATEWAY, detail=detail)
|
||||||
status_code=status.HTTP_502_BAD_GATEWAY,
|
|
||||||
detail="Cannot reach Forgejo. Check your connection settings.",
|
|
||||||
)
|
|
||||||
if resp.status_code != 200:
|
|
||||||
raise HTTPException(
|
|
||||||
status_code=status.HTTP_502_BAD_GATEWAY,
|
|
||||||
detail=f"Forgejo returned an error ({resp.status_code}). Verify your OAuth configuration.",
|
|
||||||
)
|
|
||||||
return resp.json()
|
|
||||||
|
|
||||||
|
|
||||||
async def _forgejo_get(app_settings: AppSettings, path: str, token: str) -> dict:
|
|
||||||
url = f"{app_settings.forgejo_base_url}{path}"
|
|
||||||
try:
|
|
||||||
async with httpx.AsyncClient(timeout=30.0) as client:
|
|
||||||
resp = await client.get(url, headers={"Authorization": f"token {token}"})
|
|
||||||
except httpx.RequestError:
|
|
||||||
raise HTTPException(
|
|
||||||
status_code=status.HTTP_502_BAD_GATEWAY,
|
|
||||||
detail="Cannot reach Forgejo. Check your connection settings.",
|
|
||||||
)
|
|
||||||
if resp.status_code != 200:
|
|
||||||
raise HTTPException(
|
|
||||||
status_code=status.HTTP_502_BAD_GATEWAY,
|
|
||||||
detail=f"Forgejo returned an error ({resp.status_code}). Verify your OAuth configuration.",
|
|
||||||
)
|
|
||||||
return resp.json()
|
|
||||||
|
|
||||||
|
|
||||||
# ── OAuth CSRF helpers ──
|
# ── OAuth CSRF helpers ──
|
||||||
|
|
@ -126,7 +98,7 @@ def _forgejo_oauth_redirect_uri(request: Request, app_settings: AppSettings) ->
|
||||||
|
|
||||||
def _get_oauth_client_secret(app_settings: AppSettings) -> str:
|
def _get_oauth_client_secret(app_settings: AppSettings) -> str:
|
||||||
try:
|
try:
|
||||||
return decrypt_token(get_fernet(), app_settings.forgejo_oauth_client_secret_encrypted)
|
return tokens.decrypt_client_secret(app_settings)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
||||||
|
|
@ -145,15 +117,7 @@ async def login_forgejo(
|
||||||
|
|
||||||
redirect_uri = _forgejo_oauth_redirect_uri(request, app_settings)
|
redirect_uri = _forgejo_oauth_redirect_uri(request, app_settings)
|
||||||
state = secrets.token_urlsafe(32)
|
state = secrets.token_urlsafe(32)
|
||||||
query = urlencode(
|
authorization_url = forgejo.authorize_url(app_settings, redirect_uri=redirect_uri, state=state)
|
||||||
{
|
|
||||||
"client_id": app_settings.forgejo_oauth_client_id,
|
|
||||||
"response_type": "code",
|
|
||||||
"redirect_uri": redirect_uri,
|
|
||||||
"state": state,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
authorization_url = f"{app_settings.forgejo_base_url}/login/oauth/authorize?{query}"
|
|
||||||
response = RedirectResponse(authorization_url, status_code=status.HTTP_302_FOUND)
|
response = RedirectResponse(authorization_url, status_code=status.HTTP_302_FOUND)
|
||||||
_set_oauth_state_cookie(response, state)
|
_set_oauth_state_cookie(response, state)
|
||||||
return response
|
return response
|
||||||
|
|
@ -181,20 +145,21 @@ async def callback_forgejo(
|
||||||
client_secret = _get_oauth_client_secret(app_settings)
|
client_secret = _get_oauth_client_secret(app_settings)
|
||||||
redirect_uri = _forgejo_oauth_redirect_uri(request, app_settings)
|
redirect_uri = _forgejo_oauth_redirect_uri(request, app_settings)
|
||||||
|
|
||||||
token_data = await _forgejo_post(
|
try:
|
||||||
app_settings,
|
token_data = await forgejo.exchange_code(
|
||||||
"/login/oauth/access_token",
|
app_settings,
|
||||||
{
|
code=code,
|
||||||
"grant_type": "authorization_code",
|
client_secret=client_secret,
|
||||||
"client_id": app_settings.forgejo_oauth_client_id,
|
redirect_uri=redirect_uri,
|
||||||
"client_secret": client_secret,
|
)
|
||||||
"code": code,
|
except forgejo.ForgejoError as exc:
|
||||||
"redirect_uri": redirect_uri,
|
raise _oauth_gateway_error(exc) from exc
|
||||||
},
|
|
||||||
)
|
|
||||||
access_token, refresh_plain, expires_at = _parse_token_response(token_data)
|
access_token, refresh_plain, expires_at = _parse_token_response(token_data)
|
||||||
|
|
||||||
user_data = await _forgejo_get(app_settings, "/api/v1/user", access_token)
|
try:
|
||||||
|
user_data = await forgejo.fetch_user(app_settings, access_token)
|
||||||
|
except forgejo.ForgejoError as exc:
|
||||||
|
raise _oauth_gateway_error(exc) from exc
|
||||||
provider_user_id, provider_username, email = _parse_user_response(user_data)
|
provider_user_id, provider_username, email = _parse_user_response(user_data)
|
||||||
|
|
||||||
user = await find_or_create_user(
|
user = await find_or_create_user(
|
||||||
|
|
|
||||||
75
web/app/routers/dashboard.py
Normal file
75
web/app/routers/dashboard.py
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Annotated
|
||||||
|
|
||||||
|
from fastapi import APIRouter, Depends, Request
|
||||||
|
from fastapi.responses import HTMLResponse
|
||||||
|
from starlette.responses import Response
|
||||||
|
|
||||||
|
from app.auth import tokens
|
||||||
|
from app.auth.session import get_current_session
|
||||||
|
from app.config import get_app_settings
|
||||||
|
from app.models.app_settings import AppSettings
|
||||||
|
from app.models.session import Session as UserBrowserSession
|
||||||
|
from app.services import forgejo
|
||||||
|
from app.templating import templates
|
||||||
|
|
||||||
|
router = APIRouter(tags=["dashboard"])
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/dashboard", response_class=HTMLResponse)
|
||||||
|
async def dashboard(
|
||||||
|
request: Request,
|
||||||
|
sess: Annotated[UserBrowserSession, Depends(get_current_session)],
|
||||||
|
) -> Response:
|
||||||
|
return templates.TemplateResponse(
|
||||||
|
request,
|
||||||
|
"dashboard.html",
|
||||||
|
{"user": sess.user},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/dashboard/repositories", response_class=HTMLResponse)
|
||||||
|
async def dashboard_repositories(
|
||||||
|
request: Request,
|
||||||
|
sess: Annotated[UserBrowserSession, Depends(get_current_session)],
|
||||||
|
app_settings: Annotated[AppSettings, Depends(get_app_settings)],
|
||||||
|
) -> Response:
|
||||||
|
"""Lazy-loaded fragment: fetch the user's Forgejo repositories.
|
||||||
|
|
||||||
|
The dashboard pulls this in via htmx after first paint, so a slow or
|
||||||
|
unreachable Forgejo instance never blocks the page from rendering.
|
||||||
|
"""
|
||||||
|
repositories: list[dict] = []
|
||||||
|
repo_error: str | None = None
|
||||||
|
|
||||||
|
if sess.user.has_pat:
|
||||||
|
pat = tokens.decrypt_pat(sess.user)
|
||||||
|
if pat:
|
||||||
|
try:
|
||||||
|
repos = await forgejo.get(
|
||||||
|
app_settings,
|
||||||
|
"/api/v1/user/repos",
|
||||||
|
token=pat,
|
||||||
|
params={"limit": 50, "sort": "updated"},
|
||||||
|
timeout=10.0,
|
||||||
|
)
|
||||||
|
repositories = [r for r in repos if r.get("permissions", {}).get("pull", True)]
|
||||||
|
# Defend against a hostile/MITM'd Forgejo returning a
|
||||||
|
# javascript: (or other non-http) URL we'd render into href.
|
||||||
|
for r in repositories:
|
||||||
|
url = r.get("html_url")
|
||||||
|
if not isinstance(url, str) or not url.startswith(("http://", "https://")):
|
||||||
|
r["html_url"] = ""
|
||||||
|
except forgejo.ForgejoError as exc:
|
||||||
|
repo_error = (
|
||||||
|
"Could not reach your Forgejo instance."
|
||||||
|
if exc.unreachable
|
||||||
|
else "Could not fetch repositories from Forgejo."
|
||||||
|
)
|
||||||
|
|
||||||
|
return templates.TemplateResponse(
|
||||||
|
request,
|
||||||
|
"partials/dashboard_repositories.html",
|
||||||
|
{"repositories": repositories, "repo_error": repo_error},
|
||||||
|
)
|
||||||
19
web/app/routers/dev.py
Normal file
19
web/app/routers/dev.py
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
"""Development-only endpoints. Included on the app only when debug is enabled."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from fastapi import APIRouter
|
||||||
|
|
||||||
|
router = APIRouter(prefix="/api/dev", tags=["dev"])
|
||||||
|
|
||||||
|
_CSS_OUTPUT = Path(__file__).parent.parent / "static" / "css" / "output.css"
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/css-mtime")
|
||||||
|
async def css_mtime() -> dict:
|
||||||
|
"""Report the built CSS file's mtime so the browser can live-reload on change."""
|
||||||
|
if _CSS_OUTPUT.exists():
|
||||||
|
return {"mtime": _CSS_OUTPUT.stat().st_mtime}
|
||||||
|
return {"mtime": 0}
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from datetime import UTC, datetime
|
|
||||||
from typing import Annotated
|
from typing import Annotated
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, Form, HTTPException, Request, status
|
from fastapi import APIRouter, Depends, Form, HTTPException, Request, status
|
||||||
|
|
@ -8,9 +7,8 @@ from fastapi.responses import HTMLResponse, RedirectResponse
|
||||||
from starlette.responses import Response
|
from starlette.responses import Response
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
from app.auth.crypto import encrypt_optional
|
from app.auth import tokens
|
||||||
from app.auth.session import get_current_session
|
from app.auth.session import get_current_session
|
||||||
from app.config import get_fernet
|
|
||||||
from app.deps import get_db
|
from app.deps import get_db
|
||||||
from app.models.session import Session as UserBrowserSession
|
from app.models.session import Session as UserBrowserSession
|
||||||
from app.templating import templates
|
from app.templating import templates
|
||||||
|
|
@ -28,8 +26,6 @@ async def settings_page(
|
||||||
"settings.html",
|
"settings.html",
|
||||||
{
|
{
|
||||||
"user": sess.user,
|
"user": sess.user,
|
||||||
"pat_registered": sess.user.has_pat,
|
|
||||||
"pat_registered_at": sess.user.pat_registered_at,
|
|
||||||
"pat_deleted": request.query_params.get("pat") == "deleted",
|
"pat_deleted": request.query_params.get("pat") == "deleted",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
@ -48,9 +44,7 @@ async def register_pat(
|
||||||
detail="Forgejo access token is required.",
|
detail="Forgejo access token is required.",
|
||||||
)
|
)
|
||||||
|
|
||||||
fernet = get_fernet()
|
tokens.set_pat(sess.user, pat)
|
||||||
sess.user.pat_encrypted = encrypt_optional(fernet, pat)
|
|
||||||
sess.user.pat_registered_at = datetime.now(UTC)
|
|
||||||
await db.commit()
|
await db.commit()
|
||||||
|
|
||||||
return RedirectResponse(
|
return RedirectResponse(
|
||||||
|
|
@ -64,8 +58,7 @@ async def delete_pat(
|
||||||
db: Annotated[AsyncSession, Depends(get_db)],
|
db: Annotated[AsyncSession, Depends(get_db)],
|
||||||
sess: Annotated[UserBrowserSession, Depends(get_current_session)],
|
sess: Annotated[UserBrowserSession, Depends(get_current_session)],
|
||||||
) -> RedirectResponse:
|
) -> RedirectResponse:
|
||||||
sess.user.pat_encrypted = None
|
tokens.set_pat(sess.user, None)
|
||||||
sess.user.pat_registered_at = None
|
|
||||||
await db.commit()
|
await db.commit()
|
||||||
|
|
||||||
return RedirectResponse(
|
return RedirectResponse(
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ from starlette.responses import Response
|
||||||
from sqlalchemy import func as sql_func, select
|
from sqlalchemy import func as sql_func, select
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
from app.auth.crypto import encrypt_token
|
from app.auth import tokens
|
||||||
from app.auth.session import lookup_session
|
from app.auth.session import lookup_session
|
||||||
from app.config import get_fernet
|
from app.config import current_app_settings, set_app_settings
|
||||||
from app.deps import get_db
|
from app.deps import get_db
|
||||||
from app.models.app_settings import AppSettings
|
from app.models.app_settings import AppSettings
|
||||||
from app.models.user import User
|
from app.models.user import User
|
||||||
|
|
@ -19,9 +19,21 @@ from app.templating import templates
|
||||||
router = APIRouter(prefix="/setup", tags=["setup"])
|
router = APIRouter(prefix="/setup", tags=["setup"])
|
||||||
|
|
||||||
|
|
||||||
|
def _encryption_unavailable() -> HTTPException:
|
||||||
|
"""503 raised when the Forgejo client secret can't be encrypted (no key)."""
|
||||||
|
return HTTPException(
|
||||||
|
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
||||||
|
detail=(
|
||||||
|
"TOKEN_ENCRYPTION_KEY is not set. Add it to your .env file or deployment "
|
||||||
|
"environment. Generate one with: "
|
||||||
|
"uv run python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
async def _require_auth_if_configured(
|
async def _require_auth_if_configured(
|
||||||
request: Request,
|
|
||||||
db: Annotated[AsyncSession, Depends(get_db)],
|
db: Annotated[AsyncSession, Depends(get_db)],
|
||||||
|
app_settings: Annotated[AppSettings | None, Depends(current_app_settings)],
|
||||||
firebreak_session: Annotated[str | None, Cookie()] = None,
|
firebreak_session: Annotated[str | None, Cookie()] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Block anonymous access to /setup after initial configuration.
|
"""Block anonymous access to /setup after initial configuration.
|
||||||
|
|
@ -29,7 +41,7 @@ async def _require_auth_if_configured(
|
||||||
If no users exist yet (e.g. bad OAuth config on first setup), the setup
|
If no users exist yet (e.g. bad OAuth config on first setup), the setup
|
||||||
token is still required but login is not — there's nobody to log in as.
|
token is still required but login is not — there's nobody to log in as.
|
||||||
"""
|
"""
|
||||||
if request.app.state.app_settings is None:
|
if app_settings is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
# If no users exist, allow access — the setup token still protects POST
|
# If no users exist, allow access — the setup token still protects POST
|
||||||
|
|
@ -46,9 +58,12 @@ async def _require_auth_if_configured(
|
||||||
|
|
||||||
|
|
||||||
@router.get("", dependencies=[Depends(_require_auth_if_configured)])
|
@router.get("", dependencies=[Depends(_require_auth_if_configured)])
|
||||||
async def setup_page(request: Request, db: Annotated[AsyncSession, Depends(get_db)]) -> Response:
|
async def setup_page(
|
||||||
|
request: Request,
|
||||||
|
db: Annotated[AsyncSession, Depends(get_db)],
|
||||||
|
existing: Annotated[AppSettings | None, Depends(current_app_settings)],
|
||||||
|
) -> Response:
|
||||||
"""Render the setup wizard. Pre-fills fields when reconfiguring."""
|
"""Render the setup wizard. Pre-fills fields when reconfiguring."""
|
||||||
existing = request.app.state.app_settings
|
|
||||||
user_count = await db.scalar(select(sql_func.count()).select_from(User)) or 0
|
user_count = await db.scalar(select(sql_func.count()).select_from(User)) or 0
|
||||||
has_users = user_count > 0
|
has_users = user_count > 0
|
||||||
public_base = (existing.firebreak_public_base_url if existing else "") or str(
|
public_base = (existing.firebreak_public_base_url if existing else "") or str(
|
||||||
|
|
@ -68,6 +83,7 @@ async def setup_page(request: Request, db: Annotated[AsyncSession, Depends(get_d
|
||||||
async def setup_submit(
|
async def setup_submit(
|
||||||
request: Request,
|
request: Request,
|
||||||
db: Annotated[AsyncSession, Depends(get_db)],
|
db: Annotated[AsyncSession, Depends(get_db)],
|
||||||
|
app_settings: Annotated[AppSettings | None, Depends(current_app_settings)],
|
||||||
forgejo_base_url: Annotated[str, Form()],
|
forgejo_base_url: Annotated[str, Form()],
|
||||||
forgejo_oauth_client_id: Annotated[str, Form()],
|
forgejo_oauth_client_id: Annotated[str, Form()],
|
||||||
forgejo_oauth_client_secret: Annotated[str, Form()] = "",
|
forgejo_oauth_client_secret: Annotated[str, Form()] = "",
|
||||||
|
|
@ -77,7 +93,7 @@ async def setup_submit(
|
||||||
"""Process the setup wizard — creates or updates Forgejo settings."""
|
"""Process the setup wizard — creates or updates Forgejo settings."""
|
||||||
user_count = await db.scalar(select(sql_func.count()).select_from(User)) or 0
|
user_count = await db.scalar(select(sql_func.count()).select_from(User)) or 0
|
||||||
has_users = user_count > 0
|
has_users = user_count > 0
|
||||||
is_reconfiguring = request.app.state.app_settings is not None and has_users
|
is_reconfiguring = app_settings is not None and has_users
|
||||||
|
|
||||||
# Require setup token when no users exist (first-time or fixing bad config)
|
# Require setup token when no users exist (first-time or fixing bad config)
|
||||||
if not has_users:
|
if not has_users:
|
||||||
|
|
@ -111,22 +127,12 @@ async def setup_submit(
|
||||||
row.firebreak_public_base_url = firebreak_public_base_url
|
row.firebreak_public_base_url = firebreak_public_base_url
|
||||||
if forgejo_oauth_client_secret:
|
if forgejo_oauth_client_secret:
|
||||||
try:
|
try:
|
||||||
fernet = get_fernet()
|
tokens.set_client_secret(row, forgejo_oauth_client_secret)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise HTTPException(
|
raise _encryption_unavailable()
|
||||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
|
||||||
detail=(
|
|
||||||
"TOKEN_ENCRYPTION_KEY is not set. Add it to your .env file or deployment "
|
|
||||||
"environment. Generate one with: "
|
|
||||||
"uv run python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
row.forgejo_oauth_client_secret_encrypted = encrypt_token(
|
|
||||||
fernet, forgejo_oauth_client_secret
|
|
||||||
)
|
|
||||||
await db.commit()
|
await db.commit()
|
||||||
await db.refresh(row)
|
await db.refresh(row)
|
||||||
request.app.state.app_settings = row
|
set_app_settings(request.app, row)
|
||||||
return RedirectResponse("/", status_code=status.HTTP_303_SEE_OTHER)
|
return RedirectResponse("/", status_code=status.HTTP_303_SEE_OTHER)
|
||||||
|
|
||||||
# First-time setup (or retry after bad config) — no users exist yet
|
# First-time setup (or retry after bad config) — no users exist yet
|
||||||
|
|
@ -136,38 +142,21 @@ async def setup_submit(
|
||||||
detail="Client Secret is required during initial setup.",
|
detail="Client Secret is required during initial setup.",
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
# Update existing row if retrying after bad config, otherwise create one.
|
||||||
fernet = get_fernet()
|
|
||||||
except ValueError:
|
|
||||||
raise HTTPException(
|
|
||||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
|
||||||
detail=(
|
|
||||||
"TOKEN_ENCRYPTION_KEY is not set. Add it to your .env file or deployment "
|
|
||||||
"environment. Generate one with: "
|
|
||||||
"uv run python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
encrypted_secret = encrypt_token(fernet, forgejo_oauth_client_secret)
|
|
||||||
|
|
||||||
# Update existing row if retrying after bad config, otherwise create
|
|
||||||
result = await db.execute(select(AppSettings).where(AppSettings.id == 1))
|
result = await db.execute(select(AppSettings).where(AppSettings.id == 1))
|
||||||
row = result.scalar_one_or_none()
|
row = result.scalar_one_or_none()
|
||||||
if row:
|
if row is None:
|
||||||
row.forgejo_base_url = forgejo_base_url
|
row = AppSettings(id=1, forgejo_oauth_client_secret_encrypted="")
|
||||||
row.forgejo_oauth_client_id = forgejo_oauth_client_id
|
|
||||||
row.forgejo_oauth_client_secret_encrypted = encrypted_secret
|
|
||||||
row.firebreak_public_base_url = firebreak_public_base_url
|
|
||||||
else:
|
|
||||||
row = AppSettings(
|
|
||||||
id=1,
|
|
||||||
forgejo_base_url=forgejo_base_url,
|
|
||||||
forgejo_oauth_client_id=forgejo_oauth_client_id,
|
|
||||||
forgejo_oauth_client_secret_encrypted=encrypted_secret,
|
|
||||||
firebreak_public_base_url=firebreak_public_base_url,
|
|
||||||
)
|
|
||||||
db.add(row)
|
db.add(row)
|
||||||
|
row.forgejo_base_url = forgejo_base_url
|
||||||
|
row.forgejo_oauth_client_id = forgejo_oauth_client_id
|
||||||
|
row.firebreak_public_base_url = firebreak_public_base_url
|
||||||
|
try:
|
||||||
|
tokens.set_client_secret(row, forgejo_oauth_client_secret)
|
||||||
|
except ValueError:
|
||||||
|
raise _encryption_unavailable()
|
||||||
await db.commit()
|
await db.commit()
|
||||||
await db.refresh(row)
|
await db.refresh(row)
|
||||||
request.app.state.app_settings = row
|
set_app_settings(request.app, row)
|
||||||
|
|
||||||
return RedirectResponse("/", status_code=status.HTTP_303_SEE_OTHER)
|
return RedirectResponse("/", status_code=status.HTTP_303_SEE_OTHER)
|
||||||
|
|
|
||||||
0
web/app/services/__init__.py
Normal file
0
web/app/services/__init__.py
Normal file
132
web/app/services/forgejo.py
Normal file
132
web/app/services/forgejo.py
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
"""Thin async client for the Forgejo API.
|
||||||
|
|
||||||
|
Centralizes the httpx mechanics, base-URL joining, and error shape shared by
|
||||||
|
the OAuth flow (`app.routers.auth`) and the dashboard repository fragment
|
||||||
|
(`app.main`). Transport failures and non-2xx responses both surface as a typed
|
||||||
|
`ForgejoError`, leaving each caller free to decide how to handle them — the
|
||||||
|
OAuth routes translate it into an HTTP 502, while the dashboard renders an
|
||||||
|
inline message.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import TYPE_CHECKING, Any
|
||||||
|
from urllib.parse import urlencode
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from app.models.app_settings import AppSettings
|
||||||
|
|
||||||
|
DEFAULT_TIMEOUT = 30.0
|
||||||
|
|
||||||
|
|
||||||
|
class ForgejoError(Exception):
|
||||||
|
"""A Forgejo API call failed — either unreachable or a non-2xx response."""
|
||||||
|
|
||||||
|
def __init__(self, message: str, *, status_code: int | None = None) -> None:
|
||||||
|
super().__init__(message)
|
||||||
|
self.message = message
|
||||||
|
# The HTTP status returned by Forgejo, or None if it was unreachable.
|
||||||
|
self.status_code = status_code
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unreachable(self) -> bool:
|
||||||
|
"""True when the request never got an HTTP response (network error)."""
|
||||||
|
return self.status_code is None
|
||||||
|
|
||||||
|
|
||||||
|
def _url(app_settings: AppSettings, path: str) -> str:
|
||||||
|
# Defensive rstrip: a base URL stored with a trailing slash would otherwise
|
||||||
|
# produce a double slash (`https://forge//api/...`) and 404.
|
||||||
|
return f"{app_settings.forgejo_base_url.rstrip('/')}{path}"
|
||||||
|
|
||||||
|
|
||||||
|
async def get(
|
||||||
|
app_settings: AppSettings,
|
||||||
|
path: str,
|
||||||
|
*,
|
||||||
|
token: str | None = None,
|
||||||
|
params: dict[str, Any] | None = None,
|
||||||
|
timeout: float = DEFAULT_TIMEOUT,
|
||||||
|
) -> Any:
|
||||||
|
"""GET a Forgejo API path, returning parsed JSON. Raises ForgejoError."""
|
||||||
|
headers = {"Accept": "application/json"}
|
||||||
|
if token:
|
||||||
|
headers["Authorization"] = f"token {token}"
|
||||||
|
try:
|
||||||
|
async with httpx.AsyncClient(timeout=timeout) as client:
|
||||||
|
resp = await client.get(_url(app_settings, path), params=params, headers=headers)
|
||||||
|
except httpx.RequestError as exc:
|
||||||
|
raise ForgejoError("Cannot reach Forgejo. Check your connection settings.") from exc
|
||||||
|
if resp.status_code != 200:
|
||||||
|
raise ForgejoError(
|
||||||
|
f"Forgejo returned an error ({resp.status_code}).",
|
||||||
|
status_code=resp.status_code,
|
||||||
|
)
|
||||||
|
return resp.json()
|
||||||
|
|
||||||
|
|
||||||
|
async def post(
|
||||||
|
app_settings: AppSettings,
|
||||||
|
path: str,
|
||||||
|
data: dict[str, Any],
|
||||||
|
*,
|
||||||
|
timeout: float = DEFAULT_TIMEOUT,
|
||||||
|
) -> Any:
|
||||||
|
"""POST form data to a Forgejo API path, returning parsed JSON. Raises ForgejoError."""
|
||||||
|
try:
|
||||||
|
async with httpx.AsyncClient(timeout=timeout) as client:
|
||||||
|
resp = await client.post(
|
||||||
|
_url(app_settings, path), data=data, headers={"Accept": "application/json"}
|
||||||
|
)
|
||||||
|
except httpx.RequestError as exc:
|
||||||
|
raise ForgejoError("Cannot reach Forgejo. Check your connection settings.") from exc
|
||||||
|
if resp.status_code != 200:
|
||||||
|
raise ForgejoError(
|
||||||
|
f"Forgejo returned an error ({resp.status_code}).",
|
||||||
|
status_code=resp.status_code,
|
||||||
|
)
|
||||||
|
return resp.json()
|
||||||
|
|
||||||
|
|
||||||
|
# ── OAuth ──
|
||||||
|
|
||||||
|
|
||||||
|
def authorize_url(app_settings: AppSettings, *, redirect_uri: str, state: str) -> str:
|
||||||
|
"""Build the Forgejo OAuth authorize URL to redirect the browser to."""
|
||||||
|
query = urlencode(
|
||||||
|
{
|
||||||
|
"client_id": app_settings.forgejo_oauth_client_id,
|
||||||
|
"response_type": "code",
|
||||||
|
"redirect_uri": redirect_uri,
|
||||||
|
"state": state,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return f"{_url(app_settings, '/login/oauth/authorize')}?{query}"
|
||||||
|
|
||||||
|
|
||||||
|
async def exchange_code(
|
||||||
|
app_settings: AppSettings,
|
||||||
|
*,
|
||||||
|
code: str,
|
||||||
|
client_secret: str,
|
||||||
|
redirect_uri: str,
|
||||||
|
) -> Any:
|
||||||
|
"""Exchange an authorization code for tokens. Raises ForgejoError."""
|
||||||
|
return await post(
|
||||||
|
app_settings,
|
||||||
|
"/login/oauth/access_token",
|
||||||
|
{
|
||||||
|
"grant_type": "authorization_code",
|
||||||
|
"client_id": app_settings.forgejo_oauth_client_id,
|
||||||
|
"client_secret": client_secret,
|
||||||
|
"code": code,
|
||||||
|
"redirect_uri": redirect_uri,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
async def fetch_user(app_settings: AppSettings, token: str) -> Any:
|
||||||
|
"""Fetch the authenticated user's Forgejo profile. Raises ForgejoError."""
|
||||||
|
return await get(app_settings, "/api/v1/user", token=token)
|
||||||
|
|
@ -4,103 +4,72 @@
|
||||||
--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
|
--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
|
||||||
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
|
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
|
||||||
|
|
||||||
--color-background: #f8f8f6;
|
--color-brand-cream: #f7f2e8;
|
||||||
--color-foreground: #17191c;
|
--color-brand-red: #c62030;
|
||||||
|
--color-brand-flame: #f04a36;
|
||||||
|
|
||||||
--color-card: #f8f8f6;
|
/* Ash & Ember (light): the page is cleared ground — warm ash-paper
|
||||||
--color-card-foreground: #17191c;
|
surfaces and charcoal ink. Fire is rationed to a single contained
|
||||||
|
ember accent; flame red stays alarm-only. */
|
||||||
--color-muted: #eeeeea;
|
--color-background: oklch(0.959 0.01 86);
|
||||||
--color-muted-foreground: #3a3d42;
|
--color-foreground: oklch(0.3 0.013 75);
|
||||||
|
--color-card: oklch(0.985 0.006 88);
|
||||||
--color-accent: #f1f1ee;
|
--color-card-foreground: var(--color-foreground);
|
||||||
--color-accent-foreground: #17191c;
|
--color-muted: oklch(0.929 0.014 86);
|
||||||
|
--color-muted-foreground: oklch(0.51 0.028 80);
|
||||||
--color-primary: #2a2d31;
|
--color-elevated: oklch(0.94 0.013 84);
|
||||||
--color-primary-foreground: #ffffff;
|
--color-primary: oklch(0.52 0.15 40);
|
||||||
--color-primary-hover: #17191c;
|
--color-primary-foreground: var(--color-brand-cream);
|
||||||
--color-primary-muted: rgb(23 25 28 / 10%);
|
--color-primary-hover: oklch(0.45 0.135 38);
|
||||||
|
--color-secondary: oklch(0.93 0.013 84);
|
||||||
--color-secondary: #eeeeea;
|
--color-secondary-hover: oklch(0.9 0.015 84);
|
||||||
--color-secondary-foreground: #17191c;
|
--color-secondary-foreground: var(--color-foreground);
|
||||||
|
--color-border: oklch(0.881 0.02 84);
|
||||||
--color-border: #d8d8d2;
|
--color-border-subtle: oklch(0.915 0.014 84);
|
||||||
--color-border-subtle: #e9e9e4;
|
--color-input: oklch(0.98 0.006 88);
|
||||||
--color-input: #ffffff;
|
/* Ember: the interactive/alive warm tier (contained). Flame red is alarm-only. */
|
||||||
--color-ring: #2a2d31;
|
--color-ember: oklch(0.52 0.15 40);
|
||||||
--color-ring-muted: rgb(23 25 28 / 12%);
|
--color-ring: var(--color-ember);
|
||||||
--shadow-card: 0 1px 2px rgb(23 25 28 / 5%);
|
--color-ring-muted: oklch(0.52 0.13 40 / 0.35);
|
||||||
|
--color-header: oklch(0.985 0.006 88);
|
||||||
--color-success: oklch(47.8% 0.13 150);
|
--color-header-foreground: var(--color-foreground);
|
||||||
--color-success-foreground: oklch(47.8% 0.13 150);
|
/* Overlay stays dark — it vignettes the dark hero video for legibility. */
|
||||||
--color-success-muted: oklch(94.8% 0.055 150);
|
--color-overlay: oklch(0.14 0.006 260);
|
||||||
|
--color-hero-ember: oklch(0.58 0.2 34 / 0.22);
|
||||||
--color-warning: oklch(54.7% 0.13 65);
|
--color-hero-burn: var(--color-brand-flame);
|
||||||
--color-warning-foreground: oklch(54.7% 0.13 65);
|
--color-success: oklch(0.521 0.057 135);
|
||||||
--color-warning-muted: oklch(96.3% 0.052 85);
|
--color-success-foreground: oklch(0.46 0.065 140);
|
||||||
|
--color-warning: oklch(0.618 0.121 74);
|
||||||
--color-danger: #c62030;
|
--color-warning-foreground: oklch(0.5 0.11 70);
|
||||||
--color-danger-foreground: #c62030;
|
/* Danger: solid brand-red fill for destructive actions (rest state),
|
||||||
--color-danger-muted: rgb(198 32 48 / 10%);
|
darkening on hover. danger-foreground is the on-light text used by
|
||||||
|
error messages and badge text. */
|
||||||
--color-expired: #5c5c58;
|
--color-danger: var(--color-brand-red);
|
||||||
--color-expired-foreground: #4b4b47;
|
--color-danger-hover: color-mix(
|
||||||
--color-expired-muted: #eeeeea;
|
in oklab,
|
||||||
|
var(--color-brand-red) 78%,
|
||||||
|
black
|
||||||
|
);
|
||||||
|
--color-danger-foreground: oklch(0.5 0.172 30);
|
||||||
|
--color-danger-muted: color-mix(
|
||||||
|
in oklab,
|
||||||
|
var(--color-danger) 18%,
|
||||||
|
transparent
|
||||||
|
);
|
||||||
|
--color-expired: oklch(0.6 0.01 80);
|
||||||
|
--color-expired-foreground: oklch(0.4 0.01 80);
|
||||||
|
|
||||||
--radius-sm: 0.125rem;
|
--radius-sm: 0.125rem;
|
||||||
--radius-md: 0.25rem;
|
--radius-md: 0.25rem;
|
||||||
--radius-lg: 0.375rem;
|
--radius-lg: 0.375rem;
|
||||||
--radius-xl: 0.5rem;
|
|
||||||
--radius-2xl: 0.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@custom-variant dark (&:where(.dark, .dark *));
|
--shadow-card: 0 1px 2px rgb(60 40 20 / 6%), 0 1px 3px rgb(60 40 20 / 7%);
|
||||||
|
--shadow-elevated:
|
||||||
.dark {
|
0 10px 28px rgb(50 35 20 / 12%), 0 2px 6px rgb(50 35 20 / 8%);
|
||||||
--color-background: #17191c;
|
--shadow-hero-logo: 0 14px 34px rgb(0 0 0 / 28%);
|
||||||
--color-foreground: #f7f2e8;
|
--shadow-hero-text: 0 4px 18px rgb(0 0 0 / 40%);
|
||||||
|
--shadow-hero-copy: 0 4px 18px rgb(0 0 0 / 62%);
|
||||||
--color-card: #1f2226;
|
--glow-hero: 0 0 80px oklch(0.58 0.2 34 / 0.16);
|
||||||
--color-card-foreground: #f7f2e8;
|
|
||||||
|
|
||||||
--color-muted: #282b30;
|
|
||||||
--color-muted-foreground: #bdb8ad;
|
|
||||||
|
|
||||||
--color-accent: #2f2728;
|
|
||||||
--color-accent-foreground: #f7f2e8;
|
|
||||||
|
|
||||||
--color-primary: #2a2d31;
|
|
||||||
--color-primary-foreground: #f7f2e8;
|
|
||||||
--color-primary-hover: #17191c;
|
|
||||||
--color-primary-muted: rgb(247 242 232 / 14%);
|
|
||||||
|
|
||||||
--color-secondary: #282b30;
|
|
||||||
--color-secondary-foreground: #f7f2e8;
|
|
||||||
|
|
||||||
--color-border: #34373d;
|
|
||||||
--color-border-subtle: #282b30;
|
|
||||||
--color-input: #1f2226;
|
|
||||||
--color-ring: #f7f2e8;
|
|
||||||
--color-ring-muted: rgb(247 242 232 / 18%);
|
|
||||||
--shadow-card: 0 1px 2px rgb(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: #f04a36;
|
|
||||||
--color-danger-foreground: #ff7a66;
|
|
||||||
--color-danger-muted: rgb(240 74 54 / 18%);
|
|
||||||
|
|
||||||
--color-expired: #bdb8ad;
|
|
||||||
--color-expired-foreground: #d6d0c4;
|
|
||||||
--color-expired-muted: #282b30;
|
|
||||||
|
|
||||||
--image-wrapper-size: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
|
|
@ -110,12 +79,22 @@
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
|
color-scheme: light;
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-sans);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground antialiased;
|
@apply antialiased bg-background text-foreground;
|
||||||
letter-spacing: 0;
|
letter-spacing: 0;
|
||||||
|
/* "The fire is off-screen": a faint warm haze at the top edge so
|
||||||
|
interior pages share the hero's light without its motion. */
|
||||||
|
background-image: radial-gradient(
|
||||||
|
60rem 32rem at 50% -14rem,
|
||||||
|
oklch(0.7 0.15 45 / 0.07),
|
||||||
|
transparent 65%
|
||||||
|
);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
|
@ -127,6 +106,11 @@
|
||||||
h3 {
|
h3 {
|
||||||
@apply text-foreground;
|
@apply text-foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Alpine utility, dont show elements until alpine.js is fetched & loaded in browser*/
|
||||||
|
[x-cloak] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer components {
|
@layer components {
|
||||||
|
|
@ -134,164 +118,400 @@
|
||||||
@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;
|
@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-xs {
|
|
||||||
@apply px-2 py-1 text-xs;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-sm {
|
.btn-sm {
|
||||||
@apply px-3 py-2 text-sm;
|
@apply px-3 py-2 text-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-md {
|
|
||||||
@apply px-4 py-2.5 text-sm;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-lg {
|
|
||||||
@apply px-5 py-3 text-base;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
@apply text-primary-foreground bg-primary-hover hover:bg-[#c62030]/90 hover:text-[#f7f2e8];
|
@apply border border-foreground/12 bg-primary text-primary-foreground hover:border-ember/45 hover:bg-primary-hover hover:text-primary-foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Buttons are solid fills that darken a step on hover (the hero button's
|
||||||
|
behavior), never sheer washes with colored borders. */
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
@apply border border-border bg-card text-secondary-foreground hover:border-border hover:bg-accent hover:text-accent-foreground;
|
@apply border border-foreground/12 bg-secondary text-secondary-foreground hover:bg-secondary-hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-borderless {
|
.btn-danger {
|
||||||
@apply bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground;
|
@apply border border-transparent bg-danger text-brand-cream hover:bg-danger-hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header {
|
/* Destructive action at rest — quiet outline; solid red is reserved for
|
||||||
position: relative;
|
the moment of confirmation. Flame red never burns idle on a page. */
|
||||||
z-index: 10;
|
.btn-danger-quiet {
|
||||||
background: lab(0% 0 0);
|
@apply border border-danger/45 bg-transparent text-danger-foreground hover:border-danger hover:bg-danger-muted;
|
||||||
border-bottom: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header a,
|
.btn-link {
|
||||||
.app-header button,
|
@apply relative inline-flex items-center justify-center gap-2 px-0 py-1 text-sm font-medium transition bg-transparent rounded-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50;
|
||||||
.app-header nav svg {
|
|
||||||
color: #f7f2e8;
|
|
||||||
stroke: #f7f2e8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header .brand-link svg {
|
.btn-link::after {
|
||||||
stroke: none;
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset-inline: 0;
|
||||||
|
bottom: 0.125rem;
|
||||||
|
height: 1px;
|
||||||
|
background: var(--color-ember);
|
||||||
|
transform: scaleX(0);
|
||||||
|
transform-origin: left center;
|
||||||
|
transition: transform 160ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header .brand-link svg path[fill="#17191C"] {
|
.btn-link:hover::after,
|
||||||
fill: #f7f2e8;
|
.btn-link:focus-visible::after {
|
||||||
|
transform: scaleX(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header .btn-borderless {
|
/* Current-page nav link keeps its ember underline lit. */
|
||||||
color: #f7f2e8;
|
.btn-link[aria-current="page"]::after {
|
||||||
|
transform: scaleX(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header .btn-borderless:hover {
|
.btn-disabled {
|
||||||
background: rgb(247 242 232 / 10%);
|
/* border (not just border-color) keeps disabled buttons the same
|
||||||
color: #fffdf8;
|
height as their bordered siblings in the Actions column. */
|
||||||
|
@apply pointer-events-none border border-foreground/8 bg-foreground/6 text-foreground/35;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header .btn-secondary {
|
.notice-rail {
|
||||||
background: rgb(247 242 232 / 8%);
|
@apply border-l-2 border-warning px-5 py-1.5;
|
||||||
border-color: rgb(247 242 232 / 18%);
|
background: var(--color-card);
|
||||||
color: #f7f2e8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-header .btn-secondary:hover {
|
/* The cut rule: an ember segment, a gap, then the hairline. The gap is
|
||||||
background: rgb(247 242 232 / 14%);
|
the point — the break the fire cannot cross. Ember sits 2px proud of
|
||||||
border-color: rgb(247 242 232 / 28%);
|
the 1px hairline so the burning side reads heavier than the ground. */
|
||||||
color: #fffdf8;
|
.firebreak-rule {
|
||||||
|
height: 2px;
|
||||||
|
background:
|
||||||
|
linear-gradient(var(--color-ember), var(--color-ember)) 0 0 /
|
||||||
|
2.5rem 2px no-repeat,
|
||||||
|
linear-gradient(var(--color-border), var(--color-border)) 3.25rem
|
||||||
|
50% / calc(100% - 3.25rem) 1px no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.landing-page .app-header {
|
/* Share-link lifetime as a fuse: ember = remaining, ash = burned.
|
||||||
display: none;
|
The server sets --fuse to the remaining-lifetime percentage
|
||||||
|
(style="--fuse: 62%"); omitted = a fresh, fully-lit fuse. */
|
||||||
|
.link-fuse {
|
||||||
|
height: 2px;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--color-ember) var(--fuse, 100%),
|
||||||
|
var(--color-border-subtle) var(--fuse, 100%)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
.landing-page {
|
/* Containment status grammar — the operator voice for state reports
|
||||||
background: #17191c;
|
(STATUS · CONTAINED — 0 EXPOSED). Write copy in sentence case and
|
||||||
|
let the CSS shout; color comes from the call site. */
|
||||||
|
.status-line {
|
||||||
|
@apply font-mono text-[0.6875rem] font-medium uppercase tracking-[0.12em];
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-link svg {
|
.table-panel {
|
||||||
@apply shrink-0;
|
@apply overflow-hidden rounded-lg border border-border bg-card;
|
||||||
stroke: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand-link svg:last-child {
|
|
||||||
width: 5.25rem;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark .brand-link svg path[fill="#17191C"] {
|
|
||||||
fill: var(--color-foreground);
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
box-shadow: var(--shadow-card);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
.table-shell {
|
||||||
@apply border-b border-border px-4 py-3;
|
@apply overflow-x-auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header-label {
|
.data-table {
|
||||||
@apply text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground;
|
/* Narrower floor on small screens — secondary columns are hidden
|
||||||
|
there, so less width needs to scroll. Tabular numerals keep
|
||||||
|
counts and dates aligned as they tick. */
|
||||||
|
@apply w-full min-w-[34rem] text-left text-sm tabular-nums md:min-w-[45rem];
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header-title {
|
.data-table thead {
|
||||||
@apply mt-1 text-base font-semibold text-card-foreground;
|
@apply border-b border-border bg-elevated text-xs font-semibold uppercase tracking-[0.12em] text-foreground/75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body {
|
.data-table th {
|
||||||
@apply px-4 py-4;
|
@apply px-4 py-2.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-mono {
|
.data-table th:first-child,
|
||||||
@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;
|
.data-table td:first-child {
|
||||||
|
@apply pl-5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-error {
|
.data-table th:last-child,
|
||||||
@apply text-sm font-medium text-danger-foreground;
|
.data-table td:last-child {
|
||||||
|
@apply pr-5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tbody {
|
||||||
|
@apply divide-y divide-border-subtle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tbody tr:not(.table-empty) {
|
||||||
|
@apply transition-colors;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row hover is a pass of warm light, not a gray lift. */
|
||||||
|
.data-table tbody tr:not(.table-empty):hover {
|
||||||
|
background: color-mix(in oklab, var(--color-ember) 6%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td {
|
||||||
|
@apply px-4 py-2.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-empty {
|
||||||
|
@apply text-center text-muted-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loading/error/empty states inside a table panel share one fixed-feel
|
||||||
|
height so the htmx swap to the real table doesn't shift layout (CLS). */
|
||||||
|
.table-placeholder {
|
||||||
|
@apply flex min-h-40 items-center justify-center gap-2.5 px-5 py-8 text-center text-sm text-muted-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-icon {
|
||||||
|
@apply size-4 shrink-0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loading-skeleton bar for table rows ("instrument warming up"). */
|
||||||
|
.skeleton-bar {
|
||||||
|
@apply inline-block h-3.5 rounded bg-muted/80 motion-safe:animate-pulse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inline technical strings (branch names, SHAs) — brighter than
|
||||||
|
muted-foreground so mono text reads as data, not chrome. */
|
||||||
|
.mono-chip {
|
||||||
|
@apply inline-block rounded bg-muted px-1 py-0.5 font-mono text-xs leading-none text-foreground/85;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-label {
|
||||||
|
@apply mb-1.5 block text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input {
|
||||||
|
@apply block w-full rounded-md border border-border bg-input px-3 py-2.5 text-sm text-foreground transition placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring-muted;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes creep-in {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes trot {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
transform: translateY(0) rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
25% {
|
||||||
|
transform: translateY(-3px) rotate(-0.6deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
75% {
|
||||||
|
transform: translateY(-3px) rotate(0.6deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes look-up {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(3deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes laser-pulse {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rattle {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
10% {
|
||||||
|
transform: translate(-1px, 1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
20% {
|
||||||
|
transform: translate(1px, -1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
30% {
|
||||||
|
transform: translate(-2px, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
40% {
|
||||||
|
transform: translate(2px, 1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
transform: translate(-1px, -2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
60% {
|
||||||
|
transform: translate(2px, 2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
70% {
|
||||||
|
transform: translate(-3px, 1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
80% {
|
||||||
|
transform: translate(3px, -1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
90% {
|
||||||
|
transform: translate(-2px, 2px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.guard-dog-wrap {
|
||||||
|
animation: creep-in 6s ease-out both;
|
||||||
|
animation-delay: 1.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guard-dog-trot {
|
||||||
|
animation: trot 0.4s ease-in-out 15;
|
||||||
|
animation-delay: 1.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guard-dog-look {
|
||||||
|
animation: look-up 0.8s ease-out both;
|
||||||
|
animation-delay: 7.5s;
|
||||||
|
transform-origin: bottom center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-eye {
|
||||||
|
position: absolute;
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--color-brand-red);
|
||||||
|
box-shadow:
|
||||||
|
0 0 8px 2px var(--color-brand-red),
|
||||||
|
0 0 24px 6px
|
||||||
|
color-mix(in oklab, var(--color-brand-red) 45%, transparent);
|
||||||
|
animation: laser-pulse 2s ease-in-out infinite;
|
||||||
|
animation-delay: 7.5s;
|
||||||
|
animation-fill-mode: both;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-eye-left {
|
||||||
|
inset-block-start: 40px;
|
||||||
|
inset-inline-start: 81px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-eye-right {
|
||||||
|
inset-block-start: 39px;
|
||||||
|
inset-inline-start: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-beam {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 100;
|
||||||
|
height: 2px;
|
||||||
|
pointer-events: none;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--color-brand-red),
|
||||||
|
color-mix(in oklab, var(--color-brand-red) 0%, transparent)
|
||||||
|
);
|
||||||
|
box-shadow:
|
||||||
|
0 0 8px 2px
|
||||||
|
color-mix(in oklab, var(--color-brand-red) 67%, transparent),
|
||||||
|
0 0 20px 4px
|
||||||
|
color-mix(in oklab, var(--color-brand-red) 27%, transparent);
|
||||||
|
opacity: 0;
|
||||||
|
transform-origin: left center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-beam.fire {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.05s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-beam.fade {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-zapped {
|
||||||
|
background: var(--color-brand-red) !important;
|
||||||
|
color: var(--color-brand-cream) !important;
|
||||||
|
box-shadow:
|
||||||
|
0 0 12px 4px
|
||||||
|
color-mix(in oklab, var(--color-brand-red) 50%, transparent),
|
||||||
|
0 0 30px 8px
|
||||||
|
color-mix(in oklab, var(--color-brand-red) 25%, transparent);
|
||||||
|
animation: rattle 0.15s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.guard-dog-wrap,
|
||||||
|
.guard-dog-trot,
|
||||||
|
.guard-dog-look,
|
||||||
|
.laser-eye,
|
||||||
|
.laser-beam,
|
||||||
|
.btn-zapped {
|
||||||
|
animation: none !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laser-eye,
|
||||||
|
.laser-beam {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* One badge, one size — sizes fold back in here if a real second size
|
||||||
|
ever ships. leading-none: without it, 10px caps float in the
|
||||||
|
inherited line box and the slack lands below the text. */
|
||||||
|
.badge {
|
||||||
|
@apply inline-block whitespace-nowrap rounded-full px-1.5 py-0.5 text-[10px] font-medium uppercase leading-none tracking-[0.06em];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Live ember — heat that's already outside the break (public repos:
|
||||||
|
potential fire starters). Soft wash, not alarm red; same recipe as
|
||||||
|
the sibling badges so it sits flush beside them. */
|
||||||
|
.badge-ember {
|
||||||
|
background: color-mix(in oklab, var(--color-ember) 42%, transparent);
|
||||||
|
border: 1px solid
|
||||||
|
color-mix(in oklab, var(--color-ember) 60%, transparent);
|
||||||
|
color: oklch(0.4 0.13 38);
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-danger {
|
||||||
|
background: color-mix(in oklab, var(--color-danger) 42%, transparent);
|
||||||
|
border: 1px solid
|
||||||
|
color-mix(in oklab, var(--color-danger) 60%, transparent);
|
||||||
|
color: var(--color-danger-foreground);
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-expired {
|
||||||
|
background: color-mix(in oklab, var(--color-expired) 38%, transparent);
|
||||||
|
border: 1px solid
|
||||||
|
color-mix(in oklab, var(--color-expired) 55%, transparent);
|
||||||
|
color: var(--color-expired-foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@utility img-wrapper-* {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
max-width: --value(--max-w-*, [length], [percentage], [*], "none", "inherit", "initial", "unset");
|
|
||||||
|
|
||||||
/* Automatically target the image inside */
|
|
||||||
& img {
|
|
||||||
width: 100%; /* Replaces 'stretch' for better compatibility */
|
|
||||||
height: auto; /* Maintains aspect ratio */
|
|
||||||
display: block; /* Removes bottom whitespace common in inline images */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
12
web/app/static/img/firebreak-brand-text.svg
Normal file
12
web/app/static/img/firebreak-brand-text.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<svg width="560" height="96" viewBox="0 0 560 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M239.045 0.0319824C240.53 1.43298 240.04 32.507 240.04 36.579C247.645 30.781 255.661 26.693 265.554 28.157C287.473 31.399 298.726 58.306 288.737 77.177C285.609 83.087 282.182 86.355 276.881 90.212C264.339 98.164 251.833 95.186 240.56 87.028C240.564 89.632 240.291 91.367 239.954 93.926C235.389 93.806 230.673 93.934 226.096 93.997C225.471 64.562 226.406 34.452 225.99 4.88702C230.259 3.63802 234.869 1.68498 239.045 0.0319824ZM260.64 81.431C284.761 76.056 282.438 38.664 255.615 41.617C249.413 44.028 244.263 47.121 241.468 53.456C237.184 63.166 240.963 76.132 251.256 79.975C254.258 81.071 257.447 81.566 260.64 81.431Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M376.834 28.126C392.589 25.95 407.281 34.637 411.99 49.807C413.916 56.008 413.713 60.747 413.639 67.103C396.945 67.006 380.25 67.017 363.557 67.138C370.021 84.748 383.312 85.1801 398.211 77.7621C399.505 76.9421 399.654 76.7261 401.176 76.4131C404.595 77.4261 405.973 81.212 407.828 84.474C396.781 96.566 375.369 98.422 362.001 89.035C354.887 83.959 350.104 76.245 348.721 67.617C345.602 48.074 357.101 31.357 376.834 28.126ZM363.575 55.286C370.086 55.465 376.064 55.24 382.569 55.013C387.325 54.943 393.355 55.0171 397.989 54.5381C394.911 45.4401 390.287 40.019 379.923 40.6451C370.034 42.507 366.785 45.807 363.575 55.286Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M450.783 27.678C463.381 26.391 478.525 32.427 480.177 45.961C482.013 60.992 481.097 78.711 481.059 93.967C476.834 93.911 471.01 94.4351 467.07 93.843C466.173 92.7681 466.562 91.536 466.57 89.699L466.096 89.326C453.885 95.572 438.62 99.262 427.46 87.26C425.658 85.322 424.818 83.109 423.811 80.698C418.781 55.154 448.1 51.963 466.25 54.217C464.708 33.354 441.917 39.683 430.435 48.858C428.5 45.379 426.645 42.293 424.541 38.909C433.821 31.827 439.131 29.112 450.783 27.678ZM449.019 83.188C456.215 83.371 462.633 80.747 466.804 74.728C466.664 71.366 466.477 67.953 466.484 64.591C463.339 64.763 460.779 64.773 457.63 64.733C451.389 64.994 444.694 64.968 440.086 69.845C436.914 73.204 436.393 77.565 440.481 80.382C443.187 82.246 445.834 82.811 449.019 83.188Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M174.311 28.08C176.186 27.896 178.071 27.833 179.955 27.892C193.937 28.217 205.662 34.908 209.952 48.858C211.943 55.331 211.684 60.202 211.383 66.932C196.105 67.643 177.607 67.171 162.094 67.152C162.639 69.086 163.385 70.958 164.319 72.738C166.757 77.356 171.023 80.738 176.077 82.059C183.72 83.987 190.477 81.327 196.849 77.483C199.815 75.366 200.807 75.413 203.029 78.609C204.363 80.529 205.591 82.78 206.818 84.789C173.446 112.422 131.378 79.806 152.853 41.469C157.246 33.626 165.956 29.849 174.311 28.08ZM161.667 55.506C167.996 55.435 174.931 55.014 181.09 55.067C183.945 55.173 194.052 56.118 195.85 54.463C196.244 44.36 185.451 40.41 176.934 40.624C167.477 43.2 165.106 46.657 161.667 55.506Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M510.587 0C511.181 0.054 510.77 -0.00898048 511.77 0.39502C512.16 19.151 511.996 38.453 512.018 57.239C519.805 48.965 529.089 38.101 536.717 29.52C543.54 29.56 550.363 29.514 557.184 29.382C548.665 38.491 539.906 47.019 531.014 55.757C538.813 66.164 546.737 76.478 554.783 86.695C555.562 87.968 558.892 92.115 559.962 93.521C554.024 93.506 548.088 93.681 542.162 94.048C537.701 89.416 525.057 72.37 520.404 66.438C517.653 69.067 515.051 71.158 512.094 73.559C511.931 80.282 512.076 87.533 512.092 94.296C507.521 94.072 502.222 94.228 497.597 94.255C497.181 64.483 497.492 34.175 497.415 4.33301C501.414 3.34401 506.602 1.381 510.587 0Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M0.0149994 5.42902C20.369 5.93702 43.334 5.41398 63.895 5.47198C61.753 10.076 60.057 14.631 58.243 19.362C47.704 18.42 26.906 19.033 15.505 19.065L15.541 42.469C19.604 42.424 49.409 42.026 50.987 42.971L50.897 44.612C50.257 48.455 49.469 52.264 48.836 56.149C37.717 55.948 26.596 55.899 15.476 56.003L15.549 94.015L0 93.989L0.0149994 5.42902Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M318.451 26.043L318.823 26.116C320.222 27.584 319.69 36.849 319.649 39.455C328.361 31.502 333.189 30.515 344.3 27.326C344.2 32.073 344.303 37.139 344.315 41.913C333.744 44.954 327.319 46.541 320.563 55.542L320.523 69.245L320.546 93.565C315.602 93.516 311.286 93.54 306.317 93.762C305.626 73.468 306.044 50.816 306.004 30.409C310.106 28.823 314.257 27.368 318.451 26.043Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M118.058 26.01L118.792 26.513C119.261 30.074 119.091 36.224 119.097 40.004C128.728 32.089 132.245 30.99 144.057 27.502C144.041 32.331 143.921 37.263 144.369 42.062C133.869 44.569 127.89 47.132 120.539 54.929L120.496 69.245L120.527 94.027L105.912 93.938C105.635 73.111 105.962 51.423 105.994 30.547C110.156 28.83 113.8 27.48 118.058 26.01Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M87.61 27.166L88.113 27.305C88.879 28.853 88.576 88.127 88.576 94.012L74.541 94.01C74.477 93.966 74.397 93.94 74.349 93.879C72.844 91.962 73.564 36.012 73.551 30.329C78.393 29.126 82.684 28.091 87.61 27.166Z" fill="#F7F2E8"/>
|
||||||
|
<path d="M77.945 1.83897C81.329 0.76297 85.031 1.61299 87.606 4.05699C90.181 6.50199 91.223 10.1539 90.325 13.5899C89.426 17.0249 86.73 19.7 83.288 20.571C78.181 21.863 72.973 18.862 71.528 13.797C70.083 8.73198 72.925 3.43497 77.945 1.83897Z" fill="#F7F2E8"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.1 KiB |
|
|
@ -1,43 +0,0 @@
|
||||||
<svg width="560" height="625" viewBox="0 0 560 625" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M239.045 529.037C240.53 530.438 240.04 561.512 240.04 565.584C247.645 559.786 255.661 555.698 265.554 557.162C287.473 560.404 298.726 587.311 288.737 606.182C285.609 612.092 282.182 615.36 276.881 619.217C264.339 627.169 251.833 624.191 240.56 616.033C240.564 618.637 240.291 620.372 239.954 622.931C235.389 622.811 230.673 622.939 226.096 623.002C225.471 593.567 226.406 563.457 225.99 533.892C230.259 532.643 234.869 530.69 239.045 529.037ZM260.64 610.436C284.761 605.061 282.438 567.669 255.615 570.622C249.413 573.033 244.263 576.126 241.468 582.461C237.184 592.171 240.963 605.137 251.256 608.98C254.258 610.076 257.447 610.571 260.64 610.436Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M376.834 557.131C392.589 554.955 407.281 563.642 411.99 578.812C413.916 585.013 413.713 589.752 413.639 596.108C396.945 596.011 380.25 596.022 363.557 596.143C370.021 613.753 383.312 614.185 398.211 606.767C399.505 605.947 399.654 605.731 401.176 605.418C404.595 606.431 405.973 610.217 407.828 613.479C396.781 625.571 375.369 627.427 362.001 618.04C354.887 612.964 350.104 605.25 348.721 596.622C345.602 577.079 357.101 560.362 376.834 557.131ZM363.575 584.291C370.086 584.47 376.064 584.245 382.569 584.018C387.325 583.948 393.355 584.022 397.989 583.543C394.911 574.445 390.287 569.024 379.923 569.65C370.034 571.512 366.785 574.812 363.575 584.291Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M450.783 556.683C463.381 555.396 478.525 561.432 480.177 574.966C482.013 589.997 481.097 607.716 481.059 622.972C476.834 622.916 471.01 623.44 467.07 622.848C466.173 621.773 466.562 620.541 466.57 618.704L466.096 618.331C453.885 624.577 438.62 628.267 427.46 616.265C425.658 614.327 424.818 612.114 423.811 609.703C418.781 584.159 448.1 580.968 466.25 583.222C464.708 562.359 441.917 568.688 430.435 577.863C428.5 574.384 426.645 571.298 424.541 567.914C433.821 560.832 439.131 558.117 450.783 556.683ZM449.019 612.193C456.215 612.376 462.633 609.752 466.804 603.733C466.664 600.371 466.477 596.958 466.484 593.596C463.339 593.768 460.779 593.778 457.63 593.738C451.389 593.999 444.694 593.973 440.086 598.85C436.914 602.209 436.393 606.57 440.481 609.387C443.187 611.251 445.834 611.816 449.019 612.193Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M174.311 557.085C176.186 556.901 178.071 556.838 179.955 556.897C193.937 557.222 205.662 563.913 209.952 577.863C211.943 584.336 211.684 589.207 211.383 595.937C196.105 596.648 177.607 596.176 162.094 596.157C162.639 598.091 163.385 599.963 164.319 601.743C166.757 606.361 171.023 609.743 176.077 611.064C183.72 612.992 190.477 610.332 196.849 606.488C199.815 604.371 200.807 604.418 203.029 607.614C204.363 609.534 205.591 611.785 206.818 613.794C173.446 641.427 131.378 608.811 152.853 570.474C157.246 562.631 165.956 558.854 174.311 557.085ZM161.667 584.511C167.996 584.44 174.931 584.019 181.09 584.072C183.945 584.178 194.052 585.123 195.85 583.468C196.244 573.365 185.451 569.415 176.934 569.629C167.477 572.205 165.106 575.662 161.667 584.511Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M510.587 529.005C511.181 529.059 510.77 528.996 511.77 529.4C512.16 548.156 511.996 567.458 512.018 586.244C519.805 577.97 529.089 567.106 536.717 558.525C543.54 558.565 550.363 558.519 557.184 558.387C548.665 567.496 539.906 576.024 531.014 584.762C538.813 595.169 546.737 605.483 554.783 615.7C555.562 616.973 558.892 621.12 559.962 622.526C554.024 622.511 548.088 622.686 542.162 623.053C537.701 618.421 525.057 601.375 520.404 595.443C517.653 598.072 515.051 600.163 512.094 602.564C511.931 609.287 512.076 616.538 512.092 623.301C507.521 623.077 502.222 623.233 497.597 623.26C497.181 593.488 497.492 563.18 497.415 533.338C501.414 532.349 506.602 530.386 510.587 529.005Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M0.0149994 534.434C20.369 534.942 43.334 534.419 63.895 534.477C61.753 539.081 60.057 543.636 58.243 548.367C47.704 547.425 26.906 548.038 15.505 548.07L15.541 571.474C19.604 571.429 49.409 571.031 50.987 571.976L50.897 573.617C50.257 577.46 49.469 581.269 48.836 585.154C37.717 584.953 26.596 584.904 15.476 585.008L15.549 623.02L0 622.994L0.0149994 534.434Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M318.451 555.048L318.823 555.121C320.222 556.589 319.69 565.854 319.649 568.46C328.361 560.507 333.189 559.52 344.3 556.331C344.2 561.078 344.303 566.144 344.315 570.918C333.744 573.959 327.319 575.546 320.563 584.547L320.523 598.25L320.546 622.57C315.602 622.521 311.286 622.545 306.317 622.767C305.626 602.473 306.044 579.821 306.004 559.414C310.106 557.828 314.257 556.373 318.451 555.048Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M118.058 555.015L118.792 555.518C119.261 559.079 119.091 565.229 119.097 569.009C128.728 561.094 132.245 559.995 144.057 556.507C144.041 561.336 143.921 566.268 144.369 571.067C133.869 573.574 127.89 576.137 120.539 583.934L120.496 598.25L120.527 623.032L105.912 622.943C105.635 602.116 105.962 580.428 105.994 559.552C110.156 557.835 113.8 556.485 118.058 555.015Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M87.61 556.171L88.113 556.31C88.879 557.858 88.576 617.132 88.576 623.017L74.541 623.015C74.477 622.971 74.397 622.945 74.349 622.884C72.844 620.967 73.564 565.017 73.551 559.334C78.393 558.131 82.684 557.096 87.61 556.171Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M77.945 530.844C81.329 529.768 85.031 530.618 87.606 533.062C90.181 535.507 91.223 539.159 90.325 542.595C89.426 546.03 86.73 548.705 83.288 549.576C78.181 550.868 72.973 547.867 71.528 542.802C70.083 537.737 72.925 532.44 77.945 530.844Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M409.992 129.188C417.441 128.358 432.247 129.01 438.239 133.886C445.934 140.147 444.321 141.893 454.577 143.756C453.658 160.141 456.451 155.076 462.342 167.016C466.632 178.302 471.575 190.292 474.386 201.998C477.631 215.507 464.545 224.911 483.246 229.969C478.35 253.35 491.486 263.677 512.057 267.911C494.134 273.673 487.464 280.725 482.873 298.856C481.4 304.277 479.555 309.812 478.493 315.322C476.919 323.49 476.518 331.703 470.503 338.129C468.564 340.201 466.598 341.721 464.357 343.476C464.988 346.046 465.74 348.707 466.429 351.274C457.886 364.031 453.875 377.694 445.313 390.288C442.778 394.017 440.506 397.854 438.528 401.912C463.688 396.635 481.42 388.554 503.388 375.723C497.416 384.405 488.826 396.09 481.228 403.364C473.435 410.63 465.188 417.326 457.393 424.611C447.951 433.437 438.713 442.49 429.26 451.3C424.6 455.643 419.438 459.468 414.658 463.716C417.363 458.74 420.744 452.274 422.704 447.102C426.793 436.314 429.465 414.849 427.431 403.561C424.792 388.915 423.146 388.029 424.24 372.764C417.259 387.788 419.873 391.997 420.883 407.542C421.153 411.695 417.872 421.395 414.736 424.163C407.064 426.11 404.341 431.758 398.106 436.337C391.062 441.509 383.299 445.415 375.741 449.763C380.22 444.046 382.62 441.303 388.113 436.573C381.325 439.91 373.759 444.088 367.829 448.749C365.489 450.587 363.433 453.953 360.781 455.431C345.095 464.172 325.355 469.279 308.069 472.712C290.958 475.778 273.542 476.788 256.192 475.721C246.043 474.999 240.996 473.493 231.662 469.783C231.235 469.614 228.649 471.959 227.379 472.005C221.343 472.222 215.102 471.029 209.34 469.272C189.617 460.851 169.75 451.155 151.576 439.758C145.975 436.245 141.355 430.952 135.664 427.607C128.738 423.534 121.426 420.568 114.632 416.378C143.207 419.184 152.007 416.864 179.086 414.508C183.761 416.853 189.699 420.887 194.39 423.634C201.457 427.713 208.942 431.019 216.717 433.495C232.335 438.277 248.675 440.261 264.983 439.354C274.379 438.789 284.27 436.844 293.621 437.9C317.295 440.572 336.745 429.336 356.982 418.77L358.068 424.703C366.199 417.28 368.579 412.358 374.432 403.525C375.939 401.252 384.365 395.226 387.13 392.996C394.185 387.306 401.572 381.653 408.026 375.179C430.864 352.405 429.51 335.602 460.724 320.978C436.159 308.756 443.501 302.401 451.289 281.878C452.786 277.933 453.065 270.918 453.205 266.656C457.509 268.107 462.307 269.341 466.71 270.567C465.814 269.589 464.936 268.594 464.078 267.582C452.484 253.795 443.244 230.104 440.903 212.131C440.416 208.393 440.975 202.195 441.291 198.376C439.76 195.834 433.443 189.401 432.968 188.184C423.67 164.373 411.411 151.492 391.831 135.067C398.76 131.041 402.025 130.362 409.992 129.188Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M265.12 0.233836C271.95 -0.550164 278.983 0.807827 285.758 1.79283C274.972 6.95983 265.54 9.77284 256.829 18.6518C243.223 32.4778 235.066 52.4348 234.256 71.7428C233.731 84.2438 236.21 95.4258 232.555 107.755C228.926 119.993 221.494 128.06 212.694 136.796C217.996 124.088 219.54 119.167 218.647 105.616C214.889 115.368 210.444 122.814 200.011 126.433C200.138 123.403 201.149 115.356 199.08 113.39C198.057 113.655 197.27 114.297 196.688 115.17C191.044 123.635 185.863 131.929 179.085 139.629C168.837 151.126 155.304 158.896 143.867 169.138C132.752 179.091 125.971 190.385 117.812 202.569C114.688 207.234 109.819 211.293 107.234 216.478C104.054 222.859 103.613 230.133 100.589 236.545C98.781 240.277 93.289 244.21 91.529 248.4C87.249 258.59 92.588 261.489 95.917 269.894C98.726 276.986 95.162 283.023 92.064 289.207C108.523 302.204 94.499 320.543 108.335 335.334C113.996 341.385 118.658 351.947 123.024 359.408C134.666 379.306 149.471 392.376 167.388 406.178C158.686 409.773 140.853 415.301 131.751 413.476C125.67 412.257 123.388 409.007 120.256 404.357C94.472 400.535 107.784 422.835 113.148 436.794C116.986 446.781 123.002 457.846 127.663 467.627C112.905 455.728 102.369 442.378 88.524 429.717C82.034 423.783 75.863 417.666 69.734 411.363C59.631 401.183 49.397 387.401 41.1 375.795C46.508 378.808 51.31 382.412 57.211 385.498C72.21 393.343 86.066 396.27 102.342 399.064C88.937 383.747 81.159 368.374 73.25 349.856L79.17 353.238C75.266 345.434 69.992 336.712 66.85 328.753C67.225 326.153 68.054 322.598 68.6 319.944C67.081 317.799 61.437 310.199 60.597 308.256C57.714 301.589 57.302 293.991 54.414 286.725C49.945 275.48 42.502 271.542 32.03 266.979C51.679 264.03 66.635 247.297 61.625 226.935C65.362 225.178 69.103 223.071 72.744 221.095C71.877 217.611 69.059 209.094 67.744 205.857C59.62 185.845 79.037 178.747 86.027 164.814C89.995 156.907 90.572 143.283 96.059 133.218C107.763 111.748 124.978 94.1708 146.642 82.5658C153.103 79.1048 159.994 76.8178 166.788 74.5428C160.427 79.4308 154.444 84.7938 148.89 90.5838C138.695 101.327 130.616 114.076 130.825 129.561C130.88 133.652 132.326 136.776 135.368 139.452C137.473 141.303 140.913 142.651 143.742 142.052C161.275 138.335 177.142 109.966 183.128 94.9598C184.823 90.7118 186.476 79.3968 187.108 74.9898C189.274 59.8748 194.959 46.7948 204.304 34.7808C219.073 15.5188 241.011 3.05584 265.12 0.233836Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M334.936 63.3759C356.574 68.7329 379.514 77.6769 398.404 89.6779C403.324 92.9379 407.766 97.3269 412.795 100.384C420.42 105.019 428.32 109.134 435.292 114.779C438.823 117.638 440.003 119.451 441.933 123.422C429.107 121.539 422.081 121.087 409.332 121.153C401.495 121.675 394.253 123.046 386.515 123.814C375.85 124.873 362.709 117.679 353.368 112.932C349.916 111.178 346.275 105.6 341.276 103.579C335.435 101.217 330.16 102.173 324.854 100.863C318.02 99.1749 310.749 96.9778 303.865 95.1358C308.34 90.4778 313.386 86.0619 317.883 81.4429C323.633 75.5379 329.308 69.4059 334.936 63.3759Z" fill="#F7F2E8"/>
|
|
||||||
<path d="M319.086 10.4429C320.067 11.3969 319.55 13.4899 319.333 14.7619C313.095 51.3959 289.666 83.0359 259.466 104.285C261.866 97.4399 266.944 87.3949 270.127 80.8129C278.647 64.7889 288.343 49.4179 299.136 34.8279C287.6 38.1369 283.549 39.9349 273.249 45.5469C273.114 44.2189 272.864 40.9859 272.952 39.8279C273.414 33.7359 288.899 29.2769 294.136 27.1309C297.188 25.8869 300.142 24.4149 302.973 22.7289C308.744 19.2989 313.917 14.7429 319.086 10.4429Z" fill="#C62030"/>
|
|
||||||
<path d="M345.325 127.731C358.33 130.726 382.679 145.122 392.546 154.765C397.859 159.957 403.134 168.71 402.736 176.294C402.607 178.752 402.224 182.806 400.342 184.636C399.074 180.931 398.444 178.883 396.548 175.496C387.672 160.155 379.311 153.013 363.514 146.495C365.729 151.229 367.968 154.654 370.943 158.906C360.26 151.42 351.061 139.345 345.325 127.731Z" fill="#C62030"/>
|
|
||||||
<path d="M167.534 384.543C171.598 385.886 182.102 391.509 187.164 393.578C207.871 402.041 226.401 406.735 248.53 409.936C244.364 411.154 239.58 412.128 235.309 413.095C232.603 413.511 229.79 414.362 227.13 415.079L232.982 420.249C228.788 419.368 224.624 418.351 220.496 417.199C203.318 412.324 176.676 400.866 167.534 384.543Z" fill="#C62030"/>
|
|
||||||
<path d="M409.717 183.898C411.582 185.267 416.013 192.853 417.156 195.036C427.277 214.352 430.491 234.795 432.809 256.162C430.527 253.472 427.908 249.815 425.735 246.951C415.903 232.804 412.937 227.958 409.036 211.575L417.211 220.88C415.467 211.047 410.351 192.628 409.717 183.898Z" fill="#C62030"/>
|
|
||||||
<path d="M360.994 392.524L361.423 393.126C337.904 418.773 315.735 424.874 281.864 422.345C285.007 420.089 305.945 414.168 311.156 412.07C318.126 409.597 324.805 406.338 331.78 403.895C333.121 403.425 334.084 404.213 335.269 404.853C340.199 404.855 355.7 395.351 360.994 392.524Z" fill="#C62030"/>
|
|
||||||
<path d="M126.101 307.798C128.641 309.644 131.488 320.784 132.897 324.443C138.952 340.165 147.178 357.148 155.514 371.719C150.422 368.128 146.907 364.87 142.575 360.411C131.445 348.598 122.809 335.054 117.855 319.494L129.218 334.11C127.466 324.99 125.854 317.149 126.101 307.798Z" fill="#C62030"/>
|
|
||||||
<path d="M137.081 202.535L137.335 202.827C137.267 206.488 125.219 225.359 123.617 234.04C125.169 235.388 125.564 233.475 127.341 234.764C126.888 240.699 124.717 246.476 123.708 252.249C122.819 257.34 122.245 262.897 121.565 268.059L120.995 268.208C114.292 254.16 111.932 246.014 117.381 231.004C121.836 218.734 127.743 211.415 137.081 202.535Z" fill="#C62030"/>
|
|
||||||
<path d="M433.626 276.713C436.295 283.545 429.011 311.688 426.338 319.3L423.263 314.499C418.739 307.62 417.734 299.885 416.829 291.86C421.148 285.628 427.379 280.866 433.626 276.713Z" fill="#C62030"/>
|
|
||||||
<path d="M415.252 318.362C415.842 319.528 416.172 320.983 416.362 322.268C418.555 337.098 415.762 345.071 407.054 356.974C399.111 367.831 388.597 376.413 375.127 378.576C378.135 374.81 384.689 370.215 388.465 366.233C391.093 363.46 398.83 352.512 400.929 351.734C402.429 352.657 401.8 352.56 403.377 352.601C410.444 346.511 413.078 327.399 415.252 318.362Z" fill="#C62030"/>
|
|
||||||
<path d="M451.979 95.8309C453.936 95.2029 456.08 95.6879 457.575 97.0969C459.071 98.5069 459.683 100.618 459.172 102.609C458.662 104.6 457.109 106.156 455.12 106.672C452.162 107.438 449.131 105.712 448.281 102.777C447.431 99.8429 449.069 96.7639 451.979 95.8309Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M80.154 112.87C82.928 111.59 86.214 112.814 87.475 115.596C88.737 118.379 87.492 121.657 84.701 122.9C81.936 124.132 78.695 122.901 77.445 120.144C76.195 117.387 77.405 114.138 80.154 112.87Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M499.254 323.257C501.215 322.358 503.532 323.226 504.419 325.192C505.305 327.158 504.423 329.469 502.451 330.344C500.497 331.211 498.21 330.338 497.331 328.389C496.452 326.44 497.311 324.148 499.254 323.257Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M416.619 257.375C417.828 256.815 419.246 256.962 420.315 257.757C421.384 258.553 421.932 259.869 421.744 261.188C421.556 262.506 420.661 263.617 419.413 264.081C417.582 264.763 415.54 263.876 414.789 262.072C414.038 260.269 414.846 258.195 416.619 257.375Z" fill="#C62030"/>
|
|
||||||
<path d="M37.985 322.801C39.73 321.843 41.921 322.477 42.885 324.219C43.848 325.961 43.22 328.154 41.481 329.123C39.734 330.096 37.53 329.465 36.562 327.715C35.595 325.965 36.233 323.763 37.985 322.801Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M113.417 289.288C115.078 288.358 117.178 288.926 118.142 290.567C119.107 292.208 118.583 294.319 116.962 295.318C115.883 295.983 114.53 296.012 113.423 295.395C112.316 294.778 111.63 293.611 111.629 292.344C111.627 291.076 112.311 289.908 113.417 289.288Z" fill="#C62030"/>
|
|
||||||
<path d="M35.89 417.228C36.968 416.654 38.272 416.705 39.303 417.362C40.333 418.018 40.93 419.179 40.864 420.399C40.799 421.619 40.082 422.709 38.988 423.253C37.329 424.076 35.316 423.414 34.469 421.767C33.622 420.12 34.255 418.098 35.89 417.228Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M498.395 417.31C500.048 416.626 501.943 417.404 502.638 419.052C503.333 420.701 502.568 422.601 500.924 423.307C499.265 424.02 497.342 423.246 496.641 421.582C495.939 419.918 496.726 418 498.395 417.31Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M379.857 52.7558C381.33 52.1078 383.054 52.7359 383.764 54.1819C384.473 55.6269 383.918 57.3749 382.503 58.1449C381.534 58.6719 380.354 58.6259 379.429 58.0239C378.504 57.4229 377.983 56.3629 378.073 55.2629C378.162 54.1629 378.847 53.2008 379.857 52.7558Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M163.85 478.38C164.904 478 166.083 478.244 166.9 479.011C167.717 479.778 168.035 480.939 167.722 482.015C167.41 483.092 166.52 483.902 165.419 484.112C163.891 484.404 162.396 483.471 161.985 481.971C161.574 480.471 162.386 478.907 163.85 478.38Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M375.001 478.816C376.512 478.301 378.155 479.103 378.679 480.612C379.203 482.12 378.411 483.768 376.907 484.301C375.389 484.839 373.723 484.039 373.194 482.517C372.666 480.996 373.476 479.335 375.001 478.816Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M142.124 53.2519C143.532 52.7199 145.107 53.4079 145.674 54.8029C146.241 56.1969 145.593 57.7889 144.213 58.3909C143.289 58.7929 142.22 58.6629 141.419 58.0509C140.619 57.4389 140.213 56.4409 140.359 55.4439C140.506 54.4469 141.181 53.6079 142.124 53.2519Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M474.436 130.344C475.717 129.545 477.403 129.923 478.22 131.193C479.036 132.463 478.681 134.153 477.423 134.987C476.593 135.537 475.532 135.598 474.645 135.147C473.757 134.695 473.182 133.8 473.139 132.806C473.096 131.811 473.592 130.871 474.436 130.344Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M40.965 194.671C41.803 194.296 42.777 194.403 43.513 194.951C44.25 195.499 44.632 196.402 44.514 197.312C44.395 198.221 43.794 198.996 42.943 199.337C41.662 199.85 40.206 199.244 39.667 197.974C39.129 196.703 39.706 195.235 40.965 194.671Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M65.597 146.733C66.886 146.252 68.323 146.894 68.823 148.175C69.324 149.457 68.702 150.903 67.428 151.422C66.587 151.765 65.627 151.628 64.915 151.064C64.204 150.5 63.851 149.597 63.992 148.7C64.133 147.803 64.746 147.051 65.597 146.733Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M305.74 120.247C306.457 119.799 307.363 119.783 308.096 120.204C308.829 120.626 309.27 121.417 309.244 122.262C309.217 123.107 308.728 123.869 307.97 124.244C306.875 124.785 305.548 124.373 304.953 123.306C304.358 122.24 304.704 120.894 305.74 120.247Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M329.206 124.846C330.445 124.661 331.6 125.508 331.797 126.745C331.993 127.981 331.157 129.145 329.923 129.353C328.671 129.564 327.488 128.714 327.289 127.461C327.09 126.208 327.951 125.033 329.206 124.846Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M110.366 75.3648C111.433 74.8778 112.695 75.2898 113.269 76.3118C113.842 77.3348 113.537 78.6258 112.565 79.2828C111.861 79.7588 110.949 79.7978 110.206 79.3848C109.464 78.9708 109.017 78.1748 109.051 77.3258C109.085 76.4758 109.593 75.7178 110.366 75.3648Z" fill="#DBDAD3"/>
|
|
||||||
<path d="M483.44 435.805C484.393 435.292 485.582 435.628 486.125 436.564C486.669 437.501 486.37 438.7 485.452 439.273C484.831 439.66 484.048 439.678 483.41 439.32C482.772 438.962 482.379 438.285 482.385 437.554C482.391 436.822 482.796 436.152 483.44 435.805Z" fill="#DBDAD3"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 19 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 8.3 KiB |
|
|
@ -2,13 +2,14 @@
|
||||||
<path d="M377.962 129.188C385.411 128.358 400.217 129.01 406.209 133.886C413.904 140.147 412.291 141.893 422.547 143.756C421.628 160.141 424.421 155.076 430.312 167.016C434.602 178.302 439.545 190.292 442.356 201.998C445.601 215.507 432.515 224.911 451.216 229.969C446.32 253.35 459.456 263.677 480.027 267.911C462.104 273.673 455.434 280.725 450.843 298.856C449.37 304.277 447.525 309.812 446.463 315.322C444.889 323.49 444.488 331.703 438.473 338.129C436.534 340.201 434.568 341.721 432.327 343.476C432.958 346.046 433.71 348.707 434.399 351.274C425.856 364.031 421.845 377.694 413.283 390.288C410.748 394.017 408.476 397.854 406.498 401.912C431.658 396.635 449.39 388.554 471.358 375.723C465.386 384.405 456.796 396.09 449.198 403.364C441.405 410.63 433.158 417.326 425.363 424.611C415.921 433.437 406.683 442.49 397.23 451.3C392.57 455.643 387.408 459.468 382.628 463.716C385.333 458.74 388.714 452.274 390.674 447.102C394.763 436.314 397.435 414.849 395.401 403.561C392.762 388.915 391.116 388.029 392.21 372.764C385.229 387.788 387.843 391.997 388.853 407.542C389.123 411.695 385.842 421.395 382.706 424.163C375.034 426.11 372.311 431.758 366.076 436.337C359.032 441.509 351.269 445.415 343.711 449.763C348.19 444.046 350.59 441.303 356.083 436.573C349.295 439.91 341.729 444.088 335.799 448.749C333.459 450.587 331.403 453.953 328.751 455.431C313.065 464.172 293.325 469.279 276.039 472.712C258.928 475.778 241.512 476.788 224.162 475.721C214.013 474.999 208.966 473.493 199.632 469.783C199.205 469.614 196.619 471.959 195.349 472.005C189.313 472.222 183.072 471.029 177.31 469.272C157.587 460.851 137.72 451.155 119.546 439.758C113.945 436.245 109.325 430.952 103.634 427.607C96.708 423.534 89.396 420.568 82.602 416.378C111.177 419.184 119.977 416.864 147.056 414.508C151.731 416.853 157.669 420.887 162.36 423.634C169.427 427.713 176.912 431.019 184.687 433.495C200.305 438.277 216.645 440.261 232.953 439.354C242.349 438.789 252.24 436.844 261.591 437.9C285.265 440.572 304.715 429.336 324.952 418.77L326.038 424.703C334.169 417.28 336.549 412.358 342.402 403.525C343.909 401.252 352.335 395.226 355.1 392.996C362.155 387.306 369.542 381.653 375.996 375.179C398.834 352.405 397.48 335.602 428.694 320.978C404.129 308.756 411.471 302.401 419.259 281.878C420.756 277.933 421.035 270.918 421.175 266.656C425.479 268.107 430.277 269.341 434.68 270.567C433.784 269.589 432.906 268.594 432.048 267.582C420.454 253.795 411.214 230.104 408.873 212.131C408.386 208.393 408.945 202.195 409.261 198.376C407.73 195.834 401.413 189.401 400.938 188.184C391.64 164.373 379.381 151.492 359.801 135.067C366.73 131.041 369.995 130.362 377.962 129.188Z" fill="#F7F2E8"/>
|
<path d="M377.962 129.188C385.411 128.358 400.217 129.01 406.209 133.886C413.904 140.147 412.291 141.893 422.547 143.756C421.628 160.141 424.421 155.076 430.312 167.016C434.602 178.302 439.545 190.292 442.356 201.998C445.601 215.507 432.515 224.911 451.216 229.969C446.32 253.35 459.456 263.677 480.027 267.911C462.104 273.673 455.434 280.725 450.843 298.856C449.37 304.277 447.525 309.812 446.463 315.322C444.889 323.49 444.488 331.703 438.473 338.129C436.534 340.201 434.568 341.721 432.327 343.476C432.958 346.046 433.71 348.707 434.399 351.274C425.856 364.031 421.845 377.694 413.283 390.288C410.748 394.017 408.476 397.854 406.498 401.912C431.658 396.635 449.39 388.554 471.358 375.723C465.386 384.405 456.796 396.09 449.198 403.364C441.405 410.63 433.158 417.326 425.363 424.611C415.921 433.437 406.683 442.49 397.23 451.3C392.57 455.643 387.408 459.468 382.628 463.716C385.333 458.74 388.714 452.274 390.674 447.102C394.763 436.314 397.435 414.849 395.401 403.561C392.762 388.915 391.116 388.029 392.21 372.764C385.229 387.788 387.843 391.997 388.853 407.542C389.123 411.695 385.842 421.395 382.706 424.163C375.034 426.11 372.311 431.758 366.076 436.337C359.032 441.509 351.269 445.415 343.711 449.763C348.19 444.046 350.59 441.303 356.083 436.573C349.295 439.91 341.729 444.088 335.799 448.749C333.459 450.587 331.403 453.953 328.751 455.431C313.065 464.172 293.325 469.279 276.039 472.712C258.928 475.778 241.512 476.788 224.162 475.721C214.013 474.999 208.966 473.493 199.632 469.783C199.205 469.614 196.619 471.959 195.349 472.005C189.313 472.222 183.072 471.029 177.31 469.272C157.587 460.851 137.72 451.155 119.546 439.758C113.945 436.245 109.325 430.952 103.634 427.607C96.708 423.534 89.396 420.568 82.602 416.378C111.177 419.184 119.977 416.864 147.056 414.508C151.731 416.853 157.669 420.887 162.36 423.634C169.427 427.713 176.912 431.019 184.687 433.495C200.305 438.277 216.645 440.261 232.953 439.354C242.349 438.789 252.24 436.844 261.591 437.9C285.265 440.572 304.715 429.336 324.952 418.77L326.038 424.703C334.169 417.28 336.549 412.358 342.402 403.525C343.909 401.252 352.335 395.226 355.1 392.996C362.155 387.306 369.542 381.653 375.996 375.179C398.834 352.405 397.48 335.602 428.694 320.978C404.129 308.756 411.471 302.401 419.259 281.878C420.756 277.933 421.035 270.918 421.175 266.656C425.479 268.107 430.277 269.341 434.68 270.567C433.784 269.589 432.906 268.594 432.048 267.582C420.454 253.795 411.214 230.104 408.873 212.131C408.386 208.393 408.945 202.195 409.261 198.376C407.73 195.834 401.413 189.401 400.938 188.184C391.64 164.373 379.381 151.492 359.801 135.067C366.73 131.041 369.995 130.362 377.962 129.188Z" fill="#F7F2E8"/>
|
||||||
<path d="M233.09 0.233836C239.92 -0.550164 246.953 0.807827 253.728 1.79283C242.942 6.95983 233.51 9.77284 224.799 18.6518C211.193 32.4778 203.036 52.4348 202.226 71.7428C201.701 84.2438 204.18 95.4258 200.525 107.755C196.896 119.993 189.464 128.06 180.664 136.796C185.966 124.088 187.51 119.167 186.617 105.616C182.859 115.368 178.414 122.814 167.981 126.433C168.108 123.403 169.119 115.356 167.05 113.39C166.027 113.655 165.24 114.297 164.658 115.17C159.014 123.635 153.833 131.929 147.055 139.629C136.807 151.126 123.274 158.896 111.837 169.138C100.722 179.091 93.941 190.385 85.782 202.569C82.658 207.234 77.789 211.293 75.204 216.478C72.024 222.859 71.583 230.133 68.559 236.545C66.751 240.277 61.259 244.21 59.499 248.4C55.219 258.59 60.558 261.489 63.887 269.894C66.696 276.986 63.132 283.023 60.034 289.207C76.493 302.204 62.469 320.543 76.305 335.334C81.966 341.385 86.628 351.947 90.994 359.408C102.636 379.306 117.441 392.376 135.358 406.178C126.656 409.773 108.823 415.301 99.721 413.476C93.64 412.257 91.358 409.007 88.226 404.357C62.442 400.535 75.754 422.835 81.118 436.794C84.956 446.781 90.972 457.846 95.633 467.627C80.875 455.728 70.339 442.378 56.494 429.717C50.004 423.783 43.833 417.666 37.704 411.363C27.601 401.183 17.367 387.401 9.07001 375.795C14.478 378.808 19.28 382.412 25.181 385.498C40.18 393.343 54.036 396.27 70.312 399.064C56.907 383.747 49.129 368.374 41.22 349.856L47.14 353.238C43.236 345.434 37.962 336.712 34.82 328.753C35.195 326.153 36.024 322.598 36.57 319.944C35.051 317.799 29.407 310.199 28.567 308.256C25.684 301.589 25.272 293.991 22.384 286.725C17.915 275.48 10.472 271.542 0 266.979C19.649 264.03 34.605 247.297 29.595 226.935C33.332 225.178 37.073 223.071 40.714 221.095C39.847 217.611 37.029 209.094 35.714 205.857C27.59 185.845 47.007 178.747 53.997 164.814C57.965 156.907 58.542 143.283 64.029 133.218C75.733 111.748 92.948 94.1708 114.612 82.5658C121.073 79.1048 127.964 76.8178 134.758 74.5428C128.397 79.4308 122.414 84.7938 116.86 90.5838C106.665 101.327 98.586 114.076 98.795 129.561C98.85 133.652 100.296 136.776 103.338 139.452C105.443 141.303 108.883 142.651 111.712 142.052C129.245 138.335 145.112 109.966 151.098 94.9598C152.793 90.7118 154.446 79.3968 155.078 74.9898C157.244 59.8748 162.929 46.7948 172.274 34.7808C187.043 15.5188 208.981 3.05584 233.09 0.233836Z" fill="#F7F2E8"/>
|
<path d="M233.09 0.233836C239.92 -0.550164 246.953 0.807827 253.728 1.79283C242.942 6.95983 233.51 9.77284 224.799 18.6518C211.193 32.4778 203.036 52.4348 202.226 71.7428C201.701 84.2438 204.18 95.4258 200.525 107.755C196.896 119.993 189.464 128.06 180.664 136.796C185.966 124.088 187.51 119.167 186.617 105.616C182.859 115.368 178.414 122.814 167.981 126.433C168.108 123.403 169.119 115.356 167.05 113.39C166.027 113.655 165.24 114.297 164.658 115.17C159.014 123.635 153.833 131.929 147.055 139.629C136.807 151.126 123.274 158.896 111.837 169.138C100.722 179.091 93.941 190.385 85.782 202.569C82.658 207.234 77.789 211.293 75.204 216.478C72.024 222.859 71.583 230.133 68.559 236.545C66.751 240.277 61.259 244.21 59.499 248.4C55.219 258.59 60.558 261.489 63.887 269.894C66.696 276.986 63.132 283.023 60.034 289.207C76.493 302.204 62.469 320.543 76.305 335.334C81.966 341.385 86.628 351.947 90.994 359.408C102.636 379.306 117.441 392.376 135.358 406.178C126.656 409.773 108.823 415.301 99.721 413.476C93.64 412.257 91.358 409.007 88.226 404.357C62.442 400.535 75.754 422.835 81.118 436.794C84.956 446.781 90.972 457.846 95.633 467.627C80.875 455.728 70.339 442.378 56.494 429.717C50.004 423.783 43.833 417.666 37.704 411.363C27.601 401.183 17.367 387.401 9.07001 375.795C14.478 378.808 19.28 382.412 25.181 385.498C40.18 393.343 54.036 396.27 70.312 399.064C56.907 383.747 49.129 368.374 41.22 349.856L47.14 353.238C43.236 345.434 37.962 336.712 34.82 328.753C35.195 326.153 36.024 322.598 36.57 319.944C35.051 317.799 29.407 310.199 28.567 308.256C25.684 301.589 25.272 293.991 22.384 286.725C17.915 275.48 10.472 271.542 0 266.979C19.649 264.03 34.605 247.297 29.595 226.935C33.332 225.178 37.073 223.071 40.714 221.095C39.847 217.611 37.029 209.094 35.714 205.857C27.59 185.845 47.007 178.747 53.997 164.814C57.965 156.907 58.542 143.283 64.029 133.218C75.733 111.748 92.948 94.1708 114.612 82.5658C121.073 79.1048 127.964 76.8178 134.758 74.5428C128.397 79.4308 122.414 84.7938 116.86 90.5838C106.665 101.327 98.586 114.076 98.795 129.561C98.85 133.652 100.296 136.776 103.338 139.452C105.443 141.303 108.883 142.651 111.712 142.052C129.245 138.335 145.112 109.966 151.098 94.9598C152.793 90.7118 154.446 79.3968 155.078 74.9898C157.244 59.8748 162.929 46.7948 172.274 34.7808C187.043 15.5188 208.981 3.05584 233.09 0.233836Z" fill="#F7F2E8"/>
|
||||||
<path d="M302.906 63.3759C324.544 68.7329 347.484 77.6769 366.374 89.6779C371.294 92.9379 375.736 97.3269 380.765 100.384C388.39 105.019 396.29 109.134 403.262 114.779C406.793 117.638 407.973 119.451 409.903 123.422C397.077 121.539 390.051 121.087 377.302 121.153C369.465 121.675 362.223 123.046 354.485 123.814C343.82 124.873 330.679 117.679 321.338 112.932C317.886 111.178 314.245 105.6 309.246 103.579C303.405 101.217 298.13 102.173 292.824 100.863C285.99 99.1749 278.719 96.9778 271.835 95.1358C276.31 90.4778 281.356 86.0619 285.853 81.4429C291.603 75.5379 297.278 69.4059 302.906 63.3759Z" fill="#F7F2E8"/>
|
<path d="M302.906 63.3759C324.544 68.7329 347.484 77.6769 366.374 89.6779C371.294 92.9379 375.736 97.3269 380.765 100.384C388.39 105.019 396.29 109.134 403.262 114.779C406.793 117.638 407.973 119.451 409.903 123.422C397.077 121.539 390.051 121.087 377.302 121.153C369.465 121.675 362.223 123.046 354.485 123.814C343.82 124.873 330.679 117.679 321.338 112.932C317.886 111.178 314.245 105.6 309.246 103.579C303.405 101.217 298.13 102.173 292.824 100.863C285.99 99.1749 278.719 96.9778 271.835 95.1358C276.31 90.4778 281.356 86.0619 285.853 81.4429C291.603 75.5379 297.278 69.4059 302.906 63.3759Z" fill="#F7F2E8"/>
|
||||||
<path d="M287.056 10.4429C288.037 11.3969 287.52 13.4899 287.303 14.7619C281.065 51.3959 257.636 83.0359 227.436 104.285C229.836 97.4399 234.914 87.3949 238.097 80.8129C246.617 64.7889 256.313 49.4179 267.106 34.8279C255.57 38.1369 251.519 39.9349 241.219 45.5469C241.084 44.2189 240.834 40.9859 240.922 39.8279C241.384 33.7359 256.869 29.2769 262.106 27.1309C265.158 25.8869 268.112 24.4149 270.943 22.7289C276.714 19.2989 281.887 14.7429 287.056 10.4429Z" fill="#C62030"/>
|
<path d="M287.056 10.4429C288.037 11.3969 287.52 13.4899 287.303 14.7619C281.065 51.3959 257.636 83.0359 227.436 104.285C229.836 97.4399 234.914 87.3949 238.097 80.8129C246.617 64.7889 256.313 49.4179 267.106 34.8279C255.57 38.1369 251.519 39.9349 241.219 45.5469C241.084 44.2189 240.834 40.9859 240.922 39.8279C241.384 33.7359 256.869 29.2769 262.106 27.1309C265.158 25.8869 268.112 24.4149 270.943 22.7289C276.714 19.2989 281.887 14.7429 287.056 10.4429Z" fill="#F04A36"/>
|
||||||
<path d="M313.295 127.731C326.3 130.726 350.649 145.122 360.516 154.765C365.829 159.957 371.104 168.71 370.706 176.294C370.577 178.752 370.194 182.806 368.312 184.636C367.044 180.931 366.414 178.883 364.518 175.496C355.642 160.155 347.281 153.013 331.484 146.495C333.699 151.229 335.938 154.654 338.913 158.906C328.23 151.42 319.031 139.345 313.295 127.731Z" fill="#F04A36"/>
|
<path d="M117 197.726C123.052 185.832 142.911 165.689 154.655 158.448C160.978 154.549 170.747 151.548 178.009 153.769C180.363 154.489 184.204 155.841 185.525 158.11C181.623 158.444 179.483 158.56 175.738 159.58C158.706 164.481 149.753 170.866 139.607 184.617C144.736 183.613 148.601 182.269 153.447 180.411C143.598 188.966 129.657 194.97 117 197.726Z" fill="#E23A32"/>
|
||||||
<path d="M135.504 384.543C139.568 385.886 150.072 391.509 155.134 393.578C175.841 402.041 194.371 406.735 216.5 409.936C212.334 411.154 207.55 412.128 203.279 413.095C200.573 413.511 197.76 414.362 195.1 415.079L200.952 420.249C196.758 419.368 192.594 418.351 188.466 417.199C171.288 412.324 144.646 400.866 135.504 384.543Z" fill="#C62030"/>
|
<path d="M313.295 127.731C326.3 130.726 350.649 145.122 360.516 154.765C365.829 159.957 371.104 168.71 370.706 176.294C370.577 178.752 370.194 182.806 368.312 184.636C367.044 180.931 366.414 178.883 364.518 175.496C355.642 160.155 347.281 153.013 331.484 146.495C333.699 151.229 335.938 154.654 338.913 158.906C328.23 151.42 319.031 139.345 313.295 127.731Z" fill="#C62030"/>
|
||||||
<path d="M377.687 183.898C379.552 185.267 383.983 192.853 385.126 195.036C395.247 214.352 398.461 234.795 400.779 256.162C398.497 253.472 395.878 249.815 393.705 246.951C383.873 232.804 380.907 227.958 377.006 211.575L385.181 220.88C383.437 211.047 378.321 192.628 377.687 183.898Z" fill="#F04A36"/>
|
<path d="M137.214 381.081C141.146 382.773 151.12 389.29 155.982 391.793C175.873 402.028 193.923 408.319 215.689 413.437C211.432 414.287 206.582 414.84 202.243 415.432C199.511 415.61 196.634 416.213 193.922 416.695L199.301 422.355C195.2 421.112 191.14 419.736 187.128 418.229C170.441 411.875 144.899 398.139 137.214 381.081Z" fill="#C62030"/>
|
||||||
|
<path d="M377.687 183.898C379.552 185.267 383.983 192.853 385.126 195.036C395.247 214.352 398.461 234.795 400.779 256.162C398.497 253.472 395.878 249.815 393.705 246.951C383.873 232.804 380.907 227.958 377.006 211.575L385.181 220.88C383.437 211.047 378.321 192.628 377.687 183.898Z" fill="#C62030"/>
|
||||||
<path d="M328.964 392.524L329.393 393.126C305.874 418.773 283.705 424.874 249.834 422.345C252.977 420.089 273.915 414.168 279.126 412.07C286.096 409.597 292.775 406.338 299.75 403.895C301.091 403.425 302.054 404.213 303.239 404.853C308.169 404.855 323.67 395.351 328.964 392.524Z" fill="#C62030"/>
|
<path d="M328.964 392.524L329.393 393.126C305.874 418.773 283.705 424.874 249.834 422.345C252.977 420.089 273.915 414.168 279.126 412.07C286.096 409.597 292.775 406.338 299.75 403.895C301.091 403.425 302.054 404.213 303.239 404.853C308.169 404.855 323.67 395.351 328.964 392.524Z" fill="#C62030"/>
|
||||||
<path d="M90.246 298C92.786 299.846 95.633 310.986 97.042 314.645C103.097 330.367 111.323 347.35 119.659 361.921C114.567 358.33 111.052 355.072 106.72 350.613C95.59 338.8 86.954 325.256 82 309.696L93.363 324.312C91.611 315.192 89.999 307.351 90.246 298Z" fill="#C62030"/>
|
<path d="M90.246 298C92.786 299.846 95.633 310.986 97.042 314.645C103.097 330.367 111.323 347.35 119.659 361.921C114.567 358.33 111.052 355.072 106.72 350.613C95.59 338.8 86.954 325.256 82 309.696L93.363 324.312C91.611 315.192 89.999 307.351 90.246 298Z" fill="#E23A32"/>
|
||||||
<path d="M105.051 202.535L105.305 202.827C105.237 206.488 93.189 225.359 91.587 234.04C93.139 235.388 93.534 233.475 95.311 234.764C94.858 240.699 92.687 246.476 91.678 252.249C90.789 257.34 90.215 262.897 89.535 268.059L88.965 268.208C82.262 254.16 79.902 246.014 85.351 231.004C89.806 218.734 95.713 211.415 105.051 202.535Z" fill="#C62030"/>
|
<path d="M104.719 211L104.973 211.292C104.905 214.953 92.8572 233.824 91.2552 242.505C92.8072 243.853 93.2022 241.94 94.9792 243.229C94.5262 249.164 92.3552 254.941 91.3462 260.714C90.4572 265.805 89.8832 271.362 89.2032 276.524L88.6332 276.673C81.9302 262.625 79.5702 254.479 85.0192 239.469C89.4742 227.199 95.3812 219.88 104.719 211Z" fill="#E23A32"/>
|
||||||
<path d="M401.596 276.713C404.265 283.545 396.981 311.688 394.308 319.3L391.233 314.499C386.709 307.62 385.704 299.885 384.799 291.86C389.118 285.628 395.349 280.866 401.596 276.713Z" fill="#E23A32"/>
|
<path d="M401.596 276.713C404.265 283.545 396.981 311.688 394.308 319.3L391.233 314.499C386.709 307.62 385.704 299.885 384.799 291.86C389.118 285.628 395.349 280.866 401.596 276.713Z" fill="#C62030"/>
|
||||||
<path d="M383.222 318.362C383.812 319.528 384.142 320.983 384.332 322.268C386.525 337.098 383.732 345.071 375.024 356.974C367.081 367.831 356.567 376.413 343.097 378.576C346.105 374.81 352.659 370.215 356.435 366.233C359.063 363.46 366.8 352.512 368.899 351.734C370.399 352.657 369.77 352.56 371.347 352.601C378.414 346.511 381.048 327.399 383.222 318.362Z" fill="#E23A32"/>
|
<path d="M383.222 318.362C383.812 319.528 384.142 320.983 384.332 322.268C386.525 337.098 383.732 345.071 375.024 356.974C367.081 367.831 356.567 376.413 343.097 378.576C346.105 374.81 352.659 370.215 356.435 366.233C359.063 363.46 366.8 352.512 368.899 351.734C370.399 352.657 369.77 352.56 371.347 352.601C378.414 346.511 381.048 327.399 383.222 318.362Z" fill="#C62030"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.9 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 8.3 KiB |
|
|
@ -1,64 +1,119 @@
|
||||||
|
{% from "partials/_brand.html" import mark %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="dark">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>
|
<title>
|
||||||
{% block title %}Firebreak{% endblock %}
|
{% block title %}Firebreak{% endblock %}
|
||||||
</title>
|
</title>
|
||||||
|
<link rel="preconnect" href="https://unpkg.com" />
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
||||||
rel="stylesheet" />
|
rel="stylesheet" />
|
||||||
<link rel="stylesheet" href="/static/css/output.css" />
|
<link rel="stylesheet" href="/static/css/output.css" />
|
||||||
<script src="https://unpkg.com/htmx.org@2"></script>
|
<script src="https://unpkg.com/htmx.org@2"></script>
|
||||||
|
<script defer
|
||||||
|
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="min-h-screen bg-background text-sm text-foreground antialiased {% block body_class %}{% endblock %}">
|
<body class="min-h-dvh flex flex-col bg-background text-sm text-foreground antialiased {% block body_class %}{% endblock %}">
|
||||||
<header class="app-header">
|
<header class="sticky top-0 z-50 border-b border-border bg-header text-header-foreground {% block header_class %}{% endblock %}">
|
||||||
<div class="flex items-center justify-between px-4 py-3 mx-auto max-w-7xl sm:px-8">
|
<div class="mx-auto flex w-full max-w-5xl items-center justify-between gap-5 px-4 py-3 sm:px-8">
|
||||||
<a href="/"
|
<a href="/"
|
||||||
class="brand-link flex items-center gap-2 text-base text-foreground hover:text-primary"
|
class="flex shrink-0 items-center gap-2.5 text-foreground"
|
||||||
aria-label="Firebreak home">
|
aria-label="Firebreak home">
|
||||||
<svg width="28"
|
{{ mark("size-7 shrink-0") }}
|
||||||
height="30"
|
<span class="text-base font-semibold">Firebreak</span>
|
||||||
viewBox="0 0 28 30"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M21.5596 8.01157C21.9844 7.96011 22.829 8.0003 23.1709 8.30259C23.6097 8.69079 23.5179 8.79938 24.1025 8.91489C24.0501 9.93095 24.2099 9.61686 24.5459 10.3573C24.7906 11.0572 25.0721 11.8012 25.2324 12.5272C25.4173 13.3648 24.6717 13.9479 25.7383 14.2616C25.4591 15.7115 26.2085 16.3515 27.3818 16.6141C26.3596 16.9714 25.9787 17.4089 25.7168 18.5331C25.6328 18.8692 25.5274 19.2128 25.4668 19.5545C25.377 20.0609 25.3545 20.5702 25.0117 20.9686C24.9012 21.097 24.7889 21.1919 24.6611 21.3006C24.6971 21.46 24.74 21.6249 24.7793 21.784C24.292 22.5752 24.0626 23.4229 23.5742 24.204C23.4297 24.4351 23.3003 24.6731 23.1875 24.9247C24.6225 24.5974 25.6338 24.0962 26.8867 23.3006C26.5461 23.839 26.0563 24.5635 25.623 25.0145C25.1786 25.465 24.7082 25.8802 24.2637 26.3319C23.7252 26.8791 23.1983 27.4409 22.6592 27.9872C22.3934 28.2565 22.0988 28.4942 21.8262 28.7577C21.9804 28.4492 22.1733 28.0481 22.2852 27.7274C22.5183 27.0585 22.6706 25.7273 22.5547 25.0272C22.4042 24.119 22.3097 24.0636 22.3721 23.117C21.9741 24.0484 22.123 24.3097 22.1807 25.2733C22.1961 25.5308 22.009 26.1329 21.8301 26.3045C21.3927 26.4253 21.2374 26.7755 20.8818 27.0594C20.4801 27.3801 20.0375 27.6228 19.6064 27.8924C19.8619 27.5379 19.9983 27.3673 20.3115 27.0741C19.9244 27.281 19.4925 27.5399 19.1543 27.829C19.0209 27.943 18.9042 28.1524 18.7529 28.244C17.8582 28.786 16.7321 29.1024 15.7461 29.3153C14.7702 29.5054 13.7767 29.5679 12.7871 29.5018C12.2082 29.457 11.9201 29.3637 11.3877 29.1336C11.3634 29.1232 11.2161 29.2681 11.1436 29.2713C10.7993 29.2848 10.4429 29.2104 10.1143 29.1014C8.98932 28.5792 7.85592 27.9781 6.81934 27.2713C6.50006 27.0536 6.23649 26.7258 5.91211 26.5184C5.51707 26.2658 5.09943 26.0819 4.71191 25.8221C6.34186 25.9961 6.84406 25.852 8.38867 25.7059C8.65531 25.8513 8.99419 26.101 9.26172 26.2713C9.66483 26.5243 10.0917 26.7301 10.5352 26.8836C11.4259 27.1801 12.358 27.3031 13.2881 27.2469C13.824 27.2119 14.3885 27.0906 14.9219 27.1561C16.2722 27.3218 17.3818 26.6248 18.5361 25.9696L18.5977 26.3377C19.0615 25.8774 19.1974 25.5721 19.5312 25.0243C19.6175 24.8832 20.0982 24.5102 20.2559 24.3719C20.6583 24.0191 21.0791 23.6679 21.4473 23.2665C22.7499 21.8542 22.6729 20.812 24.4531 19.9051C23.0524 19.1473 23.4708 18.7529 23.915 17.4803C24.0003 17.2358 24.0164 16.8013 24.0244 16.537C24.2699 16.6269 24.5438 16.7031 24.7949 16.7792C24.7438 16.7185 24.6935 16.6564 24.6445 16.5936C23.9833 15.7385 23.4568 14.2696 23.3232 13.1551C23.2955 12.9235 23.3267 12.5395 23.3447 12.3026C23.2574 12.1449 22.8972 11.7452 22.8701 11.6698C22.3398 10.1933 21.6402 9.39436 20.5234 8.37583C20.9186 8.12619 21.1053 8.08436 21.5596 8.01157Z" fill="#C62030" />
|
|
||||||
<path d="M13.2959 0.0145017C13.6855 -0.0341185 14.0872 0.0500961 14.4736 0.111181C13.8585 0.431567 13.3201 0.605665 12.8232 1.1561C12.0471 2.01353 11.5814 3.25168 11.5352 4.44907C11.5052 5.22427 11.6469 5.91793 11.4385 6.68247C11.2315 7.44129 10.8076 7.94154 10.3057 8.48325C10.6081 7.69518 10.6964 7.38997 10.6455 6.54966C10.4311 7.15443 10.1771 7.61624 9.58203 7.84067C9.58927 7.65292 9.64694 7.15451 9.5293 7.03208C9.47094 7.04851 9.42578 7.08829 9.39258 7.14243C9.07071 7.6673 8.77523 8.1816 8.38867 8.65903C7.80412 9.37201 7.03225 9.85396 6.37988 10.4891C5.74587 11.1064 5.35895 11.8068 4.89355 12.5624C4.71537 12.8516 4.43748 13.1032 4.29004 13.4247C4.10871 13.8203 4.08348 14.2712 3.91113 14.6688C3.80804 14.9001 3.49506 15.1444 3.39453 15.4042C3.15043 16.036 3.45464 16.2161 3.64453 16.7372C3.80476 17.177 3.60152 17.5519 3.4248 17.9354C4.36334 18.7414 3.56357 19.8786 4.35254 20.7958C4.67545 21.171 4.94139 21.8262 5.19043 22.2889C5.8545 23.5229 6.6997 24.3334 7.72168 25.1893C7.22531 25.4123 6.20766 25.7546 5.68848 25.6415C5.34174 25.5658 5.21182 25.3643 5.0332 25.076C3.56246 24.839 4.32196 26.2221 4.62793 27.0877C4.84684 27.707 5.18924 28.3934 5.45508 28.9999C4.6134 28.262 4.01229 27.4344 3.22266 26.6493C2.8525 26.2813 2.50094 25.9014 2.15137 25.5106C1.57508 24.8793 0.990847 24.0243 0.517578 23.3045C0.826056 23.4914 1.09992 23.7157 1.43652 23.9071C2.29197 24.3935 3.08249 24.5746 4.01074 24.7479C3.24619 23.7981 2.80267 22.8445 2.35156 21.6961L2.68945 21.9061C2.46677 21.4221 2.16555 20.8811 1.98633 20.3875C2.0077 20.2265 2.05479 20.0062 2.08594 19.8417C1.99929 19.7086 1.6778 19.2366 1.62988 19.1161C1.46554 18.7027 1.44204 18.2316 1.27734 17.7811C1.02243 17.0837 0.597331 16.8395 0 16.5565C1.1208 16.3736 1.97425 15.3359 1.68848 14.0731C1.90163 13.9641 2.11556 13.8333 2.32324 13.7108C2.27375 13.4947 2.11213 12.9673 2.03711 12.7665C1.57371 11.5254 2.68136 11.0846 3.08008 10.2206C3.30636 9.73027 3.33952 8.8857 3.65234 8.26157C4.31995 6.9301 5.30235 5.83966 6.53809 5.11997C6.90658 4.90538 7.30002 4.76397 7.6875 4.6229C7.32469 4.92601 6.9828 5.25801 6.66602 5.61704C6.08448 6.28327 5.62382 7.0747 5.63574 8.03501C5.63897 8.28848 5.72113 8.48244 5.89453 8.64829C6.0146 8.76308 6.21168 8.84657 6.37305 8.80942C7.37298 8.57853 8.27774 6.819 8.61914 5.88853C8.7158 5.62493 8.81064 4.92348 8.84668 4.65024C8.97023 3.71302 9.29421 2.90205 9.82715 2.15708C10.6695 0.962598 11.9208 0.189561 13.2959 0.0145017Z" fill="#C62030" />
|
|
||||||
<path d="M18.7891 24.3797C17.4476 25.9701 16.1829 26.3481 14.251 26.1913C14.4305 26.0513 15.6244 25.6847 15.9219 25.5545C16.3195 25.4012 16.7008 25.1992 17.0986 25.0477C17.1751 25.0186 17.2303 25.0676 17.2979 25.1073C17.5794 25.1068 18.4626 24.518 18.7646 24.3426L18.7891 24.3797Z" fill="#C62030" />
|
|
||||||
<path d="M7.72949 23.8475C7.96131 23.9308 8.56087 24.2797 8.84961 24.4081C10.0306 24.9328 11.0876 25.2232 12.3496 25.4217C12.112 25.4973 11.8393 25.5581 11.5957 25.618C11.4414 25.6438 11.2806 25.6966 11.1289 25.7411L11.4629 26.0614C11.2238 26.0068 10.9863 25.9443 10.751 25.8729C9.77113 25.5706 8.25097 24.8598 7.72949 23.8475Z" fill="#C62030" />
|
|
||||||
<path d="M21.8594 19.743C21.893 19.8153 21.912 19.9056 21.9229 19.9852C22.0479 20.9048 21.8891 21.3995 21.3926 22.1375C20.9396 22.8108 20.3395 23.3432 19.5713 23.4774C19.7429 23.2439 20.1167 22.9587 20.332 22.7118C20.4821 22.5395 20.9233 21.8606 21.043 21.8124C21.1285 21.8696 21.0927 21.8635 21.1826 21.8661C21.5855 21.488 21.7354 20.3033 21.8594 19.743Z" fill="#C62030" />
|
|
||||||
<path d="M5.36621 19.0877C5.51104 19.2022 5.6735 19.8928 5.75391 20.12C6.09929 21.095 6.56845 22.149 7.04395 23.0526C6.75349 22.8299 6.55277 22.627 6.30566 22.3504C5.67096 21.6179 5.17804 20.7781 4.89551 19.8133L5.54395 20.7196C5.44402 20.1541 5.35212 19.6676 5.36621 19.0877Z" fill="#C62030" />
|
|
||||||
<path d="M22.9082 17.16C23.0604 17.5837 22.6447 19.3295 22.4922 19.8016L22.3164 19.5038C22.0584 19.0772 22.0018 18.5971 21.9502 18.0995C22.1965 17.7131 22.552 17.4175 22.9082 17.16Z" fill="#C62030" />
|
|
||||||
<path d="M6.00684 12.578C6.00296 12.805 5.31622 13.975 5.22461 14.5135C5.31314 14.5971 5.33614 14.4785 5.4375 14.5584C5.41166 14.9265 5.28705 15.2854 5.22949 15.6434C5.17881 15.959 5.1462 16.3039 5.10742 16.6239L5.0752 16.6327C4.69292 15.7616 4.55847 15.2567 4.86914 14.326C5.1232 13.5653 5.45975 13.1109 5.99219 12.5604L6.00684 12.578Z" fill="#C62030" />
|
|
||||||
<path d="M21.5439 11.4042C21.6503 11.489 21.9034 11.9589 21.9688 12.0946C22.546 13.2924 22.7291 14.5606 22.8613 15.8856C22.7312 15.7188 22.5819 15.4919 22.458 15.3143C21.8972 14.4371 21.7274 14.1368 21.5049 13.1209L21.9717 13.6981C21.8722 13.0883 21.5801 11.9455 21.5439 11.4042Z" fill="#C62030" />
|
|
||||||
<path d="M17.8711 7.92075C18.6129 8.10648 20.0016 8.99949 20.5645 9.59751C20.8675 9.91944 21.1681 10.4622 21.1455 10.9325C21.1381 11.0849 21.1161 11.3366 21.0088 11.45C20.9365 11.2205 20.9009 11.0934 20.793 10.8836C20.2867 9.93226 19.8093 9.48903 18.9082 9.08481C19.0345 9.37833 19.1624 9.59074 19.332 9.85435C18.7228 9.39008 18.1982 8.64091 17.8711 7.92075Z" fill="#C62030" />
|
|
||||||
<path d="M17.2783 3.93052C18.5125 4.26272 19.821 4.81717 20.8984 5.56138C21.1791 5.76355 21.4329 6.03586 21.7197 6.22544C22.1546 6.51282 22.6053 6.768 23.0029 7.11802C23.2042 7.29526 23.2718 7.40794 23.3818 7.65415C22.6504 7.5374 22.2494 7.50944 21.5225 7.51353C21.0755 7.54589 20.6621 7.63093 20.2207 7.67856C19.6125 7.74422 18.8629 7.29815 18.3301 7.00376C18.1332 6.89498 17.9248 6.54901 17.6396 6.42368C17.3066 6.27732 17.0057 6.33596 16.7031 6.25474C16.3134 6.15006 15.8984 6.01348 15.5059 5.89927C15.7611 5.61047 16.0492 5.33701 16.3057 5.05063C16.6336 4.68454 16.9574 4.30436 17.2783 3.93052Z" fill="#C62030" />
|
|
||||||
<path d="M16.374 0.647314C16.4299 0.706385 16.4011 0.835973 16.3887 0.914892C16.0329 3.18667 14.6962 5.14888 12.9736 6.46665C13.1106 6.04216 13.4005 5.41964 13.582 5.01157C14.068 4.01794 14.6208 3.06473 15.2363 2.16001C14.5785 2.36517 14.3471 2.47613 13.7598 2.82407C13.7521 2.74152 13.7382 2.5413 13.7432 2.46958C13.7698 2.09189 14.6524 1.81555 14.9512 1.68247C15.1253 1.60532 15.2936 1.51359 15.4551 1.40903C15.7842 1.19636 16.0792 0.913941 16.374 0.647314Z" fill="#C62030" />
|
|
||||||
</svg>
|
|
||||||
<svg width="114"
|
|
||||||
height="20"
|
|
||||||
viewBox="0 0 114 20"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M48.4923 0.00654069C48.7964 0.29344 48.6961 6.65684 48.6961 7.49071C50.2534 6.30339 51.895 5.46624 53.9209 5.76604C58.4095 6.42994 60.7139 11.94 58.6683 15.8045C58.0278 17.0147 57.326 17.6839 56.2404 18.4738C53.6721 20.1022 51.1111 19.4924 48.8025 17.8218C48.8034 18.355 48.7475 18.7103 48.6785 19.2344C47.7436 19.2098 46.7779 19.236 45.8406 19.2489C45.7126 13.2211 45.9041 7.05515 45.8189 1.00077C46.6931 0.744994 47.6371 0.345046 48.4923 0.00654069ZM52.9146 16.6756C57.8541 15.5749 57.3784 7.91769 51.8855 8.52241C50.6155 9.01614 49.5609 9.64953 48.9885 10.9468C48.1112 12.9353 48.8851 15.5905 50.9929 16.3774C51.6077 16.6019 52.2607 16.7032 52.9146 16.6756Z" fill="#17191C" />
|
|
||||||
<path d="M76.8226 5.75962C80.0489 5.31401 83.0576 7.09296 84.0219 10.1995C84.4163 11.4694 84.3748 12.4398 84.3596 13.7414C80.941 13.7215 77.5221 13.7238 74.1037 13.7486C75.4274 17.3548 78.1492 17.4433 81.2002 15.9242C81.4652 15.7563 81.4957 15.712 81.8074 15.6479C82.5075 15.8554 82.7897 16.6307 83.1696 17.2987C80.9074 19.7749 76.5226 20.155 73.7851 18.2327C72.3282 17.1932 71.3488 15.6135 71.0655 13.8467C70.4268 9.84462 72.7816 6.42127 76.8226 5.75962ZM74.1074 11.3215C75.4407 11.3582 76.6649 11.3121 77.997 11.2656C78.971 11.2513 80.2058 11.2664 81.1547 11.1683C80.5244 9.30522 79.5775 8.1951 77.4552 8.32329C75.4301 8.7046 74.7647 9.38038 74.1074 11.3215Z" fill="#17191C" />
|
|
||||||
<path d="M91.1896 5.66801C93.7694 5.40445 96.8706 6.64052 97.2089 9.41204C97.5849 12.4901 97.3973 16.1187 97.3895 19.2428C96.5243 19.2313 95.3317 19.3387 94.5248 19.2174C94.3411 18.9973 94.4208 18.745 94.4224 18.3688L94.3254 18.2924C91.8248 19.5715 88.6988 20.3271 86.4134 17.8693C86.0444 17.4725 85.8724 17.0193 85.6662 16.5256C84.6361 11.2946 90.6401 10.6411 94.3569 11.1027C94.0411 6.83035 89.374 8.12642 87.0227 10.0053C86.6264 9.29286 86.2465 8.6609 85.8157 7.96792C87.716 6.51765 88.8034 5.96167 91.1896 5.66801ZM90.8283 17.0355C92.3019 17.0729 93.6162 16.5356 94.4704 15.303C94.4417 14.6145 94.4034 13.9156 94.4048 13.2271C93.7608 13.2624 93.2365 13.2644 92.5917 13.2562C91.3136 13.3097 89.9426 13.3043 88.999 14.3031C88.3494 14.9909 88.2427 15.884 89.0799 16.4609C89.634 16.8426 90.1761 16.9583 90.8283 17.0355Z" fill="#17191C" />
|
|
||||||
<path d="M35.9596 5.7504C36.3435 5.71272 36.7295 5.69981 37.1153 5.71189C39.9786 5.77844 42.3797 7.14864 43.2582 10.0054C43.6659 11.3309 43.6129 12.3284 43.5512 13.7066C40.4226 13.8522 36.6345 13.7555 33.4577 13.7516C33.5693 14.1477 33.7221 14.531 33.9134 14.8955C34.4126 15.8412 35.2862 16.5338 36.3212 16.8043C37.8863 17.1992 39.2701 16.6544 40.5749 15.8672C41.1823 15.4337 41.3855 15.4433 41.8405 16.0978C42.1137 16.491 42.3651 16.952 42.6164 17.3634C35.7824 23.0221 27.1676 16.343 31.5653 8.49222C32.4649 6.88612 34.2486 6.11266 35.9596 5.7504ZM33.3703 11.3667C34.6664 11.3522 36.0865 11.266 37.3478 11.2769C37.9324 11.2986 40.0022 11.4921 40.3704 11.1532C40.451 9.08425 38.2408 8.27536 36.4967 8.31919C34.5601 8.8467 34.0745 9.55463 33.3703 11.3667Z" fill="#17191C" />
|
|
||||||
<path d="M103.265 0C103.387 0.0110582 103.303 -0.00183904 103.508 0.080893C103.587 3.92179 103.554 7.87449 103.558 11.7215C105.153 10.0272 107.054 7.80241 108.616 6.04517C110.014 6.05336 111.411 6.04394 112.808 6.01691C111.063 7.88227 109.269 9.62866 107.448 11.418C109.046 13.5492 110.668 15.6613 112.316 17.7536C112.475 18.0143 113.157 18.8635 113.376 19.1514C112.16 19.1484 110.945 19.1842 109.731 19.2593C108.818 18.3108 106.229 14.8201 105.276 13.6053C104.712 14.1437 104.18 14.5719 103.574 15.0636C103.541 16.4403 103.57 17.9252 103.574 19.3101C102.637 19.2643 101.552 19.2962 100.605 19.3017C100.52 13.205 100.584 6.99843 100.568 0.887323C101.387 0.684793 102.449 0.282804 103.265 0Z" fill="#17191C" />
|
|
||||||
<path d="M0.00307161 1.11183C4.17121 1.21586 8.87403 1.10876 13.0846 1.12063C12.6459 2.06345 12.2986 2.99623 11.9271 3.96506C9.76893 3.77215 5.50987 3.89769 3.17515 3.90424L3.18252 8.69696C4.01455 8.68774 10.1181 8.60624 10.4412 8.79976L10.4228 9.13581C10.2917 9.92279 10.1304 10.7028 10.0007 11.4984C7.72377 11.4572 5.44639 11.4472 3.16921 11.4685L3.18416 19.2527L0 19.2473L0.00307161 1.11183Z" fill="#17191C" />
|
|
||||||
<path d="M64.3923 5.33318L64.4685 5.34813C64.755 5.64875 64.6461 7.54606 64.6377 8.07972C66.4217 6.45109 67.4104 6.24897 69.6858 5.59592C69.6653 6.56802 69.6864 7.60545 69.6888 8.58308C67.5241 9.20582 66.2084 9.53081 64.8248 11.3741L64.8166 14.1802L64.8214 19.1605C63.8089 19.1504 62.9251 19.1554 61.9075 19.2008C61.766 15.045 61.8516 10.4063 61.8434 6.22726C62.6834 5.90248 63.5335 5.60451 64.3923 5.33318Z" fill="#17191C" />
|
|
||||||
<path d="M23.7341 5.32638L23.8844 5.42939C23.9804 6.15862 23.9456 7.41802 23.9468 8.1921C25.9191 6.57125 26.6393 6.3462 29.0582 5.63192C29.0549 6.62081 29.0303 7.6308 29.1221 8.61355C26.9719 9.12694 25.7475 9.6518 24.2421 11.2485L24.2333 14.1801L24.2397 19.255L21.2468 19.2368C21.1901 14.9718 21.257 10.5305 21.2636 6.25548C22.1159 5.90387 22.8621 5.62741 23.7341 5.32638Z" fill="#17191C" />
|
|
||||||
<path d="M17.4168 5.56308L17.5198 5.59154C17.6766 5.90854 17.6146 18.0468 17.6146 19.2519L14.7405 19.2515C14.7274 19.2425 14.711 19.2372 14.7011 19.2247C14.3929 18.8321 14.5404 7.37457 14.5377 6.2108C15.5293 5.96444 16.408 5.7525 17.4168 5.56308Z" fill="#17191C" />
|
|
||||||
<path d="M15.4375 0.376667C16.1305 0.156321 16.8886 0.33039 17.4159 0.830877C17.9432 1.33157 18.1566 2.07943 17.9727 2.78306C17.7886 3.48648 17.2365 4.03428 16.5317 4.21265C15.4858 4.47722 14.4193 3.86267 14.1234 2.82545C13.8275 1.78823 14.4095 0.703499 15.4375 0.376667Z" fill="#17191C" />
|
|
||||||
</svg>
|
|
||||||
</a>
|
</a>
|
||||||
<nav class="flex items-center gap-2">
|
<nav class="flex min-w-0 flex-1 items-center gap-5"
|
||||||
|
aria-label="Primary navigation">
|
||||||
{% if user %}
|
{% if user %}
|
||||||
<a href="/dashboard" class="btn btn-sm btn-borderless">Dashboard</a>
|
<a href="/dashboard"
|
||||||
<a href="/settings" class="btn btn-sm btn-borderless">Settings</a>
|
class="btn-link"
|
||||||
<a href="/auth/logout" class="btn btn-sm btn-secondary">Logout</a>
|
{% if request.url.path == '/dashboard' %}aria-current="page"{% endif %}>Dashboard</a>
|
||||||
|
{% endif %}
|
||||||
|
</nav>
|
||||||
|
<div class="flex shrink-0 items-center">
|
||||||
|
{% if user %}
|
||||||
|
{% set account_name = user.display_name or user.email or "User" %}
|
||||||
|
<!-- Account Dropdown Menu -->
|
||||||
|
<div x-data="{
|
||||||
|
open: false,
|
||||||
|
close() {
|
||||||
|
this.open = false
|
||||||
|
},
|
||||||
|
toggle() {
|
||||||
|
this.open = !this.open
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
x-id="['dropdown-menu']"
|
||||||
|
@keydown.escape.prevent.stop="close(); $refs.trigger?.focus()"
|
||||||
|
@click.outside="close()"
|
||||||
|
class="group/account relative"
|
||||||
|
>
|
||||||
|
<!-- Button -->
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
x-ref="trigger"
|
||||||
|
@click="toggle()"
|
||||||
|
x-bind:aria-expanded="open"
|
||||||
|
x-bind:aria-controls="$id('dropdown-menu')"
|
||||||
|
class="group/account-toggle flex cursor-pointer items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
||||||
|
>
|
||||||
|
<span class="flex size-11 items-center justify-center rounded-full bg-secondary font-mono text-sm font-semibold text-header-foreground transition-colors group-hover/account-toggle:bg-secondary-hover"
|
||||||
|
x-bind:class="{ 'bg-secondary-hover': open }"
|
||||||
|
aria-hidden="true">{{ account_name[:1] | upper }}</span>
|
||||||
|
<span class="sr-only">Account menu</span>
|
||||||
|
</button>
|
||||||
|
<!-- Panel -->
|
||||||
|
<div
|
||||||
|
x-cloak
|
||||||
|
x-show="open"
|
||||||
|
x-transition.duration.150ms
|
||||||
|
x-bind:id="$id('dropdown-menu')"
|
||||||
|
class="absolute right-0 top-[calc(100%+0.75rem)] z-50 flex w-[min(20rem,calc(100vw-2rem))] origin-top-right flex-col overflow-hidden rounded-lg border border-border bg-card shadow-elevated"
|
||||||
|
>
|
||||||
|
<div class="border-b border-border px-4 py-3">
|
||||||
|
<p class="truncate text-sm font-semibold text-foreground">{{ account_name }}</p>
|
||||||
|
{% if user.email and user.email != account_name %}
|
||||||
|
<p class="mt-0.5 truncate text-xs text-muted-foreground">{{ user.email }}</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<a href="/settings"
|
||||||
|
class="flex items-center gap-2.5 border-l-2 border-transparent px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:border-ember hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card aria-[current=page]:border-ember aria-[current=page]:bg-muted aria-[current=page]:text-foreground"
|
||||||
|
{% if request.url.path == '/settings' %}aria-current="page"{% endif %}>
|
||||||
|
<svg class="status-icon"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
|
||||||
|
<circle cx="12" cy="12" r="3" />
|
||||||
|
</svg>
|
||||||
|
Settings
|
||||||
|
</a>
|
||||||
|
<a href="/auth/logout"
|
||||||
|
class="flex items-center gap-2.5 border-l-2 border-transparent px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:border-ember hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card aria-[current=page]:border-ember aria-[current=page]:bg-muted aria-[current=page]:text-foreground">
|
||||||
|
<svg class="status-icon"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="m16 17 5-5-5-5" />
|
||||||
|
<path d="M21 12H9" />
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
|
||||||
|
</svg>
|
||||||
|
Logout
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/auth/login/forgejo" class="btn btn-sm btn-primary">
|
<a href="/auth/login/forgejo" class="btn btn-sm btn-primary">
|
||||||
<img src="/static/img/forgejo-logo.svg"
|
<img src="/static/img/forgejo-logo.svg"
|
||||||
|
|
@ -67,14 +122,39 @@
|
||||||
height="16"
|
height="16"
|
||||||
class="size-4 shrink-0 brightness-0 invert"
|
class="size-4 shrink-0 brightness-0 invert"
|
||||||
aria-hidden="true" />
|
aria-hidden="true" />
|
||||||
<span>Sign in with Forgejo</span>
|
<span>Sign In with Forgejo</span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<main class="{% block main_class %}px-4 py-8 mx-auto max-w-7xl sm:px-8{% endblock %}">
|
<main id="main"
|
||||||
|
class="{% block main_class %}flex-1 w-full px-4 py-8 mx-auto max-w-5xl sm:px-8{% endblock %}">
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
|
{% if debug %}
|
||||||
|
<!-- Live reload for CSS changes (development only; gated on the debug flag) -->
|
||||||
|
<script>
|
||||||
|
let lastCssMtime = null;
|
||||||
|
|
||||||
|
async function checkForCssChanges() {
|
||||||
|
try {
|
||||||
|
const response = await fetch('/api/dev/css-mtime');
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
if (lastCssMtime === null) {
|
||||||
|
lastCssMtime = data.mtime;
|
||||||
|
} else if (data.mtime > lastCssMtime) {
|
||||||
|
lastCssMtime = data.mtime;
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// Endpoint unavailable — stop polling rather than spamming errors.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setInterval(checkForCssChanges, 1000);
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,70 +1,131 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}Dashboard — Firebreak{% endblock %}
|
{% block title %}Dashboard — Firebreak{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="flex flex-col gap-6">
|
<div class="flex flex-col gap-6 sm:gap-8">
|
||||||
<section class="flex flex-col justify-between gap-4 pb-6 border-b border-border sm:flex-row sm:items-end">
|
<section>
|
||||||
<div>
|
<h1 class="text-2xl font-semibold leading-tight text-foreground sm:text-3xl">
|
||||||
<h1 class="mt-2 text-3xl font-semibold leading-10 tracking-normal">Welcome,</h1>
|
Welcome, {{ user.display_name or user.email }}.
|
||||||
<p class=" text-2xl text-muted-foreground">{{ user.display_name or user.email }}.</p>
|
</h1>
|
||||||
</div>
|
<p class="mt-2 text-sm leading-7 text-muted-foreground sm:text-base">
|
||||||
{% if pat_registered %}
|
Private repository snapshots and access boundaries.
|
||||||
<a href="/links/create" class="btn btn-primary w-fit">Create share link</a>
|
</p>
|
||||||
{% else %}
|
<div class="firebreak-rule mt-6" aria-hidden="true"></div>
|
||||||
<span class="btn btn-primary w-fit opacity-50 pointer-events-none"
|
|
||||||
aria-disabled="true">Create share link</span>
|
|
||||||
{% endif %}
|
|
||||||
</section>
|
</section>
|
||||||
<section class="grid gap-4 md:grid-cols-3">
|
{% if not user.has_pat %}
|
||||||
<div class="p-4 card">
|
<div class="notice-rail">
|
||||||
<p class="section-header-subtle">Active links</p>
|
|
||||||
<p class="mt-3 text-2xl font-semibold text-foreground">0</p>
|
|
||||||
<p class="mt-2 text-xs text-muted-foreground">No repository snapshots published yet.</p>
|
|
||||||
</div>
|
|
||||||
<div class="p-4 card">
|
|
||||||
<p class="section-header-subtle">Default expiry</p>
|
|
||||||
<p class="mt-3 text-2xl font-semibold text-foreground">7 days</p>
|
|
||||||
<p class="mt-2 text-xs text-muted-foreground">Applied to newly created links.</p>
|
|
||||||
</div>
|
|
||||||
<div class="p-4 card">
|
|
||||||
<p class="section-header-subtle">Audit events</p>
|
|
||||||
<p class="mt-3 text-2xl font-semibold text-foreground">0</p>
|
|
||||||
<p class="mt-2 text-xs text-muted-foreground">Viewer activity will appear here.</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% if not pat_registered %}
|
|
||||||
<div class="rounded-lg border border-warning-muted bg-warning-muted/40 px-5 py-4">
|
|
||||||
<p class="text-sm font-semibold text-warning-foreground">Access token required</p>
|
<p class="text-sm font-semibold text-warning-foreground">Access token required</p>
|
||||||
<p class="mt-1 text-sm text-muted-foreground">
|
<p class="mt-1 text-sm leading-6 text-muted-foreground">
|
||||||
Register a Forgejo access token to create share links.
|
Register a Forgejo access token to fetch repositories and create share links.
|
||||||
</p>
|
</p>
|
||||||
<a href="/settings" class="btn btn-sm btn-primary mt-3 w-fit">Go to Settings</a>
|
<a href="/settings" class="mt-3 w-fit btn-link">Go to Settings</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="space-y-3">
|
{% if user.has_pat %}
|
||||||
<div>
|
{# min-h reserves the swapped-in table's space so content below doesn't jump (CLS) #}
|
||||||
<h2 class="text-base font-semibold">Share links</h2>
|
<div id="repositories-region" class="min-h-64">
|
||||||
<p class="mt-2 text-sm text-muted-foreground">Repository snapshots published from this account.</p>
|
<section class="table-panel"
|
||||||
|
hx-get="/dashboard/repositories"
|
||||||
|
hx-trigger="load"
|
||||||
|
hx-swap="outerHTML">
|
||||||
|
<div class="flex flex-col gap-1 border-b border-border px-4 py-3.5 sm:px-5 sm:py-4">
|
||||||
|
<h2 class="flex items-center gap-2 text-base font-semibold text-foreground">
|
||||||
|
<svg class="status-icon text-muted-foreground"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />
|
||||||
|
</svg>
|
||||||
|
Repositories
|
||||||
|
</h2>
|
||||||
|
<p class="text-sm leading-6 text-muted-foreground">
|
||||||
|
Create a share link to grant temporary read-only access.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{# Skeleton rows #}
|
||||||
|
<p class="sr-only" role="status">Loading repositories…</p>
|
||||||
|
<div class="divide-y divide-border-subtle" aria-hidden="true">
|
||||||
|
<div class="flex items-center gap-6 px-4 py-4 sm:px-5">
|
||||||
|
<span class="skeleton-bar w-44"></span>
|
||||||
|
<span class="skeleton-bar w-14"></span>
|
||||||
|
<span class="skeleton-bar hidden w-12 sm:inline-block"></span>
|
||||||
|
<span class="skeleton-bar ml-auto w-20"></span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center gap-6 px-4 py-4 sm:px-5">
|
||||||
|
<span class="skeleton-bar w-36"></span>
|
||||||
|
<span class="skeleton-bar w-14"></span>
|
||||||
|
<span class="skeleton-bar hidden w-12 sm:inline-block"></span>
|
||||||
|
<span class="skeleton-bar ml-auto w-20"></span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center gap-6 px-4 py-4 sm:px-5">
|
||||||
|
<span class="skeleton-bar w-52"></span>
|
||||||
|
<span class="skeleton-bar w-14"></span>
|
||||||
|
<span class="skeleton-bar hidden w-12 sm:inline-block"></span>
|
||||||
|
<span class="skeleton-bar ml-auto w-20"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<section class="card">
|
{% endif %}
|
||||||
<div class="overflow-x-auto">
|
<section class="table-panel">
|
||||||
<table class="w-full min-w-[720px] text-left text-sm">
|
<div class="flex flex-col gap-1 border-b border-border px-4 py-3.5 sm:px-5 sm:py-4">
|
||||||
<thead class="bg-muted text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground">
|
<h2 class="flex items-center gap-2 text-base font-semibold text-foreground">
|
||||||
<tr>
|
<svg class="status-icon {% if exposure.active %}text-ember{% else %}text-muted-foreground{% endif %}"
|
||||||
<th class="px-4 py-3">Repository</th>
|
viewBox="0 0 24 24"
|
||||||
<th class="px-4 py-3">Commit</th>
|
fill="none"
|
||||||
<th class="px-4 py-3">Status</th>
|
stroke="currentColor"
|
||||||
<th class="px-4 py-3">Views</th>
|
stroke-width="2"
|
||||||
<th class="px-4 py-3">Expires</th>
|
stroke-linecap="round"
|
||||||
</tr>
|
stroke-linejoin="round"
|
||||||
</thead>
|
{% if exposure.active %}role="img" aria-label="Live"{% else %}aria-hidden="true"{% endif %}>
|
||||||
<tbody class="divide-y divide-border-subtle">
|
<path d="M9 17H7A5 5 0 0 1 7 7h2m6 0h2a5 5 0 1 1 0 10h-2m-7-5h8" />
|
||||||
<tr class="text-muted-foreground text-center">
|
</svg>
|
||||||
<td class="px-4 py-5" colspan="5">You have not created any share links yet.</td>
|
Share links
|
||||||
</tr>
|
</h2>
|
||||||
</tbody>
|
<p class="text-sm leading-6 text-muted-foreground">
|
||||||
</table>
|
Repository snapshots published from this account.
|
||||||
</div>
|
</p>
|
||||||
</section>
|
</div>
|
||||||
</div>
|
{# Empty state — share-link data isn't wired yet; the populated table
|
||||||
|
(thead + rows) belongs here once links exist. #}
|
||||||
|
<div class="px-5 py-10 text-center">
|
||||||
|
<p class="mt-1 text-sm font-medium text-foreground">No active share links</p>
|
||||||
|
<p class="mt-1 text-sm leading-6 text-muted-foreground">
|
||||||
|
Create one from a repository above to grant temporary, read-only access.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
function localizeDates(root) {
|
||||||
|
const scope = root || document;
|
||||||
|
const absolute = new Intl.DateTimeFormat(undefined, {
|
||||||
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
|
year: "numeric",
|
||||||
|
});
|
||||||
|
scope.querySelectorAll("time[data-local-date]").forEach((time) => {
|
||||||
|
const date = new Date(time.getAttribute("datetime"));
|
||||||
|
if (Number.isNaN(date.valueOf())) return;
|
||||||
|
time.textContent = absolute.format(date);
|
||||||
|
});
|
||||||
|
// Operational consoles read recency: "3d ago" / "in 3d", absolute on hover.
|
||||||
|
const relative = new Intl.RelativeTimeFormat(undefined, { numeric: "auto", style: "narrow" });
|
||||||
|
scope.querySelectorAll("time[data-relative-date]").forEach((time) => {
|
||||||
|
const date = new Date(time.getAttribute("datetime"));
|
||||||
|
if (Number.isNaN(date.valueOf())) return;
|
||||||
|
const seconds = (date - Date.now()) / 1000;
|
||||||
|
const units = [["day", 86400], ["hour", 3600], ["minute", 60]];
|
||||||
|
const [unit, size] = units.find(([, s]) => Math.abs(seconds) >= s) || ["minute", 60];
|
||||||
|
time.textContent = relative.format(Math.trunc(seconds / size), unit);
|
||||||
|
time.title = absolute.format(date);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
localizeDates(document);
|
||||||
|
// Repositories load lazily via htmx, so re-localize their dates after swap.
|
||||||
|
document.body.addEventListener("htmx:afterSwap", (event) => localizeDates(event.target));
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -1,126 +1,43 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% from "partials/_brand.html" import mark %}
|
||||||
{% block title %}{{ status_code }} — Firebreak{% endblock %}
|
{% block title %}{{ status_code }} — Firebreak{% endblock %}
|
||||||
{% block body_class %}landing-page{% endblock %}
|
{% block main_class %}flex-1 flex flex-col{% endblock %}
|
||||||
{% block main_class %}{% endblock %}
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if status_code == 401 %}
|
<section class="relative flex flex-1 items-center justify-center px-6 py-20 overflow-hidden">
|
||||||
<style>
|
{# Watermark, not hero — the ring frames the message, it doesn't compete #}
|
||||||
@keyframes creep-in {
|
<div class="absolute left-1/2 h-full w-full max-w-200 -translate-x-1/2 text-danger opacity-25 inset-bs-8"
|
||||||
from { transform: translateX(100%); opacity: 0; }
|
aria-hidden="true">
|
||||||
to { transform: translateX(0); opacity: 1; }
|
{{ mark("block h-auto w-full") }}
|
||||||
}
|
|
||||||
@keyframes trot {
|
|
||||||
0%, 100% { transform: translateY(0) rotate(0deg); }
|
|
||||||
25% { transform: translateY(-3px) rotate(-0.6deg); }
|
|
||||||
75% { transform: translateY(-3px) rotate(0.6deg); }
|
|
||||||
}
|
|
||||||
@keyframes look-up {
|
|
||||||
from { transform: rotate(0deg); }
|
|
||||||
to { transform: rotate(3deg); }
|
|
||||||
}
|
|
||||||
@keyframes laser-pulse {
|
|
||||||
0%, 100% { opacity: 0.8; box-shadow: 0 0 6px 2px #ff0000, 0 0 16px 4px #ff000066; }
|
|
||||||
50% { opacity: 1; box-shadow: 0 0 10px 4px #ff0000, 0 0 30px 8px #ff000088; }
|
|
||||||
}
|
|
||||||
@keyframes btn-hit {
|
|
||||||
0% { filter: brightness(1); }
|
|
||||||
20% { filter: brightness(3) drop-shadow(0 0 12px #ff0000); }
|
|
||||||
100% { filter: brightness(1); }
|
|
||||||
}
|
|
||||||
.guard-dog-wrap {
|
|
||||||
animation: creep-in 6s ease-out both;
|
|
||||||
animation-delay: 1.5s;
|
|
||||||
}
|
|
||||||
.guard-dog-trot {
|
|
||||||
animation: trot 0.4s ease-in-out 15;
|
|
||||||
animation-delay: 1.5s;
|
|
||||||
}
|
|
||||||
.guard-dog-look {
|
|
||||||
animation: look-up 0.8s ease-out both;
|
|
||||||
animation-delay: 7.5s;
|
|
||||||
transform-origin: bottom center;
|
|
||||||
}
|
|
||||||
.laser-eye {
|
|
||||||
position: absolute;
|
|
||||||
width: 5px;
|
|
||||||
height: 5px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #ff0000;
|
|
||||||
animation: laser-pulse 2s ease-in-out infinite;
|
|
||||||
animation-delay: 7.5s;
|
|
||||||
opacity: 0;
|
|
||||||
animation-fill-mode: both;
|
|
||||||
}
|
|
||||||
.laser-eye-left { inset-block-start: 40px; inset-inline-start: 81px; }
|
|
||||||
.laser-eye-right { inset-block-start: 39px; inset-inline-start: 100px; }
|
|
||||||
.laser-beam {
|
|
||||||
position: fixed;
|
|
||||||
height: 2px;
|
|
||||||
background: linear-gradient(90deg, #ff0000, #ff000000);
|
|
||||||
transform-origin: left center;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 100;
|
|
||||||
opacity: 0;
|
|
||||||
box-shadow: 0 0 8px 2px #ff0000aa, 0 0 20px 4px #ff000044;
|
|
||||||
}
|
|
||||||
.laser-beam.fire { opacity: 1; transition: opacity 0.05s; }
|
|
||||||
.laser-beam.fade { opacity: 0; transition: opacity 0.4s; }
|
|
||||||
@keyframes rattle {
|
|
||||||
0%, 100% { transform: translate(0, 0); }
|
|
||||||
10% { transform: translate(-1px, 1px); }
|
|
||||||
20% { transform: translate(1px, -1px); }
|
|
||||||
30% { transform: translate(-2px, 0px); }
|
|
||||||
40% { transform: translate(2px, 1px); }
|
|
||||||
50% { transform: translate(-1px, -2px); }
|
|
||||||
60% { transform: translate(2px, 2px); }
|
|
||||||
70% { transform: translate(-3px, 1px); }
|
|
||||||
80% { transform: translate(3px, -1px); }
|
|
||||||
90% { transform: translate(-2px, 2px); }
|
|
||||||
}
|
|
||||||
.btn-zapped {
|
|
||||||
background: #c62030 !important;
|
|
||||||
color: #f7f2e8 !important;
|
|
||||||
box-shadow: 0 0 12px 4px rgba(198, 32, 48, 0.5), 0 0 30px 8px rgba(198, 32, 48, 0.25);
|
|
||||||
animation: rattle 0.15s linear infinite;
|
|
||||||
}
|
|
||||||
#go-home-btn:hover {
|
|
||||||
background: #c62030;
|
|
||||||
color: #f7f2e8;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endif %}
|
|
||||||
<section class="relative flex min-h-dvh items-center justify-center overflow-hidden px-6 py-20">
|
|
||||||
<div class="img-wrapper-[800px] absolute inset-bs-8 opacity-50">
|
|
||||||
<img src="/static/img/firebreak-logo-red.svg"
|
|
||||||
alt="Firebreak"
|
|
||||||
width="240"
|
|
||||||
height="268" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="relative z-10 w-full max-w-md text-center">
|
<div class="relative z-10 w-full max-w-md text-center">
|
||||||
{% if status_code == 401 %}
|
<p class="font-bold text-8xl text-foreground/20 sm:text-9xl">{{ status_code }}</p>
|
||||||
<p class="text-8xl font-bold text-[#f7f2e8]/20 sm:text-9xl">{{ status_code }}</p>
|
{% if status_code == 404 %}
|
||||||
<h1 class="mt-1 text-xl font-semibold text-[#f7f2e8]">{{ title }}</h1>
|
<h1 class="mt-1 text-xl font-semibold text-foreground">Outside the break</h1>
|
||||||
|
<p class="mt-4 text-sm leading-6 text-muted-foreground">This path lies beyond the cleared ground.</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-8xl font-bold text-[#f7f2e8]/20 sm:text-9xl">{{ status_code }}</p>
|
<h1 class="mt-1 text-xl font-semibold text-foreground">{{ title }}</h1>
|
||||||
<h1 class="mt-1 text-xl font-semibold text-[#f7f2e8]">{{ title }}</h1>
|
{# FastAPI defaults detail to the title text — don't say it twice #}
|
||||||
|
{% if detail and detail != title %}
|
||||||
|
<p class="mt-4 text-sm leading-6 text-muted-foreground">{{ detail }}</p>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p class="mt-4 text-sm leading-6 text-[#f7f2e8]/60">{{ detail }}</p>
|
|
||||||
{% if status_code == 401 %}
|
{% if status_code == 401 %}
|
||||||
{% set quips = [
|
{% set quips = [
|
||||||
"I'm not saying you're a data scraper, but I AM saying that this page is off-limits.",
|
"I'm not saying you're a data scraper, but I AM saying that this page is off-limits.",
|
||||||
"I'm watching you Wazowski.... ALWAYS watching.",
|
"I'm watching you Wazowski… ALWAYS watching.",
|
||||||
"He doesn't bite. He just harvests your data.",
|
"He doesn't bite. He just harvests your data.",
|
||||||
"Move along clanker! Nothing to see here.",
|
"Move along clanker! Nothing to see here.",
|
||||||
"Just get out of here you STUPID, DUMB ANIMAL!"
|
"Just get out of here you STUPID, DUMB ANIMAL!"
|
||||||
] %}
|
] %}
|
||||||
<p class="text-xs italic text-[#f7f2e8]/30">{{ quips | random }}</p>
|
<p class="mt-3 text-xs italic text-muted-foreground">{{ quips | random }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="mt-8">
|
<div class="mt-8">
|
||||||
<a href="/" class="btn btn-primary" id="go-home-btn">Go home</a>
|
{# The only recovery action on the page — it earns button weight #}
|
||||||
|
<a href="/" class="btn btn-secondary" id="go-home-btn">Go home</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if status_code == 401 %}
|
{% if status_code == 401 %}
|
||||||
<div class="guard-dog-wrap pointer-events-none absolute -bottom-4 -right-8 w-44 sm:w-56"
|
<div class="absolute pointer-events-none guard-dog-wrap -bottom-4 -right-8 w-44 sm:w-56"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<div class="guard-dog-trot">
|
<div class="guard-dog-trot">
|
||||||
<div class="guard-dog-look">
|
<div class="guard-dog-look">
|
||||||
|
|
@ -138,7 +55,7 @@
|
||||||
</section>
|
</section>
|
||||||
{% if status_code == 401 %}
|
{% if status_code == 401 %}
|
||||||
<script>
|
<script>
|
||||||
console.log('%cUnauthorized access detected. Deploying CUCKerberg.', 'font-size: 16px; color: red;');
|
console.log('Unauthorized access detected. Deploying CUCKerberg.');
|
||||||
|
|
||||||
function fireBeam(eye, target) {
|
function fireBeam(eye, target) {
|
||||||
const eyeRect = eye.getBoundingClientRect();
|
const eyeRect = eye.getBoundingClientRect();
|
||||||
|
|
@ -185,7 +102,9 @@
|
||||||
const blur = 30 + t * 40;
|
const blur = 30 + t * 40;
|
||||||
const opacity = 0.5 + t * 0.4;
|
const opacity = 0.5 + t * 0.4;
|
||||||
const scale = 1 + t * 0.06;
|
const scale = 1 + t * 0.06;
|
||||||
btn.style.boxShadow = `0 0 ${spread}px ${spread/3}px rgba(198,32,48,${opacity}), 0 0 ${blur}px ${blur/3}px rgba(198,32,48,${opacity * 0.5})`;
|
const primaryGlow = `color-mix(in oklab, var(--color-brand-red) ${Math.round(opacity * 100)}%, transparent)`;
|
||||||
|
const secondaryGlow = `color-mix(in oklab, var(--color-brand-red) ${Math.round(opacity * 50)}%, transparent)`;
|
||||||
|
btn.style.boxShadow = `0 0 ${spread}px ${spread / 3}px ${primaryGlow}, 0 0 ${blur}px ${blur / 3}px ${secondaryGlow}`;
|
||||||
btn.style.scale = scale;
|
btn.style.scale = scale;
|
||||||
if (t < 1) requestAnimationFrame(intensify);
|
if (t < 1) requestAnimationFrame(intensify);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}Firebreak — protect your code from scraping{% endblock %}
|
{% block title %}Firebreak — protect your code from scraping{% endblock %}
|
||||||
{% block body_class %}landing-page{% endblock %}
|
{% block header_class %}hidden{% endblock %}
|
||||||
{% block main_class %}{% endblock %}
|
{% block main_class %}flex-1{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="relative flex min-h-dvh w-full items-center justify-center overflow-hidden bg-[#17191c] px-6 py-20 text-center text-[#f7f2e8]">
|
<section class="relative flex min-h-dvh w-full items-center justify-center overflow-hidden bg-background px-4 py-10 text-center text-brand-cream sm:px-6 sm:py-14 lg:py-16">
|
||||||
<video class="absolute inset-0 h-full w-full object-cover"
|
<video class="absolute inset-0 h-full w-full object-cover"
|
||||||
autoplay
|
autoplay
|
||||||
muted
|
muted
|
||||||
|
|
@ -14,26 +14,45 @@
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<source src="/static/video/firebreak-hero.mp4" type="video/mp4" />
|
<source src="/static/video/firebreak-hero.mp4" type="video/mp4" />
|
||||||
</video>
|
</video>
|
||||||
<div class="absolute inset-0 bg-[#17191c]/65"></div>
|
<div class="pointer-events-none absolute inset-0"
|
||||||
<div class="absolute inset-0 bg-[radial-gradient(circle_at_center,transparent_0,transparent_30%,rgb(23_25_28_/0.44)_62%,rgb(23_25_28_/0.92)_100%)]">
|
style="background: radial-gradient(circle at center, transparent 0, transparent 30%, color-mix(in oklab, var(--color-overlay) 38%, transparent) 62%, color-mix(in oklab, var(--color-overlay) 90%, transparent) 100%), linear-gradient(180deg, color-mix(in oklab, var(--color-overlay) 64%, transparent) 0, transparent 28%, color-mix(in oklab, var(--color-overlay) 70%, transparent) 100%), radial-gradient(ellipse at center, color-mix(in oklab, var(--color-overlay) 10%, transparent) 0, color-mix(in oklab, var(--color-overlay) 26%, transparent) 36%, transparent 58%)">
|
||||||
</div>
|
</div>
|
||||||
<div class="relative z-10 flex w-full max-w-4xl flex-col items-center">
|
<div class="pointer-events-none absolute inset-[12%_18%_18%]"
|
||||||
<img src="/static/img/firebreak-brand.svg"
|
style="background: radial-gradient(circle at center, var(--color-hero-ember) 0%, color-mix(in oklab, var(--color-hero-ember) 35%, transparent) 35%, transparent 70%);
|
||||||
alt="Firebreak"
|
mix-blend-mode: screen"></div>
|
||||||
|
<div class="relative z-10 flex w-full max-w-4xl translate-y-[-2dvh] flex-col items-center gap-6 sm:gap-8 lg:gap-9">
|
||||||
|
<img src="/static/img/firebreak-logo-cream-red.svg"
|
||||||
|
alt=""
|
||||||
width="240"
|
width="240"
|
||||||
height="268"
|
height="238"
|
||||||
class="h-auto w-full max-w-36 drop-shadow-[0_14px_34px_rgb(0_0_0_/0.55)] sm:max-w-48 lg:max-w-60" />
|
class="h-auto w-full max-w-24 sm:max-w-32 lg:max-w-40"
|
||||||
<p class="mt-8 max-w-2xl text-balance text-base font-medium leading-8 tracking-normal text-[#f7f2e8]/90 drop-shadow-[0_4px_18px_rgb(0_0_0_/0.72)] sm:text-lg sm:leading-9">
|
style="filter: drop-shadow(var(--shadow-hero-logo)) drop-shadow(var(--glow-hero))"
|
||||||
<span class="block">Fight Fire with Fire.</span>
|
aria-hidden="true" />
|
||||||
<span class="mt-2 block">Draw a boundary around your code. Let them look, but don't let them scrape.</span>
|
<img src="/static/img/firebreak-brand-text.svg"
|
||||||
</p>
|
alt="Firebreak"
|
||||||
<p class="mt-7 max-w-xl rounded-lg border border-[#f7f2e8]/14 bg-[#17191c]/42 px-5 py-4 text-sm leading-6 text-[#f7f2e8]/76 shadow-[0_18px_50px_rgb(0_0_0_/0.24)] backdrop-blur-sm sm:text-[0.9375rem]">
|
width="280"
|
||||||
Firebreak creates temporary, read-only links to private Forgejo repository snapshots.
|
height="48"
|
||||||
Sign in using Forgejo, register an access token, and control what can be viewed and by whom.
|
class="h-auto w-full max-w-40 sm:max-w-48 lg:max-w-56"
|
||||||
</p>
|
style="filter: drop-shadow(var(--shadow-hero-text))" />
|
||||||
<div class="mt-7 flex flex-wrap items-center justify-center gap-3">
|
<div class="relative isolate flex max-w-lg flex-col items-center text-balance px-4 py-2 text-brand-cream sm:max-w-xl"
|
||||||
|
style="filter: drop-shadow(var(--shadow-hero-copy))">
|
||||||
|
<div class="pointer-events-none absolute -z-10 blur-[10px]"
|
||||||
|
style="inset: -1.5rem -3rem;
|
||||||
|
background: radial-gradient(ellipse at center, color-mix(in oklab, var(--color-overlay) 72%, transparent) 0, color-mix(in oklab, var(--color-overlay) 44%, transparent) 42%, transparent 72%)">
|
||||||
|
</div>
|
||||||
|
<p class="text-base font-semibold leading-7 text-brand-cream sm:text-lg">Fight Fire with Fire.</p>
|
||||||
|
<div class="my-4 h-px w-16 rounded-full sm:my-5"
|
||||||
|
style="background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--color-brand-red) 85%, transparent) 18%, var(--color-hero-burn) 50%, color-mix(in oklab, var(--color-brand-red) 85%, transparent) 82%, transparent);
|
||||||
|
box-shadow: 0 0 14px color-mix(in oklab, var(--color-brand-flame) 45%, transparent), 0 0 1px var(--color-brand-cream)"
|
||||||
|
aria-hidden="true"></div>
|
||||||
|
<p class="max-w-md text-sm leading-6 text-brand-cream/90 sm:max-w-lg sm:text-[0.9375rem] sm:leading-7">
|
||||||
|
Temporary read-only access to private Forgejo snapshots.
|
||||||
|
Let them inspect what you allow. Nothing more.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap items-center justify-center gap-3">
|
||||||
{% if user %}
|
{% if user %}
|
||||||
<a href="/dashboard" class="btn btn-primary">Open dashboard</a>
|
<a href="/dashboard" class="btn btn-primary">Open Dashboard</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/auth/login/forgejo" class="btn btn-primary">
|
<a href="/auth/login/forgejo" class="btn btn-primary">
|
||||||
<img src="/static/img/forgejo-logo.svg"
|
<img src="/static/img/forgejo-logo.svg"
|
||||||
|
|
@ -42,10 +61,26 @@
|
||||||
height="16"
|
height="16"
|
||||||
class="size-4 shrink-0 brightness-0 invert"
|
class="size-4 shrink-0 brightness-0 invert"
|
||||||
aria-hidden="true" />
|
aria-hidden="true" />
|
||||||
<span>Sign in with Forgejo</span>
|
<span>Sign In with Forgejo</span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="absolute inset-x-4 z-10 flex flex-wrap items-center justify-center gap-x-3 gap-y-2 text-[0.6875rem] font-semibold uppercase tracking-[0.12em] text-brand-cream/56 sm:text-xs"
|
||||||
|
style="bottom: clamp(1.5rem, 5dvh, 4rem);
|
||||||
|
filter: drop-shadow(var(--shadow-hero-text))"
|
||||||
|
aria-label="Firebreak security properties">
|
||||||
|
<span>Snapshot scoped</span>
|
||||||
|
<span class="size-1 rounded-full"
|
||||||
|
style="background: var(--color-brand-flame);
|
||||||
|
box-shadow: 0 0 10px color-mix(in oklab, var(--color-brand-flame) 55%, transparent)"
|
||||||
|
aria-hidden="true"></span>
|
||||||
|
<span>Read-only</span>
|
||||||
|
<span class="size-1 rounded-full"
|
||||||
|
style="background: var(--color-brand-flame);
|
||||||
|
box-shadow: 0 0 10px color-mix(in oklab, var(--color-brand-flame) 55%, transparent)"
|
||||||
|
aria-hidden="true"></span>
|
||||||
|
<span>Forgejo-native</span>
|
||||||
|
</p>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
13
web/app/templates/partials/_brand.html
Normal file
13
web/app/templates/partials/_brand.html
Normal file
File diff suppressed because one or more lines are too long
149
web/app/templates/partials/dashboard_repositories.html
Normal file
149
web/app/templates/partials/dashboard_repositories.html
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
<section class="table-panel">
|
||||||
|
<div class="flex flex-col gap-1 border-b border-border px-4 py-3.5 sm:px-5 sm:py-4">
|
||||||
|
<h2 class="flex items-center gap-2 text-base font-semibold text-foreground">
|
||||||
|
<svg class="status-icon text-muted-foreground"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />
|
||||||
|
</svg>
|
||||||
|
Repositories
|
||||||
|
{% if repositories %}
|
||||||
|
<span class="text-sm font-normal text-muted-foreground">{{ repositories|length }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</h2>
|
||||||
|
<p class="text-sm leading-6 text-muted-foreground">
|
||||||
|
Your Forgejo repositories. Create a share link to grant temporary read-only access.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% if repo_error %}
|
||||||
|
<div class="table-placeholder text-warning-foreground">
|
||||||
|
{{ repo_error }}
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-sm btn-secondary"
|
||||||
|
hx-get="/dashboard/repositories"
|
||||||
|
hx-target="#repositories-region"
|
||||||
|
hx-swap="innerHTML">Retry</button>
|
||||||
|
</div>
|
||||||
|
{% elif repositories %}
|
||||||
|
<div class="table-shell">
|
||||||
|
<table class="data-table">
|
||||||
|
<caption class="sr-only">Your Forgejo repositories</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Repository</th>
|
||||||
|
<th scope="col">Type</th>
|
||||||
|
<th scope="col">Branch</th>
|
||||||
|
<th scope="col" class="hidden lg:table-cell">Language</th>
|
||||||
|
<th scope="col" class="hidden md:table-cell">Last Updated</th>
|
||||||
|
<th scope="col" class="text-center">Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for repo in repositories %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{# Owner muted, name bright — eyes land on the repo, not the prefix #}
|
||||||
|
{% set owner, slash, name = repo.full_name.partition('/') %}
|
||||||
|
{% if repo.html_url %}
|
||||||
|
<a href="{{ repo.html_url }}"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
class="group inline-flex items-center gap-1 font-medium text-foreground hover:text-ember">
|
||||||
|
{% if slash %}
|
||||||
|
<span class="font-normal text-muted-foreground">{{ owner }}/</span>{{ name }}
|
||||||
|
{% else %}
|
||||||
|
{{ repo.full_name }}
|
||||||
|
{% endif %}
|
||||||
|
<svg class="size-3 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-ember"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
||||||
|
</svg>
|
||||||
|
<span class="sr-only">(opens in Forgejo in a new tab)</span>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="font-medium text-foreground">
|
||||||
|
{% if slash %}
|
||||||
|
<span class="font-normal text-muted-foreground">{{ owner }}/</span>{{ name }}
|
||||||
|
{% else %}
|
||||||
|
{{ repo.full_name }}
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
{# Provenance is metadata, not risk — muted mono, never a badge #}
|
||||||
|
{% set provenance = (['fork'] if repo.fork else []) + (['mirror'] if repo.mirror else []) %}
|
||||||
|
{% if provenance %}
|
||||||
|
<span class="font-mono text-xs text-muted-foreground">· {{ provenance | join(' · ') }}</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if repo.description %}
|
||||||
|
<p class="mt-0.5 max-w-[16rem] truncate text-xs text-muted-foreground sm:max-w-md">
|
||||||
|
{{ repo.description }}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{# Heat = exposure: only exception states earn a badge.
|
||||||
|
Private is the ground state — an unmarked row is contained. #}
|
||||||
|
<div class="flex flex-wrap items-center gap-1.5">
|
||||||
|
{% if not repo.private %}
|
||||||
|
<span class="badge badge-ember">Public</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if repo.archived %}<span class="badge badge-expired">Archived</span>{% endif %}
|
||||||
|
{% if repo.empty %}<span class="badge badge-danger">Empty</span>{% endif %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span class="mono-chip inline-flex items-center gap-1">
|
||||||
|
<svg class="size-3 shrink-0"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M15 6a9 9 0 0 0-9 9V3" />
|
||||||
|
<circle cx="18" cy="6" r="3" />
|
||||||
|
<circle cx="6" cy="18" r="3" />
|
||||||
|
</svg>
|
||||||
|
{{ repo.default_branch }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="hidden whitespace-nowrap text-muted-foreground lg:table-cell">
|
||||||
|
{% if repo.language %}
|
||||||
|
{{ repo.language }}
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted-foreground">—</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="hidden whitespace-nowrap text-muted-foreground md:table-cell">
|
||||||
|
<time datetime="{{ repo.updated_at }}" data-relative-date>{{ repo.updated_at }}</time>
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
{% if repo.empty %}
|
||||||
|
<span class="btn btn-sm btn-disabled" aria-disabled="true">Create Link</span>
|
||||||
|
{% else %}
|
||||||
|
<a href="/links/create"
|
||||||
|
class="btn btn-sm btn-primary"
|
||||||
|
aria-label="Create link for {{ repo.full_name }}">Create Link</a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="table-placeholder">No repositories found in your Forgejo account.</div>
|
||||||
|
{% endif %}
|
||||||
|
</section>
|
||||||
|
|
@ -1,108 +1,130 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}Settings — Firebreak{% endblock %}
|
{% block title %}Settings — Firebreak{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="flex flex-col gap-6">
|
{# One section doesn't earn a sidebar — a single quiet column until it does. #}
|
||||||
<section class="pb-6 border-b border-border">
|
<div class="mx-auto flex w-full max-w-3xl flex-col gap-6">
|
||||||
<h1 class="text-2xl font-semibold">Settings</h1>
|
<section>
|
||||||
<p class="mt-2 text-sm text-muted-foreground">Manage your Firebreak configuration.</p>
|
<h1 class="text-2xl font-semibold leading-tight text-foreground sm:text-3xl">Settings</h1>
|
||||||
|
<div class="firebreak-rule mt-6" aria-hidden="true"></div>
|
||||||
</section>
|
</section>
|
||||||
{% if pat_deleted %}
|
<div class="flex min-w-0 flex-col gap-4">
|
||||||
<div class="rounded-md border-l-4 border-warning bg-warning-muted px-4 py-3 text-sm font-semibold text-warning-foreground"
|
{% if pat_deleted %}
|
||||||
role="status">Access token removed.</div>
|
<div class="notice-rail" role="status">
|
||||||
{% endif %}
|
<p class="text-sm font-semibold text-warning-foreground">Access token removed.</p>
|
||||||
<div id="forgejo-access-token">
|
</div>
|
||||||
<h2 class="text-base font-semibold">Forgejo access token</h2>
|
{% endif %}
|
||||||
<p class="mt-2 text-sm text-muted-foreground">
|
|
||||||
A <code class="rounded-sm bg-secondary px-1.5 py-0.5 text-foreground">read:repository</code>-scoped
|
|
||||||
Personal Access Token is required for share link viewing.
|
|
||||||
</p>
|
|
||||||
{% if pat_registered %}
|
{% if pat_registered %}
|
||||||
<div class="mt-4 card">
|
<div class="notice-rail border-success" role="status">
|
||||||
<div class="flex items-center justify-between px-4 py-3.5">
|
<p class="text-sm font-semibold text-success-foreground">Access token registered.</p>
|
||||||
<div class="flex items-center gap-3">
|
</div>
|
||||||
<div class="flex size-8 items-center justify-center rounded-md bg-success-muted text-success-foreground">
|
{% endif %}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
<section class="table-panel">
|
||||||
width="16"
|
<div class="flex flex-col gap-1 border-b border-border px-4 py-3.5 sm:px-5 sm:py-4">
|
||||||
height="16"
|
<h2 class="text-base font-semibold text-foreground">Forgejo access token</h2>
|
||||||
viewBox="0 0 24 24"
|
<p class="text-sm leading-6 text-muted-foreground">
|
||||||
fill="none"
|
A <code class="mono-chip">read:repository</code>-scoped
|
||||||
stroke="currentColor"
|
Personal Access Token is required for share link viewing.
|
||||||
stroke-width="2"
|
</p>
|
||||||
stroke-linecap="round"
|
</div>
|
||||||
stroke-linejoin="round">
|
{% if user.has_pat %}
|
||||||
<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4" />
|
<div class="flex items-center justify-between gap-4 border-b border-border-subtle px-4 py-3.5 sm:px-5">
|
||||||
</svg>
|
<div class="flex items-center gap-2.5">
|
||||||
</div>
|
<svg class="status-icon text-success-foreground"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" />
|
||||||
|
<circle cx="16.5" cy="7.5" r=".5" fill="currentColor" stroke="none" />
|
||||||
|
</svg>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm font-medium text-foreground">Access token</p>
|
<p class="text-sm font-medium text-foreground">Access token</p>
|
||||||
<p class="mt-0.5 text-xs text-muted-foreground">
|
<p class="mt-0.5 text-xs text-muted-foreground">
|
||||||
{% if pat_registered_at %}
|
{% if user.pat_registered_at %}
|
||||||
Registered {{ pat_registered_at.strftime("%b %d, %Y") }}
|
Registered <time datetime="{{ user.pat_registered_at.isoformat() }}" data-local-date>{{ user.pat_registered_at.isoformat() }}</time>
|
||||||
{% else %}
|
{% else %}
|
||||||
Registered
|
Registered
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form method="post" action="/settings/pat/delete">
|
<form method="post"
|
||||||
<button type="submit"
|
action="/settings/pat/delete"
|
||||||
class="btn btn-xs btn-secondary text-danger-foreground hover:bg-danger-muted hover:border-danger-muted">
|
data-confirm="Delete this access token? You can register a new token later.">
|
||||||
Delete
|
<button type="submit" class="btn btn-sm btn-danger-quiet">Delete</button>
|
||||||
</button>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
<details class="mt-4">
|
<div class="flex items-center gap-2.5 border-b border-border-subtle px-4 py-3.5 sm:px-5">
|
||||||
<summary class="cursor-pointer text-sm text-muted-foreground hover:text-foreground">
|
<svg class="status-icon text-warning-foreground"
|
||||||
Update token
|
viewBox="0 0 24 24"
|
||||||
</summary>
|
fill="none"
|
||||||
<form id="pat-form"
|
stroke="currentColor"
|
||||||
class="mt-3"
|
stroke-width="2"
|
||||||
method="post"
|
stroke-linecap="round"
|
||||||
action="/settings/pat"
|
stroke-linejoin="round"
|
||||||
novalidate>
|
aria-hidden="true">
|
||||||
<div class="grid gap-2 sm:gap-4 sm:grid-cols-[1fr_auto] sm:items-end">
|
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01" />
|
||||||
|
</svg>
|
||||||
|
<p class="status-line text-warning-foreground">Status · No token registered</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="px-4 py-3.5 sm:px-5 sm:py-4">
|
||||||
|
<form id="pat-form" method="post" action="/settings/pat" novalidate>
|
||||||
|
<label for="pat" class="form-label">
|
||||||
|
{{ "Replace token" if user.has_pat else "Register token" }}
|
||||||
|
</label>
|
||||||
|
<div class="grid gap-2 sm:grid-cols-[1fr_auto] sm:gap-3">
|
||||||
<input type="password"
|
<input type="password"
|
||||||
id="pat"
|
id="pat"
|
||||||
name="pat"
|
name="pat"
|
||||||
class="block w-full input-mono"
|
class="form-input font-mono"
|
||||||
placeholder="Paste new token..."
|
placeholder="Paste new token…"
|
||||||
aria-describedby="pat-error"
|
aria-describedby="pat-error"
|
||||||
aria-invalid="false"
|
aria-invalid="false"
|
||||||
|
autocomplete="off"
|
||||||
|
spellcheck="false"
|
||||||
required />
|
required />
|
||||||
<button type="submit" class="btn btn-sm btn-primary self-center">Update</button>
|
<button type="submit" class="btn btn-sm btn-primary self-center">
|
||||||
</div>
|
{{ "Update" if user.has_pat else "Register" }}
|
||||||
<div class="mt-2">
|
</button>
|
||||||
<p id="pat-error" class="input-error hidden">A Forgejo token is required.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p id="pat-error"
|
||||||
|
class="mt-2 hidden text-sm font-medium text-danger-foreground"
|
||||||
|
aria-live="polite">A Forgejo token is required.</p>
|
||||||
</form>
|
</form>
|
||||||
</details>
|
</div>
|
||||||
{% else %}
|
</section>
|
||||||
<form id="pat-form"
|
|
||||||
class="mt-4"
|
|
||||||
method="post"
|
|
||||||
action="/settings/pat"
|
|
||||||
novalidate>
|
|
||||||
<div class="grid gap-2 sm:gap-4 sm:grid-cols-[1fr_auto] sm:items-end">
|
|
||||||
<input type="password"
|
|
||||||
id="pat"
|
|
||||||
name="pat"
|
|
||||||
class="block w-full input-mono"
|
|
||||||
placeholder="ad8j3..."
|
|
||||||
aria-describedby="pat-error"
|
|
||||||
aria-invalid="false"
|
|
||||||
required />
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary self-center">Register</button>
|
|
||||||
</div>
|
|
||||||
<div class="mt-2">
|
|
||||||
<p id="pat-error" class="input-error hidden">A Forgejo token is required.</p>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
(() => {
|
(() => {
|
||||||
|
document.querySelectorAll("form[data-confirm]").forEach((confirmForm) => {
|
||||||
|
confirmForm.addEventListener("submit", (event) => {
|
||||||
|
const message = confirmForm.getAttribute("data-confirm");
|
||||||
|
if (message && !window.confirm(message)) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelectorAll("time[data-local-date]").forEach((time) => {
|
||||||
|
const value = time.getAttribute("datetime");
|
||||||
|
if (!value) return;
|
||||||
|
|
||||||
|
const date = new Date(value);
|
||||||
|
if (Number.isNaN(date.valueOf())) return;
|
||||||
|
|
||||||
|
time.textContent = new Intl.DateTimeFormat(undefined, {
|
||||||
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
|
year: "numeric",
|
||||||
|
}).format(date);
|
||||||
|
});
|
||||||
|
|
||||||
const form = document.getElementById("pat-form");
|
const form = document.getElementById("pat-form");
|
||||||
const input = document.getElementById("pat");
|
const input = document.getElementById("pat");
|
||||||
const error = document.getElementById("pat-error");
|
const error = document.getElementById("pat-error");
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,49 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% from "partials/_brand.html" import mark %}
|
||||||
{% block title %}{{ "Reconfigure" if reconfiguring else "Setup" }} — Firebreak{% endblock %}
|
{% block title %}{{ "Reconfigure" if reconfiguring else "Setup" }} — Firebreak{% endblock %}
|
||||||
{% block body_class %}landing-page{% endblock %}
|
{% block header_class %}hidden{% endblock %}
|
||||||
{% block main_class %}{% endblock %}
|
{% block main_class %}flex-1{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="flex min-h-dvh items-center justify-center px-6 py-20">
|
<section class="flex min-h-dvh items-center justify-center px-6 py-20">
|
||||||
<div class="w-full max-w-lg">
|
<div class="w-full max-w-lg">
|
||||||
<div class="mb-8 text-center">
|
<div class="mb-8 text-center">
|
||||||
<img src="/static/img/firebreak-brand.svg"
|
{{ mark("mx-auto h-auto w-full max-w-20 text-foreground") }}
|
||||||
alt="Firebreak"
|
<h1 class="mt-6 text-2xl font-semibold text-foreground">
|
||||||
width="240"
|
|
||||||
height="268"
|
|
||||||
class="mx-auto h-auto w-full max-w-24" />
|
|
||||||
<h1 class="mt-6 text-2xl font-semibold text-[#f7f2e8]">
|
|
||||||
{{ "Reconfigure" if reconfiguring else "Setup" }}
|
{{ "Reconfigure" if reconfiguring else "Setup" }}
|
||||||
</h1>
|
</h1>
|
||||||
{% if reconfiguring %}
|
{% if reconfiguring %}
|
||||||
<p class="mt-2 text-sm leading-6 text-[#f7f2e8]/60">
|
<p class="mt-2 text-sm leading-6 text-muted-foreground">
|
||||||
Update your Forgejo OAuth connection. Make sure the OAuth application
|
Update your Forgejo OAuth connection. Make sure the OAuth application
|
||||||
is registered in your Forgejo instance before continuing.
|
is registered in your Forgejo instance before continuing.
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="mt-2 text-sm leading-6 text-[#f7f2e8]/60">
|
<p class="mt-2 text-sm leading-6 text-muted-foreground">
|
||||||
Connect Firebreak to your Forgejo instance. You'll need to
|
Connect Firebreak to your Forgejo instance. You'll need to
|
||||||
<a href="https://forgejo.org/docs/latest/user/oauth2-provider/"
|
<a href="https://forgejo.org/docs/latest/user/oauth2-provider/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
class="underline underline-offset-2 text-[#f7f2e8]/80 hover:text-[#f7f2e8]">register an OAuth application</a>
|
class="text-foreground/80 underline underline-offset-2 hover:text-foreground">register an OAuth application</a>
|
||||||
in Forgejo first.
|
in Forgejo first.
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if not reconfiguring %}
|
{% if not reconfiguring %}
|
||||||
<div class="mb-8 rounded-lg border border-[#f7f2e8]/10 bg-[#1f2226]/60 px-5 py-4 text-xs leading-5 text-[#f7f2e8]/50">
|
<div class="mb-8 rounded-lg border border-border bg-card px-5 py-4 text-xs leading-5 text-muted-foreground">
|
||||||
<p class="font-medium text-[#f7f2e8]/70 mb-2.5">How to get your OAuth credentials:</p>
|
<p class="mb-2.5 font-medium text-foreground">How to get your OAuth credentials:</p>
|
||||||
<ol class="list-decimal list-inside space-y-1.5">
|
<ol class="list-decimal list-inside space-y-1.5">
|
||||||
<li>
|
<li>
|
||||||
In Forgejo, go to <strong class="text-[#f7f2e8]/70">Settings → Applications</strong>
|
In Forgejo, go to <strong class="text-foreground">Settings → Applications</strong>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Under <strong class="text-[#f7f2e8]/70">Manage OAuth2 Applications</strong>, create a new app
|
Under <strong class="text-foreground">Manage OAuth2 Applications</strong>, create a new app
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Set the redirect URI to
|
Set the redirect URI to
|
||||||
<br />
|
<br />
|
||||||
<code class="mt-1 inline-block rounded bg-[#f7f2e8]/8 px-1.5 py-0.5 font-mono text-[10px] text-[#f7f2e8]/60">{{ oauth_callback_url }}</code>
|
<code class="mono-chip mt-1 break-all">{{ oauth_callback_url }}</code>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Copy the <strong class="text-[#f7f2e8]/70">Client ID</strong> and <strong class="text-[#f7f2e8]/70">Client Secret</strong> into the form below
|
Copy the <strong class="text-foreground">Client ID</strong> and <strong class="text-foreground">Client Secret</strong> into the form below
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -54,78 +51,75 @@
|
||||||
<form method="post" action="/setup" class="space-y-5">
|
<form method="post" action="/setup" class="space-y-5">
|
||||||
{% if not reconfiguring %}
|
{% if not reconfiguring %}
|
||||||
<div>
|
<div>
|
||||||
<label for="setup_token"
|
<label for="setup_token" class="form-label">Setup Token</label>
|
||||||
class="block text-xs font-semibold uppercase tracking-[0.05em] text-[#f7f2e8]/50 mb-1.5">
|
|
||||||
Setup Token
|
|
||||||
</label>
|
|
||||||
<input type="password"
|
<input type="password"
|
||||||
id="setup_token"
|
id="setup_token"
|
||||||
name="setup_token"
|
name="setup_token"
|
||||||
class="block w-full rounded-md border border-[#f7f2e8]/14 bg-[#1f2226] px-3 py-2.5 font-mono text-sm text-[#f7f2e8] placeholder:text-[#f7f2e8]/30 focus:border-[#f7f2e8]/30 focus:outline-none focus:ring-2 focus:ring-[#f7f2e8]/10"
|
class="form-input font-mono"
|
||||||
placeholder="Paste the token from your server logs"
|
placeholder="Paste the token from your server logs"
|
||||||
|
autocomplete="off"
|
||||||
|
spellcheck="false"
|
||||||
required />
|
required />
|
||||||
<p class="mt-1.5 text-xs text-[#f7f2e8]/30">Printed to the server console on first boot.</p>
|
<p class="mt-1.5 text-xs text-muted-foreground">Printed to the server console on first boot.</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div>
|
||||||
<label for="forgejo_base_url"
|
<label for="forgejo_base_url" class="form-label">Forgejo Instance URL</label>
|
||||||
class="block text-xs font-semibold uppercase tracking-[0.05em] text-[#f7f2e8]/50 mb-1.5">
|
|
||||||
Forgejo Instance URL
|
|
||||||
</label>
|
|
||||||
<input type="url"
|
<input type="url"
|
||||||
id="forgejo_base_url"
|
id="forgejo_base_url"
|
||||||
name="forgejo_base_url"
|
name="forgejo_base_url"
|
||||||
class="block w-full rounded-md border border-[#f7f2e8]/14 bg-[#1f2226] px-3 py-2.5 text-sm text-[#f7f2e8] placeholder:text-[#f7f2e8]/30 focus:border-[#f7f2e8]/30 focus:outline-none focus:ring-2 focus:ring-[#f7f2e8]/10"
|
class="form-input"
|
||||||
placeholder="https://git.example.com"
|
placeholder="https://git.example.com"
|
||||||
|
autocomplete="off"
|
||||||
value="{{ forgejo_base_url }}"
|
value="{{ forgejo_base_url }}"
|
||||||
required />
|
required />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="forgejo_oauth_client_id"
|
<label for="forgejo_oauth_client_id" class="form-label">OAuth Client ID</label>
|
||||||
class="block text-xs font-semibold uppercase tracking-[0.05em] text-[#f7f2e8]/50 mb-1.5">
|
|
||||||
OAuth Client ID
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
id="forgejo_oauth_client_id"
|
id="forgejo_oauth_client_id"
|
||||||
name="forgejo_oauth_client_id"
|
name="forgejo_oauth_client_id"
|
||||||
class="block w-full rounded-md border border-[#f7f2e8]/14 bg-[#1f2226] px-3 py-2.5 font-mono text-sm text-[#f7f2e8] placeholder:text-[#f7f2e8]/30 focus:border-[#f7f2e8]/30 focus:outline-none focus:ring-2 focus:ring-[#f7f2e8]/10"
|
class="form-input font-mono"
|
||||||
placeholder="c8ab3315-537d-44f3-..."
|
placeholder="c8ab3315-537d-44f3-…"
|
||||||
|
autocomplete="off"
|
||||||
|
spellcheck="false"
|
||||||
value="{{ forgejo_oauth_client_id }}"
|
value="{{ forgejo_oauth_client_id }}"
|
||||||
required />
|
required />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="forgejo_oauth_client_secret"
|
<label for="forgejo_oauth_client_secret" class="form-label">
|
||||||
class="block text-xs font-semibold uppercase tracking-[0.05em] text-[#f7f2e8]/50 mb-1.5">
|
|
||||||
OAuth Client Secret
|
OAuth Client Secret
|
||||||
{% if reconfiguring %}
|
{% if reconfiguring %}
|
||||||
<span class="ml-1 normal-case tracking-normal font-normal text-[#f7f2e8]/30">(leave blank to keep current)</span>
|
<span class="ml-1 font-normal tracking-normal normal-case text-muted-foreground">(leave blank to keep current)</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</label>
|
</label>
|
||||||
<input type="password"
|
<input type="password"
|
||||||
id="forgejo_oauth_client_secret"
|
id="forgejo_oauth_client_secret"
|
||||||
name="forgejo_oauth_client_secret"
|
name="forgejo_oauth_client_secret"
|
||||||
class="block w-full rounded-md border border-[#f7f2e8]/14 bg-[#1f2226] px-3 py-2.5 font-mono text-sm text-[#f7f2e8] placeholder:text-[#f7f2e8]/30 focus:border-[#f7f2e8]/30 focus:outline-none focus:ring-2 focus:ring-[#f7f2e8]/10"
|
class="form-input font-mono"
|
||||||
placeholder="gto_wkxxnv4ewa..."
|
placeholder="gto_wkxxnv4ewa…"
|
||||||
|
autocomplete="off"
|
||||||
|
spellcheck="false"
|
||||||
{{ "" if reconfiguring else "required" }} />
|
{{ "" if reconfiguring else "required" }} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="firebreak_public_base_url"
|
<label for="firebreak_public_base_url" class="form-label">
|
||||||
class="block text-xs font-semibold uppercase tracking-[0.05em] text-[#f7f2e8]/50 mb-1.5">
|
|
||||||
Public Base URL
|
Public Base URL
|
||||||
<span class="ml-1 normal-case tracking-normal font-normal text-[#f7f2e8]/30">(optional)</span>
|
<span class="ml-1 font-normal tracking-normal normal-case text-muted-foreground">(optional)</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="url"
|
<input type="url"
|
||||||
id="firebreak_public_base_url"
|
id="firebreak_public_base_url"
|
||||||
name="firebreak_public_base_url"
|
name="firebreak_public_base_url"
|
||||||
class="block w-full rounded-md border border-[#f7f2e8]/14 bg-[#1f2226] px-3 py-2.5 text-sm text-[#f7f2e8] placeholder:text-[#f7f2e8]/30 focus:border-[#f7f2e8]/30 focus:outline-none focus:ring-2 focus:ring-[#f7f2e8]/10"
|
class="form-input"
|
||||||
placeholder="https://share.example.com"
|
placeholder="https://share.example.com"
|
||||||
|
autocomplete="off"
|
||||||
value="{{ firebreak_public_base_url }}" />
|
value="{{ firebreak_public_base_url }}" />
|
||||||
<p class="mt-1.5 text-xs text-[#f7f2e8]/30">
|
<p class="mt-1.5 text-xs text-muted-foreground">
|
||||||
Your production domain for OAuth redirects. Leave blank on localhost — Firebreak will use <code class="font-mono text-[#f7f2e8]/40">http://localhost:8000</code> automatically.
|
Your production domain for OAuth redirects. Leave blank on localhost — Firebreak will use <code class="font-mono">http://localhost:8000</code> automatically.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary w-full mt-2">
|
<button type="submit" class="btn btn-primary w-full mt-2">
|
||||||
{{ "Save Forgejo settings" if reconfiguring else "Complete Setup" }}
|
{{ "Save Forgejo Settings" if reconfiguring else "Complete Setup" }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ from pathlib import Path
|
||||||
|
|
||||||
from jinja2_fragments.fastapi import Jinja2Blocks
|
from jinja2_fragments.fastapi import Jinja2Blocks
|
||||||
|
|
||||||
|
from app.config import get_settings
|
||||||
|
|
||||||
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
||||||
|
|
||||||
templates = Jinja2Blocks(directory=str(TEMPLATES_DIR))
|
templates = Jinja2Blocks(directory=str(TEMPLATES_DIR))
|
||||||
|
|
||||||
|
# Expose the debug flag to every template (gates the dev-only CSS live reload).
|
||||||
|
templates.env.globals["debug"] = get_settings().debug
|
||||||
|
|
|
||||||
21
web/dev.sh
21
web/dev.sh
|
|
@ -5,6 +5,7 @@ cd "$(dirname "$0")"
|
||||||
|
|
||||||
export DATABASE_URL="postgresql+asyncpg://firebreak:firebreak@localhost:5432/firebreak_db"
|
export DATABASE_URL="postgresql+asyncpg://firebreak:firebreak@localhost:5432/firebreak_db"
|
||||||
export FIREBREAK_PUBLIC_BASE_URL="http://localhost:8000"
|
export FIREBREAK_PUBLIC_BASE_URL="http://localhost:8000"
|
||||||
|
export DEBUG="true" # enables the dev-only CSS live reload
|
||||||
|
|
||||||
echo "Starting local Postgres and Adminer..."
|
echo "Starting local Postgres and Adminer..."
|
||||||
docker compose -f ../docker-compose.yml up -d db adminer
|
docker compose -f ../docker-compose.yml up -d db adminer
|
||||||
|
|
@ -16,11 +17,25 @@ echo "Starting Firebreak dev server..."
|
||||||
echo " FastAPI: http://localhost:8000"
|
echo " FastAPI: http://localhost:8000"
|
||||||
echo " Adminer: http://localhost:8080"
|
echo " Adminer: http://localhost:8080"
|
||||||
echo " PostgreSQL / db / firebreak / firebreak / firebreak_db"
|
echo " PostgreSQL / db / firebreak / firebreak / firebreak_db"
|
||||||
echo " CSS: watching app/static/css/input.css"
|
echo " CSS: watching app/templates and app/static/css/input.css"
|
||||||
|
|
||||||
./tailwindcss -i ./app/static/css/input.css -o ./app/static/css/output.css --watch &
|
# Rebuild Tailwind whenever templates or the input CSS change. `entr -d` exits
|
||||||
|
# when a new file appears in a watched directory, so the loop re-scans and picks
|
||||||
|
# up newly added templates without needing a manual restart.
|
||||||
|
if command -v entr >/dev/null 2>&1; then
|
||||||
|
(
|
||||||
|
while true; do
|
||||||
|
find app/templates app/static/css/input.css \
|
||||||
|
| entr -d ./tailwindcss -i ./app/static/css/input.css -o ./app/static/css/output.css
|
||||||
|
done
|
||||||
|
) &
|
||||||
|
else
|
||||||
|
echo " (entr not installed — falling back to 'tailwindcss --watch';"
|
||||||
|
echo " new template files will need a dev.sh restart. Install: brew install entr)"
|
||||||
|
./tailwindcss -i ./app/static/css/input.css -o ./app/static/css/output.css --watch &
|
||||||
|
fi
|
||||||
TW_PID=$!
|
TW_PID=$!
|
||||||
|
|
||||||
trap "kill $TW_PID 2>/dev/null" EXIT
|
trap 'kill "$TW_PID" 2>/dev/null; pkill -P "$TW_PID" 2>/dev/null' EXIT
|
||||||
|
|
||||||
uv run uvicorn app.main:app --reload --port 8000
|
uv run uvicorn app.main:app --reload --port 8000
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue