Add brotli complression, cache graph requests for 5mins and add pagination for person overview
This commit is contained in:
29
templates/partials/workout_rows.html
Normal file
29
templates/partials/workout_rows.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% for workout in workouts %}
|
||||
<tr hx-get="{{ url_for('workout.show_workout', person_id=person_id, workout_id=workout.id) }}" hx-push-url="true"
|
||||
hx-target="#container" class="cursor-pointer">
|
||||
<td class="p-4 whitespace-nowrap text-sm font-normal text-gray-500">
|
||||
{{ workout.start_date | strftime("%b %d %Y") }}
|
||||
</td>
|
||||
|
||||
{% for exercise in selected_exercises %}
|
||||
<td class="p-4 whitespace-nowrap text-sm font-semibold text-gray-900">
|
||||
{% for set in workout.exercises[exercise.id] %}
|
||||
{{ set.repetitions }} x {{ set.weight }}kg
|
||||
{% endfor %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
|
||||
{% if loop.last and has_more %}
|
||||
<tr id="load-more-row">
|
||||
<td colspan="{{ selected_exercises|length + 1 }}" class="p-4 text-center">
|
||||
<button class="text-blue-600 font-medium hover:underline px-4 py-2"
|
||||
hx-get="{{ url_for('person_overview', person_id=person_id, offset=next_offset, limit=limit) }}"
|
||||
hx-include="[name='exercise_id'],[name='min_date'],[name='max_date']" hx-target="#load-more-row"
|
||||
hx-swap="outerHTML">
|
||||
Load More Workouts
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user