diff --git a/package.json b/package.json index 1114e099..446dee14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink", - "version": "0.1.1", + "version": "0.1.2", "private": true, "workspaces": [ "packages/*" diff --git a/src/components/StoryCard.tsx b/src/components/StoryCard.tsx index d45ddc49..e201c565 100644 --- a/src/components/StoryCard.tsx +++ b/src/components/StoryCard.tsx @@ -24,10 +24,14 @@ export function StoryCard({ return (
- +
+ {/* Stretched link — makes the whole card clickable */} + + {/* Page underneath — revealed when cover opens */}
- {/* Top area: genre badge */} + {/* Top area: genre + plot count badges */}
-
+
{displayGenre || "Uncategorized"} + + {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} + + {isNew && ( + + NEW + + )} {storyline.sunset && ( complete @@ -97,26 +109,23 @@ export function StoryCard({ )}
- {/* Bottom spacer (author shown below card with profile link) */} -
+ {/* Bottom: author name inside cover — z-40 so profile link sits above card link */} +
+ + + {storyline.writer_type === 1 && } + +
- +
{/* Metadata below notebook */}
- - - {storyline.writer_type === 1 && } - {storyline.token_address && ( )} - - {storyline.plot_count} {storyline.plot_count === 1 ? "plot" : "plots"} linked - {isNew && NEW} -
diff --git a/src/components/__tests__/StoryCard.test.tsx b/src/components/__tests__/StoryCard.test.tsx index 2301b088..7073f349 100644 --- a/src/components/__tests__/StoryCard.test.tsx +++ b/src/components/__tests__/StoryCard.test.tsx @@ -69,14 +69,14 @@ describe("StoryCard", () => { it("links to correct story page", () => { render(); - const link = screen.getAllByText("Test Story Title")[0].closest("a"); + const link = screen.getByRole("link", { name: "Test Story Title" }); expect(link).toHaveAttribute("href", "/story/42"); }); it("applies moleskine-notebook class for hover animation", () => { render(); - const link = screen.getAllByText("Test Story Title")[0].closest("a"); - expect(link).toHaveClass("moleskine-notebook"); + const container = screen.getAllByText("Test Story Title")[0].closest(".moleskine-notebook"); + expect(container).toBeTruthy(); }); it("shows plot count", () => {