Skip to content

Commit 8e0d7c6

Browse files
committed
PUSH
1 parent d2d7e15 commit 8e0d7c6

File tree

6 files changed

+62
-28
lines changed

6 files changed

+62
-28
lines changed

src/components/Card.astro

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
---
22
import { Icon } from "astro-icon/components";
33
4-
const { title, icon = "simple-icons:html5", description, link } = Astro.props;
4+
const { title, icon = "simple-icons:html5", description } = Astro.props;
5+
// If title is a string starting with http or https, treat it as an image URL
6+
const iconIsImage = typeof icon === "string" && /^https?:\/\//i.test(icon);
57
---
68
<div class="card bg-base-200 border-2 border-neutral-content rounded-xl">
79
<div class="card-body">
810
<h2 class="card-title inline-flex items-center gap-1">
9-
<Icon name={icon} class="text-2xl mr-2" />
10-
{title}
11+
{iconIsImage ? (
12+
<img src={icon} alt="title image" class="h-6 w-auto mr-2 rounded" />
13+
) : (
14+
<Icon name={icon} class="text-2xl mr-2" />
15+
)}
16+
{ title }
1117
</h2>
1218
<p>{description}</p>
1319
<div class="card-actions justify-end">
14-
<a href={link} target="_blank" class="btn btn-primary">Voir l'archive</a>
20+
<slot />
1521
</div>
1622
</div>
1723
</div>

src/components/CardSection.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
const {title = "Portfolios"} = Astro.props;
3+
---
4+
5+
<h1 class="text-4xl md:text-5xl font-bold mt-8">{ title }</h1>
6+
7+
<div class="grid grid-cols-1 md:grid-cols-2 2xl:grid-cols-3 mt-4 mb-12 gap-6">
8+
<slot />
9+
</div>

src/pages/archives.astro

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
---
22
import Layout from "../layouts/default.astro";
3-
import Card from "../components/Card.astro";
43
import { Icon } from "astro-icon/components";
4+
import CardSection from "../components/CardSection.astro";
5+
import Card from "../components/Card.astro";
56
---
67

7-
<Layout title="Projets">
8+
<Layout title="Blog">
89
<div class="py-8 md:px-32">
910
<div class="bg-[url('/banners/dark.png')] h-64 bg-cover bg-center rounded-lg border-2 border-neutral-content p-4" />
10-
<div class="my-12 text-center">
11-
<h1 class="text-5xl md:text-6xl font-bold">Archives</h1>
12-
<p class="text-lg text-base-content/70 mt-2">Vous trouverez ici des versions archivés des différent sites webs que j'ai pu créer au fil des années.</p>
1311
</div>
12+
<div class="mt-8 text-center">
13+
<h1 class="text-4xl font-bold">Funasitien - Archives</h1>
14+
<p class="text-lg text-base-content/70 mt-2">Bienvenue sur mon site personnel !</p>
15+
</div>
16+
</div>
1417

18+
<div class="p-8">
19+
<CardSection>
20+
<Card title="Premier Portfolio" date="~2021"/>
21+
</CardSection>
1522

16-
<div class="mt-8 py-8">
17-
<h1 class="text-4xl md:text-5xl font-bold">Portfolios</h1>
18-
19-
<div class="grid grid-cols-1 md:grid-cols-3 my-8">
20-
<Card title="Premier Portfolio" date="~2021" link="https://funa.dev/funasitien-website/" />
21-
</div>
22-
23-
<div class="divider magic text-base-content/20 py-4">
24-
When web addiction meets design obsession
25-
</div>
26-
27-
<h1 class="text-4xl md:text-5xl font-bold mt-6 md:mt-12">DEMOCRAFT.FR</h1>
28-
29-
<div class="grid grid-cols-1 md:grid-cols-3 my-8">
30-
<Card title="Azuriom Glass" icon="simple-icons:laravel" date="2024" />
31-
</div>
32-
33-
</div>
23+
<CardSection>
24+
<Card title="Premier Portfolio" date="~2021" />
25+
</CardSection>
3426
</div>
3527
</Layout>

src/pages/blog.astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
import Layout from "../layouts/default.astro";
33
import { Icon } from "astro-icon/components";
4+
import CardSection from "../components/CardSection.astro";
5+
import Card from "../components/Card.astro";
46
---
57

68
<Layout title="Blog">
@@ -12,4 +14,14 @@ import { Icon } from "astro-icon/components";
1214
<p class="text-lg text-base-content/70 mt-2">Bienvenue sur mon site personnel !</p>
1315
</div>
1416
</div>
17+
18+
<div class="p-8">
19+
<CardSection>
20+
<Card title="Premier Portfolio" date="~2021" link="https://funa.dev/funasitien-website/" />
21+
</CardSection>
22+
23+
<CardSection>
24+
<Card title="Premier Portfolio" date="~2021" link="https://funa.dev/funasitien-website/" />
25+
</CardSection>
26+
</div>
1527
</Layout>

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon } from "astro-icon/components";
44
---
55

66
<Layout title="Accueil">
7-
<div class="md:py-8 md:px-32">
7+
<div class="md:p-8">
88
<div
99
class="bg-[url('/banners/classic.png')] h-32 md:h-64 bg-cover bg-center rounded-lg border-2 border-neutral-content p-4"
1010
>

src/pages/projets.astro

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
import Layout from "../layouts/default.astro";
33
import { Icon } from "astro-icon/components";
4+
import CardSection from "../components/CardSection.astro";
5+
import Card from "../components/Card.astro";
46
---
57

68
<Layout title="Projets">
@@ -12,4 +14,17 @@ import { Icon } from "astro-icon/components";
1214
<p class="text-lg text-base-content/70 mt-2">Bienvenue sur mon site personnel !</p>
1315
</div>
1416
</div>
17+
18+
<div class="p-8">
19+
<CardSection title="Projets Actuels">
20+
<Card title="DEMOCRAFT" date="2023-Aujourd'hui" link="https://funa.dev/funasitien-website/" />
21+
<Card title="Smart" date="2023-Aujourd'hui" link="https://funa.dev/funasitien-website/" />
22+
<Card title="Vaatigames" icon="https://vaatigames.ovh/img/vaati2.png" date="2024-Aujourd'hui" link="https://funa.dev/funasitien-website/" />
23+
<Card title="MOODS" date="2023-Aujourd'hui" link="https://funa.dev/funasitien-website/" />
24+
</CardSection>
25+
26+
<CardSection>
27+
<Card title="Diamond Heberg" date="2022-2024" link="https://funa.dev/funasitien-website/" />
28+
</CardSection>
29+
</div>
1530
</Layout>

0 commit comments

Comments
 (0)