Compare commits
2 Commits
34b1d8d2a6
...
77de1627c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77de1627c5 | ||
|
|
374f4ade31 |
245
internal/web/static/app.css
Normal file
245
internal/web/static/app.css
Normal file
@@ -0,0 +1,245 @@
|
||||
/* Deklarix — eigenes, schlankes Stylesheet auf Basis der Design-Tokens
|
||||
aus dem enconf Enterprise Light Theme (design/enterprise.css): gleiche
|
||||
Marke (Primärblau #1677ff, Inter, Radius-Skala), aber ohne dessen
|
||||
Ant-Design-/Desktop-Sidebar-Layout, das für Deklarix nicht passt.
|
||||
Mobile-first: Basis-Stile gelten fürs Telefon, @media (min-width)
|
||||
erweitert für größere Bildschirme. */
|
||||
|
||||
@import url('/static/inter.css');
|
||||
|
||||
:root {
|
||||
--branding-primary: #1677ff;
|
||||
--radius: 6px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 10px;
|
||||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
--shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||
|
||||
--color-bg: #f8fafc;
|
||||
--color-text: #334155;
|
||||
--color-heading: #0f172a;
|
||||
--color-border: #e2e8f0;
|
||||
--color-muted: #64748b;
|
||||
|
||||
--color-hoch: #b91c1c;
|
||||
--color-hoch-bg: #fef2f2;
|
||||
--color-mittel: #b45309;
|
||||
--color-mittel-bg: #fffbeb;
|
||||
--color-niedrig: #166534;
|
||||
--color-niedrig-bg: #f0fdf4;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
color: var(--color-heading);
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.02em;
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--branding-primary);
|
||||
}
|
||||
|
||||
/* Container: volle Breite + Innenabstand auf dem Handy, zentriert mit
|
||||
fester Breite ab Tablet-Größe aufwärts. */
|
||||
.page {
|
||||
padding: 16px;
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
/* Formulare: großzügige Touch-Ziele (min. 44px Höhe), volle Breite auf
|
||||
dem Handy. */
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 500;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-heading);
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
input, select, textarea, button {
|
||||
font: inherit;
|
||||
font-size: 16px; /* verhindert Auto-Zoom beim Fokussieren auf iOS */
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
background: #fff;
|
||||
color: var(--color-text);
|
||||
min-height: 44px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-height: 120px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
input:focus, select:focus, textarea:focus {
|
||||
outline: 2px solid var(--branding-primary);
|
||||
outline-offset: 1px;
|
||||
border-color: var(--branding-primary);
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 16px;
|
||||
padding: 12px 20px;
|
||||
min-height: 44px;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
background: var(--branding-primary);
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
filter: brightness(0.94);
|
||||
}
|
||||
|
||||
button:active {
|
||||
filter: brightness(0.88);
|
||||
}
|
||||
|
||||
nav button {
|
||||
margin-top: 0;
|
||||
background: transparent;
|
||||
color: var(--color-muted);
|
||||
border: 1px solid var(--color-border);
|
||||
box-shadow: none;
|
||||
min-height: 36px;
|
||||
padding: 6px 14px;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.hinweis {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--color-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.disclaimer {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--color-muted);
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding-top: 12px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.fehler {
|
||||
background: var(--color-hoch-bg);
|
||||
color: var(--color-hoch);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px;
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.rueckfrage {
|
||||
background: var(--color-mittel-bg);
|
||||
color: var(--color-mittel);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.keine-findings {
|
||||
background: var(--color-niedrig-bg);
|
||||
color: var(--color-niedrig);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.archiviert {
|
||||
background: var(--color-niedrig-bg);
|
||||
color: var(--color-niedrig);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.findings {
|
||||
list-style: none;
|
||||
margin: 0 0 16px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.finding {
|
||||
border-radius: var(--radius-md);
|
||||
padding: 12px 14px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.finding p {
|
||||
margin: 6px 0 0;
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.finding-hoch {
|
||||
background: var(--color-hoch-bg);
|
||||
border-left: 4px solid var(--color-hoch);
|
||||
}
|
||||
|
||||
.finding-mittel {
|
||||
background: var(--color-mittel-bg);
|
||||
border-left: 4px solid var(--color-mittel);
|
||||
}
|
||||
|
||||
.finding-niedrig {
|
||||
background: var(--color-niedrig-bg);
|
||||
border-left: 4px solid var(--color-niedrig);
|
||||
}
|
||||
|
||||
/* Ab hier mehr Platz (Tablet/Desktop) — der Container bekommt spürbaren
|
||||
Rand statt volle Breite, sonst bleibt alles identisch. */
|
||||
@media (min-width: 640px) {
|
||||
.page {
|
||||
padding: 32px 24px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
BIN
internal/web/static/fonts/inter-latin.woff2
Normal file
BIN
internal/web/static/fonts/inter-latin.woff2
Normal file
Binary file not shown.
13
internal/web/static/inter.css
Normal file
13
internal/web/static/inter.css
Normal file
@@ -0,0 +1,13 @@
|
||||
/* Inter, selbst gehostet (aus enconf übernommen) — nur der "latin"-Subset
|
||||
(U+0000-00FF u.a.), das deckt deutsche Umlaute und ß bereits ab, ohne
|
||||
Zeichensätze für Kyrillisch/Griechisch/Vietnamesisch mitzuladen, die
|
||||
Deklarix nicht braucht. Eine Datei für alle Schriftschnitte (variable
|
||||
Font), daher font-weight als Bereich. */
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
src: url(/static/fonts/inter-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>{{template "head" .}}</head>
|
||||
<body>
|
||||
{{template "nav" .}}
|
||||
<div class="page">
|
||||
<h1>Pre-Publish-Prüfung</h1>
|
||||
<p>Caption und Plattform eingeben, um auf Kennzeichnungsrisiken zu prüfen.</p>
|
||||
|
||||
@@ -41,6 +42,7 @@
|
||||
</form>
|
||||
|
||||
<div id="ergebnis"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.Title}} — Deklarix</title>
|
||||
<link rel="stylesheet" href="/static/app.css">
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="de">
|
||||
<head>{{template "head" .}}</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<h1>Anmelden</h1>
|
||||
{{if .Error}}<p class="fehler">{{.Error}}</p>{{end}}
|
||||
<form method="post" action="/login">
|
||||
@@ -14,6 +15,7 @@
|
||||
<button type="submit">Anmelden</button>
|
||||
</form>
|
||||
<p><a href="/register">Noch kein Konto? Registrieren</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="de">
|
||||
<head>{{template "head" .}}</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<h1>Registrieren</h1>
|
||||
{{if .Error}}<p class="fehler">{{.Error}}</p>{{end}}
|
||||
<form method="post" action="/register">
|
||||
@@ -25,6 +26,7 @@
|
||||
<button type="submit">Konto anlegen</button>
|
||||
</form>
|
||||
<p><a href="/login">Schon ein Konto? Anmelden</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
|
||||
@@ -42,6 +42,20 @@ case "$1" in
|
||||
chown "root:$SERVICE_USER" "$CONFIG_DIR/deklarix.env"
|
||||
fi
|
||||
|
||||
# ─── Healing: fehlende Variablen aus älteren Installationen ───
|
||||
# deklarix.env wird bei Upgrades nie überschrieben (Secrets/
|
||||
# Anpassungen bleiben erhalten) — Variablen, die erst nach einer
|
||||
# Erstinstallation dazugekommen sind, fehlen dort sonst schlicht
|
||||
# und lassen den Dienst mit einem für den Admin überraschenden
|
||||
# Fehler abbrechen (z. B. RULES_DIR fehlt -> main.go sucht Regeln
|
||||
# im falschen Verzeichnis, obwohl DATABASE_URL längst gesetzt
|
||||
# war). Bekannte Variablen mit unkritischem Default werden hier
|
||||
# ergänzt, falls sie fehlen — nie überschrieben, nur angehängt.
|
||||
if [ -f "$CONFIG_DIR/deklarix.env" ]; then
|
||||
grep -q '^RULES_DIR=' "$CONFIG_DIR/deklarix.env" || \
|
||||
echo "RULES_DIR=/usr/share/deklarix/rules" >> "$CONFIG_DIR/deklarix.env"
|
||||
fi
|
||||
|
||||
systemctl daemon-reload 2>/dev/null || true
|
||||
systemctl enable deklarix.service >/dev/null 2>&1 || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user