Added theme archvier and changes to blocks
This commit is contained in:
@ -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)` ;
|
||||
|
||||
Reference in New Issue
Block a user