From 1387ecaccb1339f4d2b55e7d9fdf935a5dc84ddf Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Fri, 25 Jul 2025 23:55:54 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Redesigned=20Card=20Hover=20with?= =?UTF-8?q?=20Side=20Information=20Panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ New Side Panel Design: - Information panel slides out from the right side of cards - 500ms hover delay to prevent accidental triggers - 320px wide panel with comprehensive card details - Smooth slide-in animation with backdrop blur effect 🎯 TCG-Specific Information: - MTG: Mana cost, Power/Toughness, Colors with proper styling - Pokemon: HP display with yellow highlighting - Lorcana: Ink cost, Strength/Willpower stats - Oracle text/description for all card types 🌙 Dark Theme Support: - Full dark mode styling for all panel elements - Dark-aware color schemes for TCG-specific badges - Proper contrast ratios for accessibility ⚡ Enhanced Features: - Structured layout: Header, Body, Footer sections - Grid-based action buttons with tooltips - Copy card info functionality - Responsive design (hidden on mobile/tablet) - Better grid spacing with right padding for panels 🎨 Professional Polish: - Backdrop blur effects for depth - Smooth transitions with proper easing - Z-index management for layering - Reduced grid columns to accommodate panels Perfect for detailed card inspection! 🃏✨ --- components/CardItem.js | 284 ++++++++++++++++++++++++++++------------- pages/cards.js | 2 +- styles/globals.css | 52 +++++--- 3 files changed, 233 insertions(+), 105 deletions(-) diff --git a/components/CardItem.js b/components/CardItem.js index 45508c0..2259390 100644 --- a/components/CardItem.js +++ b/components/CardItem.js @@ -134,7 +134,7 @@ export default function CardItem({
{/* Selection Checkbox */}
@@ -187,113 +187,219 @@ export default function CardItem({
- {/* Sliding Information Panel */} -
- {/* Card Info Content */} -
- {/* Top Section - Card Details */} -
-
-

+
+ {/* Panel Header */} +
+
+

{card.name}

- + ${card.market_price}
+ + {/* TCG-Specific Info */} + {card.game === 'MTG' && ( +
+ {card.mana_cost && ( +
+ Cost: + + {card.mana_cost} + +
+ )} + {card.power && card.toughness && ( +
+ P/T: + + {card.power}/{card.toughness} + +
+ )} +
+ )} -
-

{card.set_name}

-

{card.rarity} • {card.card_type}

-
+ {card.game === 'Pokemon' && card.power && ( +
+
+ HP: + + {card.power} + +
+
+ )} - {/* Game Badge */} -
- + {card.game === 'Lorcana' && card.cmc && ( +
+
+ Cost: + + {card.cmc} + +
+ {card.power && card.toughness && ( +
+ Str/Will: + + {card.power}/{card.toughness} + +
+ )} +
+ )} + +
+ {card.game} + {card.set_name}
- {/* Bottom Section - Actions */} -
- {/* Primary Actions */} -
- + {/* Panel Body */} +
+
+ {/* Card Details */} +
+
+
+ Rarity +

{card.rarity}

+
+
+ Type +

{card.card_type}

+
+
- + {/* Oracle Text */} + {card.oracle_text && ( +
+ Description +

+ {card.oracle_text} +

+
+ )} + + {/* Colors for MTG */} + {card.game === 'MTG' && card.colors && card.colors.length > 0 && ( +
+ Colors +
+ {card.colors.map((color, index) => ( + + {color} + + ))} +
+
+ )} +
+
- {/* Secondary Actions */} -
- + {/* Panel Footer - Actions */} +
+
+ {/* Primary Actions */} +
+ - + +
- + {/* Secondary Actions */} +
+ + + + + + + +
diff --git a/pages/cards.js b/pages/cards.js index 344ebab..8f39d26 100644 --- a/pages/cards.js +++ b/pages/cards.js @@ -699,7 +699,7 @@ export default function Cards() {
) : ( <> -
+
{cards.map(card => (