const fs = require('fs'); const path = require('path'); const postersDir = path.join(__dirname, '../public/images/posters'); if (!fs.existsSync(postersDir)) { fs.mkdirSync(postersDir, { recursive: true }); } const posters = [ { id: 'poster-bottle.svg', title: '45° 防胀气瓶喂指南', subtitle: '节律喂养 · 杜绝呛奶吞气', icon: '🍼', bg1: '#FEF3C7', bg2: '#F59E0B', accent: '#B45309' }, { id: 'poster-breastfeed.svg', title: '新生儿深吸含乳技巧', subtitle: '深层含乳 · 预防乳头皲裂', icon: '🤱', bg1: '#FFE4E6', bg2: '#F43F5E', accent: '#BE123C' }, { id: 'poster-burping.svg', title: '空心掌拍嗝防胀气实操', subtitle: '端坐与过肩拍嗝 · 排净胃气', icon: '💨', bg1: '#EDE9FE', bg2: '#8B5CF6', accent: '#6D28D9' }, { id: 'poster-diaper.svg', title: '防红屁屁换尿布全流程', subtitle: '温水清洗 · 隔离护臀膏涂法', icon: '💧', bg1: '#E0F2FE', bg2: '#0EA5E9', accent: '#0369A1' }, { id: 'poster-sleep.svg', title: '安全襁褓裹法与入睡安抚', subtitle: '防惊跳反射 · 建立自主入睡', icon: '😴', bg1: '#F1F5F9', bg2: '#64748B', accent: '#334155' }, { id: 'poster-bath.svg', title: '新生儿安全盆浴与脐带护理', subtitle: '快速盆浴 · 75% 酒精消毒', icon: '🛁', bg1: '#CCFBF1', bg2: '#14B8A6', accent: '#0F766E' } ]; posters.forEach(p => { const svg = ` ${p.icon} ${p.title} ${p.subtitle} 教学视频 `; fs.writeFileSync(path.join(postersDir, p.id), svg, 'utf8'); console.log(`Generated local poster: ${p.id}`); }); console.log('All 6 local SVG posters created successfully!');