Added theme archvier and changes to blocks

This commit is contained in:
Jeremy Rangel
2025-01-01 18:09:33 -08:00
parent 21b00e1937
commit d928a0e8fd
21 changed files with 342 additions and 158 deletions

View File

@ -29,6 +29,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Function to handle the scroll event
function handleScroll() {
document.documentElement.style.setProperty('--lcp--full-header--height', fullHeaderHeight + "px");
const scrolled = window.scrollY || document.documentElement.scrollTop;
@ -36,7 +37,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 = fullHeaderHeight + 'px';
// sideContent.style.top = fullHeaderHeight + 'px';
// If the header has 'lcp-sticky-on-scroll', adjust height of side content to be 100vh - fullHeaderHeight
if (headerIsStickyOnScroll) {
@ -44,7 +45,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add 'lcp-fixed' to the header
header.classList.add('lcp-fixed');
// Set the 'top' of the sideContent to the height of the header
sideContent.style.top = `${fullHeaderHeight}px`;
// sideContent.style.top = `${fullHeaderHeight}px`;
} else if (headerIsSticky) {
// If the header is sticky but not 'sticky-on-scroll', keep the side content height adjusted
sideContent.style.height = `calc(100vh - ${fullHeaderHeight}px)`;
@ -52,13 +53,13 @@ document.addEventListener('DOMContentLoaded', function () {
// Set side content height to 100vh when not sticky
sideContent.style.height = 'calc(100vh - 32px)';
sideContent.style.top = '32px';
// sideContent.style.top = '32px';
}
} else {
// Remove the 'lcp-fixed' class from side content and header if scrolled back above the header
sideContent.classList.remove('lcp-fixed');
sideContent.style.top = ''; // Reset the 'top' style
// sideContent.style.top = ''; // Reset the 'top' style
// Reset height to 100vh when not fixed
sideContent.style.height = `calc(100vh - ${fullHeaderHeight}px)` ;