From 77cb8f22b34f7b1587e7e3bcacb780971353ce19 Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Thu, 14 Aug 2025 14:37:04 +0900 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20timetable=E3=81=AE=E3=82=B9?= =?UTF-8?q?=E3=82=AD=E3=83=BC=E3=83=9E=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/content/config.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/2025/src/content/config.ts b/2025/src/content/config.ts index d1a6e541..0d151fdf 100644 --- a/2025/src/content/config.ts +++ b/2025/src/content/config.ts @@ -1,5 +1,4 @@ -import { glob } from "astro/loaders"; -// src/content/config.ts +import { file, glob } from "astro/loaders"; import { defineCollection, z } from "astro:content"; const sponsors = defineCollection({ @@ -15,7 +14,20 @@ const sponsors = defineCollection({ }), }); -// コレクションのエクスポート +const timetable = defineCollection({ + loader: file("./src/content/timetable.toml"), + schema: z.array( + z.object({ + title: z.string(), + start_at: z.coerce.date(), + end_at: z.coerce.date(), + speaker_name: z.string().optional(), + session_id: z.string().optional(), + }), + ), +}); + export const collections = { sponsors, + timetable, }; From 51eaeb43452d6f74bd79c09679229b8076e2ba70 Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Thu, 14 Aug 2025 14:40:02 +0900 Subject: [PATCH 2/8] =?UTF-8?q?feat:=20TimeTable=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/components/Schedule/TimeTable.astro | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 2025/src/components/Schedule/TimeTable.astro diff --git a/2025/src/components/Schedule/TimeTable.astro b/2025/src/components/Schedule/TimeTable.astro new file mode 100644 index 00000000..d0bc624b --- /dev/null +++ b/2025/src/components/Schedule/TimeTable.astro @@ -0,0 +1,41 @@ +--- +import Card from "../Card.astro"; +import { Clock, User } from "@lucide/astro"; +import { getScheduleCardStyle, formatTime } from "./logic.ts"; + +type Props = { + class?: string; + start_at: Date; + end_at: Date; + title: string; + session_id?: string | undefined; + speaker_name?: string | undefined; +}; + +const { title, start_at, end_at, speaker_name } = Astro.props; +const [cardClass, Icon] = getScheduleCardStyle(title); +--- + + +
+
+
+ + {formatTime(start_at)} - {formatTime(end_at)} + {speaker_name && ( +
+ + {speaker_name} +
+ )} +
+ +

+ {title} +

+
+
+
+
From 377e6ee1daebb6ee78e02267717650d28fb29ded Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Thu, 14 Aug 2025 14:40:27 +0900 Subject: [PATCH 3/8] =?UTF-8?q?feat(Schedule):=20TimeTable=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/components/Schedule.astro | 24 ---------------------- 2025/src/components/Schedule/index.astro | 18 ++++++++++++++++ 2025/src/components/Schedule/logic.ts | 26 ++++++++++++++++++++++++ 2025/src/pages/[lang]/index.astro | 2 +- 4 files changed, 45 insertions(+), 25 deletions(-) delete mode 100644 2025/src/components/Schedule.astro create mode 100644 2025/src/components/Schedule/index.astro create mode 100644 2025/src/components/Schedule/logic.ts diff --git a/2025/src/components/Schedule.astro b/2025/src/components/Schedule.astro deleted file mode 100644 index 0f278f80..00000000 --- a/2025/src/components/Schedule.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -import Card from "./Card.astro"; -import Heading from "./Heading.astro"; -import { CalendarClock } from "@lucide/astro"; ---- - -
-
- スケジュール - - -

- タイムテーブルは近日公開 -

-

- カンファレンスの詳細なスケジュールは近日公開されます -

-
-
-
diff --git a/2025/src/components/Schedule/index.astro b/2025/src/components/Schedule/index.astro new file mode 100644 index 00000000..58abd50d --- /dev/null +++ b/2025/src/components/Schedule/index.astro @@ -0,0 +1,18 @@ +--- +import { getCollection } from "astro:content"; +import Heading from "../Heading.astro"; +import TimeTable from "./TimeTable.astro"; + +const timetable = await getCollection("timetable"); +--- + +
+
+ スケジュール + { + timetable + .shift() + ?.data.map((schedule) => ) + } +
+
diff --git a/2025/src/components/Schedule/logic.ts b/2025/src/components/Schedule/logic.ts new file mode 100644 index 00000000..00103460 --- /dev/null +++ b/2025/src/components/Schedule/logic.ts @@ -0,0 +1,26 @@ +import { MicVocal, Zap, Coffee } from "@lucide/astro"; + +export const getScheduleCardStyle = (title: string) => { + const isBreak = ["Short break", "Lunch break"].includes(title); + if (isBreak) { + return ["bg-gray-50 border-gray-200", Coffee]; + } + const isLightningTalks = title === "Lightning talks"; + if (isLightningTalks) { + return ["bg-yellow-50 border-yellow-200", Zap]; + } + + const isOtherEvent = ["Opening", "Closing", "After party"].includes(title); + if(isOtherEvent) { + return ["bg-blue-50 border-blue-200", MicVocal] + } + + + return ["bg-green-50", MicVocal]; +}; + +export const formatTime = (date: Date): string => { + const hours = date.getHours().toString().padStart(2, "0"); + const minutes = date.getMinutes().toString().padStart(2, "0"); + return `${hours}:${minutes}`; +}; diff --git a/2025/src/pages/[lang]/index.astro b/2025/src/pages/[lang]/index.astro index 463cff74..f30a825a 100644 --- a/2025/src/pages/[lang]/index.astro +++ b/2025/src/pages/[lang]/index.astro @@ -1,7 +1,7 @@ --- import AboutVimConf from "../../components/AboutVimConf.astro"; import KeynoteSpeakers from "../../components/KeynoteSpeakers/index.astro"; -import Schedule from "../../components/Schedule.astro"; +import Schedule from "../../components/Schedule/index.astro"; import Sponsors from "../../components/Sponsors/index.astro"; import Staff from "../../components/Staff/index.astro"; import Top from "../../components/Top.astro"; From 40a057291320a0bccdb5a3f5166130764c9ae87a Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Thu, 14 Aug 2025 22:20:45 +0900 Subject: [PATCH 4/8] style: apply format --- 2025/src/components/Schedule/TimeTable.astro | 24 +++++++++++--------- 2025/src/components/Schedule/index.astro | 8 ++----- 2025/src/components/Schedule/logic.ts | 5 ++-- 2025/src/components/Sponsors/Companies.astro | 7 +----- 2025/src/components/Sponsors/Company.astro | 4 +++- 5 files changed, 21 insertions(+), 27 deletions(-) diff --git a/2025/src/components/Schedule/TimeTable.astro b/2025/src/components/Schedule/TimeTable.astro index d0bc624b..c1b08a84 100644 --- a/2025/src/components/Schedule/TimeTable.astro +++ b/2025/src/components/Schedule/TimeTable.astro @@ -19,22 +19,24 @@ const [cardClass, Icon] = getScheduleCardStyle(title);
-
+
{formatTime(start_at)} - {formatTime(end_at)} - {speaker_name && ( -
- - {speaker_name} -
- )} + { + speaker_name && ( +
+ + {speaker_name} +
+ ) + }
- -

- {title} -

+ +

+ {title} +

diff --git a/2025/src/components/Schedule/index.astro b/2025/src/components/Schedule/index.astro index 58abd50d..b3482754 100644 --- a/2025/src/components/Schedule/index.astro +++ b/2025/src/components/Schedule/index.astro @@ -7,12 +7,8 @@ const timetable = await getCollection("timetable"); ---
-
+
スケジュール - { - timetable - .shift() - ?.data.map((schedule) => ) - } + {timetable.shift()?.data.map((schedule) => )}
diff --git a/2025/src/components/Schedule/logic.ts b/2025/src/components/Schedule/logic.ts index 00103460..4ed052db 100644 --- a/2025/src/components/Schedule/logic.ts +++ b/2025/src/components/Schedule/logic.ts @@ -11,11 +11,10 @@ export const getScheduleCardStyle = (title: string) => { } const isOtherEvent = ["Opening", "Closing", "After party"].includes(title); - if(isOtherEvent) { - return ["bg-blue-50 border-blue-200", MicVocal] + if (isOtherEvent) { + return ["bg-blue-50 border-blue-200", MicVocal]; } - return ["bg-green-50", MicVocal]; }; diff --git a/2025/src/components/Sponsors/Companies.astro b/2025/src/components/Sponsors/Companies.astro index e50ef9c8..575a692e 100644 --- a/2025/src/components/Sponsors/Companies.astro +++ b/2025/src/components/Sponsors/Companies.astro @@ -34,12 +34,7 @@ const rankNameMap = { }; const getGridClasses = (rank: string, count: number) => { - const baseClasses = [ - "mb-8", - "grid", - "place-items-center", - "gap-4", - ]; + const baseClasses = ["mb-8", "grid", "place-items-center", "gap-4"]; if (rank === "platinum") { return [...baseClasses, "grid-cols-1"]; diff --git a/2025/src/components/Sponsors/Company.astro b/2025/src/components/Sponsors/Company.astro index 2265b663..f04fcf4d 100644 --- a/2025/src/components/Sponsors/Company.astro +++ b/2025/src/components/Sponsors/Company.astro @@ -13,7 +13,9 @@ const { rank, name, url, image } = props.sponsor; let imageUrl = ""; try { - const module = await import(/* @vite-ignore */ `../../assets/sponsors/${image}?url`); + const module = await import( + /* @vite-ignore */ `../../assets/sponsors/${image}?url` + ); imageUrl = module.default; } catch (e) { console.error(`Icon not found: ${image}`); From e9f38b4e4eb0c94e82f8426e2ea6dfe6543c99aa Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Thu, 14 Aug 2025 22:21:11 +0900 Subject: [PATCH 5/8] =?UTF-8?q?chore:=20index.ts=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/components/Schedule/TimeTable.astro | 2 +- 2025/src/components/Schedule/{logic.ts => index.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename 2025/src/components/Schedule/{logic.ts => index.ts} (100%) diff --git a/2025/src/components/Schedule/TimeTable.astro b/2025/src/components/Schedule/TimeTable.astro index c1b08a84..8187b31f 100644 --- a/2025/src/components/Schedule/TimeTable.astro +++ b/2025/src/components/Schedule/TimeTable.astro @@ -1,7 +1,7 @@ --- import Card from "../Card.astro"; import { Clock, User } from "@lucide/astro"; -import { getScheduleCardStyle, formatTime } from "./logic.ts"; +import { getScheduleCardStyle, formatTime } from "./index.ts"; type Props = { class?: string; diff --git a/2025/src/components/Schedule/logic.ts b/2025/src/components/Schedule/index.ts similarity index 100% rename from 2025/src/components/Schedule/logic.ts rename to 2025/src/components/Schedule/index.ts From 758aa323ffe345586072304a9e824786f919f03e Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Thu, 14 Aug 2025 22:22:27 +0900 Subject: [PATCH 6/8] =?UTF-8?q?feat(Schedule):=20=E9=96=8B=E5=A7=8B?= =?UTF-8?q?=E6=97=A5=E6=99=82=E3=81=A7=E3=82=BD=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/components/Schedule/index.astro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/2025/src/components/Schedule/index.astro b/2025/src/components/Schedule/index.astro index b3482754..493abfe7 100644 --- a/2025/src/components/Schedule/index.astro +++ b/2025/src/components/Schedule/index.astro @@ -9,6 +9,11 @@ const timetable = await getCollection("timetable");
スケジュール - {timetable.shift()?.data.map((schedule) => )} + { + timetable + .shift() + ?.data.sort((a, b) => a.start_at.getTime() - b.start_at.getTime()) + .map((schedule) => ) + }
From 1aab41f7a890a02784b84da88120bc8cb8528736 Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Fri, 15 Aug 2025 00:02:20 +0900 Subject: [PATCH 7/8] =?UTF-8?q?fix(Schedule):=20optional=E3=81=AA=E3=81=9F?= =?UTF-8?q?=E3=82=81=E3=80=81`|=20undefined`=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/components/Schedule/TimeTable.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2025/src/components/Schedule/TimeTable.astro b/2025/src/components/Schedule/TimeTable.astro index 8187b31f..479472a5 100644 --- a/2025/src/components/Schedule/TimeTable.astro +++ b/2025/src/components/Schedule/TimeTable.astro @@ -8,8 +8,8 @@ type Props = { start_at: Date; end_at: Date; title: string; - session_id?: string | undefined; - speaker_name?: string | undefined; + session_id?: string; + speaker_name?: string; }; const { title, start_at, end_at, speaker_name } = Astro.props; From 73e18db62f861212a0ab8d51ecca26a8cf553da0 Mon Sep 17 00:00:00 2001 From: staticWagomU Date: Fri, 15 Aug 2025 00:03:08 +0900 Subject: [PATCH 8/8] =?UTF-8?q?fix(Schedule):=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AAprops=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025/src/components/Schedule/TimeTable.astro | 1 - 1 file changed, 1 deletion(-) diff --git a/2025/src/components/Schedule/TimeTable.astro b/2025/src/components/Schedule/TimeTable.astro index 479472a5..ebcb3d4d 100644 --- a/2025/src/components/Schedule/TimeTable.astro +++ b/2025/src/components/Schedule/TimeTable.astro @@ -4,7 +4,6 @@ import { Clock, User } from "@lucide/astro"; import { getScheduleCardStyle, formatTime } from "./index.ts"; type Props = { - class?: string; start_at: Date; end_at: Date; title: string;