// attach event listeners to each download button (simulate actual download) document.querySelectorAll('.btn-download').forEach(btn => btn.addEventListener('click', (e) => 'lavilez_file.bin'; // In real scenario, you would point to actual server endpoint. // For demonstration: trigger download simulation with console and alert. // To make it fully functional: replace downloadLink attribute with real URL. const linkUrl = btn.getAttribute('data-dl-link'); if (linkUrl && linkUrl !== '#') window.location.href = linkUrl; else // demo simulation: create a blob and download (example text file) // This shows the user a download experience. showDemoDownload(fileName); ); );

id: 4, title: "Tech Service Manual (PDF)", version: "Rev 12", category: "documentation", description: "Complete technical reference guide – pinouts, troubleshooting flows, and maintenance procedures for Lavilez hardware.", fileSize: "9.1 MB", date: "2024-12-15", icon: "fa-book", downloadLink: "#", fileName: "Lavilez_Tech_Manual_Rev12.pdf" ,

.badge-tech display: inline-block; background: #eef2ff; padding: 0.3rem 1rem; border-radius: 40px; font-size: 0.8rem; font-weight: 600; color: #1e5a7a; margin-top: 1rem;

.card-title font-size: 1.55rem; font-weight: 700; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;

.card-icon background: linear-gradient(125deg, #eef7fd, #e2edf5); padding: 1.8rem 0 1rem; text-align: center; font-size: 3.2rem; color: #1e5a7a;

// initial load function init() generateFilters(); // builds categories from data bindFilterEvents(); renderDownloads();

// Helper: format date to readable string function formatDate(dateStr) const options = year: 'numeric', month: 'short', day: 'numeric' ; return new Date(dateStr).toLocaleDateString(undefined, options);

<!-- dynamic filter buttons --> <div class="filter-bar" id="filterBar"> <button class="filter-btn active" data-category="all"><i class="fas fa-th-large"></i> All</button> <!-- categories will be injected here dynamically from dataset, but we add static for demo --> </div>