Iron Log – Workout Tracker
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #0f0f0f 100%);
font-family: -apple-system, BlinkMacSystemFont, ‘Segoe UI’, Roboto, sans-serif;
color: #fff;
padding: 20px;
}
.container {
max-width: 600px;
margin: 0 auto;
}
/* Header */
.header {
text-align: center;
margin-bottom: 30px;
animation: fadeIn 0.5s ease;
}
.header h1 {
font-size: 32px;
font-weight: 700;
margin: 0 0 8px 0;
background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.header p {
color: rgba(255,255,255,0.5);
margin: 0;
font-size: 14px;
letter-spacing: 2px;
}
/* Navigation */
.nav {
display: flex;
gap: 8px;
margin-bottom: 24px;
background: rgba(255,255,255,0.05);
padding: 6px;
border-radius: 16px;
}
.nav-btn {
flex: 1;
padding: 12px 16px;
border: none;
border-radius: 12px;
background: transparent;
color: rgba(255,255,255,0.5);
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.nav-btn.active {
background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
color: #fff;
}
/* Cards */
.card {
background: rgba(255,255,255,0.05);
border-radius: 20px;
padding: 24px;
margin-bottom: 20px;
border: 1px solid rgba(255,255,255,0.08);
animation: fadeIn 0.3s ease;
}
/* Form Elements */
.form-group {
margin-bottom: 16px;
}
.form-label {
display: block;
margin-bottom: 8px;
color: rgba(255,255,255,0.6);
font-size: 13px;
font-weight: 500;
}
input, select {
background: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
border-radius: 12px;
padding: 14px 16px;
color: #fff;
font-size: 15px;
width: 100%;
box-sizing: border-box;
transition: all 0.2s ease;
outline: none;
}
input:focus, select:focus {
border-color: rgba(59, 130, 246, 0.6);
background: rgba(255,255,255,0.12);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
input::placeholder {
color: rgba(255,255,255,0.4);
}
select option {
background: #1a1a2e;
color: #fff;
}
/* Grid */
.form-row {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 12px;
margin-bottom: 20px;
}
/* Buttons */
.btn-primary {
width: 100%;
padding: 16px;
border: none;
border-radius: 14px;
background: linear-gradient(135deg, #10B981 0%, #059669 100%);
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.btn-primary:disabled {
background: rgba(255,255,255,0.1);
color: rgba(255,255,255,0.3);
cursor: not-allowed;
}
.btn-delete {
background: rgba(239, 68, 68, 0.2);
border: none;
border-radius: 8px;
padding: 8px 12px;
color: #EF4444;
cursor: pointer;
font-size: 12px;
}
/* Section Title */
.section-title {
margin: 0 0 16px 0;
font-size: 14px;
color: rgba(255,255,255,0.6);
font-weight: 600;
letter-spacing: 1px;
}
/* Log Item */
.log-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.log-item:last-child {
border-bottom: none;
}
.log-name {
font-weight: 500;
margin-bottom: 4px;
}
.log-details {
font-size: 13px;
color: rgba(255,255,255,0.5);
}
/* History Item */
.history-item {
padding: 16px 0;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.history-item:last-child {
border-bottom: none;
}
.history-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 8px;
}
.history-date {
font-size: 13px;
color: rgba(255,255,255,0.4);
text-align: right;
}
.history-stats {
display: flex;
gap: 20px;
font-size: 14px;
color: rgba(255,255,255,0.7);
}
.history-stats strong {
color: #fff;
}
.volume {
color: #10B981 !important;
}
/* Muscle Tag */
.muscle-tag {
display: inline-block;
padding: 4px 10px;
border-radius: 6px;
font-size: 11px;
font-weight: 600;
}
/* Empty State */
.empty-state {
text-align: center;
padding: 60px 20px;
color: rgba(255,255,255,0.4);
}
.empty-state .icon {
font-size: 48px;
margin-bottom: 16px;
}
.empty-state .subtitle {
font-size: 14px;
margin-top: 8px;
}
/* Stats Footer */
.stats-footer {
margin-top: 24px;
padding: 16px;
background: rgba(255,255,255,0.03);
border-radius: 16px;
display: flex;
justify-content: space-around;
text-align: center;
}
.stat-value {
font-size: 24px;
font-weight: 700;
}
.stat-label {
font-size: 11px;
color: rgba(255,255,255,0.4);
letter-spacing: 0.5px;
}
/* Progress Item */
.progress-item {
padding: 14px 0;
border-bottom: 1px solid rgba(255,255,255,0.08);
cursor: pointer;
transition: all 0.2s ease;
}
.progress-item:last-child {
border-bottom: none;
}
.progress-item-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.progress-item-name {
font-weight: 500;
margin-bottom: 4px;
}
.progress-item-name.selected {
color: #3B82F6;
}
.progress-item-info {
font-size: 13px;
color: rgba(255,255,255,0.5);
}
/* Chart Container */
.chart-card {
background: rgba(255,255,255,0.05);
border-radius: 20px;
padding: 20px;
margin-bottom: 20px;
border: 1px solid rgba(255,255,255,0.08);
}
.chart-title {
margin: 0 0 20px 0;
font-size: 16px;
font-weight: 600;
}
.chart-section {
margin-bottom: 24px;
}
.chart-section:last-child {
margin-bottom: 0;
}
.chart-label {
font-size: 12px;
color: rgba(255,255,255,0.5);
margin-bottom: 12px;
font-weight: 500;
}
.chart-container {
height: 150px;
position: relative;
}
.chart-bars {
display: flex;
align-items: flex-end;
justify-content: space-between;
height: 120px;
gap: 4px;
padding: 0 4px;
}
.chart-bar-wrapper {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
max-width: 40px;
}
.chart-bar {
width: 100%;
border-radius: 4px 4px 0 0;
min-height: 4px;
transition: height 0.3s ease;
}
.chart-bar.weight {
background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%);
}
.chart-bar.volume {
background: linear-gradient(180deg, #10B981 0%, #047857 100%);
}
.chart-bar-label {
font-size: 9px;
color: rgba(255,255,255,0.4);
margin-top: 6px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.chart-bar-value {
font-size: 10px;
color: rgba(255,255,255,0.7);
margin-bottom: 4px;
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Hidden */
.hidden {
display: none !important;
}
/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
IRON LOG
TRACK YOUR PROGRESS
All Muscle Groups
Select exercise…
// Exercise Database
const EXERCISES = [
{ name: “Ab Coaster”, muscle: “Abs” },
{ name: “Ab Crunch”, muscle: “Abs” },
{ name: “Ab Side Raises”, muscle: “Abs” },
{ name: “Around the World”, muscle: “Abs” },
{ name: “Assisted Pullup”, muscle: “Back” },
{ name: “Back Raise (platform)”, muscle: “Glutes” },
{ name: “Banded Side Step”, muscle: “Glutes” },
{ name: “Barbell Back Squat (low)”, muscle: “Hamstring” },
{ name: “Barbell Back Squat (normal)”, muscle: “Quads” },
{ name: “Barbell Bench Press (flat, medium grip)”, muscle: “Chest” },
{ name: “Barbell Bench Press (incline narrow grip)”, muscle: “Shoulders” },
{ name: “Barbell Bench Press (wide grip)”, muscle: “Chest” },
{ name: “Barbell Curl (narrow)”, muscle: “Biceps” },
{ name: “Barbell Curl (normal)”, muscle: “Biceps” },
{ name: “Barbell Deadlift”, muscle: “Glutes” },
{ name: “Barbell Front Raise”, muscle: “Shoulders” },
{ name: “Barbell Front Squat”, muscle: “Quads” },
{ name: “Barbell Good Morning (seated)”, muscle: “Back” },
{ name: “Barbell Good Morning (standing)”, muscle: “Hamstring” },
{ name: “Barbell Hip Thrust (from bench)”, muscle: “Glutes” },
{ name: “Barbell Inverted Skull Crusher”, muscle: “Triceps” },
{ name: “Barbell Jefferson Curl”, muscle: “Back” },
{ name: “Barbell Overhead Triceps Extension (seated)”, muscle: “Triceps” },
{ name: “Barbell Row to Chest”, muscle: “Back” },
{ name: “Barbell Shoulder Press (seated upright)”, muscle: “Shoulders” },
{ name: “Barbell Shoulder Press (standing)”, muscle: “Shoulders” },
{ name: “Barbell Upright Row”, muscle: “Shoulders” },
{ name: “Cable Chest Fly”, muscle: “Chest” },
{ name: “Cable Bicep Curl (straight bar)”, muscle: “Biceps” },
{ name: “Cable Glute Kickback (cable bar)”, muscle: “Glutes” },
{ name: “Cable Glute Kickback (cable loop)”, muscle: “Glutes” },
{ name: “Cable Hip Abduction”, muscle: “Hips” },
{ name: “Cable Hip Adduction”, muscle: “Inner Thigh” },
{ name: “Cable Lat Pulldown (narrow grip)”, muscle: “Back” },
{ name: “Cable Lat Pulldown (wide grip)”, muscle: “Back” },
{ name: “Cable Leg Extension”, muscle: “Quads” },
{ name: “Cable Leg Press (calves only)”, muscle: “Calves” },
{ name: “Cable Leg Press (quads only)”, muscle: “Quads” },
{ name: “Cable Lying Leg Curl”, muscle: “Hamstring” },
{ name: “Cable Pulldown (straight bar)”, muscle: “Back” },
{ name: “Cable Pullthrough”, muscle: “Glutes” },
{ name: “Cable Rear Delt Fly”, muscle: “Back” },
{ name: “Cable Rope Crunch”, muscle: “Abs” },
{ name: “Cable Rope Tricep Pushdown”, muscle: “Triceps” },
{ name: “Cable Row (seated)”, muscle: “Back” },
{ name: “Cable Seated Leg Curl”, muscle: “Hamstring” },
{ name: “Cable Single Arm Pull Down”, muscle: “Back” },
{ name: “Cable Single Arm Rear Delt Raises”, muscle: “Shoulders” },
{ name: “Cable Tricep SA Overhand Grip”, muscle: “Triceps” },
{ name: “Cable Tricep SA Underhand Grip”, muscle: “Triceps” },
{ name: “Cable Twist”, muscle: “Abs” },
{ name: “Cable Upright Row”, muscle: “Shoulders” },
{ name: “Calf raises”, muscle: “Calves” },
{ name: “Dumbbell Arnold Press”, muscle: “Shoulders” },
{ name: “Dumbbell Bent Lat Raises”, muscle: “Shoulders” },
{ name: “Dumbbell Bicep Curl (incline)”, muscle: “Biceps” },
{ name: “Dumbbell Bicep Curl (seated)”, muscle: “Biceps” },
{ name: “Dumbbell Bicep Curl (standing,flared)”, muscle: “Biceps” },
{ name: “Dumbbell Bicep Curl (standing,standard)”, muscle: “Biceps” },
{ name: “Dumbbell Bulgarian Split Squat”, muscle: “Quads” },
{ name: “Dumbbell Chest Supported Spider Curl”, muscle: “Biceps” },
{ name: “Dumbbell Fly (bench incline)”, muscle: “Chest” },
{ name: “Dumbbell Fly (bench on back)”, muscle: “Chest” },
{ name: “Dumbbell Front Delt Raise”, muscle: “Shoulders” },
{ name: “Dumbbell Front Delt Raise (single db)”, muscle: “Shoulders” },
{ name: “Dumbbell Goblet Squat”, muscle: “Quads” },
{ name: “Dumbbell Hammer Curl”, muscle: “Biceps” },
{ name: “Dumbbell Hammer Curl (incline)”, muscle: “Biceps” },
{ name: “Dumbbell Lateral Raise (standing)”, muscle: “Shoulders” },
{ name: “Dumbbell Lateral to Front Raise”, muscle: “Shoulders” },
{ name: “Dumbbell Reverse Lunge”, muscle: “Glutes” },
{ name: “Dumbbell Romanian Deadlift”, muscle: “Glutes” },
{ name: “Dumbbell Round the World”, muscle: “Back” },
{ name: “Dumbbell Row (2 arm)”, muscle: “Back” },
{ name: “Dumbbell Row (SA supported)”, muscle: “Back” },
{ name: “Dumbbell Shoulder Press (incline)”, muscle: “Shoulders” },
{ name: “Dumbbell Shoulder Press (upright seated)”, muscle: “Shoulders” },
{ name: “Dumbbell Shrug”, muscle: “Shoulders” },
{ name: “Dumbbell Single Leg Romanian Deadlift”, muscle: “Glutes” },
{ name: “Dumbbell Skull Crusher (double – bench on back)”, muscle: “Triceps” },
{ name: “Dumbbell Skull Crusher (single – bench on back)”, muscle: “Triceps” },
{ name: “Dumbbell Split Squat”, muscle: “Quads” },
{ name: “Dumbbell Squat (for glutes)”, muscle: “Glutes” },
{ name: “Dumbbell Squat (for quads)”, muscle: “Quads” },
{ name: “Dumbbell Tricep Extension (seated)”, muscle: “Triceps” },
{ name: “Dumbbell Tricep Extension (standing)”, muscle: “Triceps” },
{ name: “Dumbbell Tricep Kickback”, muscle: “Triceps” },
{ name: “Dumbbell Underhand Frontal Raises”, muscle: “Shoulders” },
{ name: “Dumbbell Upright Rows”, muscle: “Shoulders” },
{ name: “Freemotion Cable Y-Raises”, muscle: “Shoulders” },
{ name: “Hack Bulgarian Split Squat”, muscle: “Quads” },
{ name: “Hack Squat”, muscle: “Glutes” },
{ name: “Hammer Calf Raises”, muscle: “Calves” },
{ name: “Hammer Chest Press”, muscle: “Chest” },
{ name: “Hammer Chest Press (decline)”, muscle: “Chest” },
{ name: “Hammer Front Pulldown”, muscle: “Back” },
{ name: “Hammer Hoist”, muscle: “Back” },
{ name: “Hammer Isolateral Bench Press”, muscle: “Chest” },
{ name: “Hammer Leg Curl”, muscle: “Hamstring” },
{ name: “Hammer Leg Extension”, muscle: “Quads” },
{ name: “Hammer Linear Leg Press (quads)”, muscle: “Quads” },
{ name: “Hammer Row”, muscle: “Back” },
{ name: “Hammer Seated Dip”, muscle: “Triceps” },
{ name: “Hammer Shoulder Press”, muscle: “Shoulders” },
{ name: “Hanging Straight Leg Raise”, muscle: “Abs” },
{ name: “Heel Touches”, muscle: “Abs” },
{ name: “Kettlebell Side Bend”, muscle: “Abs” },
{ name: “Nordic Hamstring”, muscle: “Hamstring” },
{ name: “Overhead Marches”, muscle: “Abs” },
{ name: “Plank”, muscle: “Abs” },
{ name: “Plate Squat”, muscle: “Quads” },
{ name: “Poliquin Step Ups”, muscle: “Quads” },
{ name: “Pullup (normal grip)”, muscle: “Back” },
{ name: “Pushup (narrow)”, muscle: “Triceps” },
{ name: “Russian Twist”, muscle: “Abs” },
{ name: “V-squat”, muscle: “Quads” },
{ name: “V-squat (reverse)”, muscle: “Glutes” },
{ name: “Wall Sit”, muscle: “Quads” }
];
const MUSCLE_GROUPS = […new Set(EXERCISES.map(e => e.muscle))].sort();
const MUSCLE_COLORS = {
“Abs”: “#F97316”,
“Back”: “#3B82F6”,
“Biceps”: “#8B5CF6”,
“Calves”: “#EC4899”,
“Chest”: “#EF4444”,
“Glutes”: “#F59E0B”,
“Hamstring”: “#10B981”,
“Hips”: “#6366F1”,
“Inner Thigh”: “#14B8A6”,
“Quads”: “#22C55E”,
“Shoulders”: “#0EA5E9”,
“Triceps”: “#A855F7″
};
// State
let logs = [];
let currentView = ‘log’;
let selectedMuscle = ‘All’;
let selectedExercise = ”;
let searchTerm = ”;
// DOM Elements
const dateInput = document.getElementById(‘workout-date’);
const muscleFilter = document.getElementById(‘muscle-filter’);
const exerciseSearch = document.getElementById(‘exercise-search’);
const exerciseSelect = document.getElementById(‘exercise-select’);
const weightInput = document.getElementById(‘weight-input’);
const repsInput = document.getElementById(‘reps-input’);
const setsInput = document.getElementById(‘sets-input’);
const logBtn = document.getElementById(‘log-btn’);
const todayCard = document.getElementById(‘today-card’);
const todayLogs = document.getElementById(‘today-logs’);
// Initialize
function init() {
// Set today’s date
dateInput.value = new Date().toISOString().split(‘T’)[0];
// Load saved data
const saved = localStorage.getItem(‘ironlog-workouts’);
if (saved) {
logs = JSON.parse(saved);
}
// Populate muscle groups
MUSCLE_GROUPS.forEach(muscle => {
const option = document.createElement(‘option’);
option.value = muscle;
option.textContent = muscle;
muscleFilter.appendChild(option);
});
// Event listeners
document.querySelectorAll(‘.nav-btn’).forEach(btn => {
btn.addEventListener(‘click’, () => switchView(btn.dataset.view));
});
muscleFilter.addEventListener(‘change’, (e) => {
selectedMuscle = e.target.value;
updateExerciseList();
});
exerciseSearch.addEventListener(‘input’, (e) => {
searchTerm = e.target.value;
updateExerciseList();
});
exerciseSelect.addEventListener(‘change’, updateLogButton);
weightInput.addEventListener(‘input’, updateLogButton);
repsInput.addEventListener(‘input’, updateLogButton);
setsInput.addEventListener(‘input’, updateLogButton);
logBtn.addEventListener(‘click’, logWorkout);
updateExerciseList();
updateStats();
renderTodayLogs();
}
function switchView(view) {
currentView = view;
document.querySelectorAll(‘.nav-btn’).forEach(btn => {
btn.classList.toggle(‘active’, btn.dataset.view === view);
});
document.getElementById(‘log-view’).classList.toggle(‘hidden’, view !== ‘log’);
document.getElementById(‘history-view’).classList.toggle(‘hidden’, view !== ‘history’);
document.getElementById(‘progress-view’).classList.toggle(‘hidden’, view !== ‘progress’);
if (view === ‘history’) renderHistory();
if (view === ‘progress’) renderProgress();
}
function updateExerciseList() {
const filtered = EXERCISES.filter(e => {
const matchesMuscle = selectedMuscle === ‘All’ || e.muscle === selectedMuscle;
const matchesSearch = e.name.toLowerCase().includes(searchTerm.toLowerCase());
return matchesMuscle && matchesSearch;
});
exerciseSelect.innerHTML = ‘Select exercise…’;
filtered.forEach(e => {
const option = document.createElement(‘option’);
option.value = e.name;
option.textContent = e.name;
exerciseSelect.appendChild(option);
});
}
function updateLogButton() {
const hasData = exerciseSelect.value && weightInput.value && repsInput.value && setsInput.value;
logBtn.disabled = !hasData;
}
function logWorkout() {
const exercise = EXERCISES.find(e => e.name === exerciseSelect.value);
const newLog = {
id: Date.now(),
date: dateInput.value,
exercise: exerciseSelect.value,
muscle: exercise?.muscle || ‘Unknown’,
weight: parseFloat(weightInput.value),
reps: parseInt(repsInput.value),
sets: parseInt(setsInput.value)
};
logs.push(newLog);
saveData();
weightInput.value = ”;
repsInput.value = ”;
setsInput.value = ”;
updateLogButton();
updateStats();
renderTodayLogs();
}
function deleteLog(id) {
logs = logs.filter(l => l.id !== id);
saveData();
updateStats();
renderTodayLogs();
if (currentView === ‘history’) renderHistory();
if (currentView === ‘progress’) renderProgress();
}
function saveData() {
localStorage.setItem(‘ironlog-workouts’, JSON.stringify(logs));
}
function updateStats() {
document.getElementById(‘total-logs’).textContent = logs.length;
document.getElementById(‘total-exercises’).textContent = new Set(logs.map(l => l.exercise)).size;
document.getElementById(‘total-days’).textContent = new Set(logs.map(l => l.date)).size;
}
function renderTodayLogs() {
const today = dateInput.value;
const todaysLogs = logs.filter(l => l.date === today);
if (todaysLogs.length === 0) {
todayCard.classList.add(‘hidden’);
return;
}
todayCard.classList.remove(‘hidden’);
todayLogs.innerHTML = todaysLogs.map(log => `
`).join(”);
}
function renderHistory() {
const content = document.getElementById(‘history-content’);
const recent = […logs].sort((a, b) => new Date(b.date) – new Date(a.date)).slice(0, 20);
if (recent.length === 0) {
content.innerHTML = `
`;
return;
}
content.innerHTML = `
RECENT WORKOUTS
${recent.map(log => `
${log.muscle}
${log.reps} reps
${log.sets} sets
${log.weight * log.reps * log.sets} vol
`).join(”)}
`;
}
function renderProgress() {
const content = document.getElementById(‘progress-content’);
const exerciseNames = […new Set(logs.map(l => l.exercise))];
if (exerciseNames.length === 0) {
content.innerHTML = `
`;
return;
}
const exerciseData = exerciseNames.map(name => {
const exerciseLogs = logs.filter(l => l.exercise === name);
const latest = exerciseLogs.sort((a, b) => new Date(b.date) – new Date(a.date))[0];
const exercise = EXERCISES.find(e => e.name === name);
return {
name,
muscle: exercise?.muscle || ‘Unknown’,
latestWeight: latest.weight,
totalSessions: exerciseLogs.length
};
});
content.innerHTML = `
Select exercise to view progress…
${exerciseData.map(e => `${e.name}`).join(”)}
ALL EXERCISES
${exerciseData.map(e => `
${e.muscle}
`).join(”)}
`;
document.getElementById(‘progress-exercise-select’).addEventListener(‘change’, (e) => {
if (e.target.value) selectProgressExercise(e.target.value);
});
}
function selectProgressExercise(name) {
selectedExercise = name;
// Update dropdown
const select = document.getElementById(‘progress-exercise-select’);
if (select) select.value = name;
// Get progress data
const data = logs
.filter(l => l.exercise === name)
.sort((a, b) => new Date(a.date) – new Date(b.date))
.map(l => ({
date: new Date(l.date).toLocaleDateString(‘en-US’, { month: ‘short’, day: ‘numeric’ }),
weight: l.weight,
volume: l.weight * l.reps * l.sets
}));
if (data.length === 0) return;
const maxWeight = Math.max(…data.map(d => d.weight));
const maxVolume = Math.max(…data.map(d => d.volume));
const chartContainer = document.getElementById(‘progress-chart’);
chartContainer.innerHTML = `
${name}
`;
}
// Start the app
init();