Initial commit: SvelteKit PWA + PocketBase Setup für checkflo.de
- Landing Page mit Logo, Hero, Features, Steps, CTA - QR-Scan Checklisten-Flow (/s/[id]) - PocketBase Client (pb.ts) - Makefile für DS-Deployment (SSH) - Setup-Scripts: setup-db.sh, seed-demo.sh
This commit is contained in:
commit
f2615c9e07
26 changed files with 2745 additions and 0 deletions
31
app/src/routes/+layout.svelte
Normal file
31
app/src/routes/+layout.svelte
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<script lang="ts">
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>checkflo — Digitale HACCP-Protokolle</title>
|
||||
</svelte:head>
|
||||
|
||||
{@render children()}
|
||||
|
||||
<style>
|
||||
:global(*) {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:global(body) {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
color: #1a1a2e;
|
||||
background: #fff;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
:global(a) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
281
app/src/routes/+page.svelte
Normal file
281
app/src/routes/+page.svelte
Normal file
|
|
@ -0,0 +1,281 @@
|
|||
<script lang="ts">
|
||||
import logo from '$lib/assets/checkflo-logo.png';
|
||||
|
||||
const features = [
|
||||
{
|
||||
icon: '📱',
|
||||
title: 'Kein App-Store',
|
||||
text: 'QR-Code scannen — fertig. Die App öffnet direkt im Browser, ohne Installation.'
|
||||
},
|
||||
{
|
||||
icon: '📶',
|
||||
title: 'Offline-fähig',
|
||||
text: 'Kein Empfang im Keller? Kein Problem. Daten werden lokal gespeichert und automatisch synchronisiert.'
|
||||
},
|
||||
{
|
||||
icon: '📄',
|
||||
title: 'PDF auf Knopfdruck',
|
||||
text: 'Monatsprotokolle für Lebensmittelkontrolleure automatisch generieren — rechtssicher und vollständig.'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<!-- NAV -->
|
||||
<nav>
|
||||
<a href="/" class="logo">
|
||||
<img src={logo} alt="checkflo" height="36" />
|
||||
</a>
|
||||
<a href="/admin" class="btn-nav">Anmelden</a>
|
||||
</nav>
|
||||
|
||||
<!-- HERO -->
|
||||
<section class="hero">
|
||||
<div class="hero-inner">
|
||||
<p class="eyebrow">HACCP-Dokumentation für die Gastronomie</p>
|
||||
<h1>Prüfprotokolle.<br />Ohne Papier.<br />Ohne App-Store.</h1>
|
||||
<p class="subtitle">
|
||||
Kühlschranktemperaturen, Hygienekontrollen und Wartungsnachweise —
|
||||
digital erfasst, automatisch protokolliert, jederzeit abrufbar.
|
||||
</p>
|
||||
<div class="hero-actions">
|
||||
<a href="mailto:hallo@checkflo.de" class="btn-primary">Kostenlose Demo anfragen</a>
|
||||
<a href="#funktionen" class="btn-ghost">Wie es funktioniert ↓</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- HOW IT WORKS -->
|
||||
<section class="steps" id="funktionen">
|
||||
<div class="container">
|
||||
<h2>In 3 Schritten zum digitalen Protokoll</h2>
|
||||
<div class="steps-grid">
|
||||
<div class="step">
|
||||
<div class="step-num">1</div>
|
||||
<h3>QR-Code aufkleben</h3>
|
||||
<p>Robuste NFC/QR-Tags direkt am Kühlschrank, Warmhaltebehälter oder an der Hygiene-Station.</p>
|
||||
</div>
|
||||
<div class="step">
|
||||
<div class="step-num">2</div>
|
||||
<h3>Scannen & ausfüllen</h3>
|
||||
<p>Techniker scannt den Code, trägt Temperatur ein, macht bei Abweichung ein Foto — fertig.</p>
|
||||
</div>
|
||||
<div class="step">
|
||||
<div class="step-num">3</div>
|
||||
<h3>Protokoll abrufen</h3>
|
||||
<p>Vollständiges Monatsprotokoll als PDF — für Lebensmittelkontrolle, Franchise-Geber oder eigene Dokumentation.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- FEATURES -->
|
||||
<section class="features">
|
||||
<div class="container">
|
||||
<h2>Warum checkflo?</h2>
|
||||
<div class="features-grid">
|
||||
{#each features as f}
|
||||
<div class="feature-card">
|
||||
<span class="feature-icon">{f.icon}</span>
|
||||
<h3>{f.title}</h3>
|
||||
<p>{f.text}</p>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- CTA -->
|
||||
<section class="cta">
|
||||
<div class="container">
|
||||
<h2>Bereit für papierlose HACCP-Dokumentation?</h2>
|
||||
<p>Für Gastronomie, Kantinen, Caterer und Lebensmittelverarbeiter.</p>
|
||||
<a href="mailto:hallo@checkflo.de" class="btn-primary btn-large">Jetzt Demo vereinbaren</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<span class="logo"><span class="logo-check">check</span><span class="logo-flo">flo</span></span>
|
||||
|
||||
<span>© 2026 checkflo · <a href="mailto:hallo@checkflo.de">hallo@checkflo.de</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<style>
|
||||
/* NAV */
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: #fff;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.logo { display: flex; align-items: center; }
|
||||
.logo img { height: 36px; width: auto; }
|
||||
|
||||
.btn-nav {
|
||||
padding: 0.5rem 1.25rem;
|
||||
border: 1.5px solid #0B1023;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.btn-nav:hover { background: #0B1023; color: #fff; }
|
||||
|
||||
/* HERO */
|
||||
.hero {
|
||||
background: linear-gradient(135deg, #0B1023 0%, #16213e 100%);
|
||||
color: #fff;
|
||||
padding: 5rem 2rem 6rem;
|
||||
text-align: center;
|
||||
}
|
||||
.hero-inner { max-width: 720px; margin: 0 auto; }
|
||||
|
||||
.eyebrow {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.5px;
|
||||
color: #F97316;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.2rem, 6vw, 3.5rem);
|
||||
font-weight: 800;
|
||||
line-height: 1.15;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.15rem;
|
||||
color: #b0b8cc;
|
||||
max-width: 560px;
|
||||
margin: 0 auto 2.5rem;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* BUTTONS */
|
||||
.btn-primary {
|
||||
background: #F97316;
|
||||
color: #fff;
|
||||
padding: 0.85rem 2rem;
|
||||
border-radius: 8px;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
transition: background 0.15s;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn-primary:hover { background: #ea6c10; }
|
||||
.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; }
|
||||
|
||||
.btn-ghost {
|
||||
color: #b0b8cc;
|
||||
padding: 0.85rem 1.5rem;
|
||||
font-size: 1rem;
|
||||
transition: color 0.15s;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn-ghost:hover { color: #fff; }
|
||||
|
||||
/* STEPS */
|
||||
.steps {
|
||||
padding: 5rem 2rem;
|
||||
background: #F5F7FA;
|
||||
}
|
||||
.container { max-width: 1000px; margin: 0 auto; }
|
||||
|
||||
h2 {
|
||||
font-size: 1.9rem;
|
||||
font-weight: 800;
|
||||
text-align: center;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.steps-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.step {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
|
||||
}
|
||||
.step-num {
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
background: #F97316;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 800;
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
|
||||
.step p { color: #555; font-size: 0.95rem; }
|
||||
|
||||
/* FEATURES */
|
||||
.features { padding: 5rem 2rem; }
|
||||
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
border: 1.5px solid #eee;
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
.feature-card:hover { border-color: #F97316; }
|
||||
.feature-icon { font-size: 2rem; display: block; margin-bottom: 1rem; }
|
||||
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
|
||||
.feature-card p { color: #555; font-size: 0.95rem; }
|
||||
|
||||
/* CTA */
|
||||
.cta {
|
||||
background: #0B1023;
|
||||
color: #fff;
|
||||
padding: 5rem 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.cta h2 { color: #fff; margin-bottom: 1rem; }
|
||||
.cta p { color: #b0b8cc; margin-bottom: 2rem; }
|
||||
|
||||
/* FOOTER */
|
||||
footer {
|
||||
padding: 1.5rem 2rem;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
footer .container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: #888;
|
||||
}
|
||||
footer a:hover { color: #F97316; }
|
||||
</style>
|
||||
356
app/src/routes/s/[id]/+page.svelte
Normal file
356
app/src/routes/s/[id]/+page.svelte
Normal file
|
|
@ -0,0 +1,356 @@
|
|||
<script lang="ts">
|
||||
import { pb } from '$lib/pb';
|
||||
|
||||
let { data } = $props();
|
||||
const station = $derived(data.station);
|
||||
const tenant = $derived(station.expand?.tenant);
|
||||
const primaryColor = $derived(tenant?.primary_color ?? '#e85d04');
|
||||
|
||||
type Status = 'ok' | 'abweichung' | 'kritisch';
|
||||
|
||||
let temperature = $state<string>('');
|
||||
let status = $state<Status | null>(null);
|
||||
let notes = $state('');
|
||||
let checkedBy = $state('');
|
||||
let photo = $state<File | null>(null);
|
||||
let photoPreview = $state<string | null>(null);
|
||||
|
||||
let submitting = $state(false);
|
||||
let submitted = $state(false);
|
||||
let submittedAt = $state('');
|
||||
let error = $state('');
|
||||
|
||||
const statusLabels: Record<Status, string> = {
|
||||
ok: '✓ Alles in Ordnung',
|
||||
abweichung: '⚠ Abweichung',
|
||||
kritisch: '✗ Kritisch'
|
||||
};
|
||||
|
||||
const showTemp = $derived(
|
||||
station.type === 'kuehlschrank' ||
|
||||
station.type === 'tiefkuehl' ||
|
||||
station.type === 'warmhalte'
|
||||
);
|
||||
|
||||
function onPhoto(e: Event) {
|
||||
const file = (e.target as HTMLInputElement).files?.[0];
|
||||
if (!file) return;
|
||||
photo = file;
|
||||
photoPreview = URL.createObjectURL(file);
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
if (!status) { error = 'Bitte Status auswählen.'; return; }
|
||||
if (!checkedBy.trim()) { error = 'Bitte Namen eintragen.'; return; }
|
||||
error = '';
|
||||
submitting = true;
|
||||
|
||||
try {
|
||||
const fd = new FormData();
|
||||
fd.append('station', station.id);
|
||||
fd.append('tenant', station.tenant);
|
||||
fd.append('status', status);
|
||||
fd.append('notes', notes);
|
||||
fd.append('checked_by', checkedBy.trim());
|
||||
if (temperature) fd.append('temperature', temperature);
|
||||
if (photo) fd.append('photo', photo);
|
||||
|
||||
await pb.collection('check_logs').create(fd);
|
||||
|
||||
submittedAt = new Date().toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' });
|
||||
submitted = true;
|
||||
} catch (e) {
|
||||
error = 'Fehler beim Speichern. Bitte erneut versuchen.';
|
||||
} finally {
|
||||
submitting = false;
|
||||
}
|
||||
}
|
||||
|
||||
function reset() {
|
||||
temperature = '';
|
||||
status = null;
|
||||
notes = '';
|
||||
photo = null;
|
||||
photoPreview = null;
|
||||
submitted = false;
|
||||
error = '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{station.name} — checkflo</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="page" style="--brand: {primaryColor}">
|
||||
|
||||
<!-- HEADER -->
|
||||
<header>
|
||||
<div class="tenant-name">{tenant?.name ?? 'checkflo'}</div>
|
||||
<div class="station-name">{station.name}</div>
|
||||
{#if station.target_temp_min || station.target_temp_max}
|
||||
<div class="temp-range">
|
||||
Zielbereich: {station.target_temp_min}° bis {station.target_temp_max}°C
|
||||
</div>
|
||||
{/if}
|
||||
</header>
|
||||
|
||||
<!-- ERFOLG -->
|
||||
{#if submitted}
|
||||
<div class="success">
|
||||
<div class="success-icon">✓</div>
|
||||
<h2>Erfasst um {submittedAt} Uhr</h2>
|
||||
<p>Der Eintrag wurde gespeichert.</p>
|
||||
<button class="btn-primary" onclick={reset}>Neuen Eintrag erfassen</button>
|
||||
</div>
|
||||
|
||||
<!-- FORMULAR -->
|
||||
{:else}
|
||||
<form onsubmit={(e) => { e.preventDefault(); submit(); }}>
|
||||
|
||||
<!-- TEMPERATUR -->
|
||||
{#if showTemp}
|
||||
<div class="field">
|
||||
<label for="temp">Temperatur (°C)</label>
|
||||
<input
|
||||
id="temp"
|
||||
type="number"
|
||||
inputmode="decimal"
|
||||
step="0.1"
|
||||
placeholder="z.B. 4.5"
|
||||
bind:value={temperature}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- STATUS -->
|
||||
<div class="field">
|
||||
<span class="field-label">Status *</span>
|
||||
<div class="status-buttons">
|
||||
{#each (Object.keys(statusLabels) as Status[]) as s}
|
||||
<button
|
||||
type="button"
|
||||
class="status-btn status-{s}"
|
||||
class:active={status === s}
|
||||
onclick={() => status = s}
|
||||
>
|
||||
{statusLabels[s]}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- NOTIZ -->
|
||||
{#if status === 'abweichung' || status === 'kritisch'}
|
||||
<div class="field">
|
||||
<label for="notes">Beschreibung der Abweichung *</label>
|
||||
<textarea id="notes" rows="3" placeholder="Was wurde festgestellt?" bind:value={notes}></textarea>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- FOTO -->
|
||||
<div class="field">
|
||||
<span class="field-label">Foto (optional)</span>
|
||||
{#if photoPreview}
|
||||
<img src={photoPreview} alt="Vorschau" class="photo-preview" />
|
||||
{/if}
|
||||
<label class="file-btn">
|
||||
📷 {photo ? 'Foto ändern' : 'Foto aufnehmen'}
|
||||
<input type="file" accept="image/*" capture="environment" onchange={onPhoto} hidden />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- NAME -->
|
||||
<div class="field">
|
||||
<label for="name">Ihr Name *</label>
|
||||
<input id="name" type="text" placeholder="Max Mustermann" bind:value={checkedBy} />
|
||||
</div>
|
||||
|
||||
{#if error}
|
||||
<p class="error">{error}</p>
|
||||
{/if}
|
||||
|
||||
<button type="submit" class="btn-primary btn-submit" disabled={submitting}>
|
||||
{submitting ? 'Wird gespeichert…' : 'Eintrag speichern'}
|
||||
</button>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<footer>
|
||||
<a href="/">checkflo</a>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
min-height: 100dvh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
padding: 0 0 2rem;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
}
|
||||
|
||||
/* HEADER */
|
||||
header {
|
||||
background: var(--brand);
|
||||
color: #fff;
|
||||
padding: 2rem 1.5rem 1.5rem;
|
||||
}
|
||||
.tenant-name {
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.8;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
.station-name {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.temp-range {
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
/* FORMULAR */
|
||||
form {
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.field { display: flex; flex-direction: column; gap: 0.5rem; }
|
||||
|
||||
label, .field-label {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
input[type='text'],
|
||||
input[type='number'],
|
||||
textarea {
|
||||
border: 1.5px solid #ddd;
|
||||
border-radius: 8px;
|
||||
padding: 0.75rem 1rem;
|
||||
font-size: 1rem;
|
||||
width: 100%;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
input:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--brand);
|
||||
}
|
||||
textarea { resize: vertical; }
|
||||
|
||||
/* STATUS BUTTONS */
|
||||
.status-buttons {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
.status-btn {
|
||||
padding: 1rem;
|
||||
border-radius: 10px;
|
||||
border: 2px solid transparent;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.status-ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
|
||||
.status-abweichung { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
|
||||
.status-kritisch { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
|
||||
|
||||
.status-ok.active { background: #dcfce7; border-color: #16a34a; }
|
||||
.status-abweichung.active { background: #ffedd5; border-color: #ea580c; }
|
||||
.status-kritisch.active { background: #fee2e2; border-color: #dc2626; }
|
||||
|
||||
/* FOTO */
|
||||
.photo-preview {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.file-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.25rem;
|
||||
border: 1.5px dashed #ccc;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
color: #555;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
.file-btn:hover { border-color: var(--brand); color: var(--brand); }
|
||||
|
||||
/* BUTTONS */
|
||||
.btn-primary {
|
||||
background: var(--brand);
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
font-size: 1.05rem;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
|
||||
.btn-submit { margin-top: 0.5rem; }
|
||||
|
||||
/* FEHLER */
|
||||
.error {
|
||||
color: #dc2626;
|
||||
font-size: 0.9rem;
|
||||
padding: 0.75rem 1rem;
|
||||
background: #fef2f2;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* ERFOLG */
|
||||
.success {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
.success-icon {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
background: #dcfce7;
|
||||
color: #16a34a;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.success h2 { font-size: 1.4rem; }
|
||||
.success p { color: #666; }
|
||||
|
||||
/* FOOTER */
|
||||
footer {
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: #aaa;
|
||||
}
|
||||
footer a { color: #aaa; }
|
||||
footer a:hover { color: var(--brand); }
|
||||
</style>
|
||||
15
app/src/routes/s/[id]/+page.ts
Normal file
15
app/src/routes/s/[id]/+page.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { error } from '@sveltejs/kit';
|
||||
import { pb } from '$lib/pb';
|
||||
|
||||
export const ssr = false;
|
||||
|
||||
export async function load({ params }) {
|
||||
try {
|
||||
const station = await pb
|
||||
.collection('stations')
|
||||
.getFirstListItem(`qr_id = "${params.id}"`, { expand: 'tenant' });
|
||||
return { station };
|
||||
} catch {
|
||||
throw error(404, 'Station nicht gefunden');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue