From a6602eab87ff1c47fd0829b5d334053fea7af8d3 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Fri, 25 Jul 2025 23:44:03 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Redesigned=20Card=20Interaction=20w?= =?UTF-8?q?ith=20Sliding=20Information=20Panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🎨 New Card-Focused Design: - Cards now display as clean images without permanent overlays - Information and actions slide out from behind the card on hover - Selected cards scale up slightly and show persistent info panel 🚀 Enhanced User Experience: - Card images are the primary focus, no visual clutter - Smooth 300ms transitions with easing for professional feel - Sliding panel appears 2px below card for depth effect - Backdrop blur effect for better contrast and readability ⚡ Improved Interactions: - Primary actions (Collection, Deck) prominently displayed - Secondary actions (Own, Favorite, View) in compact grid - Proper z-index management prevents panel conflicts - Increased grid spacing (gap-8, p-8) for sliding panels 🎯 Technical Improvements: - CSS classes for consistent styling and performance - Prevented text selection during interactions - Transform origin optimization for smooth animations - Proper pointer event handling for accessibility Cards are now the star of the show! 🌟✨ --- components/CardItem.js | 256 ++++++++++++++++++++++++++--------------- pages/cards.js | 2 +- styles/globals.css | 40 +++++++ 3 files changed, 202 insertions(+), 96 deletions(-) diff --git a/components/CardItem.js b/components/CardItem.js index fc484b5..45508c0 100644 --- a/components/CardItem.js +++ b/components/CardItem.js @@ -127,108 +127,174 @@ export default function CardItem({ // Grid view return ( -
- {/* Selection Checkbox */} -
- -
- - {/* Favorite Button */} -
- -
- - {/* Card Image */} -
- {!imageError ? ( - {card.name} + {/* Selection Checkbox */} +
+ - ) : ( -
-
- - - -

No Image

-
-
- )} -
- - {/* Card Info */} -
-
-

- {card.name} -

- - ${card.market_price} -
-

{card.set_name}

-

{card.rarity} • {card.card_type}

+ {/* Favorite Button */} +
+ +
- {/* Game Badge */} -
- - {card.game} - + {/* Card Image */} +
+ {!imageError ? ( + {card.name} + ) : ( +
+
+ + + +

No Image

+
+
+ )} +
+
- {/* Quick Actions */} -
- + {/* Sliding Information Panel */} +
+ {/* Card Info Content */} +
+ {/* Top Section - Card Details */} +
+
+

+ {card.name} +

+ + ${card.market_price} + +
- +
+

{card.set_name}

+

{card.rarity} • {card.card_type}

+
+ + {/* Game Badge */} +
+ + {card.game} + +
+
+ + {/* Bottom Section - Actions */} +
+ {/* Primary Actions */} +
+ + + +
+ + {/* Secondary Actions */} +
+ + + + + +
diff --git a/pages/cards.js b/pages/cards.js index f3a43fd..344ebab 100644 --- a/pages/cards.js +++ b/pages/cards.js @@ -699,7 +699,7 @@ export default function Cards() {
) : ( <> -
+
{cards.map(card => (