templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.    <head>
  4.        <meta charset="UTF-8">
  5.        <title>{% block title %}Empaques Matamoros{% endblock %}</title>
  6.        {% block stylesheets %}
  7.            <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8.                <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
  9.            <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
  10.            <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
  11.            <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
  12.            <link rel="icon" href="{{ asset('img/favicon.ico') }}" type="image/x-icon">
  13.          {{ encore_entry_link_tags('app') }}
  14.        {% endblock %}
  15.       
  16.    </head>
  17.    <body>
  18.    <div id="app">
  19.        {% block vue_content %}
  20.        {% endblock %}
  21.    </div>
  22.    {% block javascripts %}
  23.         <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
  24.         <script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
  25.         <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  26.         <script>
  27.    document.addEventListener("DOMContentLoaded", function () {
  28.   // Slider de logística
  29.   const swiperLogistics = new Swiper('.logistics-swiper', {
  30.     loop: true,
  31.     navigation: {
  32.       nextEl: '.swiper-button-next',
  33.       prevEl: '.swiper-button-prev',
  34.     },
  35.     slidesPerView: 1,
  36.     spaceBetween: 0,
  37.     effect: 'slide',
  38.     speed: 800,
  39.   });
  40.   // Slider de productos
  41.   const swiperProductos = new Swiper('.productos-swiper', {
  42.     slidesPerView: 1,
  43.     loop: true,
  44.     navigation: {
  45.       nextEl: '.swiper-button-next-productos',
  46.       prevEl: '.swiper-button-prev-productos',
  47.     },
  48.   });
  49. });
  50.    
  51.   </script>
  52. <script>
  53. document.addEventListener('DOMContentLoaded', function () {
  54.     const form = document.getElementById('contactForm');
  55.     form.addEventListener('submit', function (e) {
  56.         e.preventDefault(); // Previene recarga
  57.         const formData = new FormData(form);
  58.         fetch('{{ path('Contacto') }}', {
  59.             method: 'POST',
  60.             body: formData,
  61.             headers: {
  62.                 'X-Requested-With': 'XMLHttpRequest' 
  63.             }
  64.         })
  65.         .then(response => response.json())
  66.         .then(data => {
  67.             if (data.success) {
  68.                 Swal.fire({
  69.                   title: "¡Listo!",
  70.                   text: data.message,
  71.                   icon: "success",
  72.                   confirmButtonText: "Aceptar",
  73.                   confirmButtonColor: "#0033a1" 
  74.               });
  75.                 form.reset();
  76.             } else {
  77.                 Swal.fire({
  78.                     title: "Error",
  79.                     text: data.message,
  80.                     icon: "error",
  81.                     confirmButtonText: "Cerrar",
  82.                     confirmButtonColor: "#0033a1" 
  83.                 });
  84.             }
  85.         })
  86.         .catch(error => {
  87.             console.error('Error:', error);
  88.             alert('Hubo un error al enviar el formulario.');
  89.         });
  90.     });
  91. });
  92. </script>
  93.    {{ encore_entry_script_tags('app') }}
  94.    {% endblock %}
  95.    </body>
  96. </html>