Skip to content

Commit ba6039a

Browse files
committed
2026年度の講習会情報を書くスペースを用意
1 parent 172c4b9 commit ba6039a

3 files changed

Lines changed: 51 additions & 4 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
import Section from '@/components/common/Section.astro'
3+
import WorkshopCard from './WorkshopCard.astro'
4+
import type { ComponentProps } from 'astro/types'
5+
6+
export interface Item
7+
extends Omit<ComponentProps<typeof WorkshopCard>, 'date'> {
8+
date?: Date
9+
}
10+
export function date(
11+
month: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,
12+
date: number,
13+
hour?: number,
14+
minute?: number,
15+
) {
16+
return hour === undefined
17+
? new Date(2026, month - 1, date)
18+
: minute === undefined
19+
? new Date(2026, month - 1, date, hour)
20+
: new Date(2026, month - 1, date, hour, minute)
21+
}
22+
23+
export const items: Item[] = []
24+
25+
const dateFormat = new Intl.DateTimeFormat('ja-JP', {
26+
weekday: 'short',
27+
month: 'numeric',
28+
day: 'numeric',
29+
// hour: '2-digit',
30+
// minute: '2-digit',
31+
})
32+
---
33+
34+
<Section background="secondary">
35+
<Fragment slot="title">2026年度のOUCCの講習会</Fragment>
36+
<div class="flex flex-col gap-5">
37+
<p>
38+
2026年度の講習会をサーオリ後に発表します。
39+
開始時刻や開催場所などの詳細ついては随時更新します。是非お気軽にご参加ください!
40+
</p>
41+
<ul class="grid grid-cols-[repeat(auto-fit,minmax(18rem,1fr))] gap-5">
42+
{
43+
items.map(({ date, ...item }) => (
44+
<WorkshopCard {...item} date={dateFormat.format(date)} />
45+
))
46+
}
47+
</ul>
48+
</div>
49+
</Section>

src/components/workshop/WorkshopSection.astro

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,5 @@ import DiscordJoinLink from '@/components/common/button/DiscordJoinLink.astro'
1515
こちらから講習会の資料や連絡を受け取れます。
1616
どなたでも無料で参加できます。是非お気軽にご参加ください!
1717
</p>
18-
<p>
19-
2026年度の講習会を現在計画中です。
20-
2025年度には、以下のような講習会を開催しました。
21-
</p>
2218
</div>
2319
</Section>

src/pages/workshop.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Layout from '@/layouts/Layout.astro'
33
import Hero from '@/components/common/Hero.astro'
44
import WorkshopSection from '@/components/workshop/WorkshopSection.astro'
55
import Workshop2025Section from '@/components/workshop/Workshop2025Section.astro'
6+
import Workshop2026Section from '@/components/workshop/Workshop2026Section.astro'
67
---
78

89
<Layout
@@ -13,6 +14,7 @@ import Workshop2025Section from '@/components/workshop/Workshop2025Section.astro
1314
<Hero title="講習会" copy="一緒に新しい技術を学びませんか?" compact />
1415
<main>
1516
<WorkshopSection />
17+
<Workshop2026Section />
1618
<Workshop2025Section />
1719
</main>
1820
</Layout>

0 commit comments

Comments
 (0)