aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ScheduleTable.astro
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-05 13:30:26 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-05 13:30:26 +0900
commitbb74335a2fc1b0697c2b7088b010484ade784519 (patch)
tree39f8033b3d19af3f1376a222725bae6de816c98e /src/components/ScheduleTable.astro
parent248d64c096930fa031ce48ddaa4cdb30681918fa (diff)
events: 月別アーカイブページを追加
- /kodaira-data/events/YYYY-MM/ をデータから自動生成(2026年10月〜2027年3月の6か月分) - 会議とイベントを月ごとに表示し、前月・翌月のリンクを設置 - 行事予定ページ下部に月別アーカイブのリンクを追加 - 日付計算を共通モジュール化し、カレンダーと生成ページで同じ結果になるようにした
Diffstat (limited to 'src/components/ScheduleTable.astro')
-rw-r--r--src/components/ScheduleTable.astro6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/ScheduleTable.astro b/src/components/ScheduleTable.astro
index 2f4b370..ff13827 100644
--- a/src/components/ScheduleTable.astro
+++ b/src/components/ScheduleTable.astro
@@ -7,8 +7,10 @@ import events from '@/data/schedule/events.json';
type Row = { date: string; title: string; place: string; note: string; source: string };
type TableData = { columns: string[]; rows: Row[] };
-const { variant } = Astro.props as { variant: 'meeting' | 'event' };
-const data: TableData = (variant === 'meeting' ? meetings : events) as TableData;
+const { variant, rows } = Astro.props as { variant: 'meeting' | 'event'; rows?: Row[] };
+const base: TableData = (variant === 'meeting' ? meetings : events) as TableData;
+// rows を渡された場合はその行だけを表示する(月別アーカイブ用)
+const data: TableData = rows ? { columns: base.columns, rows } : base;
---
<table>