feat: adjust script block positioning and add TODO for implementing infinite scroll functionality

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 17:38:54 +02:00
parent 81c06ad13b
commit 998cc2e472
+3 -3
View File
@@ -192,8 +192,7 @@ content %}
<div id="loading-indicator" class="flex justify-center py-8 hidden"> <div id="loading-indicator" class="flex justify-center py-8 hidden">
<div class="spinner"></div> <div class="spinner"></div>
</div> </div>
{% endblock %} {% block scripts %}
{% block scripts %}
<script> <script>
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
const galleryContainers = document.querySelectorAll(".grid[data-grid]"); const galleryContainers = document.querySelectorAll(".grid[data-grid]");
@@ -219,7 +218,8 @@ content %}
if (scrollPosition >= bottomThreshold) { if (scrollPosition >= bottomThreshold) {
isLoading = true; isLoading = true;
loadingIndicator.classList.remove("hidden"); loadingIndicator.classList.remove("hidden");
// TODO: Implement actual fetching of next page of results and appending to the correct grid(s)
// For demo purposes, we'll just simulate a delay and then hide the loading indicator
// Simulate API call for next page // Simulate API call for next page
// In real implementation, replace with actual backend fetch // In real implementation, replace with actual backend fetch
setTimeout(() => { setTimeout(() => {