All India Citizens Seva Sangam — Get Involved

All Programs

ProgramQtyUnit PriceSubtotalAction
Total: ₹0

My Basket

Total: ₹0
'); w.print(); } function clearCart(){Object.keys(cart).forEach(k=>delete cart[k]);renderCart();} function proceedToDonate(){alert("Redirect to donate.html");} function downloadBasketPDF(){ const cart = loadCart(); if(!cart.length){alert('Your basket is empty.');return;} let html = '

All India Citizens Seva Sangam - Donation Basket

'; let total = 0; cart.forEach(i=>{html += ``; total += i.price*i.qty;}); html += `
ProgramQtySubtotal (₹)
${i.name}${i.qty}₹${(i.price*i.qty).toLocaleString('en-IN')}
Total₹${total.toLocaleString('en-IN')}
`; // Use jsPDF for PDF generation const w = window.open('', '_blank'); w.document.write('Basket PDF' + html + ''); w.document.close(); w.focus(); w.print(); // Browser print-to-PDF } // Filter items by category function filterCategory(category) { const items = document.querySelectorAll('.program-item'); const buttons = document.querySelectorAll('.filter-btn'); // Update button styles buttons.forEach(btn => btn.classList.remove('active')); document .querySelector(`.filter-btn[onclick="filterCategory('${category}')"]`) ?.classList.add('active'); // Show/hide items items.forEach(item => { const itemCategory = item.dataset.category; if (category === 'all' || itemCategory === category) { item.style.display = 'block'; item.classList.add('fade-in'); } else { item.style.display = 'none'; } }); } // Search programs dynamically function searchPrograms() { const input = document.getElementById('searchInput').value.toLowerCase(); const items = document.querySelectorAll('.program-item'); items.forEach(item => { const text = item.textContent.toLowerCase(); if (text.includes(input)) { item.style.display = 'block'; item.classList.add('fade-in'); } else { item.style.display = 'none'; } }); } // Simple fade-in animation const style = document.createElement('style'); style.textContent = ` .fade-in { animation: fadeIn 0.4s ease-in-out; } @keyframes fadeIn { from {opacity: 0; transform: translateY(10px);} to {opacity: 1; transform: translateY(0);} }`; document.head.appendChild(style);