'use client'; import { useState } from 'react'; import Header from "@/components/Header"; import Footer from "@/components/Footer"; export default function MediaGallery() { const [selectedTab, setSelectedTab] = useState<'all' | 'video' | 'photo'>('all'); const [selectedMedia, setSelectedMedia] = useState(null); const mediaItems = [ { id: 1, type: 'video', title: 'A2 Metro Hattı Genel Tanıtım', thumbnail: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg', videoUrl: 'https://www.youtube.com/embed/b9q88QDEcKg', date: '15 Ekim 2025', duration: '5:32', description: 'A2 Metro Hattı projesinin genel tanıtımı ve istasyonların detayları' }, { id: 2, type: 'photo', title: 'Dikimevi İstasyonu İnşaat Çalışmaları', thumbnail: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg', date: '12 Ekim 2025', description: 'Dikimevi metro istasyonunda devam eden kazı ve inşaat çalışmaları' }, { id: 3, type: 'photo', title: 'Tuzluçayır İstasyonu Temel Atma', thumbnail: 'https://images.pexels.com/photos/33950678/pexels-photo-33950678.jpeg', date: '10 Ekim 2025', description: 'Tuzluçayır istasyonunun temel atma töreni anları' }, { id: 4, type: 'video', title: 'Metro İnşaatı İlerleme Raporu', thumbnail: 'https://images.pexels.com/photos/253647/pexels-photo-253647.jpeg', videoUrl: 'https://www.youtube.com/embed/b9q88QDEcKg', date: '8 Ekim 2025', duration: '8:15', description: 'Ekim ayı metro inşaatı ilerleme raporu ve gelecek hedefler' }, { id: 5, type: 'photo', title: 'Modern İstasyon Tasarımları', thumbnail: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg', date: '5 Ekim 2025', description: 'Yeni nesil metro istasyonlarının modern iç mekan tasarımları' }, { id: 6, type: 'video', title: 'Çevre Dostu Metro Projesi', thumbnail: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg', videoUrl: 'https://www.youtube.com/embed/b9q88QDEcKg', date: '1 Ekim 2025', duration: '6:45', description: 'Metro projesinde kullanılan çevre dostu teknolojiler ve sürdürülebilir yaklaşımlar' }, { id: 7, type: 'photo', title: 'İşçi Güvenliği Eğitimi', thumbnail: 'https://images.pexels.com/photos/33950678/pexels-photo-33950678.jpeg', date: '28 Eylül 2025', description: 'İnşaat sahalarında iş güvenliği eğitimleri' }, { id: 8, type: 'photo', title: 'Ray Döşeme Çalışmaları', thumbnail: 'https://images.pexels.com/photos/253647/pexels-photo-253647.jpeg', date: '25 Eylül 2025', description: 'Metro hattında ray döşeme işlemlerinin başlaması' }, ]; const filteredMedia = selectedTab === 'all' ? mediaItems : mediaItems.filter(item => item.type === selectedTab); const selectedMediaItem = selectedMedia !== null ? mediaItems.find(item => item.id === selectedMedia) : null; return (
{/* Başlık */}

Medya Galerisi

A2 Metro Hattı projesi ile ilgili videolar ve fotoğraflar

{/* Tab Menü */}
{/* Medya Grid */} {!selectedMediaItem ? (
{filteredMedia.map((item) => (
setSelectedMedia(item.id)} className="bg-white rounded-xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-300 hover:-translate-y-2 cursor-pointer group" > {/* Thumbnail */}
{item.title} {/* Video Badge */} {item.type === 'video' && (
)} {/* Duration Badge */} {item.type === 'video' && (
{item.duration}
)} {/* Photo Badge */} {item.type === 'photo' && (
FOTO
)}
{/* Content */}
{item.date}

{item.title}

{item.description}

))}
) : ( /* Medya Detayı */
{/* Geri Butonu */} {/* Video Player veya Büyük Fotoğraf */} {selectedMediaItem?.type === 'video' ? (
) : (
{selectedMediaItem?.title}
)} {/* Bilgiler */}
{selectedMediaItem?.date} {selectedMediaItem?.type === 'video' && ( <> {selectedMediaItem?.duration} )}

{selectedMediaItem?.title}

{selectedMediaItem?.description}

{/* Paylaş */}
Paylaş:
)}
); }