From 7c3cf656b58a3d2628ff77aba878761873e0c800 Mon Sep 17 00:00:00 2001 From: gosangam Date: Sun, 14 Jun 2026 02:59:42 +0530 Subject: [PATCH] feat: add search in page for books, magazines and other docs --- app/(app)/books/bbd/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/bg/[chapter]/[verse]/page.tsx | 10 ++++--- app/(app)/books/bk/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/bs/[chapter]/[verse]/page.tsx | 10 ++++--- app/(app)/books/bs/[chapter]/page.tsx | 12 ++++++--- app/(app)/books/cbhc/[chapter]/page.tsx | 18 ++++++++----- .../cc/[lila]/[chapter]/[verse]/page.tsx | 10 ++++--- app/(app)/books/chapter-viewer.tsx | 4 ++- app/(app)/books/ds/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/ej/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/ek/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/gg/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/hkh/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/iso/[mantra]/page.tsx | 26 +++++++++++-------- app/(app)/books/kb/[volume]/[slug]/page.tsx | 18 ++++++++----- app/(app)/books/lcl/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/lob/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/mg/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/mm/[chapter]/[verse]/page.tsx | 10 ++++--- app/(app)/books/mm/[chapter]/page.tsx | 12 ++++++--- app/(app)/books/mog/[chapter]/page.tsx | 18 ++++++++----- .../books/nbs/[chapter]/[verse]/page.tsx | 10 ++++--- app/(app)/books/nbs/[chapter]/page.tsx | 12 ++++++--- app/(app)/books/nod/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/noi/[text]/page.tsx | 26 +++++++++++-------- app/(app)/books/ochkm/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/owk/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/pk/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/poy/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/pqpa/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/rv/[chapter]/page.tsx | 18 ++++++++----- .../sb/[canto]/[chapter]/[verse]/page.tsx | 10 ++++--- .../books/sb1962/[chapter]/[verse]/page.tsx | 10 ++++--- app/(app)/books/ssr/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/sva/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/tlc/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/tlk/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/tqk/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/ttp/[chapter]/page.tsx | 18 ++++++++----- app/(app)/books/va/[chapter]/page.tsx | 12 ++++++--- app/(app)/magazines/[slug]/[issue]/page.tsx | 12 ++++++--- .../other-documents/[slug]/[chapter]/page.tsx | 14 ++++++---- 42 files changed, 417 insertions(+), 251 deletions(-) diff --git a/app/(app)/books/bbd/[chapter]/page.tsx b/app/(app)/books/bbd/[chapter]/page.tsx index 0013b31b..6aff09c3 100644 --- a/app/(app)/books/bbd/[chapter]/page.tsx +++ b/app/(app)/books/bbd/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function BbdChapterPage({ > ← Beyond Birth and Death -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function BbdChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/bg/[chapter]/[verse]/page.tsx b/app/(app)/books/bg/[chapter]/[verse]/page.tsx index 2c1b1ac6..b702cd83 100644 --- a/app/(app)/books/bg/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/bg/[chapter]/[verse]/page.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api"; import { ChapterViewer } from "@/app/(app)/books/chapter-viewer"; @@ -101,9 +102,12 @@ export default async function VersePage({ > ← Bhagavad-gītā -

- Chapter {chapter}: {title} -

+
+

+ Chapter {chapter}: {title} +

+ +
diff --git a/app/(app)/books/bk/[chapter]/page.tsx b/app/(app)/books/bk/[chapter]/page.tsx index 3534b78b..53b7762f 100644 --- a/app/(app)/books/bk/[chapter]/page.tsx +++ b/app/(app)/books/bk/[chapter]/page.tsx @@ -16,6 +16,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export const dynamic = "force-dynamic"; @@ -69,12 +70,15 @@ export default async function BkChapterPage({ > ← Bhagavāner Kathā -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -92,7 +96,7 @@ export default async function BkChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/bs/[chapter]/[verse]/page.tsx b/app/(app)/books/bs/[chapter]/[verse]/page.tsx index 69d16830..0ed53e90 100644 --- a/app/(app)/books/bs/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/bs/[chapter]/[verse]/page.tsx @@ -3,6 +3,7 @@ import fs from "fs"; import path from "path"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, @@ -187,9 +188,12 @@ export default async function VersePage({ > ← Śrī Brahma-saṁhitā -

- Chapter {chapter}: {title} -

+
+

+ Chapter {chapter}: {title} +

+ +
diff --git a/app/(app)/books/bs/[chapter]/page.tsx b/app/(app)/books/bs/[chapter]/page.tsx index 0c95d31e..3b2c2aeb 100644 --- a/app/(app)/books/bs/[chapter]/page.tsx +++ b/app/(app)/books/bs/[chapter]/page.tsx @@ -8,6 +8,7 @@ import { buildOgMeta } from "@/lib/og"; import { BOOK_NAMES } from "@/lib/constants"; import { Card, CardContent } from "@/components/ui/card"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import Link from "next/link"; import fs from "fs"; import path from "path"; @@ -59,13 +60,16 @@ export default async function BsChapterPage({ > ← Śrī Brahma-saṁhitā -

- {segment.title} -

+
+

+ {segment.title} +

+ +
- +
{segment.paragraphs.map((paragraph: string, i: number) => ( diff --git a/app/(app)/books/cbhc/[chapter]/page.tsx b/app/(app)/books/cbhc/[chapter]/page.tsx index 7f7c5f01..466a3e4e 100644 --- a/app/(app)/books/cbhc/[chapter]/page.tsx +++ b/app/(app)/books/cbhc/[chapter]/page.tsx @@ -16,6 +16,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export const dynamic = "force-dynamic"; @@ -69,12 +70,15 @@ export default async function CbhcChapterPage({ > ← Śrī Caitanya-bhāgavata Commentary -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -92,7 +96,7 @@ export default async function CbhcChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/cc/[lila]/[chapter]/[verse]/page.tsx b/app/(app)/books/cc/[lila]/[chapter]/[verse]/page.tsx index 4e333dfe..b6999bf0 100644 --- a/app/(app)/books/cc/[lila]/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/cc/[lila]/[chapter]/[verse]/page.tsx @@ -3,6 +3,7 @@ export const dynamic = "force-dynamic"; import type { Metadata } from "next"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api"; import { ChapterViewer } from "@/app/(app)/books/chapter-viewer"; @@ -111,9 +112,12 @@ export default async function CcVersePage({ > ← {lilaInfo.name} -

- Chapter {chapter}: {chapterInfo.title} -

+
+

+ Chapter {chapter}: {chapterInfo.title} +

+ +
diff --git a/app/(app)/books/chapter-viewer.tsx b/app/(app)/books/chapter-viewer.tsx index 3fd26d06..5e4855d0 100644 --- a/app/(app)/books/chapter-viewer.tsx +++ b/app/(app)/books/chapter-viewer.tsx @@ -440,7 +440,8 @@ export function ChapterViewer({ mobileNavBookTitle={mobileNavBookTitle} /> - {/* Verse content */} + {/* Verse content — id targeted by each page header's FindInPage. */} +
{loading && !currentVerse ? (
@@ -453,6 +454,7 @@ export function ChapterViewer({ Verse not found.
)} +
{/* Bottom navigation */} ← Dialectic Spiritualism -

- {parentChapterNum != null && ( - Chapter {parentChapterNum}: - )} - {content.title} -

+
+

+ {parentChapterNum != null && ( + Chapter {parentChapterNum}: + )} + {content.title} +

+ +
@@ -106,7 +110,7 @@ export default async function DsChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/ej/[chapter]/page.tsx b/app/(app)/books/ej/[chapter]/page.tsx index 26eac554..ed455a9c 100644 --- a/app/(app)/books/ej/[chapter]/page.tsx +++ b/app/(app)/books/ej/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function EjChapterPage({ > ← Easy Journey to Other Planets -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function EjChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/ek/[chapter]/page.tsx b/app/(app)/books/ek/[chapter]/page.tsx index 691da546..bfd626c6 100644 --- a/app/(app)/books/ek/[chapter]/page.tsx +++ b/app/(app)/books/ek/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function EkChapterPage({ > ← Elevation to Kṛṣṇa Consciousness -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function EkChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/gg/[chapter]/page.tsx b/app/(app)/books/gg/[chapter]/page.tsx index b93a4e41..3bfb7279 100644 --- a/app/(app)/books/gg/[chapter]/page.tsx +++ b/app/(app)/books/gg/[chapter]/page.tsx @@ -16,6 +16,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export const dynamic = "force-dynamic"; @@ -73,12 +74,15 @@ export default async function GgChapterPage({ > ← Gītār Gān -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -96,7 +100,7 @@ export default async function GgChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/hkh/[chapter]/page.tsx b/app/(app)/books/hkh/[chapter]/page.tsx index 0a69e541..307878b5 100644 --- a/app/(app)/books/hkh/[chapter]/page.tsx +++ b/app/(app)/books/hkh/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function HkhChapterPage({ > ← The Kṛṣṇa Consciousness Handbook -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function HkhChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/iso/[mantra]/page.tsx b/app/(app)/books/iso/[mantra]/page.tsx index 5a7c0b9f..5e07eea0 100644 --- a/app/(app)/books/iso/[mantra]/page.tsx +++ b/app/(app)/books/iso/[mantra]/page.tsx @@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Type guards @@ -109,15 +110,18 @@ export default async function IsoMantraPage({ > ← Śrī Īśopaniṣad -

- {verse && ( - <> - {verse.reference}: - {verse.bookTitle} - - )} - {intro && intro.title} -

+
+

+ {verse && ( + <> + {verse.reference}: + {verse.bookTitle} + + )} + {intro && intro.title} +

+ +
@@ -157,7 +161,7 @@ export default async function IsoMantraPage({ function VerseContent({ verse }: { verse: IsoVerse }) { return ( - + {/* Devanagari */}
@@ -233,7 +237,7 @@ function VerseContent({ verse }: { verse: IsoVerse }) { function IntroContent({ intro }: { intro: IsoIntroSegment }) { return ( - +
{intro.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/kb/[volume]/[slug]/page.tsx b/app/(app)/books/kb/[volume]/[slug]/page.tsx index 006c9626..65a0a988 100644 --- a/app/(app)/books/kb/[volume]/[slug]/page.tsx +++ b/app/(app)/books/kb/[volume]/[slug]/page.tsx @@ -12,6 +12,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export async function generateMetadata({ params, @@ -72,12 +73,15 @@ export default async function KbChapterPage({ > ← Volume {vol} -

- {chapterLabel && ( - {chapterLabel}: - )} - {chapter.title} -

+
+

+ {chapterLabel && ( + {chapterLabel}: + )} + {chapter.title} +

+ +
@@ -100,7 +104,7 @@ export default async function KbChapterPage({ /> {/* Chapter content */} - +
{chapter.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/lcl/[chapter]/page.tsx b/app/(app)/books/lcl/[chapter]/page.tsx index d52f20b6..a1c139b8 100644 --- a/app/(app)/books/lcl/[chapter]/page.tsx +++ b/app/(app)/books/lcl/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function LclChapterPage({ > ← Life Comes from Life -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function LclChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/lob/[chapter]/page.tsx b/app/(app)/books/lob/[chapter]/page.tsx index e08bf7c7..85924989 100644 --- a/app/(app)/books/lob/[chapter]/page.tsx +++ b/app/(app)/books/lob/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export async function generateMetadata({ params, @@ -73,12 +74,15 @@ export default async function LobChapterPage({ > ← Light of the Bhāgavata -

- {chapterNum != null && ( - Text {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Text {chapterNum}: + )} + {content.title} +

+ +
@@ -96,7 +100,7 @@ export default async function LobChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => diff --git a/app/(app)/books/mg/[chapter]/page.tsx b/app/(app)/books/mg/[chapter]/page.tsx index 4614b1f4..1348da21 100644 --- a/app/(app)/books/mg/[chapter]/page.tsx +++ b/app/(app)/books/mg/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export async function generateMetadata({ params, @@ -73,12 +74,15 @@ export default async function MgChapterPage({ > ← Kṛṣṇa Consciousness: The Matchless Gift -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -96,7 +100,7 @@ export default async function MgChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/mm/[chapter]/[verse]/page.tsx b/app/(app)/books/mm/[chapter]/[verse]/page.tsx index be246ec0..32b3eccc 100644 --- a/app/(app)/books/mm/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/mm/[chapter]/[verse]/page.tsx @@ -2,6 +2,7 @@ import fs from "fs"; import path from "path"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, @@ -187,9 +188,12 @@ export default async function VersePage({ > ← Mukunda-mālā-stotra -

- Chapter {chapter}: {title} -

+
+

+ Chapter {chapter}: {title} +

+ +
diff --git a/app/(app)/books/mm/[chapter]/page.tsx b/app/(app)/books/mm/[chapter]/page.tsx index 93862168..a8883640 100644 --- a/app/(app)/books/mm/[chapter]/page.tsx +++ b/app/(app)/books/mm/[chapter]/page.tsx @@ -8,6 +8,7 @@ import { buildOgMeta } from "@/lib/og"; import { BOOK_NAMES } from "@/lib/constants"; import { Card, CardContent } from "@/components/ui/card"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import Link from "next/link"; import fs from "fs"; import path from "path"; @@ -59,13 +60,16 @@ export default async function MmChapterPage({ > ← Mukunda-mālā-stotra -

- {segment.title} -

+
+

+ {segment.title} +

+ +
- +
{segment.paragraphs.map((paragraph: string, i: number) => ( diff --git a/app/(app)/books/mog/[chapter]/page.tsx b/app/(app)/books/mog/[chapter]/page.tsx index 336f9434..5c0a834f 100644 --- a/app/(app)/books/mog/[chapter]/page.tsx +++ b/app/(app)/books/mog/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function MogChapterPage({ > ← Message of Godhead -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function MogChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/nbs/[chapter]/[verse]/page.tsx b/app/(app)/books/nbs/[chapter]/[verse]/page.tsx index 61c46105..3d136e38 100644 --- a/app/(app)/books/nbs/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/nbs/[chapter]/[verse]/page.tsx @@ -5,6 +5,7 @@ import fs from "fs"; import path from "path"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, @@ -192,9 +193,12 @@ export default async function VersePage({ > ← Nārada-bhakti-sūtra -

- Chapter {chapter}: {title} -

+
+

+ Chapter {chapter}: {title} +

+ +
diff --git a/app/(app)/books/nbs/[chapter]/page.tsx b/app/(app)/books/nbs/[chapter]/page.tsx index eafac9ea..db0e3978 100644 --- a/app/(app)/books/nbs/[chapter]/page.tsx +++ b/app/(app)/books/nbs/[chapter]/page.tsx @@ -8,6 +8,7 @@ import { buildOgMeta } from "@/lib/og"; import { BOOK_NAMES } from "@/lib/constants"; import { Card, CardContent } from "@/components/ui/card"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import Link from "next/link"; import fs from "fs"; import path from "path"; @@ -62,13 +63,16 @@ export default async function NbsChapterPage({ > ← Nārada-bhakti-sūtra -

- {segment.title} -

+
+

+ {segment.title} +

+ +
- +
{segment.paragraphs.map((paragraph: string, i: number) => ( diff --git a/app/(app)/books/nod/[chapter]/page.tsx b/app/(app)/books/nod/[chapter]/page.tsx index c878e923..a45447f9 100644 --- a/app/(app)/books/nod/[chapter]/page.tsx +++ b/app/(app)/books/nod/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function NodChapterPage({ > ← The Nectar of Devotion -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function NodChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/noi/[text]/page.tsx b/app/(app)/books/noi/[text]/page.tsx index b1cc157f..c3650224 100644 --- a/app/(app)/books/noi/[text]/page.tsx +++ b/app/(app)/books/noi/[text]/page.tsx @@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Type guards @@ -100,15 +101,18 @@ export default async function NoiTextPage({ > ← The Nectar of Instruction -

- {verse && ( - <> - Text {verse.text}: - {verse.title} - - )} - {intro && intro.title} -

+
+

+ {verse && ( + <> + Text {verse.text}: + {verse.title} + + )} + {intro && intro.title} +

+ +
@@ -148,7 +152,7 @@ export default async function NoiTextPage({ function VerseContent({ verse }: { verse: NoiVerse }) { return ( - + {/* Devanagari */}
@@ -224,7 +228,7 @@ function VerseContent({ verse }: { verse: NoiVerse }) { function IntroContent({ intro }: { intro: NoiIntroSegment }) { return ( - +
{intro.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/ochkm/[chapter]/page.tsx b/app/(app)/books/ochkm/[chapter]/page.tsx index 08cb78a0..9492ce10 100644 --- a/app/(app)/books/ochkm/[chapter]/page.tsx +++ b/app/(app)/books/ochkm/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function OchkmChapterPage({ > ← On Chanting the Hare Kṛṣṇa Mantra -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function OchkmChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/owk/[chapter]/page.tsx b/app/(app)/books/owk/[chapter]/page.tsx index 1d555043..0e5db06f 100644 --- a/app/(app)/books/owk/[chapter]/page.tsx +++ b/app/(app)/books/owk/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function OwkChapterPage({ > ← On the Way to Kṛṣṇa -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function OwkChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/pk/[chapter]/page.tsx b/app/(app)/books/pk/[chapter]/page.tsx index 0a3ed54b..af328db3 100644 --- a/app/(app)/books/pk/[chapter]/page.tsx +++ b/app/(app)/books/pk/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -72,12 +73,15 @@ export default async function PkChapterPage({ > ← Prayers of King Kulaśekhara -

- {chapterNum != null && ( - Verse {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Verse {chapterNum}: + )} + {content.title} +

+ +
@@ -95,7 +99,7 @@ export default async function PkChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/poy/[chapter]/page.tsx b/app/(app)/books/poy/[chapter]/page.tsx index 4849bd5e..6fce201f 100644 --- a/app/(app)/books/poy/[chapter]/page.tsx +++ b/app/(app)/books/poy/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function PoyChapterPage({ > ← The Perfection of Yoga -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function PoyChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/pqpa/[chapter]/page.tsx b/app/(app)/books/pqpa/[chapter]/page.tsx index 28f4edcb..2ffbdc6a 100644 --- a/app/(app)/books/pqpa/[chapter]/page.tsx +++ b/app/(app)/books/pqpa/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function PqpaChapterPage({ > ← Perfect Questions Perfect Answers -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function PqpaChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/rv/[chapter]/page.tsx b/app/(app)/books/rv/[chapter]/page.tsx index 6d4c6567..c2367e84 100644 --- a/app/(app)/books/rv/[chapter]/page.tsx +++ b/app/(app)/books/rv/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function RvChapterPage({ > ← Rāja-vidyā: The King of Knowledge -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function RvChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/sb/[canto]/[chapter]/[verse]/page.tsx b/app/(app)/books/sb/[canto]/[chapter]/[verse]/page.tsx index f027cc25..d7c3411a 100644 --- a/app/(app)/books/sb/[canto]/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/sb/[canto]/[chapter]/[verse]/page.tsx @@ -3,6 +3,7 @@ export const dynamic = "force-dynamic"; import type { Metadata } from "next"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api"; import { ChapterViewer } from "@/app/(app)/books/chapter-viewer"; @@ -107,9 +108,12 @@ export default async function SbVersePage({ > ← Canto {cantoInfo.number}: {cantoInfo.title} -

- Chapter {chapter}: {chapterInfo.title} -

+
+

+ Chapter {chapter}: {chapterInfo.title} +

+ +
diff --git a/app/(app)/books/sb1962/[chapter]/[verse]/page.tsx b/app/(app)/books/sb1962/[chapter]/[verse]/page.tsx index ab5f8399..aaea5cda 100644 --- a/app/(app)/books/sb1962/[chapter]/[verse]/page.tsx +++ b/app/(app)/books/sb1962/[chapter]/[verse]/page.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import Link from "next/link"; import { PageHeader } from "@/components/layout/page-header"; +import { FindInPage } from "@/components/layout/find-in-page"; import { notFound } from "next/navigation"; import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api"; import { ChapterViewer } from "@/app/(app)/books/chapter-viewer"; @@ -104,9 +105,12 @@ export default async function VersePage({ > ← Śrīmad-Bhāgavatam (1962) -

- Chapter {chapter}: {title} -

+
+

+ Chapter {chapter}: {title} +

+ +
diff --git a/app/(app)/books/ssr/[chapter]/page.tsx b/app/(app)/books/ssr/[chapter]/page.tsx index 15f353a8..1e7a22ba 100644 --- a/app/(app)/books/ssr/[chapter]/page.tsx +++ b/app/(app)/books/ssr/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -83,12 +84,15 @@ export default async function SsrChapterPage({ > ← The Science of Self-Realization -

- {parentChapterNum != null && ( - Chapter {parentChapterNum}: - )} - {content.title} -

+
+

+ {parentChapterNum != null && ( + Chapter {parentChapterNum}: + )} + {content.title} +

+ +
@@ -106,7 +110,7 @@ export default async function SsrChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/sva/[chapter]/page.tsx b/app/(app)/books/sva/[chapter]/page.tsx index a40d9657..ea85f0ae 100644 --- a/app/(app)/books/sva/[chapter]/page.tsx +++ b/app/(app)/books/sva/[chapter]/page.tsx @@ -19,6 +19,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -84,12 +85,15 @@ export default async function SvaChapterPage({ > ← Songs of the Vaiṣṇava Ācāryas -

- {parentChapterNum != null && ( - Part {parentChapterNum}: - )} - {content.title} -

+
+

+ {parentChapterNum != null && ( + Part {parentChapterNum}: + )} + {content.title} +

+ +
@@ -107,7 +111,7 @@ export default async function SvaChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/tlc/[chapter]/page.tsx b/app/(app)/books/tlc/[chapter]/page.tsx index cbd45d6d..f116b810 100644 --- a/app/(app)/books/tlc/[chapter]/page.tsx +++ b/app/(app)/books/tlc/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function TlcChapterPage({ > ← Teachings of Lord Caitanya -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function TlcChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/tlk/[chapter]/page.tsx b/app/(app)/books/tlk/[chapter]/page.tsx index dbc62140..7877cade 100644 --- a/app/(app)/books/tlk/[chapter]/page.tsx +++ b/app/(app)/books/tlk/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function TlkChapterPage({ > ← Teachings of Lord Kapila -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function TlkChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/tqk/[chapter]/page.tsx b/app/(app)/books/tqk/[chapter]/page.tsx index 8e6d8e32..1571a636 100644 --- a/app/(app)/books/tqk/[chapter]/page.tsx +++ b/app/(app)/books/tqk/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function TqkChapterPage({ > ← Teachings of Queen Kuntī -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function TqkChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/ttp/[chapter]/page.tsx b/app/(app)/books/ttp/[chapter]/page.tsx index 82b76c26..948b9b62 100644 --- a/app/(app)/books/ttp/[chapter]/page.tsx +++ b/app/(app)/books/ttp/[chapter]/page.tsx @@ -18,6 +18,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -77,12 +78,15 @@ export default async function TtpChapterPage({ > ← Transcendental Teachings of Prahlāda Mahārāja -

- {chapterNum != null && ( - Chapter {chapterNum}: - )} - {content.title} -

+
+

+ {chapterNum != null && ( + Chapter {chapterNum}: + )} + {content.title} +

+ +
@@ -100,7 +104,7 @@ export default async function TtpChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/books/va/[chapter]/page.tsx b/app/(app)/books/va/[chapter]/page.tsx index bb198271..1dbf483f 100644 --- a/app/(app)/books/va/[chapter]/page.tsx +++ b/app/(app)/books/va/[chapter]/page.tsx @@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -69,9 +70,12 @@ export default async function VaChapterPage({ > ← Vaiśiṣṭyāṣṭakam -

- {content.title} -

+
+

+ {content.title} +

+ +
@@ -85,7 +89,7 @@ export default async function VaChapterPage({ currentSlug={slug} /> - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/magazines/[slug]/[issue]/page.tsx b/app/(app)/magazines/[slug]/[issue]/page.tsx index effa2f42..3ed8b011 100644 --- a/app/(app)/magazines/[slug]/[issue]/page.tsx +++ b/app/(app)/magazines/[slug]/[issue]/page.tsx @@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; export async function generateMetadata({ params, @@ -78,9 +79,12 @@ export default async function MagazineIssuePage({ > ← {meta.title} -

- {content.title} -

+
+

+ {content.title} +

+ +
@@ -101,7 +105,7 @@ export default async function MagazineIssuePage({ showMobileNav /> - +
{content.paragraphs.map((paragraph, i) => ( diff --git a/app/(app)/other-documents/[slug]/[chapter]/page.tsx b/app/(app)/other-documents/[slug]/[chapter]/page.tsx index 949b1458..f30ae90f 100644 --- a/app/(app)/other-documents/[slug]/[chapter]/page.tsx +++ b/app/(app)/other-documents/[slug]/[chapter]/page.tsx @@ -17,6 +17,7 @@ import { buttonVariants } from "@/components/ui/button"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { MobileNav, type MobileNavGroup } from "@/components/layout/mobile-nav"; +import { FindInPage } from "@/components/layout/find-in-page"; // --------------------------------------------------------------------------- // Metadata @@ -85,10 +86,13 @@ export default async function OtherDocumentChapterPage({ > ← {meta.title} -

- Chapter {content.chapter}: - {content.title} -

+
+

+ Chapter {content.chapter}: + {content.title} +

+ +
@@ -112,7 +116,7 @@ export default async function OtherDocumentChapterPage({ /> {/* Content */} - +
{content.paragraphs.map((paragraph, i) => (