work on wingle articles

This commit is contained in:
infeeeee
2019-08-07 22:54:34 +02:00
parent 8e00b8717b
commit 5a234f87e1
10 changed files with 438 additions and 306 deletions

View File

@@ -97,7 +97,7 @@
const isSingle = bodyHasClass('single')
var isMasonryPage = isArchive || isHome || isSearch
@@ -880,8 +880,12 @@
/* ----------------------------- scroll to title ---------------------------- */
const titleWrapperHeight = $('article>.titlewrapper')[0].getBoundingClientRect().height
$('html, body').stop().animate({ scrollTop: titleWrapperHeight }, 400);
if (!isMobile) {
const titleWrapperHeight = $('article>.titlewrapper')[0].getBoundingClientRect().height
if ($('html, body').scrollTop() == 0) {
$('html, body').stop().animate({ scrollTop: titleWrapperHeight }, 400);
}
}
}//if single end