import fs from 'fs' const content = `'use client' import { useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' import Image from 'next/image' import BougainvilleaMotif from '@/components/BougainvilleaMotif' import { useTranslations } from 'next-intl' import { X } from 'lucide-react' import openinaryLoader from '@/lib/openinary-loader' export default function GalleryPage() { const t = useTranslations('gallery') const [selectedImage, setSelectedImage] = useState(null) const galleryImages = [ 'DSC01477.jpg', 'DSC01478.jpg', 'DSC01479.jpg', 'DSC01480.jpg', 'DSC01481.jpg', 'DSC01482.jpg', 'DSC01483.jpg', 'DSC01487.jpg', 'DSC01535.jpg', 'DSC01544.jpg', 'DSC01554.jpg', 'DSC01560.jpg', 'DSC01563.jpg' ] const galleryItems = galleryImages.map((file, idx) => ({ id: idx + 1, title: t('items.' + ((idx % 6) + 1)), // Use existing translations just to not break them src: \`https://media.ayris.tech/t/starapart/gallery/\${file}\`, colSpan: idx % 4 === 1 ? 'col-span-1 md:col-span-2 lg:col-span-1' : 'col-span-1' })) return (
{/* Header Section */}

{t('title')}

{t('description')}

{/* Masonry-like Grid */} {galleryItems.map((item) => ( setSelectedImage(item.src)} tabIndex={0} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); setSelectedImage(item.src); } }} >
{item.title}
))}
{/* Lightbox Overlay */} {selectedImage && ( setSelectedImage(null)} > e.stopPropagation()} > Enlarged view )}
) } ` fs.writeFileSync('app/[locale]/galeri/page.tsx', content)