Compare commits

..

No commits in common. "e0cffad911d62f23fedbd93942b351feef169e22" and "030298d3111da1e89af9ed655ccbed94ca96d4d9" have entirely different histories.

5 changed files with 11 additions and 4 deletions

View file

@ -12,6 +12,13 @@ const languageOptions = [
{ code: 'ar', label: 'AR', flag: '🇸🇦', dir: 'rtl' }
];
function getLocalizedUrl(url: string, targetLocale: string): string {
if (targetLocale === 'fr') {
return url;
}
return `/${targetLocale}${url}`;
}
function getCurrentLocaleUrl(targetLocale: string): string {
let path = currentPath;

View file

@ -64,7 +64,7 @@ const categoryLabels: Record<string, string> = {
</div>
</div>
<script is:inline define:vars={{ imagesForJS, albumTitle, showCategory, category, categoryLabels }}>
<script define:vars={{ imagesForJS, albumTitle, showCategory, category, categoryLabels }}>
window.lightboxData = {
images: JSON.parse(imagesForJS),
albumTitle,

View file

@ -49,7 +49,7 @@ const imagesForJS = JSON.stringify(images.map(img => ({
<SlideControls />
</div>
<script is:inline define:vars={{ imagesForJS }}>
<script define:vars={{ imagesForJS }}>
window.galleryData = {
images: JSON.parse(imagesForJS),
currentCategory: 'favorites'

View file

@ -1,4 +1,4 @@
import { defineCollection, z } from "astro:content";
import { defineCollection, z, type ImageFunction } from "astro:content";
const formatDate = (date: Date, lang: string = 'fr') => {
const locales: Record<string, string> = { fr: 'fr-FR', en: 'en-US', ar: 'ar-SA' };

View file

@ -1,5 +1,5 @@
---
const { title = "Galerie Photo - Jalil Arfaoui", enableScroll = false } = Astro.props;
const { title = "Galerie Photo - Jalil Arfaoui", enableScroll = false, hideFooter = false } = Astro.props;
---
<!doctype html>