Compare commits

..

No commits in common. "main" and "better_branch" have entirely different histories.

6 changed files with 208 additions and 122 deletions

111
README.md
View file

@ -1,109 +1,4 @@
# Zed Workouts # zed_workouts
A Django-based workout tracking web app optimized for mobile use. Track your gym sessions with template-based exercise generation and automatic history logging. Test a new coding workflow. Want to try and use a local LLM to facilitate coding a django based workout webpage to track and store workouts in MySQL db.
Implemented qwen2.57b-instruct-q4_K-M with Zed Agent to develop code. Tried some other agents and this is the first one I was able to get to respond with proper tool calls.
## Project Structure
```
zed_workouts/
├── tracker/
│ ├── migrations/ # Database migrations
│ ├── templates/tracker/
│ │ └── index.html # Main workout tracking UI
│ ├── admin.py # Django admin configuration
│ ├── apps.py # App configuration
│ ├── models.py # Database models
│ ├── tests.py # Unit tests
│ ├── urls.py # App URL routing
│ └── views.py # View controllers
└── zed_workouts/
├── settings.py # Django settings
├── urls.py # Project URL routing
└── wsgi.py # WSGI entry point
```
## Tech Stack
- **Backend**: Django 4.x (Python)
- **Frontend**: Vanilla JavaScript + Bootstrap 5
- **Database**: SQLite (default, easily swappable)
- **Deployment**: Docker
## Data Models
### Exercise
Stores available exercises with type and group categorization.
| Field | Type | Description |
|-------|------|-------------|
| exercise | CharField | Exercise name (unique) |
| type | CharField | Muscle group (Chest, Back, Arms, etc.) |
| group | CharField | Priority (Primary, Secondary, Core) |
### Workout (History)
Logs completed workout sets.
### Template Models
Templates for each workout type: `ChestTemplate`, `BackTemplate`, `LegsTemplate`
| Field | Type | Description |
|-------|------|-------------|
| date | DateField | Auto-set to creation date |
| group | CharField | Primary/Secondary/Core |
| type | CharField | Muscle group |
| exercise | CharField | Exercise name |
| set | IntegerField | Set number (1-4) |
| weight | DecimalField | Weight lifted |
| reps | IntegerField | Repetitions performed |
| notes | TextField | Optional notes |
## Features
1. **Template Selection**: Choose Chest, Back, or Legs workout
2. **Exercise Dropdowns**: Primary, Secondary, Core categories
3. **Block Generation**: Creates 4 sets per selected exercise
4. **Ad-hoc Exercises**: Add individual exercises on the fly
5. **Workout Logging**: Saves all completed sets to history
6. **Mobile Optimization**: Hides non-essential columns, touch-friendly UI
## Getting Started
### Local Development
```bash
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# or .venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run migrations
cd zed_workouts
python manage.py migrate
# Create superuser (optional, for admin)
python manage.py createsuperuser
# Start server
python manage.py runserver
```
### Docker Deployment
```bash
docker-compose up --build
```
## API Endpoints
| URL | View | Method | Description |
|-----|------|--------|-------------|
| `/` | workout_tracker | GET/POST | Main tracker page |
## Notes
- Data submitted via form POST as hidden input arrays
- Templates are pre-populated via JSON context
- Mobile view hides Group/Type columns to save space

View file

@ -0,0 +1,37 @@
date,group,type,exercise,set,weight,reps,notes
2024-11-21,Primary,Back,One-arm row,1,40,8,
2024-11-21,Secondary,Arms,Hammer curl,1,20,8,
2024-11-21,Core,Core,Swiss-ball crunch,1,0,25,
2024-11-21,Primary,Back,One-arm row,2,40,8,
2024-11-21,Secondary,Arms,Hammer curl,2,20,8,
2024-11-21,Core,Core,Swiss-ball crunch,2,0,25,
2024-11-21,Primary,Back,One-arm row,3,40,8,
2024-11-21,Secondary,Arms,Hammer curl,3,20,8,
2024-11-21,Core,Core,Swiss-ball crunch,3,0,25,
2024-11-21,Primary,Back,One-arm row,4,40,8,SS 35 30
2024-11-21,Secondary,Arms,Hammer curl,4,20,8,SS 15 10
2024-11-21,Core,Core,Swiss-ball crunch,4,0,25,
2024-11-21,Primary,Back,Lat pulldown,1,90,8,
2024-11-21,Secondary,Arms,Concentration dumbbell curl,1,15,8,
2024-11-21,Core,Core,Decline twisting ab crunch,1,0,10,
2024-11-21,Primary,Back,Lat pulldown,2,90,8,
2024-11-21,Secondary,Arms,Concentration dumbbell curl,2,15,8,
2024-11-21,Core,Core,Decline twisting ab crunch,2,0,10,
2024-11-21,Primary,Back,Lat pulldown,3,90,8,
2024-11-21,Secondary,Arms,Concentration dumbbell curl,3,15,8,
2024-11-21,Core,Core,Decline twisting ab crunch,3,0,10,
2024-11-21,Primary,Back,Lat pulldown,4,90,8,SS 80 70
2024-11-21,Secondary,Arms,Concentration dumbbell curl,4,15,8,SS 12.5 10
2024-11-21,Core,Core,Decline twisting ab crunch,4,0,10,
2024-11-21,Primary,Back,Cable seated close row,1,70,8,
2024-11-21,Secondary,Arms,Cable Underhand Close Grip Pulldown,1,70,8,
2024-11-21,Core,Core,Abdominal reverse curl,1,0,10,
2024-11-21,Primary,Back,Cable seated close row,2,70,8,
2024-11-21,Secondary,Arms,Cable Underhand Close Grip Pulldown,2,70,8,
2024-11-21,Core,Core,Abdominal reverse curl,2,0,10,
2024-11-21,Primary,Back,Cable seated close row,3,70,8,
2024-11-21,Secondary,Arms,Cable Underhand Close Grip Pulldown,3,70,8,
2024-11-21,Core,Core,Abdominal reverse curl,3,0,10,
2024-11-21,Primary,Back,Cable seated close row,4,70,8,SS 60 50
2024-11-21,Secondary,Arms,Cable Underhand Close Grip Pulldown,4,70,8,SS 60 50
2024-11-21,Core,Core,Abdominal reverse curl,4,0,10,
1 date group type exercise set weight reps notes
2 2024-11-21 Primary Back One-arm row 1 40 8
3 2024-11-21 Secondary Arms Hammer curl 1 20 8
4 2024-11-21 Core Core Swiss-ball crunch 1 0 25
5 2024-11-21 Primary Back One-arm row 2 40 8
6 2024-11-21 Secondary Arms Hammer curl 2 20 8
7 2024-11-21 Core Core Swiss-ball crunch 2 0 25
8 2024-11-21 Primary Back One-arm row 3 40 8
9 2024-11-21 Secondary Arms Hammer curl 3 20 8
10 2024-11-21 Core Core Swiss-ball crunch 3 0 25
11 2024-11-21 Primary Back One-arm row 4 40 8 SS 35 30
12 2024-11-21 Secondary Arms Hammer curl 4 20 8 SS 15 10
13 2024-11-21 Core Core Swiss-ball crunch 4 0 25
14 2024-11-21 Primary Back Lat pulldown 1 90 8
15 2024-11-21 Secondary Arms Concentration dumbbell curl 1 15 8
16 2024-11-21 Core Core Decline twisting ab crunch 1 0 10
17 2024-11-21 Primary Back Lat pulldown 2 90 8
18 2024-11-21 Secondary Arms Concentration dumbbell curl 2 15 8
19 2024-11-21 Core Core Decline twisting ab crunch 2 0 10
20 2024-11-21 Primary Back Lat pulldown 3 90 8
21 2024-11-21 Secondary Arms Concentration dumbbell curl 3 15 8
22 2024-11-21 Core Core Decline twisting ab crunch 3 0 10
23 2024-11-21 Primary Back Lat pulldown 4 90 8 SS 80 70
24 2024-11-21 Secondary Arms Concentration dumbbell curl 4 15 8 SS 12.5 10
25 2024-11-21 Core Core Decline twisting ab crunch 4 0 10
26 2024-11-21 Primary Back Cable seated close row 1 70 8
27 2024-11-21 Secondary Arms Cable Underhand Close Grip Pulldown 1 70 8
28 2024-11-21 Core Core Abdominal reverse curl 1 0 10
29 2024-11-21 Primary Back Cable seated close row 2 70 8
30 2024-11-21 Secondary Arms Cable Underhand Close Grip Pulldown 2 70 8
31 2024-11-21 Core Core Abdominal reverse curl 2 0 10
32 2024-11-21 Primary Back Cable seated close row 3 70 8
33 2024-11-21 Secondary Arms Cable Underhand Close Grip Pulldown 3 70 8
34 2024-11-21 Core Core Abdominal reverse curl 3 0 10
35 2024-11-21 Primary Back Cable seated close row 4 70 8 SS 60 50
36 2024-11-21 Secondary Arms Cable Underhand Close Grip Pulldown 4 70 8 SS 60 50
37 2024-11-21 Core Core Abdominal reverse curl 4 0 10

View file

@ -0,0 +1,37 @@
date,group,type,exercise,set,weight,reps,notes
2024-11-21,Primary,Chest,Barbell bench press,1,40,8,
2024-11-21,Secondary,Arms,Triceps kickback,1,15,8,
2024-11-21,Core,Core,Swiss-ball crunch,1,0,25,
2024-11-21,Primary,Chest,Barbell bench press,2,40,8,
2024-11-21,Secondary,Arms,Triceps kickback,2,15,8,
2024-11-21,Core,Core,Swiss-ball crunch,2,0,25,
2024-11-21,Primary,Chest,Barbell bench press,3,40,8,
2024-11-21,Secondary,Arms,Triceps kickback,3,15,8,
2024-11-21,Core,Core,Swiss-ball crunch,3,0,25,
2024-11-21,Primary,Chest,Barbell bench press,4,40,8,SS 35 30
2024-11-21,Secondary,Arms,Triceps kickback,4,15,8,SS 12.5 10
2024-11-21,Core,Core,Swiss-ball crunch,4,0,25,
2024-11-21,Primary,Chest,Decline dumbbell bench press,1,35,8,
2024-11-21,Secondary,Core,Decline twisting ab crunch,1,0,10,
2024-11-21,Core,Arms,Cable triceps pushdown,1,35,8,
2024-11-21,Primary,Chest,Decline dumbbell bench press,2,35,8,
2024-11-21,Secondary,Core,Decline twisting ab crunch,2,0,10,
2024-11-21,Core,Arms,Cable triceps pushdown,2,35,8,
2024-11-21,Primary,Chest,Decline dumbbell bench press,3,35,8,
2024-11-21,Secondary,Core,Decline twisting ab crunch,3,0,10,
2024-11-21,Core,Arms,Cable triceps pushdown,3,35,8,
2024-11-21,Primary,Chest,Decline dumbbell bench press,4,35,8,SS 30 25
2024-11-21,Secondary,Core,Decline twisting ab crunch,4,0,10,
2024-11-21,Core,Arms,Cable triceps pushdown,4,35,8,SS 30 25
2024-11-21,Primary,Chest,Incline dumbbell fly,1,15,8,
2024-11-21,Secondary,Arms,Standing single-arm triceps extension,1,15,8,
2024-11-21,Core,Core,Abdominal reverse curl,1,0,10,
2024-11-21,Primary,Chest,Incline dumbbell fly,2,15,8,
2024-11-21,Secondary,Arms,Standing single-arm triceps extension,2,15,8,
2024-11-21,Core,Core,Abdominal reverse curl,2,0,10,
2024-11-21,Primary,Chest,Incline dumbbell fly,3,15,8,
2024-11-21,Secondary,Arms,Standing single-arm triceps extension,3,15,8,
2024-11-21,Core,Core,Abdominal reverse curl,3,0,10,
2024-11-21,Primary,Chest,Incline dumbbell fly,4,15,8,SS 12.5 10
2024-11-21,Secondary,Arms,Standing single-arm triceps extension,4,15,8,SS 12.5 10
2024-11-21,Core,Core,Abdominal reverse curl,4,0,10,
1 date group type exercise set weight reps notes
2 2024-11-21 Primary Chest Barbell bench press 1 40 8
3 2024-11-21 Secondary Arms Triceps kickback 1 15 8
4 2024-11-21 Core Core Swiss-ball crunch 1 0 25
5 2024-11-21 Primary Chest Barbell bench press 2 40 8
6 2024-11-21 Secondary Arms Triceps kickback 2 15 8
7 2024-11-21 Core Core Swiss-ball crunch 2 0 25
8 2024-11-21 Primary Chest Barbell bench press 3 40 8
9 2024-11-21 Secondary Arms Triceps kickback 3 15 8
10 2024-11-21 Core Core Swiss-ball crunch 3 0 25
11 2024-11-21 Primary Chest Barbell bench press 4 40 8 SS 35 30
12 2024-11-21 Secondary Arms Triceps kickback 4 15 8 SS 12.5 10
13 2024-11-21 Core Core Swiss-ball crunch 4 0 25
14 2024-11-21 Primary Chest Decline dumbbell bench press 1 35 8
15 2024-11-21 Secondary Core Decline twisting ab crunch 1 0 10
16 2024-11-21 Core Arms Cable triceps pushdown 1 35 8
17 2024-11-21 Primary Chest Decline dumbbell bench press 2 35 8
18 2024-11-21 Secondary Core Decline twisting ab crunch 2 0 10
19 2024-11-21 Core Arms Cable triceps pushdown 2 35 8
20 2024-11-21 Primary Chest Decline dumbbell bench press 3 35 8
21 2024-11-21 Secondary Core Decline twisting ab crunch 3 0 10
22 2024-11-21 Core Arms Cable triceps pushdown 3 35 8
23 2024-11-21 Primary Chest Decline dumbbell bench press 4 35 8 SS 30 25
24 2024-11-21 Secondary Core Decline twisting ab crunch 4 0 10
25 2024-11-21 Core Arms Cable triceps pushdown 4 35 8 SS 30 25
26 2024-11-21 Primary Chest Incline dumbbell fly 1 15 8
27 2024-11-21 Secondary Arms Standing single-arm triceps extension 1 15 8
28 2024-11-21 Core Core Abdominal reverse curl 1 0 10
29 2024-11-21 Primary Chest Incline dumbbell fly 2 15 8
30 2024-11-21 Secondary Arms Standing single-arm triceps extension 2 15 8
31 2024-11-21 Core Core Abdominal reverse curl 2 0 10
32 2024-11-21 Primary Chest Incline dumbbell fly 3 15 8
33 2024-11-21 Secondary Arms Standing single-arm triceps extension 3 15 8
34 2024-11-21 Core Core Abdominal reverse curl 3 0 10
35 2024-11-21 Primary Chest Incline dumbbell fly 4 15 8 SS 12.5 10
36 2024-11-21 Secondary Arms Standing single-arm triceps extension 4 15 8 SS 12.5 10
37 2024-11-21 Core Core Abdominal reverse curl 4 0 10

View file

@ -0,0 +1,67 @@
exercise,type,group
Cable biceps curl,Arms,Secondary
Cable triceps pushdown,Arms,Secondary
Cable Underhand Close Grip Pulldown,Arms,Secondary
Chair dip (no weights),Arms,Secondary
Concentration dumbbell curl,Arms,Secondary
Drag curl,Arms,Secondary
Dumbbell biceps curl,Arms,Secondary
Dumbbell row kickback,Arms,Secondary
Hammer curl,Arms,Secondary
Kettlebell pullover,Arms,Secondary
Lying triceps extension,Arms,Secondary
Machine biceps curl,Arms,Secondary
Overhead bar press,Arms,Secondary
Prone curl,Arms,Secondary
Seated preacher curl,Arms,Secondary
Standing biceps curl,Arms,Secondary
Standing single-arm triceps extension,Arms,Secondary
Triceps kickback,Arms,Secondary
Assisted pull-up,Back,Primary
Barbell bent-over row,Back,Primary
Cable seated close row,Back,Primary
Cable seated low row,Back,Primary
Dumbbell upright row,Back,Primary
Incline y raise,Back,Primary
Lat pulldown,Back,Primary
One-arm row,Back,Primary
Seated reverse fly,Back,Primary
Barbell bench press,Chest,Primary
Cable diagonal raise,Chest,Primary
Decline dumbbell bench press,Chest,Primary
Decline dumbbell fly,Chest,Primary
Dumbbell bench press,Chest,Primary
Dumbbell incline bench press,Chest,Primary
Incline dumbbell fly,Chest,Primary
Machine chest flye,Chest,Primary
Ab crunch on a ball,Core,Core
Abdominal reverse curl,Core,Core
Bench leg raise,Core,Core
Bicycle kick,Core,Core
Decline twisting ab crunch,Core,Core
Elevated-feet plank,Core,Core
Jackknife,Core,Core
Kettlebell russian twist,Core,Core
Plank,Core,Core
Russian twist,Core,Core
Side plank,Core,Core
Superman,Core,Core
Swiss-ball crunch,Core,Core
Swiss-ball glute bridge,Core,Core
Twisting windmill,Core,Core
Two-point bridge,Core,Core
Burpees,HIIT,Core
Mountain climbers,HIIT,Core
Squat Jump,HIIT,Core
Assisted dumbbell lunge,Legs,Primary
Back squat,Legs,Primary
Beginner squat,Legs,Primary
Bulgarian split squat (no weights),Legs,Primary
Dumbbell lunge,Legs,Primary
Machine leg curl,Legs,Primary
Machine leg extension,Legs,Primary
Machine leg press,Legs,Primary
Dumbbell front raise,Shoulders,Secondary
Dumbbell lateral raise,Shoulders,Secondary
Seated dumbbell shoulder press,Shoulders,Secondary
Shrug,Shoulders,Secondary
1 exercise type group
2 Cable biceps curl Arms Secondary
3 Cable triceps pushdown Arms Secondary
4 Cable Underhand Close Grip Pulldown Arms Secondary
5 Chair dip (no weights) Arms Secondary
6 Concentration dumbbell curl Arms Secondary
7 Drag curl Arms Secondary
8 Dumbbell biceps curl Arms Secondary
9 Dumbbell row kickback Arms Secondary
10 Hammer curl Arms Secondary
11 Kettlebell pullover Arms Secondary
12 Lying triceps extension Arms Secondary
13 Machine biceps curl Arms Secondary
14 Overhead bar press Arms Secondary
15 Prone curl Arms Secondary
16 Seated preacher curl Arms Secondary
17 Standing biceps curl Arms Secondary
18 Standing single-arm triceps extension Arms Secondary
19 Triceps kickback Arms Secondary
20 Assisted pull-up Back Primary
21 Barbell bent-over row Back Primary
22 Cable seated close row Back Primary
23 Cable seated low row Back Primary
24 Dumbbell upright row Back Primary
25 Incline y raise Back Primary
26 Lat pulldown Back Primary
27 One-arm row Back Primary
28 Seated reverse fly Back Primary
29 Barbell bench press Chest Primary
30 Cable diagonal raise Chest Primary
31 Decline dumbbell bench press Chest Primary
32 Decline dumbbell fly Chest Primary
33 Dumbbell bench press Chest Primary
34 Dumbbell incline bench press Chest Primary
35 Incline dumbbell fly Chest Primary
36 Machine chest flye Chest Primary
37 Ab crunch on a ball Core Core
38 Abdominal reverse curl Core Core
39 Bench leg raise Core Core
40 Bicycle kick Core Core
41 Decline twisting ab crunch Core Core
42 Elevated-feet plank Core Core
43 Jackknife Core Core
44 Kettlebell russian twist Core Core
45 Plank Core Core
46 Russian twist Core Core
47 Side plank Core Core
48 Superman Core Core
49 Swiss-ball crunch Core Core
50 Swiss-ball glute bridge Core Core
51 Twisting windmill Core Core
52 Two-point bridge Core Core
53 Burpees HIIT Core
54 Mountain climbers HIIT Core
55 Squat Jump HIIT Core
56 Assisted dumbbell lunge Legs Primary
57 Back squat Legs Primary
58 Beginner squat Legs Primary
59 Bulgarian split squat (no weights) Legs Primary
60 Dumbbell lunge Legs Primary
61 Machine leg curl Legs Primary
62 Machine leg extension Legs Primary
63 Machine leg press Legs Primary
64 Dumbbell front raise Shoulders Secondary
65 Dumbbell lateral raise Shoulders Secondary
66 Seated dumbbell shoulder press Shoulders Secondary
67 Shrug Shoulders Secondary

View file

@ -0,0 +1,49 @@
date,group,type,exercise,set,weight,reps,notes
2024-11-21,Primary,Shoulders,Dumbbell front raise,1,15,10,
2024-11-21,Secondary,Legs,Dumbbell Lunge,1,5,8,
2024-11-21,Core,Core,Decline twisting ab crunch,1,0,10,
2024-11-21,Primary,Shoulders,Dumbbell front raise,2,15,10,
2024-11-21,Secondary,Legs,Dumbbell lunge,2,5,8,
2024-11-21,Core,Core,Decline twisting ab crunch,2,0,10,
2024-11-21,Primary,Shoulders,Dumbbell front raise,3,15,10,
2024-11-21,Secondary,Legs,Dumbbell lunge,3,5,8,
2024-11-21,Core,Core,Decline twisting ab crunch,3,0,10,
2024-11-21,Primary,Shoulders,Dumbbell front raise,4,15,10,
2024-11-21,Secondary,Legs,Dumbbell lunge,4,5,8,
2024-11-21,Core,Core,Decline twisting ab crunch,4,0,10,
2024-11-21,Primary,Legs,Back squat,1,50,8,
2024-11-21,Secondary,Shoulders,Seated dumbbell shoulder press,1,20,8,
2024-11-21,Core,Core,Swiss-ball glute bridge,1,0,10,
2024-11-21,Primary,Legs,Back squat,2,50,8,
2024-11-21,Secondary,Shoulders,Seated dumbbell shoulder press,2,20,8,
2024-11-21,Core,Core,Swiss-ball glute bridge,2,0,10,
2024-11-21,Primary,Legs,Back squat,3,50,8,
2024-11-21,Secondary,Shoulders,Seated dumbbell shoulder press,3,20,8,
2024-11-21,Core,Core,Swiss-ball glute bridge,3,0,10,
2024-11-21,Primary,Legs,Back squat,4,50,8,
2024-11-21,Secondary,Shoulders,Seated dumbbell shoulder press,4,20,8,
2024-11-21,Core,Core,Swiss-ball glute bridge,4,0,10,
2024-11-21,Primary,Legs,Machine leg extension,1,75,8,
2024-11-21,Secondary,Shoulders,Dumbbell lateral raise,1,10,8,
2024-11-21,Core,Core,Abdominal reverse curl,1,0,10,
2024-11-21,Primary,Legs,Machine leg extension,2,75,8,
2024-11-21,Secondary,Shoulders,Dumbbell lateral raise,2,10,8,
2024-11-21,Core,Core,Abdominal reverse curl,2,0,10,
2024-11-21,Primary,Legs,Machine leg extension,3,75,8,
2024-11-21,Secondary,Shoulders,Dumbbell lateral raise,3,10,8,
2024-11-21,Core,Core,Abdominal reverse curl,3,0,10,
2024-11-21,Primary,Legs,Machine leg extension,4,75,8,
2024-11-21,Secondary,Shoulders,Dumbbell lateral raise,4,10,8,
2024-11-21,Core,Core,Abdominal reverse curl,4,0,10,
2024-11-21,Primary,Legs,Machine leg curl,1,35,8,
2024-11-21,Secondary,Shoulders,Shrug,1,40,8,
2024-11-21,Core,Core,Swiss-ball crunch,1,0,20,
2024-11-21,Primary,Legs,Machine leg curl,2,35,8,
2024-11-21,Secondary,Shoulders,Shrug,2,40,8,
2024-11-21,Core,Core,Swiss-ball crunch,2,0,20,
2024-11-21,Primary,Legs,Machine leg curl,3,35,8,
2024-11-21,Secondary,Shoulders,Shrug,3,40,8,
2024-11-21,Core,Core,Swiss-ball crunch,3,0,20,
2024-11-21,Primary,Legs,Machine leg curl,4,35,8,
2024-11-21,Secondary,Shoulders,Shrug,4,40,8,
2024-11-21,Core,Core,Swiss-ball crunch,4,0,20,
1 date group type exercise set weight reps notes
2 2024-11-21 Primary Shoulders Dumbbell front raise 1 15 10
3 2024-11-21 Secondary Legs Dumbbell Lunge 1 5 8
4 2024-11-21 Core Core Decline twisting ab crunch 1 0 10
5 2024-11-21 Primary Shoulders Dumbbell front raise 2 15 10
6 2024-11-21 Secondary Legs Dumbbell lunge 2 5 8
7 2024-11-21 Core Core Decline twisting ab crunch 2 0 10
8 2024-11-21 Primary Shoulders Dumbbell front raise 3 15 10
9 2024-11-21 Secondary Legs Dumbbell lunge 3 5 8
10 2024-11-21 Core Core Decline twisting ab crunch 3 0 10
11 2024-11-21 Primary Shoulders Dumbbell front raise 4 15 10
12 2024-11-21 Secondary Legs Dumbbell lunge 4 5 8
13 2024-11-21 Core Core Decline twisting ab crunch 4 0 10
14 2024-11-21 Primary Legs Back squat 1 50 8
15 2024-11-21 Secondary Shoulders Seated dumbbell shoulder press 1 20 8
16 2024-11-21 Core Core Swiss-ball glute bridge 1 0 10
17 2024-11-21 Primary Legs Back squat 2 50 8
18 2024-11-21 Secondary Shoulders Seated dumbbell shoulder press 2 20 8
19 2024-11-21 Core Core Swiss-ball glute bridge 2 0 10
20 2024-11-21 Primary Legs Back squat 3 50 8
21 2024-11-21 Secondary Shoulders Seated dumbbell shoulder press 3 20 8
22 2024-11-21 Core Core Swiss-ball glute bridge 3 0 10
23 2024-11-21 Primary Legs Back squat 4 50 8
24 2024-11-21 Secondary Shoulders Seated dumbbell shoulder press 4 20 8
25 2024-11-21 Core Core Swiss-ball glute bridge 4 0 10
26 2024-11-21 Primary Legs Machine leg extension 1 75 8
27 2024-11-21 Secondary Shoulders Dumbbell lateral raise 1 10 8
28 2024-11-21 Core Core Abdominal reverse curl 1 0 10
29 2024-11-21 Primary Legs Machine leg extension 2 75 8
30 2024-11-21 Secondary Shoulders Dumbbell lateral raise 2 10 8
31 2024-11-21 Core Core Abdominal reverse curl 2 0 10
32 2024-11-21 Primary Legs Machine leg extension 3 75 8
33 2024-11-21 Secondary Shoulders Dumbbell lateral raise 3 10 8
34 2024-11-21 Core Core Abdominal reverse curl 3 0 10
35 2024-11-21 Primary Legs Machine leg extension 4 75 8
36 2024-11-21 Secondary Shoulders Dumbbell lateral raise 4 10 8
37 2024-11-21 Core Core Abdominal reverse curl 4 0 10
38 2024-11-21 Primary Legs Machine leg curl 1 35 8
39 2024-11-21 Secondary Shoulders Shrug 1 40 8
40 2024-11-21 Core Core Swiss-ball crunch 1 0 20
41 2024-11-21 Primary Legs Machine leg curl 2 35 8
42 2024-11-21 Secondary Shoulders Shrug 2 40 8
43 2024-11-21 Core Core Swiss-ball crunch 2 0 20
44 2024-11-21 Primary Legs Machine leg curl 3 35 8
45 2024-11-21 Secondary Shoulders Shrug 3 40 8
46 2024-11-21 Core Core Swiss-ball crunch 3 0 20
47 2024-11-21 Primary Legs Machine leg curl 4 35 8
48 2024-11-21 Secondary Shoulders Shrug 4 40 8
49 2024-11-21 Core Core Swiss-ball crunch 4 0 20

View file

@ -70,7 +70,7 @@
width: 15%; width: 15%;
} }
.col-nt { .col-nt {
width: 10%; width: 20%;
} }
.btn { .btn {
@ -164,7 +164,7 @@
<th class="col-set text-center">Set</th> <th class="col-set text-center">Set</th>
<th class="col-rp">Reps</th> <th class="col-rp">Reps</th>
<th class="col-wt">Weight</th> <th class="col-wt">Weight</th>
<th class="col-nt text-center">Y</th> <th class="col-nt">Note</th>
</tr> </tr>
</thead> </thead>
<tbody id="activeTableBody"></tbody> <tbody id="activeTableBody"></tbody>
@ -215,12 +215,12 @@
<th class="text-center">Set</th> <th class="text-center">Set</th>
<th>Reps</th> <th>Reps</th>
<th>Weight</th> <th>Weight</th>
<th>Note</th>
</tr> </tr>
</thead> </thead>
<tbody id="logTableBody"></tbody> <tbody id="logTableBody"></tbody>
</table> </table>
<div id="hiddenInputs" class="hidden-inputs"></div>
<button type="submit" class="btn btn-success btn-lg w-100 mt-3"> <button type="submit" class="btn btn-success btn-lg w-100 mt-3">
End Workout End Workout
</button> </button>
@ -301,7 +301,7 @@
<td class="col-set text-center">${set}<input type="hidden" class="d-st" value="${set}"></td> <td class="col-set text-center">${set}<input type="hidden" class="d-st" value="${set}"></td>
<td class="col-rp"><input type="number" inputmode="numeric" class="table-input d-rp" value="${reps}"></td> <td class="col-rp"><input type="number" inputmode="numeric" class="table-input d-rp" value="${reps}"></td>
<td class="col-wt"><input type="number" inputmode="decimal" class="table-input d-wt" step="2.5" value="${parseFloat(weight).toFixed(1)}"></td> <td class="col-wt"><input type="number" inputmode="decimal" class="table-input d-wt" step="2.5" value="${parseFloat(weight).toFixed(1)}"></td>
<td class="col-nt text-center"><input type="checkbox" class="form-check-input" style="transform: scale(1.5); margin-top: 8px;"><input type="hidden" class="d-nt" value="${notes}"></td> <td class="col-nt"><input type="text" class="table-input d-nt" value="${notes}" placeholder="..."></td>
</tr>`; </tr>`;
} }
@ -378,6 +378,7 @@
function processSaveBlock(tableId) { function processSaveBlock(tableId) {
const activeBody = document.getElementById(tableId); const activeBody = document.getElementById(tableId);
const logBody = document.getElementById('logTableBody'); const logBody = document.getElementById('logTableBody');
const hiddenDiv = document.getElementById('hiddenInputs');
activeBody.querySelectorAll('tr').forEach(row => { activeBody.querySelectorAll('tr').forEach(row => {
const data = { const data = {
@ -390,16 +391,16 @@
nt: row.querySelector('.d-nt').value nt: row.querySelector('.d-nt').value
}; };
logBody.insertAdjacentHTML('beforeend', ` logBody.insertAdjacentHTML('beforeend', `<tr><td>${data.ex}</td><td class="text-center">${data.st}</td><td>${data.rp}</td><td>${data.wt}</td></tr>`);
<tr> hiddenDiv.insertAdjacentHTML('beforeend', `
<td>${data.ex}<input type="hidden" name="exercise[]" value="${data.ex}"></td> <input type="hidden" name="exercise[]" value="${data.ex}">
<td class="text-center">${data.st}<input type="hidden" name="set[]" value="${data.st}"></td>
<td><input type="number" name="reps[]" class="table-input p-1" style="font-size:14px" value="${data.rp}"></td>
<td><input type="number" name="weight[]" class="table-input p-1" style="font-size:14px" step="2.5" value="${data.wt}"></td>
<td><input type="text" name="notes[]" class="table-input p-1 text-start" style="font-size:14px" value="${data.nt}"></td>
<input type="hidden" name="group[]" value="${data.gr}"> <input type="hidden" name="group[]" value="${data.gr}">
<input type="hidden" name="type[]" value="${data.ty}"> <input type="hidden" name="type[]" value="${data.ty}">
</tr>`); <input type="hidden" name="set[]" value="${data.st}">
<input type="hidden" name="reps[]" value="${data.rp}">
<input type="hidden" name="weight[]" value="${data.wt}">
<input type="hidden" name="notes[]" value="${data.nt}">
`);
}); });
activeBody.innerHTML = ''; activeBody.innerHTML = '';
window.scrollTo(0, document.body.scrollHeight); window.scrollTo(0, document.body.scrollHeight);