|
1 | 1 | import Link from "next/link"; |
| 2 | +import { Badge, Card, PageHeader, ProgressBar } from "@/components/ui"; |
2 | 3 | import { BRAND_NAME } from "@/lib/branding"; |
3 | 4 | import { curriculum } from "@/lib/curriculum"; |
4 | 5 |
|
| 6 | +const quickActions = [ |
| 7 | + { href: "/lesson/lesson-1", title: "Start eerste les", desc: "Begin stap voor stap met basiszinnen." }, |
| 8 | + { href: "/review", title: "Review sessie", desc: "Herhaal woorden die je bijna vergeet." }, |
| 9 | + { href: "/practice", title: "Vrij oefenen", desc: "Train op snelheid en begrip." }, |
| 10 | + { href: "/vocab", title: "Bekijk vocab", desc: "Zoek en markeer nieuwe woorden." }, |
| 11 | +]; |
| 12 | + |
5 | 13 | export default function Home() { |
| 14 | + const progress = 22; |
| 15 | + |
6 | 16 | return ( |
7 | | - <main className="p-8 max-w-5xl mx-auto space-y-6"> |
8 | | - <h1 className="text-4xl font-bold">{BRAND_NAME} — Learn Spanish</h1> |
9 | | - <p className="text-gray-600">Open-source Spanish training with production-focused reliability.</p> |
| 17 | + <div className="space-y-6"> |
| 18 | + <PageHeader |
| 19 | + title={`Welkom bij ${BRAND_NAME}`} |
| 20 | + subtitle="Een minimal leeromgeving voor beginners: duidelijk, rustig en direct bruikbaar." |
| 21 | + action={<Badge tone="success">Streak 4 dagen</Badge>} |
| 22 | + /> |
10 | 23 |
|
11 | | - <div className="grid grid-cols-2 gap-4"> |
12 | | - <Link className="rounded bg-blue-600 text-white p-4" href="/lesson/lesson-1"> |
13 | | - Start Lesson |
14 | | - </Link> |
15 | | - <Link className="rounded bg-emerald-600 text-white p-4" href="/vocab"> |
16 | | - Vocabulary Browser |
17 | | - </Link> |
18 | | - <Link className="rounded bg-purple-600 text-white p-4" href="/admin"> |
19 | | - Admin Panel |
20 | | - </Link> |
21 | | - </div> |
| 24 | + <div className="grid gap-4 md:grid-cols-3"> |
| 25 | + <Card className="md:col-span-2"> |
| 26 | + <p className="text-sm text-slate-500">Je voortgang</p> |
| 27 | + <p className="mt-1 text-2xl font-semibold">A1 · Unit 1</p> |
| 28 | + <p className="mt-2 text-sm text-slate-600">Je bent goed bezig. Rond nog 3 oefeningen af om Unit 1 te voltooien.</p> |
| 29 | + <div className="mt-4"> |
| 30 | + <ProgressBar value={progress} /> |
| 31 | + <p className="mt-2 text-xs text-slate-500">{progress}% van je weekdoel</p> |
| 32 | + </div> |
| 33 | + <Link href="/lesson/lesson-1" className="mt-4 inline-flex rounded-xl bg-sky-600 px-4 py-2 text-sm font-medium text-white hover:bg-sky-700"> |
| 34 | + Doorgaan met les |
| 35 | + </Link> |
| 36 | + </Card> |
22 | 37 |
|
23 | | - <div className="rounded border p-4"> |
24 | | - <h2 className="font-semibold">Curriculum Stats</h2> |
25 | | - <p> |
26 | | - {curriculum.meta.lessons} lessons · {curriculum.meta.sentences} sentences · {curriculum.meta.exerciseTypes.length} exercise |
27 | | - types |
28 | | - </p> |
| 38 | + <Card> |
| 39 | + <p className="text-sm text-slate-500">Curriculum</p> |
| 40 | + <ul className="mt-3 space-y-2 text-sm text-slate-700"> |
| 41 | + <li>{curriculum.meta.lessons} lessen</li> |
| 42 | + <li>{curriculum.meta.sentences} voorbeeldzinnen</li> |
| 43 | + <li>{curriculum.meta.exerciseTypes.length} oefenvormen</li> |
| 44 | + </ul> |
| 45 | + </Card> |
29 | 46 | </div> |
30 | | - </main> |
| 47 | + |
| 48 | + <section className="grid gap-3 md:grid-cols-2"> |
| 49 | + {quickActions.map((item) => ( |
| 50 | + <Link key={item.href} href={item.href} className="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm transition hover:border-sky-300 hover:shadow"> |
| 51 | + <p className="font-semibold text-slate-900">{item.title}</p> |
| 52 | + <p className="mt-1 text-sm text-slate-600">{item.desc}</p> |
| 53 | + </Link> |
| 54 | + ))} |
| 55 | + </section> |
| 56 | + </div> |
31 | 57 | ); |
32 | 58 | } |
0 commit comments