Breastfeeding Nutrition Tracker

Breastfeeding Nutrition & Feeding Tracker

Monitor your nutrition and your baby's feeding schedule.

Log Your Intake

Log Baby's Feeding

Today's Log

Nutrition

No food logged yet.

Feedings

No feedings logged yet.

Daily Summary

Generated on: ${new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}

Nutritional Summary

Calories: ${totals.calories.toFixed(0)} kcal
Protein: ${totals.protein.toFixed(1)} g
Calcium: ${totals.calcium.toFixed(0)} mg
Iron: ${totals.iron.toFixed(1)} mg
Hydration: ${totals.hydration.toFixed(0)} ml

Nutrition Log

    ${nutritionHtml || '
  • No items logged.
  • '}

Feeding Log

    ${feedingHtml || '
  • No feedings logged.
  • '}
`; await new Promise(resolve => setTimeout(resolve, 100)); try { const canvas = await html2canvas(pdfExportContent, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: "portrait", unit: "pt", format: "a4" }); const pageWidth = pdf.internal.pageSize.getWidth(); const margin = 40; const imgProps = pdf.getImageProperties(imgData); const pdfImageWidth = pageWidth - (margin * 2); const pdfImageHeight = (imgProps.height * pdfImageWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', margin, margin, pdfImageWidth, pdfImageHeight); pdf.save(`Breastfeeding-Report-${new Date().toISOString().slice(0,10)}.pdf`); } catch (error) { console.error("Error generating PDF:", error); alert("Sorry, there was an error creating the PDF."); } finally { pdfLoader.classList.add('hidden'); pdfDownloadBtn.disabled = false; pdfExportContent.innerHTML = ''; } } // --- START THE APP --- initialize(); });
Scroll to Top