From 3cba71753ea59e6aa380577c54ff18d2eb7d7244 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 8 Mar 2020 20:01:15 +0800 Subject: [PATCH] navbar --- _config.yml | 2 +- source/css/_layout/navbar.styl | 1 + source/js/app.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 965c384..d9b6487 100755 --- a/_config.yml +++ b/_config.yml @@ -7,7 +7,7 @@ info: css: # style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@1.7.4/css/style.css js: - app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@1.7.4/js/app.js + # app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@1.7.4/js/app.js # search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@1.7.4/js/search.js diff --git a/source/css/_layout/navbar.styl b/source/css/_layout/navbar.styl index 22a65c5..744e5eb 100644 --- a/source/css/_layout/navbar.styl +++ b/source/css/_layout/navbar.styl @@ -94,6 +94,7 @@ font-size: $fontsize-body font-family: $fontfamily @media screen and (max-width: $device-mobile) + padding: 0 $gap letter-spacing: -0.5px padding-top: 1px diff --git a/source/js/app.js b/source/js/app.js index eb53b49..f871b6a 100755 --- a/source/js/app.js +++ b/source/js/app.js @@ -50,14 +50,14 @@ var customSearch; const $coverAnchor = $('.cover-wrapper'); var showHeaderPoint = 0; if ($coverAnchor[0]) { - showHeaderPoint = $coverAnchor[0].clientHeight - 80; + showHeaderPoint = $coverAnchor[0].clientHeight - 180; } var pos = document.body.scrollTop; $(document, window).scroll(() => { const scrollTop = $(window).scrollTop(); const del = scrollTop - pos; pos = scrollTop; - if (scrollTop > 150) { + if (scrollTop > 180) { $topBtn.addClass('show'); if (del > 0) { $topBtn.removeClass('hl');