10 Commits

Author SHA1 Message Date
dtoro
9e3443079f Sandbox artifact rendering via iframe + CSP
Splits /p/{slug} into a trusted wrapper (HTML with a sandboxed iframe)
and /p/{slug}/raw (the artifact itself, served with Content-Security-Policy:
sandbox). Artifact JS now runs in an opaque origin and can't read admin
cookies or make same-origin credentialed requests to /a/* or /api/*.
Password gating is enforced on both routes so /raw can't be used to bypass
the unlock flow.
2026-04-23 13:59:50 +02:00
2b0ab836fe ui: grayscale palette, square corners throughout
Removes all indigo/emerald/amber/red accent colors — everything now
uses the slate ramp. Strips rounded corners from containers, cards,
buttons, inputs, badges; the only remaining rounded element is the
circular logo image itself.

Affordances preserved without color:
- Primary buttons (Publish/Log in/Unlock/Copy link flash): bg-slate-100
  on dark background for high contrast
- Secondary buttons (Copy/Open): bg-slate-800
- Destructive (Delete): outlined with border-slate-500 so it reads as
  different from secondary
- Error messages: uppercase "ERROR" prefix + left border accent
- Success flash / ready drop state: uppercase "PUBLISHED"/"READY" labels
  and solid border-slate-200 vs. the dashed/empty state
- Protected lock: amber badge swapped for a slate-100 badge overlay
- Chart: slate-200 line on slate-400/20 fill instead of indigo

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:28:21 +02:00
908b1381ba ui: center unlock page with logo and title
Password prompt for protected artifacts now matches the login screen:
viewport-centered, logo + "Artifacto" title above the form. Lock icon is
now a badge overlaid on the logo so the two visuals combine instead of
stacking. Drops the header/footer chrome since visitors here aren't
logged in and have no navigation to reach.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:21:07 +02:00
1af1c3efe2 ui: center login page, add logo and title
Login now fills the viewport (min-h-screen flex items-center/justify-center)
with the logo, "Artifacto" title, and tagline above the password form.
Drops the header/footer chrome on this page since there's nothing to link
to before sign-in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:15:42 +02:00
b1ff3ca80f ui: stronger drop-zone affordance after file load
Drop zone now has three explicit visual states: empty (default cloud +
instructions), ready (large file icon with a checkmark badge, filename in
big, size + click-to-replace + remove button, solid emerald border and
tinted background), and error (red icon + message, auto-clears after
2.5s). Covers both drag-drop and click-to-browse flows, validates size
client-side, and scales up slightly during dragover.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:13:33 +02:00
29c9d94a88 ui: swap logo for the new portrait, circular-masked
Replaces the mascot with the sketched portrait screenshot, center-cropped
to square and masked to a circle with anti-aliased edges so the PNG itself
is rounded (not just CSS). Regenerates logo.png (256), apple-touch-icon
(180), and favicon-32 at the new proportions. Adds .DS_Store to gitignore.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:09:20 +02:00
2da9532709 ui: add jackal-scribe logo and favicons
Bundles the artifacto mascot as /static/logo.png (256×256),
/static/favicon-32.png and /static/apple-touch-icon.png. Header
shows the logo as a small rounded avatar; browser tabs get the
favicon. Replaces the .keep placeholder.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:01:27 +02:00
bbde491f4b ui: replace HTML textarea with drag-and-drop file zone
Publish form now uses a single dashed drop area for .html uploads
(click-to-browse fallback included). Removes the paste-HTML textarea
since real artifacts always come from a file. Server-side multipart
handling is unchanged; the `file` form field already took precedence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 22:39:31 +02:00
claudio
e74439b509 Auto-login from trusted reverse-proxy Authentik headers
When SSO_GATEWAY_SECRET is set and an incoming request carries both
X-Artifacto-Gateway (matching the secret) and X-Authentik-Username, the
admin middleware mints a session automatically so Authentik-authenticated
users skip the password form. Missing or wrong gateway header falls back
to the password-login flow, so peers that can reach the container
directly (bypassing the reverse proxy) cannot spoof Authentik identities.
2026-04-22 22:21:20 +02:00
c7d7ee287c initial commit: Artifacto v0.1
Self-hosted HTML artifact publisher. Single Go binary, SQLite metadata,
HTML on disk. Features: password-protected artifacts, per-artifact expiration,
admin dashboard with view metrics (privacy-preserving daily-salt visitor hash,
sparklines, 30-day SVG chart, top referrers), rate-limited unlock endpoint.

Packaged as a Docker image (two-stage, CGO_ENABLED=0, pure-Go SQLite).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:45:57 +02:00