cms: dateibasiert + Editor im Decap/Sveltia-Look

- CMS liest/schreibt jetzt die echten content/**/*.md (gray-matter) statt DB:
  alle bestehenden Beiträge, Seiten und Rubriken erscheinen und sind editierbar.
  Supabase nur noch für Login.
- Admin neu: Collections-Sidebar (Beiträge/Seiten/Rubriken), an OPENBUREAU-Theme
  angeglichen (Newsreader-Serif, Creme, Terracotta, dunkle Topbar).
- Alle Frontmatter-Felder inkl. Farb-Dropdown mit Farbpunkten (Palette aus
  custom.css), Layout, Tags, summary, cover_image, external, toc, draft.
- Markdown-Toolbar: Fett/Kursiv/Unterstrichen/H2/H3/Link/Bild-Upload/Liste/Zitat/Code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 11:51:49 +02:00
parent e7d820b83c
commit e2d986356c
12 changed files with 526 additions and 377 deletions
+112 -48
View File
@@ -1,70 +1,134 @@
@import url('https://fonts.bunny.net/css?family=newsreader:400,500,600,700|inter:400,500,600|space-grotesk:500,700|ibm-plex-mono:400,500');
:root {
--bg: #14110e;
--panel: #1d1a16;
--line: #322c25;
--text: #ece6dd;
--muted: #8a8078;
--accent: #c8543a;
--ok: #5a8a4a;
--serif: 'Newsreader', Georgia, serif;
--sans: 'Inter', system-ui, -apple-system, sans-serif;
--display: 'Space Grotesk', 'Inter', sans-serif;
--mono: 'IBM Plex Mono', ui-monospace, monospace;
--bg: hsl(35 14% 96%);
--panel: #fffdf9;
--panel-2: hsl(35 14% 93%);
--line: hsl(35 14% 86%);
--text: hsl(25 18% 12%);
--muted: hsl(25 8% 42%);
--accent: #b54a2c;
--accent-soft: #d97a5a;
--dark: #191919;
--dark-text: #f0f0f0;
--dark-muted: #a9a9a9;
--ok: #5d7d4b;
--radius: 11px;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
margin: 0;
font: 15px/1.5 -apple-system, system-ui, sans-serif;
background: var(--bg);
font-family: var(--sans);
font-size: 14.5px;
color: var(--text);
background: var(--bg);
}
.center { display: grid; place-items: center; min-height: 100vh; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.login { display: flex; flex-direction: column; gap: 12px; width: 300px; }
.login h1 { font-size: 18px; margin: 0 0 8px; letter-spacing: .08em; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: var(--text); }
.muted { color: var(--muted); }
.center { display: grid; place-items: center; height: 100%; }
input, select, textarea, button {
font: inherit; color: var(--text);
background: #110e0b; border: 1px solid var(--line);
border-radius: 6px; padding: 8px 10px;
/* ── Login ── */
.login {
background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
padding: 36px 32px; width: 320px; display: flex; flex-direction: column; gap: 12px;
box-shadow: 0 12px 40px -20px rgba(0,0,0,.3);
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); }
button { background: #2a241e; cursor: pointer; }
button:hover { border-color: var(--accent); }
.login-brand { font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 20px; }
.login-sub { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: 10px; }
.err { color: var(--accent); margin: 4px 0 0; font-size: 13px; }
/* ── Inputs ── */
input, select, textarea {
background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(181,74,44,.12); }
button {
background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
padding: 9px 16px; cursor: pointer; font-weight: 500; transition: .12s;
}
button:hover { border-color: var(--accent-soft); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.err { color: var(--accent); margin: 0; }
button.primary:hover { background: #a23f23; }
button.ghost { background: transparent; border-color: transparent; color: var(--dark-muted); }
button.ghost:hover { color: #fff; border-color: var(--dark-muted); }
.app { display: flex; flex-direction: column; height: 100vh; }
header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.pad { padding: 24px; }
/* ── App-Rahmen ── */
.app { display: flex; flex-direction: column; height: 100%; }
.topbar {
display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 54px;
background: var(--dark); color: var(--dark-text); flex: none;
}
.topbar .logo { font-family: var(--display); font-weight: 700; letter-spacing: .14em; }
.topbar .logo-sub { font-family: var(--serif); font-style: italic; color: var(--dark-muted); font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar .muted { color: var(--dark-muted); font-size: 13px; }
.body { display: flex; flex: 1; min-height: 0; }
aside { width: 260px; border-right: 1px solid var(--line); padding: 12px; overflow: auto; }
.new { width: 100%; margin-bottom: 12px; }
/* ── Sidebar ── */
aside { width: 280px; flex: none; border-right: 1px solid var(--line); background: var(--panel-2); padding: 14px; overflow: auto; }
.new { width: 100%; margin-bottom: 16px; background: var(--accent); border-color: var(--accent); color: #fff; }
.new:hover { background: #a23f23; }
.group { margin-bottom: 18px; }
.group-title { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 6px 7px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px; cursor: pointer; }
.list li:hover { background: #221d18; }
.list li.active { background: #2a241e; }
.list .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .s { color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.published { background: var(--ok); }
.dot.draft { background: #b89030; }
.list li { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; cursor: pointer; }
.list li:hover { background: var(--panel); }
.list li.active { background: var(--panel); box-shadow: inset 2px 0 0 var(--accent); }
.list .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.12); }
.list .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 15px; }
.list .s { font-size: 11px; color: var(--muted); }
.draft-tag { font-style: normal; font-size: 10px; color: #b8902f; margin-left: 6px; font-family: var(--sans); }
main { flex: 1; min-width: 0; }
.empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-family: var(--serif); font-style: italic; padding: 24px; text-align: center; }
.empty.small { font-size: 14px; }
/* ── Editor ── */
.editor { display: flex; height: 100%; }
.fields { width: 50%; padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); flex: 1; }
label.sm { flex: 0 0 140px; }
label.xs { flex: 0 0 90px; }
label.grow { flex: 1; }
label input, label select, label textarea { color: var(--text); }
textarea { flex: 1; min-height: 240px; resize: vertical; font-family: ui-monospace, monospace; }
.actions { display: flex; gap: 8px; }
.fields { width: 52%; padding: 22px 24px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; align-items: flex-end; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); flex: 1; }
label.sm { flex: 0 0 150px; } label.xs { flex: 0 0 110px; }
label.check { flex-direction: row; align-items: center; gap: 7px; flex: 0 0 auto; white-space: nowrap; }
label.check input { width: auto; }
label.big input { font-family: var(--serif); font-size: 22px; font-weight: 600; padding: 11px 13px; }
.preview { width: 50%; border-left: 1px solid var(--line); }
.preview iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.path-row { display: flex; gap: 12px; align-items: flex-end; }
.pathlabel { font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; }
.toast { position: fixed; bottom: 18px; right: 18px; padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.colorpick { display: flex; align-items: center; gap: 8px; }
.colorpick .swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.colorpick select { flex: 1; }
/* ── Markdown-Editor ── */
.md { display: flex; flex-direction: column; flex: 1; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.toolbar { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; padding: 7px 9px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.tb { padding: 5px 9px; border: 1px solid transparent; background: transparent; border-radius: 6px; min-width: 30px; font-size: 13px; line-height: 1; }
.tb:hover { background: var(--panel); border-color: var(--line); }
.toolbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.md textarea { border: none; border-radius: 0; min-height: 320px; flex: 1; resize: vertical; font-family: var(--serif); font-size: 16px; line-height: 1.7; padding: 16px; }
.md textarea:focus { box-shadow: none; }
.actions { display: flex; gap: 9px; padding-top: 4px; }
/* ── Vorschau-Pane ── */
.preview { width: 48%; border-left: 1px solid var(--line); background: #fff; }
.preview iframe { width: 100%; height: 100%; border: 0; }
/* ── Toast ── */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 11px 18px; border-radius: 9px; color: #fff; cursor: pointer; box-shadow: 0 10px 30px -12px rgba(0,0,0,.4); font-size: 13.5px; max-width: 380px; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--accent); }