feat: TR rakip analizi → satış blokerleri düzeltildi
Rakip analizi (kocaelidijital.com, promedyanet.com, lf.com.tr) sonrası
satış blokerleri tespit edildi ve aşağıdaki bölümler eklendi:
1. ANASAYFADA SSS (8 hazır soru, admin'den düzenlenebilir)
- Fiyat, süre, ödeme, garanti, hosting, SEO, mevcut site yenileme,
sadece tasarım hizmeti gibi en sık sorulan sorular
- HomepageFaq component (sticky sol + accordion sağ)
- site_settings.homepage_faq[] (JSON {q,a})
2. RISK REVERSAL bölümü (Guarantee component)
- 'İlk taslak ücretsiz, memnun değilseniz devam etmiyoruz'
- 4 garanti maddesi checklist
- site_settings.guarantee_title/description/items
3. PROJE METRİKLERİ (vaka çalışması güçlendirme)
- projects.metrics[] (JSON {value,label})
- Detay sayfada büyük metric kartları
- Admin formda 'değer | etiket' satır formatı
4. HERO COPY GÜNCELLEMESİ (admin'den düzenlenebilir)
- 'Kocaeli'de 2-3 hafta içinde yayında olan, satan kurumsal web siteleri'
- 'İlk tasarım taslakı ücretsiz' vurgusu
- Trust band: 30 dk yanıt + ücretsiz taslak + 4.9 memnuniyet
5. /SITE-ANALIZI LEAD MAGNET SAYFASI
- URL + ad + email + telefon formu
- 6 analiz başlığı (CWV, mobil, SEO, güvenlik, içerik, rakip)
- contact_messages'a source=quick-site-audit ile yazılır
- 'subject' alanı ile inbox'ta ayırt edilebilir
6. EKİP BÖLÜMÜ (Hakkımızda sayfasında)
- Yeni team_members tablosu (name, role, bio, photo, linkedin)
- /admin/ekip CRUD sayfası
- TeamGrid component
7. SEKTÖR LANDING SAYFALARI (/sektor/[slug])
- Yeni industries tablosu (slug, title, content, features, faq, SEO)
- /admin/sektorler CRUD sayfası
- SEO + ad-targeted landing template
- Hero + trust + features + content + garanti + projeler + hizmetler + FAQ + JSON-LD
Admin /admin/site formuna yeni bölümler:
- 'Risk reversal / Garanti' (title + description + items)
- 'Anasayfa SSS' (---' bloklarla)
App sidebar'a 'Sektörler' ve 'Ekip' linkleri eklendi.
Footer'a 'Ücretsiz Site Analizi' linki eklendi.
36 route üretiliyor (önceki 31'den +5: /site-analizi, /sektor/[slug],
/admin/ekip + alt, /admin/sektorler + alt).
This commit is contained in:
@@ -2,6 +2,8 @@ import type { Metadata } from "next";
|
||||
import Image from "next/image";
|
||||
import { SectionTitle } from "@/components/section-title";
|
||||
import { CheckCircle2 } from "lucide-react";
|
||||
import { TeamGrid } from "@/components/team-grid";
|
||||
import { listTeamMembers } from "@/lib/data";
|
||||
import { buildMetadata } from "@/lib/seo";
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
@@ -35,7 +37,9 @@ const values = [
|
||||
},
|
||||
];
|
||||
|
||||
export default function AboutPage() {
|
||||
export default async function AboutPage() {
|
||||
const team = await listTeamMembers();
|
||||
|
||||
return (
|
||||
<>
|
||||
<section className="mx-auto max-w-7xl px-6 py-20">
|
||||
@@ -76,6 +80,21 @@ export default function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{team.length > 0 && (
|
||||
<section className="border-y border-[var(--border)] bg-[var(--navy-50)]/40 py-20">
|
||||
<div className="mx-auto max-w-7xl px-6">
|
||||
<SectionTitle
|
||||
eyebrow="Ekip"
|
||||
title="İşi yapan insanları tanıyın"
|
||||
description="Sizin projenizde birebir çalışacak ekip — geliştirici, tasarımcı ve proje yöneticileri."
|
||||
/>
|
||||
<div className="mt-12">
|
||||
<TeamGrid members={team} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
<section className="bg-[var(--navy)] py-20 text-white">
|
||||
<div className="mx-auto grid max-w-7xl gap-12 px-6 md:grid-cols-3">
|
||||
{[
|
||||
|
||||
@@ -11,6 +11,8 @@ import { LogoCloud } from "@/components/logo-cloud";
|
||||
import { QuickLeadForm } from "@/components/quick-lead-form";
|
||||
import { WhyUs } from "@/components/why-us";
|
||||
import { ProcessSteps } from "@/components/process-steps";
|
||||
import { Guarantee } from "@/components/guarantee";
|
||||
import { HomepageFaq } from "@/components/homepage-faq";
|
||||
import { OrganizationLd } from "@/components/json-ld";
|
||||
import {
|
||||
getSiteSettings,
|
||||
@@ -118,6 +120,8 @@ export default async function Home() {
|
||||
|
||||
<WhyUs settings={settings} />
|
||||
|
||||
<Guarantee settings={settings} />
|
||||
|
||||
<ProcessSteps settings={settings} />
|
||||
|
||||
<section className="py-20">
|
||||
@@ -165,6 +169,8 @@ export default async function Home() {
|
||||
</section>
|
||||
)}
|
||||
|
||||
<HomepageFaq settings={settings} />
|
||||
|
||||
<section className="relative overflow-hidden bg-[var(--navy)] py-20 text-white">
|
||||
<div className="absolute -left-20 top-0 size-96 rounded-full bg-[var(--sky)]/20 blur-3xl" aria-hidden />
|
||||
<div className="relative mx-auto max-w-4xl px-6 text-center">
|
||||
|
||||
@@ -7,6 +7,23 @@ import { marked } from "marked";
|
||||
import { getProjectBySlug, listProjects } from "@/lib/data";
|
||||
import { buildMetadata } from "@/lib/seo";
|
||||
import { Gallery } from "@/components/gallery";
|
||||
import { TrendingUp } from "lucide-react";
|
||||
import type { ProjectMetric } from "@/lib/types";
|
||||
|
||||
function parseMetrics(items?: string[] | null): ProjectMetric[] {
|
||||
if (!items) return [];
|
||||
const out: ProjectMetric[] = [];
|
||||
for (const raw of items) {
|
||||
try {
|
||||
const obj = JSON.parse(raw) as Partial<ProjectMetric>;
|
||||
if (obj.value && obj.label) out.push({ value: obj.value, label: obj.label });
|
||||
} catch {
|
||||
const [value, label] = raw.split("|").map((s) => s.trim());
|
||||
if (value && label) out.push({ value, label });
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
@@ -41,6 +58,8 @@ export default async function ProjectDetailPage({
|
||||
? (marked.parse(project.content, { async: false }) as string)
|
||||
: "";
|
||||
|
||||
const metrics = parseMetrics(project.metrics);
|
||||
|
||||
const meta: { icon: React.ReactNode; label: string; value: string }[] = [];
|
||||
if (project.client_name)
|
||||
meta.push({ icon: <Building2 className="size-4" />, label: "Müşteri", value: project.client_name });
|
||||
@@ -140,6 +159,30 @@ export default async function ProjectDetailPage({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{metrics.length > 0 && (
|
||||
<div className="mt-10">
|
||||
<p className="flex items-center gap-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--sky-600)]">
|
||||
<TrendingUp className="size-3.5" />
|
||||
Sonuçlar
|
||||
</p>
|
||||
<div className="mt-4 grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
||||
{metrics.map((m, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="rounded-2xl border border-[var(--border)] bg-gradient-to-br from-white to-[var(--sky-50)]/40 p-6"
|
||||
>
|
||||
<p className="text-3xl font-bold text-[var(--navy)] md:text-4xl">
|
||||
{m.value}
|
||||
</p>
|
||||
<p className="mt-1 text-xs text-[var(--muted)]">
|
||||
{m.label}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import type { Metadata } from "next";
|
||||
import { notFound } from "next/navigation";
|
||||
import { ArrowRight, ArrowLeft, CheckCircle2 } from "lucide-react";
|
||||
import { marked } from "marked";
|
||||
import {
|
||||
getIndustryBySlug,
|
||||
listProjects,
|
||||
listServices,
|
||||
getSiteSettings,
|
||||
} from "@/lib/data";
|
||||
import { buildMetadata } from "@/lib/seo";
|
||||
import { ProjectsGrid } from "@/components/projects-grid";
|
||||
import { ServicesGrid } from "@/components/services-grid";
|
||||
import { TrustBand } from "@/components/trust-band";
|
||||
import { Guarantee } from "@/components/guarantee";
|
||||
import { QuickLeadForm } from "@/components/quick-lead-form";
|
||||
import { FaqList } from "@/components/faq-list";
|
||||
import { FaqLd } from "@/components/json-ld";
|
||||
import { SectionTitle } from "@/components/section-title";
|
||||
import type { FaqItem } from "@/lib/types";
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ slug: string }>;
|
||||
}): Promise<Metadata> {
|
||||
const { slug } = await params;
|
||||
const industry = await getIndustryBySlug(slug);
|
||||
if (!industry) return { title: "Sektör bulunamadı" };
|
||||
return buildMetadata(`/sektor/${slug}`, {
|
||||
title: industry.seo_title || industry.title,
|
||||
description: industry.seo_description || industry.subtitle || undefined,
|
||||
});
|
||||
}
|
||||
|
||||
function parseFaq(items?: string[] | null): FaqItem[] {
|
||||
if (!items) return [];
|
||||
const out: FaqItem[] = [];
|
||||
for (const raw of items) {
|
||||
try {
|
||||
const obj = JSON.parse(raw) as Partial<FaqItem>;
|
||||
if (obj.q && obj.a) out.push({ q: obj.q, a: obj.a });
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
export default async function IndustryPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ slug: string }>;
|
||||
}) {
|
||||
const { slug } = await params;
|
||||
const industry = await getIndustryBySlug(slug);
|
||||
if (!industry) notFound();
|
||||
|
||||
const [services, projects, settings] = await Promise.all([
|
||||
listServices(),
|
||||
listProjects({ limit: 6 }),
|
||||
getSiteSettings(),
|
||||
]);
|
||||
|
||||
const faqItems = parseFaq(industry.faq);
|
||||
const html = industry.content
|
||||
? (marked.parse(industry.content, { async: false }) as string)
|
||||
: "";
|
||||
|
||||
return (
|
||||
<>
|
||||
<FaqLd items={faqItems} />
|
||||
|
||||
<section className="relative overflow-hidden border-b border-[var(--border)]">
|
||||
<div className="absolute inset-0 hero-grid opacity-50" aria-hidden />
|
||||
<div className="relative mx-auto max-w-7xl px-6 py-20">
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center gap-1 text-sm text-[var(--muted)] hover:text-[var(--navy)]"
|
||||
>
|
||||
<ArrowLeft className="size-3.5" /> Anasayfa
|
||||
</Link>
|
||||
|
||||
<div className="mt-6 grid items-center gap-12 lg:grid-cols-[1.2fr_1fr]">
|
||||
<div>
|
||||
<span className="inline-flex items-center gap-2 rounded-full border border-[var(--sky)]/30 bg-[var(--sky-50)] px-3 py-1 text-xs font-medium text-[var(--sky-600)]">
|
||||
Sektöre özel çözüm
|
||||
</span>
|
||||
<h1 className="mt-5 text-4xl font-bold leading-tight tracking-tight text-[var(--navy)] sm:text-5xl">
|
||||
{industry.title}
|
||||
</h1>
|
||||
{industry.subtitle && (
|
||||
<p className="mt-5 max-w-xl text-lg leading-relaxed text-[var(--muted)]">
|
||||
{industry.subtitle}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="mt-8 flex flex-col gap-3 sm:flex-row">
|
||||
<Link
|
||||
href="/iletisim"
|
||||
className="inline-flex items-center justify-center gap-2 rounded-full bg-[var(--navy)] px-6 py-3 text-sm font-semibold text-white transition hover:bg-[var(--navy-700)]"
|
||||
>
|
||||
Ücretsiz keşif görüşmesi
|
||||
<ArrowRight className="size-4" />
|
||||
</Link>
|
||||
<Link
|
||||
href="/site-analizi"
|
||||
className="inline-flex items-center justify-center gap-2 rounded-full border border-[var(--border)] bg-white px-6 py-3 text-sm font-medium text-[var(--navy)] transition hover:border-[var(--navy)]"
|
||||
>
|
||||
Ücretsiz site analizi
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="lg:pl-6">
|
||||
<QuickLeadForm
|
||||
title="Sektörünüze özel teklif"
|
||||
description="Adınızı ve telefonunuzu bırakın, sektör uzmanımız 30 dakika içinde sizi arasın."
|
||||
buttonLabel="Beni hemen arayın"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<TrustBand settings={settings} />
|
||||
|
||||
{industry.features && industry.features.length > 0 && (
|
||||
<section className="border-b border-[var(--border)] py-20">
|
||||
<div className="mx-auto max-w-7xl px-6">
|
||||
<SectionTitle
|
||||
eyebrow="Neler dahil?"
|
||||
title="Sektörünüze uygun, hazır çözümler"
|
||||
description={`${industry.title} alanında deneyimimizle geliştirdiğimiz fonksiyonlar.`}
|
||||
/>
|
||||
<ul className="mt-12 grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{industry.features.map((f) => (
|
||||
<li
|
||||
key={f}
|
||||
className="flex items-start gap-2 rounded-2xl border border-[var(--border)] bg-white p-5"
|
||||
>
|
||||
<CheckCircle2 className="mt-0.5 size-5 shrink-0 text-[var(--sky-600)]" />
|
||||
<span className="text-sm text-[var(--foreground)]">{f}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{html && (
|
||||
<section className="py-16">
|
||||
<div className="mx-auto max-w-3xl px-6">
|
||||
<article
|
||||
className="prose prose-lg max-w-none text-[var(--foreground)]"
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
<Guarantee settings={settings} />
|
||||
|
||||
{projects.length > 0 && (
|
||||
<section className="border-y border-[var(--border)] py-20">
|
||||
<div className="mx-auto max-w-7xl px-6">
|
||||
<SectionTitle
|
||||
eyebrow="Referanslar"
|
||||
title="Benzer projelerimiz"
|
||||
description="Sektörünüz veya benzer alanlarda tamamladığımız işler."
|
||||
/>
|
||||
<div className="mt-12">
|
||||
<ProjectsGrid projects={projects} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{services.length > 0 && (
|
||||
<section className="py-20">
|
||||
<div className="mx-auto max-w-7xl px-6">
|
||||
<SectionTitle
|
||||
eyebrow="Hizmetler"
|
||||
title="Sunduğumuz çözümler"
|
||||
description="Sektörünüze uygun hizmet paketlerimiz."
|
||||
/>
|
||||
<div className="mt-12">
|
||||
<ServicesGrid services={services} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{faqItems.length > 0 && (
|
||||
<section className="border-t border-[var(--border)] py-20">
|
||||
<div className="mx-auto grid max-w-6xl gap-12 px-6 lg:grid-cols-[1fr_2fr]">
|
||||
<SectionTitle
|
||||
align="left"
|
||||
eyebrow="SSS"
|
||||
title={`${industry.title} sektörü soruları`}
|
||||
/>
|
||||
<FaqList items={faqItems} />
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Search, Gauge, Smartphone, TrendingUp, Lock, FileText } from "lucide-react";
|
||||
import { AuditForm } from "@/components/audit-form";
|
||||
import { buildMetadata } from "@/lib/seo";
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
return buildMetadata("/site-analizi", {
|
||||
title: "Ücretsiz Site Analizi",
|
||||
description:
|
||||
"Web sitenizin SEO, hız, mobil uyumluluk ve dönüşüm performansını ölçen ücretsiz analiz raporu. 24 saat içinde e-postanıza.",
|
||||
});
|
||||
}
|
||||
|
||||
const CHECKS = [
|
||||
{
|
||||
icon: Gauge,
|
||||
title: "Sayfa hızı (Core Web Vitals)",
|
||||
description: "LCP, INP, CLS skorları + iyileştirme önerileri.",
|
||||
},
|
||||
{
|
||||
icon: Smartphone,
|
||||
title: "Mobil uyumluluk",
|
||||
description: "Mobile-friendly testi + responsive sorunları.",
|
||||
},
|
||||
{
|
||||
icon: TrendingUp,
|
||||
title: "SEO temelleri",
|
||||
description: "Meta etiketler, schema, sitemap, internal linking analizi.",
|
||||
},
|
||||
{
|
||||
icon: Lock,
|
||||
title: "Güvenlik & SSL",
|
||||
description: "HTTPS, güvenlik başlıkları, açık güvenlik açıkları taraması.",
|
||||
},
|
||||
{
|
||||
icon: FileText,
|
||||
title: "İçerik kalitesi",
|
||||
description: "Heading yapısı, alt text, içerik uzunluğu, okunabilirlik.",
|
||||
},
|
||||
{
|
||||
icon: Search,
|
||||
title: "Rakip karşılaştırması",
|
||||
description: "Sektörünüzdeki 2-3 rakiple anahtar metriklerin kıyaslanması.",
|
||||
},
|
||||
];
|
||||
|
||||
export default function AuditPage() {
|
||||
return (
|
||||
<>
|
||||
<section className="relative overflow-hidden">
|
||||
<div className="absolute inset-0 hero-grid opacity-50" aria-hidden />
|
||||
<div className="absolute -right-32 top-1/2 -z-0 size-[420px] -translate-y-1/2 rounded-full bg-gradient-to-br from-[var(--sky)]/20 to-transparent blur-3xl" aria-hidden />
|
||||
|
||||
<div className="relative mx-auto grid max-w-7xl items-start gap-12 px-6 py-20 lg:grid-cols-[1.1fr_1fr]">
|
||||
<div>
|
||||
<span className="inline-flex items-center gap-2 rounded-full border border-[var(--sky)]/30 bg-[var(--sky-50)] px-3 py-1 text-xs font-medium text-[var(--sky-600)]">
|
||||
✦ Ücretsiz — taahhüt yok
|
||||
</span>
|
||||
<h1 className="mt-5 text-4xl font-bold leading-tight tracking-tight text-[var(--navy)] sm:text-5xl">
|
||||
Web sitenizin <span className="gradient-text">satış kapasitesini</span> 24 saatte ölçelim
|
||||
</h1>
|
||||
<p className="mt-5 max-w-xl text-lg leading-relaxed text-[var(--muted)]">
|
||||
Mevcut sitenizin SEO, hız, mobil uyumluluk ve dönüşüm
|
||||
performansını analiz edip, neyin daha çok müşteri getireceğini
|
||||
net bir raporla gösteriyoruz.
|
||||
</p>
|
||||
|
||||
<ul className="mt-8 space-y-2.5 text-sm text-[var(--foreground)]">
|
||||
<li className="flex items-start gap-2">
|
||||
<span className="mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-[var(--sky-50)] text-xs text-[var(--sky-600)]">
|
||||
✓
|
||||
</span>
|
||||
Sitenizin Google'da neden yeterince görünmediği
|
||||
</li>
|
||||
<li className="flex items-start gap-2">
|
||||
<span className="mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-[var(--sky-50)] text-xs text-[var(--sky-600)]">
|
||||
✓
|
||||
</span>
|
||||
Ziyaretçi neden müşteriye dönüşmüyor — somut nedenler
|
||||
</li>
|
||||
<li className="flex items-start gap-2">
|
||||
<span className="mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-[var(--sky-50)] text-xs text-[var(--sky-600)]">
|
||||
✓
|
||||
</span>
|
||||
Rakiplerinize göre hangi alanlarda gerideniz
|
||||
</li>
|
||||
<li className="flex items-start gap-2">
|
||||
<span className="mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-[var(--sky-50)] text-xs text-[var(--sky-600)]">
|
||||
✓
|
||||
</span>
|
||||
Öncelikli iyileştirme listesi (etki/efor matrisli)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div className="rounded-2xl border border-[var(--border)] bg-white p-6 shadow-xl shadow-[var(--navy)]/5 sm:p-8">
|
||||
<AuditForm />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="border-y border-[var(--border)] bg-[var(--navy-50)]/40 py-20">
|
||||
<div className="mx-auto max-w-7xl px-6">
|
||||
<h2 className="text-2xl font-bold text-[var(--navy)] sm:text-3xl">
|
||||
Raporda neler var?
|
||||
</h2>
|
||||
<p className="mt-2 max-w-2xl text-sm text-[var(--muted)]">
|
||||
Otomatik araç çıktısı değil — uzmanlarımızın değerlendirdiği,
|
||||
önceliklendirilmiş ve eyleme dökülebilir bir doküman.
|
||||
</p>
|
||||
|
||||
<div className="mt-10 grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{CHECKS.map((c) => {
|
||||
const Icon = c.icon;
|
||||
return (
|
||||
<div
|
||||
key={c.title}
|
||||
className="rounded-2xl border border-[var(--border)] bg-white p-6"
|
||||
>
|
||||
<div className="flex size-11 items-center justify-center rounded-xl bg-[var(--navy-50)] text-[var(--navy)]">
|
||||
<Icon className="size-5" />
|
||||
</div>
|
||||
<h3 className="mt-4 text-base font-semibold text-[var(--navy)]">
|
||||
{c.title}
|
||||
</h3>
|
||||
<p className="mt-1 text-sm leading-relaxed text-[var(--muted)]">
|
||||
{c.description}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { getRow } from "@/lib/data";
|
||||
import { TABLES } from "@/lib/appwrite-rest";
|
||||
import type { TeamMemberRow } from "@/lib/types";
|
||||
import { TeamMemberForm } from "../../form";
|
||||
|
||||
export default async function EditTeamPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params;
|
||||
const row = await getRow<TeamMemberRow>(TABLES.teamMembers, id);
|
||||
if (!row) notFound();
|
||||
return <TeamMemberForm row={row} />;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import { Save } from "lucide-react";
|
||||
import {
|
||||
Field,
|
||||
FormActions,
|
||||
FormShell,
|
||||
GhostLink,
|
||||
PageHeader,
|
||||
PrimaryButton,
|
||||
Textarea,
|
||||
} from "@/components/admin/form";
|
||||
import { saveTeamMember } from "@/lib/admin-actions";
|
||||
import type { TeamMemberRow } from "@/lib/types";
|
||||
|
||||
export function TeamMemberForm({ row }: { row?: TeamMemberRow }) {
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title={row ? "Üyeyi düzenle" : "Yeni ekip üyesi"}
|
||||
backHref="/admin/ekip"
|
||||
/>
|
||||
<form action={saveTeamMember}>
|
||||
{row && <input type="hidden" name="id" value={row.$id} />}
|
||||
<FormShell>
|
||||
<div className="grid gap-5 md:grid-cols-2">
|
||||
<Field label="Ad Soyad" name="name" required defaultValue={row?.name} />
|
||||
<Field
|
||||
label="Pozisyon / Rol"
|
||||
name="role"
|
||||
defaultValue={row?.role}
|
||||
placeholder="Kurucu / Geliştirici / Tasarımcı"
|
||||
/>
|
||||
<Field
|
||||
label="Fotoğraf URL"
|
||||
name="photo_url"
|
||||
type="url"
|
||||
defaultValue={row?.photo_url}
|
||||
help="Medya kütüphanesinden URL kopyalayın."
|
||||
/>
|
||||
<Field
|
||||
label="LinkedIn URL"
|
||||
name="linkedin_url"
|
||||
type="url"
|
||||
defaultValue={row?.linkedin_url}
|
||||
/>
|
||||
<Field
|
||||
label="Sıra"
|
||||
name="order"
|
||||
type="number"
|
||||
defaultValue={row?.order ?? 0}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-5">
|
||||
<Textarea
|
||||
label="Biyografi"
|
||||
name="bio"
|
||||
rows={4}
|
||||
defaultValue={row?.bio}
|
||||
placeholder="2-3 cümle özet — uzmanlık, deneyim, ilgi alanı."
|
||||
/>
|
||||
</div>
|
||||
<FormActions>
|
||||
<GhostLink href="/admin/ekip">İptal</GhostLink>
|
||||
<PrimaryButton>
|
||||
<Save className="size-4" /> Kaydet
|
||||
</PrimaryButton>
|
||||
</FormActions>
|
||||
</FormShell>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TeamMemberForm } from "../form";
|
||||
|
||||
export default function NewTeamPage() {
|
||||
return <TeamMemberForm />;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import Link from "next/link";
|
||||
import { Edit, Plus } from "lucide-react";
|
||||
import { PageHeader } from "@/components/admin/form";
|
||||
import { DeleteButton } from "@/components/admin/delete-button";
|
||||
import { listTeamMembers } from "@/lib/data";
|
||||
import { deleteTeamMember } from "@/lib/admin-actions";
|
||||
|
||||
export default async function TeamAdminPage() {
|
||||
const members = await listTeamMembers();
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title="Ekip"
|
||||
description="Hakkımızda sayfasında gösterilen ekip üyeleri."
|
||||
action={
|
||||
<Link
|
||||
href="/admin/ekip/new"
|
||||
className="inline-flex items-center gap-2 rounded-full bg-[var(--navy)] px-4 py-2 text-sm font-medium text-white transition hover:bg-[var(--navy-700)]"
|
||||
>
|
||||
<Plus className="size-4" /> Yeni üye
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
<div className="mt-6 grid gap-4 md:grid-cols-2">
|
||||
{members.length === 0 && (
|
||||
<div className="rounded-2xl border border-dashed border-[var(--border)] bg-white p-12 text-center text-sm text-[var(--muted)] md:col-span-2">
|
||||
Henüz ekip üyesi yok.
|
||||
</div>
|
||||
)}
|
||||
{members.map((m) => (
|
||||
<div
|
||||
key={m.$id}
|
||||
className="rounded-2xl border border-[var(--border)] bg-white p-5"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
<div className="flex items-center gap-3">
|
||||
{m.photo_url ? (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={m.photo_url}
|
||||
alt={m.name}
|
||||
className="size-12 rounded-full object-cover"
|
||||
/>
|
||||
) : (
|
||||
<div className="flex size-12 items-center justify-center rounded-full bg-[var(--navy-50)] text-sm font-semibold text-[var(--navy)]">
|
||||
{m.name.charAt(0)}
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<p className="font-semibold text-[var(--navy)]">{m.name}</p>
|
||||
<p className="text-xs text-[var(--muted)]">
|
||||
{m.role ?? "—"} {m.order != null && `• Sıra: ${m.order}`}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-1.5">
|
||||
<Link
|
||||
href={`/admin/ekip/${m.$id}/edit`}
|
||||
className="inline-flex items-center gap-1 rounded-md border border-[var(--border)] bg-white px-2 py-1 text-xs font-medium text-[var(--navy)] hover:bg-[var(--navy-50)]"
|
||||
>
|
||||
<Edit className="size-3" /> Düzenle
|
||||
</Link>
|
||||
<form action={deleteTeamMember}>
|
||||
<input type="hidden" name="id" value={m.$id} />
|
||||
<DeleteButton />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{m.bio && (
|
||||
<p className="mt-3 text-sm text-[var(--muted)] line-clamp-3">
|
||||
{m.bio}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -114,6 +114,33 @@ export async function ProjectForm({ project }: { project?: ProjectRow }) {
|
||||
}
|
||||
help="Her satıra bir URL. Medya kütüphanesinden URL'leri kopyalayın."
|
||||
/>
|
||||
|
||||
<Textarea
|
||||
label="Sonuç metrikleri"
|
||||
name="metrics"
|
||||
rows={4}
|
||||
defaultValue={(() => {
|
||||
if (!project?.metrics) return "";
|
||||
return project.metrics
|
||||
.map((raw) => {
|
||||
try {
|
||||
const m = JSON.parse(raw) as {
|
||||
value?: string;
|
||||
label?: string;
|
||||
};
|
||||
return m.value && m.label ? `${m.value} | ${m.label}` : "";
|
||||
} catch {
|
||||
return "";
|
||||
}
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
})()}
|
||||
placeholder={
|
||||
"+150% | Organik trafik artışı\n2x | Dönüşüm oranı\n-40% | Sayfa yüklenme süresi"
|
||||
}
|
||||
help='Her satır "Değer | Etiket". Proje detay sayfasında büyük metric kartları olarak gösterilir.'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-5">
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { getRow } from "@/lib/data";
|
||||
import { TABLES } from "@/lib/appwrite-rest";
|
||||
import type { IndustryRow } from "@/lib/types";
|
||||
import { IndustryForm } from "../../form";
|
||||
|
||||
export default async function EditIndustryPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params;
|
||||
const row = await getRow<IndustryRow>(TABLES.industries, id);
|
||||
if (!row) notFound();
|
||||
return <IndustryForm row={row} />;
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
import { Save } from "lucide-react";
|
||||
import {
|
||||
Checkbox,
|
||||
Field,
|
||||
FormActions,
|
||||
FormShell,
|
||||
GhostLink,
|
||||
PageHeader,
|
||||
PrimaryButton,
|
||||
Textarea,
|
||||
} from "@/components/admin/form";
|
||||
import { saveIndustry } from "@/lib/admin-actions";
|
||||
import type { FaqItem, IndustryRow } from "@/lib/types";
|
||||
|
||||
function faqToText(items?: string[] | null): string {
|
||||
if (!items) return "";
|
||||
const parsed: FaqItem[] = [];
|
||||
for (const raw of items) {
|
||||
try {
|
||||
const obj = JSON.parse(raw) as Partial<FaqItem>;
|
||||
if (obj.q && obj.a) parsed.push({ q: obj.q, a: obj.a });
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
return parsed.map((it) => `${it.q}\n${it.a}`).join("\n---\n");
|
||||
}
|
||||
|
||||
export function IndustryForm({ row }: { row?: IndustryRow }) {
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title={row ? "Sektörü düzenle" : "Yeni sektör"}
|
||||
backHref="/admin/sektorler"
|
||||
description="Örn: 'Avukat web tasarımı', 'Doktor web tasarımı', 'İnşaat firması web tasarımı'"
|
||||
/>
|
||||
<form action={saveIndustry}>
|
||||
{row && <input type="hidden" name="id" value={row.$id} />}
|
||||
<FormShell>
|
||||
<div className="grid gap-5 md:grid-cols-2">
|
||||
<Field
|
||||
label="Başlık"
|
||||
name="title"
|
||||
required
|
||||
defaultValue={row?.title}
|
||||
placeholder="Avukat Web Tasarımı"
|
||||
/>
|
||||
<Field
|
||||
label="Slug"
|
||||
name="slug"
|
||||
defaultValue={row?.slug}
|
||||
placeholder="avukat-web-tasarimi"
|
||||
/>
|
||||
<Field
|
||||
label="Hero görsel URL"
|
||||
name="hero_image"
|
||||
type="url"
|
||||
defaultValue={row?.hero_image}
|
||||
/>
|
||||
<Field
|
||||
label="Sıra"
|
||||
name="order"
|
||||
type="number"
|
||||
defaultValue={row?.order ?? 0}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-5 space-y-5">
|
||||
<Textarea
|
||||
label="Alt başlık / kısa açıklama"
|
||||
name="subtitle"
|
||||
rows={2}
|
||||
defaultValue={row?.subtitle}
|
||||
placeholder="Avukatlar için KVKK uyumlu, randevu sistemli, SEO odaklı modern web siteleri."
|
||||
/>
|
||||
|
||||
<Textarea
|
||||
label="İçerik (Markdown)"
|
||||
name="content"
|
||||
rows={10}
|
||||
defaultValue={row?.content}
|
||||
placeholder="## Sektör özellikleri\n\nAvukatlar için..."
|
||||
/>
|
||||
|
||||
<Textarea
|
||||
label="Özellikler"
|
||||
name="features"
|
||||
rows={3}
|
||||
defaultValue={row?.features?.join(", ")}
|
||||
placeholder="KVKK uyumlu form, Randevu sistemi, Blog modülü, Çoklu dil"
|
||||
help="Virgülle ayırın."
|
||||
/>
|
||||
|
||||
<Textarea
|
||||
label="SSS"
|
||||
name="faq"
|
||||
rows={8}
|
||||
defaultValue={faqToText(row?.faq)}
|
||||
placeholder={"Avukatlar için web sitesi neden önemli?\nKVKK uyumu için..."}
|
||||
help='Her blok "---" ile ayrılır. İlk satır soru, kalanı cevap.'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h3 className="mt-8 text-sm font-semibold uppercase tracking-wider text-[var(--muted)]">
|
||||
SEO
|
||||
</h3>
|
||||
<div className="mt-3 space-y-5">
|
||||
<Field
|
||||
label="SEO başlığı"
|
||||
name="seo_title"
|
||||
defaultValue={row?.seo_title}
|
||||
placeholder="Avukat Web Tasarımı | Kocaeli — KVKK Uyumlu Modern Site"
|
||||
/>
|
||||
<Textarea
|
||||
label="SEO açıklaması"
|
||||
name="seo_description"
|
||||
rows={2}
|
||||
defaultValue={row?.seo_description}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-5">
|
||||
<Checkbox
|
||||
label="Öne çıkar"
|
||||
name="featured"
|
||||
defaultChecked={row?.featured ?? false}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FormActions>
|
||||
<GhostLink href="/admin/sektorler">İptal</GhostLink>
|
||||
<PrimaryButton>
|
||||
<Save className="size-4" /> Kaydet
|
||||
</PrimaryButton>
|
||||
</FormActions>
|
||||
</FormShell>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { IndustryForm } from "../form";
|
||||
|
||||
export default function NewIndustryPage() {
|
||||
return <IndustryForm />;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import Link from "next/link";
|
||||
import { Edit, ExternalLink, Plus } from "lucide-react";
|
||||
import { PageHeader } from "@/components/admin/form";
|
||||
import { DeleteButton } from "@/components/admin/delete-button";
|
||||
import { listIndustries } from "@/lib/data";
|
||||
import { deleteIndustry } from "@/lib/admin-actions";
|
||||
|
||||
export default async function IndustriesAdminPage() {
|
||||
const items = await listIndustries();
|
||||
return (
|
||||
<div>
|
||||
<PageHeader
|
||||
title="Sektörler"
|
||||
description="SEO odaklı sektör landing sayfaları. /sektor/[slug] üzerinden yayınlanır."
|
||||
action={
|
||||
<Link
|
||||
href="/admin/sektorler/new"
|
||||
className="inline-flex items-center gap-2 rounded-full bg-[var(--navy)] px-4 py-2 text-sm font-medium text-white transition hover:bg-[var(--navy-700)]"
|
||||
>
|
||||
<Plus className="size-4" /> Yeni sektör
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
<div className="mt-6 overflow-hidden rounded-2xl border border-[var(--border)] bg-white">
|
||||
<table className="w-full text-sm">
|
||||
<thead className="bg-[var(--navy-50)] text-xs uppercase tracking-wider text-[var(--muted)]">
|
||||
<tr>
|
||||
<th className="px-4 py-3 text-left">Sıra</th>
|
||||
<th className="px-4 py-3 text-left">Başlık</th>
|
||||
<th className="px-4 py-3 text-left">Slug</th>
|
||||
<th className="px-4 py-3 text-left">Öne çıkan</th>
|
||||
<th className="px-4 py-3 text-right">İşlem</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{items.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={5} className="px-4 py-12 text-center text-[var(--muted)]">
|
||||
Henüz sektör eklenmemiş.
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
{items.map((it) => (
|
||||
<tr key={it.$id} className="border-t border-[var(--border)]">
|
||||
<td className="px-4 py-3 text-[var(--muted)]">{it.order ?? 0}</td>
|
||||
<td className="px-4 py-3 font-medium text-[var(--navy)]">{it.title}</td>
|
||||
<td className="px-4 py-3 text-[var(--muted)]">{it.slug}</td>
|
||||
<td className="px-4 py-3">
|
||||
{it.featured && (
|
||||
<span className="rounded-full bg-[var(--sky-50)] px-2 py-0.5 text-xs text-[var(--sky-600)]">
|
||||
Öne çıkan
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<div className="flex items-center justify-end gap-2">
|
||||
<Link
|
||||
href={`/sektor/${it.slug}`}
|
||||
target="_blank"
|
||||
className="rounded-md border border-[var(--border)] p-1.5 text-[var(--muted)] hover:text-[var(--navy)]"
|
||||
>
|
||||
<ExternalLink className="size-3.5" />
|
||||
</Link>
|
||||
<Link
|
||||
href={`/admin/sektorler/${it.$id}/edit`}
|
||||
className="inline-flex items-center gap-1 rounded-md border border-[var(--border)] bg-white px-2.5 py-1.5 text-xs font-medium text-[var(--navy)] hover:bg-[var(--navy-50)]"
|
||||
>
|
||||
<Edit className="size-3.5" /> Düzenle
|
||||
</Link>
|
||||
<form action={deleteIndustry}>
|
||||
<input type="hidden" name="id" value={it.$id} />
|
||||
<DeleteButton />
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
import { getSiteSettings } from "@/lib/data";
|
||||
import { saveSiteSettings } from "@/lib/admin-actions";
|
||||
import type {
|
||||
FaqItem,
|
||||
ProcessStep,
|
||||
StatItem,
|
||||
TrustItem,
|
||||
@@ -88,6 +89,20 @@ function processToText(items?: string[] | null): string {
|
||||
return parsed.map((p) => `${p.title}\n${p.description}`).join("\n---\n");
|
||||
}
|
||||
|
||||
function faqToText(items?: string[] | null): string {
|
||||
if (!items) return "";
|
||||
const parsed: FaqItem[] = [];
|
||||
for (const raw of items) {
|
||||
try {
|
||||
const obj = JSON.parse(raw) as Partial<FaqItem>;
|
||||
if (obj.q && obj.a) parsed.push({ q: obj.q, a: obj.a });
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
return parsed.map((it) => `${it.q}\n${it.a}`).join("\n---\n");
|
||||
}
|
||||
|
||||
function Section({
|
||||
title,
|
||||
description,
|
||||
@@ -457,6 +472,48 @@ export default async function SiteSettingsPage() {
|
||||
help='Her blok "---" ile ayrılır. İlk satır başlık, sonrası açıklama.'
|
||||
/>
|
||||
</Section>
|
||||
|
||||
<Section
|
||||
title="Risk reversal / Garanti bölümü"
|
||||
description="Anasayfada güven yaratan büyük garanti satırı."
|
||||
>
|
||||
<Field
|
||||
label="Garanti başlığı"
|
||||
name="guarantee_title"
|
||||
defaultValue={s?.guarantee_title}
|
||||
placeholder="İlk taslak ücretsiz, memnun değilseniz devam etmiyoruz"
|
||||
/>
|
||||
<Textarea
|
||||
label="Garanti açıklaması"
|
||||
name="guarantee_description"
|
||||
rows={3}
|
||||
defaultValue={s?.guarantee_description}
|
||||
/>
|
||||
<Textarea
|
||||
label="Garanti maddeleri"
|
||||
name="guarantee_items"
|
||||
rows={5}
|
||||
defaultValue={s?.guarantee_items?.join("\n")}
|
||||
placeholder={"İlk tasarım taslağı ücretsiz\n1 yıl ücretsiz teknik destek\nKaynak kodlar size aittir"}
|
||||
help="Her satır bir madde. Checklist olarak gösterilir."
|
||||
/>
|
||||
</Section>
|
||||
|
||||
<Section
|
||||
title="Anasayfa SSS"
|
||||
description="Reklam trafiği için kritik — fiyat, süre, ödeme gibi en sık soruları yanıtlar."
|
||||
>
|
||||
<Textarea
|
||||
label="SSS"
|
||||
name="homepage_faq"
|
||||
rows={20}
|
||||
defaultValue={faqToText(s?.homepage_faq)}
|
||||
placeholder={
|
||||
"Bir web sitesi ne kadar sürer?\n2-3 hafta…\n---\nFiyatlar ne kadar?\n15.000₺'den başlar…"
|
||||
}
|
||||
help='Her blok "---" ile ayrılır. İlk satır soru, kalanı cevap.'
|
||||
/>
|
||||
</Section>
|
||||
</div>
|
||||
|
||||
<FormActions>
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
Search,
|
||||
Inbox,
|
||||
Image as ImageIcon,
|
||||
Users as UsersIcon,
|
||||
Building2,
|
||||
type LucideIcon,
|
||||
} from "lucide-react";
|
||||
|
||||
@@ -24,6 +26,8 @@ const items: Item[] = [
|
||||
{ href: "/admin/blog", label: "Blog", icon: Newspaper },
|
||||
{ href: "/admin/hizmetler", label: "Hizmetler", icon: Layers },
|
||||
{ href: "/admin/projeler", label: "Projeler", icon: Briefcase },
|
||||
{ href: "/admin/sektorler", label: "Sektörler", icon: Building2 },
|
||||
{ href: "/admin/ekip", label: "Ekip", icon: UsersIcon },
|
||||
{ href: "/admin/referanslar", label: "Referanslar", icon: MessageSquareQuote },
|
||||
{ href: "/admin/seo", label: "SEO", icon: Search },
|
||||
{ href: "/admin/iletisim", label: "Mesajlar", icon: Inbox },
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
"use client";
|
||||
|
||||
import { useActionState } from "react";
|
||||
import { submitContact, type ContactFormState } from "@/app/actions";
|
||||
import {
|
||||
Search,
|
||||
ArrowRight,
|
||||
CheckCircle2,
|
||||
AlertCircle,
|
||||
Loader2,
|
||||
} from "lucide-react";
|
||||
|
||||
const initial: ContactFormState = { ok: false, message: "" };
|
||||
|
||||
export function AuditForm() {
|
||||
const [state, action, pending] = useActionState(submitContact, initial);
|
||||
|
||||
return (
|
||||
<form action={action} className="space-y-4">
|
||||
<input type="hidden" name="source" value="quick-site-audit" />
|
||||
<input type="hidden" name="subject" value="Ücretsiz site analizi talebi" />
|
||||
|
||||
<div>
|
||||
<label className="text-sm font-medium text-[var(--navy)]">
|
||||
Web sitenizin adresi <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
name="message"
|
||||
required
|
||||
placeholder="https://siteminizin-adresi.com"
|
||||
className="mt-1.5 w-full rounded-xl border border-[var(--border)] bg-white px-4 py-3 text-sm outline-none transition placeholder:text-[var(--muted)]/60 focus:border-[var(--sky)] focus:ring-2 focus:ring-[var(--sky)]/20"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<label className="text-sm font-medium text-[var(--navy)]">
|
||||
Adınız <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
name="name"
|
||||
required
|
||||
placeholder="Adınız Soyadınız"
|
||||
className="mt-1.5 w-full rounded-xl border border-[var(--border)] bg-white px-4 py-3 text-sm outline-none transition placeholder:text-[var(--muted)]/60 focus:border-[var(--sky)] focus:ring-2 focus:ring-[var(--sky)]/20"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="text-sm font-medium text-[var(--navy)]">
|
||||
E-posta <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input
|
||||
name="email"
|
||||
type="email"
|
||||
required
|
||||
placeholder="ornek@firma.com"
|
||||
className="mt-1.5 w-full rounded-xl border border-[var(--border)] bg-white px-4 py-3 text-sm outline-none transition placeholder:text-[var(--muted)]/60 focus:border-[var(--sky)] focus:ring-2 focus:ring-[var(--sky)]/20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="text-sm font-medium text-[var(--navy)]">
|
||||
Telefon (opsiyonel)
|
||||
</label>
|
||||
<input
|
||||
name="phone"
|
||||
type="tel"
|
||||
inputMode="tel"
|
||||
placeholder="+90 5xx xxx xx xx"
|
||||
className="mt-1.5 w-full rounded-xl border border-[var(--border)] bg-white px-4 py-3 text-sm outline-none transition placeholder:text-[var(--muted)]/60 focus:border-[var(--sky)] focus:ring-2 focus:ring-[var(--sky)]/20"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={pending}
|
||||
className="inline-flex w-full items-center justify-center gap-2 rounded-xl bg-[var(--navy)] px-5 py-3 text-sm font-semibold text-white transition hover:bg-[var(--navy-700)] disabled:opacity-60"
|
||||
>
|
||||
{pending ? (
|
||||
<>
|
||||
<Loader2 className="size-4 animate-spin" />
|
||||
Talep gönderiliyor…
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Search className="size-4" />
|
||||
Ücretsiz analiz raporumu istiyorum
|
||||
<ArrowRight className="size-4" />
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
|
||||
<p className="text-center text-[11px] text-[var(--muted)]">
|
||||
Raporunuz 24 saat içinde e-posta adresinize gönderilir. Bilgileriniz gizli tutulur.
|
||||
</p>
|
||||
|
||||
{state.message && (
|
||||
<div
|
||||
className={`flex items-start gap-2 rounded-xl border p-3 text-xs ${
|
||||
state.ok
|
||||
? "border-green-200 bg-green-50 text-green-800"
|
||||
: "border-red-200 bg-red-50 text-red-800"
|
||||
}`}
|
||||
>
|
||||
{state.ok ? (
|
||||
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
||||
) : (
|
||||
<AlertCircle className="mt-0.5 size-4 shrink-0" />
|
||||
)}
|
||||
<span>{state.message}</span>
|
||||
</div>
|
||||
)}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -113,6 +113,10 @@ export async function Footer() {
|
||||
© {new Date().getFullYear()} {siteConfig.name}. Tüm hakları saklıdır.
|
||||
</p>
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<Link href="/site-analizi" className="hover:text-white">
|
||||
Ücretsiz Site Analizi
|
||||
</Link>
|
||||
<span>•</span>
|
||||
<Link href="/cerez-politikasi" className="hover:text-white">
|
||||
Çerez Politikası
|
||||
</Link>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
import { ShieldCheck, CheckCircle2 } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import type { SiteSettingsRow } from "@/lib/types";
|
||||
|
||||
const DEFAULT_ITEMS = [
|
||||
"İlk tasarım taslağı ücretsiz",
|
||||
"Ön ödeme garanti altında — müşteri devam etmek istemezse iade",
|
||||
"1 yıl ücretsiz teknik destek",
|
||||
"Kaynak kodlar size aittir, bağımlılık yok",
|
||||
];
|
||||
|
||||
export function Guarantee({
|
||||
settings,
|
||||
}: {
|
||||
settings?: SiteSettingsRow | null;
|
||||
}) {
|
||||
const title =
|
||||
settings?.guarantee_title ??
|
||||
"İlk taslak ücretsiz, memnun değilseniz devam etmiyoruz";
|
||||
const description =
|
||||
settings?.guarantee_description ??
|
||||
"Görüşme + ihtiyaç analizinin ardından ilk tasarım taslağı ücretsizdir. Beğenmezseniz devam etmek zorunda değilsiniz. İşimizden eminiz, ama karar sizin.";
|
||||
const items =
|
||||
settings?.guarantee_items && settings.guarantee_items.length > 0
|
||||
? settings.guarantee_items
|
||||
: DEFAULT_ITEMS;
|
||||
|
||||
return (
|
||||
<section className="relative overflow-hidden border-y border-[var(--border)] bg-gradient-to-br from-[var(--sky-50)]/60 via-white to-[var(--navy-50)]/40 py-20">
|
||||
<div className="absolute -right-32 top-1/2 -z-0 size-[420px] -translate-y-1/2 rounded-full bg-[var(--sky)]/10 blur-3xl" aria-hidden />
|
||||
<div className="relative mx-auto grid max-w-6xl items-center gap-12 px-6 md:grid-cols-[auto_1fr]">
|
||||
<div className="flex justify-center md:justify-start">
|
||||
<div className="relative">
|
||||
<div
|
||||
className="absolute inset-0 -z-10 rounded-full bg-[var(--sky)]/20 blur-2xl"
|
||||
aria-hidden
|
||||
/>
|
||||
<div className="flex size-28 items-center justify-center rounded-full border-4 border-white bg-[var(--navy)] text-white shadow-xl shadow-[var(--navy)]/20 md:size-36">
|
||||
<ShieldCheck className="size-12 md:size-16" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.18em] text-[var(--sky-600)]">
|
||||
Risk almazsınız
|
||||
</p>
|
||||
<h2 className="mt-3 text-3xl font-bold tracking-tight text-[var(--navy)] sm:text-4xl">
|
||||
{title}
|
||||
</h2>
|
||||
<p className="mt-4 max-w-2xl text-base leading-relaxed text-[var(--muted)]">
|
||||
{description}
|
||||
</p>
|
||||
|
||||
<ul className="mt-6 grid gap-3 sm:grid-cols-2">
|
||||
{items.map((it, i) => (
|
||||
<li
|
||||
key={i}
|
||||
className="flex items-start gap-2 rounded-xl border border-[var(--border)] bg-white p-3"
|
||||
>
|
||||
<CheckCircle2 className="mt-0.5 size-5 shrink-0 text-[var(--sky-600)]" />
|
||||
<span className="text-sm text-[var(--foreground)]">{it}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<Link
|
||||
href="/iletisim"
|
||||
className="mt-6 inline-flex items-center gap-2 rounded-full bg-[var(--navy)] px-5 py-3 text-sm font-semibold text-white transition hover:bg-[var(--navy-700)]"
|
||||
>
|
||||
Ücretsiz keşif görüşmesi
|
||||
<ArrowRight className="size-4" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import Link from "next/link";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { FaqList } from "@/components/faq-list";
|
||||
import { SectionTitle } from "@/components/section-title";
|
||||
import type { FaqItem, SiteSettingsRow } from "@/lib/types";
|
||||
|
||||
function parseFaq(items?: string[] | null): FaqItem[] {
|
||||
if (!items) return [];
|
||||
const out: FaqItem[] = [];
|
||||
for (const raw of items) {
|
||||
try {
|
||||
const obj = JSON.parse(raw) as Partial<FaqItem>;
|
||||
if (obj.q && obj.a) out.push({ q: obj.q, a: obj.a });
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
export function HomepageFaq({
|
||||
settings,
|
||||
}: {
|
||||
settings?: SiteSettingsRow | null;
|
||||
}) {
|
||||
const items = parseFaq(settings?.homepage_faq);
|
||||
if (items.length === 0) return null;
|
||||
|
||||
return (
|
||||
<section className="border-t border-[var(--border)] py-20">
|
||||
<div className="mx-auto grid max-w-6xl gap-12 px-6 lg:grid-cols-[1fr_2fr]">
|
||||
<div className="lg:sticky lg:top-24 lg:self-start">
|
||||
<SectionTitle
|
||||
align="left"
|
||||
eyebrow="SSS"
|
||||
title="Aklınızdaki sorular"
|
||||
description="Müşterilerimizin en sık sorduğu konular. Cevabı burada bulamadığınız her şey için bizi arayın."
|
||||
/>
|
||||
<Link
|
||||
href="/iletisim"
|
||||
className="mt-6 inline-flex items-center gap-2 rounded-full bg-[var(--navy)] px-5 py-2.5 text-sm font-medium text-white transition hover:bg-[var(--navy-700)]"
|
||||
>
|
||||
Sorunuz mu var?
|
||||
<ArrowRight className="size-4" />
|
||||
</Link>
|
||||
</div>
|
||||
<FaqList items={items} />
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import Image from "next/image";
|
||||
import { LinkedinIcon } from "@/components/social-icons";
|
||||
import type { TeamMemberRow } from "@/lib/types";
|
||||
|
||||
export function TeamGrid({ members }: { members: TeamMemberRow[] }) {
|
||||
if (members.length === 0) return null;
|
||||
return (
|
||||
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{members.map((m) => (
|
||||
<article
|
||||
key={m.$id}
|
||||
className="overflow-hidden rounded-2xl border border-[var(--border)] bg-white transition hover:shadow-md"
|
||||
>
|
||||
<div className="relative aspect-square overflow-hidden bg-gradient-to-br from-[var(--sky-50)] to-[var(--navy-50)]">
|
||||
{m.photo_url ? (
|
||||
<Image
|
||||
src={m.photo_url}
|
||||
alt={m.name}
|
||||
fill
|
||||
sizes="(min-width: 1024px) 33vw, (min-width: 768px) 50vw, 100vw"
|
||||
className="object-cover"
|
||||
/>
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center text-6xl font-bold text-[var(--navy)]/30">
|
||||
{m.name.charAt(0)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="p-5">
|
||||
<h3 className="text-base font-semibold text-[var(--navy)]">
|
||||
{m.name}
|
||||
</h3>
|
||||
{m.role && (
|
||||
<p className="text-xs text-[var(--sky-600)]">{m.role}</p>
|
||||
)}
|
||||
{m.bio && (
|
||||
<p className="mt-3 text-sm leading-relaxed text-[var(--muted)]">
|
||||
{m.bio}
|
||||
</p>
|
||||
)}
|
||||
{m.linkedin_url && (
|
||||
<a
|
||||
href={m.linkedin_url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="mt-3 inline-flex items-center gap-1 text-xs font-medium text-[var(--sky-600)] hover:text-[var(--navy)]"
|
||||
>
|
||||
<LinkedinIcon className="size-3.5" />
|
||||
LinkedIn'de bağlan
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -180,6 +180,17 @@ export async function deleteService(formData: FormData) {
|
||||
|
||||
// ─── Projects ────────────────────────────────────────────────────
|
||||
|
||||
function parseMetricsInput(raw: string): string[] {
|
||||
return raw
|
||||
.split("\n")
|
||||
.map((line) => {
|
||||
const [value, label] = line.split("|").map((s) => s.trim());
|
||||
if (!value || !label) return null;
|
||||
return JSON.stringify({ value, label });
|
||||
})
|
||||
.filter((x): x is string => x !== null);
|
||||
}
|
||||
|
||||
export async function saveProject(formData: FormData) {
|
||||
const secret = await requireSessionSecret();
|
||||
const id = str(formData.get("id"));
|
||||
@@ -212,6 +223,10 @@ export async function saveProject(formData: FormData) {
|
||||
industry: str(formData.get("industry")),
|
||||
duration: str(formData.get("duration")),
|
||||
service_slug: str(formData.get("service_slug")),
|
||||
metrics: (() => {
|
||||
const m = parseMetricsInput(String(formData.get("metrics") ?? ""));
|
||||
return m.length > 0 ? m : null;
|
||||
})(),
|
||||
};
|
||||
|
||||
if (id) {
|
||||
@@ -497,6 +512,97 @@ export async function deleteSeoPage(formData: FormData) {
|
||||
revalidatePath("/admin/seo");
|
||||
}
|
||||
|
||||
// ─── Team Members ────────────────────────────────────────────────
|
||||
|
||||
export async function saveTeamMember(formData: FormData) {
|
||||
const secret = await requireSessionSecret();
|
||||
const id = str(formData.get("id"));
|
||||
const name = str(formData.get("name"));
|
||||
if (!name) throw new Error("İsim zorunlu");
|
||||
|
||||
const data = {
|
||||
name,
|
||||
role: str(formData.get("role")),
|
||||
bio: str(formData.get("bio")),
|
||||
photo_url: str(formData.get("photo_url")),
|
||||
linkedin_url: str(formData.get("linkedin_url")),
|
||||
order: num(formData.get("order")) ?? 0,
|
||||
};
|
||||
|
||||
if (id) {
|
||||
await tablesDB.updateRow(DATABASE_ID, TABLES.teamMembers, id, data, secret);
|
||||
} else {
|
||||
await tablesDB.createRow(
|
||||
DATABASE_ID,
|
||||
TABLES.teamMembers,
|
||||
ID.unique(),
|
||||
data,
|
||||
secret,
|
||||
);
|
||||
}
|
||||
revalidatePath("/admin/ekip");
|
||||
revalidatePath("/hakkimizda");
|
||||
}
|
||||
|
||||
export async function deleteTeamMember(formData: FormData) {
|
||||
const secret = await requireSessionSecret();
|
||||
const id = String(formData.get("id"));
|
||||
await tablesDB.deleteRow(DATABASE_ID, TABLES.teamMembers, id, secret);
|
||||
revalidatePath("/admin/ekip");
|
||||
revalidatePath("/hakkimizda");
|
||||
}
|
||||
|
||||
// ─── Industries ──────────────────────────────────────────────────
|
||||
|
||||
export async function saveIndustry(formData: FormData) {
|
||||
const secret = await requireSessionSecret();
|
||||
const id = str(formData.get("id"));
|
||||
const title = str(formData.get("title"));
|
||||
if (!title) throw new Error("Başlık zorunlu");
|
||||
const slug = str(formData.get("slug")) || slugify(title);
|
||||
|
||||
const faqRaw = String(formData.get("faq") ?? "");
|
||||
const faq = faqRaw
|
||||
.split("\n---\n")
|
||||
.map((block) => {
|
||||
const lines = block.trim().split("\n");
|
||||
const q = lines[0]?.trim();
|
||||
const a = lines.slice(1).join("\n").trim();
|
||||
if (!q || !a) return null;
|
||||
return JSON.stringify({ q, a });
|
||||
})
|
||||
.filter((x): x is string => x !== null);
|
||||
|
||||
const data = {
|
||||
slug,
|
||||
title,
|
||||
subtitle: str(formData.get("subtitle")),
|
||||
content: str(formData.get("content")),
|
||||
hero_image: str(formData.get("hero_image")),
|
||||
features: strArr(formData.get("features")),
|
||||
faq: faq.length > 0 ? faq : null,
|
||||
seo_title: str(formData.get("seo_title")),
|
||||
seo_description: str(formData.get("seo_description")),
|
||||
featured: bool(formData.get("featured")),
|
||||
order: num(formData.get("order")) ?? 0,
|
||||
};
|
||||
|
||||
if (id) {
|
||||
await tablesDB.updateRow(DATABASE_ID, TABLES.industries, id, data, secret);
|
||||
} else {
|
||||
await tablesDB.createRow(DATABASE_ID, TABLES.industries, slug, data, secret);
|
||||
}
|
||||
revalidatePath("/admin/sektorler");
|
||||
revalidatePath(`/sektor/${slug}`);
|
||||
}
|
||||
|
||||
export async function deleteIndustry(formData: FormData) {
|
||||
const secret = await requireSessionSecret();
|
||||
const id = String(formData.get("id"));
|
||||
await tablesDB.deleteRow(DATABASE_ID, TABLES.industries, id, secret);
|
||||
revalidatePath("/admin/sektorler");
|
||||
}
|
||||
|
||||
// ─── Contact ─────────────────────────────────────────────────────
|
||||
|
||||
export async function updateMessageStatus(formData: FormData) {
|
||||
|
||||
@@ -22,6 +22,8 @@ export const TABLES = {
|
||||
seoPages: "seo_pages",
|
||||
seoSettings: "seo_settings",
|
||||
siteSettings: "site_settings",
|
||||
teamMembers: "team_members",
|
||||
industries: "industries",
|
||||
} as const;
|
||||
|
||||
export class AppwriteError extends Error {
|
||||
|
||||
+23
@@ -4,11 +4,13 @@ import { getSessionSecret } from "@/lib/auth";
|
||||
import type {
|
||||
BlogPostRow,
|
||||
ContactMessageRow,
|
||||
IndustryRow,
|
||||
ProjectRow,
|
||||
ServiceRow,
|
||||
SeoPageRow,
|
||||
SeoSettingsRow,
|
||||
SiteSettingsRow,
|
||||
TeamMemberRow,
|
||||
TestimonialRow,
|
||||
} from "@/lib/types";
|
||||
|
||||
@@ -119,6 +121,27 @@ export async function listSeoPages() {
|
||||
]);
|
||||
}
|
||||
|
||||
export async function listTeamMembers() {
|
||||
return safeList<TeamMemberRow>(TABLES.teamMembers, [
|
||||
Q.orderAsc("order"),
|
||||
Q.limit(50),
|
||||
]);
|
||||
}
|
||||
|
||||
export async function listIndustries(opts?: { featured?: boolean }) {
|
||||
const q = [Q.orderAsc("order"), Q.limit(100)];
|
||||
if (opts?.featured) q.unshift(Q.equal("featured", true));
|
||||
return safeList<IndustryRow>(TABLES.industries, q);
|
||||
}
|
||||
|
||||
export async function getIndustryBySlug(slug: string): Promise<IndustryRow | null> {
|
||||
const res = await safeList<IndustryRow>(TABLES.industries, [
|
||||
Q.equal("slug", slug),
|
||||
Q.limit(1),
|
||||
]);
|
||||
return res[0] ?? null;
|
||||
}
|
||||
|
||||
export async function getSiteSettings(): Promise<SiteSettingsRow | null> {
|
||||
try {
|
||||
return await tablesDB.getRow<SiteSettingsRow>(
|
||||
|
||||
@@ -36,6 +36,7 @@ export interface ProjectRow extends AwRow {
|
||||
industry?: string | null;
|
||||
duration?: string | null;
|
||||
service_slug?: string | null;
|
||||
metrics?: string[] | null; // JSON {"value":"+150%","label":"Trafik artışı"}
|
||||
}
|
||||
|
||||
export interface BlogPostRow extends AwRow {
|
||||
@@ -142,6 +143,39 @@ export interface SiteSettingsRow extends AwRow {
|
||||
google_review_url?: string | null;
|
||||
google_rating?: number | null;
|
||||
google_review_count?: number | null;
|
||||
|
||||
homepage_faq?: string[] | null; // JSON {"q","a"}
|
||||
guarantee_title?: string | null;
|
||||
guarantee_description?: string | null;
|
||||
guarantee_items?: string[] | null;
|
||||
}
|
||||
|
||||
export interface TeamMemberRow extends AwRow {
|
||||
name: string;
|
||||
role?: string | null;
|
||||
bio?: string | null;
|
||||
photo_url?: string | null;
|
||||
linkedin_url?: string | null;
|
||||
order?: number | null;
|
||||
}
|
||||
|
||||
export interface IndustryRow extends AwRow {
|
||||
slug: string;
|
||||
title: string;
|
||||
subtitle?: string | null;
|
||||
content?: string | null;
|
||||
hero_image?: string | null;
|
||||
features?: string[] | null;
|
||||
faq?: string[] | null;
|
||||
seo_title?: string | null;
|
||||
seo_description?: string | null;
|
||||
featured?: boolean | null;
|
||||
order?: number | null;
|
||||
}
|
||||
|
||||
export interface ProjectMetric {
|
||||
value: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface TrustItem {
|
||||
|
||||
Reference in New Issue
Block a user