Spaces:
Running
Running
CRIE UM CARDAPIO INTERATIVO MODERNO E BONITO DA EMPRESA JAIME SUSHI,deliivery em Praia Grande - SP - COMIDAS CHINESAS, SESSÕES DE PRATOSM PORÇÕES E BEBIDAS, NÃO USE EMOJIS OU ÍCONES MAS FOTOS DE IA DOS PRODUTOS, CARRINHO DE COMPRAS COMO FORMAS DE PAGAMENTO E FINALIZA O PEDIDO NO WHATSAPP +5513997678009 - Initial Deployment
b779b7b verified Download index.html from Proimage/jaimesushi: direct link, hf CLI and curl.
- Browser
- Download file 27.4 kB
-
https://huggingface.co/spaces/Proimage/jaimesushi/resolve/main/index.html
- Command line
-
hf download hf://spaces/Proimage/jaimesushi/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Proimage/jaimesushi/resolve/main/index.html
27.4 kB
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Jaime Sushi - Cardápio Digital</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <style> | |
| .food-image { | |
| height: 180px; | |
| object-fit: cover; | |
| transition: transform 0.3s ease; | |
| } | |
| .food-card:hover .food-image { | |
| transform: scale(1.05); | |
| } | |
| .cart-item-enter { | |
| animation: slideIn 0.3s forwards; | |
| } | |
| .cart-item-exit { | |
| animation: slideOut 0.3s forwards; | |
| } | |
| @keyframes slideIn { | |
| from { transform: translateX(100%); opacity: 0; } | |
| to { transform: translateX(0); opacity: 1; } | |
| } | |
| @keyframes slideOut { | |
| from { transform: translateX(0); opacity: 1; } | |
| to { transform: translateX(100%); opacity: 0; } | |
| } | |
| .section-title { | |
| position: relative; | |
| display: inline-block; | |
| } | |
| .section-title:after { | |
| content: ''; | |
| position: absolute; | |
| width: 100%; | |
| height: 3px; | |
| bottom: -5px; | |
| left: 0; | |
| background: linear-gradient(90deg, #ef4444, #f97316); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <div class="container mx-auto px-4 py-8 max-w-6xl"> | |
| <!-- Header --> | |
| <header class="text-center mb-12"> | |
| <h1 class="text-4xl font-bold text-gray-800 mb-2">JAIME SUSHI</h1> | |
| <p class="text-lg text-gray-600 mb-4">Comida Chinesa e Japonesa • Delivery em Praia Grande - SP</p> | |
| <div class="flex justify-center space-x-4 mb-6"> | |
| <button id="showMenuBtn" class="px-6 py-2 bg-red-500 text-white rounded-full font-medium hover:bg-red-600 transition">Cardápio</button> | |
| <button id="showCartBtn" class="px-6 py-2 bg-amber-500 text-white rounded-full font-medium hover:bg-amber-600 transition">Meu Carrinho</button> | |
| </div> | |
| </header> | |
| <!-- Menu Sections --> | |
| <div id="menuContent"> | |
| <!-- Sushi Section --> | |
| <section class="mb-16"> | |
| <h2 class="section-title text-2xl font-bold text-gray-800 mb-8">SUSHIS</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <!-- Sushi Item 1 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1611143669185-af224c5e3252?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Sushi Salmão" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Sushi Salmão</h3> | |
| <p class="text-gray-600 mb-4">Tradicional sushi com salmão fresco e arroz temperado.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 12,90</span> | |
| <button onclick="addToCart('Sushi Salmão', 12.90, 'https://images.unsplash.com/photo-1611143669185-af224c5e3252?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Sushi Item 2 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1579586337278-3befd40fd17a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Sushi Atum" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Sushi Atum</h3> | |
| <p class="text-gray-600 mb-4">Delicioso sushi com atum fresco e arroz vinagrado.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 14,90</span> | |
| <button onclick="addToCart('Sushi Atum', 14.90, 'https://images.unsplash.com/photo-1579586337278-3befd40fd17a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Sushi Item 3 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1553621042-f6e147245754?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Sushi Camarão" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Sushi Camarão</h3> | |
| <p class="text-gray-600 mb-4">Sushi com camarão empanado e molho especial.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 16,90</span> | |
| <button onclick="addToCart('Sushi Camarão', 16.90, 'https://images.unsplash.com/photo-1553621042-f6e147245754?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Chinese Food Section --> | |
| <section class="mb-16"> | |
| <h2 class="section-title text-2xl font-bold text-gray-800 mb-8">COMIDAS CHINESAS</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <!-- Chinese Item 1 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1563245372-f21724e3856d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Yakissoba" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Yakissoba</h3> | |
| <p class="text-gray-600 mb-4">Macarrão com legumes, carne e molho especial.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 32,90</span> | |
| <button onclick="addToCart('Yakissoba', 32.90, 'https://images.unsplash.com/photo-1563245372-f21724e3856d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Chinese Item 2 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1585032226651-759b368d7246?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Frango Xadrez" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Frango Xadrez</h3> | |
| <p class="text-gray-600 mb-4">Frango com legumes e castanhas no molho especial.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 28,90</span> | |
| <button onclick="addToCart('Frango Xadrez', 28.90, 'https://images.unsplash.com/photo-1585032226651-759b368d7246?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Chinese Item 3 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1630911426143-bf0a072d0c3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Rolinho Primavera" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Rolinho Primavera</h3> | |
| <p class="text-gray-600 mb-4">6 unidades de rolinhos crocantes recheados.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 18,90</span> | |
| <button onclick="addToCart('Rolinho Primavera', 18.90, 'https://images.unsplash.com/photo-1630911426143-bf0a072d0c3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Drinks Section --> | |
| <section class="mb-16"> | |
| <h2 class="section-title text-2xl font-bold text-gray-800 mb-8">BEBIDAS</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <!-- Drink Item 1 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1566633806327-68e152aaf26d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Chá Gelado" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Chá Gelado</h3> | |
| <p class="text-gray-600 mb-4">Chá verde gelado com limão e mel.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 8,90</span> | |
| <button onclick="addToCart('Chá Gelado', 8.90, 'https://images.unsplash.com/photo-1566633806327-68e152aaf26d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Drink Item 2 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1553456558-afff85c51b8e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Refrigerante" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Refrigerante</h3> | |
| <p class="text-gray-600 mb-4">Lata 350ml - Coca-Cola, Guaraná ou Fanta.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 6,90</span> | |
| <button onclick="addToCart('Refrigerante', 6.90, 'https://images.unsplash.com/photo-1553456558-afff85c51b8e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Drink Item 3 --> | |
| <div class="food-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition"> | |
| <img src="https://images.unsplash.com/photo-1600271886742-f049cd451bba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Água Mineral" class="food-image w-full"> | |
| <div class="p-4"> | |
| <h3 class="font-bold text-xl text-gray-800 mb-2">Água Mineral</h3> | |
| <p class="text-gray-600 mb-4">Garrafa 500ml - Com ou sem gás.</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="font-bold text-red-500">R$ 4,90</span> | |
| <button onclick="addToCart('Água Mineral', 4.90, 'https://images.unsplash.com/photo-1600271886742-f049cd451bba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80')" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition">Adicionar</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </div> | |
| <!-- Shopping Cart (Hidden by default) --> | |
| <div id="cartContent" class="hidden bg-white rounded-lg shadow-lg p-6 max-w-2xl mx-auto"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-2xl font-bold text-gray-800">Meu Carrinho</h2> | |
| <button id="closeCartBtn" class="text-gray-500 hover:text-gray-700"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> | |
| </svg> | |
| </button> | |
| </div> | |
| <div id="cartItems" class="mb-6 max-h-96 overflow-y-auto"> | |
| <!-- Cart items will be added here dynamically --> | |
| <p id="emptyCartMessage" class="text-gray-500 text-center py-8">Seu carrinho está vazio</p> | |
| </div> | |
| <div class="border-t border-gray-200 pt-4"> | |
| <div class="flex justify-between mb-2"> | |
| <span class="font-medium text-gray-700">Subtotal:</span> | |
| <span id="subtotal" class="font-medium">R$ 0,00</span> | |
| </div> | |
| <div class="flex justify-between mb-4"> | |
| <span class="font-medium text-gray-700">Taxa de Entrega:</span> | |
| <span id="deliveryFee" class="font-medium">R$ 5,00</span> | |
| </div> | |
| <div class="flex justify-between text-lg font-bold text-gray-800 mb-6"> | |
| <span>Total:</span> | |
| <span id="total">R$ 5,00</span> | |
| </div> | |
| <div class="mb-6"> | |
| <h3 class="font-medium text-gray-700 mb-2">Forma de Pagamento:</h3> | |
| <div class="grid grid-cols-2 gap-2"> | |
| <button class="payment-method bg-gray-100 hover:bg-gray-200 py-2 px-4 rounded border border-gray-300 transition" data-method="Dinheiro">Dinheiro</button> | |
| <button class="payment-method bg-gray-100 hover:bg-gray-200 py-2 px-4 rounded border border-gray-300 transition" data-method="Cartão">Cartão</button> | |
| <button class="payment-method bg-gray-100 hover:bg-gray-200 py-2 px-4 rounded border border-gray-300 transition" data-method="PIX">PIX</button> | |
| <button class="payment-method bg-gray-100 hover:bg-gray-200 py-2 px-4 rounded border border-gray-300 transition" data-method="Débito">Débito</button> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h3 class="font-medium text-gray-700 mb-2">Endereço de Entrega:</h3> | |
| <textarea id="deliveryAddress" class="w-full p-3 border border-gray-300 rounded focus:ring-2 focus:ring-red-500 focus:border-transparent" rows="2" placeholder="Informe seu endereço completo"></textarea> | |
| </div> | |
| <button id="checkoutBtn" class="w-full py-3 bg-green-600 text-white font-bold rounded-lg hover:bg-green-700 transition flex items-center justify-center"> | |
| Finalizar Pedido via WhatsApp | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Cart functionality | |
| let cart = []; | |
| let selectedPaymentMethod = null; | |
| // DOM Elements | |
| const menuContent = document.getElementById('menuContent'); | |
| const cartContent = document.getElementById('cartContent'); | |
| const showMenuBtn = document.getElementById('showMenuBtn'); | |
| const showCartBtn = document.getElementById('showCartBtn'); | |
| const closeCartBtn = document.getElementById('closeCartBtn'); | |
| const cartItems = document.getElementById('cartItems'); | |
| const emptyCartMessage = document.getElementById('emptyCartMessage'); | |
| const subtotalElement = document.getElementById('subtotal'); | |
| const deliveryFeeElement = document.getElementById('deliveryFee'); | |
| const totalElement = document.getElementById('total'); | |
| const checkoutBtn = document.getElementById('checkoutBtn'); | |
| const deliveryAddress = document.getElementById('deliveryAddress'); | |
| const paymentMethods = document.querySelectorAll('.payment-method'); | |
| // Event Listeners | |
| showMenuBtn.addEventListener('click', () => { | |
| menuContent.classList.remove('hidden'); | |
| cartContent.classList.add('hidden'); | |
| }); | |
| showCartBtn.addEventListener('click', () => { | |
| menuContent.classList.add('hidden'); | |
| cartContent.classList.remove('hidden'); | |
| updateCart(); | |
| }); | |
| closeCartBtn.addEventListener('click', () => { | |
| cartContent.classList.add('hidden'); | |
| menuContent.classList.remove('hidden'); | |
| }); | |
| paymentMethods.forEach(method => { | |
| method.addEventListener('click', () => { | |
| paymentMethods.forEach(m => m.classList.remove('bg-red-500', 'text-white', 'border-red-500')); | |
| method.classList.add('bg-red-500', 'text-white', 'border-red-500'); | |
| selectedPaymentMethod = method.dataset.method; | |
| }); | |
| }); | |
| checkoutBtn.addEventListener('click', () => { | |
| if (cart.length === 0) { | |
| alert('Seu carrinho está vazio!'); | |
| return; | |
| } | |
| if (!selectedPaymentMethod) { | |
| alert('Selecione uma forma de pagamento!'); | |
| return; | |
| } | |
| if (!deliveryAddress.value.trim()) { | |
| alert('Informe o endereço de entrega!'); | |
| return; | |
| } | |
| const total = calculateTotal(); | |
| const orderDetails = generateOrderDetails(); | |
| const whatsappMessage = encodeURIComponent( | |
| `Olá, Jaime Sushi! Gostaria de fazer um pedido:\n\n` + | |
| `${orderDetails}\n\n` + | |
| `*Forma de Pagamento:* ${selectedPaymentMethod}\n` + | |
| `*Endereço de Entrega:* ${deliveryAddress.value}\n\n` + | |
| `*Total:* R$ ${total.toFixed(2)}` | |
| ); | |
| window.open(`https://wa.me/5513997678009?text=${whatsappMessage}`, '_blank'); | |
| }); | |
| // Functions | |
| function addToCart(name, price, image) { | |
| const existingItem = cart.find(item => item.name === name); | |
| if (existingItem) { | |
| existingItem.quantity += 1; | |
| } else { | |
| cart.push({ | |
| name, | |
| price, | |
| image, | |
| quantity: 1 | |
| }); | |
| } | |
| updateCart(); | |
| // Show cart automatically when adding first item | |
| if (cart.length === 1) { | |
| menuContent.classList.add('hidden'); | |
| cartContent.classList.remove('hidden'); | |
| } | |
| } | |
| function updateCart() { | |
| // Clear cart items | |
| cartItems.innerHTML = ''; | |
| if (cart.length === 0) { | |
| emptyCartMessage.classList.remove('hidden'); | |
| subtotalElement.textContent = 'R$ 0,00'; | |
| deliveryFeeElement.textContent = 'R$ 5,00'; | |
| totalElement.textContent = 'R$ 5,00'; | |
| return; | |
| } | |
| emptyCartMessage.classList.add('hidden'); | |
| // Add items to cart | |
| cart.forEach((item, index) => { | |
| const itemTotal = item.price * item.quantity; | |
| const cartItemElement = document.createElement('div'); | |
| cartItemElement.className = 'flex items-center py-4 border-b border-gray-200 cart-item-enter'; | |
| cartItemElement.innerHTML = ` | |
| <img src="${item.image}" alt="${item.name}" class="w-16 h-16 object-cover rounded"> | |
| <div class="ml-4 flex-grow"> | |
| <h3 class="font-medium text-gray-800">${item.name}</h3> | |
| <div class="flex items-center mt-1"> | |
| <button onclick="decreaseQuantity(${index})" class="text-gray-500 hover:text-red-500"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z" clip-rule="evenodd" /> | |
| </svg> | |
| </button> | |
| <span class="mx-2 text-gray-700">${item.quantity}</span> | |
| <button onclick="increaseQuantity(${index})" class="text-gray-500 hover:text-green-500"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z" clip-rule="evenodd" /> | |
| </svg> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="text-right"> | |
| <span class="font-medium text-gray-800">R$ ${itemTotal.toFixed(2)}</span> | |
| <button onclick="removeFromCart(${index})" class="ml-2 text-red-500 hover:text-red-700"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" /> | |
| </svg> | |
| </button> | |
| </div> | |
| `; | |
| cartItems.appendChild(cartItemElement); | |
| }); | |
| // Update totals | |
| const subtotal = calculateSubtotal(); | |
| const total = calculateTotal(); | |
| subtotalElement.textContent = `R$ ${subtotal.toFixed(2)}`; | |
| totalElement.textContent = `R$ ${total.toFixed(2)}`; | |
| } | |
| function increaseQuantity(index) { | |
| cart[index].quantity += 1; | |
| updateCart(); | |
| } | |
| function decreaseQuantity(index) { | |
| if (cart[index].quantity > 1) { | |
| cart[index].quantity -= 1; | |
| } else { | |
| removeFromCart(index); | |
| return; | |
| } | |
| updateCart(); | |
| } | |
| function removeFromCart(index) { | |
| cart.splice(index, 1); | |
| updateCart(); | |
| // If cart is empty, show menu again | |
| if (cart.length === 0) { | |
| menuContent.classList.remove('hidden'); | |
| cartContent.classList.add('hidden'); | |
| } | |
| } | |
| function calculateSubtotal() { | |
| return cart.reduce((sum, item) => sum + (item.price * item.quantity), 0); | |
| } | |
| function calculateTotal() { | |
| const subtotal = calculateSubtotal(); | |
| const deliveryFee = 5.00; // Fixed delivery fee | |
| return subtotal + deliveryFee; | |
| } | |
| function generateOrderDetails() { | |
| let details = ''; | |
| cart.forEach(item => { | |
| details += `- ${item.name} (${item.quantity}x) - R$ ${(item.price * item.quantity).toFixed(2)}\n`; | |
| }); | |
| details += `\n*Taxa de Entrega:* R$ 5,00`; | |
| return details; | |
| } | |
| </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=Proimage/jaimesushi" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |