Blog De Libros Pdf Google Drive Site
// ======================== // 2. LISTA DE PDFs para el sidebar (Google Drive) // Mismos datos que posts pero se muestran también como lista independiente. // ======================== function buildDrivePdfList() const pdfListEl = document.getElementById('drivePdfList'); if (!pdfListEl) return; pdfListEl.innerHTML = ''; blogPosts.forEach(post => const li = document.createElement('li'); li.className = 'pdf-item'; const driveUrl = `https://drive.google.com/file/d/$post.pdfDriveId/preview`; const link = document.createElement('a'); link.href = "#"; link.setAttribute('data-pdf-url', driveUrl); link.setAttribute('data-pdf-name', post.pdfFileName); link.innerHTML = `<i class="fas fa-file-pdf"></i> <span>$post.pdfFileName.replace(/_/g, ' ').replace('.pdf', '')</span>`; link.addEventListener('click', (e) => e.preventDefault(); openPdfModal(driveUrl, post.pdfFileName); ); li.appendChild(link); pdfListEl.appendChild(li); );
<!-- Modal visualizador PDF embebido --> <div id="pdfModal" class="pdf-modal"> <div class="modal-content"> <div class="modal-header"> <h3><i class="fas fa-file-pdf"></i> Lector de Google Drive</h3> <button class="close-modal" id="closeModalBtn">×</button> </div> <div class="modal-body"> <iframe id="pdfIframe" src="" title="Visor PDF"></iframe> </div> </div> </div> Blog De Libros Pdf Google Drive
// ======================== // 3. RENDER POSTS del BLOG con filtros dinámicos y botón LEER PDF // ======================== const postsContainer = document.getElementById('postsContainer'); let activeFilter = 'all'; // ======================== // 2
.post-card:hover transform: translateY(-4px); box-shadow: 0 18px 30px rgba(0,0,0,0.1); RENDER POSTS del BLOG con filtros dinámicos y
.drive-note background: #f4efe7; border-radius: 20px; padding: 1rem; font-size: 0.8rem; text-align: center; color: #6b5a48; margin-top: 1rem;
.pdf-item i font-size: 1.3rem; color: #dd4b39;