feat: add search in page for books, magazines and other docs

This commit is contained in:
gosangam
2026-06-14 02:59:42 +05:30
parent 23d06a3db5
commit 7c3cf656b5
42 changed files with 417 additions and 251 deletions
+6 -2
View File
@@ -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({
> >
&larr; Bhagavad-gītā &larr; 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">
+6 -2
View File
@@ -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({
> >
&larr; Bhagavāner Kathā &larr; 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({
> >
&larr; Śrī Brahma-saṁhitā &larr; Ś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">
+6 -2
View File
@@ -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({
> >
&larr; Śrī Brahma-saṁhitā &larr; Ś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) => (
+6 -2
View File
@@ -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({
> >
&larr; Śrī Caitanya-bhāgavata Commentary &larr; Ś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({
> >
&larr; {lilaInfo.name} &larr; {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">
+3 -1
View File
@@ -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
+6 -2
View File
@@ -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({
> >
&larr; Dialectic Spiritualism &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Easy Journey to Other Planets &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Elevation to Kṛṣṇa Consciousness &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Gītār Gān &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; The Kṛṣṇa Consciousness Handbook &larr; 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) => (
+7 -3
View File
@@ -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({
> >
&larr; Śrī Īśopaniṣad &larr; Ś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) => (
+6 -2
View File
@@ -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({
> >
&larr; Volume {vol} &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Life Comes from Life &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Light of the Bh&#257;gavata &larr; Light of the Bh&#257;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) =>
+6 -2
View File
@@ -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({
> >
&larr; Kṛṣṇa Consciousness: The Matchless Gift &larr; 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({
> >
&larr; Mukunda-mālā-stotra &larr; 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">
+6 -2
View File
@@ -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({
> >
&larr; Mukunda-mālā-stotra &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Message of Godhead &larr; 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({
> >
&larr; Nārada-bhakti-sūtra &larr; 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">
+6 -2
View File
@@ -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({
> >
&larr; Nārada-bhakti-sūtra &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; The Nectar of Devotion &larr; 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) => (
+7 -3
View File
@@ -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({
> >
&larr; The Nectar of Instruction &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; On Chanting the Hare Kṛṣṇa Mantra &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; On the Way to Kṛṣṇa &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Prayers of King Kulaśekhara &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; The Perfection of Yoga &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Perfect Questions Perfect Answers &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Rāja-vidyā: The King of Knowledge &larr; 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({
> >
&larr; Canto {cantoInfo.number}: {cantoInfo.title} &larr; 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({
> >
&larr; Śrīmad-Bhāgavatam (1962) &larr; Ś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">
+6 -2
View File
@@ -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({
> >
&larr; The Science of Self-Realization &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Songs of the Vaiṣṇava Ācāryas &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Teachings of Lord Caitanya &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Teachings of Lord Kapila &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Teachings of Queen Kuntī &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Transcendental Teachings of Prahlāda Mahārāja &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; Vaiśiṣṭyāṣṭakam &larr; 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) => (
+6 -2
View File
@@ -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({
> >
&larr; {meta.title} &larr; {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({
> >
&larr; {meta.title} &larr; {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) => (