feat: TR reklam trafiği için anasayfa CRO optimizasyonu

Yeni bölümler ve component'ler:
- WhatsAppFloat: sağ altta her sayfada görünen 'pulse' animasyonlu WhatsApp butonu
- MobileCtaBar: mobilde alt sabit bar — Ara / WhatsApp / Teklif Al üç buton
- TrustBand: hero altı 4 trust kartı (Google ★, proje sayısı, dönüş süresi, garanti)
  + Google rating + yorum sayısı satırı
- LogoCloud: müşteri logoları grayscale strip
- QuickLeadForm: ad + telefon iki alanlı inline mini form (anasayfada)
  - app/actions submitContact 'source' alanını destekliyor (quick lead → message zorunlu değil)
- WhyUs: 4 USP kartı (Hızlı teslim, Yerel destek, Modern tech, Satış sonrası)
- ProcessSteps: 4 adımlı 'nasıl çalışıyoruz' süreç akışı (numaralı timeline)

Schema (JSON-LD):
- OrganizationLd: LocalBusiness + Address + AggregateRating (Google review puanı/sayısı)
- ServiceLd: hizmet detay sayfaları için
- FaqLd: hizmet FAQ'leri için
- BreadcrumbLd, ArticleLd: hazır
Anasayfaya OrganizationLd ekli — Google Ads quality score + organic rich results.

Performans:
- REST GET çağrıları cache:'no-store' yerine next.revalidate=60 (ISR)
- Public sayfalar artık static rendering — LCP düşer
- Mutations ve session GET'ler hâlâ no-store

site_settings yeni alanları (panelden yönetilebilir):
- whatsapp_message (default WhatsApp opener)
- client_logos[] (logo URL listesi)
- trust_items[] (JSON: icon|value|label)
- why_us[] (JSON: icon, title, description)
- process_steps[] (JSON: title, description)
- lead_form_title, lead_form_description
- google_rating, google_review_count, google_review_url

Admin /admin/site formuna yeni 'Conversion / reklam optimizasyonu',
'Neden Biz?' ve 'Süreç adımları' bölümleri eklendi.

Mevcut anasayfa yapısı (üstten alta):
1. Hero
2. TrustBand (mini güven sinyalleri)
3. LogoCloud (varsa müşteri logoları)
4. Hızlı iletişim + QuickLeadForm (2 sütun: tel/WA CTA + mini form)
5. Hizmetler
6. WhyUs (Neden Biz?)
7. ProcessSteps (Nasıl çalışıyoruz?)
8. Projeler
9. Testimonials
10. CTA (Final + WhatsApp)
This commit is contained in:
Ege Can Komur
2026-05-20 03:08:05 +03:00
parent 1444aa3995
commit aa2b7280b6
16 changed files with 1024 additions and 23 deletions
+164 -1
View File
@@ -10,7 +10,12 @@ import {
} from "@/components/admin/form";
import { getSiteSettings } from "@/lib/data";
import { saveSiteSettings } from "@/lib/admin-actions";
import type { StatItem } from "@/lib/types";
import type {
ProcessStep,
StatItem,
TrustItem,
WhyUsItem,
} from "@/lib/types";
export const metadata: Metadata = { title: "Site Ayarları" };
@@ -28,6 +33,61 @@ function statsToText(items?: string[] | null): string {
return parsed.map((s) => `${s.value} | ${s.label}`).join("\n");
}
function trustToText(items?: string[] | null): string {
if (!items) return "";
const parsed: TrustItem[] = [];
for (const raw of items) {
try {
const obj = JSON.parse(raw) as Partial<TrustItem>;
if (obj.value && obj.label)
parsed.push({
icon: obj.icon ?? "Sparkles",
value: obj.value,
label: obj.label,
});
} catch {
/* ignore */
}
}
return parsed.map((t) => `${t.icon} | ${t.value} | ${t.label}`).join("\n");
}
function whyUsToText(items?: string[] | null): string {
if (!items) return "";
const parsed: WhyUsItem[] = [];
for (const raw of items) {
try {
const obj = JSON.parse(raw) as Partial<WhyUsItem>;
if (obj.title && obj.description)
parsed.push({
icon: obj.icon ?? "Sparkles",
title: obj.title,
description: obj.description,
});
} catch {
/* ignore */
}
}
return parsed
.map((w) => `${w.icon} | ${w.title}\n${w.description}`)
.join("\n---\n");
}
function processToText(items?: string[] | null): string {
if (!items) return "";
const parsed: ProcessStep[] = [];
for (const raw of items) {
try {
const obj = JSON.parse(raw) as Partial<ProcessStep>;
if (obj.title && obj.description)
parsed.push({ title: obj.title, description: obj.description });
} catch {
/* ignore */
}
}
return parsed.map((p) => `${p.title}\n${p.description}`).join("\n---\n");
}
function Section({
title,
description,
@@ -294,6 +354,109 @@ export default async function SiteSettingsPage() {
help="Logo altındaki kısa açıklama metni."
/>
</Section>
<Section
title="Conversion / reklam optimizasyonu"
description="Trust bandı, mini lead form ve WhatsApp metni."
>
<div className="grid gap-5 md:grid-cols-2">
<Field
label="Lead form başlığı"
name="lead_form_title"
defaultValue={s?.lead_form_title}
placeholder="Ücretsiz teklif alın"
/>
<Field
label="Lead form açıklaması"
name="lead_form_description"
defaultValue={s?.lead_form_description}
/>
</div>
<Textarea
label="WhatsApp varsayılan mesajı"
name="whatsapp_message"
rows={2}
defaultValue={s?.whatsapp_message}
placeholder="Merhaba, web siteniz üzerinden ulaşıyorum…"
help="Kullanıcı WhatsApp butonuna tıkladığında otomatik açılan mesaj."
/>
<Textarea
label="Trust bandı (hero altı 4 kart)"
name="trust_items"
rows={4}
defaultValue={trustToText(s?.trust_items)}
placeholder={
"Star | 4.9 | Google yıldızı\nBriefcase | 50+ | Tamamlanan proje\nClock | 24 saat | İçinde dönüş\nShield | 100% | Memnuniyet garantisi"
}
help='Her satır: "İkonAdı | Değer | Etiket" (örn. Star | 4.9 | Google yıldızı)'
/>
<Textarea
label="Müşteri logoları"
name="client_logos"
rows={4}
defaultValue={s?.client_logos?.join("\n")}
placeholder={"https://example.com/logo1.png\nhttps://example.com/logo2.png"}
help="Her satıra bir URL. Logoların grayscale + opaque versiyonu gösterilir."
/>
<div className="grid gap-5 md:grid-cols-3">
<Field
label="Google Rating (0-5)"
name="google_rating"
type="number"
defaultValue={s?.google_rating ?? ""}
placeholder="4.9"
/>
<Field
label="Yorum sayısı"
name="google_review_count"
type="number"
defaultValue={s?.google_review_count ?? ""}
placeholder="47"
/>
<Field
label="Google review URL"
name="google_review_url"
type="url"
defaultValue={s?.google_review_url}
placeholder="https://g.page/r/..."
/>
</div>
</Section>
<Section
title="Neden Biz? kartları"
description="Anasayfada görünen 4 USP kartı."
>
<Textarea
label="Neden Biz?"
name="why_us"
rows={12}
defaultValue={whyUsToText(s?.why_us)}
placeholder={
"Zap | Hızlı teslim\n2-3 hafta içinde…\n---\nAward | Yerel destek\nKocaeli ofisimizde…"
}
help='Her blok "---" ile ayrılır. İlk satır: "İkon | Başlık". Sonraki satırlar: açıklama.'
/>
</Section>
<Section
title="Nasıl çalışıyoruz? adımları"
description="4 adımlı süreç akışı."
>
<Textarea
label="Süreç adımları"
name="process_steps"
rows={10}
defaultValue={processToText(s?.process_steps)}
placeholder={
"Ücretsiz keşif görüşmesi\n30 dakika dinleme.\n---\nTeklif ve plan\nYazılı teklif sunuyoruz."
}
help='Her blok "---" ile ayrılır. İlk satır başlık, sonrası açıklama.'
/>
</Section>
</div>
<FormActions>