refactor: clear sample pages and sections to provide a clean slate for custom editing

This commit is contained in:
Daniel S
2026-08-10 00:26:02 +02:00
parent 488e024451
commit 698716c34e
4 changed files with 38 additions and 140 deletions

View File

@@ -96,37 +96,14 @@ function seedInitialData(db: DatabaseSync) {
now
);
// Seed default pages & sections
// Seed default page only (no prefilled sections/demo content)
db.prepare('INSERT INTO pages (id, slug, title, status, homepage_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)').run(
'page_home',
'/',
'Startseite (Hauptseite)',
'Startseite',
'published',
'page_home',
now,
now
);
const heroDraft = JSON.stringify({
title: 'Maßgeschneiderte Webseiten. Digital im Griff.',
subtitle: 'Wir entwickeln blitzschnelle, DSGVO-konforme High-End Webseiten für Ihr Unternehmen.',
ctaPrimaryText: 'Projekt anfragen',
ctaPrimaryLink: '#contact'
});
const bentoDraft = JSON.stringify({
sectionTitle: 'High-End Features & Leistung',
sectionSubtitle: 'Modernste Technologie & Höchster Datenschutz vereint.'
});
const contactDraft = JSON.stringify({
title: 'Bereit für Ihr Projekt?',
subtitle: 'Schreiben Sie uns direkt. Wir antworten innerhalb von 24 Stunden persönlich.'
});
const stmt = db.prepare('INSERT INTO page_sections (id, page_id, section_type, order_index, content_draft_json, content_published_json, styles_json) VALUES (?, ?, ?, ?, ?, ?, ?)');
stmt.run('sec_hero_1', 'page_home', 'HeroSection', 0, heroDraft, heroDraft, JSON.stringify({ bg_color: '#0b0f19' }));
stmt.run('sec_bento_1', 'page_home', 'BentoGrid', 1, bentoDraft, bentoDraft, JSON.stringify({}));
stmt.run('sec_contact_1', 'page_home', 'ContactSection', 2, contactDraft, contactDraft, JSON.stringify({}));
}