From 65c0adfd769b9ef11b897c96a3634c61120055b8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 8 Dec 2025 00:18:03 +0900 Subject: feat(client): redesign frontend with TailwindCSS v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace inline styles with TailwindCSS, implementing a cohesive Japanese-inspired design system with custom colors (cream, teal primary), typography (Fraunces, DM Sans), and animations. Update all pages and components with consistent styling, improve accessibility by adding aria-hidden to decorative SVGs, and configure Biome for Tailwind CSS syntax support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/client/pages/StudyPage.tsx | 454 +++++++++++++++++++++++------------------ 1 file changed, 251 insertions(+), 203 deletions(-) (limited to 'src/client/pages/StudyPage.tsx') diff --git a/src/client/pages/StudyPage.tsx b/src/client/pages/StudyPage.tsx index 03cb537..16c1a1c 100644 --- a/src/client/pages/StudyPage.tsx +++ b/src/client/pages/StudyPage.tsx @@ -29,11 +29,11 @@ const RatingLabels: Record = { 4: "Easy", }; -const RatingColors: Record = { - 1: "#dc3545", - 2: "#fd7e14", - 3: "#28a745", - 4: "#007bff", +const RatingStyles: Record = { + 1: "bg-again hover:bg-again/90 focus:ring-again/30", + 2: "bg-hard hover:bg-hard/90 focus:ring-hard/30", + 3: "bg-good hover:bg-good/90 focus:ring-good/30", + 4: "bg-easy hover:bg-easy/90 focus:ring-easy/30", }; export function StudyPage() { @@ -217,9 +217,16 @@ export function StudyPage() { if (!deckId) { return ( -
-

Invalid deck ID

- Back to decks +
+
+

Invalid deck ID

+ + Back to decks + +
); } @@ -230,218 +237,259 @@ export function StudyPage() { const remainingCards = cards.length - currentIndex; return ( -
-
- - ← Back to Deck - -
- - {isLoading &&

Loading study session...

} - - {error && ( -
- {error} - + + Back to Deck +
- )} + - {!isLoading && !error && deck && ( - <> -
-

Study: {deck.name}

- {!isSessionComplete && !hasNoCards && ( - - {remainingCards} remaining - - )} + {/* Main Content */} +
+ {/* Loading State */} + {isLoading && ( +
+
+ )} - {hasNoCards && ( -
+ {error} + - + Retry + +
+ )} + + {/* Study Content */} + {!isLoading && !error && deck && ( +
+ {/* Study Header */} +
+

+ {deck.name} +

+ {!isSessionComplete && !hasNoCards && ( + + {remainingCards} remaining + + )}
- )} - - {isSessionComplete && ( -
-

- Session Complete! -

-

- You reviewed{" "} - {completedCount}{" "} - card{completedCount !== 1 ? "s" : ""}. -

+ + {/* No Cards State */} + {hasNoCards && (
- - - - - - +
+
+ +
+

+ All caught up! +

+

+ No cards due for review right now +

+ + Back to Deck + +
-
- )} - - {currentCard && !isSessionComplete && ( -
-
+
+ )} + + {/* Active Study Card */} + {currentCard && !isSessionComplete && ( +
+ {/* Card */} + + ))} +
)} - - - {isFlipped && ( -
- {([1, 2, 3, 4] as Rating[]).map((rating) => ( - - ))} -
- )} -
- )} - - )} +
+ )} +
+ )} + ); } -- cgit v1.2.3-70-g09d2