summaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonail.com>2022-05-04 19:09:29 -0500
committerstilbruch <stilbruch@protonail.com>2022-05-04 19:09:29 -0500
commitac0463db9a00b8d5fcd570d18e86c9ba62851365 (patch)
tree9c71cf6ad0c9c6a11b01779a76bc864f5741e575 /app/templates
parent6a92fe73a176164197706965c82ea98b08bbc2bd (diff)
downloadStrengthy-ac0463db9a00b8d5fcd570d18e86c9ba62851365.tar.xz
Strengthy-ac0463db9a00b8d5fcd570d18e86c9ba62851365.zip
Progress on progress api endpoint
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/progress/exercise.html22
-rw-r--r--app/templates/workout/record.html1
2 files changed, 4 insertions, 19 deletions
diff --git a/app/templates/progress/exercise.html b/app/templates/progress/exercise.html
index 51149fc..e66618f 100644
--- a/app/templates/progress/exercise.html
+++ b/app/templates/progress/exercise.html
@@ -1,11 +1,10 @@
{% extends 'base/layout.html' %}
-{% block title %}{{ exercise.name }} Progress{% endblock %}
-
{% block content %}
<div class="container">
<div class="columns is-centered">
<div class="column">
+ <h1 class="title is-2">{{ exercise.name }}</h1>
<div class="box">
<canvas id="exercise_chart"></canvas>
</div>
@@ -13,24 +12,9 @@
</div>
</div>
+<script type="text/javascript" src="/static/js/chart.js"></script>
<script>
- new Chart(document.getElementById('exercise_chart'), {
- type: 'line',
- data: {
- cubicInterpolationMode: 'monotone',
- tension: 0.4,
- pointStyle: 'circle',
- pointRadius: 5,
- pointHoverRadius: 10,
- },
- option: {
- scales: {
- y: {
- beginAtZero: true
- }
- }
- }
- });
+ exercise_chart('exercise_chart', {{ exercise.id }});
</script>
{% endblock %}
diff --git a/app/templates/workout/record.html b/app/templates/workout/record.html
index 9e93805..9b10f2d 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 %}
+ {{ form.exercises.entries[loop.index0]['id'] }}
<h1 class="title is-4 has-text-black">{{ exercise.name }}</h1>
<div>
<table class="table is-fullwidth is-hoverable">