Skip to content

Commit

Permalink
fix: fix burger menu
Browse files Browse the repository at this point in the history
  • Loading branch information
RezenkovD committed Aug 10, 2023
1 parent 4939c94 commit bef9695
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion users/templates/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ document.addEventListener("DOMContentLoaded", function () {
window.addEventListener('load', function() {
var header = document.querySelector('.header-container');
var scrollPosition = window.scrollY;
var menuUL = document.querySelector(".navigation-container");

if (scrollPosition > 0) {
header.style.backgroundColor = 'rgba(2, 2, 4, 0.70)';
Expand All @@ -57,7 +58,11 @@ window.addEventListener('load', function() {
var scrollPosition = window.scrollY;

if (scrollPosition > 0) {
header.style.backgroundColor = 'rgba(2, 2, 4, 0.70)';
if (menuUL.style.maxHeight) {
header.style.backgroundColor = ""; // Зміна фону при відкритті бургер-меню
} else {
header.style.backgroundColor = 'rgba(2, 2, 4, 0.70)';
}
header.style.marginTop = '0';
header.style.height = '64px';
} else {
Expand Down

0 comments on commit bef9695

Please sign in to comment.