page load optimization and pagination changes

This commit is contained in:
Bryan Van Deusen
2025-08-03 11:40:32 -04:00
parent 63918363c1
commit 0dc944ef25
11 changed files with 115 additions and 84 deletions
+2 -15
View File
@@ -1,3 +1,4 @@
<!-- /app/templates/gallery.html -->
{% extends "layout.html" %}
{% block title %}Gallery{% endblock %}
@@ -8,21 +9,7 @@
{% include '_pagination.html' %}
<!-- Gallery Grid -->
<div class="gallery-grid">
{% for image in images.items %}
<div class="gallery-item">
<div class="gallery-thumb img-clickable"
data-full="{{ url_for('main.serve_image', filename=image.filepath | replace('/images/', '') ) }}"
style="background-image: url('{{ url_for('main.serve_image', filename=image.filepath | replace('/images/', '') ) }}');"
data-filename="{{ image.filename }}">
</div>
<a href="{{ url_for('main.artist_gallery', artist_name=image.artist) }}">{{ image.artist }}</a>
<span class="image-date">
{{ image.taken_at or image.imported_at | datetimeformat }}
</span>
</div>
{% endfor %}
</div>
{% include '_gallery_grid.html' %}
<!-- Pagination Controls (Bottom) -->
{% include '_pagination.html' %}