Compare commits

..

3 Commits

Author SHA1 Message Date
Jesko Dujmovic
f442b8af1e yoyoyo 2022-10-18 20:23:59 +02:00
Jesko Dujmovic
ee3f32b6cb it just can't stop improving
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-03 22:45:52 +01:00
Jesko Dujmovic
e75ffc06e5 change
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-29 09:56:50 +02:00
4 changed files with 52 additions and 61 deletions

View File

@@ -1,5 +1,5 @@
var exerciseTypes = [
{ name: "One Arm Dumbbell Row", tags: ["back"] },
{ name: "Row w/ One Arm Dumbbell", tags: ["back"] },
{ name: "Cable Row w/ Wide Neutral Grip", tags: ["back"] },
{ name: "Cable Row w/ Neutral Grip", tags: ["back"] },
{ name: "Cable Row w/ Over Grip", tags: ["back"] },
@@ -8,32 +8,38 @@ var exerciseTypes = [
{ name: "Machine Row w/ Under Grip", tags: ["back"] },
{ name: "Lat Pulldown Wide", tags: ["back"] },
{ name: "Lat Pulldown Narrow", tags: ["back"] },
{ name: "Lat Pulldown Chinese", tags: ["back"] },
{ name: "Rear Deltoid Machine", tags: ["back"] },
{ name: "Face Pull", tags: [] },
{ name: "Over Grip Pull Up", tags: [] },
{ name: "Under Grip Pull Up", tags: [] },
{ name: "Face Pull", tags: ["back"] },
{ name: "Pull Up Over Grip", tags: [] },
{ name: "Pull Up Under Grip", tags: [] },
{ name: "Side Raise", tags: ["shoulder"] },
{ name: "Military Press", tags: ["shoulder", "triceps"] },
{ name: "Machine Shoulder Press", tags: ["shoulder", "triceps"] },
{ name: "Dumbbell Shoulder Press", tags: ["shoulder", "triceps"] },
{ name: "Shoulder Press Machine", tags: ["shoulder", "triceps"] },
{ name: "Shoulder Press Dumbbell", tags: ["shoulder", "triceps"] },
{ name: "Incline Bench Press", tags: ["chest", "triceps"] },
{ name: "Incline Bench Press Dumbbell", tags: ["chest", "triceps"] },
{ name: "Bench Press", tags: ["chest", "triceps"] },
{ name: "Bench Press Dumbbell", tags: ["chest", "triceps"] },
{ name: "Bench Press Machine", tags: ["chest"] },
{ name: "Butterfly", tags: ["chest"] },
{ name: "Reverse Butterfly", tags: ["back"] },
{ name: "Dips", tags: ["chest", "triceps"] },
{ name: "Cable Over Head Rope Triceps", tags: ["triceps"] },
{ name: "Cable Over Head Bar Triceps", tags: ["triceps"] },
{ name: "Cable Rope Triceps Extension", tags: ["triceps"] },
{ name: "Cable Bar Triceps Extension", tags: ["triceps"] },
{ name: "Triceps Cable Over Head Rope", tags: ["triceps"] },
{ name: "Triceps Cable Over Head Bar", tags: ["triceps"] },
{ name: "Triceps Extension Cable Rope Triceps", tags: ["triceps"] },
{ name: "Triceps Extension Cable Bar Triceps", tags: ["triceps"] },
{ name: "Triceps Machine", tags: ["triceps"] },
{ name: "Side Lateral Raise", tags: [] },
{ name: "Machine Bench Press", tags: ["chest"] },
{ name: "Cable Biceps Curl", tags: ["biceps"] },
{ name: "Biceps Curl Cable", tags: ["biceps"] },
{ name: "Biceps Machine", tags: ["biceps"] },
{ name: "21s", tags: ["biceps"] },
{ name: "Biceps Curl", tags: ["biceps"] },
{ name: "Hammer Curl", tags: ["biceps"] },
{ name: "Supported Biceps Curl", tags: ["biceps"] },
{ name: "Deadlift", tags: [] },
{ name: "Standing Calf Raises", tags: ["leg"] },
{ name: "Hamstring Curl", tags: ["leg"] },
{ name: "Leg Press", tags: ["leg"] },
{ name: "Squat", tags: ["leg"] },
{ name: "Leg Curl", tags: ["leg"] },

View File

@@ -14,11 +14,9 @@
<div id="workout-selection-area">
<h2>Load Predefined Workout</h2>
<button class="loadPredefinedWorkout" id="load-leg-strength">Legs Strength</button>
<button class="loadPredefinedWorkout" id="load-body-strength">Upper Body Strength</button>
<button class="loadPredefinedWorkout" id="load-leg-hyp">Legs Hypertrophy</button>
<button class="loadPredefinedWorkout" id="load-chest-hyp">Chest-Triceps Hypertrophy</button>
<button class="loadPredefinedWorkout" id="load-back-hyp">Back-Biceps Hypertrophy</button>
<button class="loadPredefinedWorkout" id="monday">Monday</button>
<button class="loadPredefinedWorkout" id="wednesday">Wednesday</button>
<button class="loadPredefinedWorkout" id="friday">Friday</button>
</div>
<h2>Today's Workout</h2>
<ul id="exercise-list">

68
main.js
View File

@@ -25,7 +25,9 @@ function updateExercises() {
var workoutSelectionArea = document.getElementById("workout-selection-area");
workoutSelectionArea.innerHTML = '';
}
if (exercises[t] != null && exercises[t] != {}) {
localStorage.setItem("exercises", JSON.stringify(exercises));
}
}
function swap_right(i) {
@@ -137,50 +139,36 @@ addExerciseButton.onclick = () => {
function loadPredefinedWorkouts(workoutType) {
if (!exercisesEdited(exercises[t])) {
switch (workoutType) {
case ("load-leg-strength"):
case ("monday"):
exercises[t] = [
{ exerciseType: "Squat", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Leg Press", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Deadlift", repetitionType: "2-4", reps: "", weight: "" }
{ exerciseType: "Squat", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Military Press", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Pull Up Under Grip", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Butterfly", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Pull Up Under Grip", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Reverse Butterfly", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Triceps Machine", repetitionType: "5-8", reps: "", weight: "" },
];
break;
case ("load-back-hyp"):
exercises[t] = [
{ exerciseType: "One Arm Dumbbell Row", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Lat Pulldown Wide", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Lat Pulldown Narrow", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Cable Row w/ Wide Neutral Grip", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Rear Deltoid Machine", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Biceps Curl", repetitionType: "Pyramid", reps: "", weight: "" }
];
break;
case ("load-body-strength"):
exercises[t] = [
{ exerciseType: "Bench Press", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Cable Row w/ Over Grip", repetitionType: "2-4", reps: "", weight: "" },
{ exerciseType: "Dips", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Under Grip Pull Up", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Hammer Curl", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Supported Biceps Curl", repetitionType: "3-5", reps: "", weight: "" }
];
break;
case ("load-leg-hyp"):
exercises[t] = [
{ exerciseType: "Leg Press", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Squat", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Leg Extension", repetitionType: "12-15", reps: "", weight: "" },
{ exerciseType: "Leg Curl", repetitionType: "15-20", reps: "", weight: "" },
{ exerciseType: "Standing Calf Raises", repetitionType: "8-12", reps: "", weight: "" }
];
break;
case ("load-chest-hyp"):
case ("wednesday"):
exercises[t] = [
{ exerciseType: "Bench Press", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Incline Bench Press", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Machine Shoulder Press", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Butterfly", repetitionType: "12-15", reps: "", weight: "" },
{ exerciseType: "Side Lateral Raise", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Cable Triceps", repetitionType: "3-5", reps: "", weight: "" }
{ exerciseType: "Cable Row w/ Neutral Grip", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Leg Press", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Shoulder Press Machine", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Lat Pulldown Wide", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Side Raise", repetitionType: "8-12", reps: "", weight: "" }
];
break;
case ("friday"):
exercises[t] = [
{ exerciseType: "Deadlift", repetitionType: "3-5", reps: "", weight: "" },
{ exerciseType: "Incline Bench Press Dumbbell", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Pull Up Over Grip", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Dips", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Machine Row w/ Neutral Grip", repetitionType: "5-8", reps: "", weight: "" },
{ exerciseType: "Face Pull", repetitionType: "8-12", reps: "", weight: "" },
{ exerciseType: "Biceps Curl", repetitionType: "5-8", reps: "", weight: "" }
];
break;
default:
@@ -206,9 +194,11 @@ if (jsn != null) {
for (let [date, value] of Object.entries(jsn).sort().reverse()) {
s += date + "\n";
for (let exercise of value) {
if (exercise.reps != "" || exercise.weight != "") {
s += " " + exercise.exerciseType + ": " + exercise.weight + "kg x " + exercise.reps + " of " + exercise.repetitionType + "\n";
}
}
}
pre.textContent = s;
body.appendChild(pre);
}

View File

@@ -1,9 +1,6 @@
body {
font-size: larger;
}
button {
font-size: medium;
}
div {
display: inline-block;
}