From f5470ba8c0fcf999fcc4fd24afad25cc4bf2a4d0 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 20 Mar 2020 18:48:16 +0800 Subject: [PATCH] fix #192 & #193 --- _config.yml | 6 +++--- source/css/_layout/navbar.styl | 4 +--- source/css/_third-party/valine.styl | 23 ++++++++++++----------- source/js/app.js | 12 ++++++++++++ 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/_config.yml b/_config.yml index 8598ae416..5dac6c106 100755 --- a/_config.yml +++ b/_config.yml @@ -1,11 +1,11 @@ ############################### Basic Information ############################### info: name: Volantis - version: '2.2' + version: '2.2.0' docs: https://volantis.js.org/ cdn: # To use CDN, write 'use_cdn: true' in 'blog/_config.yml'. - css: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.2.0/css/style.css - js: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.2.0/js/app.js + css: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.2.0.1/css/style.css + js: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.2.0.1/js/app.js ############################### Style ############################### diff --git a/source/css/_layout/navbar.styl b/source/css/_layout/navbar.styl index ecb865179..e2ae7f530 100644 --- a/source/css/_layout/navbar.styl +++ b/source/css/_layout/navbar.styl @@ -269,7 +269,7 @@ padding-bottom: $gap * 0.5 width: 100% color: $color-text - background: alpha(darken($color-card, 5), .75) + background: darken($color-card, 5) box-shadow: none box-sizing: border-box padding-left: $iconW + $iconMargin @@ -300,8 +300,6 @@ margin-left: $gap &.z_search-open - .logo - opacity:0 .m_search $offset = 3 * $gap + 2 * $iconW width: "calc(100% - %s)" % $offset diff --git a/source/css/_third-party/valine.styl b/source/css/_third-party/valine.styl index 1f55d201a..493b0cd38 100644 --- a/source/css/_third-party/valine.styl +++ b/source/css/_third-party/valine.styl @@ -46,9 +46,10 @@ button border: none - padding: 8px 2rem 7px 2rem + padding: 9px 2rem 7px 2rem border-radius: $border-button background: darken($color-block, 2) + color: $color-text trans() &:hover color: $color-hover @@ -98,36 +99,36 @@ padding: 1px 8px background-color: alpha($color-text, .1) - - .vcard .vquote border-left: none - .vh border-bottom: 1px dashed alpha($color-text, .1) - - + .vcontent.expand + &:before + background: linear-gradient(180deg, alpha($color-card, .9), alpha($color-block, .9)); + &:after + background: alpha($color-block, .9) + color: $color-text + .vh:hover + >.vmeta>.vat + opacity: 1 .vmeta .vat font-weight: bold color: $color-link trans() + opacity: 0 &:hover color: $color-hover text-decoration: underline &:active color: darken($color-hover, .25) - .vinput color: $color-text - p color: $color-text - - - p #emoji display: inline diff --git a/source/js/app.js b/source/js/app.js index 2ef503b55..0f41dc1e9 100755 --- a/source/js/app.js +++ b/source/js/app.js @@ -115,6 +115,10 @@ var customSearch; $tocTarget.removeClass('active'); $toc.removeClass('active'); }); + $(document, window).scroll(() => { + $tocTarget.removeClass('active'); + $toc.removeClass('active'); + }); } else $toc.remove(); @@ -167,6 +171,10 @@ var customSearch; $menu.removeClass('show'); $switcher.removeClass('active'); }); + $(document, window).scroll(() => { + $menu.removeClass('show'); + $switcher.removeClass('active'); + }); } function setHeaderSearch() { @@ -184,6 +192,10 @@ var customSearch; $header.removeClass('z_search-open'); $switcher.removeClass('active'); }); + $(document, window).scroll(() => { + $header.removeClass('z_search-open'); + $switcher.removeClass('active'); + }); $search.click(function (e) { e.stopPropagation(); });