Skip to content

Commit

Permalink
hamburger menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zipper3030 committed May 2, 2024
1 parent eb3bb33 commit b02f6b2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
36 changes: 18 additions & 18 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-12 col-md-10 col-lg-8">
<h1 class="meet-title">"Hello, DHRIFT!"</h1>
<h1 class="meet-title">Meet DHRIFT</h1>
<p class="meet-description">Digital Humanities Infrastructure for Teaching Technology</p>
</div>
</div>
Expand Down Expand Up @@ -94,23 +94,23 @@ <h2 class="feature-title">{{ feature.title }}</h2>
icon.style.transform = `rotate(${rotationAngle}deg)`;
});

// Function to handle alert scrolling
window.addEventListener('scroll', function() {
const alertElement = document.getElementById("alert");
const windowHeight = window.innerHeight;
const bodyHeight = document.body.scrollHeight;
const scrollPosition = window.scrollY || window.pageYOffset;

//place the alert at the bottom of the viewport
if (scrollPosition > windowHeight) {
alertElement.style.position = "fixed";
alertElement.style.bottom = "0";
alertElement.style.left = "0";
alertElement.style.width = "50%";
} else {
alertElement.style.position = "relative";
}
});
// Function to handle alert scrolling
window.addEventListener('scroll', function() {
const alertElement = document.getElementById("alert");
const windowHeight = window.innerHeight;
const bodyHeight = document.body.scrollHeight;
const scrollPosition = window.scrollY || window.pageYOffset;

//place the alert at the bottom of the viewport
if (scrollPosition > windowHeight) {
alertElement.style.position = "fixed";
alertElement.style.bottom = "0";
alertElement.style.left = "0";
alertElement.style.width = "50%";
} else {
alertElement.style.position = "relative";
}
});
});
</script>
{% endif %}
10 changes: 9 additions & 1 deletion assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -892,4 +892,12 @@ ul li {
margin-top: 50px;
margin-bottom: 50px;
text-align: center;
}
}

// hamburger menu
.hamburger {
display: none;
position: relative;
z-index: 1000;
}

0 comments on commit b02f6b2

Please sign in to comment.