Crystal & Gemstone Therapy Guide

Select an intention to discover crystals and gemstones that may support your goals.

Important Disclaimer

This guide is for informational and entertainment purposes only. The alleged properties of crystals and gemstones are not supported by scientific evidence. This information is NOT a substitute for professional medical, legal, or financial advice.

What is your intention?

${intention.title}

`; } intentionContainer.innerHTML = html; } function generateGuide(intentionKey) { selectedIntentionKey = intentionKey; const data = crystalData[intentionKey]; // Deactivate all buttons document.querySelectorAll('.intention-btn').forEach(btn => btn.classList.remove('active')); // Activate the selected one document.querySelector(`.intention-btn[data-intention-key="${intentionKey}"]`).classList.add('active'); let crystalsHTML = ''; data.crystals.forEach(crystal => { crystalsHTML += `

${crystal.name}

${crystal.desc}

`; }); const resultsHTML = `

Crystals for ${data.title}

${crystalsHTML}
`; resultsContainer.innerHTML = resultsHTML; resultsContainer.classList.remove('hidden'); document.getElementById('download-pdf-btn').addEventListener('click', downloadPdf); resultsContainer.scrollIntoView({ behavior: 'smooth', block: 'start' }); } function downloadPdf() { if (!selectedIntentionKey) return; const data = crystalData[selectedIntentionKey]; const { jsPDF } = window.jspdf; const doc = new jsPDF(); // Header doc.setFontSize(22); doc.setFont('helvetica', 'bold'); doc.text(`Crystal Guide for ${data.title}`, 105, 20, { align: 'center' }); // Table of Crystals const tableData = data.crystals.map(c => [c.name, c.desc]); doc.autoTable({ startY: 35, head: [['Crystal / Gemstone', 'Associated Properties']], body: tableData, theme: 'grid', headStyles: { fillColor: [79, 70, 229] }, // Indigo columnStyles: { 1: { cellWidth: 120 } } }); let finalY = doc.autoTable.previous.finalY; // Disclaimer if (finalY > 240) { doc.addPage(); finalY = 20; } doc.setFontSize(12); doc.setFont('helvetica', 'bold'); doc.setTextColor(239, 68, 68); // Red doc.text('Important Disclaimer', 14, finalY + 15); doc.setFontSize(10); doc.setTextColor(0, 0, 0); // Black const disclaimerText = doc.splitTextToSize("This guide is for informational and entertainment purposes only. The alleged properties of crystals are not supported by scientific evidence and should not be used as a substitute for professional medical, legal, or financial advice.", 180); doc.text(disclaimerText, 14, finalY + 22); doc.save(`Crystal-Guide-${data.title.replace(' ', '-')}.pdf`); } // --- EVENT LISTENERS --- intentionContainer.addEventListener('click', (e) => { const intentionBtn = e.target.closest('.intention-btn'); if (intentionBtn) { generateGuide(intentionBtn.dataset.intentionKey); } }); // --- INITIALIZATION --- populateIntentionButtons(); });
Scroll to Top