Skip to content

Commit 0af2d06

Browse files
authored
Merge pull request #186 from OUCC/add_OUTechsInfo_to_freshman_lesson
講習会ページにOUTechsへの参加リンクの追加と、講習会主催団体情報の追加
2 parents dee4382 + 8acdd98 commit 0af2d06

7 files changed

Lines changed: 79 additions & 17 deletions

File tree

src/@types/ou-techs-members.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @description OUTechsに参加している団体を表す型
3+
*/
4+
export type OUTechsCirclesName =
5+
| 'OUCC'
6+
| 'ToolBox'
7+
| 'RAINBOU'
8+
| '再履バス同好会 技術部'
9+
| 'GDG on Campus Osaka'
10+
| 'GGC'
11+
| 'Wani Hackase'
12+
| 'Robohan'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
import Icon from '@/components/common/Icon.astro'
3+
import LinkButton from './LinkButton.astro'
4+
---
5+
6+
<LinkButton
7+
href="https://discord.gg/gmhPgAGAGx"
8+
target="_blank"
9+
variant="discord"
10+
>
11+
<span class="flex items-center gap-2.5">
12+
<Icon name="discord" alt="Discord" class="w-7" />
13+
<span>講習会に参加</span>
14+
</span>
15+
</LinkButton>

src/components/ou-techs/CircleList.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import GgcLogo from '@/assets/ggc-logo.png'
1010
import WanihackaseLogo from '@/assets/wanihackase-logo.png'
1111
import RobohanLogo from '@/assets/robohan-logo.png'
1212
13-
const circles: ComponentProps<typeof CircleListItem>[] = [
13+
export const circles: ComponentProps<typeof CircleListItem>[] = [
1414
{
1515
name: 'OUCC',
1616
description:

src/components/ou-techs/CircleListItem.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import GithubIcon from '@fortawesome/fontawesome-free/svgs/brands/github.svg'
55
import XtwitterIcon from '@fortawesome/fontawesome-free/svgs/brands/x-twitter.svg'
66
import InstagramIcon from '@fortawesome/fontawesome-free/svgs/brands/instagram.svg'
77
import { Image } from 'astro:assets'
8+
import type { OUTechsCirclesName } from '@/@types/ou-techs-members'
89
910
type SvgComponent = typeof import('*.svg').default
1011
1112
interface Props {
1213
logo: ImageMetadata | SvgComponent
13-
name: string
14+
name: OUTechsCirclesName
1415
description: string
1516
homepage: string
1617
github?: string

src/components/workshop/Workshop2025Section.astro

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
22
import Section from '@/components/common/Section.astro'
33
import WorkshopCard from './WorkshopCard.astro'
4+
import type { ComponentProps } from 'astro/types'
45
5-
export interface Item {
6+
export interface Item
7+
extends Omit<ComponentProps<typeof WorkshopCard>, 'date'> {
68
date: Date
7-
title: string
8-
description: string
9-
place?: string
109
}
11-
1210
export function date(
1311
month: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,
1412
date: number,
@@ -67,34 +65,39 @@ export const items: Item[] = [
6765
export const items2: Item[] = [
6866
{
6967
date: date(4, 17),
70-
title: 'Python (1日目)',
68+
title: 'Python',
7169
place: 'C301',
70+
circleNames: ['Wani Hackase'],
7271
description:
7372
'Pythonの基礎を学びます。PythonはAIやデータ分析に使用されます。',
7473
},
7574
{
7675
date: date(4, 18),
77-
title: 'HTML, CSS (1日目)',
76+
title: 'HTML, CSS',
7877
place: 'C105',
78+
circleNames: ['再履バス同好会 技術部'],
7979
description:
8080
'HTML, CSSの基礎を学びます。HTML, CSSはwebページの作成に使用されます。',
8181
},
8282
{
8383
date: date(4, 19),
84-
title: 'ハードウェア入門 (1日目)',
84+
title: 'ハードウェア入門',
8585
place: 'C104',
86+
circleNames: ['ToolBox', 'Robohan'],
8687
description:
8788
'ハードウェアの基礎を学びます。電子回路、センサ、 メカ機構などを扱います。',
8889
},
8990
{
9091
date: date(4, 22),
91-
title: 'TypeScript (1日目)',
92+
title: 'TypeScript',
93+
circleNames: ['GGC'],
9294
description:
9395
'TypeScriptの基礎を学びます。TypeScriptはwebサイトの作成に使用されます。',
9496
},
9597
{
9698
date: date(4, 23),
97-
title: 'C/C++ (1日目)',
99+
title: 'C/C++',
100+
circleNames: ['RAINBOU'],
98101
description:
99102
'C/C++の基礎を学びます。C/C++は組み込み用途やゲーム開発に使用されます。',
100103
},
@@ -128,10 +131,6 @@ const dateFormat = new Intl.DateTimeFormat('ja-JP', {
128131
<Section background="secondary">
129132
<Fragment slot="title">2025年度の他団体の講習会</Fragment>
130133
<div class="flex flex-col gap-5">
131-
<p>
132-
2025年度の他団体による講習会について情報をまとめています。開始時刻や開催場所などの詳細や他の講習会については随時更新します。是非お気軽にご参加ください!
133-
</p>
134-
<p>各回1~3時間程度の予定となっています。途中退室も可能です。</p>
135134
<ul class="grid grid-cols-[repeat(auto-fit,minmax(18rem,1fr))] gap-5">
136135
{
137136
items2.map(({ date, ...item }) => (

src/components/workshop/WorkshopCard.astro

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,46 @@
11
---
22
import Icon from '@/components/common/Icon.astro'
3+
import type { OUTechsCirclesName } from '@/@types/ou-techs-members'
4+
import { circles } from '../ou-techs/CircleList.astro'
35
interface Props {
46
title: string
57
date: string
68
description: string
79
place?: string
10+
circleNames?: OUTechsCirclesName[]
811
}
912
10-
const { title, date, description, place } = Astro.props
13+
const { title, date, description, place, circleNames } = Astro.props
14+
const clubInfos = circles.filter((c) => circleNames?.includes(c.name))
1115
---
1216

1317
<li
1418
class="flex flex-1 flex-col gap-2 rounded-xl border border-slate-300 bg-white p-5 drop-shadow"
1519
>
1620
<h2 class="text-xl font-bold">{title}</h2>
21+
<p class="flex items-center gap-2 text-slate-600">
22+
{
23+
circleNames && clubInfos ? (
24+
<span class="flex items-center gap-1">
25+
<span>
26+
by
27+
{clubInfos
28+
.map((c) => (
29+
<a
30+
href={c.homepage}
31+
target="_blank"
32+
class="aspect-square rounded-full p-1 hover:bg-gray-200/100"
33+
title={`${c.name}公式サイト`}
34+
>
35+
{c.name}
36+
</a>
37+
))
38+
.reduce((prev, curr) => [prev, ' & ', curr])}
39+
</span>
40+
</span>
41+
) : null
42+
}
43+
</p>
1744
<p class="flex items-center gap-2 text-slate-600">
1845
<Icon name="clock" alt="開催日時" class="w-4" />
1946
<span>{date}</span>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
---
22
import Section from '@/components/common/Section.astro'
3+
import OUTechsDiscordJoinLink from '@/components/common/button/OUTechsDiscordJoinLink.astro'
34
---
45

56
<Section background="white">
67
<div class="flex flex-col gap-5">
78
<p>
89
新歓イベントの一環として部員や外部講師による講習会を開催しています。様々な技術について未経験者向けに解説しながら実際に使えるようになることを目指します。講習会内で必要なソフトウェアのインストールから説明しますので、事前準備は必要ありません。
910
</p>
11+
<div class="flex justify-center">
12+
<OUTechsDiscordJoinLink />
13+
</div>
14+
<p>
15+
こちらから講習会の資料や連絡を受け取れます。
16+
どなたでも無料で参加できます。是非お気軽にご参加ください!
17+
</p>
1018
</div>
1119
</Section>

0 commit comments

Comments
 (0)