feat: add search in page for books, magazines and other docs
This commit is contained in:
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function BbdChapterPage({
|
|||||||
>
|
>
|
||||||
← Beyond Birth and Death
|
← Beyond Birth and Death
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function BbdChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
||||||
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
||||||
@@ -101,9 +102,12 @@ export default async function VersePage({
|
|||||||
>
|
>
|
||||||
← Bhagavad-gītā
|
← Bhagavad-gītā
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {title}
|
Chapter {chapter}: {title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
@@ -69,12 +70,15 @@ export default async function BkChapterPage({
|
|||||||
>
|
>
|
||||||
← Bhagavāner Kathā
|
← Bhagavāner Kathā
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -92,7 +96,7 @@ export default async function BkChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import fs from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import {
|
import {
|
||||||
getBookMeta,
|
getBookMeta,
|
||||||
@@ -187,9 +188,12 @@ export default async function VersePage({
|
|||||||
>
|
>
|
||||||
← Śrī Brahma-saṁhitā
|
← Śrī Brahma-saṁhitā
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {title}
|
Chapter {chapter}: {title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { buildOgMeta } from "@/lib/og";
|
|||||||
import { BOOK_NAMES } from "@/lib/constants";
|
import { BOOK_NAMES } from "@/lib/constants";
|
||||||
import { Card, CardContent } from "@/components/ui/card";
|
import { Card, CardContent } from "@/components/ui/card";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
@@ -59,13 +60,16 @@ export default async function BsChapterPage({
|
|||||||
>
|
>
|
||||||
← Śrī Brahma-saṁhitā
|
← Śrī Brahma-saṁhitā
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{segment.title}
|
{segment.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<main className="max-w-5xl mx-auto px-6 py-8">
|
<main className="max-w-5xl mx-auto px-6 py-8">
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{segment.paragraphs.map((paragraph: string, i: number) => (
|
{segment.paragraphs.map((paragraph: string, i: number) => (
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
@@ -69,12 +70,15 @@ export default async function CbhcChapterPage({
|
|||||||
>
|
>
|
||||||
← Śrī Caitanya-bhāgavata Commentary
|
← Śrī Caitanya-bhāgavata Commentary
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -92,7 +96,7 @@ export default async function CbhcChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export const dynamic = "force-dynamic";
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
||||||
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
||||||
@@ -111,9 +112,12 @@ export default async function CcVersePage({
|
|||||||
>
|
>
|
||||||
← {lilaInfo.name}
|
← {lilaInfo.name}
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {chapterInfo.title}
|
Chapter {chapter}: {chapterInfo.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -440,7 +440,8 @@ export function ChapterViewer({
|
|||||||
mobileNavBookTitle={mobileNavBookTitle}
|
mobileNavBookTitle={mobileNavBookTitle}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Verse content */}
|
{/* Verse content — id targeted by each page header's FindInPage. */}
|
||||||
|
<div id="book-content">
|
||||||
{loading && !currentVerse ? (
|
{loading && !currentVerse ? (
|
||||||
<div className="flex items-center justify-center py-24 text-muted-foreground gap-2">
|
<div className="flex items-center justify-center py-24 text-muted-foreground gap-2">
|
||||||
<Loader2 className="size-5 animate-spin" />
|
<Loader2 className="size-5 animate-spin" />
|
||||||
@@ -453,6 +454,7 @@ export function ChapterViewer({
|
|||||||
Verse not found.
|
Verse not found.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Bottom navigation */}
|
{/* Bottom navigation */}
|
||||||
<VerseNav
|
<VerseNav
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -83,12 +84,15 @@ export default async function DsChapterPage({
|
|||||||
>
|
>
|
||||||
← Dialectic Spiritualism
|
← Dialectic Spiritualism
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{parentChapterNum != null && (
|
{parentChapterNum != null && (
|
||||||
<span className="text-primary">Chapter {parentChapterNum}: </span>
|
<span className="text-primary">Chapter {parentChapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -106,7 +110,7 @@ export default async function DsChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function EjChapterPage({
|
|||||||
>
|
>
|
||||||
← Easy Journey to Other Planets
|
← Easy Journey to Other Planets
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function EjChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function EkChapterPage({
|
|||||||
>
|
>
|
||||||
← Elevation to Kṛṣṇa Consciousness
|
← Elevation to Kṛṣṇa Consciousness
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function EkChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
@@ -73,12 +74,15 @@ export default async function GgChapterPage({
|
|||||||
>
|
>
|
||||||
← Gītār Gān
|
← Gītār Gān
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -96,7 +100,7 @@ export default async function GgChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function HkhChapterPage({
|
|||||||
>
|
>
|
||||||
← The Kṛṣṇa Consciousness Handbook
|
← The Kṛṣṇa Consciousness Handbook
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function HkhChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Type guards
|
// Type guards
|
||||||
@@ -109,7 +110,8 @@ export default async function IsoMantraPage({
|
|||||||
>
|
>
|
||||||
← Śrī Īśopaniṣad
|
← Śrī Īśopaniṣad
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{verse && (
|
{verse && (
|
||||||
<>
|
<>
|
||||||
<span className="text-primary">{verse.reference}: </span>
|
<span className="text-primary">{verse.reference}: </span>
|
||||||
@@ -118,6 +120,8 @@ export default async function IsoMantraPage({
|
|||||||
)}
|
)}
|
||||||
{intro && intro.title}
|
{intro && intro.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -157,7 +161,7 @@ export default async function IsoMantraPage({
|
|||||||
|
|
||||||
function VerseContent({ verse }: { verse: IsoVerse }) {
|
function VerseContent({ verse }: { verse: IsoVerse }) {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8 space-y-8">
|
<CardContent className="py-8 px-6 sm:px-8 space-y-8">
|
||||||
{/* Devanagari */}
|
{/* Devanagari */}
|
||||||
<section>
|
<section>
|
||||||
@@ -233,7 +237,7 @@ function VerseContent({ verse }: { verse: IsoVerse }) {
|
|||||||
|
|
||||||
function IntroContent({ intro }: { intro: IsoIntroSegment }) {
|
function IntroContent({ intro }: { intro: IsoIntroSegment }) {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{intro.paragraphs.map((paragraph, i) => (
|
{intro.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
params,
|
params,
|
||||||
@@ -72,12 +73,15 @@ export default async function KbChapterPage({
|
|||||||
>
|
>
|
||||||
← Volume {vol}
|
← Volume {vol}
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterLabel && (
|
{chapterLabel && (
|
||||||
<span className="text-primary">{chapterLabel}: </span>
|
<span className="text-primary">{chapterLabel}: </span>
|
||||||
)}
|
)}
|
||||||
{chapter.title}
|
{chapter.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function KbChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Chapter content */}
|
{/* Chapter content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{chapter.paragraphs.map((paragraph, i) => (
|
{chapter.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function LclChapterPage({
|
|||||||
>
|
>
|
||||||
← Life Comes from Life
|
← Life Comes from Life
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function LclChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
params,
|
params,
|
||||||
@@ -73,12 +74,15 @@ export default async function LobChapterPage({
|
|||||||
>
|
>
|
||||||
← Light of the Bhāgavata
|
← Light of the Bhāgavata
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Text {chapterNum}: </span>
|
<span className="text-primary">Text {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -96,7 +100,7 @@ export default async function LobChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) =>
|
{content.paragraphs.map((paragraph, i) =>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
params,
|
params,
|
||||||
@@ -73,12 +74,15 @@ export default async function MgChapterPage({
|
|||||||
>
|
>
|
||||||
← Kṛṣṇa Consciousness: The Matchless Gift
|
← Kṛṣṇa Consciousness: The Matchless Gift
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -96,7 +100,7 @@ export default async function MgChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import fs from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import {
|
import {
|
||||||
getBookMeta,
|
getBookMeta,
|
||||||
@@ -187,9 +188,12 @@ export default async function VersePage({
|
|||||||
>
|
>
|
||||||
← Mukunda-mālā-stotra
|
← Mukunda-mālā-stotra
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {title}
|
Chapter {chapter}: {title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { buildOgMeta } from "@/lib/og";
|
|||||||
import { BOOK_NAMES } from "@/lib/constants";
|
import { BOOK_NAMES } from "@/lib/constants";
|
||||||
import { Card, CardContent } from "@/components/ui/card";
|
import { Card, CardContent } from "@/components/ui/card";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
@@ -59,13 +60,16 @@ export default async function MmChapterPage({
|
|||||||
>
|
>
|
||||||
← Mukunda-mālā-stotra
|
← Mukunda-mālā-stotra
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{segment.title}
|
{segment.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<main className="max-w-5xl mx-auto px-6 py-8">
|
<main className="max-w-5xl mx-auto px-6 py-8">
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{segment.paragraphs.map((paragraph: string, i: number) => (
|
{segment.paragraphs.map((paragraph: string, i: number) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function MogChapterPage({
|
|||||||
>
|
>
|
||||||
← Message of Godhead
|
← Message of Godhead
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function MogChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import fs from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import {
|
import {
|
||||||
getBookMeta,
|
getBookMeta,
|
||||||
@@ -192,9 +193,12 @@ export default async function VersePage({
|
|||||||
>
|
>
|
||||||
← Nārada-bhakti-sūtra
|
← Nārada-bhakti-sūtra
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {title}
|
Chapter {chapter}: {title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { buildOgMeta } from "@/lib/og";
|
|||||||
import { BOOK_NAMES } from "@/lib/constants";
|
import { BOOK_NAMES } from "@/lib/constants";
|
||||||
import { Card, CardContent } from "@/components/ui/card";
|
import { Card, CardContent } from "@/components/ui/card";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
@@ -62,13 +63,16 @@ export default async function NbsChapterPage({
|
|||||||
>
|
>
|
||||||
← Nārada-bhakti-sūtra
|
← Nārada-bhakti-sūtra
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{segment.title}
|
{segment.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<main className="max-w-5xl mx-auto px-6 py-8">
|
<main className="max-w-5xl mx-auto px-6 py-8">
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{segment.paragraphs.map((paragraph: string, i: number) => (
|
{segment.paragraphs.map((paragraph: string, i: number) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function NodChapterPage({
|
|||||||
>
|
>
|
||||||
← The Nectar of Devotion
|
← The Nectar of Devotion
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function NodChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Type guards
|
// Type guards
|
||||||
@@ -100,7 +101,8 @@ export default async function NoiTextPage({
|
|||||||
>
|
>
|
||||||
← The Nectar of Instruction
|
← The Nectar of Instruction
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{verse && (
|
{verse && (
|
||||||
<>
|
<>
|
||||||
<span className="text-primary">Text {verse.text}: </span>
|
<span className="text-primary">Text {verse.text}: </span>
|
||||||
@@ -109,6 +111,8 @@ export default async function NoiTextPage({
|
|||||||
)}
|
)}
|
||||||
{intro && intro.title}
|
{intro && intro.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -148,7 +152,7 @@ export default async function NoiTextPage({
|
|||||||
|
|
||||||
function VerseContent({ verse }: { verse: NoiVerse }) {
|
function VerseContent({ verse }: { verse: NoiVerse }) {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8 space-y-8">
|
<CardContent className="py-8 px-6 sm:px-8 space-y-8">
|
||||||
{/* Devanagari */}
|
{/* Devanagari */}
|
||||||
<section>
|
<section>
|
||||||
@@ -224,7 +228,7 @@ function VerseContent({ verse }: { verse: NoiVerse }) {
|
|||||||
|
|
||||||
function IntroContent({ intro }: { intro: NoiIntroSegment }) {
|
function IntroContent({ intro }: { intro: NoiIntroSegment }) {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{intro.paragraphs.map((paragraph, i) => (
|
{intro.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function OchkmChapterPage({
|
|||||||
>
|
>
|
||||||
← On Chanting the Hare Kṛṣṇa Mantra
|
← On Chanting the Hare Kṛṣṇa Mantra
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function OchkmChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function OwkChapterPage({
|
|||||||
>
|
>
|
||||||
← On the Way to Kṛṣṇa
|
← On the Way to Kṛṣṇa
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function OwkChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -72,12 +73,15 @@ export default async function PkChapterPage({
|
|||||||
>
|
>
|
||||||
← Prayers of King Kulaśekhara
|
← Prayers of King Kulaśekhara
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Verse {chapterNum}: </span>
|
<span className="text-primary">Verse {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -95,7 +99,7 @@ export default async function PkChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function PoyChapterPage({
|
|||||||
>
|
>
|
||||||
← The Perfection of Yoga
|
← The Perfection of Yoga
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function PoyChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function PqpaChapterPage({
|
|||||||
>
|
>
|
||||||
← Perfect Questions Perfect Answers
|
← Perfect Questions Perfect Answers
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function PqpaChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function RvChapterPage({
|
|||||||
>
|
>
|
||||||
← Rāja-vidyā: The King of Knowledge
|
← Rāja-vidyā: The King of Knowledge
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function RvChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export const dynamic = "force-dynamic";
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
||||||
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
||||||
@@ -107,9 +108,12 @@ export default async function SbVersePage({
|
|||||||
>
|
>
|
||||||
← Canto {cantoInfo.number}: {cantoInfo.title}
|
← Canto {cantoInfo.number}: {cantoInfo.title}
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {chapterInfo.title}
|
Chapter {chapter}: {chapterInfo.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { PageHeader } from "@/components/layout/page-header";
|
import { PageHeader } from "@/components/layout/page-header";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
|
||||||
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
|
||||||
@@ -104,9 +105,12 @@ export default async function VersePage({
|
|||||||
>
|
>
|
||||||
← Śrīmad-Bhāgavatam (1962)
|
← Śrīmad-Bhāgavatam (1962)
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-2 text-2xl font-bold text-foreground">
|
<div className="mt-2 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
Chapter {chapter}: {title}
|
Chapter {chapter}: {title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -83,12 +84,15 @@ export default async function SsrChapterPage({
|
|||||||
>
|
>
|
||||||
← The Science of Self-Realization
|
← The Science of Self-Realization
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{parentChapterNum != null && (
|
{parentChapterNum != null && (
|
||||||
<span className="text-primary">Chapter {parentChapterNum}: </span>
|
<span className="text-primary">Chapter {parentChapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -106,7 +110,7 @@ export default async function SsrChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -84,12 +85,15 @@ export default async function SvaChapterPage({
|
|||||||
>
|
>
|
||||||
← Songs of the Vaiṣṇava Ācāryas
|
← Songs of the Vaiṣṇava Ācāryas
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{parentChapterNum != null && (
|
{parentChapterNum != null && (
|
||||||
<span className="text-primary">Part {parentChapterNum}: </span>
|
<span className="text-primary">Part {parentChapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -107,7 +111,7 @@ export default async function SvaChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function TlcChapterPage({
|
|||||||
>
|
>
|
||||||
← Teachings of Lord Caitanya
|
← Teachings of Lord Caitanya
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function TlcChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function TlkChapterPage({
|
|||||||
>
|
>
|
||||||
← Teachings of Lord Kapila
|
← Teachings of Lord Kapila
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function TlkChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function TqkChapterPage({
|
|||||||
>
|
>
|
||||||
← Teachings of Queen Kuntī
|
← Teachings of Queen Kuntī
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function TqkChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -77,12 +78,15 @@ export default async function TtpChapterPage({
|
|||||||
>
|
>
|
||||||
← Transcendental Teachings of Prahlāda Mahārāja
|
← Transcendental Teachings of Prahlāda Mahārāja
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{chapterNum != null && (
|
{chapterNum != null && (
|
||||||
<span className="text-primary">Chapter {chapterNum}: </span>
|
<span className="text-primary">Chapter {chapterNum}: </span>
|
||||||
)}
|
)}
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -100,7 +104,7 @@ export default async function TtpChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -69,9 +70,12 @@ export default async function VaChapterPage({
|
|||||||
>
|
>
|
||||||
← Vaiśiṣṭyāṣṭakam
|
← Vaiśiṣṭyāṣṭakam
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -85,7 +89,7 @@ export default async function VaChapterPage({
|
|||||||
currentSlug={slug}
|
currentSlug={slug}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
params,
|
params,
|
||||||
@@ -78,9 +79,12 @@ export default async function MagazineIssuePage({
|
|||||||
>
|
>
|
||||||
← {meta.title}
|
← {meta.title}
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -101,7 +105,7 @@ export default async function MagazineIssuePage({
|
|||||||
showMobileNav
|
showMobileNav
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button";
|
|||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav";
|
||||||
|
import { FindInPage } from "@/components/layout/find-in-page";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Metadata
|
// Metadata
|
||||||
@@ -85,10 +86,13 @@ export default async function OtherDocumentChapterPage({
|
|||||||
>
|
>
|
||||||
← {meta.title}
|
← {meta.title}
|
||||||
</Link>
|
</Link>
|
||||||
<h1 className="mt-3 text-2xl font-bold text-foreground">
|
<div className="mt-3 flex items-start justify-between gap-3">
|
||||||
|
<h1 className="text-2xl font-bold text-foreground">
|
||||||
<span className="text-primary">Chapter {content.chapter}: </span>
|
<span className="text-primary">Chapter {content.chapter}: </span>
|
||||||
{content.title}
|
{content.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
<FindInPage targetId="book-content" className="shrink-0 mt-0.5" />
|
||||||
|
</div>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
<div className="max-w-5xl mx-auto flex">
|
<div className="max-w-5xl mx-auto flex">
|
||||||
@@ -112,7 +116,7 @@ export default async function OtherDocumentChapterPage({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<Card>
|
<Card id="book-content">
|
||||||
<CardContent className="py-8 px-6 sm:px-8">
|
<CardContent className="py-8 px-6 sm:px-8">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{content.paragraphs.map((paragraph, i) => (
|
{content.paragraphs.map((paragraph, i) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user