diff --git a/assets/hb/modules/blog/scss/_sidebar.scss b/assets/hb/modules/blog/scss/_sidebar.scss index 6cadd2b7..aef9928a 100644 --- a/assets/hb/modules/blog/scss/_sidebar.scss +++ b/assets/hb/modules/blog/scss/_sidebar.scss @@ -34,10 +34,14 @@ } @include media-breakpoint-up(lg) { - height: calc(100vh - var(--#{$prefix}top-offset)); overflow: auto; - @include top-offset(sticky); + @if $hb-blog-sidebar-sticky { + height: calc(100vh - var(--#{$prefix}top-offset)); + overflow: auto; + + @include top-offset(sticky); + } } .hb-module { diff --git a/assets/hb/modules/blog/scss/variables.tmpl.scss b/assets/hb/modules/blog/scss/variables.tmpl.scss index daee598b..bd51b625 100644 --- a/assets/hb/modules/blog/scss/variables.tmpl.scss +++ b/assets/hb/modules/blog/scss/variables.tmpl.scss @@ -2,6 +2,7 @@ $hb-blog-sidebar: {{ $hasSidebar }}; $hb-blog-sidebar-position: {{ default "start" site.Params.hb.blog.sidebar.position }}; $hb-blog-sidebar-width: {{ default 0.35 site.Params.hb.blog.sidebar.width }}; +$hb-blog-sidebar-sticky: {{ default true site.Params.hb.blog.sidebar.sticky }}; $hb-blog-home-pinned-posts-pos: '{{ default "" site.Params.hb.blog.home.pinned_posts_position }}'; // ToC diff --git a/hugo.toml b/hugo.toml index 285cf8aa..7f2fc693 100644 --- a/hugo.toml +++ b/hugo.toml @@ -43,6 +43,7 @@ pinned_posts_position = "" [params.hb.blog.sidebar] position = "start" width = 0.35 +sticky = true [params.hb.blog.toc] position = "end" # start, end or content.