Skip to content

Commit

Permalink
HotFix navbar logo close #25
Browse files Browse the repository at this point in the history
  • Loading branch information
chelunike committed Feb 19, 2024
1 parent 93c0f4d commit 7acdd3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const { description, title, image } = Astro.props;
}

.sticky-header .navbar-logo {
@apply py-2;
@apply py-2 w-10;
}

.sticky-header #navbarToggler span {
Expand Down
18 changes: 0 additions & 18 deletions src/scripts/stickymenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,6 @@ document.addEventListener('DOMContentLoaded', function () {
ud_header.classList.add('absolute', 'bg-transparent', 'z-40');
}

if(logo.length) {
// === logo change
if (ud_header.classList.contains('sticky-header')) {
document.querySelector(".header-logo").src = '/assets/logo/logo.svg';
} else {
document.querySelector('.header-logo').src = '/assets/logo/logo-white.svg';
}
}

if (document.documentElement.classList.contains('dark')) {
if (logo.length) {
// === logo change
if (ud_header.classList.contains('sticky-header')) {
document.querySelector('.header-logo').src = '/assets/logo/logo-white.svg';
}
}
}

// show or hide the back-top-top button
const backToTop = document.querySelector('.back-to-top');
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
Expand Down

0 comments on commit 7acdd3d

Please sign in to comment.