Add ability to choose graphs to render, speed by default

This commit is contained in:
Peter Stockings
2023-03-16 23:09:37 +11:00
parent 3c5661e7b2
commit 699390c28a
4 changed files with 55 additions and 5 deletions

View File

@@ -19,16 +19,19 @@
</button>
</h2>
<div class="!visible collapse {% if loop.index != 1 %}hidden{% endif %}">
<!--
<img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id, graph_type='cadence') }}" loading="lazy"
alt="No image" class="mx-auto">
<img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id, graph_type='speed') }}" loading="lazy"
alt="No image" class="mx-auto">
<img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id, graph_type='distance') }}" loading="lazy"
alt="No image" class="mx-auto">
<img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id, graph_type='calories') }}" loading="lazy"
alt="No image" class="mx-auto">
<img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id, graph_type='power') }}" loading="lazy"
alt="No image" class="mx-auto">
-->
<div id="workout_view">
{% with workout=w, graph_types=['speed'] %}
{% include 'workout_view.html' %}
{% endwith %}
</div>
<button
class="mx-4 mb-4 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center"
hx-delete="{{ url_for('delete_workout', user_id=w.user_id, workout_id=w.id) }}"