aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ScheduleInteractive.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ScheduleInteractive.astro')
-rw-r--r--src/components/ScheduleInteractive.astro15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/components/ScheduleInteractive.astro b/src/components/ScheduleInteractive.astro
index e02b32a..cb33ce9 100644
--- a/src/components/ScheduleInteractive.astro
+++ b/src/components/ScheduleInteractive.astro
@@ -521,7 +521,7 @@
filtersEl.innerHTML = buttonDefs
.map(
(b) =>
- `<button type="button" class="schedule-filter-btn" data-category="${b.category}" aria-pressed="${b.category === activeCategory}">${b.icon ? `${b.icon} ` : ''}${b.label} (${b.count})</button>`
+ `<button type="button" class="schedule-filter-btn" data-category="${b.category}" aria-pressed="${b.category === activeCategory}">${b.icon ? `${b.icon} ` : ''}${b.label}</button>`
)
.join('');
filtersEl.querySelectorAll('.schedule-filter-btn').forEach((btn) => {
@@ -529,7 +529,20 @@
});
}
+ // 件数はフィルターのボタンには出さず、ページ下部にまとめて表示する。
+ function renderCategorySummary() {
+ const summaryEl = document.getElementById('schedule-category-summary');
+ if (!summaryEl) return;
+ const councilCount = entries.filter(isCouncil).length;
+ const fields = CATEGORY_DEFS.map((c) => `${c.label}${counts[c.icon] || 0}件`).join('、');
+ summaryEl.textContent =
+ `現在の登録件数は、審議会等(会議)${meetingEntries.length}件(うち市議会${councilCount}件)、` +
+ `イベント${eventEntries.length}件の合計${entries.length}件です。` +
+ `分野別では、${fields}です(会議とイベントの両方を含みます)。`;
+ }
+
buildFilters();
+ renderCategorySummary();
applyFilter();
renderCalendar();
if (selectedDate) showDayDetails(selectedDate);