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:
@@ -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(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user