diff options
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/home.html | 12 | ||||
| -rw-r--r-- | app/templates/workout/history.html | 32 |
2 files changed, 38 insertions, 6 deletions
diff --git a/app/templates/home.html b/app/templates/home.html index 796b44b..235e6e7 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -19,20 +19,20 @@ <div class="tile is-ancestor has-text-centered"> <div class="tile is-parent"> <article class="tile is-child box"> - <p class="title has-text-black">0</p> - <p class="subtitle has-text-black">Sets Completed</p> + <p class="title has-text-black">{{ current_user.workouts.count() }}</p> + <p class="subtitle has-text-black">Workouts</p> </article> </div> <div class="tile is-parent"> <article class="tile is-child box"> - <p class="title has-text-black">0</p> + <p class="title has-text-black">{{ records.count() }}</p> <p class="subtitle has-text-black">Workouts Completed</p> </article> </div> <div class="tile is-parent"> <article class="tile is-child box"> - <p class="title has-text-black">{{ current_user.workouts.count() }}</p> - <p class="subtitle has-text-black">Workouts</p> + <p class="title has-text-black">0</p> + <p class="subtitle has-text-black">Sets Completed</p> </article> </div> <!-- Something else? @@ -109,7 +109,7 @@ <tr> <td>{{ record.workout.name }}</td> <td>{{ record.finished.strftime("%m/%d/%y %-I:%M %p") }}</td> - <td class="level-right"><a class="button is-small is-primary" href="#">View</a></td> + <td class="level-right"><a class="button is-small is-primary" href="/workout/history?id={{ record.id }}">View</a></td> </tr> {% endfor %} </tbody> diff --git a/app/templates/workout/history.html b/app/templates/workout/history.html new file mode 100644 index 0000000..009deb0 --- /dev/null +++ b/app/templates/workout/history.html @@ -0,0 +1,32 @@ +{% 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> + <div class="box"> + <table class="table is-fullwidth is-hoverable"> + <thead> + <th>Set</th> + <th>lbs</th> + <th>Reps</th> + <th>Done</th> + </thead> + <tbody> + {% for set in record.sets %} + <tr> + <th></th> + <th>{{ set.lbs }}</th> + <th>{{ set.reps }}</th> + </tr> + {% endfor %} + </tbody> + </table> + </div> + </div> + </div> +</div> +{% endblock %} |
