Updated nav a bit
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m35s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m35s
This commit is contained in:
@@ -11,14 +11,12 @@ const isVisible = ref(true);
|
||||
const isScrolling = ref(false);
|
||||
const currentClientPath = ref(props.currentPath);
|
||||
|
||||
// Filter out disabled navigation items
|
||||
const enabledNavigationItems = config.navigationItems.filter(
|
||||
(item) => item.enabled !== false,
|
||||
);
|
||||
|
||||
const activePath = computed(() => currentClientPath.value);
|
||||
|
||||
// Normalize path
|
||||
const normalizedPath = computed(() => {
|
||||
const path = activePath.value;
|
||||
return path.endsWith("/") && path.length > 1 ? path.slice(0, -1) : path;
|
||||
@@ -30,7 +28,6 @@ const updatePath = () => {
|
||||
}
|
||||
};
|
||||
|
||||
// Scroll handling
|
||||
let lastScrollY = 0;
|
||||
let ticking = false;
|
||||
let scrollTimer: ReturnType<typeof setTimeout> | undefined;
|
||||
@@ -38,12 +35,9 @@ let scrollTimer: ReturnType<typeof setTimeout> | undefined;
|
||||
const updateScroll = () => {
|
||||
const currentScrollY = window.scrollY;
|
||||
|
||||
// Always show near top
|
||||
if (currentScrollY < 50) {
|
||||
isVisible.value = true;
|
||||
} else {
|
||||
// Show if scrolling up, hide if scrolling down
|
||||
// Only update if position actually changed to avoid jitter
|
||||
if (Math.abs(currentScrollY - lastScrollY) > 0) {
|
||||
isVisible.value = currentScrollY < lastScrollY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user