Files
kovakyazilim/lib/types.ts
T
Ege Can Komur c0da5ae8d3 feat: hizmet ve proje detay sayfaları + galeri sistemi
Yeni Appwrite kolonları:
- services: content (markdown), features[], faq[] (JSON-encoded), hero_image
- projects: gallery[], content (markdown), client_name, industry, duration, service_slug

Public sayfalar:
- /hizmetler/[slug]: hero + features checklist + markdown content + FAQ accordion
  + ilgili projeler (service_slug eşleşmesi)
- /projeler/[slug]: hero + meta tablosu (müşteri/sektör/süre/yıl) + kapak görseli
  + markdown vaka çalışması + lightbox galeri + diğer projeler

Yeni componentler:
- components/gallery.tsx: lightbox galeri (keyboard nav, prev/next, ESC kapat)
- components/faq-list.tsx: accordion FAQ (tek seferde tek açık)

Admin formları:
- Hizmet formu: hero_image, content (markdown), features (virgülle), FAQ
  (her blok '---' ile ayrılır, ilk satır soru, kalanı cevap)
- Proje formu: gallery (her satıra bir URL), content (markdown), client_name,
  industry, duration, service_slug (dropdown — hizmetlerden seçim)

Linkler:
- ServicesGrid kartları → /hizmetler/[slug]
- ProjectsGrid kartları → /projeler/[slug] (live_url butonu ayrı, target=_blank)

29 route üretiliyor.
2026-05-20 02:46:11 +03:00

97 lines
2.3 KiB
TypeScript

import type { AwRow } from "@/lib/appwrite-rest";
export type Row = AwRow;
export interface ServiceRow extends AwRow {
slug: string;
title: string;
description: string;
icon?: string | null;
order?: number | null;
featured?: boolean | null;
content?: string | null;
features?: string[] | null;
faq?: string[] | null; // each item is JSON: {"q":"...","a":"..."}
hero_image?: string | null;
}
export interface FaqItem {
q: string;
a: string;
}
export interface ProjectRow extends AwRow {
slug: string;
title: string;
description: string;
image_url?: string | null;
live_url?: string | null;
category?: string | null;
technologies?: string[] | null;
year?: number | null;
featured?: boolean | null;
gallery?: string[] | null;
content?: string | null;
client_name?: string | null;
industry?: string | null;
duration?: string | null;
service_slug?: string | null;
}
export interface BlogPostRow extends AwRow {
slug: string;
title: string;
excerpt?: string | null;
content?: string | null;
cover_image?: string | null;
cover_file_id?: string | null;
author?: string | null;
status?: "draft" | "published" | null;
published_at?: string | null;
tags?: string[] | null;
seo_title?: string | null;
seo_description?: string | null;
seo_image?: string | null;
}
export interface TestimonialRow extends AwRow {
name: string;
role?: string | null;
company?: string | null;
message: string;
rating?: number | null;
image_url?: string | null;
order?: number | null;
featured?: boolean | null;
}
export interface SeoPageRow extends AwRow {
path: string;
title?: string | null;
description?: string | null;
og_image?: string | null;
canonical?: string | null;
noindex?: boolean | null;
}
export interface SeoSettingsRow extends AwRow {
site_name?: string | null;
site_description?: string | null;
default_og_image?: string | null;
twitter_handle?: string | null;
facebook_url?: string | null;
linkedin_url?: string | null;
instagram_url?: string | null;
google_site_verification?: string | null;
gtm_id?: string | null;
}
export interface ContactMessageRow extends AwRow {
name: string;
email: string;
phone?: string | null;
subject?: string | null;
message: string;
status?: "new" | "read" | "replied" | "archived" | null;
}