Digital Nomad Community Finder

Digital Nomad Community Finder

Find your tribe. Discover communities of remote workers around the world.

${community.location}

${community.tagline}

`; communitiesContainer.appendChild(card); }); } function openModal(communityId) { const community = communitiesDB.find(c => c.id === communityId); modalContent.innerHTML = `
${community.name}

${community.name}

${community.location}

${community.description}

Amenities

    ${community.amenities.map(a => `
  • ${a}
  • `).join('')}

Testimonial

"${community.testimonials[0].text}" - ${community.testimonials[0].author}

`; modal.classList.remove('hidden'); document.getElementById('close-modal-btn').addEventListener('click', () => modal.classList.add('hidden')); } communitiesContainer.addEventListener('click', (e) => { if (e.target.classList.contains('view-details-btn')) { openModal(parseInt(e.target.dataset.id)); } }); countryFilter.addEventListener('change', renderCommunities); interestFilters.forEach(cb => cb.addEventListener('change', renderCommunities)); document.getElementById('pdf-download-btn').addEventListener('click', () => { const { jsPDF } = jspdf; const pdf = new jsPDF(); const selectedCountry = countryFilter.value; const selectedInterests = Array.from(interestFilters).filter(cb => cb.checked).map(cb => cb.dataset.filter); const filteredCommunities = communitiesDB.filter(c => (selectedCountry === 'all' || c.country === selectedCountry) && (selectedInterests.length === 0 || selectedInterests.every(i => c.features.includes(i)))); pdf.setFontSize(22); pdf.text(`Digital Nomad Communities`, 105, 20, { align: 'center' }); let y = 35; filteredCommunities.forEach((community, index) => { if (y > 260) { pdf.addPage(); y = 20; } pdf.setFontSize(16); pdf.setTextColor(40, 40, 180); pdf.text(`${index + 1}. ${community.name} - ${community.location}`, 15, y); y += 7; pdf.setFontSize(11); pdf.setTextColor(50, 50, 50); const descLines = pdf.splitTextToSize(community.description, 180); pdf.text(descLines, 20, y); y += (descLines.length * 5) + 5; }); pdf.save('digital-nomad-communities.pdf'); }); // Initial render renderCommunities(); });
Scroll to Top