gg / index.html
NillyG's picture
make me a website to sell exclusive nike shoes - Initial Deployment
7924db5 verified
Raw
History Blame Contribute Delete
33.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nike Elite | Exclusive Sneakers</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.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1600269452121-1f5d1415f084?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
background-size: cover;
background-position: center;
}
.shoe-card:hover {
transform: translateY(-10px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.cart-panel {
transition: all 0.3s ease;
transform: translateX(100%);
}
.cart-panel.open {
transform: translateX(0);
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Navigation -->
<nav class="bg-white shadow-md sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16 items-center">
<div class="flex items-center">
<div class="flex-shrink-0">
<img class="h-8 w-auto" src="https://www.freepnglogos.com/uploads/nike-logo-0.png" alt="Nike Logo">
</div>
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="#" class="text-black px-3 py-2 rounded-md text-sm font-medium">Home</a>
<a href="#" class="text-gray-600 hover:text-black px-3 py-2 rounded-md text-sm font-medium">Men</a>
<a href="#" class="text-gray-600 hover:text-black px-3 py-2 rounded-md text-sm font-medium">Women</a>
<a href="#" class="text-gray-600 hover:text-black px-3 py-2 rounded-md text-sm font-medium">Kids</a>
<a href="#" class="text-gray-600 hover:text-black px-3 py-2 rounded-md text-sm font-medium">Collections</a>
</div>
</div>
</div>
<div class="hidden md:block">
<div class="ml-4 flex items-center md:ml-6">
<button class="p-1 rounded-full text-gray-600 hover:text-black focus:outline-none">
<i class="fas fa-search"></i>
</button>
<button id="cart-btn" class="ml-3 p-1 rounded-full text-gray-600 hover:text-black focus:outline-none relative">
<i class="fas fa-shopping-cart"></i>
<span id="cart-count" class="absolute -top-2 -right-2 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">0</span>
</button>
<button class="ml-3 p-1 rounded-full text-gray-600 hover:text-black focus:outline-none">
<i class="fas fa-user"></i>
</button>
</div>
</div>
<div class="-mr-2 flex md:hidden">
<button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-600 hover:text-black focus:outline-none">
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="hero text-white py-20 md:py-32">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="md:w-1/2">
<h1 class="text-4xl md:text-6xl font-bold mb-4">Exclusive Nike Sneakers</h1>
<p class="text-lg md:text-xl mb-8">Discover limited edition and premium quality Nike shoes that elevate your style and performance.</p>
<button class="bg-white text-black font-bold py-3 px-8 rounded-full hover:bg-gray-100 transition duration-300">Shop Now</button>
</div>
</div>
</section>
<!-- Featured Section -->
<section class="py-12 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-center mb-12">Featured Collections</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="relative overflow-hidden rounded-lg shadow-lg group">
<img src="https://images.unsplash.com/photo-1600185365483-26d7a4cc7519?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1025&q=80" alt="Air Jordan" class="w-full h-64 object-cover">
<div class="absolute inset-0 bg-black bg-opacity-40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
<button class="bg-white text-black font-bold py-2 px-6 rounded-full">View Collection</button>
</div>
<div class="absolute bottom-0 left-0 right-0 bg-white p-4">
<h3 class="font-bold text-lg">Air Jordan</h3>
<p class="text-gray-600">Legendary performance</p>
</div>
</div>
<div class="relative overflow-hidden rounded-lg shadow-lg group">
<img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80" alt="Air Force" class="w-full h-64 object-cover">
<div class="absolute inset-0 bg-black bg-opacity-40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
<button class="bg-white text-black font-bold py-2 px-6 rounded-full">View Collection</button>
</div>
<div class="absolute bottom-0 left-0 right-0 bg-white p-4">
<h3 class="font-bold text-lg">Air Force 1</h3>
<p class="text-gray-600">Classic style</p>
</div>
</div>
<div class="relative overflow-hidden rounded-lg shadow-lg group">
<img src="https://images.unsplash.com/photo-1600269452121-1f5d1415f084?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Dunk" class="w-full h-64 object-cover">
<div class="absolute inset-0 bg-black bg-opacity-40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
<button class="bg-white text-black font-bold py-2 px-6 rounded-full">View Collection</button>
</div>
<div class="absolute bottom-0 left-0 right-0 bg-white p-4">
<h3 class="font-bold text-lg">Nike Dunk</h3>
<p class="text-gray-600">Skate culture</p>
</div>
</div>
</div>
</div>
</section>
<!-- Products Section -->
<section class="py-12 bg-gray-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center mb-8">
<h2 class="text-3xl font-bold">Latest Drops</h2>
<div class="flex space-x-2">
<button class="px-4 py-2 bg-black text-white rounded-full text-sm">All</button>
<button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm">Men</button>
<button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm">Women</button>
<button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm">Kids</button>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
<!-- Product 1 -->
<div class="shoe-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300">
<div class="relative">
<img src="https://images.unsplash.com/photo-1605348532760-6753d2c43329?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=687&q=80" alt="Nike Air Max" class="w-full h-64 object-cover">
<div class="absolute top-2 right-2 bg-red-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">Nike Air Max 270</h3>
<p class="text-gray-600 text-sm mb-2">Men's Running Shoes</p>
<div class="flex justify-between items-center">
<span class="font-bold text-lg">$150</span>
<button class="add-to-cart bg-black text-white px-3 py-1 rounded-full text-sm hover:bg-gray-800" data-id="1" data-name="Nike Air Max 270" data-price="150" data-image="https://images.unsplash.com/photo-1605348532760-6753d2c43329?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=687&q=80">
Add to Cart
</button>
</div>
</div>
</div>
<!-- Product 2 -->
<div class="shoe-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300">
<div class="relative">
<img src="https://images.unsplash.com/photo-1600185365483-26d7a4cc7519?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1025&q=80" alt="Air Jordan 1" class="w-full h-64 object-cover">
<div class="absolute top-2 right-2 bg-yellow-500 text-white text-xs font-bold px-2 py-1 rounded">LIMITED</div>
</div>
<div class="p-4">
<h3 class="font-bold text-lg mb-1">Air Jordan 1 Retro</h3>
<p class="text-gray-600 text-sm mb-2">Men's Basketball Shoes</p>
<div class="flex justify-between items-center">
<span class="font-bold text-lg">$180</span>
<button class="add-to-cart bg-black text-white px-3 py-1 rounded-full text-sm hover:bg-gray-800" data-id="2" data-name="Air Jordan 1 Retro" data-price="180" data-image="https://images.unsplash.com/photo-1600185365483-26d7a4cc7519?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1025&q=80">
Add to Cart
</button>
</div>
</div>
</div>
<!-- Product 3 -->
<div class="shoe-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300">
<div class="relative">
<img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80" alt="Nike Air Force" class="w-full h-64 object-cover">
</div>
<div class="p-4">
<h3 class="font-bold text-lg mb-1">Nike Air Force 1 '07</h3>
<p class="text-gray-600 text-sm mb-2">Women's Lifestyle Shoes</p>
<div class="flex justify-between items-center">
<span class="font-bold text-lg">$120</span>
<button class="add-to-cart bg-black text-white px-3 py-1 rounded-full text-sm hover:bg-gray-800" data-id="3" data-name="Nike Air Force 1 '07" data-price="120" data-image="https://images.unsplash.com/photo-1542291026-7eec264c27ff?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80">
Add to Cart
</button>
</div>
</div>
</div>
<!-- Product 4 -->
<div class="shoe-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300">
<div class="relative">
<img src="https://images.unsplash.com/photo-1600269452121-1f5d1415f084?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Nike Dunk Low" class="w-full h-64 object-cover">
<div class="absolute top-2 right-2 bg-blue-500 text-white text-xs font-bold px-2 py-1 rounded">SALE</div>
</div>
<div class="p-4">
<h3 class="font-bold text-lg mb-1">Nike Dunk Low Retro</h3>
<p class="text-gray-600 text-sm mb-2">Unisex Skate Shoes</p>
<div class="flex justify-between items-center">
<span class="font-bold text-lg">$110</span>
<button class="add-to-cart bg-black text-white px-3 py-1 rounded-full text-sm hover:bg-gray-800" data-id="4" data-name="Nike Dunk Low Retro" data-price="110" data-image="https://images.unsplash.com/photo-1600269452121-1f5d1415f084?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80">
Add to Cart
</button>
</div>
</div>
</div>
</div>
<div class="text-center mt-10">
<button class="border-2 border-black text-black font-bold py-2 px-8 rounded-full hover:bg-black hover:text-white transition duration-300">
View All Products
</button>
</div>
</div>
</section>
<!-- Testimonials -->
<section class="py-12 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-center mb-12">What Our Customers Say</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="bg-gray-50 p-6 rounded-lg shadow-sm">
<div class="flex items-center mb-4">
<div class="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>
</div>
<p class="text-gray-600 mb-4">"The quality of these Nike shoes is unmatched. I've never had a more comfortable pair of sneakers in my life!"</p>
<div class="flex items-center">
<img class="h-10 w-10 rounded-full mr-3" src="https://randomuser.me/api/portraits/men/32.jpg" alt="Customer">
<div>
<h4 class="font-bold">Michael Johnson</h4>
<p class="text-gray-500 text-sm">Verified Buyer</p>
</div>
</div>
</div>
<div class="bg-gray-50 p-6 rounded-lg shadow-sm">
<div class="flex items-center mb-4">
<div class="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>
</div>
<p class="text-gray-600 mb-4">"The limited edition Jordans I got from here are absolutely stunning. They arrived quickly and in perfect condition."</p>
<div class="flex items-center">
<img class="h-10 w-10 rounded-full mr-3" src="https://randomuser.me/api/portraits/women/44.jpg" alt="Customer">
<div>
<h4 class="font-bold">Sarah Williams</h4>
<p class="text-gray-500 text-sm">Verified Buyer</p>
</div>
</div>
</div>
<div class="bg-gray-50 p-6 rounded-lg shadow-sm">
<div class="flex items-center mb-4">
<div class="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>
</div>
<p class="text-gray-600 mb-4">"Great selection of exclusive Nikes. The customer service was excellent when I had questions about sizing."</p>
<div class="flex items-center">
<img class="h-10 w-10 rounded-full mr-3" src="https://randomuser.me/api/portraits/men/75.jpg" alt="Customer">
<div>
<h4 class="font-bold">David Kim</h4>
<p class="text-gray-500 text-sm">Verified Buyer</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Newsletter -->
<section class="py-12 bg-black text-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="md:flex md:items-center md:justify-between">
<div class="md:w-1/2 mb-6 md:mb-0">
<h2 class="text-2xl font-bold mb-2">Get Exclusive Drops</h2>
<p>Subscribe to our newsletter to be the first to know about new releases and special offers.</p>
</div>
<div class="md:w-1/2">
<form class="flex">
<input type="email" placeholder="Your email address" class="px-4 py-3 w-full rounded-l focus:outline-none text-black">
<button type="submit" class="bg-red-500 hover:bg-red-600 px-6 py-3 rounded-r font-bold">Subscribe</button>
</form>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="font-bold text-lg mb-4">Nike Elite</h3>
<p class="text-gray-400">The premier destination for exclusive and limited edition Nike sneakers.</p>
<div class="flex space-x-4 mt-4">
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-pinterest-p"></i></a>
</div>
</div>
<div>
<h3 class="font-bold text-lg mb-4">Shop</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">All Products</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Featured</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">New Arrivals</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Sale</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Collections</a></li>
</ul>
</div>
<div>
<h3 class="font-bold text-lg mb-4">Help</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">FAQs</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Shipping</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Returns</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Size Guide</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Contact Us</a></li>
</ul>
</div>
<div>
<h3 class="font-bold text-lg mb-4">About</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">Our Story</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Authenticity</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Careers</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">Privacy Policy</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
<p>&copy; 2023 Nike Elite. All rights reserved.</p>
</div>
</div>
</footer>
<!-- Shopping Cart Panel -->
<div id="cart-panel" class="cart-panel fixed top-0 right-0 w-full md:w-1/3 h-full bg-white shadow-xl z-50 overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold">Your Cart</h2>
<button id="close-cart" class="text-gray-500 hover:text-black">
<i class="fas fa-times"></i>
</button>
</div>
<div id="cart-items" class="mb-6">
<!-- Cart items will be added here dynamically -->
<div class="text-center py-10">
<i class="fas fa-shopping-cart text-4xl text-gray-300 mb-4"></i>
<p class="text-gray-500">Your cart is empty</p>
</div>
</div>
<div class="border-t border-gray-200 pt-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Subtotal</span>
<span id="cart-subtotal" class="font-bold">$0.00</span>
</div>
<div class="flex justify-between mb-4">
<span class="text-gray-600">Shipping</span>
<span class="font-bold">Free</span>
</div>
<div class="flex justify-between text-lg font-bold mb-6">
<span>Total</span>
<span id="cart-total">$0.00</span>
</div>
<button class="w-full bg-black text-white py-3 rounded-full font-bold hover:bg-gray-800 transition duration-300">
Checkout
</button>
</div>
</div>
</div>
<!-- Overlay -->
<div id="overlay" class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden"></div>
<!-- Success Notification -->
<div id="success-notification" class="fixed bottom-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg hidden z-50">
<div class="flex items-center">
<i class="fas fa-check-circle mr-2"></i>
<span>Item added to cart!</span>
</div>
</div>
<script>
// Shopping Cart Functionality
document.addEventListener('DOMContentLoaded', function() {
const cartBtn = document.getElementById('cart-btn');
const closeCartBtn = document.getElementById('close-cart');
const cartPanel = document.getElementById('cart-panel');
const overlay = document.getElementById('overlay');
const addToCartBtns = document.querySelectorAll('.add-to-cart');
const cartItemsContainer = document.getElementById('cart-items');
const cartSubtotal = document.getElementById('cart-subtotal');
const cartTotal = document.getElementById('cart-total');
const cartCount = document.getElementById('cart-count');
const successNotification = document.getElementById('success-notification');
let cart = [];
// Toggle Cart Panel
cartBtn.addEventListener('click', function() {
cartPanel.classList.add('open');
overlay.classList.remove('hidden');
document.body.style.overflow = 'hidden';
});
closeCartBtn.addEventListener('click', function() {
cartPanel.classList.remove('open');
overlay.classList.add('hidden');
document.body.style.overflow = 'auto';
});
overlay.addEventListener('click', function() {
cartPanel.classList.remove('open');
overlay.classList.add('hidden');
document.body.style.overflow = 'auto';
});
// Add to Cart
addToCartBtns.forEach(btn => {
btn.addEventListener('click', function() {
const id = this.getAttribute('data-id');
const name = this.getAttribute('data-name');
const price = parseFloat(this.getAttribute('data-price'));
const image = this.getAttribute('data-image');
// Check if item already exists in cart
const existingItem = cart.find(item => item.id === id);
if (existingItem) {
existingItem.quantity += 1;
} else {
cart.push({
id,
name,
price,
image,
quantity: 1
});
}
// Update UI
updateCartUI();
// Show success notification
successNotification.classList.remove('hidden');
setTimeout(() => {
successNotification.classList.add('hidden');
}, 3000);
});
});
// Update Cart UI
function updateCartUI() {
// Update cart count
const totalItems = cart.reduce((total, item) => total + item.quantity, 0);
cartCount.textContent = totalItems;
// Update cart items
if (cart.length === 0) {
cartItemsContainer.innerHTML = `
<div class="text-center py-10">
<i class="fas fa-shopping-cart text-4xl text-gray-300 mb-4"></i>
<p class="text-gray-500">Your cart is empty</p>
</div>
`;
} else {
let itemsHTML = '';
cart.forEach(item => {
itemsHTML += `
<div class="flex items-center py-4 border-b border-gray-200">
<img src="${item.image}" alt="${item.name}" class="w-16 h-16 object-cover rounded">
<div class="ml-4 flex-1">
<h4 class="font-medium">${item.name}</h4>
<div class="flex justify-between items-center mt-1">
<div class="flex items-center">
<button class="decrease-quantity text-gray-500 px-2" data-id="${item.id}">
<i class="fas fa-minus text-xs"></i>
</button>
<span class="mx-2">${item.quantity}</span>
<button class="increase-quantity text-gray-500 px-2" data-id="${item.id}">
<i class="fas fa-plus text-xs"></i>
</button>
</div>
<span class="font-medium">$${(item.price * item.quantity).toFixed(2)}</span>
</div>
</div>
<button class="remove-item ml-4 text-gray-400 hover:text-black" data-id="${item.id}">
<i class="fas fa-times"></i>
</button>
</div>
`;
});
cartItemsContainer.innerHTML = itemsHTML;
// Add event listeners to new buttons
document.querySelectorAll('.decrease-quantity').forEach(btn => {
btn.addEventListener('click', function() {
const id = this.getAttribute('data-id');
const item = cart.find(item => item.id === id);
if (item.quantity > 1) {
item.quantity -= 1;
} else {
cart = cart.filter(item => item.id !== id);
}
updateCartUI();
});
});
document.querySelectorAll('.increase-quantity').forEach(btn => {
btn.addEventListener('click', function() {
const id = this.getAttribute('data-id');
const item = cart.find(item => item.id === id);
item.quantity += 1;
updateCartUI();
});
});
document.querySelectorAll('.remove-item').forEach(btn => {
btn.addEventListener('click', function() {
const id = this.getAttribute('data-id');
cart = cart.filter(item => item.id !== id);
updateCartUI();
});
});
}
// Update subtotal and total
const subtotal = cart.reduce((total, item) => total + (item.price * item.quantity), 0);
cartSubtotal.textContent = `$${subtotal.toFixed(2)}`;
cartTotal.textContent = `$${subtotal.toFixed(2)}`;
}
// Mobile menu toggle (placeholder for future implementation)
const mobileMenuBtn = document.querySelector('.md\\:-mr-2 button');
mobileMenuBtn.addEventListener('click', function() {
alert('Mobile menu would open here in a full implementation');
});
});
</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://deepsite.hf.co/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://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=NillyG/gg" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>