Skip to content

Commit dfffa4b

Browse files
authored
Merge pull request #181 from OUCC/180-seminar-page-update
# 180 2025年度講習会のページ更新
2 parents 534b674 + d709371 commit dfffa4b

File tree

2 files changed

+92
-2
lines changed

2 files changed

+92
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
import Section from '@/components/common/Section.astro'
3+
import WorkshopCard from './WorkshopCard.astro'
4+
5+
export interface Item {
6+
date: Date
7+
title: string
8+
description: string
9+
place?: string
10+
}
11+
12+
export function date(
13+
month: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,
14+
date: number,
15+
hour?: number,
16+
minute?: number,
17+
) {
18+
return hour === undefined
19+
? new Date(2025, month - 1, date)
20+
: minute === undefined
21+
? new Date(2025, month - 1, date, hour)
22+
: new Date(2025, month - 1, date, hour, minute)
23+
}
24+
25+
export const items: Item[] = [
26+
{
27+
date: date(4, 12),
28+
title: 'ガイダンス・環境構築',
29+
description:
30+
'開発に必須のツールであるVSCodeのインストールやPythonの導入などを行います。',
31+
},
32+
{
33+
date: date(4, 21),
34+
title: 'Linux (Bash)',
35+
description:
36+
'サーバや組み込み用途で広く利用されているOSであるLinuxについて学びます。',
37+
},
38+
{
39+
date: date(4, 28),
40+
title: 'Git/GitHub',
41+
description:
42+
'ソースコードの編集履歴管理システムであるGitの基礎を学びます。共同開発に役立ちます。',
43+
},
44+
{
45+
date: date(5, 12),
46+
title: 'C# (1日目)',
47+
description: 'C#の基礎を学びます。C#はUnityでも使用されています。',
48+
},
49+
{
50+
date: date(5, 19),
51+
title: 'C# (2日目)',
52+
description: 'C#の基礎を学びます。C#はUnityでも使用されています。',
53+
},
54+
{
55+
date: date(5, 26),
56+
title: 'C# (3日目)',
57+
description: 'C#の基礎を学びます。C#はUnityでも使用されています。',
58+
},
59+
{
60+
date: date(6, 16),
61+
title: 'C# (4日目)',
62+
description: 'C#の基礎を学びます。C#はUnityでも使用されています。',
63+
},
64+
]
65+
66+
const dateFormat = new Intl.DateTimeFormat('ja-JP', {
67+
weekday: 'short',
68+
month: 'numeric',
69+
day: 'numeric',
70+
// hour: '2-digit',
71+
// minute: '2-digit',
72+
})
73+
---
74+
75+
<Section background="secondary">
76+
<Fragment slot="title">2025年度の講習会</Fragment>
77+
<div class="flex flex-col gap-5">
78+
<p>
79+
2025年度の講習会について情報をまとめています。開始時刻や開催場所などの詳細や他の講習会については随時更新します。是非お気軽にご参加ください!
80+
</p>
81+
<p>各回1~3時間程度の予定となっています。途中退室も可能です。</p>
82+
<ul class="flex flex-wrap gap-5">
83+
{
84+
items.map(({ date, ...item }) => (
85+
<WorkshopCard {...item} date={dateFormat.format(date)} />
86+
))
87+
}
88+
</ul>
89+
</div>
90+
</Section>

src/pages/workshop.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Layout from '@/layouts/Layout.astro'
33
import Hero from '@/components/common/Hero.astro'
44
import WorkshopSection from '@/components/workshop/WorkshopSection.astro'
5-
import Workshop2024Section from '@/components/workshop/Workshop2024Section.astro'
5+
import Workshop2025Section from '@/components/workshop/Workshop2025Section.astro'
66
---
77

88
<Layout
@@ -13,6 +13,6 @@ import Workshop2024Section from '@/components/workshop/Workshop2024Section.astro
1313
<Hero title="講習会" copy="一緒に新しい技術を学びませんか?" compact />
1414
<main>
1515
<WorkshopSection />
16-
<Workshop2024Section />
16+
<Workshop2025Section />
1717
</main>
1818
</Layout>

0 commit comments

Comments
 (0)