vueloenglobo.mx/resources/views/layouts/error.blade.php

499 lines
14 KiB
PHP

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', 'Error') | {{ config('app.name') }}</title>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow-x: hidden;
}
/* Partículas flotantes */
.particle {
position: absolute;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
pointer-events: none;
animation: float linear infinite;
}
@keyframes float {
0% {
transform: translateY(100vh) rotate(0deg);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateY(-100vh) rotate(360deg);
opacity: 0;
}
}
.error-container {
position: relative;
z-index: 10;
text-align: center;
padding: 2rem;
max-width: 600px;
width: 90%;
animation: fadeInUp 0.8s ease-out;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Código de error animado */
.error-code {
font-size: 180px;
font-weight: 800;
color: rgba(255, 255, 255, 0.9);
text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
line-height: 1;
margin-bottom: 1rem;
animation: glitch 3s infinite;
position: relative;
}
@keyframes glitch {
0%, 100% {
transform: skew(0deg, 0deg);
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
}
95% {
transform: skew(0deg, 0deg);
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
}
96% {
transform: skew(5deg, 2deg);
text-shadow: -2px 0 0 rgba(255, 0, 0, 0.5), 2px 0 0 rgba(0, 255, 255, 0.5);
}
97% {
transform: skew(-5deg, -2deg);
text-shadow: 2px 0 0 rgba(255, 0, 0, 0.5), -2px 0 0 rgba(0, 255, 255, 0.5);
}
98% {
transform: skew(0deg, 0deg);
}
}
.error-title {
font-size: 32px;
font-weight: 700;
color: white;
margin-bottom: 1rem;
letter-spacing: -0.5px;
}
.error-message {
font-size: 18px;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 2rem;
line-height: 1.6;
}
/* Botones */
.button-group {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-bottom: 3rem;
}
.btn {
padding: 12px 28px;
border-radius: 50px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 16px;
cursor: pointer;
border: none;
font-family: 'Inter', sans-serif;
}
.btn-primary {
background: white;
color: #667eea;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
background: #f8f9fa;
}
.btn-secondary {
background: rgba(255, 255, 255, 0.2);
color: white;
backdrop-filter: blur(10px);
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
}
/* Barra de búsqueda */
.search-container {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
border-radius: 50px;
padding: 5px;
display: flex;
gap: 5px;
margin-top: 2rem;
animation: slideUp 0.6s ease-out 0.3s both;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.search-input {
flex: 1;
background: transparent;
border: none;
padding: 12px 20px;
color: white;
font-size: 16px;
outline: none;
font-family: 'Inter', sans-serif;
}
.search-input::placeholder {
color: rgba(255, 255, 255, 0.7);
}
.search-btn {
background: white;
border: none;
border-radius: 50px;
padding: 8px 24px;
color: #667eea;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 8px;
font-family: 'Inter', sans-serif;
}
.search-btn:hover {
transform: scale(1.05);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* Enlaces adicionales */
.help-links {
margin-top: 2rem;
display: flex;
gap: 1.5rem;
justify-content: center;
flex-wrap: wrap;
}
.help-link {
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
font-size: 14px;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 5px;
}
.help-link:hover {
color: white;
transform: translateY(-2px);
}
/* Icono rotativo */
.rotating-icon {
font-size: 80px;
color: rgba(255, 255, 255, 0.3);
margin-bottom: 1rem;
animation: rotate 4s linear infinite;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* Responsive */
@media (max-width: 768px) {
.error-code {
font-size: 120px;
}
.error-title {
font-size: 24px;
}
.error-message {
font-size: 16px;
}
.btn {
padding: 10px 20px;
font-size: 14px;
}
}
</style>
@stack('styles')
</head>
<body>
<div class="error-container">
<!-- Icono animado -->
<div class="rotating-icon">
<i class="fas fa-@yield('icon', 'exclamation-triangle')"></i>
</div>
<!-- Código de error -->
<div class="error-code">@yield('code')</div>
<!-- Título -->
<h1 class="error-title">@yield('title')</h1>
<!-- Mensaje -->
<p class="error-message">@yield('message')</p>
<!-- Botones de acción -->
<div class="button-group">
<a href="{{ url('/') }}" class="btn btn-primary">
<i class="fas fa-home"></i> Ir al Inicio
</a>
<button onclick="history.back()" class="btn btn-secondary">
<i class="fas fa-arrow-left"></i> Volver Atrás
</button>
@yield('extra-buttons')
</div>
<!-- Barra de búsqueda -->
<div class="search-container">
<input type="text" class="search-input" id="searchInput" placeholder="Buscar en el sitio...">
<button class="search-btn" onclick="performSearch()">
<i class="fas fa-search"></i> Buscar
</button>
</div>
<!-- Enlaces de ayuda -->
<div class="help-links">
<a href="{{ url('/contacto') }}" class="help-link">
<i class="fas fa-envelope"></i> Contactar Soporte
</a>
<a href="{{ url('/blog') }}" class="help-link">
<i class="fas fa-newspaper"></i> Ir al Blog
</a>
<a href="{{ url('/faq') }}" class="help-link">
<i class="fas fa-question-circle"></i> Preguntas Frecuentes
</a>
@yield('extra-links')
</div>
</div>
<script>
// Crear partículas flotantes
function createParticles() {
const particleCount = 50;
const body = document.body;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
const size = Math.random() * 8 + 2;
const left = Math.random() * 100;
const duration = Math.random() * 8 + 4;
const delay = Math.random() * 5;
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
particle.style.left = `${left}%`;
particle.style.animationDuration = `${duration}s`;
particle.style.animationDelay = `${delay}s`;
body.appendChild(particle);
}
}
// Función de búsqueda
function performSearch() {
const searchTerm = document.getElementById('searchInput').value.trim();
if (searchTerm === '') {
showToast('Por favor, ingresa un término de búsqueda', 'warning');
return;
}
showToast('Buscando: ' + searchTerm + '...', 'info');
setTimeout(() => {
window.location.href = `{{ url('/buscar') }}?q=${encodeURIComponent(searchTerm)}`;
}, 500);
}
// Sistema de notificaciones toast
function showToast(message, type = 'info') {
const existingToast = document.querySelector('.toast-notification');
if (existingToast) {
existingToast.remove();
}
const toast = document.createElement('div');
toast.className = 'toast-notification';
const colors = {
info: '#3498db',
success: '#2ecc71',
warning: '#f39c12',
error: '#e74c3c'
};
const icons = {
info: 'fa-info-circle',
success: 'fa-check-circle',
warning: 'fa-exclamation-triangle',
error: 'fa-times-circle'
};
toast.innerHTML = `
<div style="
position: fixed;
bottom: 20px;
right: 20px;
background: ${colors[type]};
color: white;
padding: 12px 20px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
z-index: 10000;
animation: slideInRight 0.3s ease-out;
display: flex;
align-items: center;
gap: 10px;
font-family: 'Inter', sans-serif;
">
<i class="fas ${icons[type]}"></i>
<span>${message}</span>
</div>
`;
document.body.appendChild(toast);
setTimeout(() => {
if (toast) {
toast.style.animation = 'slideOutRight 0.3s ease-out';
setTimeout(() => toast.remove(), 300);
}
}, 3000);
}
// Agregar animaciones CSS para el toast
const style = document.createElement('style');
style.textContent = `
@keyframes slideInRight {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
@keyframes slideOutRight {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(100%);
opacity: 0;
}
}
`;
document.head.appendChild(style);
// Detectar tecla Enter
document.getElementById('searchInput').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
performSearch();
}
});
// Efectos hover para botones
document.querySelectorAll('.btn').forEach(btn => {
btn.addEventListener('mouseenter', function(e) {
this.style.transform = 'translateY(-2px) scale(1.05)';
});
btn.addEventListener('mouseleave', function(e) {
this.style.transform = 'translateY(0) scale(1)';
});
});
// Inicializar
window.addEventListener('DOMContentLoaded', () => {
createParticles();
});
@stack('scripts')
</script>
</body>
</html>