summaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-04-30 12:56:15 -0500
committerstilbruch <stilbruch@protonmail.com>2022-04-30 12:56:15 -0500
commit11ca7472f0736ed7f7cc4447f8fa59cd8765eb2f (patch)
tree0d8a360753d97077171d087fac131b5e50c6906b /app/templates
parent509a7bd8955138b2ff864dd75059d397b3fbb31e (diff)
downloadStrengthy-11ca7472f0736ed7f7cc4447f8fa59cd8765eb2f.tar.xz
Strengthy-11ca7472f0736ed7f7cc4447f8fa59cd8765eb2f.zip
Start workout history page
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/home.html12
-rw-r--r--app/templates/workout/history.html32
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 %}