:lightning: lazy load archive

This commit is contained in:
mi
2025-11-15 20:01:06 +10:00
parent bbd8e0a96d
commit 61aa0aaba7
3 changed files with 297 additions and 5 deletions

View File

@@ -7,10 +7,12 @@
<div class="page-header{% if archive_full_width %} page-header-fullwidth{% endif %}">
<h1>Comic Archive</h1>
<p>Browse all {% set total = namespace(count=0) %}{% for section_title, section_comics in sections %}{% set total.count = total.count + section_comics|length %}{% endfor %}{{ total.count }} comics</p>
<p>Browse all {{ total_comics }} comics</p>
</div>
<section class="archive-content{% if archive_full_width %} archive-content-fullwidth{% endif %}">
<section class="archive-content{% if archive_full_width %} archive-content-fullwidth{% endif %}"
data-total-comics="{{ total_comics }}"
data-initial-batch="{{ initial_batch }}">
{% for section_title, section_comics in sections %}
{% if section_title and sections_enabled %}
<div class="section-header">
@@ -43,3 +45,7 @@
<div class="container"> {# Reopen container for footer #}
{% endif %}
{% endblock %}
{% block extra_js %}
<script src="{{ url_for('static', filename='js/archive-lazy-load.js') }}"></script>
{% endblock %}