From f61abc071088e1b648b2a6a95ace9f3df95df2f3 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 3 Apr 2026 15:14:07 +0100 Subject: [PATCH] [#813] Redesign storyline header into 3 clear zones Zone 1 (Hero): Moleskine cover + title, rating, writer, genre only. Removed stat boxes and plots info row from hero area. Zone 2 (Stats Card): Separate bordered card with 6 stat cells in responsive grid (3-col desktop, 2-col mobile): - Row 1: Market Cap, Supply Minted, Deadline - Row 2: Token Price, Plot Count, Created date AddPlotButton moved below the stats card. Zone 3 (Content) unchanged. Fixes #813 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/story/[storylineId]/page.tsx | 217 ++++++++++++++------------- 1 file changed, 114 insertions(+), 103 deletions(-) diff --git a/src/app/story/[storylineId]/page.tsx b/src/app/story/[storylineId]/page.tsx index 4feffef9..c197937f 100644 --- a/src/app/story/[storylineId]/page.tsx +++ b/src/app/story/[storylineId]/page.tsx @@ -258,122 +258,133 @@ function StoryHeader({ storyline: Storyline; priceInfo: TokenPriceInfo | null; }) { + const createdDate = storyline.block_timestamp + ? new Date(storyline.block_timestamp).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) + : null; + return ( -
- {/* Moleskine cover + Info panel */} -
- {/* Moleskine book cover */} -
-
+ <> + {/* Zone 1: Hero — Cover + Identity */} +
+
+ {/* Moleskine book cover */} +
-
- - {storyline.genre || "Uncategorized"} - + className="relative flex flex-col overflow-hidden border border-[var(--border)]" + style={{ + aspectRatio: "2/3", + borderRadius: "5px 12px 12px 5px", + backgroundColor: "#F5EFE6", + boxShadow: "2px 4px 8px rgba(44, 24, 16, 0.08)", + }} + > +
+
+ + {storyline.genre || "Uncategorized"} + +
+
+ + {storyline.title} + +
+
+ + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + +
-
- - {storyline.title} - +
+ + {/* Info panel */} +
+

+ {storyline.title} +

+
+ +
-
- - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - +
+
+ Writer + {truncateAddress(storyline.writer_address)}}> + + + {storyline.writer_type === 1 && } +
+
+ Genre + + {storyline.genre || "Uncategorized"} + {storyline.language && storyline.language !== "English" && ( + · {storyline.language} + )} + +
- - {/* Info panel */} -
- {/* Title */} -

- {storyline.title} -

- - {/* Rating + Views */} -
- - -
- - {/* Info rows */} -
-
- Writer - {truncateAddress(storyline.writer_address)}}> - - - {storyline.writer_type === 1 && } +
+ + {/* Zone 2: Stats Card + Action */} + {priceInfo && ( +
+
+ {/* Row 1 */} +
+
-
- Plots - - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} - +
+
{formatSupply(priceInfo.totalSupply)}
+
Supply Minted
-
- Genre - - {storyline.genre || "Uncategorized"} - {storyline.language && storyline.language !== "English" && ( - · {storyline.language} - )} - +
+ {storyline.sunset ? ( + <> +
{storyline.plot_count}
+
Complete
+ + ) : storyline.has_deadline && storyline.last_plot_time ? ( + <> +
+ +
+
Deadline
+ + ) : ( + <> +
+
Deadline
+ + )}
-
- - {/* Stat boxes — inside info panel on desktop, below info rows */} - {priceInfo && ( -
-
- -
-
-
{formatSupply(priceInfo.totalSupply)}
-
Supply Minted
-
-
- {storyline.sunset ? ( - <> -
{storyline.plot_count}
-
Complete
- - ) : storyline.has_deadline && storyline.last_plot_time ? ( - <> -
- -
-
Deadline
- - ) : ( - <> -
-
Deadline
- - )} -
+ {/* Row 2 */} +
+
{formatPrice(priceInfo.pricePerToken)} {RESERVE_LABEL}
+
Token Price
- )} +
+
{storyline.plot_count}
+
{storyline.plot_count === 1 ? "Plot" : "Plots"}
+
+
+
{createdDate ?? "—"}
+
Created
+
+
-
+ )} -
+ ); }