Skip to content

Commit 72d02e7

Browse files
committed
Attempt a fix.
1 parent 6fedd61 commit 72d02e7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

_sass/post.scss

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ img {
112112
max-width: fill-available;
113113
box-shadow: $hover-box-shadow;
114114
border: $hover-box-border;
115+
max-height: 65vh;
115116
}
116117

117118
blockquote {

assets/js/navbar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class Navbar {
4949
const velocityY = currentY - this.y
5050
const accelerationY = velocityY - this.velocityY
5151

52-
if (this.accelerationY > threshold) {
52+
if ((-accelerationY) > threshold && velocityY < 0) {
5353
this.showNavbar()
5454
}
55-
else if (!this.isOpened && document.body.scrollHeight > document.body.clientHeight) {
55+
else if (!this.isOpened && document.body.scrollHeight > document.body.clientHeight && velocityY > 0 && currentY > 0) {
5656
this.hideNavbar()
5757
}
5858
this.y = currentY

0 commit comments

Comments
 (0)