Blog De Libros Pdf Google Drive -
.filter-btn i margin-right: 8px;
.blog-header p font-size: 1.2rem; opacity: 0.9; margin-top: 0.6rem; max-width: 650px; margin-left: auto; margin-right: auto;
.filter-btn background: transparent; border: none; font-weight: 600; padding: 0.5rem 1.2rem; border-radius: 40px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 0.9rem; transition: all 0.2s ease; color: #3a5a44; Blog De Libros Pdf Google Drive
.modal-content background: #fff6ed; width: 90%; max-width: 1100px; height: 85%; border-radius: 32px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 25px 40px rgba(0,0,0,0.3);
/* Sidebar: Google Drive integración */ .drive-sidebar background: #ffffffea; border-radius: 32px; padding: 1.5rem; box-shadow: 0 12px 24px rgba(0,0,0,0.05); border: 1px solid #e8dfd3; position: sticky; top: 100px; align-self: start; // Si por algún motivo la url no
function renderPosts() if (!postsContainer) return; const filteredPosts = activeFilter === 'all' ? blogPosts : blogPosts.filter(post => post.category === activeFilter); if (filteredPosts.length === 0) postsContainer.innerHTML = `<div style="text-align:center; padding: 3rem; background:#f7f2ea; border-radius: 2rem;">No hay entradas de esta categoría, pero puedes explorar los PDFs en el sidebar. 📚</div>`; return;
function openPdfModal(pdfEmbedUrl, fileName) // Asegurar que la URL use el formato embed /preview para máxima compatibilidad. // Si por algún motivo la url no contiene 'preview', la normalizamos. let finalUrl = pdfEmbedUrl; if (!finalUrl.includes('/preview')) // Si es del tipo file/d/ID/ lo convertimos a preview const match = finalUrl.match(/\/d\/(.+?)\//); if (match && match[1]) finalUrl = `https://drive.google.com/file/d/$match[1]/preview`; else finalUrl = finalUrl + "?embedded=true"; // Agregar parámetro para mejor visualización if (!finalUrl.includes('?')) finalUrl += '?usp=drivesdk'; else finalUrl += '&usp=drivesdk'; pdfIframe.src = finalUrl; modal.style.display = 'flex'; document.body.style.overflow = 'hidden'; // actualizar título modal const modalHeaderTitle = document.querySelector('#pdfModal .modal-header h3'); if (modalHeaderTitle) modalHeaderTitle.innerHTML = `<i class="fas fa-file-pdf"></i> $fileName.replace('.pdf', '') · Google Drive`; la normalizamos. let finalUrl = pdfEmbedUrl
/* sección de posts (entradas del blog) */ .posts-grid display: flex; flex-direction: column; gap: 2rem;