Strength Training Progressive Overload Planner

Progressive Overload Planner

Plan your lifts, track linear progression, and generate your gym workout log.

Progress Week: 1

My Strength Training Log

Week: 1

Add Exercise to Routine

Added weekly if target reps met.

Manage Exercises

Review your current routine and remove exercises.

Day Exercise Scheme Current Weight Action

Danger Zone

No exercises found. Add some in the "Add Exercises" tab.

'; return; } Object.keys(days).sort().forEach(dayName => { const card = document.createElement('div'); card.className = 'stpop-card'; let listHtml = ''; days[dayName].forEach(ex => { const weightDisplay = ex.weight > 0 ? `${ex.weight} lbs` : 'Bodyweight'; const nextWeight = ex.weight > 0 ? (parseInt(ex.weight) + parseInt(ex.increment)) : 0; const nextText = nextWeight > 0 ? `Next: ${nextWeight} lbs` : ''; listHtml += `
  • ${escapeHtml(ex.name)}
    Sets ${ex.sets}
    Reps ${ex.reps}
    Weight ${weightDisplay}
    ${ex.weight > 0 ? `
    If ${ex.sets}x${ex.reps} completed → Increase to ${nextWeight} lbs
    ` : ''}
  • `; }); card.innerHTML = `

    ${escapeHtml(dayName)}

      ${listHtml}
    `; planContainer.appendChild(card); }); } function renderConfig() { configTbody.innerHTML = ''; exercises.forEach(ex => { const tr = document.createElement('tr'); tr.innerHTML = ` ${escapeHtml(ex.day)} ${escapeHtml(ex.name)} ${ex.sets} x ${ex.reps} ${ex.weight} lbs (+${ex.increment}) `; configTbody.appendChild(tr); }); } window.stpopAddExercise = function() { const day = document.getElementById('stpop-input-day').value; const name = document.getElementById('stpop-input-name').value; const sets = document.getElementById('stpop-input-sets').value; const reps = document.getElementById('stpop-input-reps').value; const weight = document.getElementById('stpop-input-weight').value; const increment = document.getElementById('stpop-input-increment').value; if (!name) { alert("Please enter an exercise name."); return; } const newEx = { id: Date.now(), day: day, name: name, sets: parseInt(sets), reps: parseInt(reps), weight: weight ? parseInt(weight) : 0, increment: parseInt(increment) }; exercises.push(newEx); // Reset Fields document.getElementById('stpop-input-name').value = ''; document.getElementById('stpop-input-weight').value = ''; renderPlan(); renderConfig(); alert('Exercise Added!'); stpopSwitchTab('dashboard'); }; window.stpopDeleteExercise = function(id) { if(confirm("Remove this exercise from your plan?")) { exercises = exercises.filter(e => e.id !== id); renderPlan(); renderConfig(); } }; window.stpopAdvanceWeek = function() { if(confirm("Complete Week " + currentWeek + " and apply progressive overload?\n\nThis assumes you hit your targets for all weighted exercises.")) { currentWeek++; // Increase weights exercises = exercises.map(ex => { if(ex.weight > 0 && ex.increment > 0) { return { ...ex, weight: ex.weight + ex.increment }; } return ex; }); renderPlan(); renderConfig(); } }; window.stpopResetAll = function() { if(confirm("Are you sure? This will delete all exercises and reset progress.")) { exercises = []; currentWeek = 1; renderPlan(); renderConfig(); } }; // --- PDF Generation --- pdfBtn.addEventListener('click', function() { const element = document.getElementById('stpop-print-area'); const header = document.getElementById('stpop-pdf-header'); // Show header for PDF header.style.display = 'block'; document.body.classList.add('stpop-generating-pdf'); const opt = { margin: [0.5, 0.5], filename: `Strength_Plan_Week_${currentWeek}.pdf`, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; html2pdf().set(opt).from(element).save().then(() => { header.style.display = 'none'; document.body.classList.remove('stpop-generating-pdf'); }); }); // Utility function escapeHtml(text) { if (!text) return ''; return text.replace(/[&<>"']/g, function(m) { switch (m) { case '&': return '&'; case '<': return '<'; case '>': return '>'; case '"': return '"'; case "'": return '''; default: return m; } }); } });
    Scroll to Top