Added content

This commit is contained in:
James Dinh 2022-05-30 00:57:34 -07:00
parent 7049e86c2a
commit ab0537f247
5 changed files with 35 additions and 35 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
.pa-fixed-header { .pa-fixed-header {
background-color: rgb(24, 24, 24) !important; background-color: rgb(24, 24, 24) !important;
box-shadow: 0 1px 6px 0 rgb(0 0 0 / 20%); box-shadow: 0 1px 6px 0 rgb(0 0 0 / 20%);
transition: background-color 0.25s ease-out; transition: background-color 0.25s ease-out;
} }

BIN
img/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -64,7 +64,7 @@
<h2 id="header-subtitle-date">Aug 12 - 14</h2> <h2 id="header-subtitle-date">Aug 12 - 14</h2>
<div id="spots-container"> <div id="spots-container">
<div class="blob green" aria-hidden="true"></div> <div class="blob green" aria-hidden="true"></div>
<h2 id="header-subtitle-spots">40 spots Left</h2> <h2 id="header-subtitle-spots">40 spots left</h2>
</div> </div>
<div id="entrance-arrow"> <div id="entrance-arrow">
<a href="#event" id="arrow-link"> <a href="#event" id="arrow-link">

View File

@ -1,30 +1,30 @@
// Toggle the .pa-fixed-header class when the user // Toggle the .pa-fixed-header class when the user
// scroll 100px // scroll 100px
window.onscroll = () => {scrollNavbar()}; window.onscroll = () => {scrollNavbar()};
scrollNavbar = () => { scrollNavbar = () => {
// Target elements // Target elements
const navBar = document.getElementById("navBar"); const navBar = document.getElementById("navBar");
const links = document.querySelectorAll("#navBar a"); const links = document.querySelectorAll("#navBar a");
if (document.documentElement.scrollTop > 100) { if (document.documentElement.scrollTop > 100) {
navBar.classList.add("pa-fixed-header"); navBar.classList.add("pa-fixed-header");
// Change the color of links on scroll // Change the color of links on scroll
for (let i = 0; i < links.length; i++) { for (let i = 0; i < links.length; i++) {
const element = links[i]; const element = links[i];
element.classList.add('text-black'); element.classList.add('text-black');
} }
} else { } else {
navBar.classList.remove("pa-fixed-header"); navBar.classList.remove("pa-fixed-header");
// Change the color of links back to default // Change the color of links back to default
for (let i = 0; i < links.length; i++) { for (let i = 0; i < links.length; i++) {
const element = links[i]; const element = links[i];
element.classList.remove('text-black'); element.classList.remove('text-black');
} }
} }
} }