Changes to blocks and styles

This commit is contained in:
Jeremy Rangel
2025-01-01 03:08:58 -08:00
parent 741d39a962
commit 21b00e1937
45 changed files with 617 additions and 70 deletions

View File

@ -25,12 +25,7 @@ document.addEventListener('DOMContentLoaded', function () {
fullHeaderHeight = headerHeight;
}
// Set the initial height of #lcp-sidecontent based on whether the header is sticky or not
if (headerIsSticky) {
sideContent.style.height = `calc(100vh - ${fullHeaderHeight}px)`;
} else {
sideContent.style.height = `100vh`;
}
// Function to handle the scroll event
function handleScroll() {
@ -41,7 +36,7 @@ document.addEventListener('DOMContentLoaded', function () {
if (scrolled >= headerHeight) {
// Add the 'lcp-fixed' class and set 'top' to 0 for side content
sideContent.classList.add('lcp-fixed');
sideContent.style.top = '0';
sideContent.style.top = fullHeaderHeight + 'px';
// If the header has 'lcp-sticky-on-scroll', adjust height of side content to be 100vh - fullHeaderHeight
if (headerIsStickyOnScroll) {