Remote Work Health & Wellness Planner

Remote Work Health & Wellness Planner

Set Up Your Workspace

Ideal Monitor Position

  • Top of the screen at or slightly below eye level.
  • Position monitor an arm's length away.
  • Avoid glare from windows or lights.

Correct Posture

  • Elbows at a 90-degree angle.
  • Wrists straight, not bent up or down.
  • Feet flat on the floor or a footrest.
  • Back supported by your chair.
Ergonomic Setup Diagram

Plan Your Daily Routine

Select Your Wellness Goals

Your Personalized Wellness Plan

Here is a summary of your selections. Download it as a PDF to keep it handy.

${goal.tip}

`; }); container.innerHTML = html; } // --- Plan Compilation --- function compilePlan() { const container = document.getElementById('plan-summary'); // 1. Routine let routineHtml = '

Your Daily Schedule

'; const scheduleSelects = document.querySelectorAll('#schedule-builder select'); let activityCount = 0; scheduleSelects.forEach((select, index) => { const activityType = activityTypes.find(a => a.type === select.value); if (activityType) { activityCount++; const isLast = index === scheduleSelects.length - 1; routineHtml += `
${select.dataset.hour} ${activityType.label}
`; } }); if (activityCount === 0) { routineHtml += '

No activities scheduled.

'; } routineHtml += '
'; // 2. Goals let goalsHtml = '

Your Wellness Goals & Tips

'; const selectedGoals = document.querySelectorAll('#goals-checklist input:checked'); if (selectedGoals.length > 0) { selectedGoals.forEach(goalInput => { const goal = wellnessGoals[goalInput.dataset.goalKey]; goalsHtml += `

${goal.title}: ${goal.tip}

`; }); } else { goalsHtml += '

No goals selected.

'; } goalsHtml += '
'; container.innerHTML = routineHtml + goalsHtml; } // --- PDF Generation --- async function generatePDF() { const { jsPDF } = window.jspdf; const originalButtonText = downloadPdfBtn.textContent; downloadPdfBtn.textContent = 'Generating...'; downloadPdfBtn.disabled = true; const pdfWrapper = document.createElement('div'); // Style and append clone to be rendered off-screen pdfWrapper.style.position = 'absolute'; pdfWrapper.style.left = '-9999px'; pdfWrapper.style.top = '0'; pdfWrapper.style.width = '800px'; pdfWrapper.style.backgroundColor = 'white'; pdfWrapper.className = 'p-8'; pdfWrapper.innerHTML = `

Remote Work Wellness Plan

${new Date().toLocaleDateString('en-US', { dateStyle: 'long' })}

`; const planSummaryClone = document.getElementById('plan-summary').cloneNode(true); pdfWrapper.appendChild(planSummaryClone); document.body.appendChild(pdfWrapper); try { const canvas = await html2canvas(pdfWrapper, { scale: 2, useCORS: true, logging: false }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'portrait', unit: 'px', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgWidth = canvas.width; const imgHeight = canvas.height; const ratio = imgWidth / imgHeight; let finalImgWidth = pdfWidth; let finalImgHeight = pdfWidth / ratio; if (finalImgHeight > pdfHeight) { finalImgHeight = pdfHeight; finalImgWidth = pdfHeight * ratio; } pdf.addImage(imgData, 'PNG', 0, 0, finalImgWidth, finalImgHeight); pdf.save('Remote-Wellness-Plan.pdf'); } catch (error) { console.error("PDF Generation Error:", error); } finally { document.body.removeChild(pdfWrapper); downloadPdfBtn.textContent = 'Download PDF Plan'; downloadPdfBtn.disabled = false; } } // --- Event Listeners --- downloadPdfBtn.addEventListener('click', generatePDF); // --- Initial Call --- initializeRoutinePlanner(); initializeGoals(); showTab(0); });
Scroll to Top