Compare commits
2 commits
030298d311
...
e0cffad911
| Author | SHA1 | Date | |
|---|---|---|---|
| e0cffad911 | |||
| b26bc077d9 |
5 changed files with 4 additions and 11 deletions
|
|
@ -12,13 +12,6 @@ const languageOptions = [
|
||||||
{ code: 'ar', label: 'AR', flag: '🇸🇦', dir: 'rtl' }
|
{ 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 {
|
function getCurrentLocaleUrl(targetLocale: string): string {
|
||||||
let path = currentPath;
|
let path = currentPath;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ const categoryLabels: Record<string, string> = {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script define:vars={{ imagesForJS, albumTitle, showCategory, category, categoryLabels }}>
|
<script is:inline define:vars={{ imagesForJS, albumTitle, showCategory, category, categoryLabels }}>
|
||||||
window.lightboxData = {
|
window.lightboxData = {
|
||||||
images: JSON.parse(imagesForJS),
|
images: JSON.parse(imagesForJS),
|
||||||
albumTitle,
|
albumTitle,
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const imagesForJS = JSON.stringify(images.map(img => ({
|
||||||
<SlideControls />
|
<SlideControls />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script define:vars={{ imagesForJS }}>
|
<script is:inline define:vars={{ imagesForJS }}>
|
||||||
window.galleryData = {
|
window.galleryData = {
|
||||||
images: JSON.parse(imagesForJS),
|
images: JSON.parse(imagesForJS),
|
||||||
currentCategory: 'favorites'
|
currentCategory: 'favorites'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { defineCollection, z, type ImageFunction } from "astro:content";
|
import { defineCollection, z } from "astro:content";
|
||||||
|
|
||||||
const formatDate = (date: Date, lang: string = 'fr') => {
|
const formatDate = (date: Date, lang: string = 'fr') => {
|
||||||
const locales: Record<string, string> = { fr: 'fr-FR', en: 'en-US', ar: 'ar-SA' };
|
const locales: Record<string, string> = { fr: 'fr-FR', en: 'en-US', ar: 'ar-SA' };
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
const { title = "Galerie Photo - Jalil Arfaoui", enableScroll = false, hideFooter = false } = Astro.props;
|
const { title = "Galerie Photo - Jalil Arfaoui", enableScroll = false } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue