asd
This commit is contained in:
130
public/assets/css/styles.css
Executable file
130
public/assets/css/styles.css
Executable file
@@ -0,0 +1,130 @@
|
||||
/* =============================
|
||||
schwarzesbrett.online – Styles
|
||||
Struktur:
|
||||
1) CSS Reset & Base
|
||||
2) Design Tokens (Variablen)
|
||||
3) Utilities
|
||||
4) Layout (Container, Grid)
|
||||
5) Components (Buttons, Chips, Cards, Forms, Modal, Toast)
|
||||
6) Sections (Header, Hero, Footer)
|
||||
============================= */
|
||||
|
||||
/* 1) Reset & Base */
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji"; color: var(--color-text); background: var(--color-bg); }
|
||||
img { max-width: 100%; display: block; }
|
||||
a { color: inherit; text-decoration: none; }
|
||||
button { font: inherit; }
|
||||
input, textarea, select { font: inherit; color: inherit; }
|
||||
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
|
||||
|
||||
/* 2) Tokens */
|
||||
:root {
|
||||
--color-bg: #f8fafc; /* primary soft */
|
||||
--color-surface: #ffffff;
|
||||
--color-border: #e5e7eb; /* slate-200 */
|
||||
--color-muted: #64748b; /* slate-500 */
|
||||
--color-text: #0f172a; /* slate-900 */
|
||||
--color-primary: #111827; /* neutral-900 */
|
||||
--color-primary-contrast: #ffffff;
|
||||
--color-accent: #f59e0b; /* amber-500 */
|
||||
--color-accent-soft: #fff7ed; /* amber-50 */
|
||||
--radius-sm: 10px;
|
||||
--radius-md: 14px;
|
||||
--radius-lg: 18px;
|
||||
--shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.06);
|
||||
--maxw: 1100px;
|
||||
}
|
||||
|
||||
/******************** 3) Utilities ********************/
|
||||
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
|
||||
.hide { display: none !important; }
|
||||
.text-muted { color: var(--color-muted); }
|
||||
.grid { display: grid; gap: 16px; }
|
||||
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
|
||||
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
|
||||
@media (max-width: 900px){ .grid-2, .grid-3 { grid-template-columns: 1fr; } }
|
||||
.mt-1{margin-top:4px} .mt-2{margin-top:8px} .mt-3{margin-top:12px} .mt-4{margin-top:16px}
|
||||
.mb-2{margin-bottom:8px} .mb-4{margin-bottom:16px}
|
||||
.p-2{padding:8px} .p-3{padding:12px} .p-4{padding:16px} .p-6{padding:24px}
|
||||
.rounded { border-radius: var(--radius-sm); } .rounded-md { border-radius: var(--radius-md); } .rounded-lg { border-radius: var(--radius-lg); }
|
||||
.border { border: 1px solid var(--color-border); }
|
||||
.surface { background: var(--color-surface); }
|
||||
.shadow-card { box-shadow: var(--shadow-card); }
|
||||
.center { display:flex; align-items:center; justify-content:center; }
|
||||
.badge { display:inline-block; padding: 4px 8px; border:1px solid var(--color-border); border-radius: 999px; font-size: 12px; }
|
||||
.clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
|
||||
.clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
|
||||
|
||||
/******************** 4) Layout ********************/
|
||||
.header { position: sticky; top:0; z-index: 40; backdrop-filter: blur(4px); background: rgba(255,255,255,0.85); border-bottom:1px solid var(--color-border); }
|
||||
.header .nav { display:flex; gap:24px; align-items:center; }
|
||||
.header .brand { display:flex; align-items:center; gap:8px; font-weight:600; font-size:18px; letter-spacing: -0.2px; }
|
||||
.header .menu-btn { display:none; border-radius: 10px; padding:8px; }
|
||||
@media (max-width: 800px){ .header .nav { display:none; } .header .menu-btn { display:block; } }
|
||||
.mobile-menu { display:none; border-top:1px solid var(--color-border); }
|
||||
.mobile-menu.open { display:block; }
|
||||
|
||||
.hero { border-bottom:1px solid var(--color-border); background: var(--color-surface); }
|
||||
.hero h1 { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; font-weight: 700; }
|
||||
.hero .sub { color: var(--color-muted); }
|
||||
|
||||
.footer { border-top:1px solid var(--color-border); font-size:14px; color: var(--color-muted); }
|
||||
|
||||
/******************** 5) Components ********************/
|
||||
/* Buttons */
|
||||
.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius: var(--radius-sm); border:1px solid transparent; cursor:pointer; background: var(--color-primary); color: var(--color-primary-contrast); }
|
||||
.btn:hover { opacity:.92; }
|
||||
.btn.outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
|
||||
.btn.ghost { background: transparent; color: var(--color-text); }
|
||||
.btn.block { display:flex; width:100%; justify-content:center; }
|
||||
|
||||
/* Chips */
|
||||
.chips { display:flex; gap:8px; overflow:auto; padding-bottom:4px; }
|
||||
.chip { padding:8px 12px; border:1px solid var(--color-border); background:#fff; border-radius:999px; cursor:pointer; white-space:nowrap; }
|
||||
.chip.active { background: var(--color-primary); color: var(--color-primary-contrast); }
|
||||
|
||||
/* Note Card (Korkbrett-Gefühl) */
|
||||
.note { background:#fffdf6; border:1px solid var(--color-border); border-radius: var(--radius-sm); position:relative; }
|
||||
.note.pin::before{ content:""; position:absolute; width:12px; height:12px; background:#ef4444; border-radius:999px; top:-6px; left:50%; transform:translateX(-50%); box-shadow:0 1px 0 rgba(0,0,0,.15) inset; }
|
||||
|
||||
/* Card */
|
||||
.card { background: var(--color-surface); border:1px solid var(--color-border); border-radius: var(--radius-md); overflow:hidden; box-shadow: var(--shadow-card); }
|
||||
.card .img { height: 180px; width: 100%; object-fit: cover; display:block; }
|
||||
.card .body { padding:16px; }
|
||||
.card .row { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; color: var(--color-muted); }
|
||||
.card h3 { margin:8px 0 0; font-size:16px; }
|
||||
|
||||
/* Results List */
|
||||
.results { display:grid; gap:16px; grid-template-columns: repeat(3, minmax(0,1fr)); }
|
||||
@media (max-width: 1000px){ .results { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 640px){ .results { grid-template-columns: 1fr; } }
|
||||
|
||||
/* Forms */
|
||||
.label { display:block; font-size:13px; color:var(--color-muted); }
|
||||
.input, .select, .textarea { width:100%; padding:10px 12px; border:1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; }
|
||||
.textarea { min-height: 120px; resize: vertical; }
|
||||
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(17,24,39,.12); }
|
||||
.form-row { display:grid; gap:12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
|
||||
@media (max-width: 800px){ .form-row { grid-template-columns: 1fr; } }
|
||||
|
||||
/* Search Bar */
|
||||
.search { display:grid; gap:12px; grid-template-columns: 1fr 160px 140px; }
|
||||
@media (max-width: 720px){ .search { grid-template-columns: 1fr; } }
|
||||
|
||||
/* Modal */
|
||||
.modal { position: fixed; inset:0; background: rgba(0,0,0,.4); display:none; align-items:center; justify-content:center; padding:16px; }
|
||||
.modal.open { display:flex; }
|
||||
.modal .panel { width:100%; max-width: 720px; background:#fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 20px; }
|
||||
.modal .panel .head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; }
|
||||
|
||||
/* Toast */
|
||||
.toast { position:fixed; top:16px; left:50%; transform:translateX(-50%); background: var(--color-primary); color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-card); display:none; }
|
||||
.toast.show { display:block; }
|
||||
|
||||
/* CTA Section */
|
||||
.cta { background: var(--color-accent-soft); border-block:1px solid #fcd34d55; }
|
||||
|
||||
/* Icon util */
|
||||
.icon { width: 20px; height: 20px; display:inline-block; }
|
||||
175
public/page/retool/styleguide.html
Executable file
175
public/page/retool/styleguide.html
Executable file
@@ -0,0 +1,175 @@
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>schwarzesbrett.online – Styleguide & Komponenten</title>
|
||||
<link rel="stylesheet" href="./assets/styles.css" />
|
||||
<style> .sg { padding-block: 24px; } .sg h2 { font-size: 20px; font-weight: 600; margin: 24px 0 12px; } .row{display:flex;gap:12px;flex-wrap:wrap;} </style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<div class="container" style="display:flex;align-items:center;justify-content:space-between;height:64px;">
|
||||
<div class="brand"><span style="font-size:22px">🧾</span> schwarzesbrett<span style="color:#94a3b8">.online</span></div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="container sg">
|
||||
<!-- Buttons -->
|
||||
<h2>Buttons</h2>
|
||||
<div class="row">
|
||||
<button class="btn">Primär</button>
|
||||
<button class="btn outline">Outline</button>
|
||||
<button class="btn ghost">Ghost</button>
|
||||
<button class="btn block" style="max-width:260px">Block Button</button>
|
||||
</div>
|
||||
|
||||
<!-- Chips -->
|
||||
<h2>Chips</h2>
|
||||
<div class="chips">
|
||||
<button class="chip">Alle</button>
|
||||
<button class="chip active">Flohmarkt</button>
|
||||
<button class="chip">Jobs</button>
|
||||
<button class="chip">Nachbarschaftshilfe</button>
|
||||
<button class="chip">Veranstaltungen</button>
|
||||
</div>
|
||||
|
||||
<!-- Formulare -->
|
||||
<h2>Formular-Elemente</h2>
|
||||
<form class="grid" style="max-width:820px;">
|
||||
<div class="form-row">
|
||||
<div>
|
||||
<label class="label" for="f-title">Titel</label>
|
||||
<input id="f-title" class="input mt-1" placeholder="z. B. Fahrrad zu verkaufen" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="f-cat">Kategorie</label>
|
||||
<select id="f-cat" class="select mt-1">
|
||||
<option>Flohmarkt</option>
|
||||
<option>Jobs</option>
|
||||
<option>Nachbarschaftshilfe</option>
|
||||
<option>Veranstaltungen</option>
|
||||
<option>Immobilien</option>
|
||||
<option>Sonstiges</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="f-desc">Beschreibung</label>
|
||||
<textarea id="f-desc" class="textarea mt-1" rows="4" placeholder="Kurze, klare Beschreibung…"></textarea>
|
||||
</div>
|
||||
<div class="form-row" style="grid-template-columns: 120px 1fr 1fr;">
|
||||
<div>
|
||||
<label class="label" for="f-zip">PLZ</label>
|
||||
<input id="f-zip" class="input mt-1" maxlength="5" inputmode="numeric" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="f-city">Ort</label>
|
||||
<input id="f-city" class="input mt-1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="f-contact">Kontakt</label>
|
||||
<input id="f-contact" class="input mt-1" placeholder="E‑Mail oder Telefon" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="f-img">Bild‑URL</label>
|
||||
<input id="f-img" class="input mt-1" placeholder="https://…" />
|
||||
</div>
|
||||
<div class="row" style="justify-content:flex-end;">
|
||||
<button type="button" class="btn outline">Abbrechen</button>
|
||||
<button class="btn">Veröffentlichen</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Inserat-Karte -->
|
||||
<h2>Inserat – Karte</h2>
|
||||
<article class="card" style="max-width:720px;">
|
||||
<img class="img" src="https://images.unsplash.com/photo-1520975693416-35e09df6f242?q=80&w=1200&auto=format&fit=crop" alt="Beispielbild">
|
||||
<div class="body">
|
||||
<div class="row"><span class="badge">Flohmarkt</span><span>12.08.2025</span></div>
|
||||
<h3>Mountainbike zu verkaufen</h3>
|
||||
<p class="clamp-3 mt-1">Gut gepflegtes 26'' MTB, neue Bremsen, Probefahrt möglich. Abholung in Berlin‑Mitte. Preis VB.</p>
|
||||
<div class="row mt-2" style="font-size:14px;">
|
||||
<div>📍 10115 Berlin</div>
|
||||
<div>läuft ab: 11.09.2025</div>
|
||||
</div>
|
||||
<div class="row mt-2" style="justify-content:flex-start;gap:12px;">
|
||||
<a href="mailto:demo@example.com" class="btn outline">Kontakt</a>
|
||||
<button class="btn ghost" style="font-size:14px;">Merken</button>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<!-- Ergebnisliste (Grid aus Karten) -->
|
||||
<h2>Ergebnisliste</h2>
|
||||
<div class="results">
|
||||
<article class="card">
|
||||
<div class="body">
|
||||
<div class="row"><span class="badge">Jobs</span><span>15.08.2025</span></div>
|
||||
<h3>Babysitter gesucht</h3>
|
||||
<p class="clamp-2 mt-1">Suche zuverlässige Betreuung für 2 Abende/Woche.</p>
|
||||
<div class="row mt-2" style="font-size:14px;">
|
||||
<div>📍 50667 Köln</div>
|
||||
<div>läuft ab: 14.09.2025</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<article class="card">
|
||||
<div class="body">
|
||||
<div class="row"><span class="badge">Nachbarschaftshilfe</span><span>09.08.2025</span></div>
|
||||
<h3>Bohrmaschine leihen</h3>
|
||||
<p class="clamp-2 mt-1">Brauche am Wochenende eine Bohrmaschine – Gegen Kuchen 😀</p>
|
||||
<div class="row mt-2" style="font-size:14px;">
|
||||
<div>📍 22767 Hamburg</div>
|
||||
<div>läuft ab: 08.09.2025</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<article class="card">
|
||||
<div class="body">
|
||||
<div class="row"><span class="badge">Immobilien</span><span>07.08.2025</span></div>
|
||||
<h3>1‑Zimmer Wohnung</h3>
|
||||
<p class="clamp-2 mt-1">Helle 35m², Nähe S‑Bahn, ab 01.10. frei.</p>
|
||||
<div class="row mt-2" style="font-size:14px;">
|
||||
<div>📍 80331 München</div>
|
||||
<div>läuft ab: 06.09.2025</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<!-- Modal & Toast Vorschau -->
|
||||
<h2>Modal & Toast</h2>
|
||||
<div class="row">
|
||||
<button id="openModalDemo" class="btn">Modal öffnen</button>
|
||||
<button id="showToastDemo" class="btn outline">Toast zeigen</button>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- Modal Demo -->
|
||||
<div id="modalDemo" class="modal" role="dialog" aria-modal="true" aria-labelledby="modalTitle">
|
||||
<div class="panel">
|
||||
<div class="head">
|
||||
<h3 id="modalTitle" style="font-weight:600;">Beispiel-Modal</h3>
|
||||
<button id="closeModalDemo" class="btn ghost" aria-label="Schließen">✕</button>
|
||||
</div>
|
||||
<p>Dies ist ein Beispiel-Modal. Es verwendet die gleichen Klassen wie der „Inserat erstellen“-Dialog.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="toastDemo" class="toast">Hallo! Ich bin ein Toast.</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container" style="padding-block:24px;">© 2025 schwarzesbrett.online</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
const $ = s=> document.querySelector(s);
|
||||
$('#openModalDemo').addEventListener('click', ()=> $('#modalDemo').classList.add('open'));
|
||||
$('#closeModalDemo').addEventListener('click', ()=> $('#modalDemo').classList.remove('open'));
|
||||
$('#modalDemo').addEventListener('click', (e)=>{ if(e.target===e.currentTarget) e.currentTarget.classList.remove('open'); });
|
||||
$('#showToastDemo').addEventListener('click', ()=>{ const t=$('#toastDemo'); t.classList.add('show'); setTimeout(()=> t.classList.remove('show'), 2000); });
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user