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>
This commit is contained in:
39
internal/server/templates/layout.html
Normal file
39
internal/server/templates/layout.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{{ define "head" }}<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ . }} · Artifacto</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
||||
<style>
|
||||
:root { color-scheme: dark; }
|
||||
body { font-family: ui-sans-serif, system-ui, sans-serif; }
|
||||
.spark { font-variant-numeric: tabular-nums; letter-spacing: 2px; }
|
||||
textarea { font-family: ui-monospace, SF Mono, Menlo, monospace; }
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen bg-slate-950 text-slate-100">
|
||||
{{ end }}
|
||||
|
||||
{{ define "header" }}
|
||||
<header class="border-b border-slate-800">
|
||||
<div class="max-w-6xl mx-auto px-6 py-4 flex items-center justify-between">
|
||||
<a href="/" class="flex items-center gap-2 font-semibold text-lg">
|
||||
<span class="inline-block w-2 h-2 rounded-full bg-indigo-400"></span>
|
||||
Artifacto
|
||||
</a>
|
||||
{{ if . }}
|
||||
<form method="post" action="/logout"><button class="text-sm text-slate-400 hover:text-slate-100">Log out</button></form>
|
||||
{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
<footer class="max-w-6xl mx-auto px-6 py-8 text-xs text-slate-500">
|
||||
Artifacto · self-hosted · <a class="underline" href="/healthz">/healthz</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user