Remove the animated, sticky header
This commit is contained in:
parent
6b800dcbf6
commit
19f153e706
2 changed files with 0 additions and 35 deletions
|
@ -3,22 +3,4 @@
|
|||
*/
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const siteHeader = document.querySelector("header.site");
|
||||
if (!siteHeader) {
|
||||
return;
|
||||
}
|
||||
siteHeader.classList.add("visible");
|
||||
|
||||
siteHeader.addEventListener("animationend", () => {
|
||||
siteHeader.classList.add("sticky");
|
||||
}, false);
|
||||
|
||||
try {
|
||||
const documentReferrer = new URL(document.referrer);
|
||||
if (documentReferrer.pathname === "/") {
|
||||
siteHeader.classList.add("animated");
|
||||
} else {
|
||||
siteHeader.classList.add("sticky");
|
||||
}
|
||||
} catch { }
|
||||
});
|
||||
|
|
|
@ -262,26 +262,9 @@ h1.site > a:hover { text-decoration: none; }
|
|||
|
||||
header.site {
|
||||
display: flex;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
z-index: 10000;
|
||||
}
|
||||
header.site.visible { visibility: visible; }
|
||||
header.site.sticky { position: sticky; }
|
||||
header.site.animated {
|
||||
animation: site-header-slide-in var(--transition-duration) ease-out;
|
||||
}
|
||||
@keyframes site-header-slide-in {
|
||||
from {
|
||||
top: -200px;
|
||||
}
|
||||
to {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
header.site > .grid > h1 {
|
||||
font-family: var(--font-family-site-heading);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue