|
@@ -31,7 +31,7 @@
|
|
});
|
|
});
|
|
|
|
|
|
function init() {
|
|
function init() {
|
|
- console.log('Auto-hide navigation: jQuery script loaded');
|
|
|
|
|
|
+ // console.log('Auto-hide navigation: jQuery script loaded');
|
|
|
|
|
|
// Find header elements - Try multiple selectors for Twenty Twenty-Five
|
|
// Find header elements - Try multiple selectors for Twenty Twenty-Five
|
|
$header = $('header').first();
|
|
$header = $('header').first();
|
|
@@ -50,8 +50,8 @@
|
|
|
|
|
|
$body = $('body');
|
|
$body = $('body');
|
|
|
|
|
|
- console.log('Header element found:', $header[0]);
|
|
|
|
- console.log('Header length:', $header.length);
|
|
|
|
|
|
+ // console.log('Header element found:', $header[0]);
|
|
|
|
+ // console.log('Header length:', $header.length);
|
|
|
|
|
|
if (!$header.length) {
|
|
if (!$header.length) {
|
|
console.warn('Auto-hide navigation: No header element found');
|
|
console.warn('Auto-hide navigation: No header element found');
|
|
@@ -68,8 +68,8 @@
|
|
// Initial state
|
|
// Initial state
|
|
updateHeaderState();
|
|
updateHeaderState();
|
|
|
|
|
|
- console.log('Auto-hide navigation: Initialization complete');
|
|
|
|
- console.log('Header height calculated:', state.headerHeight);
|
|
|
|
|
|
+ // console.log('Auto-hide navigation: Initialization complete');
|
|
|
|
+ // console.log('Header height calculated:', state.headerHeight);
|
|
}
|
|
}
|
|
|
|
|
|
function calculateHeaderHeight() {
|
|
function calculateHeaderHeight() {
|
|
@@ -78,7 +78,7 @@
|
|
state.headerHeight = $header.outerHeight() || 80;
|
|
state.headerHeight = $header.outerHeight() || 80;
|
|
$('html').css('--header-height', state.headerHeight + 'px');
|
|
$('html').css('--header-height', state.headerHeight + 'px');
|
|
|
|
|
|
- console.log('Header height:', state.headerHeight);
|
|
|
|
|
|
+ // console.log('Header height:', state.headerHeight);
|
|
}
|
|
}
|
|
|
|
|
|
function bindEvents() {
|
|
function bindEvents() {
|
|
@@ -100,7 +100,7 @@
|
|
// Smooth scroll for anchor links
|
|
// Smooth scroll for anchor links
|
|
$(document).on('click', 'a[href^="#"]', handleAnchorClick);
|
|
$(document).on('click', 'a[href^="#"]', handleAnchorClick);
|
|
|
|
|
|
- console.log('Events bound successfully');
|
|
|
|
|
|
+ // console.log('Events bound successfully');
|
|
}
|
|
}
|
|
|
|
|
|
function handleScroll() {
|
|
function handleScroll() {
|
|
@@ -143,7 +143,7 @@
|
|
function hideHeader() {
|
|
function hideHeader() {
|
|
if (!state.isVisible) return;
|
|
if (!state.isVisible) return;
|
|
|
|
|
|
- console.log('Hiding header');
|
|
|
|
|
|
+ // console.log('Hiding header');
|
|
state.isVisible = false;
|
|
state.isVisible = false;
|
|
$header.removeClass('header-visible').addClass('header-hidden');
|
|
$header.removeClass('header-visible').addClass('header-hidden');
|
|
|
|
|
|
@@ -158,7 +158,7 @@
|
|
function showHeader() {
|
|
function showHeader() {
|
|
if (state.isVisible) return;
|
|
if (state.isVisible) return;
|
|
|
|
|
|
- console.log('Showing header');
|
|
|
|
|
|
+ // console.log('Showing header');
|
|
state.isVisible = true;
|
|
state.isVisible = true;
|
|
$header.removeClass('header-hidden').addClass('header-visible');
|
|
$header.removeClass('header-hidden').addClass('header-visible');
|
|
|
|
|