Tweak style
This commit is contained in:
parent
d971948f10
commit
458e262a26
2 changed files with 5 additions and 3 deletions
|
|
@ -48,7 +48,7 @@ export function scrollActiveSidebar () {
|
||||||
|
|
||||||
li.classList.add('active')
|
li.classList.add('active')
|
||||||
active = li
|
active = li
|
||||||
!hoveredOverSidebar && sticky.isSticky && active.scrollIntoView()
|
!hoveredOverSidebar && !sticky.noSticky && active.scrollIntoView()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.removeEventListener('scroll', highlight)
|
window.removeEventListener('scroll', highlight)
|
||||||
|
|
@ -125,10 +125,10 @@ export function sticky () {
|
||||||
return (function () {
|
return (function () {
|
||||||
if (window.pageYOffset >= coverHeight || dom.classList.contains('hidden')) {
|
if (window.pageYOffset >= coverHeight || dom.classList.contains('hidden')) {
|
||||||
document.body.classList.add('sticky')
|
document.body.classList.add('sticky')
|
||||||
sticky.isSticky = true
|
sticky.noSticky = false
|
||||||
} else {
|
} else {
|
||||||
document.body.classList.remove('sticky')
|
document.body.classList.remove('sticky')
|
||||||
sticky.isSticky = false
|
sticky.noSticky = true
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ nav {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
|
border-radius: 2px;
|
||||||
background-color: rgba($color-bg, .6);
|
background-color: rgba($color-bg, .6);
|
||||||
border: 1px solid $color-primary;
|
border: 1px solid $color-primary;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
@ -160,6 +161,7 @@ nav {
|
||||||
|
|
||||||
/* main */
|
/* main */
|
||||||
main {
|
main {
|
||||||
|
display: block;
|
||||||
size: 100vw 100%;
|
size: 100vw 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue