diff options
Diffstat (limited to 'app/templates/workout')
| -rw-r--r-- | app/templates/workout/record.html | 57 | ||||
| -rw-r--r-- | app/templates/workout/record_select.html | 17 |
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 |
