diff options
| author | stilbruch <stilbruch@protonmail.com> | 2022-05-09 00:25:31 -0500 |
|---|---|---|
| committer | stilbruch <stilbruch@protonmail.com> | 2022-05-09 00:25:31 -0500 |
| commit | 0cce988f119b80fd69b9a415c9e9b983325a12af (patch) | |
| tree | a1ff33b817b28fc64065cc3396a42750f6ef9a45 /app/templates | |
| parent | 3fd02681d178298551b0f8f3bba93964be30d4ca (diff) | |
| download | Strengthy-0cce988f119b80fd69b9a415c9e9b983325a12af.tar.xz Strengthy-0cce988f119b80fd69b9a415c9e9b983325a12af.zip | |
Improve history page
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/home.html | 2 | ||||
| -rw-r--r-- | app/templates/workout/history.html | 43 |
2 files changed, 25 insertions, 20 deletions
diff --git a/app/templates/home.html b/app/templates/home.html index 243f76d..07d6269 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -109,7 +109,7 @@ {% for record in records %} <tr> <td>{{ record.workout.name }}</td> - <td>{{ record.finished.strftime("%m/%d/%y %-I:%M %p") }}</td> + <td>{{ record.finished_nice() }}</td> <td class="level-right"><a class="button is-small is-primary" href="/workout/history/{{ record.id }}">View</a></td> </tr> {% endfor %} diff --git a/app/templates/workout/history.html b/app/templates/workout/history.html index de199a1..e8f2bc5 100644 --- a/app/templates/workout/history.html +++ b/app/templates/workout/history.html @@ -1,29 +1,34 @@ {% extends 'base/layout.html' %} -{% block title %}Workout{% endblock %} - {% block content %} <div class="container"> <div class="columns is-centered"> <div class="column"> - <h1 class="title is-2">Workout</h1> + <h1 class="title is-2">{{ workout_record.workout.name }}</h1> + <h2 class="subtitle">{{ workout_record.finished_nice() }}</h2> <div class="box"> - <table class="table is-fullwidth is-hoverable"> - <thead> - <th>Set</th> - <th>lbs</th> - <th>Reps</th> - </thead> - <tbody> - {% for set in record.sets %} - <tr> - <th></th> - <th>{{ set.lbs }}</th> - <th>{{ set.reps }}</th> - </tr> - {% endfor %} - </tbody> - </table> + {% for exercise in exercises %} + <a class="button is-link is-pulled-right" href="/progress/exercise/{{ exercise.id }}">View Progress</a> + <h1 class="title is-4 has-text-black">{{ exercise.name }}</h1> + <table class="table is-fullwidth is-hoverable"> + <thead> + <th>Set</th> + <th>lbs</th> + <th>Reps</th> + <th>1RM</th> + </thead> + <tbody> + {% for set in exercise.sets %} + <tr> + <th>{{ loop.index0 + 1 }}</th> + <th>{{ set.lbs }}</th> + <th>{{ set.reps }}</th> + <th>{{ set.one_rep_max() }}</th> + </tr> + {% endfor %} + </tbody> + </table> + {% endfor %} </div> </div> </div> |
