+
+
+
+
+
+
+
+
+
+ {currentIndex + 1} / {images.length}
+
+
+
+ {/* Keyboard navigation */}
+ {isOpen && (
+
{
+ if (e.key === 'Escape') onClose();
+ if (e.key === 'ArrowLeft') prevImage();
+ if (e.key === 'ArrowRight') nextImage();
+ }}
+ onClick={onClose}
+ />
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/components/blog/TableOfContents.tsx b/components/blog/TableOfContents.tsx
index 4a870976..b27d5d50 100644
--- a/components/blog/TableOfContents.tsx
+++ b/components/blog/TableOfContents.tsx
@@ -75,7 +75,7 @@ export default function TableOfContents({ headings, locale }: TableOfContentsPro
}
}}
>
- {heading.text}
+ {heading.text.replace(/\*\*(.*?)\*\*/g, '$1')}
))}
diff --git a/components/home/GallerySection.tsx b/components/home/GallerySection.tsx
index a974abd7..77601fea 100644
--- a/components/home/GallerySection.tsx
+++ b/components/home/GallerySection.tsx
@@ -1,7 +1,10 @@
-import React from 'react';
+'use client';
+
+import React, { useState } from 'react';
import Image from 'next/image';
import { useTranslations } from 'next-intl';
import { Section, Container, Heading } from '../../components/ui';
+import Lightbox from '../Lightbox';
export default function GallerySection() {
const t = useTranslations('Home.gallery');
@@ -14,6 +17,9 @@ export default function GallerySection() {
'/uploads/2024/12/DSC07768-Large.webp',
];
+ const [lightboxOpen, setLightboxOpen] = useState(false);
+ const [lightboxIndex, setLightboxIndex] = useState(0);
+
return (
@@ -23,9 +29,16 @@ export default function GallerySection() {
{images.map((src, idx) => (
-
-
{
+ setLightboxIndex(idx);
+ setLightboxOpen(true);
+ }}
+ className="relative aspect-[4/3] overflow-hidden rounded-3xl group shadow-lg hover:shadow-2xl transition-all duration-700 cursor-pointer"
+ >
+
-
+
))}
+
+ setLightboxOpen(false)}
+ />
);
}
diff --git a/components/home/RecentPosts.tsx b/components/home/RecentPosts.tsx
index 7390393e..472888cd 100644
--- a/components/home/RecentPosts.tsx
+++ b/components/home/RecentPosts.tsx
@@ -19,10 +19,10 @@ export default async function RecentPosts({ locale }: RecentPostsProps) {
-
+
{t('allArticles')}
-
+
{t('allArticles')}
→
@@ -56,10 +56,10 @@ export default async function RecentPosts({ locale }: RecentPostsProps) {
day: 'numeric'
})}
-
+
{post.frontmatter.title}
-
+
{t('readMore')}