From 157ddaa68fafb1f8e0bd0d8335517eb402c5988f Mon Sep 17 00:00:00 2001 From: FivePixels Date: Sun, 19 Feb 2023 20:52:42 -0600 Subject: Add progress page, cleanup timer formatting --- app/templates/base/layout.html | 102 +++++++++++++++++-------------- app/templates/progress.html | 22 +++++++ app/templates/workout/record.html | 57 ++++++++--------- app/templates/workout/record_select.html | 17 +++--- 4 files changed, 116 insertions(+), 82 deletions(-) create mode 100644 app/templates/progress.html (limited to 'app/templates') diff --git a/app/templates/base/layout.html b/app/templates/base/layout.html index afe6143..9628eb4 100644 --- a/app/templates/base/layout.html +++ b/app/templates/base/layout.html @@ -37,59 +37,68 @@ @@ -104,4 +113,5 @@ - + + \ No newline at end of file diff --git a/app/templates/progress.html b/app/templates/progress.html new file mode 100644 index 0000000..c20484c --- /dev/null +++ b/app/templates/progress.html @@ -0,0 +1,22 @@ +{% extends 'base/layout.html' %} + +{% block content %} +
+ {% for completed_workout in exercises %} +
+
+
+ +
+
+
+ {% endfor %} +
+ + + +{% endblock %} \ No newline at end of file diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html index 1cfeda1..8207e1b 100644 --- a/app/templates/workout/record.html +++ b/app/templates/workout/record.html @@ -25,35 +25,36 @@ {% if exercise.type == 'time' %} {% else %} - - {% endif %} - {{ loop.index }} - {% if exercise.type == 'time' %} - -
- - - {{ exercise.units }} seconds - -
- - {% else %} - {{ set['lbs'](class_='input', type='number', onkeydown='onKeyDown(event)') }} - {{ set['units'](class_='input', onkeydown='onKeyDown(event)') }} - {% endif %} - - + + {% endif %} + {{ loop.index }} + {% if exercise.type == 'time' %} + +
+ + + {{ '%02d' % (exercise.units / 60) }}:{{ '%02d' % (exercise.units % 60) }} + +
+ + {% else %} + {{ set['lbs'](class_='input', type='number', onkeydown='onKeyDown(event)') }} + {{ set['units'](class_='input', onkeydown='onKeyDown(event)') }} + {% endif %} + + + + + + + + + {% endfor %}
@@ -80,4 +81,4 @@ -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/app/templates/workout/record_select.html b/app/templates/workout/record_select.html index e6d88e6..2aaa3f0 100644 --- a/app/templates/workout/record_select.html +++ b/app/templates/workout/record_select.html @@ -13,14 +13,15 @@
Exercises: {% for exercise in workout.exercises %} -

{{ exercise.sets }} x {{ exercise.units }}{% if exercise.type =='time' %} seconds{% endif %} x {{ exercise.name }}

+

{{ exercise.sets }}{% if exercise.type != 'time' %} x {{ exercise.units }}{% endif %} x {{ + exercise.name }}

{% endfor %} - - - - - Start - + + + + + Start +
@@ -47,4 +48,4 @@ -{% endblock %} +{% endblock %} \ No newline at end of file -- cgit v1.2.3