aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ScheduleTable.astro
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-04 23:42:20 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-04 23:42:20 +0900
commit7f6ddd8a9991c2c48d119866a392c3e5583dc1dc (patch)
treed5c59ebe246e29a0fc877c161cee83abd6ca611d /src/components/ScheduleTable.astro
parent7338e4d74024778c65c1831b9db9e0274ed5502e (diff)
hp-archive: イベント表をデータ化し、小川パレットの記事を削除
- 表を src/data/schedule/*.json に移し、ScheduleTable コンポーネントで描画 - 表示内容は変更なし(セル・リンクを厳密比較して一致を確認) - 終了した小川パレット オープニングイベントの詳細記事を削除 - 継続中のクラウドファンディングの案内はご注意に移動
Diffstat (limited to 'src/components/ScheduleTable.astro')
-rw-r--r--src/components/ScheduleTable.astro31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/components/ScheduleTable.astro b/src/components/ScheduleTable.astro
new file mode 100644
index 0000000..2f4b370
--- /dev/null
+++ b/src/components/ScheduleTable.astro
@@ -0,0 +1,31 @@
+---
+// 行事予定の一覧表。データは src/data/schedule/*.json から読む。
+// セルの中身は HTML(リンクを含む)としてそのまま出力する。
+import meetings from '@/data/schedule/meetings.json';
+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;
+---
+
+<table>
+ <thead>
+ <tr>{data.columns.map((column) => <th>{column}</th>)}</tr>
+ </thead>
+ <tbody>
+ {
+ data.rows.map((row) => (
+ <tr>
+ <td set:html={row.date} />
+ <td set:html={row.title} />
+ <td set:html={row.place} />
+ <td set:html={row.note} />
+ <td set:html={row.source} />
+ </tr>
+ ))
+ }
+ </tbody>
+</table>