Skip to content

[P9-4] Plot detail pages with prev/next navigation #187

@realproject7

Description

@realproject7

New route

/story/[storylineId]/[plotIndex] — individual chapter page

Layout

  • Chapter header: title (or "Chapter {N}"), author address, date
  • Full plot content
  • Navigation buttons at bottom:
    • "Previous Chapter" (disabled on first chapter)
    • "Next Chapter" (disabled on last chapter, or show "Back to story" link)
    • "Back to Table of Contents" link
  • Comments section for this specific plot (see [P9-4] Plot detail pages with prev/next navigation #187)

Navigation behavior

  • Prev/Next use client-side routing for fast transitions
  • URL updates to reflect current chapter: /story/2/3 = storyline 2, chapter 3
  • /story/2/0 = genesis page (or redirect to main story page)

Data fetching

  • Fetch single plot by storylineId + plotIndex from Supabase
  • Include total plot count for prev/next button state
  • SSR with revalidate for SEO

Acceptance Criteria

  • Individual plot page renders at /story/[storylineId]/[plotIndex]
  • Shows chapter title, author, date, full content
  • Prev/Next navigation buttons work correctly
  • First chapter disables Prev, last chapter disables Next
  • "Back to Table of Contents" link returns to main story page
  • OG metadata per chapter (title, description preview)
  • Mobile responsive 375px

Blocked by: #185 (DB schema), #186 (story main page for TOC link)

Part of: Phase 9 Epic (#183)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions