From 6de625ae9fdc1d19d9aa3908fd5ebdcc4a2aa359 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Sun, 1 Nov 2026 21:38:18 +0900 Subject: hp-archive: カテゴリの件数をボタンからページ下部へ移動 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - フィルターボタンはラベルだけにし、件数の内訳はご注意の末尾に表示 - 件数は表から実行時に集計する --- src/components/ScheduleInteractive.astro | 15 ++++++++++++++- src/content/docs/kodaira-data/hp-archive/schedule.mdx | 13 +++++-------- src/styles/custom.css | 6 ++++++ 3 files changed, 25 insertions(+), 9 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) => - `` + `` ) .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); diff --git a/src/content/docs/kodaira-data/hp-archive/schedule.mdx b/src/content/docs/kodaira-data/hp-archive/schedule.mdx index 7d8c860..b5ac524 100644 --- a/src/content/docs/kodaira-data/hp-archive/schedule.mdx +++ b/src/content/docs/kodaira-data/hp-archive/schedule.mdx @@ -24,23 +24,16 @@ import ScheduleMap from '../../../../components/ScheduleMap.astro'; -## カテゴリで絞り込む - +カテゴリと日付を選ぶと、その下にその日のイベント一覧と会場の地図が表示されます。
-## カレンダー - -審議会等とイベントの予定をまとめています。日付を選ぶと、その日の予定と地図が下に表示されます。 -
-## 会場の地図 - カレンダーで選んだ日付の予定会場を地図上に表示します。地図のピンを押すと詳細が出ます。 @@ -49,6 +42,8 @@ import ScheduleMap from '../../../../components/ScheduleMap.astro'; 位置は、住所をもとにしたおおよその位置です。場所を1点に絞れない予定は地図に表示していません(一覧表には掲載しています)。 +以下の「審議会等の開催予定」と「今後のイベント」は、すべて上のカレンダー・一覧表・地図に反映されています。 + ## 審議会等の開催予定 市議会の会場は市役所7階です(本会議は本会議場、それ以外は委員会室や全員協議会室など)。傍聴は、開催当日の午前8時30分から市役所7階の議会事務局で受け付けます(本会議60人、委員会30人、予算・決算審査と全員協議会は15人)。 @@ -280,6 +275,8 @@ import ScheduleMap from '../../../../components/ScheduleMap.astro'; イベントの内容・日程は変更になることがあります。最新の情報は、各問い合わせ先または市公式Xでご確認ください。 +

現在の登録件数は、カテゴリごとの内訳をここに表示します(JavaScriptが有効なとき)。

+ ## 情報源 - [市報こだいら電子版](https://www.catapoke.com/search/?keyword=%E5%B0%8F%E5%B9%B3%E5%B8%82) diff --git a/src/styles/custom.css b/src/styles/custom.css index a0b0a59..239156e 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -2219,6 +2219,12 @@ td.sanpi-open .sanpi-title { color: var(--sl-color-gray-3); font-size: 0.9rem; } +.schedule-category-summary { + margin: 0.8rem 0 0; + color: var(--sl-color-gray-3); + font-size: 0.88rem; + line-height: 1.7; +} .schedule-table-status { display: flex; align-items: center; -- cgit v1.3.1