summaryrefslogtreecommitdiff
path: root/app/templates/workout
diff options
context:
space:
mode:
authorFivePixels <dylan.bolger00@gmail.com>2023-02-19 20:52:42 -0600
committerFivePixels <dylan.bolger00@gmail.com>2023-02-19 20:52:42 -0600
commit157ddaa68fafb1f8e0bd0d8335517eb402c5988f (patch)
treec47f545424b5e7cae811fb5d9448c8399bb9d528 /app/templates/workout
parent34988c3d22dd00f5dc7f68ff06ba71d146008257 (diff)
downloadStrengthy-157ddaa68fafb1f8e0bd0d8335517eb402c5988f.tar.xz
Strengthy-157ddaa68fafb1f8e0bd0d8335517eb402c5988f.zip
Add progress page, cleanup timer formattingmain
Diffstat (limited to 'app/templates/workout')
-rw-r--r--app/templates/workout/record.html57
-rw-r--r--app/templates/workout/record_select.html17
2 files changed, 38 insertions, 36 deletions
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' %}
<tr data-is-timer=true data-timer-seconds={{ exercise.units}}>
{% else %}
- <tr data-is-reps=true>
- {% endif %}
- <th>{{ loop.index }}</th>
- {% if exercise.type == 'time' %}
- <td>
- <div class='timer' style="display:flex;align-items:center;font-size:1em;">
- <button id='timer-{{ outer_loop.index }}' type="button" onclick="onClickPausePlayTimer(this)" class="button">
- <span class="icon is-small">
- <i class="fa fa-play"></i>
- </span>
- </button>
- <span style='padding-left: 15px;' id='timer-time-{{ outer_loop.index }}'>
- {{ exercise.units }} seconds
- </span>
- </div>
- </td>
- {% else %}
- <td>{{ set['lbs'](class_='input', type='number', onkeydown='onKeyDown(event)') }}</td>
- <td>{{ set['units'](class_='input', onkeydown='onKeyDown(event)') }}</td>
- {% endif %}
- <td>
- <a class="button" onClick="onClickSetCheck(this)">
+ <tr data-is-reps=true>
+ {% endif %}
+ <th>{{ loop.index }}</th>
+ {% if exercise.type == 'time' %}
+ <td>
+ <div class='timer' style="display:flex;align-items:center;font-size:1em;">
+ <button id='timer-{{ outer_loop.index }}' type="button"
+ onclick="onClickPausePlayTimer(this)" class="button">
<span class="icon is-small">
- <i class="fa fa-check"></i>
+ <i class="fa fa-play"></i>
</span>
- </a>
- </td>
- </tr>
- {% endfor %}
+ </button>
+ <span style='padding-left: 15px;' id='timer-time-{{ outer_loop.index }}'>
+ {{ '%02d' % (exercise.units / 60) }}:{{ '%02d' % (exercise.units % 60) }}
+ </span>
+ </div>
+ </td>
+ {% else %}
+ <td>{{ set['lbs'](class_='input', type='number', onkeydown='onKeyDown(event)') }}</td>
+ <td>{{ set['units'](class_='input', onkeydown='onKeyDown(event)') }}</td>
+ {% endif %}
+ <td>
+ <a class="button" onClick="onClickSetCheck(this)">
+ <span class="icon is-small">
+ <i class="fa fa-check"></i>
+ </span>
+ </a>
+ </td>
+ </tr>
+ {% endfor %}
</tbody>
</table>
<div class="buttons is-centered">
@@ -80,4 +81,4 @@
<script async type="text/javascript" src="/static/js/record.js"></script>
-{% 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 @@
<div class="content">
Exercises:
{% for exercise in workout.exercises %}
- <p>{{ exercise.sets }} x {{ exercise.units }}{% if exercise.type =='time' %} seconds{% endif %} x {{ exercise.name }}</p>
+ <p>{{ exercise.sets }}{% if exercise.type != 'time' %} x {{ exercise.units }}{% endif %} x {{
+ exercise.name }}</p>
{% endfor %}
- <a class="button is-primary" href="/workout/record/{{ workout.id }}">
- <span class="icon is-small">
- <i class="fa fa-play"></i>
- </span>
- <span>Start</span>
- </a>
+ <a class="button is-primary" href="/workout/record/{{ workout.id }}">
+ <span class="icon is-small">
+ <i class="fa fa-play"></i>
+ </span>
+ <span>Start</span>
+ </a>
</div>
</div>
</div>
@@ -47,4 +48,4 @@
</div>
</div>
-{% endblock %}
+{% endblock %} \ No newline at end of file