File size: 40,584 Bytes
23f8055 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 | <!DOCTYPE html>
<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> |