انتقال تمام محتوای متنی سایت به دیتابیس — همه متن‌های فرانت‌اند از GET /api/site خوانده می‌شوند

This commit is contained in:
MMD
2026-09-06 20:16:17 +03:30
parent 8bb303dda2
commit 1fde4e30fc
36 changed files with 1096 additions and 454 deletions
+11 -18
View File
@@ -5,32 +5,25 @@ import { Faq } from '../components/home/Faq'
import { ContactSection } from '../components/ContactSection'
import { Reveal } from '../components/Reveal'
import { SectionHeading } from '../components/SectionHeading'
import { IMAGES } from '../data/site'
const PROCESS = [
{ step: '۰۱', title: 'مطالعه و امکان‌سنجی', desc: 'بررسی زمین، ضوابط شهری و تحلیل بازدهی اقتصادی پروژه.' },
{ step: '۰۲', title: 'طراحی و فاز اجرایی', desc: 'کانسپت معماری، طراحی سازه و تأسیسات و تهیه نقشه‌های اجرایی.' },
{ step: '۰۳', title: 'اجرا و کنترل کیفیت', desc: 'ساخت با نظارت مستمر، گزارش ماهانه پیشرفت و کنترل هزینه.' },
{ step: '۰۴', title: 'تحویل و پشتیبانی', desc: 'تحویل کلید، آموزش بهره‌برداری و پنج سال پشتیبانی فنی.' },
]
import { usePageHero, useSectionHeading, useSite } from '../api'
export function ServicesPage() {
const { process_steps } = useSite()
const hero = usePageHero('services')
const heading = useSectionHeading('process')
return (
<>
<PageHero
title="خدمات"
lead="هشت حوزه تخصصی که چرخه کامل یک پروژه ساختمانی را از ایده تا بهره‌برداری پوشش می‌دهند."
image={IMAGES[1]}
/>
<PageHero title={hero.title} lead={hero.lead} image={hero.image} />
<Services />
<section className="bg-char py-24 lg:py-32" aria-labelledby="process-title">
<div className="mx-auto max-w-site px-6 lg:px-10">
<SectionHeading title="فرآیند کار ما" lead="چهار مرحله شفاف، از نخستین جلسه تا تحویل کلید." align="center" />
<SectionHeading title={heading.title} lead={heading.lead} align="center" />
<div className="mt-14 grid gap-px bg-ivory/10 md:grid-cols-2 lg:grid-cols-4">
{PROCESS.map((item, i) => (
<Reveal key={item.step} delay={0.06 * i} className="h-full">
{process_steps.map((item, i) => (
<Reveal key={item.id} delay={0.06 * i} className="h-full">
<div className="flex h-full flex-col justify-center bg-char px-6 py-14 text-center">
<p className="text-4xl font-bold text-copper">{item.step}</p>
<h3 className="mt-6 text-xl font-bold text-ivory">{item.title}</h3>
@@ -46,4 +39,4 @@ export function ServicesPage() {
<ContactSection />
</>
)
}
}