tangled
alpha
login
or
join now
finxol.io
/
portfolio
0
fork
atom
Personal site
staging.colinozanne.co.uk
portfolio
astro
0
fork
atom
overview
issues
pulls
pipelines
feat: make subtitle a prop so that it is i18ned
finxol.io
4 months ago
5c7b4ff6
621acec2
verified
This commit was signed with the committer's
known signature
.
finxol.io
SSH Key Fingerprint:
SHA256:olFE3asYdoBMScuJOt60UxXdJ0RFdGv5kVKrdOtIcPI=
+11
-3
3 changed files
expand all
collapse all
unified
split
src
layouts
Layout.astro
pages
en
index.astro
fr
index.astro
+9
-1
src/layouts/Layout.astro
···
7
7
import colinPng from "@/assets/img/colin.png";
8
8
import colinWebp from "@/assets/img/colin.webp";
9
9
10
10
+
// Define the props interface
11
11
+
interface Props {
12
12
+
subtitle: string;
13
13
+
}
14
14
+
15
15
+
// Destructure the prop
16
16
+
const { subtitle } = Astro.props;
17
17
+
10
18
const path = Astro.originPathname.replace(/\/(fr|en)\//, "/");
11
19
const locale = Astro.currentLocale;
12
20
---
···
27
35
<img src={colinPng.src} alt="Colin Ozanne" />
28
36
</picture>
29
37
<h1 class="container">Colin <br class="desktop-only" /> Ozanne</h1>
30
30
-
<p class="container">Étudiant M1 Informatique</p>
38
38
+
<p class="container">{subtitle}</p>
31
39
</header>
32
40
<main class="">
33
41
<slot />
+1
-1
src/pages/en/index.astro
···
4
4
import { Icon } from "astro-icon/components";
5
5
---
6
6
7
7
-
<Layout>
7
7
+
<Layout subtitle="Computer Science Student">
8
8
<article>
9
9
<section class="container layout content-intro">
10
10
<aside>👋</aside>
+1
-1
src/pages/fr/index.astro
···
4
4
import { Icon } from "astro-icon/components";
5
5
---
6
6
7
7
-
<Layout>
7
7
+
<Layout subtitle="Étudiant M1 Informatique">
8
8
<article>
9
9
<section class="container layout content-intro">
10
10
<aside>👋</aside>