Ice Cream Flavor Maker

Create your own custom ice cream flavor!





Base: ${base}

Mix-Ins: ${mixIns.length > 0 ? mixIns.join(', ') : "None"}

Toppings: ${toppings.length > 0 ? toppings.join(', ') : "None"}

`; generatedFlavorDiv.style.display = 'block'; // Show PDF Download Button document.getElementById('download-pdf').style.display = 'block'; }); // PDF Download Functionality document.getElementById('download-pdf').addEventListener('click', () => { const { jsPDF } = window.jspdf; const doc = new jsPDF(); const base = document.getElementById('base-select').value; const mixIns = Array.from(document.querySelectorAll('.mix-in-checkbox:checked')).map(cb => cb.value); const toppings = Array.from(document.querySelectorAll('.topping-checkbox:checked')).map(cb => cb.value); const flavorName = document.getElementById('flavor-name').value.trim() || "Custom Creation"; // Add content to PDF doc.setFontSize(18); doc.text(`Your Custom Ice Cream Flavor: ${flavorName}`, 10, 20); doc.setFontSize(14); doc.text(`Base: ${base}`, 10, 40); doc.text(`Mix-Ins: ${mixIns.length > 0 ? mixIns.join(', ') : "None"}`, 10, 50); doc.text(`Toppings: ${toppings.length > 0 ? toppings.join(', ') : "None"}`, 10, 60); // Save PDF doc.save(`${flavorName.replace(/ /g, '_')}-recipe.pdf`); });

The Ice Cream Flavor Maker is a fun and engaging tool that allows users to mix and match ingredients to craft their unique ice cream flavor. Users can select a base, add mix-ins, choose toppings, and name their creation. A PDF recipe card is generated so they can recreate their masterpiece anytime!

Key Features:

✅ Customizable Ice Cream Creations – Choose base flavors, mix-ins, and toppings.
✅ Instant Flavor Preview – Displays the final combination dynamically.
✅ Personalized Name & Description – Users can name their creation.
✅ Downloadable PDF Recipe Card – Save and share custom flavors.
✅ Colorful, Modern UI – Attractive and fully responsive.