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:
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user