Cards!
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 2m26s

This commit is contained in:
2026-09-20 03:15:16 +02:00
parent ed187af3dd
commit 770f302bc3
34 changed files with 3302 additions and 677 deletions

View File

@@ -5,11 +5,15 @@ import SiteOptions from './site_options/SiteOptions.vue';
import { ref, onMounted, onUnmounted } from 'vue';
const SCROLL_THRESHOLD = 120; // px scrolled before sticky header appears
const props = defineProps({
alwaysVisible: { type: Boolean, default: false }
});
const isVisible = ref(false);
const isVisible = ref(props.alwaysVisible);
function onScroll() {
isVisible.value = window.scrollY > SCROLL_THRESHOLD;
isVisible.value = props.alwaysVisible || window.scrollY > SCROLL_THRESHOLD;
}
onMounted(() => window.addEventListener('scroll', onScroll, { passive: true }));