aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ScheduleInteractive.astro
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-05 14:40:41 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-05 14:40:41 +0900
commit3e02a6a05c6a5b26fbb19fa91be9afbc6b12877d (patch)
treea831354b8f63792048cb336465acb304ed9442e3 /src/components/ScheduleInteractive.astro
parentacdd88e2d37993b3e2f9890394c14bba71dae965 (diff)
events: メインページの一覧を今月以降に絞る
終了した予定が年々たまって一覧が肥大化するため、一覧表とカレンダーを 今月以降に限定した。過去分は月別・年度別アーカイブに残る。 カレンダーの月移動も今月より前へは戻らないようにした。
Diffstat (limited to 'src/components/ScheduleInteractive.astro')
-rw-r--r--src/components/ScheduleInteractive.astro7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/ScheduleInteractive.astro b/src/components/ScheduleInteractive.astro
index 424b453..30569db 100644
--- a/src/components/ScheduleInteractive.astro
+++ b/src/components/ScheduleInteractive.astro
@@ -100,7 +100,10 @@
const todayKey = toKey(today.getFullYear(), today.getMonth() + 1, today.getDate());
const todayMonth = todayKey.slice(0, 7);
// 今日の月もカレンダーで移動できるように含める。
- const months = [...new Set([...dateKeys.map((k) => k.slice(0, 7)), todayMonth])].sort();
+ // メインページの一覧は今月以降に絞っているので、カレンダーも過去の月には戻らない。
+ const months = [...new Set([...dateKeys.map((k) => k.slice(0, 7)), todayMonth])]
+ .filter((month) => month >= todayMonth)
+ .sort();
// 開催日が今日より前のものは「終了」と表示する。
// 複数回の催しで未来の回が残っているものは対象外。
@@ -516,7 +519,7 @@
const councilCount = entries.filter(isCouncil).length;
const fields = CATEGORY_DEFS.map((c) => `${c.label}${counts[c.icon] || 0}件`).join('、');
summaryEl.textContent =
- `現在の登録件数は、審議会等(会議)${meetingEntries.length}件(うち市議会${councilCount}件)、` +
+ `このページに載せているのは、審議会等(会議)${meetingEntries.length}件(うち市議会${councilCount}件)、` +
`イベント${eventEntries.length}件の合計${entries.length}件です。` +
`分野別では、${fields}です(会議とイベントの両方を含みます)。`;
}