Changes to blocks and styles
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user