aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/KodairaNews.astro33
-rw-r--r--src/components/ScheduleInteractive.astro12
2 files changed, 40 insertions, 5 deletions
diff --git a/src/components/KodairaNews.astro b/src/components/KodairaNews.astro
index ab9b2a5..ae984c6 100644
--- a/src/components/KodairaNews.astro
+++ b/src/components/KodairaNews.astro
@@ -35,6 +35,39 @@ const LABEL: Record<CatId, string> = {
const posts: Post[] = [
{
+ date: "10月27日",
+ cat: "status",
+ note: "10月7日から発生している障害の状況。暫定サイトで一部の手続きが可能",
+ links: [{ text: "ホームページの障害状況について", url: X("2114990490542321692") }],
+ },
+ {
+ date: "10月27日",
+ cat: "event",
+ note: "10月28日22:00〜22:45、NHK総合「歴史探偵」で鈴木遺跡の出土品が放映",
+ links: [{ text: "鈴木遺跡出土品のテレビ放映(市のX)", url: X("2114975384231911934") }],
+ },
+ {
+ date: "10月27日",
+ cat: "event",
+ note: "農産物直売所を巡るデジタルスタンプラリーを開催中。詳細はこだいら観光まちづくり協会のホームページへ",
+ links: [
+ { text: "デジタルスタンプラリー(市のX)", url: X("2114960289330287050") },
+ { text: "こだいら観光まちづくり協会", url: "https://kodaira-tourism.com/" },
+ ],
+ },
+ {
+ date: "10月27日",
+ cat: "event",
+ note: "11月3日13:00〜14:30、小川パレット5階。当日0:30から受付、先着25名",
+ links: [{ text: "市長タウンミーティング(市のX)", url: X("2114915001236398353") }],
+ },
+ {
+ date: "10月27日",
+ cat: "procedure",
+ note: "木造住宅の耐震診断・改修、ブロック塀等の補助金申請を受付中",
+ links: [{ text: "耐震診断・改修の補助金(市のX)", url: X("2114884788452495443") }],
+ },
+ {
date: "10月26日",
cat: "status",
note: "10月7日から発生している障害の状況。暫定サイトで一部の手続きが可能",
diff --git a/src/components/ScheduleInteractive.astro b/src/components/ScheduleInteractive.astro
index 37ab7c7..fdc0767 100644
--- a/src/components/ScheduleInteractive.astro
+++ b/src/components/ScheduleInteractive.astro
@@ -203,16 +203,18 @@
return;
}
- const months = [...new Set(dateKeys.map((k) => k.slice(0, 7)))].sort();
const today = new Date();
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();
- // 開催日が今日までのものは「終了」と表示する。
+ // 開催日が今日より前のものは「終了」と表示する。
// 複数回の催しで未来の回が残っているものは対象外。
for (const entry of entries) {
if (entry.dateText.includes('申込開始')) continue;
if (entry.dates.length === 0) continue;
- if (!entry.dates.every((d) => d <= todayKey)) continue;
+ if (!entry.dates.every((d) => d < todayKey)) continue;
const row = document.getElementById(entry.rowId);
if (!row) continue;
row.classList.add('is-ended');
@@ -224,8 +226,8 @@
}
}
- let selectedDate = byDate.has(todayKey) ? todayKey : dateKeys[0];
- let currentMonth = selectedDate.slice(0, 7);
+ let selectedDate = todayKey;
+ let currentMonth = todayMonth;
let activeCategory = 'all';
function matchesCategory(e) {