feat: sb verses extracted
This commit is contained in:
+21
-20
@@ -1,6 +1,8 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import Link from "next/link";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { PageHeader } from "@/components/page-header";
|
||||
|
||||
function formatTitle(filename: string) {
|
||||
return filename
|
||||
@@ -32,35 +34,34 @@ export default function Home() {
|
||||
fileList.sort((a, b) => a.title.localeCompare(b.title));
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-zinc-50 dark:bg-zinc-950">
|
||||
<header className="border-b border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-6 py-8">
|
||||
<div className="max-w-3xl mx-auto">
|
||||
<h1 className="text-2xl font-bold text-zinc-900 dark:text-zinc-100">
|
||||
RTF Document Viewer
|
||||
</h1>
|
||||
<p className="mt-1 text-zinc-500 dark:text-zinc-400">
|
||||
{files.length} documents available
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
<div className="min-h-screen bg-background">
|
||||
<PageHeader>
|
||||
<h1 className="text-2xl font-bold text-foreground">
|
||||
RTF Document Viewer
|
||||
</h1>
|
||||
<p className="mt-1 text-muted-foreground">
|
||||
{files.length} documents available
|
||||
</p>
|
||||
</PageHeader>
|
||||
<main className="max-w-3xl mx-auto px-6 py-8">
|
||||
<ul className="divide-y divide-zinc-200 dark:divide-zinc-800 bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 overflow-hidden">
|
||||
{fileList.map((file) => (
|
||||
<li key={file.slug}>
|
||||
<Card className="py-0">
|
||||
<CardContent className="p-0 divide-y divide-border">
|
||||
{fileList.map((file) => (
|
||||
<Link
|
||||
key={file.slug}
|
||||
href={`/view/${file.slug}`}
|
||||
className="flex items-center justify-between px-5 py-4 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors"
|
||||
className="flex items-center justify-between px-5 py-4 hover:bg-muted transition-colors first:rounded-t-xl last:rounded-b-xl"
|
||||
>
|
||||
<span className="font-medium text-zinc-900 dark:text-zinc-100">
|
||||
<span className="font-medium text-foreground">
|
||||
{file.title}
|
||||
</span>
|
||||
<span className="text-sm text-zinc-400 dark:text-zinc-500 shrink-0 ml-4">
|
||||
<span className="text-sm text-muted-foreground shrink-0 ml-4">
|
||||
{formatSize(file.size)}
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
))}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user