feat: sb verses extracted
This commit is contained in:
+47
-41
@@ -1,6 +1,16 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import Link from "next/link";
|
||||
import { PageHeader } from "@/components/page-header";
|
||||
import {
|
||||
Card,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
CardDescription,
|
||||
CardContent,
|
||||
} from "@/components/ui/card";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { ExtractedVerseCount } from "./extracted-verse-count";
|
||||
|
||||
type BookInfo = {
|
||||
@@ -68,51 +78,47 @@ export default function BooksPage() {
|
||||
const books = loadBooks();
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-amber-50 dark:bg-zinc-950">
|
||||
<header className="border-b border-amber-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-6 py-8">
|
||||
<div className="max-w-3xl mx-auto">
|
||||
<Link
|
||||
href="/"
|
||||
className="text-sm text-amber-600 hover:text-amber-800 dark:text-zinc-400 dark:hover:text-zinc-100"
|
||||
>
|
||||
← Home
|
||||
</Link>
|
||||
<h1 className="mt-3 text-3xl font-bold text-zinc-900 dark:text-zinc-100">
|
||||
Books
|
||||
</h1>
|
||||
<p className="mt-1 text-zinc-500 dark:text-zinc-400">
|
||||
Structured verse-by-verse editions with Devanagari, transliteration,
|
||||
synonyms, translation & purports
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
<div className="min-h-screen bg-background">
|
||||
<PageHeader>
|
||||
<Link
|
||||
href="/"
|
||||
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
← Home
|
||||
</Link>
|
||||
<h1 className="mt-3 text-3xl font-bold text-foreground">Books</h1>
|
||||
<p className="mt-1 text-muted-foreground">
|
||||
Structured verse-by-verse editions with Devanagari, transliteration,
|
||||
synonyms, translation & purports
|
||||
</p>
|
||||
</PageHeader>
|
||||
|
||||
<main className="max-w-3xl mx-auto px-6 py-8">
|
||||
<div className="grid gap-4">
|
||||
{books.map((book) => (
|
||||
<Link
|
||||
key={book.slug}
|
||||
href={book.href}
|
||||
className="block bg-white dark:bg-zinc-900 rounded-lg border border-amber-200 dark:border-zinc-800 overflow-hidden hover:border-amber-400 dark:hover:border-zinc-600 hover:shadow-md transition-all"
|
||||
>
|
||||
<div className="px-6 py-5">
|
||||
<h2 className="text-xl font-bold text-zinc-900 dark:text-zinc-100">
|
||||
{book.title}
|
||||
</h2>
|
||||
<p className="mt-1 text-sm text-zinc-500 dark:text-zinc-400">
|
||||
{book.author}
|
||||
</p>
|
||||
<div className="mt-3 flex items-center gap-3 text-sm">
|
||||
<span className="inline-flex items-center rounded-full bg-amber-100 dark:bg-zinc-800 px-3 py-0.5 text-amber-700 dark:text-amber-400 font-medium">
|
||||
{book.description}
|
||||
</span>
|
||||
<ExtractedVerseCount
|
||||
count={book.totalVerses}
|
||||
label="extracted verses"
|
||||
className="text-zinc-400 dark:text-zinc-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Link key={book.slug} href={book.href} className="block">
|
||||
<Card
|
||||
className={cn(
|
||||
"transition-all hover:shadow-md hover:ring-foreground/20",
|
||||
)}
|
||||
>
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl font-bold">
|
||||
{book.title}
|
||||
</CardTitle>
|
||||
<CardDescription>{book.author}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="flex items-center gap-3 text-sm">
|
||||
<Badge variant="secondary">{book.description}</Badge>
|
||||
<ExtractedVerseCount
|
||||
count={book.totalVerses}
|
||||
label="extracted verses"
|
||||
className="text-muted-foreground"
|
||||
/>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user