👀 ゲストモード中 · データは保存されません
ikudan
迷わない育児段取りナビ
ログイン / 新規登録
メールアドレスを入力すると、ログインコードをお送りします。
メールアドレス
const EVENTS = [ { id:1, tag:'予防接種', cat:'vaccine', title:'ヒブ・小児用肺炎球菌 2回目', dateLabel:'5月12日(火)', dateShort:'5/12', wd:'火', days:8, prep:'予診票記入 · 母子手帳 · 健康保険証', pinned:true, status:'soon', roadmap:[ {d:'5/5', label:'7日前', text:'体温を朝晩記録開始', soon:false, due:false}, {d:'5/8', label:'4日前', text:'体温を朝晩記録', soon:true, due:false}, {d:'5/10',label:'2日前', text:'母子手帳・保険証を準備', soon:false, due:false}, {d:'5/12',label:'当日', text:'13:30 みどりクリニック', soon:false, due:true}, {d:'5/13',label:'翌日', text:'副反応の様子を記録', soon:false, due:false}, ], checklist:[{t:'予診票',done:true},{t:'母子手帳',done:false},{t:'健康保険証・乳児医療証',done:false},{t:'おむつ・着替え',done:false}], affiliates:[{name:'母子手帳ケース 人気ランキング',price:'Amazon · 1,500円〜',icon:'📔'},{name:'体温計(赤ちゃん用)',price:'楽天 · 2,800円〜',icon:'🌡️'}] }, { id:2, tag:'予防接種', cat:'vaccine', title:'四種混合 1回目', dateLabel:'5月22日(金)', dateShort:'5/22', wd:'金', days:18, prep:'予診票 · 母子手帳', pinned:false, status:'planned', roadmap:[{d:'5/15',label:'7日前',text:'クリニックに予約確認',soon:false,due:false},{d:'5/20',label:'2日前',text:'予診票を記入する',soon:true,due:false},{d:'5/22',label:'当日',text:'かかりつけ医で接種',soon:false,due:true}], checklist:[{t:'予診票',done:false},{t:'母子手帳',done:false},{t:'健康保険証',done:false}], affiliates:[] }, { id:3, tag:'行政手続き', cat:'admin', title:'児童手当 現況届', dateLabel:'5月30日(土)', dateShort:'5/30', wd:'土', days:26, prep:'マイナンバー · 印鑑 · 申請書', pinned:false, status:'planned', roadmap:[{d:'5/25',label:'5日前',text:'申請書を記入する',soon:false,due:false},{d:'5/30',label:'当日',text:'市区町村窓口へ提出',soon:false,due:true}], checklist:[{t:'マイナンバーカード確認',done:false},{t:'印鑑を準備',done:false},{t:'窓口受付時間を確認',done:false}], affiliates:[] }, { id:4, tag:'行事', cat:'event', title:'お食い初め', dateLabel:'6月3日(水)', dateShort:'6/03', wd:'水', days:30, prep:'会場予約 · 歯固め石 · 招待連絡', pinned:false, status:'planned', roadmap:[{d:'5/10',label:'24日前',text:'料亭の予約(人気店は早め)',soon:true,due:false},{d:'5/20',label:'14日前',text:'歯固め石を準備',soon:false,due:false},{d:'6/03',label:'当日',text:'お食い初めの儀式',soon:false,due:true}], checklist:[{t:'料亭を予約 or セット購入',done:false},{t:'歯固め石を準備',done:false},{t:'食器・膳を準備',done:false},{t:'記念写真の段取り',done:false}], affiliates:[{name:'お食い初めセット 人気ランキング',price:'Amazon · 4,800円〜',icon:'🍱'},{name:'歯固め石セット',price:'楽天 · 1,200円〜',icon:'🪨'}] }, { id:5, tag:'健診', cat:'checkup', title:'1歳半健診', dateLabel:'6月14日(土)', dateShort:'6/14', wd:'土', days:41, prep:'受診票 · 問診票', pinned:false, status:'planned', roadmap:[{d:'6/7',label:'7日前',text:'問診票を記入する',soon:false,due:false},{d:'6/14',label:'当日',text:'かかりつけ小児科で受診',soon:false,due:true}], checklist:[{t:'受診票を準備',done:false},{t:'問診票を記入',done:false},{t:'母子手帳',done:false}], affiliates:[{name:'仕上げ磨き用歯ブラシセット',price:'Amazon · 1,200円〜',icon:'🦷'}] }, { id:6, tag:'行政手続き', cat:'admin', title:'保育園 見学申込', dateLabel:'6月20日(金)', dateShort:'6/20', wd:'金', days:47, prep:'希望園リスト · 通園マップ', pinned:false, status:'planned', roadmap:[{d:'6/1',label:'20日前',text:'希望園のリストを作成',soon:false,due:false},{d:'6/10',label:'10日前',text:'各園に電話で予約',soon:false,due:false},{d:'6/20',label:'当日',text:'見学開始',soon:false,due:true}], checklist:[{t:'希望園リストを作成',done:false},{t:'見学の予約を入れる',done:false},{t:'質問事項をまとめる',done:false}], affiliates:[] }, ]; const TODAY_TASKS = [ { id:'t1', title:'予診票を記入', context:'予防接種 · 5/12 締切', cat:'vaccine', time:'今日中', done:false }, { id:'t2', title:'朝の検温を記録', context:'健康記録', cat:'checkup', time:'毎朝', done:true }, { id:'t3', title:'保育園の見学申込み', context:'行政手続き', cat:'admin', time:'今日中', done:false }, ]; const CATEGORIES = [ {id:'all',label:'すべて',count:12},{id:'vaccine',label:'予防接種',count:4}, {id:'admin',label:'行政手続き',count:3},{id:'event',label:'行事',count:2}, {id:'checkup',label:'健診',count:2},{id:'feeding',label:'離乳食・食事',count:1}, ]; const READING = [ {id:'r1',kind:'3分で読める',title:'育休復帰までに整えたい家事の段取り',meta:'段取りコラム'}, {id:'r2',kind:'5分で読める',title:'予防接種スケジュール、最新版の押さえどころ',meta:'医療監修'}, {id:'r3',kind:'チェックリスト',title:'生後12〜15ヶ月でやることリスト',meta:'保存版'}, ]; const ACTIVITY = [ {id:'a1',when:'15分前',text:'予防接種 2回目 を 5/12 にスケジュール',by:'健太'}, {id:'a2',when:'今日 10:24',text:'検温 36.7℃ を記録',by:'美咲'}, {id:'a3',when:'昨日',text:'児童手当 現況届 にメモを追加',by:'健太'}, {id:'a4',when:'昨日',text:'お食い初め の会場候補を 3 件保存',by:'美咲'}, ]; /* ═══ STATE ═══ */ let selectedEvId = 1; let activeNav = 'home'; let activeCat = 'all'; let checkState = {}; // { evId: [bool,...] } function getChecks(ev) { if (!checkState[ev.id]) checkState[ev.id] = ev.checklist.map(c => c.done); return checkState[ev.id]; } /* ═══ HELPERS ═══ */ const CAT_COLORS = { vaccine:'#5B7DA8',admin:'#B8821C',event:'#5C8A6E', checkup:'#D4A20A',feeding:'#A87B6E',growth:'#7A6BA0',prep:'#8A7C68',medical:'#5B7DA8', }; function chevR(){return``;} function chevL(){return``;} function chevD(){return``;} function check10(){return``;} function bookIcon(){return``;} function pinIcon(){return``;} function filterIcon(){return``;} /* ═══ RENDER SIDEBAR ═══ */ function renderSidebar() { const navItems = [ {id:'home', label:'ホーム', icon:'inbox'}, {id:'cal', label:'カレンダー', icon:'cal'}, {id:'reading',label:'読みもの', icon:'book'}, {id:'set', label:'設定', icon:'cog'}, ]; const icons = { inbox:``, cal:``, book:``, cog:``, user:``, }; document.getElementById('primaryNav').innerHTML = navItems.map(it => ` `).join(''); document.getElementById('catNav').innerHTML = CATEGORIES.map(c => ` `).join(''); document.getElementById('secondaryNav').innerHTML = ''; } /* ═══ RENDER TODAY TASKS ═══ */ function renderTodayCard() { document.getElementById('todayCard').innerHTML = `
今日の準備期限 2件
${TODAY_TASKS.map((t,i)=>`
${t.done?check10():''}
${t.title}
${t.context}
${t.time}
`).join('')}
`; } function toggleTask(id, box) { box.classList.toggle('done'); const title = box.nextElementSibling.querySelector('.task-title'); title.classList.toggle('done'); box.innerHTML = box.classList.contains('done') ? check10() : ''; } /* ═══ RENDER EVENTS TABLE ═══ */ function renderEventsCard() { const filtered = activeCat === 'all' ? EVENTS : EVENTS.filter(e => e.cat === activeCat); document.getElementById('eventsCard').innerHTML = `
このあとの段取り ${filtered.length}件
${filtered.map((ev,i)=>` `).join('')}
日付カテゴリ 予定準備 残り
${selectedEvId===ev.id?'':''}
${ev.pinned?pinIcon():''}
${ev.dateShort} (${ev.wd}) ${ev.tag}
${ev.title}
${ev.prep}
あと${ev.days}日
`; } /* ═══ RENDER MINI CALENDAR ═══ */ function renderCalCard() { const WDAYS = ['日','月','火','水','木','金','土']; const daysInMonth = 31, firstWd = 3, today = 4; // May 2025, Thu=4 const eventDays = {12:'vaccine',22:'vaccine',30:'admin',3:'event'}; let cells = []; for(let i=0;i{ if(c.kind==='pad') return `
`; const isToday = c.d===today; const ev = eventDays[c.d]; return `
${c.d} ${ev?`
`:''}
`; }).join(''); const upcoming = EVENTS.filter(e=>e.days<=41).slice(0,3); document.getElementById('calCard').innerHTML = `
2025年 5月
${WDAYS.map(d=>`
${d}
`).join('')} ${grid}
直近のイベント
${upcoming.map(ev=>`
${ev.dateShort} ${ev.title}
`).join('')}
`; } /* ═══ RENDER READING ═══ */ function renderReadingCard() { document.getElementById('readingCard').innerHTML = `
読みもの
${READING.map((r,i)=>`
${bookIcon()}
${r.kind} · ${r.meta}
${r.title}
${chevR()}
`).join('')}
`; } /* ═══ RENDER ACTIVITY ═══ */ function renderActivityCard() { document.getElementById('activityCard').innerHTML = `
家族のうごき
${ACTIVITY.map(a=>`
${a.by[0]}
${a.by} · ${a.text}
${a.when}
`).join('')}
`; } /* ═══ RENDER DETAIL PANEL ═══ */ function renderDetail() { const ev = EVENTS.find(e=>e.id===selectedEvId) || EVENTS[0]; const checks = getChecks(ev); const doneCount = checks.filter(Boolean).length; document.getElementById('detail').innerHTML = `
予定の詳細
${ev.tag}

${ev.title}

日付 ${ev.dateLabel}
残り あと${ev.days}日
${ev.roadmap.map(s=>`
${s.d}·${s.label}
${s.text}
`).join('')}
${doneCount} / ${checks.length}
${ev.checklist.map((p,i)=>`
${checks[i]?check10():''}
${p.t}
`).join('')}
${ev.affiliates.length ? `
${ev.affiliates.map(a=>`
${a.icon}
${a.name}
${a.price}
${chevR()}
`).join('')}
` : ''}
${ACTIVITY.slice(0,3).map(a=>`
${a.by[0]}
${a.by} · ${a.text}
${a.when}
`).join('')}
広告
AdSense 自動広告
260 × 200
`; } /* ═══ INTERACTIONS ═══ */ function selectEv(id) { selectedEvId = id; renderEventsCard(); renderDetail(); } function setNav(id) { activeNav = id; renderSidebar(); renderMainContent(); } function renderMainContent() { const scroll = document.getElementById('main-scroll'); const greeting = document.getElementById('greeting'); const pad = document.querySelector('.main-pad'); if (activeNav === 'home') { greeting.style.display = 'flex'; pad.innerHTML = `
`; renderTodayCard(); renderEventsCard(); } else if (activeNav === 'cal') { greeting.style.display = 'none'; pad.innerHTML = `
カレンダー
`; renderCalCard(); } else if (activeNav === 'reading') { greeting.style.display = 'none'; pad.innerHTML = `
読みもの
育児に役立つコラム
`; renderReadingCard(); } else if (activeNav === 'set') { greeting.style.display = 'none'; pad.innerHTML = `
設定
設定画面は準備中です
`; } } function setCat(id) { activeCat = id; renderSidebar(); renderEventsCard(); } function toggleCheck(evId, idx, row) { getChecks(EVENTS.find(e=>e.id===evId)); checkState[evId][idx] = !checkState[evId][idx]; renderDetail(); } function toggleTheme() { const isDark = document.documentElement.getAttribute('data-theme') === 'dark'; document.documentElement.setAttribute('data-theme', isDark ? 'light' : 'dark'); document.getElementById('themeBtn').textContent = isDark ? 'Dark' : 'Light'; } function toggleViewBtn(btn) { document.querySelectorAll('.vt-btn').forEach(b=>b.classList.remove('active')); btn.classList.add('active'); } document.querySelectorAll('.vt-btn').forEach(b=>b.addEventListener('click',()=>toggleViewBtn(b))); /* ═══ INIT ═══ */ renderSidebar(); renderMainContent(); renderDetail();