diff options
Diffstat (limited to 'templates/infinite_scroll_trigger.php')
| -rw-r--r-- | templates/infinite_scroll_trigger.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/infinite_scroll_trigger.php b/templates/infinite_scroll_trigger.php new file mode 100644 index 0000000..dce1343 --- /dev/null +++ b/templates/infinite_scroll_trigger.php @@ -0,0 +1,10 @@ +<?php if ($isEnd): ?> + <div id="infiniteScroll" hx-swap-oob="true"> + <?php call_template('placeholder_text', ['count' => 0]); ?> + </div> +<?php else: ?> + <div id="infiniteScroll" hx-trigger="intersect" hx-get="/feed/<?= $kind ?>?page=<?= $nextPage ?>&infinite=true" + hx-target="previous #timelineItems" hx-swap="beforeend" <?= ($isUpdate ?? false) ? 'hx-swap-oob="true"' : '' ?>> + <?php call_template('placeholder_text', ['message' => 'Loading moreā¦']); ?> + </div> +<?php endif; ?>
\ No newline at end of file |
