From 4694675635a449f6537272ddad2feb2a4724c41d Mon Sep 17 00:00:00 2001
From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>
Date: Sat, 7 Nov 2026 12:44:17 +0900
Subject: events: 日付の改行と行ごとの共有ボタンを追加
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
「令和9年1月28日(木)」のような日付で列が広がるため、「令和〇年」の
直後で改行するようにした。各行にX・Instagram・Facebookの共有ボタンを
付け、日付・タイトル・時間と場所・申込みを文面にして共有する。
ボタンは行数が多いためHTMLには書かず、スクリプトで差し込んでいる。
---
src/components/ScheduleTable.astro | 118 ++++++++++++++++++++++++++++++++++++-
1 file changed, 117 insertions(+), 1 deletion(-)
(limited to 'src/components/ScheduleTable.astro')
diff --git a/src/components/ScheduleTable.astro b/src/components/ScheduleTable.astro
index dcf210d..870cd77 100644
--- a/src/components/ScheduleTable.astro
+++ b/src/components/ScheduleTable.astro
@@ -27,6 +27,10 @@ if (scope === 'main') {
}
const data: TableData = { columns: base.columns, rows: list };
+
+// 「令和9年1月28日(木)」のような長い日付で列が広がるため、「令和9年」の直後で改行する。
+const dateHtml = (html: string) =>
+ html.replace(/(令和[0-90-9]+年)(?!\s*
');
---
| + | @@ -47,3 +51,115 @@ const data: TableData = { columns: base.columns, rows: list }; } |