Files
moreminimore-astroreal/seed-db.cjs
Kunthawat Greethong b9cd01a55f Phase 1: Homepage seamless design - add gradient transitions
- Added gradient transitions between sections in global.css
- Portfolio section now has gradient-top (dark to white fade)
- Blog section now has gradient-bottom (white fade from dark)
- Reduced portfolio overlay opacity from 0.85 to 0.65
- Added border to blog cards for white-on-white visibility
- Blog cards now have primary color accent on hover
2026-05-21 14:29:31 +07:00

14 lines
833 B
JavaScript

const seed = require('./seed/seed.json');
const Database = require('better-sqlite3');
const db = new Database('./data.db');
// Only seed pages for now
const insertPage = db.prepare(
"INSERT OR REPLACE INTO ec_pages (id, slug, status, title, subtitle, badge, hero_image, theme, show_cta, cta_text, cta_link, variant, size, created_at, updated_at, published_at) VALUES (?, ?, 'published', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'), datetime('now'))"
);
(seed.content?.pages || []).forEach(p => {
insertPage.run(p.id, p.slug, p.data.title, p.data.subtitle, p.data.badge, p.data.hero_image, p.data.theme, p.data.show_cta ? 1 : 0, p.data.cta_text, p.data.cta_link, p.data.variant, p.data.size);
});
console.log('Pages:', db.prepare('SELECT COUNT(*) as c FROM ec_pages').get().c);
db.close();
console.log('Done');