Skip to content

Commit

Permalink
alert styling
Browse files Browse the repository at this point in the history
  • Loading branch information
zipper3030 committed Apr 24, 2024
1 parent cea074f commit eb3bb33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ <h2 class="feature-title">{{ feature.title }}</h2>

// Function to handle alert scrolling
window.addEventListener('scroll', function() {
var alertElement = document.getElementById("alert");
var windowHeight = window.innerHeight;
var bodyHeight = document.body.scrollHeight;
var scrollPosition = window.scrollY || window.pageYOffset;
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) {
Expand Down
5 changes: 3 additions & 2 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,11 @@ ul li {

// event alert
.alert {
background-color: rgb(237, 219, 122);
background-color: $peach;
font-family: $font-family-base;
color: black;
position: fixed;
font-size: 1.1em;
bottom: 0;
left: 0;
z-index: 9999;
Expand All @@ -424,7 +425,7 @@ ul li {
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
line-height: 25px;
cursor: pointer;
transition: 0.3s;
}
Expand Down

0 comments on commit eb3bb33

Please sign in to comment.