cf46e30a7e
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).
164 lines
5.6 KiB
TypeScript
164 lines
5.6 KiB
TypeScript
import { Save } from "lucide-react";
|
||
import {
|
||
Checkbox,
|
||
Field,
|
||
FormActions,
|
||
FormShell,
|
||
GhostLink,
|
||
PageHeader,
|
||
PrimaryButton,
|
||
Textarea,
|
||
} from "@/components/admin/form";
|
||
import { saveProject } from "@/lib/admin-actions";
|
||
import { listServices } from "@/lib/data";
|
||
import type { ProjectRow } from "@/lib/types";
|
||
|
||
export async function ProjectForm({ project }: { project?: ProjectRow }) {
|
||
const services = await listServices();
|
||
|
||
return (
|
||
<div>
|
||
<PageHeader
|
||
title={project ? "Projeyi düzenle" : "Yeni proje"}
|
||
backHref="/admin/projeler"
|
||
/>
|
||
<form action={saveProject}>
|
||
{project && <input type="hidden" name="id" value={project.$id} />}
|
||
<FormShell>
|
||
<div className="grid gap-5 md:grid-cols-2">
|
||
<Field label="Başlık" name="title" required defaultValue={project?.title} />
|
||
<Field label="Slug" name="slug" defaultValue={project?.slug} />
|
||
<Field label="Kategori" name="category" defaultValue={project?.category} />
|
||
<label className="block">
|
||
<span className="text-sm font-medium text-[var(--navy)]">
|
||
İlgili hizmet
|
||
</span>
|
||
<select
|
||
name="service_slug"
|
||
defaultValue={project?.service_slug ?? ""}
|
||
className="mt-1.5 w-full rounded-xl border border-[var(--border)] bg-white px-4 py-2.5 text-sm outline-none focus:border-[var(--sky)] focus:ring-2 focus:ring-[var(--sky)]/20"
|
||
>
|
||
<option value="">— Yok —</option>
|
||
{services.map((s) => (
|
||
<option key={s.slug} value={s.slug}>
|
||
{s.title}
|
||
</option>
|
||
))}
|
||
</select>
|
||
<span className="mt-1 block text-xs text-[var(--muted)]">
|
||
Bu projenin ait olduğu hizmet — detay sayfasında "ilgili projeler" olarak görünür.
|
||
</span>
|
||
</label>
|
||
<Field label="Müşteri" name="client_name" defaultValue={project?.client_name} />
|
||
<Field label="Sektör" name="industry" defaultValue={project?.industry} />
|
||
<Field
|
||
label="Süre"
|
||
name="duration"
|
||
defaultValue={project?.duration}
|
||
placeholder="örn: 3 ay"
|
||
/>
|
||
<Field
|
||
label="Yıl"
|
||
name="year"
|
||
type="number"
|
||
defaultValue={project?.year ?? new Date().getFullYear()}
|
||
/>
|
||
<Field
|
||
label="Kapak görseli URL"
|
||
name="image_url"
|
||
type="url"
|
||
defaultValue={project?.image_url}
|
||
/>
|
||
<Field
|
||
label="Canlı URL"
|
||
name="live_url"
|
||
type="url"
|
||
defaultValue={project?.live_url}
|
||
/>
|
||
<Field
|
||
label="Teknolojiler"
|
||
name="technologies"
|
||
defaultValue={project?.technologies?.join(", ")}
|
||
placeholder="Next.js, Appwrite, Tailwind"
|
||
help="Virgülle ayırın."
|
||
/>
|
||
</div>
|
||
|
||
<div className="mt-5 space-y-5">
|
||
<Textarea
|
||
label="Kısa açıklama (kart için)"
|
||
name="description"
|
||
required
|
||
defaultValue={project?.description}
|
||
rows={3}
|
||
/>
|
||
|
||
<Textarea
|
||
label="Vaka çalışması içeriği (Markdown)"
|
||
name="content"
|
||
defaultValue={project?.content}
|
||
rows={12}
|
||
placeholder={
|
||
"## Müşteri\n\n## Problem\n\n## Çözüm\n\n## Sonuç"
|
||
}
|
||
help="Proje detay sayfasında uzun anlatım olarak gösterilir."
|
||
/>
|
||
|
||
<Textarea
|
||
label="Galeri görselleri"
|
||
name="gallery"
|
||
defaultValue={project?.gallery?.join("\n")}
|
||
rows={5}
|
||
placeholder={
|
||
"https://example.com/image1.jpg\nhttps://example.com/image2.jpg"
|
||
}
|
||
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">
|
||
<Checkbox
|
||
label="Öne çıkar (Anasayfada göster)"
|
||
name="featured"
|
||
defaultChecked={project?.featured ?? false}
|
||
/>
|
||
</div>
|
||
<FormActions>
|
||
<GhostLink href="/admin/projeler">İptal</GhostLink>
|
||
<PrimaryButton>
|
||
<Save className="size-4" /> Kaydet
|
||
</PrimaryButton>
|
||
</FormActions>
|
||
</FormShell>
|
||
</form>
|
||
</div>
|
||
);
|
||
}
|