deckhearth/components/Layout.js

273 lines
14 KiB
JavaScript
Raw Normal View History

import { useState } from 'react';
import { useRouter } from 'next/router';
import Link from 'next/link';
import { useTheme } from '../lib/theme-context';
export default function Layout({ children, user = { email: 'me@randallstillwell.com', role: 'user' }, showSearch = false }) {
const router = useRouter();
const { theme, toggleTheme } = useTheme();
const [searchQuery, setSearchQuery] = useState('');
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
const navigation = [
{ name: 'Dashboard', href: '/dashboard', icon: 'grid', active: router.pathname === '/dashboard' },
{ name: 'My Collection', href: '/collections', icon: 'collection', active: router.pathname === '/collections', badge: '247' },
{ name: 'Cards', href: '/cards', icon: 'card', active: router.pathname === '/cards' },
{ name: 'Decks', href: '/decks', icon: 'deck', active: router.pathname === '/decks', badge: '12' },
{ name: 'Analytics', href: '/analytics', icon: 'analytics', active: router.pathname === '/analytics' },
{ name: 'Community', href: '/community', icon: 'community', active: router.pathname === '/community' },
{ name: 'Settings', href: '/settings', icon: 'settings', active: router.pathname === '/settings' },
...(user?.role === 'admin' ? [
{ name: 'Admin Tools', href: '/admin/card-editor', icon: 'admin', active: router.pathname.startsWith('/admin'), badge: 'ADMIN' }
] : [])
];
const bottomNavigation = [
{ name: 'Notifications', href: '/notifications', icon: 'notifications', active: router.pathname === '/notifications' },
{ name: 'Settings', href: '/settings', icon: 'settings', active: router.pathname === '/settings' },
{ name: 'Logout', href: '/logout', icon: 'logout', active: router.pathname === '/logout' }
];
const getIcon = (iconName) => {
const icons = {
grid: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z" />
</svg>
),
collection: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" />
</svg>
),
card: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
</svg>
),
deck: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
),
analytics: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
),
community: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" />
</svg>
),
settings: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
),
logout: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
</svg>
),
admin: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
),
notifications: (
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 17h5l-5 5v-5zM4.5 19.5L9 15m0 0l-4.5-4.5M9 15v5" />
</svg>
)
};
return icons[iconName] || icons.grid;
};
return (
<div className="flex h-screen" style={{ backgroundColor: 'var(--bg-primary)' }}>
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
{/* Mobile Menu Button */}
<button
onClick={() => setIsMobileMenuOpen(true)}
className="lg:hidden fixed top-4 left-4 z-50 p-2 rounded-lg shadow-lg"
style={{ backgroundColor: 'var(--bg-secondary)', color: 'var(--text-primary)' }}
>
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
{/* Mobile Overlay */}
{isMobileMenuOpen && (
<div
className="lg:hidden fixed inset-0 bg-black bg-opacity-50 z-40"
onClick={() => setIsMobileMenuOpen(false)}
/>
)}
{/* Left Sidebar */}
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
<div className={`
fixed lg:static inset-y-0 left-0 z-50 w-64 shadow-lg transform transition-transform duration-300 ease-in-out
${isMobileMenuOpen ? 'translate-x-0' : '-translate-x-full lg:translate-x-0'}
`} style={{ backgroundColor: 'var(--bg-secondary)', borderRight: '1px solid var(--border)' }}>
<div className="p-4 h-full flex flex-col">
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
{/* Mobile Close Button */}
<div className="lg:hidden flex justify-between items-center mb-4">
<div className="flex items-center">
<div className="w-10 h-10 logo-container mr-3">
🔥 Transform to Deck Hearth Fire-Inspired Design 🎨 Complete Brand Transformation: - Rebranded from 'TCG Vault' to 'Deck Hearth' - Updated logo initials from 'TCG' to 'DH' - Changed app name throughout the application 🔥 Fire-Themed Color Palette: Light Theme (Warm Daylight by the Hearth): - Primary: Warm cream (#fefcf8) like sunlit stone - Secondary: Soft beige (#f7f3ed) like aged parchment - Tertiary: Light wood tone (#f0e6d6) - Text: Dark chocolate brown (#2d1810) - Accents: Ember orange, flame orange, golden yellow Dark Theme (Cozy Evening by the Fire): - Primary: Deep charcoal (#1a0f0a) like burnt wood - Secondary: Rich dark brown (#2d1b12) like oak - Tertiary: Medium brown (#3d2317) like mahogany - Text: Warm white (#fff8f0) like firelight - Accents: Bright flame, glowing ember, golden glow 🎨 Fire-Inspired Design Elements: - Flame gradient: Orange to ember red - Golden gradient: Golden yellow to flame orange - Fire glow effects with warm shadows - Wood-toned borders and accents - Ember and flame-colored interactive elements 🔧 Enhanced Component Styling: - Updated BulkSelectionToolbar with fire colors - New CSS classes: btn-flame, btn-ember, btn-gold - Fire glow and ember glow effects - Gradient backgrounds: gradient-bg-fire, gradient-bg-golden - Tailwind color palette: hearth.flame, hearth.ember, etc. ✨ Warm & Inviting Experience: - Light mode: Cozy daytime fireplace atmosphere - Dark mode: Intimate evening hearth ambiance - Maintains accessibility with proper contrast - Smooth transitions between themes The app now perfectly captures the warm, inviting feeling of gathering around a hearth! 🔥🏠✨
2025-07-26 09:30:07 -04:00
<span className="text-white font-bold text-sm">DH</span>
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
</div>
🔥 Transform to Deck Hearth Fire-Inspired Design 🎨 Complete Brand Transformation: - Rebranded from 'TCG Vault' to 'Deck Hearth' - Updated logo initials from 'TCG' to 'DH' - Changed app name throughout the application 🔥 Fire-Themed Color Palette: Light Theme (Warm Daylight by the Hearth): - Primary: Warm cream (#fefcf8) like sunlit stone - Secondary: Soft beige (#f7f3ed) like aged parchment - Tertiary: Light wood tone (#f0e6d6) - Text: Dark chocolate brown (#2d1810) - Accents: Ember orange, flame orange, golden yellow Dark Theme (Cozy Evening by the Fire): - Primary: Deep charcoal (#1a0f0a) like burnt wood - Secondary: Rich dark brown (#2d1b12) like oak - Tertiary: Medium brown (#3d2317) like mahogany - Text: Warm white (#fff8f0) like firelight - Accents: Bright flame, glowing ember, golden glow 🎨 Fire-Inspired Design Elements: - Flame gradient: Orange to ember red - Golden gradient: Golden yellow to flame orange - Fire glow effects with warm shadows - Wood-toned borders and accents - Ember and flame-colored interactive elements 🔧 Enhanced Component Styling: - Updated BulkSelectionToolbar with fire colors - New CSS classes: btn-flame, btn-ember, btn-gold - Fire glow and ember glow effects - Gradient backgrounds: gradient-bg-fire, gradient-bg-golden - Tailwind color palette: hearth.flame, hearth.ember, etc. ✨ Warm & Inviting Experience: - Light mode: Cozy daytime fireplace atmosphere - Dark mode: Intimate evening hearth ambiance - Maintains accessibility with proper contrast - Smooth transitions between themes The app now perfectly captures the warm, inviting feeling of gathering around a hearth! 🔥🏠✨
2025-07-26 09:30:07 -04:00
<h1 className="text-xl font-bold" style={{ color: 'var(--text-primary)' }}>Deck Hearth</h1>
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
</div>
<button
onClick={() => setIsMobileMenuOpen(false)}
className="p-2 rounded-lg"
style={{ color: 'var(--text-secondary)' }}
>
<svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
{/* Desktop Header */}
<div className="hidden lg:flex items-center mb-8">
<div className="w-10 h-10 logo-container mr-3">
🔥 Transform to Deck Hearth Fire-Inspired Design 🎨 Complete Brand Transformation: - Rebranded from 'TCG Vault' to 'Deck Hearth' - Updated logo initials from 'TCG' to 'DH' - Changed app name throughout the application 🔥 Fire-Themed Color Palette: Light Theme (Warm Daylight by the Hearth): - Primary: Warm cream (#fefcf8) like sunlit stone - Secondary: Soft beige (#f7f3ed) like aged parchment - Tertiary: Light wood tone (#f0e6d6) - Text: Dark chocolate brown (#2d1810) - Accents: Ember orange, flame orange, golden yellow Dark Theme (Cozy Evening by the Fire): - Primary: Deep charcoal (#1a0f0a) like burnt wood - Secondary: Rich dark brown (#2d1b12) like oak - Tertiary: Medium brown (#3d2317) like mahogany - Text: Warm white (#fff8f0) like firelight - Accents: Bright flame, glowing ember, golden glow 🎨 Fire-Inspired Design Elements: - Flame gradient: Orange to ember red - Golden gradient: Golden yellow to flame orange - Fire glow effects with warm shadows - Wood-toned borders and accents - Ember and flame-colored interactive elements 🔧 Enhanced Component Styling: - Updated BulkSelectionToolbar with fire colors - New CSS classes: btn-flame, btn-ember, btn-gold - Fire glow and ember glow effects - Gradient backgrounds: gradient-bg-fire, gradient-bg-golden - Tailwind color palette: hearth.flame, hearth.ember, etc. ✨ Warm & Inviting Experience: - Light mode: Cozy daytime fireplace atmosphere - Dark mode: Intimate evening hearth ambiance - Maintains accessibility with proper contrast - Smooth transitions between themes The app now perfectly captures the warm, inviting feeling of gathering around a hearth! 🔥🏠✨
2025-07-26 09:30:07 -04:00
<span className="text-white font-bold text-sm">DH</span>
</div>
🔥 Transform to Deck Hearth Fire-Inspired Design 🎨 Complete Brand Transformation: - Rebranded from 'TCG Vault' to 'Deck Hearth' - Updated logo initials from 'TCG' to 'DH' - Changed app name throughout the application 🔥 Fire-Themed Color Palette: Light Theme (Warm Daylight by the Hearth): - Primary: Warm cream (#fefcf8) like sunlit stone - Secondary: Soft beige (#f7f3ed) like aged parchment - Tertiary: Light wood tone (#f0e6d6) - Text: Dark chocolate brown (#2d1810) - Accents: Ember orange, flame orange, golden yellow Dark Theme (Cozy Evening by the Fire): - Primary: Deep charcoal (#1a0f0a) like burnt wood - Secondary: Rich dark brown (#2d1b12) like oak - Tertiary: Medium brown (#3d2317) like mahogany - Text: Warm white (#fff8f0) like firelight - Accents: Bright flame, glowing ember, golden glow 🎨 Fire-Inspired Design Elements: - Flame gradient: Orange to ember red - Golden gradient: Golden yellow to flame orange - Fire glow effects with warm shadows - Wood-toned borders and accents - Ember and flame-colored interactive elements 🔧 Enhanced Component Styling: - Updated BulkSelectionToolbar with fire colors - New CSS classes: btn-flame, btn-ember, btn-gold - Fire glow and ember glow effects - Gradient backgrounds: gradient-bg-fire, gradient-bg-golden - Tailwind color palette: hearth.flame, hearth.ember, etc. ✨ Warm & Inviting Experience: - Light mode: Cozy daytime fireplace atmosphere - Dark mode: Intimate evening hearth ambiance - Maintains accessibility with proper contrast - Smooth transitions between themes The app now perfectly captures the warm, inviting feeling of gathering around a hearth! 🔥🏠✨
2025-07-26 09:30:07 -04:00
<h1 className="text-xl font-bold" style={{ color: 'var(--text-primary)' }}>Deck Hearth</h1>
</div>
<nav className="space-y-2 flex-1">
{navigation.map((item) => (
<Link key={item.name} href={item.href}>
<div
className={`flex items-center justify-between px-4 py-3 rounded-2xl transition-all duration-200 cursor-pointer ${
item.active
? 'shadow-lg'
: 'hover:shadow-md'
}`}
style={{
backgroundColor: item.active ? 'var(--bg-tertiary)' : 'transparent',
color: item.active ? 'var(--text-primary)' : 'var(--text-secondary)'
}}
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
onClick={() => setIsMobileMenuOpen(false)}
>
<div className="flex items-center">
<span className="mr-3">{getIcon(item.icon)}</span>
<span className="font-medium">{item.name}</span>
</div>
{item.badge && (
<span
className="px-2 py-1 text-xs rounded-full font-medium"
style={{ backgroundColor: 'var(--accent-purple)', color: 'white' }}
>
{item.badge}
</span>
)}
</div>
</Link>
))}
</nav>
{/* Profile Section */}
<div className="mt-auto space-y-4">
{/* User Profile */}
<div className="px-4 py-3 rounded-2xl" style={{ backgroundColor: 'var(--bg-tertiary)' }}>
<div className="flex items-center space-x-3">
<div className="h-10 w-10 logo-container">
<span className="text-white text-sm font-medium">
{user?.email?.charAt(0).toUpperCase() || 'G'}
</span>
</div>
<div className="flex-1">
<p className="text-sm font-medium" style={{ color: 'var(--text-primary)' }}>
{user?.email || 'Guest'}
</p>
<p className="text-xs" style={{ color: 'var(--text-secondary)' }}>
{user?.role || 'visitor'}
</p>
</div>
<button
onClick={toggleTheme}
className="p-2 rounded-lg transition-all duration-200 hover:shadow-md"
style={{ backgroundColor: 'var(--bg-primary)' }}
>
{theme === 'light' ? (
<svg className="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" style={{ color: 'var(--text-primary)' }}>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
) : (
<svg className="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" style={{ color: 'var(--text-primary)' }}>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
)}
</button>
</div>
</div>
{/* Bottom Navigation */}
<nav className="space-y-1">
{bottomNavigation.map((item) => (
<Link key={item.name} href={item.href}>
<div
className={`flex items-center px-4 py-2 rounded-xl transition-all duration-200 cursor-pointer ${
item.active
? 'shadow-md'
: 'hover:shadow-sm'
}`}
style={{
backgroundColor: item.active ? 'var(--bg-tertiary)' : 'transparent',
color: item.active ? 'var(--text-primary)' : 'var(--text-secondary)'
}}
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
onClick={() => setIsMobileMenuOpen(false)}
>
<span className="mr-3">{getIcon(item.icon)}</span>
<span className="text-sm font-medium">{item.name}</span>
</div>
</Link>
))}
</nav>
</div>
</div>
</div>
{/* Main Content */}
📱 Implement Mobile-First Responsive Design 🎯 Mobile Slide-In Navigation: - Added mobile menu button with hamburger icon - Implemented slide-in sidebar with smooth transitions - Added mobile overlay with click-to-close functionality - Mobile menu auto-closes when navigating to new pages - Proper z-index layering for mobile interactions 🃏 Smart Card Panel Positioning: - Panels now open on opposite side for right-edge cards - Added cardIndex and cardsPerRow props to CardItem - Dynamic positioning based on card's position in grid - Prevents panels from extending off-screen edges - Maintains hover functionality on desktop 📱 Mobile-Optimized Bulk Actions: - Toolbar now spans full width on mobile devices - Icon-only buttons on mobile, full labels on desktop - Responsive spacing and padding adjustments - Improved touch targets for mobile interaction - Maintains functionality across all screen sizes 🎨 Enhanced Grid Layout: - Improved mobile grid: 2 columns with tighter spacing - Better space utilization on all device sizes - Responsive gap spacing that adapts to screen size - Optimized padding for mobile vs desktop - Cards now fill available space properly ✅ Cross-Device Experience: - Mobile: Slide-in nav, icon-only actions, 2-column grid - Tablet: Responsive layout with appropriate spacing - Desktop: Full sidebar, labeled actions, hover panels - Large screens: Maximum columns with side panel space The app now provides an optimal mobile experience while maintaining desktop functionality! ��💻🖥️
2025-07-26 01:49:42 -04:00
<div className="flex-1 flex flex-col lg:ml-0">
{/* Top Header - Only show search on dashboard */}
{showSearch && (
<header className="p-6" style={{ backgroundColor: 'var(--bg-secondary)', borderBottom: '1px solid var(--border)' }}>
<div className="flex items-center">
<div className="flex-1 max-w-2xl">
<div className="relative">
<input
type="text"
placeholder="Search cards, decks, or collections..."
className="search-bar pr-12"
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
/>
<div className="absolute inset-y-0 right-0 flex items-center pr-4">
<span className="text-sm" style={{ color: 'var(--text-secondary)' }}>F</span>
</div>
<div className="absolute inset-y-0 left-0 flex items-center pl-4">
<svg className="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" style={{ color: 'var(--text-secondary)' }}>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</div>
</div>
</div>
</div>
</header>
)}
{/* Page Content */}
<main className="flex-1 overflow-auto">
{children}
</main>
</div>
</div>
);
}