summaryrefslogtreecommitdiff
path: root/app/templates/workout/record.html
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-05-09 00:26:36 -0500
committerstilbruch <stilbruch@protonmail.com>2022-05-09 00:26:36 -0500
commitac62c02ae1e9c051f64e4608e4060dc7a86b2923 (patch)
tree56979f74e00653a5d336861d4df952b72fef5290 /app/templates/workout/record.html
parent0cce988f119b80fd69b9a415c9e9b983325a12af (diff)
parentee628b5e2d023ccbca45936f6078ff652a80279f (diff)
downloadStrengthy-ac62c02ae1e9c051f64e4608e4060dc7a86b2923.tar.xz
Strengthy-ac62c02ae1e9c051f64e4608e4060dc7a86b2923.zip
Merge branch 'master' of stilbruch.xyz:strengthy
Diffstat (limited to 'app/templates/workout/record.html')
-rw-r--r--app/templates/workout/record.html54
1 files changed, 30 insertions, 24 deletions
diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html
index 9b10f2d..c7152cd 100644
--- a/app/templates/workout/record.html
+++ b/app/templates/workout/record.html
@@ -5,6 +5,7 @@
{% block form %}
<div>
{% for exercise in workout.exercises %}
+ {% set outer_loop = loop %}
{{ form.exercises.entries[loop.index0]['id'] }}
<h1 class="title is-4 has-text-black">{{ exercise.name }}</h1>
<div>
@@ -21,33 +22,38 @@
</thead>
<tbody>
{% for set in form.exercises.entries[loop.index0].sets.entries %}
- <tr>
- <th>{{ loop.index }}</th>
- {% if exercise.type == 'time' %}
- <td>
- <div class="timer">
- <a class="button" onClick="onClickPausePlayTimer(this)">
+ {% 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') }}</td>
+ <td>{{ set['units'](class_='input') }}</td>
+ {% endif %}
+ <td>
+ <a class="button" onClick="onClickSetCheck(this)">
<span class="icon is-small">
- <i class="fa fa-play"></i>
+ <i class="fa fa-check"></i>
</span>
</a>
- <span class="{{ ['units'] }}">
- </span>
- </div>
- </td>
- {% else %}
- <td>{{ set['lbs'](class_='input') }}</td>
- <td>{{ set['units'](class_='input') }}</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 %}
+ </td>
+ </tr>
+ {% endfor %}
</tbody>
</table>
<div class="buttons is-centered">