feat: anasayfa içeriği, iletişim ve sosyal medya yönetilebilir
Yeni site_settings tablosu (singleton, rowId='homepage'): - Hero: badge, title, subtitle, 2 CTA (label+href), stats (JSON array) - Section başlıkları: services/projects/testimonials eyebrow + title + description - Alt CTA: title, description, button label+href - Contact: phone (görünen + tel: ham), email, address, hafta içi/sonu saatleri - Social: linkedin/instagram/twitter/facebook URL'leri - Footer tagline Mevcut hardcoded değerler seed edildi. Admin: - /admin/site sayfası eklendi (sidebar'a 'Site Ayarları' linki) - Bölümlü tek form: Hero / Hizmetler / Projeler / Referanslar / Alt CTA / İletişim / Sosyal / Footer - Stats için 'değer | etiket' satır formatı Public bağlantılar: - Hero component artık settings prop alıyor (fallback değerlerle) - Anasayfa: tüm section başlıkları ve alt CTA settings'ten geliyor - Header: telefon settings'ten - Footer: tagline, adres, telefon, email, sosyal linkler settings'ten (sosyal link sadece dolu olanlar gösteriliyor) - Footer'da hizmetler artık /hizmetler/[slug] detay sayfalarına bağlı - İletişim sayfası: adres, telefon, email, saatler settings'ten 30 route üretiliyor.
This commit is contained in:
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
|
||||
import { Mail, MapPin, Phone, Clock } from "lucide-react";
|
||||
import { SectionTitle } from "@/components/section-title";
|
||||
import { ContactForm } from "@/components/contact-form";
|
||||
import { getSiteSettings } from "@/lib/data";
|
||||
import { siteConfig } from "@/lib/site-config";
|
||||
import { buildMetadata } from "@/lib/seo";
|
||||
|
||||
@@ -13,7 +14,15 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
});
|
||||
}
|
||||
|
||||
export default function ContactPage() {
|
||||
export default async function ContactPage() {
|
||||
const s = await getSiteSettings();
|
||||
const address = s?.contact_address ?? siteConfig.contact.address;
|
||||
const phone = s?.contact_phone ?? siteConfig.contact.phone;
|
||||
const phoneRaw = s?.contact_phone_raw ?? siteConfig.contact.phoneRaw;
|
||||
const email = s?.contact_email ?? siteConfig.contact.email;
|
||||
const weekday = s?.contact_hours_weekday ?? "Hafta içi 09:00 — 18:00";
|
||||
const weekend = s?.contact_hours_weekend ?? "Cumartesi 10:00 — 14:00";
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-7xl px-6 py-20">
|
||||
<SectionTitle
|
||||
@@ -31,17 +40,17 @@ export default function ContactPage() {
|
||||
<InfoCard
|
||||
icon={<MapPin className="size-5" />}
|
||||
title="Adres"
|
||||
content={siteConfig.contact.address}
|
||||
content={address}
|
||||
/>
|
||||
<InfoCard
|
||||
icon={<Phone className="size-5" />}
|
||||
title="Telefon"
|
||||
content={
|
||||
<a
|
||||
href={`tel:${siteConfig.contact.phoneRaw}`}
|
||||
href={`tel:${phoneRaw}`}
|
||||
className="hover:text-[var(--navy)]"
|
||||
>
|
||||
{siteConfig.contact.phone}
|
||||
{phone}
|
||||
</a>
|
||||
}
|
||||
/>
|
||||
@@ -50,10 +59,10 @@ export default function ContactPage() {
|
||||
title="E-posta"
|
||||
content={
|
||||
<a
|
||||
href={`mailto:${siteConfig.contact.email}`}
|
||||
href={`mailto:${email}`}
|
||||
className="hover:text-[var(--navy)]"
|
||||
>
|
||||
{siteConfig.contact.email}
|
||||
{email}
|
||||
</a>
|
||||
}
|
||||
/>
|
||||
@@ -62,9 +71,9 @@ export default function ContactPage() {
|
||||
title="Çalışma Saatleri"
|
||||
content={
|
||||
<>
|
||||
Hafta içi 09:00 — 18:00
|
||||
{weekday}
|
||||
<br />
|
||||
Cumartesi 10:00 — 14:00
|
||||
{weekend}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user