Download index.html from Hazar/c: direct link, hf CLI and curl.
- Browser
- Download file 35.4 kB
-
https://huggingface.co/spaces/Hazar/c/resolve/main/index.html
- Command line
-
hf download hf://spaces/Hazar/c/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Hazar/c/resolve/main/index.html
35.4 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Love Flowers - Premium Florist in Aktau</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .hero { | |
| background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1490750967868-88aa4486c946?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80'); | |
| background-size: cover; | |
| background-position: center; | |
| } | |
| .product-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); | |
| } | |
| .category-btn.active { | |
| background-color: #f43f5e; | |
| color: white; | |
| } | |
| .cart-item-enter { | |
| opacity: 0; | |
| transform: translateX(-20px); | |
| } | |
| .cart-item-enter-active { | |
| opacity: 1; | |
| transform: translateX(0); | |
| transition: all 300ms ease-in; | |
| } | |
| .cart-item-exit { | |
| opacity: 1; | |
| } | |
| .cart-item-exit-active { | |
| opacity: 0; | |
| transform: translateX(20px); | |
| transition: all 300ms ease-in; | |
| } | |
| </style> | |
| </head> | |
| <body class="font-sans bg-gray-50"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm sticky top-0 z-50"> | |
| <div class="container mx-auto px-4 py-3 flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <i class="fas fa-spa text-rose-500 text-2xl"></i> | |
| <h1 class="text-xl font-bold text-gray-800">Love Flowers</h1> | |
| </div> | |
| <nav class="hidden md:flex space-x-8"> | |
| <a href="#" class="text-gray-700 hover:text-rose-500 transition">Home</a> | |
| <a href="#" class="text-gray-700 hover:text-rose-500 transition">Shop</a> | |
| <a href="#" class="text-gray-700 hover:text-rose-500 transition">About</a> | |
| <a href="#" class="text-gray-700 hover:text-rose-500 transition">Delivery</a> | |
| <a href="#" class="text-gray-700 hover:text-rose-500 transition">Contact</a> | |
| </nav> | |
| <div class="flex items-center space-x-4"> | |
| <button id="cart-btn" class="relative"> | |
| <i class="fas fa-shopping-cart text-gray-700 hover:text-rose-500 text-xl"></i> | |
| <span id="cart-count" class="absolute -top-2 -right-2 bg-rose-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center hidden">0</span> | |
| </button> | |
| <button class="md:hidden" id="menu-btn"> | |
| <i class="fas fa-bars text-gray-700 text-xl"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Mobile menu --> | |
| <div id="mobile-menu" class="hidden md:hidden bg-white py-2 px-4 shadow-md"> | |
| <a href="#" class="block py-2 text-gray-700 hover:text-rose-500">Home</a> | |
| <a href="#" class="block py-2 text-gray-700 hover:text-rose-500">Shop</a> | |
| <a href="#" class="block py-2 text-gray-700 hover:text-rose-500">About</a> | |
| <a href="#" class="block py-2 text-gray-700 hover:text-rose-500">Delivery</a> | |
| <a href="#" class="block py-2 text-gray-700 hover:text-rose-500">Contact</a> | |
| </div> | |
| </header> | |
| <!-- Hero Section --> | |
| <section class="hero text-white py-20 md:py-32"> | |
| <div class="container mx-auto px-4 text-center"> | |
| <h1 class="text-4xl md:text-6xl font-bold mb-4">Fresh Flowers for Special Moments</h1> | |
| <p class="text-xl md:text-2xl mb-8 max-w-2xl mx-auto">Beautiful floral arrangements delivered to your door in Aktau</p> | |
| <button class="bg-rose-500 hover:bg-rose-600 text-white font-bold py-3 px-8 rounded-full text-lg transition">Shop Now</button> | |
| </div> | |
| </section> | |
| <!-- Categories --> | |
| <section class="py-12 bg-white"> | |
| <div class="container mx-auto px-4"> | |
| <h2 class="text-3xl font-bold text-center mb-10">Our Categories</h2> | |
| <div class="flex flex-wrap justify-center gap-4 mb-10"> | |
| <button class="category-btn active px-6 py-2 rounded-full border border-gray-300 hover:bg-rose-500 hover:text-white transition">All</button> | |
| <button class="category-btn px-6 py-2 rounded-full border border-gray-300 hover:bg-rose-500 hover:text-white transition">Roses</button> | |
| <button class="category-btn px-6 py-2 rounded-full border border-gray-300 hover:bg-rose-500 hover:text-white transition">Tulips</button> | |
| <button class="category-btn px-6 py-2 rounded-full border border-gray-300 hover:bg-rose-500 hover:text-white transition">Wedding</button> | |
| <button class="category-btn px-6 py-2 rounded-full border border-gray-300 hover:bg-rose-500 hover:text-white transition">Birthday</button> | |
| <button class="category-btn px-6 py-2 rounded-full border border-gray-300 hover:bg-rose-500 hover:text-white transition">Special Occasions</button> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Products --> | |
| <section class="py-12 bg-gray-50"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex justify-between items-center mb-10"> | |
| <h2 class="text-3xl font-bold">Popular Arrangements</h2> | |
| <div class="flex space-x-2"> | |
| <button class="p-2 rounded-full bg-white border border-gray-300 hover:bg-gray-100"> | |
| <i class="fas fa-chevron-left"></i> | |
| </button> | |
| <button class="p-2 rounded-full bg-white border border-gray-300 hover:bg-gray-100"> | |
| <i class="fas fa-chevron-right"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8"> | |
| <!-- Product 1 --> | |
| <div class="product-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1526047932273-341f137a1431?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Rose Bouquet" class="w-full h-64 object-cover"> | |
| <div class="absolute top-2 right-2 bg-rose-500 text-white text-xs font-bold px-2 py-1 rounded">New</div> | |
| </div> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-lg mb-1">Elegant Rose Bouquet</h3> | |
| <div class="flex items-center mb-2"> | |
| <div class="flex text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star-half-alt"></i> | |
| </div> | |
| <span class="text-gray-600 text-sm ml-2">(24 reviews)</span> | |
| </div> | |
| <p class="text-gray-600 mb-4">A stunning arrangement of 25 premium roses with decorative greens</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-lg">12,500 ₸</span> | |
| <button class="add-to-cart bg-rose-500 hover:bg-rose-600 text-white px-4 py-2 rounded-full transition" data-id="1" data-name="Elegant Rose Bouquet" data-price="12500"> | |
| <i class="fas fa-plus"></i> Add | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Product 2 --> | |
| <div class="product-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1490750967868-88aa4486c946?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Spring Tulips" class="w-full h-64 object-cover"> | |
| </div> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-lg mb-1">Spring Tulip Collection</h3> | |
| <div class="flex items-center mb-2"> | |
| <div class="flex text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="far fa-star"></i> | |
| </div> | |
| <span class="text-gray-600 text-sm ml-2">(18 reviews)</span> | |
| </div> | |
| <p class="text-gray-600 mb-4">Vibrant mix of colorful tulips that bring spring indoors</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-lg">9,800 ₸</span> | |
| <button class="add-to-cart bg-rose-500 hover:bg-rose-600 text-white px-4 py-2 rounded-full transition" data-id="2" data-name="Spring Tulip Collection" data-price="9800"> | |
| <i class="fas fa-plus"></i> Add | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Product 3 --> | |
| <div class="product-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1519374085404-8d0ef355e52f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Wedding Bouquet" class="w-full h-64 object-cover"> | |
| <div class="absolute top-2 right-2 bg-green-500 text-white text-xs font-bold px-2 py-1 rounded">Bestseller</div> | |
| </div> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-lg mb-1">Wedding White Elegance</h3> | |
| <div class="flex items-center mb-2"> | |
| <div class="flex text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| </div> | |
| <span class="text-gray-600 text-sm ml-2">(42 reviews)</span> | |
| </div> | |
| <p class="text-gray-600 mb-4">Luxurious white roses and lilies for the perfect wedding bouquet</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-lg">18,900 ₸</span> | |
| <button class="add-to-cart bg-rose-500 hover:bg-rose-600 text-white px-4 py-2 rounded-full transition" data-id="3" data-name="Wedding White Elegance" data-price="18900"> | |
| <i class="fas fa-plus"></i> Add | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Product 4 --> | |
| <div class="product-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1455587734955-081b22074882?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Birthday Flowers" class="w-full h-64 object-cover"> | |
| </div> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-lg mb-1">Happy Birthday Mix</h3> | |
| <div class="flex items-center mb-2"> | |
| <div class="flex text-yellow-400"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| </div> | |
| <span class="text-gray-600 text-sm ml-2">(36 reviews)</span> | |
| </div> | |
| <p class="text-gray-600 mb-4">Colorful mix of seasonal flowers perfect for birthday celebrations</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-lg">11,200 ₸</span> | |
| <button class="add-to-cart bg-rose-500 hover:bg-rose-600 text-white px-4 py-2 rounded-full transition" data-id="4" data-name="Happy Birthday Mix" data-price="11200"> | |
| <i class="fas fa-plus"></i> Add | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Features --> | |
| <section class="py-16 bg-white"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div class="text-center p-6 rounded-lg bg-gray-50"> | |
| <div class="bg-rose-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i class="fas fa-truck text-rose-500 text-2xl"></i> | |
| </div> | |
| <h3 class="font-bold text-xl mb-2">Free Delivery</h3> | |
| <p class="text-gray-600">Free flower delivery in Aktau for orders over 10,000 ₸</p> | |
| </div> | |
| <div class="text-center p-6 rounded-lg bg-gray-50"> | |
| <div class="bg-rose-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i class="fas fa-gem text-rose-500 text-2xl"></i> | |
| </div> | |
| <h3 class="font-bold text-xl mb-2">Fresh Flowers</h3> | |
| <p class="text-gray-600">We use only the freshest flowers from trusted suppliers</p> | |
| </div> | |
| <div class="text-center p-6 rounded-lg bg-gray-50"> | |
| <div class="bg-rose-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i class="fas fa-headset text-rose-500 text-2xl"></i> | |
| </div> | |
| <h3 class="font-bold text-xl mb-2">24/7 Support</h3> | |
| <p class="text-gray-600">Our florists are always ready to help with your order</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Testimonials --> | |
| <section class="py-16 bg-rose-50"> | |
| <div class="container mx-auto px-4"> | |
| <h2 class="text-3xl font-bold text-center mb-12">What Our Customers Say</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | |
| <div class="bg-white p-6 rounded-lg shadow-sm"> | |
| <div class="flex items-center mb-4"> | |
| <div class="flex text-yellow-400 mr-2"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| </div> | |
| <span class="text-gray-500 text-sm">2 days ago</span> | |
| </div> | |
| <p class="text-gray-700 mb-4">"The flowers were absolutely stunning and arrived right on time for my anniversary. My wife was thrilled!"</p> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-gray-300 mr-3 overflow-hidden"> | |
| <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Customer" class="w-full h-full object-cover"> | |
| </div> | |
| <div> | |
| <h4 class="font-bold">Askar K.</h4> | |
| <p class="text-gray-500 text-sm">Aktau</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-lg shadow-sm"> | |
| <div class="flex items-center mb-4"> | |
| <div class="flex text-yellow-400 mr-2"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| </div> | |
| <span class="text-gray-500 text-sm">1 week ago</span> | |
| </div> | |
| <p class="text-gray-700 mb-4">"I ordered flowers for my mother's birthday. They were fresh and beautiful, exactly as pictured. Delivery was prompt too."</p> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-gray-300 mr-3 overflow-hidden"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Customer" class="w-full h-full object-cover"> | |
| </div> | |
| <div> | |
| <h4 class="font-bold">Aigerim S.</h4> | |
| <p class="text-gray-500 text-sm">Aktau</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-lg shadow-sm"> | |
| <div class="flex items-center mb-4"> | |
| <div class="flex text-yellow-400 mr-2"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star-half-alt"></i> | |
| </div> | |
| <span class="text-gray-500 text-sm">3 weeks ago</span> | |
| </div> | |
| <p class="text-gray-700 mb-4">"The wedding bouquet was perfect! The florist understood exactly what I wanted and created something even more beautiful than I imagined."</p> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-gray-300 mr-3 overflow-hidden"> | |
| <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Customer" class="w-full h-full object-cover"> | |
| </div> | |
| <div> | |
| <h4 class="font-bold">Madina T.</h4> | |
| <p class="text-gray-500 text-sm">Aktau</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- CTA --> | |
| <section class="py-16 bg-rose-500 text-white"> | |
| <div class="container mx-auto px-4 text-center"> | |
| <h2 class="text-3xl font-bold mb-4">Ready to Brighten Someone's Day?</h2> | |
| <p class="text-xl mb-8 max-w-2xl mx-auto">Order beautiful flowers today and we'll deliver them fresh to your loved one's doorstep.</p> | |
| <button class="bg-white text-rose-500 hover:bg-gray-100 font-bold py-3 px-8 rounded-full text-lg transition">Order Now</button> | |
| </div> | |
| </section> | |
| <!-- Footer --> | |
| <footer class="bg-gray-900 text-white pt-16 pb-8"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8"> | |
| <div> | |
| <div class="flex items-center space-x-2 mb-4"> | |
| <i class="fas fa-spa text-rose-500 text-2xl"></i> | |
| <h3 class="text-xl font-bold">Love Flowers</h3> | |
| </div> | |
| <p class="text-gray-400 mb-4">Premium florist in Aktau delivering fresh flowers and happiness since 2015.</p> | |
| <div class="flex space-x-4"> | |
| <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram text-xl"></i></a> | |
| <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook text-xl"></i></a> | |
| <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-whatsapp text-xl"></i></a> | |
| </div> | |
| </div> | |
| <div> | |
| <h4 class="font-bold text-lg mb-4">Shop</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white">All Flowers</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Roses</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Tulips</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Wedding</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Birthday</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="font-bold text-lg mb-4">Information</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white">About Us</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Delivery Information</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Privacy Policy</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Terms & Conditions</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white">Contact Us</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="font-bold text-lg mb-4">Contact</h4> | |
| <ul class="space-y-2 text-gray-400"> | |
| <li class="flex items-start"> | |
| <i class="fas fa-map-marker-alt mt-1 mr-3"></i> | |
| <span>123 Flower Street, Aktau, Kazakhstan</span> | |
| </li> | |
| <li class="flex items-center"> | |
| <i class="fas fa-phone-alt mr-3"></i> | |
| <span>+7 777 123 4567</span> | |
| </li> | |
| <li class="flex items-center"> | |
| <i class="fas fa-envelope mr-3"></i> | |
| <span>info@loveflowers.kz</span> | |
| </li> | |
| <li class="flex items-center"> | |
| <i class="fas fa-clock mr-3"></i> | |
| <span>Daily 9:00 - 20:00</span> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-800 pt-8 text-center text-gray-500"> | |
| <p>© 2023 Love Flowers. All rights reserved.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <!-- Shopping Cart Sidebar --> | |
| <div id="cart-sidebar" class="fixed top-0 right-0 h-full w-full md:w-96 bg-white shadow-lg transform translate-x-full transition-transform duration-300 z-50"> | |
| <div class="p-6 h-full flex flex-col"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-xl font-bold">Your Cart</h3> | |
| <button id="close-cart" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times text-xl"></i> | |
| </button> | |
| </div> | |
| <div id="cart-items" class="flex-grow overflow-y-auto mb-4"> | |
| <!-- Cart items will be added here dynamically --> | |
| <div class="text-center py-10 text-gray-500"> | |
| <i class="fas fa-shopping-cart text-4xl mb-4"></i> | |
| <p>Your cart is empty</p> | |
| </div> | |
| </div> | |
| <div class="border-t pt-4"> | |
| <div class="flex justify-between mb-2"> | |
| <span class="font-bold">Subtotal:</span> | |
| <span id="cart-subtotal">0 ₸</span> | |
| </div> | |
| <div class="flex justify-between mb-4"> | |
| <span class="font-bold">Delivery:</span> | |
| <span id="cart-delivery">Free</span> | |
| </div> | |
| <div class="flex justify-between text-lg font-bold mb-6"> | |
| <span>Total:</span> | |
| <span id="cart-total">0 ₸</span> | |
| </div> | |
| <button id="checkout-btn" class="w-full bg-rose-500 hover:bg-rose-600 text-white py-3 rounded-full font-bold transition">Proceed to Checkout</button> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="cart-overlay" class="hidden fixed inset-0 bg-black bg-opacity-50 z-40"></div> | |
| <script> | |
| // Mobile menu toggle | |
| const menuBtn = document.getElementById('menu-btn'); | |
| const mobileMenu = document.getElementById('mobile-menu'); | |
| menuBtn.addEventListener('click', () => { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| // Category buttons | |
| const categoryBtns = document.querySelectorAll('.category-btn'); | |
| categoryBtns.forEach(btn => { | |
| btn.addEventListener('click', () => { | |
| categoryBtns.forEach(b => b.classList.remove('active')); | |
| btn.classList.add('active'); | |
| }); | |
| }); | |
| // Shopping cart functionality | |
| const cartBtn = document.getElementById('cart-btn'); | |
| const closeCartBtn = document.getElementById('close-cart'); | |
| const cartSidebar = document.getElementById('cart-sidebar'); | |
| const cartOverlay = document.getElementById('cart-overlay'); | |
| const cartCount = document.getElementById('cart-count'); | |
| const addToCartBtns = document.querySelectorAll('.add-to-cart'); | |
| let cart = []; | |
| // Toggle cart sidebar | |
| cartBtn.addEventListener('click', () => { | |
| cartSidebar.classList.remove('translate-x-full'); | |
| cartOverlay.classList.remove('hidden'); | |
| document.body.style.overflow = 'hidden'; | |
| }); | |
| closeCartBtn.addEventListener('click', () => { | |
| cartSidebar.classList.add('translate-x-full'); | |
| cartOverlay.classList.add('hidden'); | |
| document.body.style.overflow = ''; | |
| }); | |
| cartOverlay.addEventListener('click', () => { | |
| cartSidebar.classList.add('translate-x-full'); | |
| cartOverlay.classList.add('hidden'); | |
| document.body.style.overflow = ''; | |
| }); | |
| // Add to cart functionality | |
| addToCartBtns.forEach(btn => { | |
| btn.addEventListener('click', () => { | |
| const id = btn.getAttribute('data-id'); | |
| const name = btn.getAttribute('data-name'); | |
| const price = parseInt(btn.getAttribute('data-price')); | |
| // Check if item already in cart | |
| const existingItem = cart.find(item => item.id === id); | |
| if (existingItem) { | |
| existingItem.quantity += 1; | |
| } else { | |
| cart.push({ | |
| id, | |
| name, | |
| price, | |
| quantity: 1 | |
| }); | |
| } | |
| updateCart(); | |
| // Show cart sidebar when adding first item | |
| if (cart.length === 1) { | |
| cartSidebar.classList.remove('translate-x-full'); | |
| cartOverlay.classList.remove('hidden'); | |
| document.body.style.overflow = 'hidden'; | |
| } | |
| // Animation feedback | |
| btn.innerHTML = '<i class="fas fa-check"></i> Added'; | |
| btn.classList.remove('bg-rose-500'); | |
| btn.classList.add('bg-green-500'); | |
| setTimeout(() => { | |
| btn.innerHTML = '<i class="fas fa-plus"></i> Add'; | |
| btn.classList.remove('bg-green-500'); | |
| btn.classList.add('bg-rose-500'); | |
| }, 1000); | |
| }); | |
| }); | |
| // Update cart UI | |
| function updateCart() { | |
| const cartItemsContainer = document.getElementById('cart-items'); | |
| const cartSubtotal = document.getElementById('cart-subtotal'); | |
| const cartTotal = document.getElementById('cart-total'); | |
| // Calculate totals | |
| const subtotal = cart.reduce((sum, item) => sum + (item.price * item.quantity), 0); | |
| const total = subtotal; // Could add delivery fee here | |
| // Update cart count | |
| const itemCount = cart.reduce((sum, item) => sum + item.quantity, 0); | |
| if (itemCount > 0) { | |
| cartCount.textContent = itemCount; | |
| cartCount.classList.remove('hidden'); | |
| } else { | |
| cartCount.classList.add('hidden'); | |
| } | |
| // Update cart items | |
| if (cart.length > 0) { | |
| cartItemsContainer.innerHTML = ''; | |
| cart.forEach(item => { | |
| const cartItem = document.createElement('div'); | |
| cartItem.className = 'flex justify-between items-center py-4 border-b'; | |
| cartItem.innerHTML = ` | |
| <div> | |
| <h4 class="font-medium">${item.name}</h4> | |
| <div class="flex items-center mt-1"> | |
| <button class="decrease-quantity text-gray-500 hover:text-rose-500 px-2" data-id="${item.id}"> | |
| <i class="fas fa-minus text-xs"></i> | |
| </button> | |
| <span class="quantity mx-2">${item.quantity}</span> | |
| <button class="increase-quantity text-gray-500 hover:text-rose-500 px-2" data-id="${item.id}"> | |
| <i class="fas fa-plus text-xs"></i> | |
| </button> | |
| <span class="text-gray-500 mx-2">×</span> | |
| <span>${item.price.toLocaleString()} ₸</span> | |
| </div> | |
| </div> | |
| <div class="font-bold">${(item.price * item.quantity).toLocaleString()} ₸</div> | |
| `; | |
| cartItemsContainer.appendChild(cartItem); | |
| }); | |
| // Add event listeners to quantity buttons | |
| document.querySelectorAll('.increase-quantity').forEach(btn => { | |
| btn.addEventListener('click', () => { | |
| const id = btn.getAttribute('data-id'); | |
| const item = cart.find(item => item.id === id); | |
| if (item) { | |
| item.quantity += 1; | |
| updateCart(); | |
| } | |
| }); | |
| }); | |
| document.querySelectorAll('.decrease-quantity').forEach(btn => { | |
| btn.addEventListener('click', () => { | |
| const id = btn.getAttribute('data-id'); | |
| const itemIndex = cart.findIndex(item => item.id === id); | |
| if (itemIndex !== -1) { | |
| if (cart[itemIndex].quantity > 1) { | |
| cart[itemIndex].quantity -= 1; | |
| } else { | |
| cart.splice(itemIndex, 1); | |
| } | |
| updateCart(); | |
| } | |
| }); | |
| }); | |
| } else { | |
| cartItemsContainer.innerHTML = ` | |
| <div class="text-center py-10 text-gray-500"> | |
| <i class="fas fa-shopping-cart text-4xl mb-4"></i> | |
| <p>Your cart is empty</p> | |
| </div> | |
| `; | |
| } | |
| // Update totals | |
| cartSubtotal.textContent = `${subtotal.toLocaleString()} ₸`; | |
| cartTotal.textContent = `${total.toLocaleString()} ₸`; | |
| // Update delivery text if needed | |
| if (subtotal >= 10000) { | |
| document.getElementById('cart-delivery').textContent = 'Free'; | |
| } else { | |
| document.getElementById('cart-delivery').textContent = '2,000 ₸'; | |
| // You would add this to total if implementing delivery fees | |
| } | |
| } | |
| // Checkout button | |
| document.getElementById('checkout-btn').addEventListener('click', () => { | |
| if (cart.length > 0) { | |
| alert('Proceeding to checkout! In a real implementation, this would redirect to a checkout page.'); | |
| // Here you would typically redirect to a checkout page or show a checkout form | |
| } else { | |
| alert('Your cart is empty. Please add some items first.'); | |
| } | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Hazar/c" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |