Skip to content

Commit 13b31fd

Browse files
committed
feat: fix typo fr
1 parent e6b39e3 commit 13b31fd

File tree

3 files changed

+32
-30
lines changed

3 files changed

+32
-30
lines changed

src/components/ui/Footer.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { fullName } = profile
1111
<SocialIcons />
1212
</div>
1313
<p>
14-
Copyright © {new Date().getFullYear()} - All right reserved by {fullName}
14+
Copyright © {new Date().getFullYear()} - Tous droits réservés - {fullName}
1515
</p>
1616
</aside>
1717
</footer>

src/pages/blog/[page].astro

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { trimExcerpt } from '../../lib/utils';
55
import { template } from '../../data/settings';
66
import { getCollection } from 'astro:content';
77
import { getRelativeLocaleUrl } from 'astro:i18n';
8-
import {CvFr} from "../../data/CvFr";
8+
import { CvFr } from "../../data/CvFr";
99
1010
export async function getStaticPaths({ paginate }) {
1111
const blogEntries = await getCollection('blog');
@@ -14,7 +14,7 @@ export async function getStaticPaths({ paginate }) {
1414
.map(post => ({
1515
title: post.data.title,
1616
date: post.data.date,
17-
badge: post.data.tags?.[0] ?? 'General',
17+
badge: post.data.tags?.[0] ?? 'Général',
1818
excerpt: trimExcerpt(post.data.excerpt),
1919
slug: post.slug,
2020
}))
@@ -30,9 +30,9 @@ const { page } = Astro.props;
3030
const blogRt = getRelativeLocaleUrl("fr", "blog");
3131
---
3232

33-
<Layout title=`Blog de ${CvFr.person.fullName}`>
33+
<Layout title={`Blog de ${CvFr.person.fullName}`}>
3434
<div>
35-
<h1 class="text-3xl font-bold mb-8">Blog </h1>
35+
<h1 class="text-3xl font-bold mb-8">Blog</h1>
3636
<div class="grid gap-8">
3737
{page.data.map(post => (
3838
<article class="card bg-base-200 transition-all">
@@ -48,7 +48,7 @@ const blogRt = getRelativeLocaleUrl("fr", "blog");
4848
</div>
4949
</div>
5050
<time datetime={post.date} class="text-sm text-base-content/71">
51-
{new Date(post.date).toLocaleDateString('en-US', {
51+
{new Date(post.date).toLocaleDateString('fr-FR', {
5252
year: 'numeric',
5353
month: 'long',
5454
day: 'numeric',
@@ -60,7 +60,7 @@ const blogRt = getRelativeLocaleUrl("fr", "blog");
6060
href={`${blogRt}${post.slug}`}
6161
class="btn btn-sm btn-secondary text-secondary-content"
6262
>
63-
Read More
63+
Lire l’article
6464
</a>
6565
</div>
6666
</div>

src/pages/blog/[slug].astro

+25-23
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {template} from '../../data/settings'
44
import {getCollection, render} from 'astro:content'
55
66
export async function getStaticPaths(): Promise<Array<{ params: { slug: string }, props: { post: any } }>> {
7-
const blogEntries = await getCollection("blog");
7+
const blogEntries = await getCollection("blog");
88
99
return blogEntries
1010
.map(post => {
@@ -26,30 +26,30 @@ const getValidUrl = (url: string) => {
2626
<Layout title={title}>
2727
<div class='max-w-4xl mx-auto mb-20'>
2828
<article
29-
class='prose max-w-none prose-headings:text-base-content prose-p:text-base-content/80'
29+
class='prose max-w-none prose-headings:text-base-content prose-p:text-base-content/80'
3030
>
31-
<!-- Header section -->
31+
<!-- En-tête -->
3232
<div class='mb-8 border-b pb-8'>
3333
<h1 class='text-4xl font-bold mb-4 text-base-content'>{title}</h1>
3434
<div class='flex flex-wrap items-center gap-4 text-base-content/70'>
3535
<!-- Date -->
3636
<time datetime={date} class='flex items-center'>
3737
<svg
38-
xmlns='http://www.w3.org/2000/svg'
39-
class='h-4 w-4 mr-2'
40-
fill='none'
41-
viewBox='0 0 24 24'
42-
stroke='currentColor'
38+
xmlns='http://www.w3.org/2000/svg'
39+
class='h-4 w-4 mr-2'
40+
fill='none'
41+
viewBox='0 0 24 24'
42+
stroke='currentColor'
4343
>
4444
<path
45-
stroke-linecap='round'
46-
stroke-linejoin='round'
47-
stroke-width='2'
48-
d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'
45+
stroke-linecap='round'
46+
stroke-linejoin='round'
47+
stroke-width='2'
48+
d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'
4949
></path>
5050
</svg>
5151
{
52-
new Date(date).toLocaleDateString('en-US', {
52+
new Date(date).toLocaleDateString('fr-FR', {
5353
year: 'numeric',
5454
month: 'long',
5555
day: 'numeric',
@@ -60,19 +60,19 @@ const getValidUrl = (url: string) => {
6060
<!-- Tags -->
6161
{
6262
tags && (
63-
<div class='flex flex-wrap gap-2'>
64-
{tags.map(tag => (
65-
<span class='badge badge-accent badge-outline'>{tag}</span>
66-
))}
67-
</div>
63+
<div class='flex flex-wrap gap-2'>
64+
{tags.map(tag => (
65+
<span class='badge badge-accent badge-outline'>{tag}</span>
66+
))}
67+
</div>
6868
)
6969
}
7070
</div>
7171
</div>
7272

73-
<!-- Post content -->
73+
<!-- Contenu de l'article -->
7474
<div
75-
class='prose mt-8 prose-h2:text-2xl prose-h2:font-bold prose-h2:mb-4
75+
class='prose mt-8 prose-h2:text-2xl prose-h2:font-bold prose-h2:mb-4
7676
prose-h3:text-xl prose-h3:font-semibold prose-h3:mb-3
7777
prose-p:mb-4 prose-p:leading-relaxed
7878
prose-strong:text-base-content prose-strong:font-bold
@@ -84,11 +84,13 @@ const getValidUrl = (url: string) => {
8484
prose-ol:list-decimal prose-ol:pl-6
8585
prose-li:mb-2
8686
prose-img:rounded-lg prose-img:my-8'
87-
>
88-
<Content />
87+
>
88+
<Content />
8989
</div>
90+
91+
<!-- Auteur et lien -->
9092
<div class="m-10">
91-
Auteur: {author}
93+
<p>Auteur : {author}</p>
9294
<div class="card-actions justify-end mt-4">
9395
<a href={getValidUrl(link)} target="_blank" class="btn btn-sm btn-primary text-secondary-content">
9496
Lire plus

0 commit comments

Comments
 (0)