Ana Sayfa Fix
This commit is contained in:
67
app/page-new.tsx
Normal file
67
app/page-new.tsx
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
|
import Header from "@/components/Header";
|
||||||
|
import Footer from "@/components/Footer";
|
||||||
|
import HeroSlider from "@/components/HeroSlider";
|
||||||
|
import QuickMenuCards from "@/components/QuickMenuCards";
|
||||||
|
import LiveStreamSection from "@/components/LiveStreamSection";
|
||||||
|
import NewsSection from "@/components/NewsSection";
|
||||||
|
import MetroLine from "@/components/MetroLine";
|
||||||
|
|
||||||
|
export default function Home() {
|
||||||
|
const [showLiveStream, setShowLiveStream] = useState(false);
|
||||||
|
const [showNews, setShowNews] = useState(false);
|
||||||
|
const [showDocuments, setShowDocuments] = useState(false);
|
||||||
|
const [showMediaGallery, setShowMediaGallery] = useState(false);
|
||||||
|
const [showComplaintForm, setShowComplaintForm] = useState(false);
|
||||||
|
const [showContact, setShowContact] = useState(false);
|
||||||
|
|
||||||
|
// Modal açıldığında yukarı kaydır
|
||||||
|
useEffect(() => {
|
||||||
|
if (showLiveStream || showNews || showDocuments || showMediaGallery || showComplaintForm || showContact) {
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
}
|
||||||
|
}, [showLiveStream, showNews, showDocuments, showMediaGallery, showComplaintForm, showContact]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="min-h-screen bg-[#003366]">
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
{/* Hero Slider Section */}
|
||||||
|
<HeroSlider />
|
||||||
|
|
||||||
|
{/* Quick Menu Cards */}
|
||||||
|
<QuickMenuCards
|
||||||
|
onLiveStreamClick={() => setShowLiveStream(!showLiveStream)}
|
||||||
|
onNewsClick={() => setShowNews(!showNews)}
|
||||||
|
onDocumentsClick={() => setShowDocuments(!showDocuments)}
|
||||||
|
onMediaClick={() => setShowMediaGallery(!showMediaGallery)}
|
||||||
|
onComplaintClick={() => setShowComplaintForm(!showComplaintForm)}
|
||||||
|
onContactClick={() => setShowContact(!showContact)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Live Stream Section */}
|
||||||
|
<LiveStreamSection
|
||||||
|
show={showLiveStream}
|
||||||
|
onClose={() => setShowLiveStream(false)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* News Section */}
|
||||||
|
<NewsSection
|
||||||
|
show={showNews}
|
||||||
|
onClose={() => setShowNews(false)}
|
||||||
|
showLiveStream={showLiveStream}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Metro Line Section - Ana içerik */}
|
||||||
|
<main className={`${showLiveStream || showNews || showDocuments || showMediaGallery || showComplaintForm || showContact ? 'pt-8' : 'pt-8 md:pt-64'} pb-16`}>
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<MetroLine />
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
979
app/page.tsx
979
app/page.tsx
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
237
components/ComplaintForm.tsx
Normal file
237
components/ComplaintForm.tsx
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
interface ComplaintFormProps {
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormData {
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
phone: string;
|
||||||
|
subject: string;
|
||||||
|
type: string;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ComplaintForm({ onClose }: ComplaintFormProps) {
|
||||||
|
const [formData, setFormData] = useState<FormData>({
|
||||||
|
name: '',
|
||||||
|
email: '',
|
||||||
|
phone: '',
|
||||||
|
subject: '',
|
||||||
|
type: 'dilek',
|
||||||
|
message: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleSubmit = (e: React.FormEvent) => {
|
||||||
|
e.preventDefault();
|
||||||
|
alert('Form gönderildi! (Demo)');
|
||||||
|
handleReset();
|
||||||
|
onClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleReset = () => {
|
||||||
|
setFormData({
|
||||||
|
name: '',
|
||||||
|
email: '',
|
||||||
|
phone: '',
|
||||||
|
subject: '',
|
||||||
|
type: 'dilek',
|
||||||
|
message: ''
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
handleReset();
|
||||||
|
onClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 md:pt-32 pb-8">
|
||||||
|
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<div className="w-10 h-10 bg-[#004B87] rounded-lg flex items-center justify-center">
|
||||||
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<h2 className="text-2xl font-bold text-[#004B87]">Dilek ve Şikayet Formu</h2>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={handleClose}
|
||||||
|
className="text-gray-500 hover:text-red-500 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Bilgilendirme */}
|
||||||
|
<div className="bg-blue-50 border-l-4 border-[#00B4D8] p-4 mb-6">
|
||||||
|
<div className="flex items-start">
|
||||||
|
<svg className="w-5 h-5 text-[#00B4D8] mt-0.5 mr-3 shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path fillRule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clipRule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
<p className="text-sm text-gray-700">
|
||||||
|
A2 Metro Hattı projesi ile ilgili dilek, öneri ve şikayetlerinizi bu form aracılığıyla iletebilirsiniz. Başvurularınız en kısa sürede değerlendirilecektir.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Form */}
|
||||||
|
<form className="space-y-6" onSubmit={handleSubmit}>
|
||||||
|
{/* Başvuru Tipi */}
|
||||||
|
<div>
|
||||||
|
<label className="block text-sm font-semibold text-[#004B87] mb-3">
|
||||||
|
Başvuru Tipi <span className="text-red-500">*</span>
|
||||||
|
</label>
|
||||||
|
<div className="flex gap-4">
|
||||||
|
<label className="flex items-center cursor-pointer">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="type"
|
||||||
|
value="dilek"
|
||||||
|
checked={formData.type === 'dilek'}
|
||||||
|
onChange={(e) => setFormData({...formData, type: e.target.value})}
|
||||||
|
className="w-4 h-4 text-[#00B4D8] border-gray-300 focus:ring-[#00B4D8]"
|
||||||
|
/>
|
||||||
|
<span className="ml-2 text-gray-700">Dilek / Öneri</span>
|
||||||
|
</label>
|
||||||
|
<label className="flex items-center cursor-pointer">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="type"
|
||||||
|
value="sikayet"
|
||||||
|
checked={formData.type === 'sikayet'}
|
||||||
|
onChange={(e) => setFormData({...formData, type: e.target.value})}
|
||||||
|
className="w-4 h-4 text-[#00B4D8] border-gray-300 focus:ring-[#00B4D8]"
|
||||||
|
/>
|
||||||
|
<span className="ml-2 text-gray-700">Şikayet</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* İki Sütunlu Alan */}
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
|
{/* Ad Soyad */}
|
||||||
|
<div>
|
||||||
|
<label htmlFor="name" className="block text-sm font-semibold text-[#004B87] mb-2">
|
||||||
|
Ad Soyad <span className="text-red-500">*</span>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="name"
|
||||||
|
required
|
||||||
|
value={formData.name}
|
||||||
|
onChange={(e) => setFormData({...formData, name: e.target.value})}
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00B4D8] focus:border-transparent outline-none transition-all text-gray-900 placeholder:text-gray-500"
|
||||||
|
placeholder="Adınız ve Soyadınız"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* E-posta */}
|
||||||
|
<div>
|
||||||
|
<label htmlFor="email" className="block text-sm font-semibold text-[#004B87] mb-2">
|
||||||
|
E-posta <span className="text-red-500">*</span>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
id="email"
|
||||||
|
required
|
||||||
|
value={formData.email}
|
||||||
|
onChange={(e) => setFormData({...formData, email: e.target.value})}
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00B4D8] focus:border-transparent outline-none transition-all text-gray-900 placeholder:text-gray-500"
|
||||||
|
placeholder="ornek@email.com"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Telefon */}
|
||||||
|
<div>
|
||||||
|
<label htmlFor="phone" className="block text-sm font-semibold text-[#004B87] mb-2">
|
||||||
|
Telefon
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="tel"
|
||||||
|
id="phone"
|
||||||
|
value={formData.phone}
|
||||||
|
onChange={(e) => setFormData({...formData, phone: e.target.value})}
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00B4D8] focus:border-transparent outline-none transition-all text-gray-900 placeholder:text-gray-500"
|
||||||
|
placeholder="0(5__) ___ __ __"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Konu */}
|
||||||
|
<div>
|
||||||
|
<label htmlFor="subject" className="block text-sm font-semibold text-[#004B87] mb-2">
|
||||||
|
Konu <span className="text-red-500">*</span>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="subject"
|
||||||
|
required
|
||||||
|
value={formData.subject}
|
||||||
|
onChange={(e) => setFormData({...formData, subject: e.target.value})}
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00B4D8] focus:border-transparent outline-none transition-all text-gray-900 placeholder:text-gray-500"
|
||||||
|
placeholder="Başvuru konusu"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Mesaj */}
|
||||||
|
<div>
|
||||||
|
<label htmlFor="message" className="block text-sm font-semibold text-[#004B87] mb-2">
|
||||||
|
Mesajınız <span className="text-red-500">*</span>
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="message"
|
||||||
|
required
|
||||||
|
rows={6}
|
||||||
|
value={formData.message}
|
||||||
|
onChange={(e) => setFormData({...formData, message: e.target.value})}
|
||||||
|
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00B4D8] focus:border-transparent outline-none transition-all resize-none text-gray-900 placeholder:text-gray-500"
|
||||||
|
placeholder="Lütfen detaylı bilgi veriniz..."
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* KVKK Onayı */}
|
||||||
|
<div className="flex items-start">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="kvkk"
|
||||||
|
required
|
||||||
|
className="w-4 h-4 mt-1 text-[#00B4D8] border-gray-300 rounded focus:ring-[#00B4D8]"
|
||||||
|
/>
|
||||||
|
<label htmlFor="kvkk" className="ml-3 text-sm text-gray-700">
|
||||||
|
<span className="text-red-500">*</span> Kişisel verilerimin işlenmesine ilişkin{' '}
|
||||||
|
<span className="text-[#00B4D8] hover:underline">KVKK Aydınlatma Metni</span>'ni okudum ve kabul ediyorum.
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Butonlar */}
|
||||||
|
<div className="flex flex-col sm:flex-row gap-4 pt-4">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="flex-1 px-6 py-3 bg-[#00B4D8] text-white rounded-lg hover:bg-[#004B87] transition-colors font-semibold shadow-lg hover:shadow-xl flex items-center justify-center space-x-2"
|
||||||
|
>
|
||||||
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
|
||||||
|
</svg>
|
||||||
|
<span>Gönder</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={handleReset}
|
||||||
|
className="px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors font-semibold"
|
||||||
|
>
|
||||||
|
Temizle
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
143
components/ContactSection.tsx
Normal file
143
components/ContactSection.tsx
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
interface ContactSectionProps {
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ContactSection({ onClose }: ContactSectionProps) {
|
||||||
|
return (
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 md:pt-32 pb-8">
|
||||||
|
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<div className="w-10 h-10 bg-[#004B87] rounded-lg flex items-center justify-center">
|
||||||
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<h2 className="text-2xl font-bold text-[#004B87]">İletişim Bilgileri</h2>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={onClose}
|
||||||
|
className="text-gray-500 hover:text-red-500 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||||
|
{/* Sol Taraf - İletişim Kartları */}
|
||||||
|
<div className="space-y-6">
|
||||||
|
{/* Adres Kartı */}
|
||||||
|
<div className="bg-linear-to-br from-blue-50 to-blue-100 rounded-xl p-6 hover:shadow-lg transition-all duration-300">
|
||||||
|
<div className="flex items-start space-x-4">
|
||||||
|
<div className="w-16 h-16 bg-[#004B87] rounded-xl flex items-center justify-center shrink-0">
|
||||||
|
<svg className="w-8 h-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<h3 className="text-lg font-bold text-[#004B87] mb-2">ADRES</h3>
|
||||||
|
<p className="text-gray-700 leading-relaxed">
|
||||||
|
Emniyet Mah. Hipodrom Caddesi No: 5<br />
|
||||||
|
Yenimahalle / Ankara
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* KEP Adresi Kartı */}
|
||||||
|
<div className="bg-linear-to-br from-cyan-50 to-cyan-100 rounded-xl p-6 hover:shadow-lg transition-all duration-300">
|
||||||
|
<div className="flex items-start space-x-4">
|
||||||
|
<div className="w-16 h-16 bg-[#00B4D8] rounded-xl flex items-center justify-center shrink-0">
|
||||||
|
<svg className="w-8 h-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<h3 className="text-lg font-bold text-[#004B87] mb-2">KEP ADRESİ</h3>
|
||||||
|
<a
|
||||||
|
href="mailto:ankarabuyuksehirbelediyesi@hs01.kep.tr"
|
||||||
|
className="text-gray-700 hover:text-[#00B4D8] transition-colors break-all"
|
||||||
|
>
|
||||||
|
ankarabuyuksehirbelediyesi@hs01.kep.tr
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Telefon Kartı */}
|
||||||
|
<div className="bg-linear-to-br from-indigo-50 to-indigo-100 rounded-xl p-6 hover:shadow-lg transition-all duration-300">
|
||||||
|
<div className="flex items-start space-x-4">
|
||||||
|
<div className="w-16 h-16 bg-[#004B87] rounded-xl flex items-center justify-center shrink-0">
|
||||||
|
<svg className="w-8 h-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<h3 className="text-lg font-bold text-[#004B87] mb-2">TELEFON</h3>
|
||||||
|
<a
|
||||||
|
href="tel:+903125071000"
|
||||||
|
className="text-xl font-semibold text-gray-700 hover:text-[#00B4D8] transition-colors"
|
||||||
|
>
|
||||||
|
+90 (312) 507 10 00
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Çalışma Saatleri */}
|
||||||
|
<div className="bg-linear-to-br from-green-50 to-green-100 rounded-xl p-6">
|
||||||
|
<div className="flex items-start space-x-4">
|
||||||
|
<div className="w-16 h-16 bg-green-600 rounded-xl flex items-center justify-center shrink-0">
|
||||||
|
<svg className="w-8 h-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<h3 className="text-lg font-bold text-[#004B87] mb-2">ÇALIŞMA SAATLERİ</h3>
|
||||||
|
<p className="text-gray-700">
|
||||||
|
<strong>Hafta İçi:</strong> 08:30 - 17:30<br />
|
||||||
|
<strong>Hafta Sonu:</strong> Kapalı
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Sağ Taraf - Harita */}
|
||||||
|
<div className="space-y-4">
|
||||||
|
<h3 className="text-xl font-bold text-[#004B87] mb-4">Konum</h3>
|
||||||
|
<div className="rounded-xl overflow-hidden shadow-lg h-[600px]">
|
||||||
|
<iframe
|
||||||
|
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3059.2326827229665!2d32.8548!3d39.9458!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x14d34f190a9c6b1f%3A0x5d3f8b8a8b8a8b8a!2sEmniyet%2C%20Hipodrom%20Cd.%20No%3A5%2C%2006430%20Yenimahalle%2FAnkara!5e0!3m2!1str!2str!4v1234567890123!5m2!1str!2str"
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
style={{ border: 0 }}
|
||||||
|
allowFullScreen
|
||||||
|
loading="lazy"
|
||||||
|
referrerPolicy="no-referrer-when-downgrade"
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Haritada Göster Butonu */}
|
||||||
|
<a
|
||||||
|
href="https://maps.app.goo.gl/82STypmZqeSW0mQC6"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="w-full flex items-center justify-center space-x-2 px-6 py-3 bg-[#00B4D8] text-white rounded-lg hover:bg-[#004B87] transition-colors font-semibold shadow-lg hover:shadow-xl"
|
||||||
|
>
|
||||||
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7" />
|
||||||
|
</svg>
|
||||||
|
<span>Google Maps'te Aç</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
132
components/DocumentsSection.tsx
Normal file
132
components/DocumentsSection.tsx
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
|
import { dataStore } from '@/lib/dataStore';
|
||||||
|
import type { Document } from '@/data/documents';
|
||||||
|
|
||||||
|
interface DocumentCategory {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentsSectionProps {
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function DocumentsSection({ onClose }: DocumentsSectionProps) {
|
||||||
|
const [documents, setDocuments] = useState<Document[]>([]);
|
||||||
|
const [selectedCategory, setSelectedCategory] = useState('all');
|
||||||
|
|
||||||
|
const categories: DocumentCategory[] = [
|
||||||
|
{ id: 'all', name: 'Tümü', icon: '📋' },
|
||||||
|
{ id: 'ihale', name: 'İhale Belgeleri', icon: '📄' },
|
||||||
|
{ id: 'teknik', name: 'Teknik Dökümanlar', icon: '📐' },
|
||||||
|
{ id: 'cevresel', name: 'Çevresel Etki', icon: '🌱' },
|
||||||
|
{ id: 'raporlar', name: 'İlerleme Raporları', icon: '📊' },
|
||||||
|
{ id: 'guvenlik', name: 'Güvenlik', icon: '🛡️' },
|
||||||
|
];
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setDocuments(dataStore.getDocuments());
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const filteredDocs = selectedCategory === 'all'
|
||||||
|
? documents
|
||||||
|
: documents.filter(doc => doc.category === selectedCategory);
|
||||||
|
|
||||||
|
const getFileIcon = (type: string) => {
|
||||||
|
switch (type) {
|
||||||
|
case 'PDF': return '📕';
|
||||||
|
case 'DWG': return '📐';
|
||||||
|
case 'XLSX': return '📊';
|
||||||
|
case 'DOCX': return '📝';
|
||||||
|
default: return '📄';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 md:pt-32 pb-8">
|
||||||
|
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<div className="w-10 h-10 bg-[#004B87] rounded-lg flex items-center justify-center">
|
||||||
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<h2 className="text-2xl font-bold text-[#004B87]">Proje Belgeleri</h2>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={onClose}
|
||||||
|
className="text-gray-500 hover:text-red-500 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Kategori Filtreleri */}
|
||||||
|
<div className="mb-6">
|
||||||
|
<div className="flex flex-wrap gap-3">
|
||||||
|
{categories.map((cat) => (
|
||||||
|
<button
|
||||||
|
key={cat.id}
|
||||||
|
onClick={() => setSelectedCategory(cat.id)}
|
||||||
|
className={`flex items-center space-x-2 px-4 py-2 rounded-lg font-medium transition-all duration-300 ${
|
||||||
|
selectedCategory === cat.id
|
||||||
|
? 'bg-[#00B4D8] text-white shadow-lg scale-105'
|
||||||
|
: 'bg-gray-100 text-gray-700 hover:bg-gray-200'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<span className="text-lg">{cat.icon}</span>
|
||||||
|
<span className="text-sm">{cat.name}</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Belgeler Grid - 3 sütunlu */}
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-h-[600px] overflow-y-auto pr-2">
|
||||||
|
{filteredDocs.map((doc) => (
|
||||||
|
<div
|
||||||
|
key={doc.id}
|
||||||
|
className="bg-gray-50 rounded-xl p-5 hover:shadow-xl transition-all duration-300 hover:-translate-y-1 group flex flex-col"
|
||||||
|
>
|
||||||
|
{/* Dosya İkonu - Üstte ortalı */}
|
||||||
|
<div className="flex justify-center mb-4">
|
||||||
|
<div className="w-16 h-16 bg-linear-to-br from-[#00B4D8] to-[#004B87] rounded-xl flex items-center justify-center text-3xl group-hover:scale-110 transition-transform duration-300 shadow-lg">
|
||||||
|
{getFileIcon(doc.type)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Belge Bilgileri */}
|
||||||
|
<div className="flex-1">
|
||||||
|
<h3 className="text-base font-bold text-[#004B87] mb-2 group-hover:text-[#00B4D8] transition-colors line-clamp-2 text-center">
|
||||||
|
{doc.title}
|
||||||
|
</h3>
|
||||||
|
<p className="text-gray-600 text-sm mb-3 line-clamp-2 text-center">
|
||||||
|
{doc.description}
|
||||||
|
</p>
|
||||||
|
<div className="flex flex-wrap justify-center gap-2 text-xs text-gray-500 mb-4">
|
||||||
|
<span className="px-2 py-1 bg-white rounded-full">📅 {doc.date}</span>
|
||||||
|
<span className="px-2 py-1 bg-white rounded-full">📄 {doc.type}</span>
|
||||||
|
<span className="px-2 py-1 bg-white rounded-full">💾 {doc.size}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* İndirme Butonu - Alt kısımda */}
|
||||||
|
<button className="w-full py-2.5 bg-[#00B4D8] text-white rounded-lg hover:bg-[#004B87] transition-colors shadow-md hover:shadow-lg flex items-center justify-center space-x-2 text-sm font-semibold">
|
||||||
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
||||||
|
</svg>
|
||||||
|
<span>İndir</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
150
components/HeroSlider.tsx
Normal file
150
components/HeroSlider.tsx
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
|
|
||||||
|
// Hero Slider Data
|
||||||
|
const heroSlides = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: 'Ankara Metro Altyapı Projelerinde Öncü Çözümler',
|
||||||
|
description: 'Ankara Büyükşehir Belediyesi ile birlikte, modern teknoloji ve mühendislik uzmanlığımızla başkentin ulaşım ağını inşa ediyor, geleceğin metro sistemlerini bugünden hayata geçiriyoruz.',
|
||||||
|
buttonText: 'Detayları Gör',
|
||||||
|
buttonLink: '#proje-detay'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: 'A2 Metro Hattı İnşaatında Son Aşamaya Gelindi',
|
||||||
|
description: '15 istasyonlu A2 Metro Hattı projemiz %75 tamamlandı. 2026 yılında hizmete açılacak modern metro hattımız, günlük 300 bin yolcuya hizmet verecek.',
|
||||||
|
buttonText: 'İlerlemeyi İzle',
|
||||||
|
buttonLink: '#metro-hatti'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
title: 'Çevre Dostu Metro Teknolojileri',
|
||||||
|
description: 'Yenilenebilir enerji kaynakları ve sürdürülebilir inşaat teknikleri ile çevre dostu metro projelerine imza atıyoruz. Karbon emisyonunu %40 azaltan yenilikçi çözümlerimiz.',
|
||||||
|
buttonText: 'Yeşil Projeler',
|
||||||
|
buttonLink: '#cevre'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
title: 'Güvenli İnşaat, Güvenli Gelecek',
|
||||||
|
description: 'ISO 45001 sertifikalı iş güvenliği sistemlerimiz ile 2000+ çalışanımızın güvenliğini en üst düzeyde tutuyoruz. Sıfır iş kazası hedefiyle çalışıyoruz.',
|
||||||
|
buttonText: 'Güvenlik Önlemleri',
|
||||||
|
buttonLink: '#guvenlik'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export default function HeroSlider() {
|
||||||
|
const [currentSlide, setCurrentSlide] = useState(0);
|
||||||
|
|
||||||
|
// Auto slider
|
||||||
|
useEffect(() => {
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
setCurrentSlide((prev) => (prev + 1) % heroSlides.length);
|
||||||
|
}, 10000); // 10 saniyede bir değiş
|
||||||
|
|
||||||
|
return () => clearInterval(timer);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="relative w-full h-[60vh] md:h-screen pt-20">
|
||||||
|
{/* Video Background */}
|
||||||
|
<div className="absolute inset-0 overflow-hidden">
|
||||||
|
<video
|
||||||
|
className="w-full h-full object-cover"
|
||||||
|
autoPlay
|
||||||
|
loop
|
||||||
|
muted
|
||||||
|
playsInline
|
||||||
|
>
|
||||||
|
<source src="/assets/high-speed-metro-design-template-559897134973592cb13d708cec30ea39_screen.mp4" type="video/mp4" />
|
||||||
|
Tarayıcınız video etiketini desteklemiyor.
|
||||||
|
</video>
|
||||||
|
{/* Dark Overlay */}
|
||||||
|
<div className="absolute inset-0 bg-linear-to-b from-[#003366]/70 via-[#004B87]/50 to-[#003366]/90"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Content Overlay */}
|
||||||
|
<div className="relative z-10 h-full flex items-center">
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full">
|
||||||
|
<div className="max-w-3xl">
|
||||||
|
{/* Slider Content */}
|
||||||
|
<div className="relative">
|
||||||
|
{heroSlides.map((slide, index) => (
|
||||||
|
<div
|
||||||
|
key={slide.id}
|
||||||
|
className={`transition-all duration-700 ${
|
||||||
|
index === currentSlide
|
||||||
|
? 'opacity-100 translate-x-0'
|
||||||
|
: 'opacity-0 absolute inset-0 translate-x-full pointer-events-none'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<h1 className="text-3xl md:text-4xl lg:text-6xl font-bold text-white mb-4 md:mb-6 leading-tight">
|
||||||
|
{slide.title}
|
||||||
|
</h1>
|
||||||
|
<p className="text-base md:text-lg lg:text-xl text-[#F8F9FA] mb-6 md:mb-8 leading-relaxed">
|
||||||
|
{slide.description}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Action Buttons - Mobilde gizle */}
|
||||||
|
<div className="hidden md:flex flex-col sm:flex-row gap-4">
|
||||||
|
<button className="px-8 py-4 bg-[#00B4D8] text-white font-semibold rounded-lg hover:bg-[#48CAE4] transition-all duration-300 shadow-lg shadow-[#00B4D8]/30 flex items-center justify-center space-x-2">
|
||||||
|
<span>{slide.buttonText}</span>
|
||||||
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button className="px-8 py-4 bg-transparent border-2 border-white text-white font-semibold rounded-lg hover:bg-white hover:text-[#004B87] transition-all duration-300">
|
||||||
|
Tüm Duyuruları Gör
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Pagination Dots & Navigation */}
|
||||||
|
<div className="hidden md:flex items-center justify-between mt-12">
|
||||||
|
{/* Dots */}
|
||||||
|
<div className="flex space-x-3">
|
||||||
|
{heroSlides.map((_, index) => (
|
||||||
|
<button
|
||||||
|
key={index}
|
||||||
|
onClick={() => setCurrentSlide(index)}
|
||||||
|
className={`h-3 rounded-full transition-all duration-300 ${
|
||||||
|
index === currentSlide
|
||||||
|
? 'w-8 bg-white'
|
||||||
|
: 'w-3 bg-white/30 hover:bg-white/50'
|
||||||
|
}`}
|
||||||
|
aria-label={`Slide ${index + 1}`}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Arrow Navigation */}
|
||||||
|
<div className="flex space-x-2">
|
||||||
|
<button
|
||||||
|
onClick={() => setCurrentSlide((prev) => (prev - 1 + heroSlides.length) % heroSlides.length)}
|
||||||
|
className="w-10 h-10 rounded-full bg-white/20 hover:bg-white/30 flex items-center justify-center transition-all backdrop-blur-sm"
|
||||||
|
aria-label="Previous slide"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => setCurrentSlide((prev) => (prev + 1) % heroSlides.length)}
|
||||||
|
className="w-10 h-10 rounded-full bg-white/20 hover:bg-white/30 flex items-center justify-center transition-all backdrop-blur-sm"
|
||||||
|
aria-label="Next slide"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
46
components/LiveStreamSection.tsx
Normal file
46
components/LiveStreamSection.tsx
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
interface LiveStreamSectionProps {
|
||||||
|
show: boolean;
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function LiveStreamSection({ show, onClose }: LiveStreamSectionProps) {
|
||||||
|
if (!show) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 md:pt-32 pb-8">
|
||||||
|
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<div className="w-3 h-3 bg-red-500 rounded-full animate-pulse"></div>
|
||||||
|
<h2 className="text-2xl font-bold text-[#004B87]">Canlı Yayın</h2>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={onClose}
|
||||||
|
className="text-gray-500 hover:text-red-500 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* YouTube Video Embed */}
|
||||||
|
<div className="relative w-full" style={{paddingBottom: '56.25%'}}>
|
||||||
|
<iframe
|
||||||
|
className="absolute top-0 left-0 w-full h-full rounded-lg"
|
||||||
|
src="https://www.youtube.com/embed/b9q88QDEcKg?autoplay=1"
|
||||||
|
title="Canlı Yayın"
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
allowFullScreen
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p className="mt-4 text-gray-600 text-sm">
|
||||||
|
A2 Metro Hattı İnşaat Çalışmaları - Canlı Yayın
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
231
components/MediaGallery.tsx
Normal file
231
components/MediaGallery.tsx
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
|
import Image from 'next/image';
|
||||||
|
import { dataStore } from '@/lib/dataStore';
|
||||||
|
import type { MediaItem } from '@/data/media';
|
||||||
|
|
||||||
|
interface MediaGalleryProps {
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function MediaGallery({ onClose }: MediaGalleryProps) {
|
||||||
|
const [mediaItems, setMediaItems] = useState<MediaItem[]>([]);
|
||||||
|
const [selectedMediaTab, setSelectedMediaTab] = useState<'all' | 'video' | 'photo'>('all');
|
||||||
|
const [selectedMedia, setSelectedMedia] = useState<number | null>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setMediaItems(dataStore.getMedia());
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const filteredMedia = selectedMediaTab === 'all'
|
||||||
|
? mediaItems
|
||||||
|
: mediaItems.filter(item => item.type === selectedMediaTab);
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
setSelectedMedia(null);
|
||||||
|
setSelectedMediaTab('all');
|
||||||
|
onClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 md:pt-32 pb-8">
|
||||||
|
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<div className="w-10 h-10 bg-[#004B87] rounded-lg flex items-center justify-center">
|
||||||
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<h2 className="text-2xl font-bold text-[#004B87]">Medya Galerisi</h2>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={handleClose}
|
||||||
|
className="text-gray-500 hover:text-red-500 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Medya Grid veya Detay */}
|
||||||
|
{selectedMedia === null ? (
|
||||||
|
<>
|
||||||
|
{/* Tab Menü */}
|
||||||
|
<div className="flex justify-center space-x-4 mb-8">
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedMediaTab('all')}
|
||||||
|
className={`px-6 py-3 rounded-lg font-semibold transition-all duration-300 ${
|
||||||
|
selectedMediaTab === 'all'
|
||||||
|
? 'bg-[#00B4D8] text-white shadow-lg scale-105'
|
||||||
|
: 'bg-gray-100 text-[#004B87] hover:bg-gray-200'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
Tümü
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedMediaTab('video')}
|
||||||
|
className={`px-6 py-3 rounded-lg font-semibold transition-all duration-300 flex items-center space-x-2 ${
|
||||||
|
selectedMediaTab === 'video'
|
||||||
|
? 'bg-[#00B4D8] text-white shadow-lg scale-105'
|
||||||
|
: 'bg-gray-100 text-[#004B87] hover:bg-gray-200'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/>
|
||||||
|
</svg>
|
||||||
|
<span>Videolar</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedMediaTab('photo')}
|
||||||
|
className={`px-6 py-3 rounded-lg font-semibold transition-all duration-300 flex items-center space-x-2 ${
|
||||||
|
selectedMediaTab === 'photo'
|
||||||
|
? 'bg-[#00B4D8] text-white shadow-lg scale-105'
|
||||||
|
: 'bg-gray-100 text-[#004B87] hover:bg-gray-200'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/>
|
||||||
|
</svg>
|
||||||
|
<span>Fotoğraflar</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Medya Grid */}
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
|
{filteredMedia.map((item) => (
|
||||||
|
<div
|
||||||
|
key={item.id}
|
||||||
|
onClick={() => setSelectedMedia(item.id)}
|
||||||
|
className="bg-gray-50 rounded-xl overflow-hidden hover:shadow-lg transition-all duration-300 hover:-translate-y-2 cursor-pointer group"
|
||||||
|
>
|
||||||
|
{/* Thumbnail */}
|
||||||
|
<div className="relative h-56 overflow-hidden">
|
||||||
|
<Image
|
||||||
|
src={item.thumbnail}
|
||||||
|
alt={item.title}
|
||||||
|
width={400}
|
||||||
|
height={224}
|
||||||
|
className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"
|
||||||
|
/>
|
||||||
|
{/* Video Badge */}
|
||||||
|
{item.type === 'video' && (
|
||||||
|
<div className="absolute inset-0 flex items-center justify-center bg-black/30 group-hover:bg-black/40 transition-colors">
|
||||||
|
<div className="w-16 h-16 rounded-full bg-[#00B4D8] flex items-center justify-center group-hover:scale-110 transition-transform">
|
||||||
|
<svg className="w-8 h-8 text-white ml-1" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M8 5v14l11-7z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{/* Photo Badge */}
|
||||||
|
{item.type === 'photo' && (
|
||||||
|
<div className="absolute top-3 right-3 px-3 py-1 bg-[#00B4D8] text-white text-xs rounded-full font-semibold">
|
||||||
|
FOTO
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Content */}
|
||||||
|
<div className="p-5">
|
||||||
|
<div className="flex items-center space-x-2 text-sm text-gray-500 mb-2">
|
||||||
|
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
||||||
|
</svg>
|
||||||
|
<span>{item.date}</span>
|
||||||
|
</div>
|
||||||
|
<h3 className="text-lg font-bold text-[#004B87] mb-2 line-clamp-2 group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
{item.title}
|
||||||
|
</h3>
|
||||||
|
<p className="text-gray-600 text-sm line-clamp-2">
|
||||||
|
{item.description}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
/* Medya Detayı */
|
||||||
|
<div className="animate-fadeIn">
|
||||||
|
{mediaItems.filter(m => m.id === selectedMedia).map((item) => (
|
||||||
|
<div key={item.id}>
|
||||||
|
{/* Geri Butonu */}
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedMedia(null)}
|
||||||
|
className="flex items-center space-x-2 text-[#00B4D8] hover:text-[#004B87] font-semibold mb-6 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
||||||
|
</svg>
|
||||||
|
<span>Galeriye Dön</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Video Player veya Büyük Fotoğraf */}
|
||||||
|
{item.type === 'video' ? (
|
||||||
|
<div className="relative w-full mb-6" style={{ paddingBottom: '56.25%' }}>
|
||||||
|
<iframe
|
||||||
|
className="absolute top-0 left-0 w-full h-full rounded-lg"
|
||||||
|
src={item.videoUrl}
|
||||||
|
title={item.title}
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
allowFullScreen
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="mb-6 rounded-lg overflow-hidden">
|
||||||
|
<Image
|
||||||
|
src={item.thumbnail}
|
||||||
|
alt={item.title}
|
||||||
|
width={800}
|
||||||
|
height={600}
|
||||||
|
className="w-full h-auto"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Bilgiler */}
|
||||||
|
<div className="flex items-center space-x-2 text-sm text-gray-500 mb-4">
|
||||||
|
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
||||||
|
</svg>
|
||||||
|
<span>{item.date}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 className="text-3xl font-bold text-[#004B87] mb-4">
|
||||||
|
{item.title}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p className="text-gray-700 text-lg leading-relaxed">
|
||||||
|
{item.description}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Paylaş */}
|
||||||
|
<div className="mt-8 pt-6 border-t border-gray-200">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex items-center space-x-4">
|
||||||
|
<span className="text-sm text-gray-500">Paylaş:</span>
|
||||||
|
<button className="text-[#00B4D8] hover:text-[#004B87] transition-colors">
|
||||||
|
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedMedia(null)}
|
||||||
|
className="px-6 py-2 bg-[#00B4D8] text-white rounded-lg hover:bg-[#004B87] transition-colors"
|
||||||
|
>
|
||||||
|
Kapat
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,56 +1,74 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
|
import { dataStore } from '@/lib/dataStore';
|
||||||
|
import type { MetroStation } from '@/data/metroStations';
|
||||||
|
|
||||||
export default function MetroLine() {
|
export default function MetroLine() {
|
||||||
const [currentStation, setCurrentStation] = useState(0);
|
const [stations, setStations] = useState<MetroStation[]>([]);
|
||||||
|
const [selectedStationId, setSelectedStationId] = useState<number | null>(null);
|
||||||
|
const [currentStationIndex, setCurrentStationIndex] = useState(0);
|
||||||
|
|
||||||
// Metro başlangıçtan Tuzluçayır'a (index 2) kadar ilerler ve durur
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
// Metro istasyonlarını yükle
|
||||||
setCurrentStation((prev) => {
|
const loadedStations = dataStore.getMetroStations();
|
||||||
if (prev < 2) return prev + 1; // Sadece 2'ye kadar ilerle
|
setStations(loadedStations);
|
||||||
return 2; // Tuzluçayır'da dur
|
|
||||||
});
|
|
||||||
}, 3000); // Her 3 saniyede bir ilerle
|
|
||||||
|
|
||||||
return () => clearInterval(interval);
|
// Admin panelinden seçili istasyonu al
|
||||||
|
const adminSelectedId = localStorage.getItem('metro_selected_station');
|
||||||
|
if (adminSelectedId) {
|
||||||
|
setSelectedStationId(parseInt(adminSelectedId));
|
||||||
|
|
||||||
|
// Seçili istasyonun index'ini bul
|
||||||
|
const selectedIndex = loadedStations.findIndex(s => s.id === parseInt(adminSelectedId));
|
||||||
|
if (selectedIndex !== -1) {
|
||||||
|
// Metro animasyonu başlat
|
||||||
|
let currentIndex = 0;
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
if (currentIndex < selectedIndex) {
|
||||||
|
currentIndex++;
|
||||||
|
setCurrentStationIndex(currentIndex);
|
||||||
|
} else {
|
||||||
|
clearInterval(interval);
|
||||||
|
}
|
||||||
|
}, 2000); // Her 2 saniyede bir ilerle
|
||||||
|
|
||||||
|
return () => clearInterval(interval);
|
||||||
|
}
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const stations = [
|
const getStationStyle = (index: number, station: MetroStation) => {
|
||||||
{ name: 'ABİDİN PAŞA', status: 'completed' },
|
if (index === currentStationIndex) {
|
||||||
{ name: 'AŞIK VEYSEL', status: 'completed' },
|
|
||||||
{ name: 'TUZLUÇAYIR', status: 'construction' },
|
|
||||||
{ name: 'GENERAL ZEKİ DOĞAN', status: 'planned' },
|
|
||||||
{ name: 'FAHRİ KORUTÜRK', status: 'planned' },
|
|
||||||
{ name: 'CENGİZHAN', status: 'planned' },
|
|
||||||
{ name: 'AKŞEMSETTİN', status: 'planned' },
|
|
||||||
{ name: 'NATOYOLU', status: 'planned' },
|
|
||||||
];
|
|
||||||
|
|
||||||
const getStationStyle = (index: number, status: string) => {
|
|
||||||
if (index === currentStation) {
|
|
||||||
return 'w-16 h-16 bg-[#F59E0B] border-4 border-white shadow-2xl scale-110';
|
return 'w-16 h-16 bg-[#F59E0B] border-4 border-white shadow-2xl scale-110';
|
||||||
}
|
}
|
||||||
if (status === 'completed') {
|
if (station.status === 'completed' || index < currentStationIndex) {
|
||||||
return 'w-14 h-14 bg-green-500 border-4 border-white shadow-lg';
|
return 'w-14 h-14 bg-green-500 border-4 border-white shadow-lg';
|
||||||
}
|
}
|
||||||
|
if (station.status === 'in-progress') {
|
||||||
|
return 'w-14 h-14 bg-blue-500 border-4 border-white shadow-lg';
|
||||||
|
}
|
||||||
return 'w-12 h-12 bg-gray-300 border-4 border-dashed border-gray-400 shadow-lg opacity-60';
|
return 'w-12 h-12 bg-gray-300 border-4 border-dashed border-gray-400 shadow-lg opacity-60';
|
||||||
};
|
};
|
||||||
|
|
||||||
const getTextStyle = (index: number, status: string) => {
|
const getTextStyle = (index: number, station: MetroStation) => {
|
||||||
if (index === currentStation) {
|
if (index === currentStationIndex) {
|
||||||
return 'text-[#F59E0B] font-bold';
|
return 'text-[#F59E0B] font-bold';
|
||||||
}
|
}
|
||||||
if (status === 'completed') {
|
if (station.status === 'completed' || index < currentStationIndex) {
|
||||||
return 'text-green-600 font-bold';
|
return 'text-green-600 font-bold';
|
||||||
}
|
}
|
||||||
|
if (station.status === 'in-progress') {
|
||||||
|
return 'text-blue-600 font-bold';
|
||||||
|
}
|
||||||
return 'text-gray-500 font-semibold';
|
return 'text-gray-500 font-semibold';
|
||||||
};
|
};
|
||||||
|
|
||||||
// Her durak arası mesafe için progress hesaplama
|
const progressPercentage = stations.length > 0 ? (currentStationIndex / (stations.length - 1)) * 100 : 0;
|
||||||
const totalStations = stations.length;
|
|
||||||
const progressPercentage = (currentStation / (totalStations - 1)) * 100;
|
if (stations.length === 0) {
|
||||||
|
return <div className="bg-white rounded-2xl shadow-2xl p-8 text-center">Yükleniyor...</div>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-white rounded-2xl shadow-2xl p-4 md:p-8 lg:p-12">
|
<div className="bg-white rounded-2xl shadow-2xl p-4 md:p-8 lg:p-12">
|
||||||
@@ -86,9 +104,9 @@ export default function MetroLine() {
|
|||||||
{/* Duraklar Grid - Desktop */}
|
{/* Duraklar Grid - Desktop */}
|
||||||
<div className="grid grid-cols-4 lg:grid-cols-8 gap-6 relative">
|
<div className="grid grid-cols-4 lg:grid-cols-8 gap-6 relative">
|
||||||
{stations.map((station, index) => (
|
{stations.map((station, index) => (
|
||||||
<div key={index} className="flex flex-col items-center">
|
<div key={station.id} className="flex flex-col items-center">
|
||||||
<div className={`relative z-10 rounded-full flex items-center justify-center mb-3 transition-all duration-500 ${getStationStyle(index, station.status)}`}>
|
<div className={`relative z-10 rounded-full flex items-center justify-center mb-3 transition-all duration-500 ${getStationStyle(index, station)}`}>
|
||||||
{index === currentStation ? (
|
{index === currentStationIndex ? (
|
||||||
<>
|
<>
|
||||||
{/* Metro simgesi - animasyonlu */}
|
{/* Metro simgesi - animasyonlu */}
|
||||||
<svg className="w-8 h-8 text-white" fill="currentColor" viewBox="0 0 24 24">
|
<svg className="w-8 h-8 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
@@ -97,25 +115,31 @@ export default function MetroLine() {
|
|||||||
{/* Pulse efekti */}
|
{/* Pulse efekti */}
|
||||||
<div className="absolute inset-0 rounded-full bg-[#F59E0B] animate-ping opacity-30"></div>
|
<div className="absolute inset-0 rounded-full bg-[#F59E0B] animate-ping opacity-30"></div>
|
||||||
</>
|
</>
|
||||||
) : station.status === 'completed' ? (
|
) : station.status === 'completed' || index < currentStationIndex ? (
|
||||||
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
) : station.status === 'in-progress' ? (
|
||||||
|
<svg className="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2l2-2h4l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-4-4-8-4z"/>
|
||||||
|
</svg>
|
||||||
) : (
|
) : (
|
||||||
<svg className="w-5 h-5 text-gray-500" fill="currentColor" viewBox="0 0 24 24">
|
<svg className="w-5 h-5 text-gray-500" fill="currentColor" viewBox="0 0 24 24">
|
||||||
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||||
</svg>
|
</svg>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<span className={`text-center text-xs transition-all duration-300 ${getTextStyle(index, station.status)}`}>
|
<span className={`text-center text-xs transition-all duration-300 ${getTextStyle(index, station)}`}>
|
||||||
{station.name}
|
{station.name}
|
||||||
</span>
|
</span>
|
||||||
<span className={`text-xs transition-all duration-300 ${
|
<span className={`text-xs transition-all duration-300 ${
|
||||||
index === currentStation ? 'text-[#F59E0B] font-semibold' :
|
index === currentStationIndex ? 'text-[#F59E0B] font-semibold' :
|
||||||
station.status === 'completed' ? 'text-green-600' : 'text-gray-400'
|
station.status === 'completed' || index < currentStationIndex ? 'text-green-600' :
|
||||||
|
station.status === 'in-progress' ? 'text-blue-600' : 'text-gray-400'
|
||||||
}`}>
|
}`}>
|
||||||
{index === currentStation ? '🚇 Metro Burada' :
|
{index === currentStationIndex ? '🚇 Metro Burada' :
|
||||||
station.status === 'completed' ? '✓ Tamamlandı' :
|
station.status === 'completed' || index < currentStationIndex ? '✓ Tamamlandı' :
|
||||||
|
station.status === 'in-progress' ? '🔄 Devam Ediyor' :
|
||||||
'◯ Planlı'}
|
'◯ Planlı'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -126,25 +150,31 @@ export default function MetroLine() {
|
|||||||
{/* Metro Hat - Mobil (Dikey Liste) */}
|
{/* Metro Hat - Mobil (Dikey Liste) */}
|
||||||
<div className="md:hidden space-y-3">
|
<div className="md:hidden space-y-3">
|
||||||
{stations.map((station, index) => (
|
{stations.map((station, index) => (
|
||||||
<div key={index} className={`flex items-center space-x-3 p-3 rounded-lg transition-all duration-500 ${
|
<div key={station.id} className={`flex items-center space-x-3 p-3 rounded-lg transition-all duration-500 ${
|
||||||
index === currentStation ? 'bg-[#F59E0B]/10 border-2 border-[#F59E0B]' :
|
index === currentStationIndex ? 'bg-[#F59E0B]/10 border-2 border-[#F59E0B]' :
|
||||||
station.status === 'completed' ? 'bg-green-50 border border-green-200' :
|
station.status === 'completed' || index < currentStationIndex ? 'bg-green-50 border border-green-200' :
|
||||||
|
station.status === 'in-progress' ? 'bg-blue-50 border border-blue-200' :
|
||||||
'bg-gray-50 border border-gray-200'
|
'bg-gray-50 border border-gray-200'
|
||||||
}`}>
|
}`}>
|
||||||
{/* İkon */}
|
{/* İkon */}
|
||||||
<div className={`rounded-full flex items-center justify-center transition-all duration-500 shrink-0 ${
|
<div className={`rounded-full flex items-center justify-center transition-all duration-500 shrink-0 ${
|
||||||
index === currentStation ? 'w-12 h-12 bg-[#F59E0B]' :
|
index === currentStationIndex ? 'w-12 h-12 bg-[#F59E0B]' :
|
||||||
station.status === 'completed' ? 'w-10 h-10 bg-green-500' :
|
station.status === 'completed' || index < currentStationIndex ? 'w-10 h-10 bg-green-500' :
|
||||||
|
station.status === 'in-progress' ? 'w-10 h-10 bg-blue-500' :
|
||||||
'w-10 h-10 bg-gray-300'
|
'w-10 h-10 bg-gray-300'
|
||||||
}`}>
|
}`}>
|
||||||
{index === currentStation ? (
|
{index === currentStationIndex ? (
|
||||||
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2l2-2h4l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-4-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"/>
|
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2l2-2h4l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-4-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"/>
|
||||||
</svg>
|
</svg>
|
||||||
) : station.status === 'completed' ? (
|
) : station.status === 'completed' || index < currentStationIndex ? (
|
||||||
<svg className="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 24 24">
|
<svg className="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
) : station.status === 'in-progress' ? (
|
||||||
|
<svg className="w-4 h-4 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2l2-2h4l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-4-4-8-4z"/>
|
||||||
|
</svg>
|
||||||
) : (
|
) : (
|
||||||
<svg className="w-4 h-4 text-gray-500" fill="currentColor" viewBox="0 0 24 24">
|
<svg className="w-4 h-4 text-gray-500" fill="currentColor" viewBox="0 0 24 24">
|
||||||
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||||
@@ -155,19 +185,22 @@ export default function MetroLine() {
|
|||||||
{/* Bilgi */}
|
{/* Bilgi */}
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<h4 className={`font-bold text-sm ${
|
<h4 className={`font-bold text-sm ${
|
||||||
index === currentStation ? 'text-[#F59E0B]' :
|
index === currentStationIndex ? 'text-[#F59E0B]' :
|
||||||
station.status === 'completed' ? 'text-green-700' :
|
station.status === 'completed' || index < currentStationIndex ? 'text-green-700' :
|
||||||
|
station.status === 'in-progress' ? 'text-blue-700' :
|
||||||
'text-gray-600'
|
'text-gray-600'
|
||||||
}`}>
|
}`}>
|
||||||
{station.name}
|
{station.name}
|
||||||
</h4>
|
</h4>
|
||||||
<p className={`text-xs ${
|
<p className={`text-xs ${
|
||||||
index === currentStation ? 'text-[#F59E0B]' :
|
index === currentStationIndex ? 'text-[#F59E0B]' :
|
||||||
station.status === 'completed' ? 'text-green-600' :
|
station.status === 'completed' || index < currentStationIndex ? 'text-green-600' :
|
||||||
|
station.status === 'in-progress' ? 'text-blue-600' :
|
||||||
'text-gray-500'
|
'text-gray-500'
|
||||||
}`}>
|
}`}>
|
||||||
{index === currentStation ? '🚇 Metro Burada' :
|
{index === currentStationIndex ? '🚇 Metro Burada' :
|
||||||
station.status === 'completed' ? '✓ Tamamlandı' :
|
station.status === 'completed' || index < currentStationIndex ? '✓ Tamamlandı' :
|
||||||
|
station.status === 'in-progress' ? '🔄 Devam Ediyor' :
|
||||||
'◯ Planlı'}
|
'◯ Planlı'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -175,8 +208,8 @@ export default function MetroLine() {
|
|||||||
{/* Bağlantı çizgisi (son istasyon hariç) */}
|
{/* Bağlantı çizgisi (son istasyon hariç) */}
|
||||||
{index < stations.length - 1 && (
|
{index < stations.length - 1 && (
|
||||||
<div className={`absolute left-8 w-0.5 h-8 ${
|
<div className={`absolute left-8 w-0.5 h-8 ${
|
||||||
index < currentStation ? 'bg-green-500' :
|
index < currentStationIndex ? 'bg-green-500' :
|
||||||
index === currentStation ? 'bg-[#F59E0B]' :
|
index === currentStationIndex ? 'bg-[#F59E0B]' :
|
||||||
'bg-gray-300'
|
'bg-gray-300'
|
||||||
}`} style={{ top: '100%', marginLeft: '-1px' }}></div>
|
}`} style={{ top: '100%', marginLeft: '-1px' }}></div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
165
components/NewsSection.tsx
Normal file
165
components/NewsSection.tsx
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState } from 'react';
|
||||||
|
import Image from 'next/image';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import { newsData } from '@/data/news';
|
||||||
|
|
||||||
|
interface NewsSectionProps {
|
||||||
|
show: boolean;
|
||||||
|
onClose: () => void;
|
||||||
|
showLiveStream: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function NewsSection({ show, onClose, showLiveStream }: NewsSectionProps) {
|
||||||
|
const [selectedNews, setSelectedNews] = useState<number | null>(null);
|
||||||
|
|
||||||
|
if (!show) return null;
|
||||||
|
|
||||||
|
const featuredNews = newsData.filter(news => news.featured).slice(0, 4);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={`max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 ${showLiveStream ? 'pt-8' : 'pt-8 md:pt-32'} pb-8`}>
|
||||||
|
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<div className="w-10 h-10 bg-[#004B87] rounded-lg flex items-center justify-center">
|
||||||
|
<svg className="w-6 h-6 text-white" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<h2 className="text-2xl font-bold text-[#004B87]">Son Haberler</h2>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center space-x-3">
|
||||||
|
<Link
|
||||||
|
href="/haberler"
|
||||||
|
className="px-4 py-2 bg-[#00B4D8] text-white rounded-lg hover:bg-[#0096C7] transition-all font-semibold text-sm flex items-center space-x-2"
|
||||||
|
>
|
||||||
|
<span>Tümünü Gör</span>
|
||||||
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
||||||
|
</svg>
|
||||||
|
</Link>
|
||||||
|
<button
|
||||||
|
onClick={onClose}
|
||||||
|
className="text-gray-500 hover:text-red-500 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Haberler Grid veya Detay */}
|
||||||
|
{selectedNews === null ? (
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
|
{featuredNews.map((news) => (
|
||||||
|
<div key={news.id} className="bg-gray-50 rounded-xl overflow-hidden hover:shadow-lg transition-all duration-300 hover:-translate-y-1">
|
||||||
|
{/* Haber Görseli */}
|
||||||
|
<div className="h-48 overflow-hidden">
|
||||||
|
<Image
|
||||||
|
src={news.image}
|
||||||
|
alt={news.title}
|
||||||
|
width={400}
|
||||||
|
height={192}
|
||||||
|
className="w-full h-full object-cover hover:scale-110 transition-transform duration-500"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Haber İçeriği */}
|
||||||
|
<div className="p-5">
|
||||||
|
<div className="flex items-center space-x-2 text-sm text-gray-500 mb-2">
|
||||||
|
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
||||||
|
</svg>
|
||||||
|
<span>{news.date}</span>
|
||||||
|
</div>
|
||||||
|
<h3 className="text-lg font-bold text-[#004B87] mb-2 line-clamp-2">
|
||||||
|
{news.title}
|
||||||
|
</h3>
|
||||||
|
<p className="text-gray-600 text-sm line-clamp-3 mb-4">
|
||||||
|
{news.summary}
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedNews(news.id)}
|
||||||
|
className="text-[#00B4D8] hover:text-[#004B87] font-semibold text-sm flex items-center space-x-1 transition-colors"
|
||||||
|
>
|
||||||
|
<span>Devamını Oku</span>
|
||||||
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
/* Haber Detayı */
|
||||||
|
<div className="animate-fadeIn">
|
||||||
|
{newsData.filter(n => n.id === selectedNews).map((news) => (
|
||||||
|
<div key={news.id}>
|
||||||
|
{/* Geri Butonu */}
|
||||||
|
<button
|
||||||
|
onClick={() => setSelectedNews(null)}
|
||||||
|
className="flex items-center space-x-2 text-[#00B4D8] hover:text-[#004B87] font-semibold mb-6 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
||||||
|
</svg>
|
||||||
|
<span>Haberlere Dön</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Detay İçerik */}
|
||||||
|
<div className="bg-white rounded-xl overflow-hidden">
|
||||||
|
{/* Büyük Görsel */}
|
||||||
|
<div className="h-96 overflow-hidden">
|
||||||
|
<Image
|
||||||
|
src={news.image}
|
||||||
|
alt={news.title}
|
||||||
|
width={800}
|
||||||
|
height={384}
|
||||||
|
className="w-full h-full object-cover"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Detay Metni */}
|
||||||
|
<div className="p-8">
|
||||||
|
<div className="flex items-center space-x-2 text-sm text-gray-500 mb-4">
|
||||||
|
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
||||||
|
</svg>
|
||||||
|
<span>{news.date}</span>
|
||||||
|
<span className="mx-2">•</span>
|
||||||
|
<span>{news.author}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 className="text-3xl font-bold text-[#004B87] mb-4">
|
||||||
|
{news.title}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p className="text-gray-700 text-lg leading-relaxed mb-6">
|
||||||
|
{news.content}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Tags */}
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{news.tags.map((tag, index) => (
|
||||||
|
<span
|
||||||
|
key={index}
|
||||||
|
className="px-3 py-1 bg-[#00B4D8]/10 text-[#004B87] rounded-full text-sm font-semibold"
|
||||||
|
>
|
||||||
|
#{tag}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
105
components/QuickMenuCards.tsx
Normal file
105
components/QuickMenuCards.tsx
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
interface QuickMenuCardsProps {
|
||||||
|
onLiveStreamClick: () => void;
|
||||||
|
onNewsClick: () => void;
|
||||||
|
onDocumentsClick: () => void;
|
||||||
|
onMediaClick: () => void;
|
||||||
|
onComplaintClick: () => void;
|
||||||
|
onContactClick: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function QuickMenuCards({
|
||||||
|
onLiveStreamClick,
|
||||||
|
onNewsClick,
|
||||||
|
onDocumentsClick,
|
||||||
|
onMediaClick,
|
||||||
|
onComplaintClick,
|
||||||
|
onContactClick
|
||||||
|
}: QuickMenuCardsProps) {
|
||||||
|
return (
|
||||||
|
<div className="relative md:absolute md:bottom-0 md:left-0 md:right-0 z-20 md:translate-y-3/4 bg-[#003366] md:bg-transparent py-6 md:py-0">
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3 md:gap-4">
|
||||||
|
{/* Canlı Yayın */}
|
||||||
|
<button
|
||||||
|
onClick={onLiveStreamClick}
|
||||||
|
className="bg-white rounded-xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 flex flex-col items-center text-center group"
|
||||||
|
>
|
||||||
|
<div className="w-10 h-10 md:w-12 md:h-12 mb-2 md:mb-3 text-[#004B87] group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4zM14 13h-3v3H9v-3H6v-2h3V8h2v3h3v2z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<span className="text-[#004B87] font-semibold text-xs md:text-sm">Canlı Yayın</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Haberler */}
|
||||||
|
<button
|
||||||
|
onClick={onNewsClick}
|
||||||
|
className="bg-white rounded-xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 flex flex-col items-center text-center group"
|
||||||
|
>
|
||||||
|
<div className="w-10 h-10 md:w-12 md:h-12 mb-2 md:mb-3 text-[#004B87] group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<span className="text-[#004B87] font-semibold text-xs md:text-sm">Haberler</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Belgeler */}
|
||||||
|
<button
|
||||||
|
onClick={onDocumentsClick}
|
||||||
|
className="bg-white rounded-xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 flex flex-col items-center text-center group"
|
||||||
|
>
|
||||||
|
<div className="w-10 h-10 md:w-12 md:h-12 mb-2 md:mb-3 text-[#004B87] group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<span className="text-[#004B87] font-semibold text-xs md:text-sm">Belgeler</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Medya Galerisi */}
|
||||||
|
<button
|
||||||
|
onClick={onMediaClick}
|
||||||
|
className="bg-white rounded-xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 flex flex-col items-center text-center group"
|
||||||
|
>
|
||||||
|
<div className="w-10 h-10 md:w-12 md:h-12 mb-2 md:mb-3 text-[#004B87] group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<span className="text-[#004B87] font-semibold text-xs md:text-sm">Medya Galerisi</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* Dilek-Şikayet */}
|
||||||
|
<button
|
||||||
|
onClick={onComplaintClick}
|
||||||
|
className="bg-white rounded-xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 flex flex-col items-center text-center group"
|
||||||
|
>
|
||||||
|
<div className="w-10 h-10 md:w-12 md:h-12 mb-2 md:mb-3 text-[#004B87] group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<span className="text-[#004B87] font-semibold text-xs md:text-sm">Dilek-Şikayet</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{/* E-İletişim */}
|
||||||
|
<button
|
||||||
|
onClick={onContactClick}
|
||||||
|
className="bg-white rounded-xl p-4 md:p-6 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1 flex flex-col items-center text-center group"
|
||||||
|
>
|
||||||
|
<div className="w-10 h-10 md:w-12 md:h-12 mb-2 md:mb-3 text-[#004B87] group-hover:text-[#00B4D8] transition-colors">
|
||||||
|
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<span className="text-[#004B87] font-semibold text-xs md:text-sm">E-İletişim</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -15,123 +15,93 @@ export interface MetroStation {
|
|||||||
export const metroStations: MetroStation[] = [
|
export const metroStations: MetroStation[] = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'Dikimevi',
|
name: 'ABİDİN PAŞA',
|
||||||
status: 'in-progress',
|
status: 'completed',
|
||||||
progress: 75,
|
progress: 100,
|
||||||
startDate: '15 Ocak 2024',
|
startDate: '10 Ocak 2023',
|
||||||
expectedCompletion: '30 Haziran 2026',
|
expectedCompletion: '30 Aralık 2023',
|
||||||
connections: ['M1', 'M3'],
|
actualCompletion: '25 Aralık 2023',
|
||||||
features: ['Aktarma İstasyonu', 'Otopark', 'Engelsiz Erişim'],
|
connections: ['M1'],
|
||||||
dailyCapacity: '50,000',
|
features: ['Aktarma İstasyonu', 'Otopark', 'Engelsiz Erişim', 'Ticari Alanlar'],
|
||||||
image: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg'
|
dailyCapacity: '45,000'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: 'Tuzluçayır',
|
name: 'AŞIK VEYSEL',
|
||||||
status: 'in-progress',
|
status: 'completed',
|
||||||
progress: 65,
|
progress: 100,
|
||||||
startDate: '1 Şubat 2024',
|
startDate: '15 Şubat 2023',
|
||||||
expectedCompletion: '15 Temmuz 2026',
|
expectedCompletion: '15 Mart 2024',
|
||||||
|
actualCompletion: '10 Mart 2024',
|
||||||
connections: [],
|
connections: [],
|
||||||
features: ['Modern Tasarım', 'Güneş Enerjisi', 'Güvenlik Sistemleri'],
|
features: ['Modern Tasarım', 'Güvenlik Sistemleri', 'Engelsiz Erişim'],
|
||||||
dailyCapacity: '35,000',
|
dailyCapacity: '35,000'
|
||||||
image: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: 'Yenimahalle',
|
name: 'TUZLUÇAYIR',
|
||||||
status: 'in-progress',
|
status: 'in-progress',
|
||||||
progress: 55,
|
progress: 75,
|
||||||
startDate: '15 Mart 2024',
|
startDate: '1 Mart 2024',
|
||||||
expectedCompletion: '30 Ağustos 2026',
|
expectedCompletion: '30 Haziran 2025',
|
||||||
connections: ['M2'],
|
connections: [],
|
||||||
features: ['Aktarma Merkezi', 'Ticari Alan', 'Otopark'],
|
features: ['Modern Tasarım', 'Güneş Enerjisi', 'Güvenlik Sistemleri', 'Engelsiz Erişim'],
|
||||||
dailyCapacity: '45,000',
|
dailyCapacity: '40,000'
|
||||||
image: 'https://images.pexels.com/photos/33950678/pexels-photo-33950678.jpeg'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: 'Demetevler',
|
name: 'GENERAL ZEKİ DOĞAN',
|
||||||
status: 'in-progress',
|
status: 'in-progress',
|
||||||
progress: 45,
|
progress: 45,
|
||||||
startDate: '1 Nisan 2024',
|
startDate: '15 Nisan 2024',
|
||||||
expectedCompletion: '15 Eylül 2026',
|
expectedCompletion: '30 Eylül 2025',
|
||||||
connections: [],
|
connections: [],
|
||||||
features: ['Modern Mimari', 'LED Aydınlatma', 'Havalandırma'],
|
features: ['Otopark', 'Bisiklet Park Alanı', 'Güvenlik Sistemleri'],
|
||||||
dailyCapacity: '30,000',
|
dailyCapacity: '30,000'
|
||||||
image: 'https://images.pexels.com/photos/253647/pexels-photo-253647.jpeg'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
name: 'Akköprü',
|
name: 'FAHRİ KORUTÜRK',
|
||||||
status: 'in-progress',
|
|
||||||
progress: 40,
|
|
||||||
startDate: '15 Nisan 2024',
|
|
||||||
expectedCompletion: '30 Eylül 2026',
|
|
||||||
connections: [],
|
|
||||||
features: ['Geniş Peronlar', 'Asansör', 'Güvenlik Kameraları'],
|
|
||||||
dailyCapacity: '28,000',
|
|
||||||
image: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 6,
|
|
||||||
name: 'Şentepe',
|
|
||||||
status: 'planned',
|
|
||||||
progress: 25,
|
|
||||||
startDate: '1 Mayıs 2024',
|
|
||||||
expectedCompletion: '15 Ekim 2026',
|
|
||||||
connections: [],
|
|
||||||
features: ['Çevre Dostu', 'Akıllı Sistemler', 'Engelsiz Erişim'],
|
|
||||||
dailyCapacity: '25,000',
|
|
||||||
image: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 7,
|
|
||||||
name: 'Atatürk',
|
|
||||||
status: 'planned',
|
|
||||||
progress: 20,
|
|
||||||
startDate: '15 Mayıs 2024',
|
|
||||||
expectedCompletion: '30 Ekim 2026',
|
|
||||||
connections: ['M1', 'M4'],
|
|
||||||
features: ['Ana Aktarma', 'AVM Bağlantısı', 'Geniş Alan'],
|
|
||||||
dailyCapacity: '60,000',
|
|
||||||
image: 'https://images.pexels.com/photos/33950678/pexels-photo-33950678.jpeg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 8,
|
|
||||||
name: 'Sıhhiye',
|
|
||||||
status: 'planned',
|
status: 'planned',
|
||||||
progress: 15,
|
progress: 15,
|
||||||
startDate: '1 Haziran 2024',
|
startDate: '1 Haziran 2024',
|
||||||
expectedCompletion: '15 Kasım 2026',
|
expectedCompletion: '31 Aralık 2025',
|
||||||
connections: ['M2', 'M3'],
|
connections: [],
|
||||||
features: ['Merkezi Konum', 'Hastane Bağlantısı', 'Yüksek Kapasite'],
|
features: ['Modern Mimari', 'Yeşil Alan', 'Engelsiz Erişim'],
|
||||||
dailyCapacity: '55,000',
|
dailyCapacity: '35,000'
|
||||||
image: 'https://images.pexels.com/photos/253647/pexels-photo-253647.jpeg'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 9,
|
id: 6,
|
||||||
name: 'Kızılay',
|
name: 'CENGİZHAN',
|
||||||
status: 'planned',
|
status: 'planned',
|
||||||
progress: 10,
|
progress: 10,
|
||||||
startDate: '15 Haziran 2024',
|
startDate: '1 Ağustos 2024',
|
||||||
expectedCompletion: '30 Kasım 2026',
|
expectedCompletion: '28 Şubat 2026',
|
||||||
connections: ['M1', 'M2', 'M3', 'M4'],
|
connections: [],
|
||||||
features: ['Merkez İstasyon', 'Çok Katlı', 'Tüm Hatlar'],
|
features: ['Ticari Alanlar', 'Otopark', 'Güvenlik Sistemleri'],
|
||||||
dailyCapacity: '80,000',
|
dailyCapacity: '32,000'
|
||||||
image: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 7,
|
||||||
name: 'Kocatepe',
|
name: 'AKŞEMSETTİN',
|
||||||
status: 'planned',
|
status: 'planned',
|
||||||
progress: 5,
|
progress: 5,
|
||||||
startDate: '1 Temmuz 2024',
|
startDate: '1 Ekim 2024',
|
||||||
expectedCompletion: '15 Aralık 2026',
|
expectedCompletion: '30 Nisan 2026',
|
||||||
connections: [],
|
connections: [],
|
||||||
features: ['Modern Tasarım', 'Ticari Birimler', 'Güvenlik'],
|
features: ['Modern Tasarım', 'Engelsiz Erişim', 'Bisiklet Park Alanı'],
|
||||||
dailyCapacity: '22,000',
|
dailyCapacity: '28,000'
|
||||||
image: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg'
|
},
|
||||||
|
{
|
||||||
|
id: 8,
|
||||||
|
name: 'NATOYOLU',
|
||||||
|
status: 'planned',
|
||||||
|
progress: 5,
|
||||||
|
startDate: '1 Aralık 2024',
|
||||||
|
expectedCompletion: '30 Haziran 2026',
|
||||||
|
connections: ['M2'],
|
||||||
|
features: ['Aktarma İstasyonu', 'Otopark', 'Ticari Alanlar', 'Modern Tasarım'],
|
||||||
|
dailyCapacity: '50,000'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
196
lib/dataStore.ts
Normal file
196
lib/dataStore.ts
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
// Veri yönetimi için localStorage tabanlı store
|
||||||
|
import { newsData, type NewsItem } from '@/data/news';
|
||||||
|
import { mediaData, type MediaItem } from '@/data/media';
|
||||||
|
import { documentsData, type Document } from '@/data/documents';
|
||||||
|
import { metroStations, type MetroStation } from '@/data/metroStations';
|
||||||
|
|
||||||
|
export interface SliderItem {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
buttonText: string;
|
||||||
|
buttonLink: string;
|
||||||
|
active: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default slider data
|
||||||
|
export const defaultSliderData: SliderItem[] = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: 'Ankara Metro Altyapı Projelerinde Öncü Çözümler',
|
||||||
|
description: 'Ankara Büyükşehir Belediyesi ile birlikte, modern teknoloji ve mühendislik uzmanlığımızla başkentin ulaşım ağını inşa ediyor, geleceğin metro sistemlerini bugünden hayata geçiriyoruz.',
|
||||||
|
buttonText: 'Detayları Gör',
|
||||||
|
buttonLink: '#proje-detay',
|
||||||
|
active: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: 'A2 Metro Hattı İnşaatında Son Aşamaya Gelindi',
|
||||||
|
description: '15 istasyonlu A2 Metro Hattı projemiz %75 tamamlandı. 2026 yılında hizmete açılacak modern metro hattımız, günlük 300 bin yolcuya hizmet verecek.',
|
||||||
|
buttonText: 'İlerlemeyi İzle',
|
||||||
|
buttonLink: '#metro-hatti',
|
||||||
|
active: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
title: 'Çevre Dostu Metro Teknolojileri',
|
||||||
|
description: 'Yenilenebilir enerji kaynakları ve sürdürülebilir inşaat teknikleri ile çevre dostu metro projelerine imza atıyoruz. Karbon emisyonunu %40 azaltan yenilikçi çözümlerimiz.',
|
||||||
|
buttonText: 'Yeşil Projeler',
|
||||||
|
buttonLink: '#cevre',
|
||||||
|
active: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
title: 'Güvenli İnşaat, Güvenli Gelecek',
|
||||||
|
description: 'ISO 45001 sertifikalı iş güvenliği sistemlerimiz ile 2000+ çalışanımızın güvenliğini en üst düzeyde tutuyoruz. Sıfır iş kazası hedefiyle çalışıyoruz.',
|
||||||
|
buttonText: 'Güvenlik Önlemleri',
|
||||||
|
buttonLink: '#guvenlik',
|
||||||
|
active: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// LocalStorage keys
|
||||||
|
const KEYS = {
|
||||||
|
SLIDER: 'a2metro_slider',
|
||||||
|
NEWS: 'a2metro_news',
|
||||||
|
MEDIA: 'a2metro_media',
|
||||||
|
DOCUMENTS: 'a2metro_documents',
|
||||||
|
METRO_STATIONS: 'a2metro_stations',
|
||||||
|
};
|
||||||
|
|
||||||
|
// Helper functions
|
||||||
|
const isBrowser = typeof window !== 'undefined';
|
||||||
|
|
||||||
|
export const dataStore = {
|
||||||
|
// Slider
|
||||||
|
getSlider: (): SliderItem[] => {
|
||||||
|
if (!isBrowser) return defaultSliderData;
|
||||||
|
const stored = localStorage.getItem(KEYS.SLIDER);
|
||||||
|
return stored ? JSON.parse(stored) : defaultSliderData;
|
||||||
|
},
|
||||||
|
setSlider: (data: SliderItem[]) => {
|
||||||
|
if (isBrowser) {
|
||||||
|
localStorage.setItem(KEYS.SLIDER, JSON.stringify(data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// News
|
||||||
|
getNews: (): NewsItem[] => {
|
||||||
|
if (!isBrowser) return newsData;
|
||||||
|
const stored = localStorage.getItem(KEYS.NEWS);
|
||||||
|
return stored ? JSON.parse(stored) : newsData;
|
||||||
|
},
|
||||||
|
setNews: (data: NewsItem[]) => {
|
||||||
|
if (isBrowser) {
|
||||||
|
localStorage.setItem(KEYS.NEWS, JSON.stringify(data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addNews: (newsItem: Omit<NewsItem, 'id'>) => {
|
||||||
|
const current = dataStore.getNews();
|
||||||
|
const newItem = { ...newsItem, id: Date.now() };
|
||||||
|
dataStore.setNews([newItem, ...current]);
|
||||||
|
return newItem;
|
||||||
|
},
|
||||||
|
updateNews: (id: number, newsItem: Partial<NewsItem>) => {
|
||||||
|
const current = dataStore.getNews();
|
||||||
|
const updated = current.map((item) =>
|
||||||
|
item.id === id ? { ...item, ...newsItem } : item
|
||||||
|
);
|
||||||
|
dataStore.setNews(updated);
|
||||||
|
},
|
||||||
|
deleteNews: (id: number) => {
|
||||||
|
const current = dataStore.getNews();
|
||||||
|
const filtered = current.filter((item) => item.id !== id);
|
||||||
|
dataStore.setNews(filtered);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Media
|
||||||
|
getMedia: (): MediaItem[] => {
|
||||||
|
if (!isBrowser) return mediaData;
|
||||||
|
const stored = localStorage.getItem(KEYS.MEDIA);
|
||||||
|
return stored ? JSON.parse(stored) : mediaData;
|
||||||
|
},
|
||||||
|
setMedia: (data: MediaItem[]) => {
|
||||||
|
if (isBrowser) {
|
||||||
|
localStorage.setItem(KEYS.MEDIA, JSON.stringify(data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addMedia: (mediaItem: Omit<MediaItem, 'id'>) => {
|
||||||
|
const current = dataStore.getMedia();
|
||||||
|
const newItem = { ...mediaItem, id: Date.now() };
|
||||||
|
dataStore.setMedia([newItem, ...current]);
|
||||||
|
return newItem;
|
||||||
|
},
|
||||||
|
updateMedia: (id: number, mediaItem: Partial<MediaItem>) => {
|
||||||
|
const current = dataStore.getMedia();
|
||||||
|
const updated = current.map((item) =>
|
||||||
|
item.id === id ? { ...item, ...mediaItem } : item
|
||||||
|
);
|
||||||
|
dataStore.setMedia(updated);
|
||||||
|
},
|
||||||
|
deleteMedia: (id: number) => {
|
||||||
|
const current = dataStore.getMedia();
|
||||||
|
const filtered = current.filter((item) => item.id !== id);
|
||||||
|
dataStore.setMedia(filtered);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Documents
|
||||||
|
getDocuments: (): Document[] => {
|
||||||
|
if (!isBrowser) return documentsData;
|
||||||
|
const stored = localStorage.getItem(KEYS.DOCUMENTS);
|
||||||
|
return stored ? JSON.parse(stored) : documentsData;
|
||||||
|
},
|
||||||
|
setDocuments: (data: Document[]) => {
|
||||||
|
if (isBrowser) {
|
||||||
|
localStorage.setItem(KEYS.DOCUMENTS, JSON.stringify(data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addDocument: (document: Omit<Document, 'id'>) => {
|
||||||
|
const current = dataStore.getDocuments();
|
||||||
|
const newItem = { ...document, id: Date.now() };
|
||||||
|
dataStore.setDocuments([newItem, ...current]);
|
||||||
|
return newItem;
|
||||||
|
},
|
||||||
|
updateDocument: (id: number, document: Partial<Document>) => {
|
||||||
|
const current = dataStore.getDocuments();
|
||||||
|
const updated = current.map((item) =>
|
||||||
|
item.id === id ? { ...item, ...document } : item
|
||||||
|
);
|
||||||
|
dataStore.setDocuments(updated);
|
||||||
|
},
|
||||||
|
deleteDocument: (id: number) => {
|
||||||
|
const current = dataStore.getDocuments();
|
||||||
|
const filtered = current.filter((item) => item.id !== id);
|
||||||
|
dataStore.setDocuments(filtered);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Metro Stations
|
||||||
|
getMetroStations: (): MetroStation[] => {
|
||||||
|
if (!isBrowser) return metroStations;
|
||||||
|
const stored = localStorage.getItem(KEYS.METRO_STATIONS);
|
||||||
|
return stored ? JSON.parse(stored) : metroStations;
|
||||||
|
},
|
||||||
|
setMetroStations: (data: MetroStation[]) => {
|
||||||
|
if (isBrowser) {
|
||||||
|
localStorage.setItem(KEYS.METRO_STATIONS, JSON.stringify(data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateStation: (id: number, station: Partial<MetroStation>) => {
|
||||||
|
const current = dataStore.getMetroStations();
|
||||||
|
const updated = current.map((item) =>
|
||||||
|
item.id === id ? { ...item, ...station } : item
|
||||||
|
);
|
||||||
|
dataStore.setMetroStations(updated);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Reset all data
|
||||||
|
resetAll: () => {
|
||||||
|
if (isBrowser) {
|
||||||
|
localStorage.removeItem(KEYS.SLIDER);
|
||||||
|
localStorage.removeItem(KEYS.NEWS);
|
||||||
|
localStorage.removeItem(KEYS.MEDIA);
|
||||||
|
localStorage.removeItem(KEYS.DOCUMENTS);
|
||||||
|
localStorage.removeItem(KEYS.METRO_STATIONS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user