Skip to content

Commit 7398221

Browse files
committed
feat: add es video
1 parent 44f0ea2 commit 7398221

File tree

9 files changed

+51
-37
lines changed

9 files changed

+51
-37
lines changed

docs/src/components/ChallengeFooter.astro

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getEntry } from 'astro:content';
55
import AnsweredUser from './github/AnsweredUser.svelte';
66
77
const { lang } = Astro.props;
8-
const { author, challengeNumber, title, blogLink, videoLink, command } = Astro.props.entry.data;
8+
const { author, challengeNumber, title, blogLink, videoLinks, command } = Astro.props.entry.data;
99
const { data } = await getEntry('i18n', lang);
1010
1111
const authorLink = `https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A${challengeNumber}+label%3A"answer+author"`;
@@ -70,8 +70,9 @@ const npxCommand = `npx nx serve ${command}`;
7070
</svg>
7171
{data['challenge.footer.blogPost']}
7272
</a>}
73-
{videoLink &&
74-
<VideoButton {...videoLink} {...Astro.props} />}
73+
{videoLinks && videoLinks.map((videoLink) => (
74+
<VideoButton {...videoLink} {...Astro.props} />
75+
))}
7576
</div>
7677

7778
<AnsweredUser client:load {challengeNumber} />

docs/src/components/VideoButton.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ interface Props {
55
lang: any;
66
link: string;
77
alt: string;
8-
flag?: 'FR';
8+
flag?: 'FR' | 'ES';
99
}
1010
1111
const { link, alt, flag, lang } = Astro.props;
1212
const { data } = await getEntry('i18n', lang);
1313
const isFR = flag === 'FR';
14+
const isES = flag === 'ES';
1415
---
1516

1617
<a
@@ -20,5 +21,6 @@ const isFR = flag === 'FR';
2021
alt={alt}>
2122
<svg aria-hidden="true" class="astro-yzt5nm4y astro-lq7oo3uf" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z"></path></svg>
2223
{data['challenge.footer.video']}
23-
{isFR && <span class="flag">🇫🇷</span>}
24+
{isFR && <span>🇫🇷</span>}
25+
{isES && <span>🇪🇸</span>}
2426
</a>

docs/src/content/config.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ const docs = defineCollection({
2222
contributors: z.array(z.string()).optional(),
2323
command: z.string().optional(),
2424
blogLink: z.string().optional(),
25-
videoLink: z
26-
.object({
27-
link: z.string(),
28-
alt: z.string(),
29-
flag: z.enum(['FR']).optional(),
30-
})
25+
videoLinks: z
26+
.array(
27+
z.object({
28+
link: z.string(),
29+
alt: z.string(),
30+
flag: z.enum(['FR', 'ES']).optional(),
31+
}),
32+
)
3133
.optional(),
3234
}),
3335
})(ctx),

docs/src/content/docs/challenges/angular/1-projection.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ contributors:
1111
challengeNumber: 1
1212
command: angular-projection
1313
blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5
14-
videoLink:
15-
link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
16-
alt: Projection video by Arthur Lannelucq
17-
flag: FR
14+
videoLinks:
15+
- link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
16+
alt: Projection video by Arthur Lannelucq
17+
flag: FR
18+
- link: https://www.youtube.com/watch?v=yNrfvu7vTa4
19+
alt: Projection video by Amos Lucian IsailaAmos Lucian Isaila
20+
flag: ES
1821
sidebar:
1922
order: 1
2023
---

docs/src/content/docs/es/challenges/angular/1-projection.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ contributors:
77
challengeNumber: 1
88
command: angular-projection
99
blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5
10-
videoLink:
11-
link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12-
alt: Projection video by Arthur Lannelucq
13-
flag: FR
10+
videoLinks:
11+
- link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12+
alt: Projection video by Arthur Lannelucq
13+
flag: FR
14+
- link: https://www.youtube.com/watch?v=yNrfvu7vTa4
15+
alt: Projection video by Amos Lucian IsailaAmos Lucian Isaila
16+
flag: ES
1417
sidebar:
1518
order: 1
1619
---

docs/src/content/docs/fr/challenges/angular/1-projection.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ contributors:
77
challengeNumber: 1
88
command: angular-projection
99
blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5
10-
videoLink:
11-
link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12-
alt: Projection video by Arthur Lannelucq
13-
flag: FR
10+
videoLinks:
11+
- link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12+
alt: Projection video by Arthur Lannelucq
13+
flag: FR
14+
- link: https://www.youtube.com/watch?v=yNrfvu7vTa4
15+
alt: Projection video by Amos Lucian IsailaAmos Lucian Isaila
16+
flag: ES
1417
sidebar:
1518
order: 1
1619
---

docs/src/content/docs/pt/challenges/angular/1-projection.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ contributors:
77
challengeNumber: 1
88
command: angular-projection
99
blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5
10-
videoLink:
11-
link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12-
alt: Vídeo de projeção por Arthur Lannelucq
13-
flag: FR
10+
videoLinks:
11+
- link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12+
alt: Projection video by Arthur Lannelucq
13+
flag: FR
14+
- link: https://www.youtube.com/watch?v=yNrfvu7vTa4
15+
alt: Projection video by Amos Lucian IsailaAmos Lucian Isaila
16+
flag: ES
1417
sidebar:
1518
order: 1
1619
---

docs/src/content/docs/ru/challenges/angular/1-projection.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ contributors:
77
challengeNumber: 1
88
command: angular-projection
99
blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5
10-
videoLink:
11-
link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12-
alt: Projection video by Arthur Lannelucq
13-
flag: FR
10+
videoLinks:
11+
- link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq
12+
alt: Projection video by Arthur Lannelucq
13+
flag: FR
14+
- link: https://www.youtube.com/watch?v=yNrfvu7vTa4
15+
alt: Projection video by Amos Lucian IsailaAmos Lucian Isaila
16+
flag: ES
1417
sidebar:
1518
order: 1
1619
---

docs/src/styles/custom-css.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ starlight-menu-button svg {
137137
color: #1c1a1d;
138138
}
139139

140-
.flag {
141-
background-color: white;
142-
padding: 1px 2px;
143-
border-radius: 999px;
144-
}
145-
146140
.right-sidebar-panel {
147141
height: 100%;
148142
}

0 commit comments

Comments
 (0)