diff --git a/golden-crust-bakery/index.html b/golden-crust-bakery/index.html index c1e0ed643f58b5b733774a34b886b9fa5da9f8cc..1b1a6cc1d239b880aaceb94a23a4af51d4234201 100644 --- a/golden-crust-bakery/index.html +++ b/golden-crust-bakery/index.html @@ -2,7 +2,7 @@ <html lang="en"> <head> <meta charset="UTF-8" /> - <link rel="icon" type="image/svg+xml" href="/vite.svg" /> + <link rel="icon" type="image/svg+xml" href="/favicon.ico" /> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> diff --git a/golden-crust-bakery/public/favicon.ico b/golden-crust-bakery/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8aae0ed8413fb8d595c49f7d931694502f2b9f36 Binary files /dev/null and b/golden-crust-bakery/public/favicon.ico differ diff --git a/golden-crust-bakery/src/index.css b/golden-crust-bakery/src/index.css index 80ea3b787367f11c79cbb82cda98c2e977c331df..901127c3265c3acaa32ecb1a5acba15f4fa580ed 100644 --- a/golden-crust-bakery/src/index.css +++ b/golden-crust-bakery/src/index.css @@ -1,6 +1,7 @@ @tailwind base; @tailwind components; @tailwind utilities; + @layer base { :root { --background: 0 0% 100%; @@ -27,8 +28,9 @@ --chart-3: 197 37% 24%; --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; - --radius: 0.5rem + --radius: 0.5rem; } + .dark { --background: 224 71.4% 4.1%; --foreground: 210 20% 98%; @@ -53,9 +55,10 @@ --chart-2: 160 60% 45%; --chart-3: 30 80% 55%; --chart-4: 280 65% 60%; - --chart-5: 340 75% 55% + --chart-5: 340 75% 55%; } } + @layer base { * { @apply border-border; diff --git a/golden-crust-bakery/src/lib/data.js b/golden-crust-bakery/src/lib/data.js index 4929e52e8d1d96c1e2621385ad710d2aa642a00a..0b91f88a5a3b2a33e56f0a7e027f088435b39bd6 100644 --- a/golden-crust-bakery/src/lib/data.js +++ b/golden-crust-bakery/src/lib/data.js @@ -6,7 +6,8 @@ export const cakeData = [ 'Fresh strawberries on a vanilla base with cream cheese frosting. Perfect for summer celebrations.', price: 32.99, category: 'Birthday', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.flurys.com/cdn/shop/products/StrawberryCake_2.jpg?v=1676363157&width=1280', }, { id: 2, @@ -15,7 +16,8 @@ export const cakeData = [ "Rich chocolate cake with ganache and chocolate shavings. A chocolate lover's paradise.", price: 34.99, category: 'Birthday', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.flurys.com/cdn/shop/products/ChocolateCake_1.jpg?v=1676363155&width=1280', }, { id: 3, @@ -24,7 +26,8 @@ export const cakeData = [ 'Zesty lemon cake with lemon curd and buttercream. Bright and refreshing for any occasion.', price: 29.99, category: 'Special Occasion', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://charlotteslivelykitchen.com/wp-content/uploads/2019/05/lemon-cake-2.jpg', }, { id: 4, @@ -33,7 +36,8 @@ export const cakeData = [ 'Classic red velvet cake with cream cheese frosting. Elegant and timeless.', price: 36.99, category: 'Wedding', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.flurys.com/cdn/shop/products/RedVelvetCake_1.jpg?v=1676363275&width=1280', }, { id: 5, @@ -42,7 +46,8 @@ export const cakeData = [ 'Premium vanilla bean cake with vanilla buttercream. Simple yet sophisticated.', price: 28.99, category: 'Birthday', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.fnp.com/images/pr/l/v20221130174940/vanilla-buttercream-cake-half-kg_1.jpg', }, { id: 6, @@ -51,7 +56,8 @@ export const cakeData = [ 'Moist carrot cake with walnuts and cream cheese frosting. A beloved classic.', price: 31.99, category: 'Special Occasion', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://i0.wp.com/baketotheroots.de/wp-content/uploads/2024/03/SQ_240320_Baked-Carrot-Cake-Cheesecake.jpg?fit=1200%2C1200&ssl=1', }, { id: 7, @@ -60,7 +66,8 @@ export const cakeData = [ 'Coffee-soaked layers with mascarpone cream and cocoa. An Italian favorite.', price: 38.99, category: 'Special Occasion', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://simshomekitchen.com/wp-content/uploads/2023/08/Tiramisu-birthday-cake-recipe.jpg', }, { id: 8, @@ -69,7 +76,8 @@ export const cakeData = [ 'Three-tier white cake with delicate floral decorations. Perfect for your special day.', price: 149.99, category: 'Wedding', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.warmoven.in/blog/wp-content/uploads/2024/07/Buttercream-Beauty.png', }, { id: 9, @@ -78,7 +86,8 @@ export const cakeData = [ 'Warm pumpkin cake with cinnamon cream cheese frosting. Ideal for fall celebrations.', price: 33.99, category: 'Seasonal', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://chelsweets.com/wp-content/uploads/2018/10/cropped-pumpkin-cake-with-leaves.jpg', }, { id: 10, @@ -87,7 +96,8 @@ export const cakeData = [ 'Chocolate cake with mint buttercream and chocolate chips. Refreshingly delicious.', price: 35.99, category: 'Birthday', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://livforcake.com/wp-content/uploads/2017/05/mint-chocolate-chip-cake-3.jpg', }, { id: 11, @@ -96,7 +106,8 @@ export const cakeData = [ 'Coconut cake with coconut cream and toasted coconut flakes. A tropical treat.', price: 32.99, category: 'Special Occasion', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.allrecipes.com/thmb/1LRCshuWcZJtOLg51z3r93RX4H8=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/6698942-old-fashioned-coconut-cake-Kim-4x3-1-6b2b8ed757ac4b3884e773a1452e66b1.jpg', }, { id: 12, @@ -105,7 +116,8 @@ export const cakeData = [ 'Chocolate cake with cherries and whipped cream. A German classic.', price: 37.99, category: 'Birthday', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://ichef.bbci.co.uk/food/ic/food_16x9_1600/recipes/black_forest_gateau_43895_16x9.jpg', }, { id: 13, @@ -114,7 +126,8 @@ export const cakeData = [ 'Spiced cake with cinnamon, nutmeg, and cloves. Perfect for winter holidays.', price: 34.99, category: 'Seasonal', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://zimmysnook.ca/wp-content/uploads/2024/01/IMG_8538_jpg-2-e1706408096718.jpg', }, { id: 14, @@ -123,7 +136,8 @@ export const cakeData = [ 'White cake with raspberry filling and white chocolate buttercream. Delicate and delicious.', price: 36.99, category: 'Wedding', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://assets-eu-01.kc-usercontent.com/559bb7d3-88a4-01c1-79a3-dd4d5b2d2bb0/8e846b3a-7973-4604-9913-f2edd322c701/Chocolate-Raspberry-Cake-SQUARE-2.jpg', }, { id: 15, @@ -132,7 +146,8 @@ export const cakeData = [ 'Vanilla cake with caramel filling and salted caramel drizzle. Sweet with a touch of salt.', price: 33.99, category: 'Birthday', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://www.supergoldenbakes.com/wordpress/wp-content/uploads/2023/05/Mary_Berry_Salted_Caramel_Cake-1.jpg', }, { id: 16, @@ -141,6 +156,7 @@ export const cakeData = [ 'Light lemon cake with floral decorations. A celebration of spring.', price: 35.99, category: 'Seasonal', - image: '/placeholder.svg?height=300&width=300', + image: + 'https://cdn11.bigcommerce.com/s-vm6doh2w4n/images/stencil/original/products/7183/18736/muf056gd8e3szbpyf098__55091.1728509796.jpg?c=1', }, ]; diff --git a/golden-crust-bakery/src/main.jsx b/golden-crust-bakery/src/main.jsx index 42b3ab9103fee05332133a1c17b1749e0fac8229..d41fb023b55899ca8bbebbefa0387dce6a454b74 100644 --- a/golden-crust-bakery/src/main.jsx +++ b/golden-crust-bakery/src/main.jsx @@ -13,6 +13,7 @@ import About from './pages/About'; import Contact from './pages/Contact'; import Login from './pages/Login'; import Register from './pages/Register'; +import Menu from './pages/Menu'; const router = createBrowserRouter([ { @@ -39,6 +40,10 @@ const router = createBrowserRouter([ path: '/register', element: <Register />, }, + { + path: '/menu', + element: <Menu />, + }, ], }, ]); diff --git a/golden-crust-bakery/src/pages/About.jsx b/golden-crust-bakery/src/pages/About.jsx index 4763221b18e81e0e1c4847c4d5a9995409e80ecf..033a62f0c5e82780e9df665bcf5f1293b571324d 100644 --- a/golden-crust-bakery/src/pages/About.jsx +++ b/golden-crust-bakery/src/pages/About.jsx @@ -9,19 +9,19 @@ export default function About() { const reviews = [ { name: 'Sophia Patel', - img: 'https://img.freepik.com/free-psd/3d-illustration-person-with-long-hair_23-2149436197.jpg?t=st=1741676033~exp=1741679633~hmac=d35bb3732ce662b10cc27aeeeb8f7055efc62b78e3642aa24f1beae0accddd45&w=1480', + img: 'https://avatar.iran.liara.run/public/94', comment: 'The cake was absolutely delicious and beautifully decorated. Everyone at the party loved it! Will definitely order again.', }, { name: 'Liam Johnson', - img: 'https://img.freepik.com/free-psd/3d-illustration-person-with-sunglasses_23-2149436188.jpg?t=st=1741676063~exp=1741679663~hmac=2ea273721392950d9ee9cca8ae25fe80bd6d78d33c5ad6d6189cb20dd8f7f5be&w=1480', + img: 'https://avatar.iran.liara.run/public/25', comment: 'Amazing taste and perfect texture! The custom design was exactly as I imagined. Highly recommended!', }, { name: 'Emma Williams', - img: 'https://img.freepik.com/free-psd/3d-illustration-person-with-rainbow-sunglasses_23-2149436181.jpg?t=st=1741676083~exp=1741679683~hmac=f3c74b0465c88d8090fc9fd8d54f8d0fbdf0c7ba00140199a6df67c79493ead0&w=1480', + img: 'https://avatar.iran.liara.run/public/91', comment: "Fresh, flavorful, and elegantly crafted. It was the highlight of our celebration. Can't wait to try another one!", }, diff --git a/golden-crust-bakery/src/pages/Landing.jsx b/golden-crust-bakery/src/pages/Landing.jsx index ed3ce8f40140593866d10450dbca2e1a601104a6..ccb5c864bfdf3802aac1f2f00d6ba0332ece668e 100644 --- a/golden-crust-bakery/src/pages/Landing.jsx +++ b/golden-crust-bakery/src/pages/Landing.jsx @@ -24,7 +24,7 @@ export default function Landing() { 'Fresh strawberries on a vanilla base with cream cheese frosting', price: 32.99, image: - 'https://img.freepik.com/free-photo/layered-strawberry-vanilla-cake_1268-30137.jpg?t=st=1741675243~exp=1741678843~hmac=18ff6c24294bea6279aaa5b098c4a57da2db82fe33382670a5d1b416bcdf4542&w=1800', + 'https://www.flurys.com/cdn/shop/products/StrawberryCake_2.jpg?v=1676363157&width=1280', }, { id: 2, @@ -32,7 +32,7 @@ export default function Landing() { description: 'Rich chocolate cake with ganache and chocolate shavings', price: 34.99, image: - 'https://img.freepik.com/free-photo/front-view-sweet-chocolate-cake_23-2148834059.jpg?t=st=1741675403~exp=1741679003~hmac=2b7bf4f657915b4b0db2b724abf1b841c8144d28605691ec47b8113a76033fc2&w=1800', + 'https://www.flurys.com/cdn/shop/products/ChocolateCake_1.jpg?v=1676363155&width=840', }, { id: 3, @@ -40,26 +40,26 @@ export default function Landing() { description: 'Zesty lemon cake with lemon curd and buttercream', price: 29.99, image: - 'https://img.freepik.com/free-photo/ai-generated-cake-picture_23-2150649358.jpg?t=st=1741675442~exp=1741679042~hmac=8110dd439d3217343e7ed54e128ce94fb8db9a53297529616caa4d2119f88751&w=1800', + 'https://charlotteslivelykitchen.com/wp-content/uploads/2019/05/lemon-cake-2.jpg', }, ]; const reviews = [ { name: 'Sophia Patel', - img: 'https://img.freepik.com/free-psd/3d-illustration-person-with-long-hair_23-2149436197.jpg?t=st=1741676033~exp=1741679633~hmac=d35bb3732ce662b10cc27aeeeb8f7055efc62b78e3642aa24f1beae0accddd45&w=1480', + img: 'https://avatar.iran.liara.run/public/94', comment: 'The cake was absolutely delicious and beautifully decorated. Everyone at the party loved it! Will definitely order again.', }, { name: 'Liam Johnson', - img: 'https://img.freepik.com/free-psd/3d-illustration-person-with-sunglasses_23-2149436188.jpg?t=st=1741676063~exp=1741679663~hmac=2ea273721392950d9ee9cca8ae25fe80bd6d78d33c5ad6d6189cb20dd8f7f5be&w=1480', + img: 'https://avatar.iran.liara.run/public/25', comment: 'Amazing taste and perfect texture! The custom design was exactly as I imagined. Highly recommended!', }, { name: 'Emma Williams', - img: 'https://img.freepik.com/free-psd/3d-illustration-person-with-rainbow-sunglasses_23-2149436181.jpg?t=st=1741676083~exp=1741679683~hmac=f3c74b0465c88d8090fc9fd8d54f8d0fbdf0c7ba00140199a6df67c79493ead0&w=1480', + img: 'https://avatar.iran.liara.run/public/91', comment: "Fresh, flavorful, and elegantly crafted. It was the highlight of our celebration. Can't wait to try another one!", }, @@ -99,7 +99,7 @@ export default function Landing() { </div> <div className='relative h-[300px] md:h-[400px] rounded-2xl overflow-hidden shadow-xl'> <img - src='https://img.freepik.com/free-photo/various-cakes-supermarket-shelves-sale_627829-7332.jpg?t=st=1741673875~exp=1741677475~hmac=833e703e6c8857b6c3348a3ce0e9217f1d18e10b83f1066781dfe84bf46f863a&w=2000' + src='https://images.pexels.com/photos/2536967/pexels-photo-2536967.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2' alt='Delicious cake showcase' className='object-cover' /> diff --git a/golden-crust-bakery/src/pages/Menu.jsx b/golden-crust-bakery/src/pages/Menu.jsx new file mode 100644 index 0000000000000000000000000000000000000000..3554c988c0512113131d12d3c80aa6751df25f52 --- /dev/null +++ b/golden-crust-bakery/src/pages/Menu.jsx @@ -0,0 +1,148 @@ +import { useEffect, useState } from 'react'; +import { toast } from 'sonner'; +import { Search, ShoppingCart } from 'lucide-react'; + +import { useCartStore } from '@/lib/store'; +import { cakeData } from '@/lib/data'; + +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; + +export default function Menu() { + const { addToCart, initializeCart } = useCartStore(); + const [searchTerm, setSearchTerm] = useState(''); + const [categoryFilter, setCategoryFilter] = useState('All'); + + useEffect(() => { + initializeCart(); + }, [initializeCart]); + + const categories = [ + 'All', + 'Birthday', + 'Wedding', + 'Special Occasion', + 'Seasonal', + ]; + + const filteredCakes = cakeData.filter((cake) => { + const matchesSearch = + cake.name.toLowerCase().includes(searchTerm.toLowerCase()) || + cake.description.toLowerCase().includes(searchTerm.toLowerCase()); + const matchesCategory = + categoryFilter === 'All' || cake.category === categoryFilter; + return matchesSearch && matchesCategory; + }); + + const handleAddToCart = (cake) => { + addToCart({ + ...cake, + quantity: 1, + }); + + toast({ + title: 'Added to cart!', + description: `${cake.name} has been added to your cart.`, + }); + }; + + return ( + <div className='container mx-auto px-4 py-8 md:py-12'> + <div className='text-center mb-12'> + <h1 className='text-4xl font-bold text-gray-800 mb-4'>Our Cake Menu</h1> + <p className='text-gray-600 max-w-2xl mx-auto'> + Browse our selection of handcrafted cakes made with premium + ingredients and love + </p> + </div> + + {/* Search and Filter */} + <div className='mb-8 flex flex-col md:flex-row gap-4 justify-between'> + <div className='relative w-full md:w-1/3'> + <Search className='absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400' /> + <Input + type='text' + placeholder='Search cakes...' + value={searchTerm} + onChange={(e) => setSearchTerm(e.target.value)} + className='pl-10 rounded-full border-pink-200 focus:border-pink-400 focus:ring-pink-400' + /> + </div> + <div className='flex flex-wrap gap-2'> + {categories.map((category) => ( + <Button + key={category} + variant={categoryFilter === category ? 'default' : 'outline'} + onClick={() => setCategoryFilter(category)} + className={`rounded-full ${ + categoryFilter === category + ? 'bg-pink-500 hover:bg-pink-600 text-white' + : 'border-pink-200 text-pink-600 hover:bg-pink-50' + }`} + > + {category} + </Button> + ))} + </div> + </div> + + {/* Cake Grid */} + {filteredCakes.length > 0 ? ( + <div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8 lg:gap-12'> + {filteredCakes.map((cake) => ( + <div + key={cake.id} + className='bg-white rounded-xl shadow-sm border overflow-hidden transition-transform hover:scale-105 hover:shadow-lg' + > + <div className='relative h-56'> + <img + src={cake.image} + alt={cake.name} + className='object-cover w-full h-full' + /> + <div className='absolute top-2 right-2 bg-pink-100 text-pink-600 px-2 py-1 rounded-full text-xs font-medium'> + {cake.category} + </div> + </div> + <div className='p-6'> + <div className='flex justify-between items-start mb-2'> + <h3 className='text-xl font-semibold text-gray-800'> + {cake.name} + </h3> + <p className='text-pink-600 font-bold'> + ${cake.price.toFixed(2)} + </p> + </div> + <p className='text-gray-600 mb-4 line-clamp-2'> + {cake.description} + </p> + <Button + onClick={() => handleAddToCart(cake)} + className='w-full bg-yellow-100 hover:bg-yellow-200 text-yellow-800 rounded-full' + > + <ShoppingCart className='mr-2 h-4 w-4' /> Add to Cart + </Button> + </div> + </div> + ))} + </div> + ) : ( + <div className='text-center py-12'> + <h3 className='text-xl text-gray-600'> + No cakes found matching your search. + </h3> + <Button + onClick={() => { + setSearchTerm(''); + setCategoryFilter('All'); + }} + variant='outline' + className='mt-4 border-pink-300 text-pink-600 hover:bg-pink-50 rounded-full' + > + Clear Filters + </Button> + </div> + )} + </div> + ); +}