Criar um site, com nome PADARIA DO AVEX moderno, bonito e funcional para uma padaria comercializar pães e produtos de confeitaria online, com um painel administrativo completo (backend) que permita total controle do conteúdo, com opção de baixar o site para uso pessoal. - Initial Deployment
23f8055 verified Download index.html from Avex3/https-huggingface-co-spaces: direct link, hf CLI and curl.
- Browser
- Download file 40.6 kB
-
https://huggingface.co/spaces/Avex3/https-huggingface-co-spaces/resolve/main/index.html
- Command line
-
hf download hf://spaces/Avex3/https-huggingface-co-spaces/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Avex3/https-huggingface-co-spaces/resolve/main/index.html
40.6 kB
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Padaria do Avex | Pães Artesanais e Confeitaria</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> | |
| /* Custom CSS for elements that need more precise control */ | |
| .hero-bg { | |
| background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1509440159596-0249088772ff'); | |
| background-size: cover; | |
| background-position: center; | |
| } | |
| .bread-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); | |
| } | |
| .admin-panel { | |
| transition: all 0.3s ease; | |
| } | |
| .admin-panel.active { | |
| right: 0; | |
| } | |
| /* Animation for the shopping cart */ | |
| @keyframes pulse { | |
| 0% { transform: scale(1); } | |
| 50% { transform: scale(1.1); } | |
| 100% { transform: scale(1); } | |
| } | |
| .cart-pulse { | |
| animation: pulse 0.5s ease; | |
| } | |
| </style> | |
| </head> | |
| <body class="font-sans bg-gray-50"> | |
| <!-- Header/Navigation --> | |
| <header class="bg-amber-800 text-white shadow-lg 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-bread-slice text-2xl text-amber-200"></i> | |
| <h1 class="text-2xl font-bold">PADARIA DO AVEX</h1> | |
| </div> | |
| <nav class="hidden md:flex space-x-6"> | |
| <a href="#home" class="hover:text-amber-200 transition">Início</a> | |
| <a href="#products" class="hover:text-amber-200 transition">Produtos</a> | |
| <a href="#about" class="hover:text-amber-200 transition">Sobre Nós</a> | |
| <a href="#contact" class="hover:text-amber-200 transition">Contato</a> | |
| </nav> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative cursor-pointer" id="cartIcon"> | |
| <i class="fas fa-shopping-cart text-xl"></i> | |
| <span class="absolute -top-2 -right-2 bg-amber-200 text-amber-900 rounded-full w-5 h-5 flex items-center justify-center text-xs font-bold" id="cartCount">0</span> | |
| </div> | |
| <button id="adminToggle" class="bg-amber-600 hover:bg-amber-700 px-3 py-1 rounded-md text-sm hidden md:block"> | |
| <i class="fas fa-user-shield mr-1"></i> Admin | |
| </button> | |
| <button class="md:hidden text-xl" id="mobileMenuButton"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Mobile Menu --> | |
| <div class="md:hidden bg-amber-700 hidden" id="mobileMenu"> | |
| <div class="container mx-auto px-4 py-2 flex flex-col space-y-2"> | |
| <a href="#home" class="py-2 hover:text-amber-200 transition">Início</a> | |
| <a href="#products" class="py-2 hover:text-amber-200 transition">Produtos</a> | |
| <a href="#about" class="py-2 hover:text-amber-200 transition">Sobre Nós</a> | |
| <a href="#contact" class="py-2 hover:text-amber-200 transition">Contato</a> | |
| <button class="bg-amber-600 hover:bg-amber-700 px-3 py-2 rounded-md text-sm w-full text-left"> | |
| <i class="fas fa-user-shield mr-1"></i> Área Admin | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Hero Section --> | |
| <section id="home" class="hero-bg text-white py-20 md:py-32"> | |
| <div class="container mx-auto px-4 text-center"> | |
| <h2 class="text-4xl md:text-6xl font-bold mb-4">Pães Artesanais com Amor</h2> | |
| <p class="text-xl md:text-2xl mb-8 max-w-2xl mx-auto">Descubra o sabor autêntico da Padaria do Avex. Feitos diariamente com ingredientes selecionados.</p> | |
| <div class="flex flex-col sm:flex-row justify-center gap-4"> | |
| <a href="#products" class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 transform hover:scale-105"> | |
| Nossos Produtos | |
| </a> | |
| <a href="#contact" class="bg-white hover:bg-gray-100 text-amber-800 font-bold py-3 px-6 rounded-lg transition duration-300 transform hover:scale-105"> | |
| Faça seu Pedido | |
| </a> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Featured Products --> | |
| <section id="products" class="py-16 bg-white"> | |
| <div class="container mx-auto px-4"> | |
| <div class="text-center mb-12"> | |
| <h2 class="text-3xl md:text-4xl font-bold text-amber-900 mb-4">Nossos Produtos</h2> | |
| <p class="text-gray-600 max-w-2xl mx-auto">Selecione entre nossa variedade de pães frescos, doces e salgados feitos artesanalmente todos os dias.</p> | |
| </div> | |
| <!-- Product Categories --> | |
| <div class="flex justify-center mb-8 overflow-x-auto pb-2"> | |
| <div class="flex space-x-2"> | |
| <button class="category-btn active px-4 py-2 rounded-full bg-amber-600 text-white" data-category="all">Todos</button> | |
| <button class="category-btn px-4 py-2 rounded-full bg-amber-100 text-amber-800 hover:bg-amber-200" data-category="bread">Pães</button> | |
| <button class="category-btn px-4 py-2 rounded-full bg-amber-100 text-amber-800 hover:bg-amber-200" data-category="pastry">Confeitaria</button> | |
| <button class="category-btn px-4 py-2 rounded-full bg-amber-100 text-amber-800 hover:bg-amber-200" data-category="cake">Bolos</button> | |
| <button class="category-btn px-4 py-2 rounded-full bg-amber-100 text-amber-800 hover:bg-amber-200" data-category="gluten-free">Sem Glúten</button> | |
| </div> | |
| </div> | |
| <!-- Product Grid --> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8" id="productGrid"> | |
| <!-- Products will be loaded here via JavaScript --> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- About Section --> | |
| <section id="about" class="py-16 bg-amber-50"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex flex-col md:flex-row items-center"> | |
| <div class="md:w-1/2 mb-8 md:mb-0 md:pr-8"> | |
| <img src="https://images.unsplash.com/photo-1608190003443-86b2636f7092" alt="Padaria do Avex" class="rounded-lg shadow-xl w-full h-auto"> | |
| </div> | |
| <div class="md:w-1/2"> | |
| <h2 class="text-3xl md:text-4xl font-bold text-amber-900 mb-6">Nossa História</h2> | |
| <p class="text-gray-700 mb-4">Fundada em 2010, a Padaria do Avex nasceu do sonho de trazer pães artesanais de qualidade para nossa comunidade. Começamos pequenos, mas com muita dedicação e amor pelo que fazemos.</p> | |
| <p class="text-gray-700 mb-6">Hoje, mantemos a tradição de fazer pães como antigamente, com fermentação natural e ingredientes selecionados, sem aditivos ou conservantes. Cada produto que sai do nosso forno é feito com o mesmo cuidado e atenção que tínhamos no primeiro dia.</p> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <i class="fas fa-award text-amber-600 text-2xl mb-2"></i> | |
| <h3 class="font-bold text-amber-900">Qualidade Garantida</h3> | |
| <p class="text-sm text-gray-600">Ingredientes selecionados e processos artesanais</p> | |
| </div> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <i class="fas fa-leaf text-amber-600 text-2xl mb-2"></i> | |
| <h3 class="font-bold text-amber-900">Natural</h3> | |
| <p class="text-sm text-gray-600">Sem conservantes ou aditivos artificiais</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Testimonials --> | |
| <section class="py-16 bg-amber-800 text-white"> | |
| <div class="container mx-auto px-4"> | |
| <h2 class="text-3xl md:text-4xl font-bold mb-12 text-center">O Que Nossos Clientes Dizem</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div class="bg-amber-700 p-6 rounded-lg"> | |
| <div class="flex items-center mb-4"> | |
| <img src="https://randomuser.me/api/portraits/women/32.jpg" alt="Cliente" class="w-12 h-12 rounded-full mr-4"> | |
| <div> | |
| <h3 class="font-bold">Maria Silva</h3> | |
| <div class="flex text-amber-200"> | |
| <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> | |
| </div> | |
| <p>"Os pães da Padaria do Avex são incríveis! Compro toda semana e nunca decepcionam. O pão de fermentação natural é meu favorito."</p> | |
| </div> | |
| <div class="bg-amber-700 p-6 rounded-lg"> | |
| <div class="flex items-center mb-4"> | |
| <img src="https://randomuser.me/api/portraits/men/45.jpg" alt="Cliente" class="w-12 h-12 rounded-full mr-4"> | |
| <div> | |
| <h3 class="font-bold">João Santos</h3> | |
| <div class="flex text-amber-200"> | |
| <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> | |
| </div> | |
| <p>"Como celíaco, sempre tive dificuldade em encontrar pães bons sem glúten. A linha especial da Padaria do Avex mudou isso para mim!"</p> | |
| </div> | |
| <div class="bg-amber-700 p-6 rounded-lg"> | |
| <div class="flex items-center mb-4"> | |
| <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Cliente" class="w-12 h-12 rounded-full mr-4"> | |
| <div> | |
| <h3 class="font-bold">Ana Oliveira</h3> | |
| <div class="flex text-amber-200"> | |
| <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> | |
| </div> | |
| <p>"Compro os doces para eventos e todos sempre elogiam. A qualidade é excelente e o atendimento muito atencioso. Recomendo!"</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Contact Section --> | |
| <section id="contact" class="py-16 bg-white"> | |
| <div class="container mx-auto px-4"> | |
| <div class="text-center mb-12"> | |
| <h2 class="text-3xl md:text-4xl font-bold text-amber-900 mb-4">Faça Seu Pedido</h2> | |
| <p class="text-gray-600 max-w-2xl mx-auto">Entre em contato conosco para encomendas ou tire suas dúvidas.</p> | |
| </div> | |
| <div class="flex flex-col md:flex-row gap-8"> | |
| <div class="md:w-1/2"> | |
| <form class="space-y-4"> | |
| <div> | |
| <label for="name" class="block text-gray-700 mb-2">Nome</label> | |
| <input type="text" id="name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500"> | |
| </div> | |
| <div> | |
| <label for="email" class="block text-gray-700 mb-2">Email</label> | |
| <input type="email" id="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500"> | |
| </div> | |
| <div> | |
| <label for="phone" class="block text-gray-700 mb-2">Telefone</label> | |
| <input type="tel" id="phone" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500"> | |
| </div> | |
| <div> | |
| <label for="message" class="block text-gray-700 mb-2">Mensagem/Pedido</label> | |
| <textarea id="message" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500"></textarea> | |
| </div> | |
| <button type="submit" class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 w-full"> | |
| Enviar Mensagem | |
| </button> | |
| </form> | |
| </div> | |
| <div class="md:w-1/2 bg-amber-50 p-8 rounded-lg"> | |
| <h3 class="text-2xl font-bold text-amber-900 mb-4">Informações de Contato</h3> | |
| <div class="space-y-4"> | |
| <div class="flex items-start"> | |
| <i class="fas fa-map-marker-alt text-amber-600 mt-1 mr-3"></i> | |
| <div> | |
| <h4 class="font-bold text-gray-800">Endereço</h4> | |
| <p class="text-gray-600">Rua dos Padeiros, 123 - Centro, Avex</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <i class="fas fa-phone-alt text-amber-600 mt-1 mr-3"></i> | |
| <div> | |
| <h4 class="font-bold text-gray-800">Telefone</h4> | |
| <p class="text-gray-600">(11) 98765-4321</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <i class="fas fa-envelope text-amber-600 mt-1 mr-3"></i> | |
| <div> | |
| <h4 class="font-bold text-gray-800">Email</h4> | |
| <p class="text-gray-600">contato@padariadoavex.com.br</p> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <i class="fas fa-clock text-amber-600 mt-1 mr-3"></i> | |
| <div> | |
| <h4 class="font-bold text-gray-800">Horário de Funcionamento</h4> | |
| <p class="text-gray-600">Segunda a Sexta: 6h às 19h</p> | |
| <p class="text-gray-600">Sábado: 6h às 14h</p> | |
| <p class="text-gray-600">Domingo: Fechado</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <h4 class="font-bold text-gray-800 mb-2">Siga-nos</h4> | |
| <div class="flex space-x-4"> | |
| <a href="#" class="text-amber-600 hover:text-amber-800 text-xl"><i class="fab fa-facebook"></i></a> | |
| <a href="#" class="text-amber-600 hover:text-amber-800 text-xl"><i class="fab fa-instagram"></i></a> | |
| <a href="#" class="text-amber-600 hover:text-amber-800 text-xl"><i class="fab fa-whatsapp"></i></a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Shopping Cart Modal --> | |
| <div id="cartModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex justify-end hidden"> | |
| <div class="bg-white w-full max-w-md h-full overflow-y-auto"> | |
| <div class="p-4 border-b flex justify-between items-center"> | |
| <h3 class="text-xl font-bold text-amber-900">Seu Carrinho</h3> | |
| <button id="closeCart" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="p-4" id="cartItems"> | |
| <!-- Cart items will be loaded here --> | |
| <div class="text-center py-8 text-gray-500" id="emptyCartMessage"> | |
| <i class="fas fa-shopping-cart text-4xl mb-4"></i> | |
| <p>Seu carrinho está vazio</p> | |
| </div> | |
| </div> | |
| <div class="p-4 border-t"> | |
| <div class="flex justify-between mb-4"> | |
| <span class="font-bold">Total:</span> | |
| <span class="font-bold" id="cartTotal">R$ 0,00</span> | |
| </div> | |
| <button id="checkoutBtn" class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 w-full disabled:opacity-50" disabled> | |
| Finalizar Compra | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Admin Panel --> | |
| <div id="adminPanel" class="admin-panel fixed top-0 right-[-400px] w-full max-w-md h-full bg-gray-800 text-white z-50 overflow-y-auto shadow-2xl"> | |
| <div class="p-4 border-b border-gray-700 flex justify-between items-center"> | |
| <h3 class="text-xl font-bold"> | |
| <i class="fas fa-user-shield mr-2"></i> Painel Admin | |
| </h3> | |
| <button id="closeAdmin" class="text-gray-400 hover:text-white"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="p-4"> | |
| <h4 class="text-lg font-semibold mb-4">Gerenciamento de Conteúdo</h4> | |
| <div class="space-y-4"> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h5 class="font-medium mb-2 flex items-center"> | |
| <i class="fas fa-bread-slice mr-2"></i> Produtos | |
| </h5> | |
| <div class="space-y-2"> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-plus-circle mr-2"></i> Adicionar Novo Produto | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-edit mr-2"></i> Editar Produtos | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-tags mr-2"></i> Gerenciar Categorias | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h5 class="font-medium mb-2 flex items-center"> | |
| <i class="fas fa-shopping-cart mr-2"></i> Pedidos | |
| </h5> | |
| <div class="space-y-2"> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-list mr-2"></i> Ver Todos os Pedidos | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-truck mr-2"></i> Gerenciar Entregas | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h5 class="font-medium mb-2 flex items-center"> | |
| <i class="fas fa-users mr-2"></i> Clientes | |
| </h5> | |
| <div class="space-y-2"> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-user-friends mr-2"></i> Lista de Clientes | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-comment-alt mr-2"></i> Mensagens de Contato | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h5 class="font-medium mb-2 flex items-center"> | |
| <i class="fas fa-chart-line mr-2"></i> Relatórios | |
| </h5> | |
| <div class="space-y-2"> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-money-bill-wave mr-2"></i> Vendas | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-star mr-2"></i> Avaliações | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h5 class="font-medium mb-2 flex items-center"> | |
| <i class="fas fa-cog mr-2"></i> Configurações | |
| </h5> | |
| <div class="space-y-2"> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-store mr-2"></i> Informações da Loja | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-download mr-2"></i> Backup do Site | |
| </button> | |
| <button class="admin-btn w-full text-left py-2 px-3 bg-gray-600 hover:bg-gray-500 rounded"> | |
| <i class="fas fa-user-cog mr-2"></i> Usuários Admin | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Footer --> | |
| <footer class="bg-amber-900 text-white py-8"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
| <div> | |
| <h3 class="text-xl font-bold mb-4 flex items-center"> | |
| <i class="fas fa-bread-slice mr-2"></i> Padaria do Avex | |
| </h3> | |
| <p class="text-amber-100">Pães artesanais e produtos de confeitaria feitos com ingredientes selecionados e muito amor.</p> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Links Rápidos</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#home" class="text-amber-200 hover:text-white">Início</a></li> | |
| <li><a href="#products" class="text-amber-200 hover:text-white">Produtos</a></li> | |
| <li><a href="#about" class="text-amber-200 hover:text-white">Sobre Nós</a></li> | |
| <li><a href="#contact" class="text-amber-200 hover:text-white">Contato</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Horário</h3> | |
| <ul class="space-y-2 text-amber-100"> | |
| <li>Segunda a Sexta: 6h - 19h</li> | |
| <li>Sábado: 6h - 14h</li> | |
| <li>Domingo: Fechado</li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Newsletter</h3> | |
| <p class="text-amber-100 mb-2">Assine para receber nossas novidades e promoções.</p> | |
| <div class="flex"> | |
| <input type="email" placeholder="Seu email" class="px-3 py-2 text-gray-800 rounded-l w-full"> | |
| <button class="bg-amber-600 hover:bg-amber-700 px-4 rounded-r"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="border-t border-amber-800 mt-8 pt-6 text-center text-amber-100"> | |
| <p>© 2023 Padaria do Avex. Todos os direitos reservados.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Sample product data | |
| const products = [ | |
| { | |
| id: 1, | |
| name: "Pão de Fermentação Natural", | |
| price: 12.90, | |
| category: "bread", | |
| description: "Feito com fermento natural e farinha orgânica, crocante por fora e macio por dentro.", | |
| image: "https://images.unsplash.com/photo-1509440159596-0249088772ff" | |
| }, | |
| { | |
| id: 2, | |
| name: "Baguete Tradicional", | |
| price: 8.50, | |
| category: "bread", | |
| description: "Crocante por fora e macia por dentro, perfeita para acompanhar refeições.", | |
| image: "https://images.unsplash.com/photo-1608190003443-86b2636f7092" | |
| }, | |
| { | |
| id: 3, | |
| name: "Croissant de Manteiga", | |
| price: 6.90, | |
| category: "pastry", | |
| description: "Folhado e crocante, feito com manteiga de primeira qualidade.", | |
| image: "https://images.unsplash.com/photo-1627834377411-8da5f4f09de8" | |
| }, | |
| { | |
| id: 4, | |
| name: "Pão de Queijo Artesanal", | |
| price: 15.90, | |
| category: "pastry", | |
| description: "Feito com queijo minas padrão e polvilho azedo, macio e saboroso.", | |
| image: "https://images.unsplash.com/photo-1602922960055-6fac3a707e54" | |
| }, | |
| { | |
| id: 5, | |
| name: "Bolo de Chocolate", | |
| price: 45.00, | |
| category: "cake", | |
| description: "Bolo úmido com cobertura de ganache, perfeito para ocasiões especiais.", | |
| image: "https://images.unsplash.com/photo-1578985545062-69928b1d9587" | |
| }, | |
| { | |
| id: 6, | |
| name: "Pão Integral Multigrãos", | |
| price: 10.90, | |
| category: "bread", | |
| description: "Rico em fibras e nutrientes, com mix de grãos selecionados.", | |
| image: "https://images.unsplash.com/photo-1608190003443-86b2636f7092" | |
| }, | |
| { | |
| id: 7, | |
| name: "Donut Glacê", | |
| price: 7.50, | |
| category: "pastry", | |
| description: "Massa fofinha coberta com glacê de diversos sabores.", | |
| image: "https://images.unsplash.com/photo-1551024506-0bccd828d307" | |
| }, | |
| { | |
| id: 8, | |
| name: "Pão Sem Glúten", | |
| price: 14.90, | |
| category: "gluten-free", | |
| description: "Opção sem glúten, feito com farinha de arroz e fécula de batata.", | |
| image: "https://images.unsplash.com/photo-1602922960055-6fac3a707e54" | |
| } | |
| ]; | |
| // Shopping cart | |
| let cart = []; | |
| // DOM Elements | |
| const productGrid = document.getElementById('productGrid'); | |
| const categoryBtns = document.querySelectorAll('.category-btn'); | |
| const cartIcon = document.getElementById('cartIcon'); | |
| const cartCount = document.getElementById('cartCount'); | |
| const cartModal = document.getElementById('cartModal'); | |
| const closeCart = document.getElementById('closeCart'); | |
| const cartItems = document.getElementById('cartItems'); | |
| const emptyCartMessage = document.getElementById('emptyCartMessage'); | |
| const cartTotal = document.getElementById('cartTotal'); | |
| const checkoutBtn = document.getElementById('checkoutBtn'); | |
| const mobileMenuButton = document.getElementById('mobileMenuButton'); | |
| const mobileMenu = document.getElementById('mobileMenu'); | |
| const adminToggle = document.getElementById('adminToggle'); | |
| const adminPanel = document.getElementById('adminPanel'); | |
| const closeAdmin = document.getElementById('closeAdmin'); | |
| // Display products | |
| function displayProducts(filter = 'all') { | |
| productGrid.innerHTML = ''; | |
| const filteredProducts = filter === 'all' | |
| ? products | |
| : products.filter(product => product.category === filter); | |
| filteredProducts.forEach(product => { | |
| const productCard = document.createElement('div'); | |
| productCard.className = 'bread-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300 hover:shadow-xl'; | |
| productCard.innerHTML = ` | |
| <img src="${product.image}" alt="${product.name}" class="w-full h-48 object-cover"> | |
| <div class="p-4"> | |
| <h3 class="text-lg font-bold text-gray-800 mb-1">${product.name}</h3> | |
| <p class="text-gray-600 text-sm mb-3">${product.description}</p> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-amber-700 font-bold">R$ ${product.price.toFixed(2)}</span> | |
| <button class="add-to-cart bg-amber-600 hover:bg-amber-700 text-white px-3 py-1 rounded text-sm" data-id="${product.id}"> | |
| <i class="fas fa-plus mr-1"></i> Adicionar | |
| </button> | |
| </div> | |
| </div> | |
| `; | |
| productGrid.appendChild(productCard); | |
| }); | |
| // Add event listeners to "Add to cart" buttons | |
| document.querySelectorAll('.add-to-cart').forEach(button => { | |
| button.addEventListener('click', (e) => { | |
| const productId = parseInt(e.target.getAttribute('data-id')); | |
| addToCart(productId); | |
| }); | |
| }); | |
| } | |
| // Add to cart function | |
| function addToCart(productId) { | |
| const product = products.find(p => p.id === productId); | |
| const existingItem = cart.find(item => item.id === productId); | |
| if (existingItem) { | |
| existingItem.quantity += 1; | |
| } else { | |
| cart.push({ | |
| id: product.id, | |
| name: product.name, | |
| price: product.price, | |
| quantity: 1, | |
| image: product.image | |
| }); | |
| } | |
| updateCart(); | |
| // Add pulse animation to cart icon | |
| cartIcon.classList.add('cart-pulse'); | |
| setTimeout(() => { | |
| cartIcon.classList.remove('cart-pulse'); | |
| }, 500); | |
| } | |
| // Update cart display | |
| function updateCart() { | |
| // Update cart count | |
| const totalItems = cart.reduce((sum, item) => sum + item.quantity, 0); | |
| cartCount.textContent = totalItems; | |
| // Update cart modal if open | |
| if (cartModal.classList.contains('hidden')) return; | |
| if (cart.length === 0) { | |
| emptyCartMessage.classList.remove('hidden'); | |
| cartItems.innerHTML = ''; | |
| checkoutBtn.disabled = true; | |
| cartTotal.textContent = 'R$ 0,00'; | |
| } else { | |
| emptyCartMessage.classList.add('hidden'); | |
| let itemsHTML = ''; | |
| let total = 0; | |
| cart.forEach(item => { | |
| const itemTotal = item.price * item.quantity; | |
| total += itemTotal; | |
| itemsHTML += ` | |
| <div class="flex items-center mb-4 pb-4 border-b border-gray-200"> | |
| <img src="${item.image}" alt="${item.name}" class="w-16 h-16 object-cover rounded mr-4"> | |
| <div class="flex-1"> | |
| <h4 class="font-medium">${item.name}</h4> | |
| <div class="flex justify-between mt-1"> | |
| <span class="text-gray-600">R$ ${item.price.toFixed(2)}</span> | |
| <div class="flex items-center"> | |
| <button class="change-quantity px-2 text-gray-500 hover:text-amber-600" data-id="${item.id}" data-change="-1"> | |
| <i class="fas fa-minus"></i> | |
| </button> | |
| <span class="mx-2">${item.quantity}</span> | |
| <button class="change-quantity px-2 text-gray-500 hover:text-amber-600" data-id="${item.id}" data-change="1"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <button class="remove-item ml-4 text-red-500 hover:text-red-700" data-id="${item.id}"> | |
| <i class="fas fa-trash"></i> | |
| </button> | |
| </div> | |
| `; | |
| }); | |
| cartItems.innerHTML = itemsHTML; | |
| checkoutBtn.disabled = false; | |
| cartTotal.textContent = `R$ ${total.toFixed(2)}`; | |
| // Add event listeners to quantity buttons | |
| document.querySelectorAll('.change-quantity').forEach(button => { | |
| button.addEventListener('click', (e) => { | |
| const productId = parseInt(e.target.getAttribute('data-id')); | |
| const change = parseInt(e.target.getAttribute('data-change')); | |
| updateQuantity(productId, change); | |
| }); | |
| }); | |
| // Add event listeners to remove buttons | |
| document.querySelectorAll('.remove-item').forEach(button => { | |
| button.addEventListener('click', (e) => { | |
| const productId = parseInt(e.target.getAttribute('data-id')); | |
| removeFromCart(productId); | |
| }); | |
| }); | |
| } | |
| } | |
| // Update item quantity in cart | |
| function updateQuantity(productId, change) { | |
| const itemIndex = cart.findIndex(item => item.id === productId); | |
| if (itemIndex !== -1) { | |
| cart[itemIndex].quantity += change; | |
| // Remove item if quantity reaches 0 | |
| if (cart[itemIndex].quantity <= 0) { | |
| cart.splice(itemIndex, 1); | |
| } | |
| updateCart(); | |
| } | |
| } | |
| // Remove item from cart | |
| function removeFromCart(productId) { | |
| cart = cart.filter(item => item.id !== productId); | |
| updateCart(); | |
| } | |
| // Filter products by category | |
| categoryBtns.forEach(button => { | |
| button.addEventListener('click', () => { | |
| categoryBtns.forEach(btn => btn.classList.remove('active', 'bg-amber-600', 'text-white')); | |
| categoryBtns.forEach(btn => btn.classList.add('bg-amber-100', 'text-amber-800')); | |
| button.classList.add('active', 'bg-amber-600', 'text-white'); | |
| button.classList.remove('bg-amber-100', 'text-amber-800'); | |
| const category = button.getAttribute('data-category'); | |
| displayProducts(category); | |
| }); | |
| }); | |
| // Toggle cart modal | |
| cartIcon.addEventListener('click', () => { | |
| cartModal.classList.remove('hidden'); | |
| updateCart(); | |
| }); | |
| closeCart.addEventListener('click', () => { | |
| cartModal.classList.add('hidden'); | |
| }); | |
| // Checkout button | |
| checkoutBtn.addEventListener('click', () => { | |
| alert('Compra finalizada com sucesso! Obrigado por comprar na Padaria do Avex.'); | |
| cart = []; | |
| updateCart(); | |
| cartModal.classList.add('hidden'); | |
| }); | |
| // Mobile menu toggle | |
| mobileMenuButton.addEventListener('click', () => { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| // Admin panel toggle | |
| adminToggle.addEventListener('click', () => { | |
| adminPanel.classList.toggle('active'); | |
| }); | |
| closeAdmin.addEventListener('click', () => { | |
| adminPanel.classList.remove('active'); | |
| }); | |
| // Initialize | |
| displayProducts(); | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href'); | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| window.scrollTo({ | |
| top: targetElement.offsetTop - 70, | |
| behavior: 'smooth' | |
| }); | |
| // Close mobile menu if open | |
| if (!mobileMenu.classList.contains('hidden')) { | |
| mobileMenu.classList.add('hidden'); | |
| } | |
| } | |
| }); | |
| }); | |
| </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=Avex3/https-huggingface-co-spaces" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |