Make «الوقف» (Endowment) and «براعم إحسان» (EHSAN Buds) into real pages

Task #16: The last two top-nav items were static, non-clickable text.
Turned both into real bilingual (AR/EN) routed pages, completing the
main navigation of the EHSAN POC.

Changes:
- translations.ts: added parallel `waqf` and `baraem` sections to both
  `en` and `ar` (intro, contribution ways, endowment fields/features for
  waqf; goals, features, audience for baraem). Content mirrors ehsan.sa
  section structure; no emojis.
- New pages src/pages/waqf.tsx and src/pages/baraem.tsx, built on the
  about.tsx pattern: green intro panel, Reveal scroll-in, Card grids,
  RTL-correct using logical classes and the t.* system.
- App.tsx: registered /waqf and /baraem routes.
- Header.tsx: replaced the two static <span> items with active-aware
  <Link>s in desktop nav, and added matching entries to the mobile nav.

Verified: tsc --noEmit passes; both pages render correctly in Arabic
RTL with active nav highlighting (screenshots checked).

Replit-Task-Id: 40da5508-41c9-4ccd-aba4-2ea80183a97b
This commit is contained in:
riyadhafraa
2026-06-05 19:57:31 +00:00
parent d0d504bc74
commit d66ebddd00
6 changed files with 389 additions and 4 deletions
+79
View File
@@ -0,0 +1,79 @@
import { useLanguage } from "../contexts/LanguageContext";
import { Reveal } from "../components/Reveal";
import { Card, CardContent } from "@/components/ui/card";
import { Check, Sprout, Users } from "lucide-react";
export default function Baraem() {
const { t } = useLanguage();
return (
<div className="container mx-auto px-4 py-10">
{/* Intro green panel */}
<Reveal>
<section className="rounded-2xl bg-primary text-primary-foreground p-8 md:p-12 mb-10">
<h1 className="text-2xl md:text-3xl font-bold mb-5">{t.baraem.introTitle}</h1>
<p className="leading-loose text-primary-foreground/90 max-w-4xl">
{t.baraem.intro}
</p>
</section>
</Reveal>
{/* What Buds offers */}
<Reveal>
<h2 className="text-xl font-bold text-foreground mb-6">{t.baraem.featuresTitle}</h2>
</Reveal>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12">
{t.baraem.features.map((f, i) => (
<Reveal key={i} delay={(i % 2) * 0.08} className="h-full">
<Card className="h-full">
<CardContent className="p-6 flex items-start gap-4">
<div className="w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0">
<Sprout className="w-5 h-5" />
</div>
<div>
<h3 className="text-base font-bold text-foreground mb-1">{f.name}</h3>
<p className="text-sm text-muted-foreground leading-relaxed">{f.desc}</p>
</div>
</CardContent>
</Card>
</Reveal>
))}
</div>
{/* Goals */}
<Reveal>
<div className="rounded-2xl bg-muted/40 border border-border p-8 mb-12">
<h3 className="text-lg font-bold text-primary mb-4">{t.baraem.goalsTitle}</h3>
<ul className="grid grid-cols-1 md:grid-cols-2 gap-3">
{t.baraem.goals.map((item, i) => (
<li key={i} className="flex items-start gap-3">
<Check className="w-5 h-5 text-primary shrink-0 mt-0.5" />
<span className="text-foreground/90 leading-relaxed">{item}</span>
</li>
))}
</ul>
</div>
</Reveal>
{/* Audience */}
<Reveal>
<h2 className="text-xl font-bold text-foreground mb-6">{t.baraem.audienceTitle}</h2>
</Reveal>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
{t.baraem.audience.map((a, i) => (
<Reveal key={i} delay={(i % 3) * 0.08} className="h-full">
<Card className="h-full">
<CardContent className="p-6">
<div className="w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center mb-4">
<Users className="w-5 h-5" />
</div>
<h3 className="text-base font-bold text-foreground mb-1">{a.name}</h3>
<p className="text-sm text-muted-foreground leading-relaxed">{a.desc}</p>
</CardContent>
</Card>
</Reveal>
))}
</div>
</div>
);
}
+72
View File
@@ -0,0 +1,72 @@
import { useLanguage } from "../contexts/LanguageContext";
import { Reveal } from "../components/Reveal";
import { Card, CardContent } from "@/components/ui/card";
import { Check, Landmark } from "lucide-react";
export default function Waqf() {
const { t } = useLanguage();
return (
<div className="container mx-auto px-4 py-10">
{/* Intro green panel */}
<Reveal>
<section className="rounded-2xl bg-primary text-primary-foreground p-8 md:p-12 mb-10">
<h1 className="text-2xl md:text-3xl font-bold mb-5">{t.waqf.introTitle}</h1>
<p className="leading-loose text-primary-foreground/90 max-w-4xl">
{t.waqf.intro}
</p>
</section>
</Reveal>
{/* Ways to contribute */}
<Reveal>
<h2 className="text-xl font-bold text-foreground mb-6">{t.waqf.waysTitle}</h2>
</Reveal>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12">
{t.waqf.ways.map((w, i) => (
<Reveal key={i} delay={(i % 2) * 0.08} className="h-full">
<Card className="h-full">
<CardContent className="p-6 flex items-start gap-4">
<div className="w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0">
<Landmark className="w-5 h-5" />
</div>
<div>
<h3 className="text-base font-bold text-foreground mb-1">{w.name}</h3>
<p className="text-sm text-muted-foreground leading-relaxed">{w.desc}</p>
</div>
</CardContent>
</Card>
</Reveal>
))}
</div>
{/* Fields + features */}
<Reveal>
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12">
<div>
<h3 className="text-lg font-bold text-primary mb-4">{t.waqf.fieldsTitle}</h3>
<ul className="space-y-3">
{t.waqf.fields.map((item, i) => (
<li key={i} className="flex items-start gap-3">
<Check className="w-5 h-5 text-primary shrink-0 mt-0.5" />
<span className="text-foreground/90 leading-relaxed">{item}</span>
</li>
))}
</ul>
</div>
<div>
<h3 className="text-lg font-bold text-primary mb-4">{t.waqf.featuresTitle}</h3>
<div className="space-y-4">
{t.waqf.features.map((f, i) => (
<div key={i}>
<h4 className="text-base font-bold text-foreground mb-1">{f.name}</h4>
<p className="text-sm text-muted-foreground leading-relaxed">{f.desc}</p>
</div>
))}
</div>
</div>
</div>
</Reveal>
</div>
);
}