From 268117af9f44abd3c67186916ec30b72f5c8bb2e Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 27 Mar 2026 16:48:28 +0000 Subject: [PATCH] [#298] Fix Reading Mode button position and add book icon Move ReadingModeWrapper inline with the Genesis/date header on the story page and inline with the chapter title on the chapter detail page. Add an open-book SVG icon next to the "Reading Mode" label. Button now sits in the same row as content headers instead of in a separate right-aligned block above. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../story/[storylineId]/[plotIndex]/page.tsx | 32 +++++++++--------- src/app/story/[storylineId]/page.tsx | 33 ++++++++++--------- src/components/ReadingMode.tsx | 6 +++- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/app/story/[storylineId]/[plotIndex]/page.tsx b/src/app/story/[storylineId]/[plotIndex]/page.tsx index 2749d0b5..0d77059b 100644 --- a/src/app/story/[storylineId]/[plotIndex]/page.tsx +++ b/src/app/story/[storylineId]/[plotIndex]/page.tsx @@ -103,23 +103,23 @@ export default async function PlotDetailPage({ params }: { params: Params }) { {chapterTitle} - {/* Reading mode + Chapter header */} -
- ({ - plotIndex: ap.plot_index, - title: ap.title || (ap.plot_index === 0 ? "Genesis" : `Chapter ${ap.plot_index}`), - content: ap.content, - }))} - initialPlotIndex={pidx} - /> -
+ {/* Chapter header with inline reading mode */}
-

- {chapterTitle} -

+
+

+ {chapterTitle} +

+ ({ + plotIndex: ap.plot_index, + title: ap.title || (ap.plot_index === 0 ? "Genesis" : `Chapter ${ap.plot_index}`), + content: ap.content, + }))} + initialPlotIndex={pidx} + /> +
by{" "} diff --git a/src/app/story/[storylineId]/page.tsx b/src/app/story/[storylineId]/page.tsx index c2731ebb..662ab1d8 100644 --- a/src/app/story/[storylineId]/page.tsx +++ b/src/app/story/[storylineId]/page.tsx @@ -151,19 +151,21 @@ export default async function StoryPage({ params }: { params: Params }) {
{genesis ? ( <> -
- ({ - plotIndex: p.plot_index, - title: p.title || (p.plot_index === 0 ? "Genesis" : `Chapter ${p.plot_index}`), - content: p.content, - }))} - initialPlotIndex={0} - /> -
- + ({ + plotIndex: p.plot_index, + title: p.title || (p.plot_index === 0 ? "Genesis" : `Chapter ${p.plot_index}`), + content: p.content, + }))} + initialPlotIndex={0} + /> + } + /> {chapters.length > 0 && ( -
+
Genesis {plot.block_timestamp && ( )} + {readingMode && {readingMode}}
{plot.content ? ( diff --git a/src/components/ReadingMode.tsx b/src/components/ReadingMode.tsx index 96461342..d1257c7a 100644 --- a/src/components/ReadingMode.tsx +++ b/src/components/ReadingMode.tsx @@ -200,8 +200,12 @@ export function ReadingModeButton({ onClick }: { onClick: () => void }) { return ( );