Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/blockTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat", "Power Clean"], sets: "3x6", intensity: 75 },
{ type: "hypertrophy", exercises: ["DB Chest Flys", "DB Reverse Flys", "DB Lateral Raises", "DB Pullovers", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x12", intensity: 65 },
{ type: "hiit", activity: "Reset-20", duration: 20 },
{ type: "hiit", activity: "Reset-20", duration: 20, rounds: 5 },
{ type: "strength", exercises: ["Bench Press", "Squat", "Power Clean"], sets: "3x6", intensity: 75 },
{ type: "hypertrophy", exercises: ["KB Bulgarian Split Squat", "KB Cossack Squat", "KB Hack Squat", "Calf Raise", "Adduction Machine", "Abduction Machine"], sets: "4x12", intensity: 65 },
{ type: "rest" },
Expand All @@ -185,7 +185,7 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat", "Power Clean"], sets: "3x5", intensity: 80 },
{ type: "hypertrophy", exercises: ["DB Chest Flys", "DB Reverse Flys", "DB Lateral Raises", "DB Pullovers", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x10", intensity: 70 },
{ type: "hiit", activity: "Reset-20", duration: 15 },
{ type: "hiit", activity: "Reset-20", duration: 15, rounds: 4 },
{ type: "strength", exercises: ["Bench Press", "Squat", "Power Clean"], sets: "3x5", intensity: 80 },
{ type: "hypertrophy", exercises: ["KB Bulgarian Split Squat", "KB Cossack Squat", "KB Hack Squat", "Calf Raise", "Adduction Machine", "Abduction Machine"], sets: "4x10", intensity: 70 },
{ type: "rest" },
Expand All @@ -196,7 +196,7 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat", "Power Clean"], sets: "3x3", intensity: 85 },
{ type: "hypertrophy", exercises: ["DB Chest Flys", "DB Reverse Flys", "DB Lateral Raises", "DB Pullovers", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x8", intensity: 75 },
{ type: "hiit", activity: "Reset-20", duration: 15 },
{ type: "hiit", activity: "Reset-20", duration: 15, rounds: 4 },
{ type: "strength", exercises: ["Bench Press", "Squat", "Power Clean"], sets: "3x3", intensity: 85 },
{ type: "hypertrophy", exercises: ["KB Bulgarian Split Squat", "KB Cossack Squat", "KB Hack Squat", "Calf Raise", "Adduction Machine", "Abduction Machine"], sets: "4x8", intensity: 75 },
{ type: "rest" },
Expand All @@ -211,7 +211,7 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat", "Deadlift"], sets: "3x6,3x6,1x6", intensity: 75 },
{ type: "hypertrophy", exercises: ["Bench Press", "Squat", "Romanian Deadlift"], sets: "4x12,4x12,4x12", intensity: 65 },
{ type: "hiit", activity: "Reset-20", duration: 20 },
{ type: "hiit", activity: "Reset-20", duration: 20, rounds: 5 },
{ type: "strength", exercises: ["Bench Press", "Squat", "Deadlift"], sets: "3x6,3x6,1x6", intensity: 75 },
{ type: "hypertrophy", exercises: ["Bench Press", "Squat", "Romanian Deadlift"], sets: "4x12,4x12,4x12", intensity: 65 },
{ type: "rest" },
Expand All @@ -222,7 +222,7 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat", "Deadlift"], sets: "3x5,3x5,1x5", intensity: 80 },
{ type: "hypertrophy", exercises: ["Bench Press", "Squat", "Romanian Deadlift"], sets: "4x10,4x10,4x10", intensity: 70 },
{ type: "hiit", activity: "Reset-20", duration: 15 },
{ type: "hiit", activity: "Reset-20", duration: 15, rounds: 4 },
{ type: "strength", exercises: ["Bench Press", "Squat", "Deadlift"], sets: "3x5,3x5,1x5", intensity: 80 },
{ type: "hypertrophy", exercises: ["Bench Press", "Squat", "Romanian Deadlift"], sets: "4x10,4x10,4x10", intensity: 70 },
{ type: "rest" },
Expand All @@ -233,7 +233,7 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat", "Deadlift"], sets: "3x3,3x3,1x3", intensity: 85 },
{ type: "hypertrophy", exercises: ["Bench Press", "Squat", "Romanian Deadlift"], sets: "4x8,4x8,4x8", intensity: 75 },
{ type: "hiit", activity: "Reset-20", duration: 15 },
{ type: "hiit", activity: "Reset-20", duration: 15, rounds: 4 },
{ type: "strength", exercises: ["Bench Press", "Squat", "Deadlift"], sets: "3x3,3x3,1x3", intensity: 85 },
{ type: "hypertrophy", exercises: ["Bench Press", "Squat", "Romanian Deadlift"], sets: "4x8,4x8,4x8", intensity: 75 },
{ type: "rest" },
Expand All @@ -248,7 +248,7 @@ export const blockTemplates = {
days: [
{ type: "hypertrophy", exercises: ["DB Shoulder Press", "1-Arm DB Bench Press", "Weighted Dips", "Weighted Pull-Ups", "1-Arm DB Rows", "DB Upright Rows", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x12", intensity: 50 },
{ type: "hypertrophy", exercises: ["Leg Extensions", "Lying Leg Curls", "Leg Press", "Calf Raises", "Back Extensions", "Hanging Leg Raises", "Adduction Machine", "Abduction Machine"], sets: "4x12", intensity: 50 },
{ type: "hiit", activity: "Hill Sprints", duration: "3 sprints" },
{ type: "hiit", activity: "Hill Sprints", rounds: 3 },
{ type: "hypertrophy", exercises: ["DB Shoulder Press", "1-Arm DB Bench Press", "Weighted Dips", "Weighted Pull-Ups", "1-Arm DB Rows", "DB Upright Rows", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x12", intensity: 55 },
{ type: "hypertrophy", exercises: ["Leg Extensions", "Lying Leg Curls", "Leg Press", "Calf Raises", "Back Extensions", "Hanging Leg Raises", "Adduction Machine", "Abduction Machine"], sets: "4x12", intensity: 55 },
{ type: "rest" },
Expand All @@ -259,7 +259,7 @@ export const blockTemplates = {
days: [
{ type: "hypertrophy", exercises: ["DB Shoulder Press", "1-Arm DB Bench Press", "Weighted Dips", "Weighted Pull-Ups", "1-Arm DB Rows", "DB Upright Rows", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x10", intensity: 60 },
{ type: "hypertrophy", exercises: ["Leg Extensions", "Lying Leg Curls", "Leg Press", "Calf Raises", "Back Extensions", "Hanging Leg Raises", "Adduction Machine", "Abduction Machine"], sets: "4x10", intensity: 60 },
{ type: "hiit", activity: "Hill Sprints", duration: "5 sprints" },
{ type: "hiit", activity: "Hill Sprints", rounds: 5 },
{ type: "hypertrophy", exercises: ["DB Shoulder Press", "1-Arm DB Bench Press", "Weighted Dips", "Weighted Pull-Ups", "1-Arm DB Rows", "DB Upright Rows", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x10", intensity: 65 },
{ type: "hypertrophy", exercises: ["Leg Extensions", "Lying Leg Curls", "Leg Press", "Calf Raises", "Back Extensions", "Hanging Leg Raises", "Adduction Machine", "Abduction Machine"], sets: "4x10", intensity: 65 },
{ type: "rest" },
Expand All @@ -270,7 +270,7 @@ export const blockTemplates = {
days: [
{ type: "hypertrophy", exercises: ["DB Shoulder Press", "1-Arm DB Bench Press", "Weighted Dips", "Weighted Pull-Ups", "1-Arm DB Rows", "DB Upright Rows", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x8", intensity: 70 },
{ type: "hypertrophy", exercises: ["Leg Extensions", "Lying Leg Curls", "Leg Press", "Calf Raises", "Back Extensions", "Hanging Leg Raises", "Adduction Machine", "Abduction Machine"], sets: "4x8", intensity: 70 },
{ type: "hiit", activity: "Hill Sprints", duration: "7 sprints" },
{ type: "hiit", activity: "Hill Sprints", rounds: 7 },
{ type: "hypertrophy", exercises: ["DB Shoulder Press", "1-Arm DB Bench Press", "Weighted Dips", "Weighted Pull-Ups", "1-Arm DB Rows", "DB Upright Rows", "DB Bicep Curls", "DB Skull Crushers"], sets: "4x8", intensity: 75 },
{ type: "hypertrophy", exercises: ["Leg Extensions", "Lying Leg Curls", "Leg Press", "Calf Raises", "Back Extensions", "Hanging Leg Raises", "Adduction Machine", "Abduction Machine"], sets: "4x8", intensity: 75 },
{ type: "rest" },
Expand All @@ -285,29 +285,29 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x5", intensity: 70 },
{ type: "strength", exercises: ["Weighted Pull-up", "Overhead Press"], sets: "5x5", intensity: 70 },
{ type: "hiit", activity: "Tempo Run", duration: "5 km" },
{ type: "hiit", activity: "Tempo Run", distance: 5000 },
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x5", intensity: 70 },
{ type: "strength", exercises: ["Deadlift", "Overhead Press"], sets: "3x5,5x5", intensity: 70 },
{ type: "hiit", activity: "GC 9", duration: "" },
{ type: "hiit", activity: "GC 9", distance: 100, rounds: 10 },
{ type: "rest" }
]
},
{
days: [
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x5", intensity: 80 },
{ type: "strength", exercises: ["Weighted Pull-up", "Overhead Press"], sets: "5x5", intensity: 80 },
{ type: "hiit", activity: "600m Resets", duration: "" },
{ type: "hiit", activity: "600m Resets", distance: 600, rounds: 6 },
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x5", intensity: 80 },
{ type: "strength", exercises: ["Deadlift", "Overhead Press"], sets: "3x5,5x5", intensity: 80 },
{ type: "hiit", activity: "GC 9", duration: "" },
{ type: "hiit", activity: "GC 9", distance: 100, rounds: 10 },
{ type: "rest" }
]
},
{
days: [
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x3", intensity: 90 },
{ type: "strength", exercises: ["Weighted Pull-up", "Overhead Press"], sets: "5x3", intensity: 90 },
{ type: "hiit", activity: "Tempo Run", duration: "5 km" },
{ type: "hiit", activity: "Tempo Run", distance: 5000 },
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x3", intensity: 90 },
{ type: "strength", exercises: ["Deadlift", "Overhead Press"], sets: "3x3,5x3", intensity: 90 },
{ type: "rest" },
Expand All @@ -318,29 +318,29 @@ export const blockTemplates = {
days: [
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x5", intensity: 75 },
{ type: "strength", exercises: ["Weighted Pull-up", "Overhead Press"], sets: "5x5", intensity: 75 },
{ type: "hiit", activity: "600m Resets", duration: "" },
{ type: "hiit", activity: "600m Resets", distance: 600, rounds: 6 },
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x5", intensity: 75 },
{ type: "strength", exercises: ["Deadlift", "Overhead Press"], sets: "3x5,5x5", intensity: 75 },
{ type: "hiit", activity: "GC 9", duration: "" },
{ type: "hiit", activity: "GC 9", distance: 100, rounds: 10 },
{ type: "rest" }
]
},
{
days: [
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x3", intensity: 85 },
{ type: "strength", exercises: ["Weighted Pull-up", "Overhead Press"], sets: "5x3", intensity: 85 },
{ type: "hiit", activity: "Tempo Run", duration: "5 km" },
{ type: "hiit", activity: "Tempo Run", distance: 5000 },
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x3", intensity: 85 },
{ type: "strength", exercises: ["Deadlift", "Overhead Press"], sets: "3x3,5x3", intensity: 85 },
{ type: "hiit", activity: "GC 9", duration: "" },
{ type: "hiit", activity: "GC 9", distance: 100, rounds: 10 },
{ type: "rest" }
]
},
{
days: [
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x2", intensity: 95 },
{ type: "strength", exercises: ["Weighted Pull-up", "Overhead Press"], sets: "5x2", intensity: 95 },
{ type: "hiit", activity: "600m Resets", duration: "" },
{ type: "hiit", activity: "600m Resets", distance: 600, rounds: 6 },
{ type: "strength", exercises: ["Bench Press", "Squat"], sets: "5x2", intensity: 95 },
{ type: "strength", exercises: ["Deadlift", "Overhead Press"], sets: "3x2,5x2", intensity: 95 },
{ type: "rest" },
Expand Down
35 changes: 28 additions & 7 deletions src/components/CardioWorkouts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@

// Start LiSS timer function
const startLissTimer = () => {
const duration = cardioWorkout().duration as number
const duration = cardioWorkout().duration
if (duration === undefined) return

const durationInSeconds = duration * 60
const now = Date.now()

Expand Down Expand Up @@ -120,7 +122,7 @@

// Derived timer display values
const displayDuration = $derived(() => {
if (workout.type === 'liss' && typeof cardioWorkout().duration === 'number') {
if (workout.type === 'liss' && cardioWorkout().duration !== undefined) {
if (lissTimer.isActive || lissTimer.isPaused || lissTimer.timeLeft > 0) {
// Show countdown timer
const minutes = Math.floor(lissTimer.timeLeft / 60)
Expand All @@ -135,7 +137,7 @@
})

const showTimerControls = $derived(() => {
return workout.type === 'liss' && typeof cardioWorkout().duration === 'number'
return workout.type === 'liss' && cardioWorkout().duration !== undefined
})

// Derived button states for conditional styling
Expand Down Expand Up @@ -173,11 +175,30 @@
<h3 class="text-2xl font-bold mb-2">
{cardioWorkout().activity}
</h3>
{#if cardioWorkout().duration}
{#if cardioWorkout().duration !== undefined}
<div class="text-4xl font-bold">{displayDuration()}</div>
{#if typeof cardioWorkout().duration === 'number'}
<div class="text-sm opacity-90 mt-1">minutes</div>
{/if}
<div class="text-sm opacity-90 mt-1">
{#if workout.type === 'liss'}
minutes
{:else}
seconds
{/if}
</div>
{/if}
{#if cardioWorkout().distance !== undefined}
<div class="text-4xl font-bold">{cardioWorkout().distance}</div>
<div class="text-sm opacity-90 mt-1">
{#if workout.type === 'liss'}
km
{:else}
m
{/if}
</div>
{/if}
{#if cardioWorkout().rounds !== undefined}
<div class="text-2xl font-semibold mt-2">
{cardioWorkout().rounds} rounds
</div>
{/if}
</div>

Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export interface HypertrophyWorkout extends BaseWorkout {
export interface CardioWorkout extends BaseWorkout {
type: 'liss' | 'hiit';
activity: string;
duration: number | string;
duration?: number; // seconds for HIIT, minutes for LISS
distance?: number; // meters for HIIT, kilometers for LISS
rounds?: number;
}

export interface RestWorkout extends BaseWorkout {
Expand Down