diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/templates/base/layout.html | 6 | ||||
| -rw-r--r-- | app/templates/home.html | 34 |
2 files changed, 32 insertions, 8 deletions
diff --git a/app/templates/base/layout.html b/app/templates/base/layout.html index cbdb567..33f61d1 100644 --- a/app/templates/base/layout.html +++ b/app/templates/base/layout.html @@ -5,6 +5,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bulma css --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css"> + <!-- chart.js --> + <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script> <!-- FontAwesome4 --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- custom css --> @@ -54,11 +56,11 @@ </span> <span class="navbar-item"> - <a class="button is-white is-outlined" href="/workout/workouts"> + <a class="button is-white is-outlined" href="/workout/create"> <span class="icon"> <i class="fa fa-archive"></i> </span> - <span>Manage Workouts</span> + <span>Create a Workout</span> </a> </span> {% endif %} diff --git a/app/templates/home.html b/app/templates/home.html index afbed29..d90ef6a 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -148,12 +148,7 @@ <div class="columns"> <div class="column is-4"> <div class="card"> - <div class="card-content"> - <p class="title"> - FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER - FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER - </p> - </div> + <canvas id="chart-1"></canvas> <footer class="card-footer"> <p class="card-footer-item"> <span> @@ -199,5 +194,32 @@ </div> </div> </div> +<script> + +const ctx = document.getElementById('chart-1'); +const myChart = new Chart(ctx, { + type: 'line', + data: { + labels: ['01/01/22', '01/02/22', '02/01/22', '03/01/22', '04/01/22', '05/01/22', '06/01/22', '07/01/22'], + datasets: [{ + label: 'Bench Press', + data: [125, 145, 185, 185, 200, 205, 205], + borderWidth: 1, + cubicInterpolationMode: 'monotone', + tension: 0.4, + pointStyle: 'circle', + pointRadius: 5, + pointHoverRadius: 10 + }] + }, + options: { + scales: { + y: { + beginAtZero: true + } + } + } +}); +</script> {% endblock %} |
