Файловый менеджер - Редактировать - /home/adiggxhn/public_html/actividades.html
Ðазад
<!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8" /> <meta content="width=device-width, initial-scale=1.0" name="viewport" /> <title>Actividades y Noticias | ADIG-SN</title> <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet" /> <script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script> <script id="tailwind-config"> tailwind.config = { darkMode: "class", theme: { extend: { colors: { "primary": "#003366", "secondary": "#28a745", "turquoise": "#00CED1", "metallic": "#9ca3af", "background-light": "#f3f4f6", "background-dark": "#111827", }, fontFamily: { "display": ["Manrope", "sans-serif"] }, borderRadius: { "DEFAULT": "0.5rem", "lg": "1rem", "xl": "1.5rem", "2xl": "2rem", "3xl": "3rem", "full": "9999px" }, }, }, } </script> <style type="text/tailwindcss"> @layer utilities { .text-shadow-sm { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } .aspect-video-custom { aspect-ratio: 16 / 9; } } </style> </head> <body class="bg-background-light dark:bg-background-dark text-slate-800 dark:text-slate-100 font-display antialiased selection:bg-turquoise selection:text-white transition-colors duration-300"> <div class="relative flex h-auto min-h-screen w-full flex-col overflow-x-hidden"> <!-- Header --> <header class="sticky top-0 z-50 flex items-center justify-between whitespace-nowrap border-b border-slate-200/50 bg-white/90 dark:bg-slate-900/90 backdrop-blur-md dark:border-slate-800 px-6 py-4 lg:px-10 shadow-sm transition-all duration-300"> <div class="flex items-center gap-4"> <a href="index.html" class="flex items-center"> <img src="logo_adig.png" alt="ADIG-SN Logo" class="h-14 w-auto object-contain transition-transform hover:scale-105" /> </a> </div> <div class="hidden lg:flex flex-1 justify-end gap-8 items-center"> <nav class="flex items-center gap-8"> <a class="text-slate-600 dark:text-slate-300 text-sm font-semibold hover:text-turquoise transition-colors relative group" href="index.html"> Inicio <span class="absolute -bottom-1 left-0 w-0 h-0.5 bg-turquoise transition-all group-hover:w-full"></span> </a> <a class="text-slate-600 dark:text-slate-300 text-sm font-semibold hover:text-turquoise transition-colors relative group" href="somos.html"> Nosotros <span class="absolute -bottom-1 left-0 w-0 h-0.5 bg-turquoise transition-all group-hover:w-full"></span> </a> <a class="text-slate-600 dark:text-slate-300 text-sm font-semibold hover:text-turquoise transition-colors relative group" href="esccuelas.html"> Escuela <span class="absolute -bottom-1 left-0 w-0 h-0.5 bg-turquoise transition-all group-hover:w-full"></span> </a> <a class="text-slate-600 dark:text-slate-300 text-sm font-semibold hover:text-turquoise transition-colors relative group" href="programas.html"> Programas <span class="absolute -bottom-1 left-0 w-0 h-0.5 bg-turquoise transition-all group-hover:w-full"></span> </a> <a class="text-slate-600 dark:text-slate-300 text-sm font-semibold hover:text-turquoise transition-colors relative group" href="donaciones.html"> Donaciones <span class="absolute -bottom-1 left-0 w-0 h-0.5 bg-turquoise transition-all group-hover:w-full"></span> </a> <a class="text-turquoise text-sm font-bold border-b-2 border-turquoise transition-colors relative" href="actividades.html"> Noticias </a> <a class="text-slate-600 dark:text-slate-300 text-sm font-semibold hover:text-turquoise transition-colors relative group" href="contacto.html"> Contacto <span class="absolute -bottom-1 left-0 w-0 h-0.5 bg-turquoise transition-all group-hover:w-full"></span> </a> </nav> <a href="https://adig-v2.vercel.app/login" target="_blank" rel="noopener noreferrer" class="flex min-w-[84px] cursor-pointer items-center justify-center overflow-hidden rounded-full h-11 px-8 bg-primary hover:bg-blue-800 transition-all hover:shadow-lg hover:shadow-primary/30 text-white text-sm font-bold tracking-wide transform active:scale-95"> <span class="truncate">Plataforma</span> </a> </div> <button class="lg:hidden text-slate-900 dark:text-white p-2 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-800"> <span class="material-symbols-outlined">menu</span> </button> </header> <main class="flex-grow flex flex-col"> <!-- Hero Section --> <section class="relative py-16 overflow-hidden bg-primary text-white"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center relative z-10"> <h1 class="text-4xl lg:text-6xl font-black mb-6">Nuestras Actividades</h1> <p class="text-xl text-blue-100 max-w-2xl mx-auto font-medium"> Sigue de cerca el impacto de ADIG-SN en las comunidades de Guatemala. </p> </div> <div class="absolute inset-0 opacity-20 pointer-events-none"> <div class="absolute top-0 left-0 w-full h-full bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-turquoise/40 via-transparent to-transparent"> </div> </div> </section> <!-- Blog Content --> <section class="py-12 bg-white dark:bg-background-dark min-h-[600px]"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <!-- Loading State --> <div id="loading" class="flex flex-col items-center justify-center py-20 gap-4"> <div class="w-12 h-12 border-4 border-turquoise border-t-transparent rounded-full animate-spin"> </div> <p class="text-slate-500 font-bold uppercase tracking-widest text-xs">Cargando actividades... </p> </div> <!-- Error State (hidden by default) --> <div id="error" class="hidden flex flex-col items-center justify-center py-20 gap-4"> <span class="material-symbols-outlined text-red-500 text-6xl">error_outline</span> <p class="text-slate-800 dark:text-white font-bold text-xl">No se pudieron cargar las actividades</p> <p class="text-slate-500">Por favor, inténtalo de nuevo más tarde.</p> </div> <!-- Empty State (hidden by default) --> <div id="empty" class="hidden flex flex-col items-center justify-center py-20 gap-4"> <span class="material-symbols-outlined text-slate-300 text-6xl">calendar_today</span> <p class="text-slate-800 dark:text-white font-bold text-xl">Aún no hay actividades publicadas </p> <p class="text-slate-500">Pronto compartiremos nuestras novedades.</p> </div> <!-- Blog Grid --> <div id="blog-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 opacity-0 transition-opacity duration-500"> <!-- Content will be injected here --> </div> </div> </section> </main> <!-- Gallery Modal --> <div id="gallery-modal" class="fixed inset-0 z-[100] hidden flex items-center justify-center p-4 bg-slate-900/95 backdrop-blur-sm"> <button id="close-modal" class="absolute top-6 right-6 text-white hover:text-turquoise transition-colors"> <span class="material-symbols-outlined text-4xl">close</span> </button> <div class="max-w-5xl w-full flex flex-col gap-6"> <div id="modal-image-container" class="aspect-video-custom bg-slate-800 rounded-2xl overflow-hidden shadow-2xl relative"> <img id="modal-main-image" class="w-full h-full object-contain" src="" alt="Vista previa"> <!-- Navigation --> <button id="prev-btn" class="absolute left-4 top-1/2 -translate-y-1/2 bg-white/10 hover:bg-white/20 p-2 rounded-full text-white backdrop-blur-md"> <span class="material-symbols-outlined">chevron_left</span> </button> <button id="next-btn" class="absolute right-4 top-1/2 -translate-y-1/2 bg-white/10 hover:bg-white/20 p-2 rounded-full text-white backdrop-blur-md"> <span class="material-symbols-outlined">chevron_right</span> </button> </div> <div id="modal-thumbnails" class="flex gap-4 overflow-x-auto pb-4 scrollbar-hide"> <!-- Thumbnails go here --> </div> </div> </div> <!-- Footer --> <footer id="footer" class="bg-slate-900 text-slate-300 py-20 px-4 border-t border-slate-800 relative overflow-hidden"> <div class="absolute top-0 right-0 w-96 h-96 bg-primary/20 rounded-full blur-[100px] pointer-events-none -translate-y-1/2 translate-x-1/2"> </div> <div class="mx-auto max-w-7xl px-4 lg:px-8 relative z-10"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 lg:gap-16 mb-16"> <div class="flex flex-col gap-6"> <div class="flex items-center mb-6"> <img src="logo_adig_blanco.png" alt="ADIG-SN Logo" class="h-16 w-auto object-contain" /> </div> <p class="text-sm leading-relaxed text-slate-400 font-medium"> Asociación para el Desarrollo Integral de Guatemala. Formando profesionales, transformando comunidades con innovación y compromiso. </p> <div class="flex gap-4 mt-2"> <a class="size-10 rounded-full bg-slate-800 flex items-center justify-center text-slate-400 hover:bg-primary hover:text-white transition-all transform hover:-translate-y-1" href="#"><span class="sr-only">Facebook</span> <svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24"> <path d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"> </path> </svg> </a> <a class="size-10 rounded-full bg-slate-800 flex items-center justify-center text-slate-400 hover:bg-secondary hover:text-white transition-all transform hover:-translate-y-1" href="#"><span class="sr-only">Instagram</span> <svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24"> <path clip-rule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772 4.902 4.902 0 011.772-1.153c.636-.247 1.363-.416 2.427-.465C9.673 2.013 10.03 2 12.48 2h-.165zm0 1.962h.03c2.551 0 2.862.009 3.882.056.904.041 1.399.191 1.728.32.435.168.749.37 1.08.702.333.33.535.644.703 1.08.128.33.279.824.32 1.728.047 1.02.056 1.33.056 3.992v.043c0 2.662-.009 2.972-.056 3.992-.041.904-.191 1.399-.32 1.728a3.037 3.037 0 01-.703 1.08 3.037 3.037 0 01-1.08.703c-.33.128-.824.279-1.728.32-1.02.047-1.33.056-3.992.056h-.043c-2.662 0-2.972-.009-3.992-.056-.904-.041-1.399-.191-1.728-.32a3.037 3.037 0 01-1.08-.703 3.037 3.037 0 01-.703-1.08c-.128-.33-.279-.824-.32-1.728-.047-1.02-.056-1.33-.056-3.992v-.043c0-2.662.009-2.972.056-3.992.041-.904.191-1.399.32-1.728.168-.435.37-.749.702-1.08.33-.333.644-.535 1.08-.703.33-.128.824-.279 1.728-.32 1.02-.047 1.33-.056 3.992-.056zM12.46 7.087a4.912 4.912 0 100 9.825 4.912 4.912 0 000-9.825zm0 1.962a2.95 2.95 0 110 5.9 2.95 2.95 0 010-5.9zM18.667 4.991a1.306 1.306 0 10.001 2.612 1.306 1.306 0 00-.001-2.612z" fill-rule="evenodd"></path> </svg> </a> </div> </div> <div> <h3 class="text-white font-bold text-lg mb-6">Navegación</h3> <ul class="flex flex-col gap-3 text-sm font-medium"> <li><a class="hover:text-turquoise transition-colors flex items-center gap-2 group" href="index.html"><span class="w-1.5 h-1.5 rounded-full bg-slate-600 group-hover:bg-turquoise transition-colors"></span>Inicio</a> </li> <li><a class="hover:text-turquoise transition-colors flex items-center gap-2 group" href="somos.html"><span class="w-1.5 h-1.5 rounded-full bg-slate-600 group-hover:bg-turquoise transition-colors"></span>Sobre Nosotros</a></li> <li><a class="hover:text-turquoise transition-colors flex items-center gap-2 group" href="esccuelas.html"><span class="w-1.5 h-1.5 rounded-full bg-slate-600 group-hover:bg-turquoise transition-colors"></span>Escuela de Enfermería</a></li> <li><a class="hover:text-turquoise transition-colors flex items-center gap-2 group" href="programas.html"><span class="w-1.5 h-1.5 rounded-full bg-slate-600 group-hover:bg-turquoise transition-colors"></span>Programas Sociales</a></li> <li><a class="text-turquoise transition-colors flex items-center gap-2" href="actividades.html"><span class="w-1.5 h-1.5 rounded-full bg-turquoise"></span>Noticias</a> </li> <li><a class="hover:text-turquoise transition-colors flex items-center gap-2 group" href="donaciones.html"><span class="w-1.5 h-1.5 rounded-full bg-slate-600 group-hover:bg-turquoise transition-colors"></span>Donaciones</a> </li> </ul> </div> <div> <h3 class="text-white font-bold text-lg mb-6">Contacto</h3> <ul class="flex flex-col gap-4 text-sm"> <li class="flex items-start gap-4"> <span class="material-symbols-outlined text-turquoise text-xl mt-0.5">location_on</span> <span class="text-slate-400">6ta Avenida 12-34, Zona 1<br />Guatemala</span> </li> <li class="flex items-center gap-4"> <span class="material-symbols-outlined text-turquoise text-xl">call</span> <span class="text-slate-400 hover:text-white transition-colors cursor-pointer">+502 2222-3333</span> </li> <li class="flex items-center gap-4"> <span class="material-symbols-outlined text-turquoise text-xl">mail</span> <span class="text-slate-400 hover:text-white transition-colors cursor-pointer">info@adig-sn.org</span> </li> </ul> </div> <div> <h3 class="text-white font-bold text-lg mb-6">Boletín Informativo</h3> <p class="text-sm text-slate-400 mb-4">Suscríbete para recibir noticias sobre nuestros programas y cursos.</p> <form class="flex flex-col gap-3" id="newsletter-form"> <div class="relative"> <input class="rounded-lg h-12 px-4 bg-slate-800 border-none text-white text-sm placeholder:text-slate-500 focus:ring-2 focus:ring-turquoise w-full" placeholder="Tu correo electrónico" type="email" name="email" required /> </div> <button class="rounded-lg h-12 px-4 bg-primary hover:bg-blue-700 text-white font-bold text-sm transition-colors border border-slate-700 shadow-lg shadow-black/20" type="submit">Suscribirse</button> </form> </div> </div> <div class="border-t border-slate-800 pt-8 flex flex-col md:flex-row justify-between items-center gap-4 text-xs text-slate-500"> <p>© 2024 ADIG-SN. Todos los derechos reservados.</p> <div class="flex gap-8"> <a class="hover:text-turquoise transition-colors" href="#">Política de Privacidad</a> <a class="hover:text-turquoise transition-colors" href="#">Términos de Uso</a> </div> </div> </div> </footer> </div> <script src="files/form-handler.js"></script> <!-- Blog Logic --> <script> // Replace with your actual deployment URL const SCRIPT_URL = 'https://script.google.com/macros/s/AKfycbxDevnrIkNfgRvP77u484EfbfDWmuae2UP6891dipZi3vO7I-35dXy5n5Z9LemhGdgh/exec'; let activities = []; let currentActivity = null; let currentPhotoIndex = 0; /** * Convierte enlaces de Google Drive comunes a enlaces de imagen directos. */ function formatImageUrl(url) { if (!url) return ''; // Si es un enlace de Google Drive if (url.includes('drive.google.com')) { const idMatch = url.match(/\/d\/([^\/]+)/) || url.match(/id=([^\&]+)/); if (idMatch && idMatch[1]) { return `https://lh3.googleusercontent.com/u/0/d/${idMatch[1]}`; } } return url; } async function fetchActivities() { try { const response = await fetch(SCRIPT_URL); if (!response.ok) throw new Error('Network error'); const data = await response.json(); if (data.error) throw new Error(data.error); activities = data; renderActivities(); } catch (err) { console.error('Fetch error:', err); document.getElementById('loading').classList.add('hidden'); document.getElementById('error').classList.remove('hidden'); } } function renderActivities() { const grid = document.getElementById('blog-grid'); const loading = document.getElementById('loading'); loading.classList.add('hidden'); if (activities.length === 0) { document.getElementById('empty').classList.remove('hidden'); return; } grid.innerHTML = activities.map((act, index) => { const mainPhoto = formatImageUrl(act.fotografía); return ` <div class="group bg-slate-50 dark:bg-slate-800/50 rounded-[2rem] overflow-hidden border border-slate-100 dark:border-slate-700 hover:shadow-2xl transition-all duration-500 flex flex-col"> <div class="relative aspect-video-custom overflow-hidden"> <img src="${mainPhoto || 'https://via.placeholder.com/800x450?text=ADIG-SN'}" alt="${act.título}" class="w-full h-full object-cover group-hover:scale-110 transition-transform duration-700"> <div class="absolute top-4 left-4"> <span class="bg-white/90 backdrop-blur-md text-slate-900 text-[10px] font-black uppercase tracking-widest px-3 py-1.5 rounded-full shadow-sm"> ${new Date(act.fecha).toLocaleDateString('es-ES', { day: 'numeric', month: 'short' })} </span> </div> </div> <div class="p-8 flex flex-col flex-grow"> <div class="flex items-center gap-2 text-turquoise text-[10px] font-black uppercase tracking-[0.2em] mb-3"> <span class="material-symbols-outlined text-xs">location_on</span> ${act.ubicación} </div> <h3 class="text-xl font-bold text-slate-900 dark:text-white mb-4 group-hover:text-turquoise transition-colors"> ${act.título} </h3> <p class="text-slate-500 dark:text-slate-400 text-sm leading-relaxed mb-6 line-clamp-3"> ${act.descripción} </p> <button onclick="openGallery(${index})" class="mt-auto flex items-center gap-2 text-primary dark:text-turquoise font-black text-xs uppercase tracking-widest hover:gap-4 transition-all"> Ver Galería <span class="material-symbols-outlined text-sm">arrow_forward</span> </button> </div> </div> `; }).join(''); grid.classList.remove('opacity-0'); } function openGallery(index) { currentActivity = activities[index]; const photosString = currentActivity.galería || ''; const photos = photosString.split(',').map(p => p.trim()).filter(p => p !== ''); // Add main photo as first photo and format all URLs const allPhotos = [currentActivity.fotografía, ...photos] .filter(p => p) .map(p => formatImageUrl(p)); if (allPhotos.length === 0) return; currentPhotoIndex = 0; updateModal(allPhotos); document.getElementById('gallery-modal').classList.remove('hidden'); document.body.style.overflow = 'hidden'; // Navigation handlers window.allCurrentPhotos = allPhotos; } function updateModal(photos) { const mainImg = document.getElementById('modal-main-image'); const thumbContainer = document.getElementById('modal-thumbnails'); mainImg.src = photos[currentPhotoIndex]; thumbContainer.innerHTML = photos.map((p, i) => ` <button onclick="changePhoto(${i})" class="flex-shrink-0 w-20 h-20 rounded-xl overflow-hidden border-2 transition-all ${i === currentPhotoIndex ? 'border-turquoise scale-105 shadow-lg' : 'border-transparent opacity-50 hover:opacity-100'}"> <img src="${p}" class="w-full h-full object-cover"> </button> `).join(''); } function changePhoto(index) { currentPhotoIndex = index; updateModal(window.allCurrentPhotos); } // Close modal document.getElementById('close-modal').addEventListener('click', () => { document.getElementById('gallery-modal').classList.add('hidden'); document.body.style.overflow = ''; }); // Click outside modal to close document.getElementById('gallery-modal').addEventListener('click', (e) => { if (e.target.id === 'gallery-modal') { document.getElementById('close-modal').click(); } }); // Next/Prev buttons document.getElementById('next-btn').addEventListener('click', (e) => { e.stopPropagation(); currentPhotoIndex = (currentPhotoIndex + 1) % window.allCurrentPhotos.length; updateModal(window.allCurrentPhotos); }); document.getElementById('prev-btn').addEventListener('click', (e) => { e.stopPropagation(); currentPhotoIndex = (currentPhotoIndex - 1 + window.allCurrentPhotos.length) % window.allCurrentPhotos.length; updateModal(window.allCurrentPhotos); }); // Start fetchActivities(); </script> </body> </html>
| ver. 1.1 | |
.
| PHP 8.4.20 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка