New scroll to top button and functions.

This commit is contained in:
Scott Idem
2025-06-25 18:29:33 -04:00
parent c947e9e77a
commit 55dc2ab48c
3 changed files with 204 additions and 8 deletions

View File

@@ -401,6 +401,36 @@ function add_activity_log(
log_lvl: log_lvl
});
}
// let hide_scroll_btn = $state(true); // This is to hide the scroll to top button initially
// let scroll_y = $state(75);
// function go_top() {
// document.body.scrollIntoView();
// }
// function scroll_container() {
// console.log('Element', document.getElementById('ae_idaa__recovery_meetings'))
// return document.getElementById('ae_idaa__recovery_meetings') || document.documentElement || document.body;
// // return document.documentElement || document.body;
// }
// function handle_on_scroll() {
// if (!scroll_container()) {
// return;
// }
// console.log(`Scroll position: ${scroll_container().scrollTop}`);
// let show_on_px = 500; // The scroll position at which the button will be shown
// if (scroll_container().scrollTop > show_on_px) {
// hide_scroll_btn = false;
// } else {
// hide_scroll_btn = true;
// }
// }
</script>
@@ -413,6 +443,7 @@ function add_activity_log(
</svelte:head>
<div
class="
ae_idaa__recovery_meetings
@@ -617,3 +648,6 @@ function add_activity_log(
</Modal>