Travel Podcast Recommendation Tool

Travel Podcast Recommendation Tool

Select your interests to discover your next favorite travel podcast.

What are you interested in?

${podcast.description}

Sample: ${podcast.sample}

`; recommendationsContainer.appendChild(card); }); pdfDownloadSection.classList.remove('hidden'); } else { recommendationsContainer.innerHTML = `

No podcasts found for this interest.

`; pdfDownloadSection.classList.add('hidden'); } } function generatePdf() { const { jsPDF } = jspdf; const pdf = new jsPDF(); const selectedInterestName = Object.keys(interests).find(key => interests[key] === selectedInterest); pdf.setFontSize(22); pdf.text(`Podcast Recommendations`, 105, 20, { align: 'center' }); pdf.setFontSize(16); pdf.text(`For: ${selectedInterestName}`, 105, 30, { align: 'center' }); let y = 45; const filteredPodcasts = podcastDB.filter(p => p.tags.includes(selectedInterest)); filteredPodcasts.forEach((podcast, index) => { if (y > 270) { pdf.addPage(); y = 20; } pdf.setFontSize(14); pdf.setTextColor(40, 40, 180); pdf.text(`${index + 1}. ${podcast.name}`, 15, y); y += 7; pdf.setFontSize(11); pdf.setTextColor(50, 50, 50); const descLines = pdf.splitTextToSize(podcast.description, 180); pdf.text(descLines, 20, y); y += (descLines.length * 5); pdf.setFontSize(10); pdf.setTextColor(100, 100, 100); pdf.text(`Sample: ${podcast.sample}`, 20, y); y += 10; }); pdf.save('podcast-recommendations.pdf'); } pdfBtn.addEventListener('click', generatePdf); renderInterestButtons(); });
Scroll to Top