Enable sticky sidebar
- Hide sidebar on small screens
This commit is contained in:
parent
7fa159a9a2
commit
c7a7a5d707
@ -150,10 +150,18 @@ body:hover .visually-hidden button {
|
|||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
.sticky {
|
.sticky {
|
||||||
@include clearfix();
|
> * {
|
||||||
position: -webkit-sticky;
|
display: none;
|
||||||
position: sticky;
|
}
|
||||||
top: 80px;
|
@include breakpoint($small) {
|
||||||
|
@include clearfix();
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
top: 3em;
|
||||||
|
> * {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ $(document).ready(function(){
|
|||||||
// init smooth scroll
|
// init smooth scroll
|
||||||
$("a").smoothScroll({offset: -20});
|
$("a").smoothScroll({offset: -20});
|
||||||
|
|
||||||
|
|
||||||
// add lightbox class to all image links
|
// add lightbox class to all image links
|
||||||
$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup");
|
$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup");
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ layout: compress
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="main" role="main">
|
<div id="main" role="main">
|
||||||
<div class="sidebar">
|
<div class="sidebar sticky">
|
||||||
{% if page.author_profile %}{% include author-profile.html %}{% endif %}
|
{% if page.author_profile %}{% include author-profile.html %}{% endif %}
|
||||||
{% if page.sidebar %}
|
{% if page.sidebar %}
|
||||||
{% for s in page.sidebar %}
|
{% for s in page.sidebar %}
|
||||||
|
File diff suppressed because one or more lines are too long
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user