Add brotli complression, cache graph requests for 5mins and add pagination for person overview

This commit is contained in:
Peter Stockings
2026-02-04 09:28:18 +11:00
parent b4121eada7
commit 71a5ae590e
5 changed files with 96 additions and 44 deletions

View 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 %}