<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Empaques Matamoros{% endblock %}</title>
{% block stylesheets %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
<link rel="icon" href="{{ asset('img/favicon.ico') }}" type="image/x-icon">
{{ encore_entry_link_tags('app') }}
{% endblock %}
</head>
<body>
<div id="app">
{% block vue_content %}
{% endblock %}
</div>
{% block javascripts %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
// Slider de logística
const swiperLogistics = new Swiper('.logistics-swiper', {
loop: true,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
slidesPerView: 1,
spaceBetween: 0,
effect: 'slide',
speed: 800,
});
// Slider de productos
const swiperProductos = new Swiper('.productos-swiper', {
slidesPerView: 1,
loop: true,
navigation: {
nextEl: '.swiper-button-next-productos',
prevEl: '.swiper-button-prev-productos',
},
});
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const form = document.getElementById('contactForm');
form.addEventListener('submit', function (e) {
e.preventDefault(); // Previene recarga
const formData = new FormData(form);
fetch('{{ path('Contacto') }}', {
method: 'POST',
body: formData,
headers: {
'X-Requested-With': 'XMLHttpRequest'
}
})
.then(response => response.json())
.then(data => {
if (data.success) {
Swal.fire({
title: "¡Listo!",
text: data.message,
icon: "success",
confirmButtonText: "Aceptar",
confirmButtonColor: "#0033a1"
});
form.reset();
} else {
Swal.fire({
title: "Error",
text: data.message,
icon: "error",
confirmButtonText: "Cerrar",
confirmButtonColor: "#0033a1"
});
}
})
.catch(error => {
console.error('Error:', error);
alert('Hubo un error al enviar el formulario.');
});
});
});
</script>
{{ encore_entry_script_tags('app') }}
{% endblock %}
</body>
</html>