diff options
| author | stilbruch <stilbruch@protonmail.com> | 2022-04-23 15:48:45 -0500 |
|---|---|---|
| committer | stilbruch <stilbruch@protonmail.com> | 2022-04-23 15:48:45 -0500 |
| commit | 4f1e55112138a1f3b4be3bf23e3740ae3effac35 (patch) | |
| tree | 220a5426486e9b8df1e27c417799221c546a0f29 /app/templates/workout/record.html | |
| parent | 3d0202b4faaef7ff0900bcfefca4c88907a2b6d4 (diff) | |
| download | Strengthy-4f1e55112138a1f3b4be3bf23e3740ae3effac35.tar.xz Strengthy-4f1e55112138a1f3b4be3bf23e3740ae3effac35.zip | |
Add javascript to add sets while recording workout
Diffstat (limited to 'app/templates/workout/record.html')
| -rw-r--r-- | app/templates/workout/record.html | 83 |
1 files changed, 39 insertions, 44 deletions
diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html index 3dfb2c8..94fe611 100644 --- a/app/templates/workout/record.html +++ b/app/templates/workout/record.html @@ -1,52 +1,47 @@ -{% extends 'base/layout.html' %} +{% extends 'base/form.html' %} -{% block content %} -<div class="container"> - <div class="columns is-centered"> - <div class="column"> - <h1 class="title is-2">Record {{ workout.name }}</h1> - <div class="box"> - {% for exercise in workout.exercises %} - <h1 class="title is-4 has-text-black">{{ exercise.name }}</h1> - <table class="table is-fullwidth is-hoverable"> - <thead> - <th>Set</th> - <th>lbs</th> - <th>Reps</th> - <th>Done</th> - </thead> - <tbody> - {% for i in range(exercise.sets) %} - <tr> - <th>{{ i }}</th> - <td><input class="input" type="number"></td> - <td><input class="input" type="number"></td> - <td> - <button class="button" onClick="onClickSetCheck(this)"> - <span class="icon is-small"> - <i class="fa fa-check"></i> - </span> - </button> - </td> - </tr> - {% endfor %} - </tbody> - </table> - <div class="buttons is-centered"> - <button class="button is-primary"> +{% block title %}Record {{ workout.name }}{% endblock %} + +{% block form %} +{% for exercise in workout.exercises %} +<div> + <h1 id="{{ exercise.name }}" class="title is-4 has-text-black">{{ exercise.name }}</h1> + <table class="table is-fullwidth is-hoverable"> + <thead> + <th>Set</th> + <th>lbs</th> + <th>Reps</th> + <th>Done</th> + </thead> + <tbody> + {% for i in range(exercise.sets) %} + <tr> + <th>{{ i + 1 }}</th> + <td><input class="input" type="number"></td> + <td><input class="input" type="number"></td> + <td> + <a class="button" onClick="onClickSetCheck(this)"> <span class="icon is-small"> - <i class="fa fa-plus"></i> + <i class="fa fa-check"></i> </span> - <span>Add Set</span> - </button> - <button class="button is-danger">Skip</button> - </div> - <hr> - {% endfor %} - </div> - </div> + </a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + <div class="buttons is-centered"> + <a class="button is-primary" onClick="onClickAddSet(this)"> + <span class="icon is-small"> + <i class="fa fa-plus"></i> + </span> + <span>Add Set</span> + </a> + <a class="button is-danger">Skip</a> </div> + <hr> </div> +{% endfor %} <script async type="text/javascript" src="/static/js/record.js"></script> |
