diff --git a/src/app/shop/page.tsx b/src/app/shop/public/page.tsx similarity index 99% rename from src/app/shop/page.tsx rename to src/app/shop/public/page.tsx index 21025b4..0b16c9a 100644 --- a/src/app/shop/page.tsx +++ b/src/app/shop/public/page.tsx @@ -4,7 +4,7 @@ import { useState, useEffect } from 'react' import { StarIcon } from '@heroicons/react/20/solid' import { HeartIcon, ShoppingCartIcon } from '@heroicons/react/24/outline' import { HeartIcon as HeartIconSolid } from '@heroicons/react/24/solid' -import PageLayout from '../components/PageLayout' +import PageLayout from '../../components/PageLayout' // Mock-Produktdaten im Tailwind UI Plus Format const products = [ diff --git a/src/app/shop/vip/page.tsx b/src/app/shop/vip/page.tsx new file mode 100644 index 0000000..a211246 --- /dev/null +++ b/src/app/shop/vip/page.tsx @@ -0,0 +1,415 @@ +'use client' + +import { useState, useEffect } from 'react' +import { StarIcon } from '@heroicons/react/20/solid' +import { HeartIcon, ShoppingCartIcon } from '@heroicons/react/24/outline' +import { HeartIcon as HeartIconSolid } from '@heroicons/react/24/solid' +import PageLayout from '../../components/PageLayout' + +// Featured Products für die Shop-Startseite +const featuredProducts = [ + { + id: 101, + name: 'Leather Long Wallet', + color: 'Natural', + price: '$75', + href: '#', + imageSrc: 'https://tailwindcss.com/plus-assets/img/ecommerce-images/home-page-04-trending-product-02.jpg', + imageAlt: 'Hand stitched, orange leather long wallet.', + }, + { + id: 102, + name: 'Machined Pencil and Pen Set', + color: 'Black', + price: '$70', + href: '#', + imageSrc: 'https://tailwindcss.com/plus-assets/img/ecommerce-images/home-page-04-trending-product-03.jpg', + imageAlt: '12-sided, machined black pencil and pen.', + }, + { + id: 103, + name: 'Mini-Sketchbooks', + color: 'Light Brown', + price: '$27', + href: '#', + imageSrc: 'https://tailwindcss.com/plus-assets/img/ecommerce-images/home-page-04-trending-product-04.jpg', + imageAlt: 'Set of three light and dark brown mini sketch books.', + }, + { + id: 104, + name: 'Organizer Set', + color: 'Walnut', + price: '$149', + href: '#', + imageSrc: 'https://tailwindcss.com/plus-assets/img/ecommerce-images/home-page-04-trending-product-01.jpg', + imageAlt: 'Beautiful walnut organizer set with multiple white compartments', + }, +] + +// Mock-Produktdaten im Tailwind UI Plus Format +const products = [ + { + id: 1, + name: 'Premium Bio-Kaffee Starter Set', + price: '€24.99', + rating: 5, + reviewCount: 142, + imageSrc: 'https://images.unsplash.com/photo-1559056199-641a0ac8b55e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Premium Bio-Kaffee Set mit Bohnen und Filter', + href: '#', + category: 'Getränke', + inStock: true, + }, + { + id: 2, + name: 'Nachhaltiger Laptop-Ständer', + price: '€89.99', + rating: 5, + reviewCount: 87, + imageSrc: 'https://images.unsplash.com/photo-1527864550417-7fd91fc51a46?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Ergonomischer Laptop-Ständer aus Bambus', + href: '#', + category: 'Technik', + inStock: true, + }, + { + id: 3, + name: 'Öko-Sportbekleidung Set', + price: '€149.99', + rating: 5, + reviewCount: 203, + imageSrc: 'https://images.unsplash.com/photo-1506629905607-b5f9a71351e8?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Nachhaltige Sportkleidung aus recycelten Materialien', + href: '#', + category: 'Kleidung', + inStock: false, + }, + { + id: 4, + name: 'Smart Home Energie-Monitor', + price: '€199.99', + rating: 4, + reviewCount: 156, + imageSrc: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Smart Home Gerät zur Energieüberwachung', + href: '#', + category: 'Technik', + inStock: true, + }, + { + id: 5, + name: 'Bio-Hautpflege Starter-Set', + price: '€79.99', + rating: 4, + reviewCount: 92, + imageSrc: 'https://images.unsplash.com/photo-1556228578-8c89e6adf883?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Natürliche Hautpflege Produkte ohne Chemikalien', + href: '#', + category: 'Beauty', + inStock: true, + }, + { + id: 6, + name: 'Solarbetriebene Powerbank', + price: '€129.99', + rating: 5, + reviewCount: 78, + imageSrc: 'https://images.unsplash.com/photo-1609091839311-d5365f9ff1c5?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Portable Solarenergie Powerbank', + href: '#', + category: 'Technik', + inStock: true, + }, + { + id: 7, + name: 'Nachhaltige Trinkflasche', + price: '€25.99', + rating: 4, + reviewCount: 64, + imageSrc: 'https://images.unsplash.com/photo-1523362628745-0c100150b504?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Wiederverwendbare Edelstahl Trinkflasche', + href: '#', + category: 'Lifestyle', + inStock: true, + }, + { + id: 8, + name: 'Öko-Notizbuch Set', + price: '€19.99', + rating: 5, + reviewCount: 41, + imageSrc: 'https://images.unsplash.com/photo-1544716278-ca5e3f4abd8c?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Recyceltes Papier Notizbuch Set', + href: '#', + category: 'Büro', + inStock: true, + }, + { + id: 9, + name: 'Bambus Handy-Halterung', + price: '€32.99', + rating: 4, + reviewCount: 24, + imageSrc: 'https://images.unsplash.com/photo-1572635196237-14b3f281503f?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80', + imageAlt: 'Nachhaltige Bambus Handy-Halterung', + href: '#', + category: 'Technik', + inStock: true, + }, +] + +const stats = [ + { name: 'Total Users', stat: '71,897' }, + { name: 'Gold Members', stat: '68,161' }, + { name: 'Saved through Gold Membership', stat: '25k €' }, +] + +function classNames(...classes: (string | undefined | null | boolean)[]): string { + return classes.filter(Boolean).join(' ') +} + +export default function ShopPage() { + const [favorites, setFavorites] = useState([]) + const [isLoading, setIsLoading] = useState(true) + + // Load favorites from localStorage on component mount + useEffect(() => { + const savedFavorites = localStorage.getItem('shop-favorites') + if (savedFavorites) { + try { + setFavorites(JSON.parse(savedFavorites)) + } catch (error) { + console.error('Error parsing favorites from localStorage:', error) + } + } + setIsLoading(false) + }, []) + + // Save favorites to localStorage whenever favorites change + useEffect(() => { + if (!isLoading) { + localStorage.setItem('shop-favorites', JSON.stringify(favorites)) + } + }, [favorites, isLoading]) + + const toggleFavorite = (productId: number) => { + setFavorites(prev => { + const newFavorites = prev.includes(productId) + ? prev.filter(id => id !== productId) + : [...prev, productId] + + // Show feedback to user + const product = products.find(p => p.id === productId) + if (product) { + if (newFavorites.includes(productId)) { + console.log(`❤️ ${product.name} zu Favoriten hinzugefügt`) + } else { + console.log(`💔 ${product.name} aus Favoriten entfernt`) + } + } + + return newFavorites + }) + } + + const addToCart = (productId: number) => { + const product = products.find(p => p.id === productId) + if (product) { + console.log(`🛒 ${product.name} zum Warenkorb hinzugefügt`) + // Hier würde die echte Add-to-Cart Logik implementiert werden + // z.B. API-Call oder Zustand-Update + } + } + + if (isLoading) { + return ( + +
+
+
+

Shop wird geladen...

+
+
+
+ ) + } + + return ( + +
+ {/* Header Section */} +
+ {/*
*/} +
+
+
+
+ {stats.map((item) => ( +
+
{item.name}
+
{item.stat}
+
+ ))} +
+
+
+
+
+ + {/* Featured Products Section */} +
+
+
+

Trending products

+ + Shop the collection + + +
+ +
+ {featuredProducts.map((product) => ( +
+
+ {product.imageAlt} +
+

+ + + {product.name} + +

+

{product.color}

+

{product.price}

+
+ ))} +
+ + +
+
+ + {/* Products Section - Tailwind UI Plus "Product Grid" */} +
+

Products

+ +
+ {products.map((product) => ( + +
+ {/* Product Image */} +
+ {product.imageAlt} + + {/* Favorite Button - Now with better positioning */} + + + {/* Category Badge */} +
+ + {product.category} + +
+ + {/* Out of Stock Overlay */} + {!product.inStock && ( +
+ + Ausverkauft + +
+ )} +
+ + {/* Product Info */} +
+
+

+ {product.name} +

+ + {/* Rating */} +
+
+ {[0, 1, 2, 3, 4].map((rating) => ( +
+

({product.reviewCount})

+
+
+

{product.price}

+
+ + {/* Add to Cart Button */} + +
+
+ ))} +
+
+
+
+ ) +} \ No newline at end of file