templates/main/main.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Digital Menu - GIRUS CAFE</title>
  7.     <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
  8.     <style>
  9.         body {
  10.             font-family: 'Montserrat', sans-serif;
  11.             background-color: #f5f4f2;
  12.             margin: 0;
  13.             padding: 0;
  14.         }
  15.         .menu-container {
  16.             display: flex;
  17.             flex-direction: column;
  18.             min-height: 100vh;
  19.             padding: 20px;
  20.         }
  21.         .categories-container {
  22.             display: flex;
  23.             overflow-x: auto;
  24.             padding: 10px 0;
  25.             margin-bottom: 20px;
  26.             -webkit-overflow-scrolling: touch;
  27.             scrollbar-width: none;
  28.             -ms-overflow-style: none;
  29.         }
  30.         .categories-container::-webkit-scrollbar {
  31.             display: none;
  32.         }
  33.         .category-button {
  34.             background-color: white;
  35.             border: none;
  36.             border-radius: 20px;
  37.             padding: 12px 20px;
  38.             margin-right: 10px;
  39.             font-weight: 600;
  40.             font-size: 16px;
  41.             cursor: pointer;
  42.             transition: all 0.3s ease;
  43.             white-space: nowrap;
  44.         }
  45.         .category-button.active {
  46.             background-color: #4CAF50;
  47.             color: white;
  48.             transform: scale(1.05);
  49.         }
  50.         .menu-content {
  51.             flex-grow: 1;
  52.         }
  53.         .menu-header {
  54.             height: 200px;
  55.             border-radius: 20px;
  56.             background-size: cover;
  57.             background-position: center;
  58.             margin-bottom: 20px;
  59.             display: flex;
  60.             align-items: center;
  61.             justify-content: center;
  62.             text-align: center;
  63.             color: white;
  64.             text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  65.         }
  66.         .menu-items {
  67.             display: grid;
  68.             grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  69.             gap: 20px;
  70.         }
  71.         .menu-item {
  72.             background-color: white;
  73.             border-radius: 16px;
  74.             overflow: hidden;
  75.             box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  76.             transition: transform 0.3s ease;
  77.         }
  78.         .menu-item:hover {
  79.             transform: translateY(-5px);
  80.         }
  81.         .menu-item img {
  82.             width: 100%;
  83.             height: 200px;
  84.             object-fit: cover;
  85.         }
  86.         .menu-item-content {
  87.             padding: 15px;
  88.         }
  89.         .menu-item-title {
  90.             margin-top: 0;
  91.             color: #333;
  92.             font-size: 18px;
  93.         }
  94.         .menu-item-description {
  95.             color: #666;
  96.             margin-bottom: 10px;
  97.             font-size: 14px;
  98.         }
  99.         .menu-item-price {
  100.             font-weight: bold;
  101.             color: #4CAF50;
  102.             font-size: 16px;
  103.         }
  104.         @media (min-width: 768px) {
  105.             .menu-container {
  106.                 flex-direction: row;
  107.             }
  108.             .categories-container {
  109.                 flex-direction: column;
  110.                 width: 200px;
  111.                 height: calc(100vh - 40px);
  112.                 overflow-y: auto;
  113.                 padding-right: 20px;
  114.             }
  115.             .category-button {
  116.                 margin-bottom: 10px;
  117.                 margin-right: 0;
  118.             }
  119.             .menu-content {
  120.                 margin-left: 20px;
  121.             }
  122.             .menu-header {
  123.                 height: 300px;
  124.             }
  125.         }
  126.     </style>
  127. </head>
  128. <body>
  129.     <div class="menu-container">
  130.         <div class="categories-container">
  131.             <button class="category-button active" data-category="all">Mostrar Tudo</button>
  132.             <button class="category-button" data-category="entradas">Entradas</button>
  133.             <button class="category-button" data-category="sopas">Sopas</button>
  134.             <button class="category-button" data-category="peixe">Peixe</button>
  135.             <button class="category-button" data-category="carnes">Carnes</button>
  136.             <button class="category-button" data-category="sobremesas">Sobremesas</button>
  137.             <button class="category-button" data-category="bebidas">Bebidas</button>
  138.         </div>
  139.         <div class="menu-content">
  140.             <div class="menu-header" style="background-image: url('{{ asset('img/bg.jpg') }}');">
  141.                 <h1>GIRUS CAFE</h1>
  142.             </div>
  143.             <div class="menu-items">
  144.                 {% for entrada in entradas %}
  145.                     <div class="menu-item" data-category="entradas">
  146.                         <img src="{{ asset('img/Entradas/' ~ entrada.img) }}" alt="{{ entrada.nome }}">
  147.                         <div class="menu-item-content">
  148.                             <h4 class="menu-item-title">{{ entrada.nome }}</h4>
  149.                             <p class="menu-item-description">{{ entrada.descricao }}</p>
  150.                             <p class="menu-item-price">{{ entrada.preco }} €</p>
  151.                         </div>
  152.                     </div>
  153.                 {% endfor %}
  154.                 {% for sopa in sopas %}
  155.                     <div class="menu-item" data-category="sopas">
  156.                         <img src="{{ asset('img/Sopas/' ~ sopa.img) }}" alt="{{ sopa.nome }}">
  157.                         <div class="menu-item-content">
  158.                             <h4 class="menu-item-title">{{ sopa.nome }}</h4>
  159.                             <p class="menu-item-description">{{ sopa.descricao }}</p>
  160.                             <p class="menu-item-price">{{ sopa.preco }} €</p>
  161.                         </div>
  162.                     </div>
  163.                 {% endfor %}
  164.                 {% for peixe in peixes %}
  165.                     <div class="menu-item" data-category="peixe">
  166.                         <img src="{{ asset('img/Peixes/' ~ peixe.img) }}" alt="{{ peixe.nome }}">
  167.                         <div class="menu-item-content">
  168.                             <h4 class="menu-item-title">{{ peixe.nome }}</h4>
  169.                             <p class="menu-item-description">{{ peixe.descricao }}</p>
  170.                             <p class="menu-item-price">{{ peixe.preco }} €</p>
  171.                         </div>
  172.                     </div>
  173.                 {% endfor %}
  174.                 {% for carne in carnes %}
  175.                     <div class="menu-item" data-category="carnes">
  176.                         <img src="{{ asset('img/Carnes/' ~ carne.img) }}" alt="{{ carne.nome }}">
  177.                         <div class="menu-item-content">
  178.                             <h4 class="menu-item-title">{{ carne.nome }}</h4>
  179.                             <p class="menu-item-description">{{ carne.descricao }}</p>
  180.                             <p class="menu-item-price">{{ carne.preco }} €</p>
  181.                         </div>
  182.                     </div>
  183.                 {% endfor %}
  184.                 {% for sobremesa in sobremesas %}
  185.                     <div class="menu-item" data-category="sobremesas">
  186.                         <img src="{{ asset('img/Sobremesas/' ~ sobremesa.img) }}" alt="{{ sobremesa.nome }}">
  187.                         <div class="menu-item-content">
  188.                             <h4 class="menu-item-title">{{ sobremesa.nome }}</h4>
  189.                             <p class="menu-item-description">{{ sobremesa.descricao }}</p>
  190.                             <p class="menu-item-price">{{ sobremesa.preco }} €</p>
  191.                         </div>
  192.                     </div>
  193.                 {% endfor %}
  194.                 {% for bebida in bebidas %}
  195.                     <div class="menu-item" data-category="bebidas">
  196.                         <img src="{{ asset('img/Bebidas/' ~ bebida.img) }}" alt="{{ bebida.nome }}">
  197.                         <div class="menu-item-content">
  198.                             <h4 class="menu-item-title">{{ bebida.nome }}</h4>
  199.                             <p class="menu-item-description">{{ bebida.descricao }}</p>
  200.                             <p class="menu-item-price">{{ bebida.preco }} €</p>
  201.                         </div>
  202.                     </div>
  203.                 {% endfor %}
  204.             </div>
  205.         </div>
  206.     </div>
  207.     <script>
  208.         const categoryButtons = document.querySelectorAll('.category-button');
  209.         const menuItems = document.querySelectorAll('.menu-item');
  210.         categoryButtons.forEach(button => {
  211.             button.addEventListener('click', () => {
  212.                 const category = button.getAttribute('data-category');
  213.                 
  214.                 categoryButtons.forEach(btn => btn.classList.remove('active'));
  215.                 button.classList.add('active');
  216.                 menuItems.forEach(item => {
  217.                     if (category === 'all' || item.getAttribute('data-category') === category) {
  218.                         item.style.display = 'block';
  219.                         item.style.animation = 'fadeIn 0.5s';
  220.                     } else {
  221.                         item.style.display = 'none';
  222.                     }
  223.                 });
  224.             });
  225.         });
  226.         // Smooth scrolling for category buttons on mobile
  227.         const categoriesContainer = document.querySelector('.categories-container');
  228.         let isScrolling = false;
  229.         categoriesContainer.addEventListener('touchmove', () => {
  230.             isScrolling = true;
  231.         });
  232.         categoriesContainer.addEventListener('touchend', () => {
  233.             isScrolling = false;
  234.         });
  235.         categoryButtons.forEach(button => {
  236.             button.addEventListener('click', (e) => {
  237.                 if (isScrolling) {
  238.                     e.preventDefault();
  239.                     return;
  240.                 }
  241.                 button.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'nearest' });
  242.             });
  243.         });
  244.     </script>
  245. </body>
  246. </html>