From 6fda7ef004a43801d60f070ec59785811fb46033 Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 11 Dec 2020 15:45:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=95=B6=E8=A8=AD=E7=BD=AEaside=20mobi?= =?UTF-8?q?le=E7=82=BAfalse=E6=99=82=EF=BC=8Ctoc=E4=BB=8D=E7=84=B6?= =?UTF-8?q?=E8=83=BD=E9=A1=AF=E7=A4=BA=20fix:=20=E4=BF=AE=E5=BE=A9resize?= =?UTF-8?q?=20=E6=99=82=EF=BC=8Ctoc=20=E7=9A=84=E4=BD=8D=E7=BD=AE=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=20fix:=20=E4=BF=AE=E5=BE=A9=E7=95=B6aside=20mobile?= =?UTF-8?q?=E8=A8=AD=E7=82=BAfalse=E6=99=82=EF=BC=8C=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E9=A0=81=20js=E5=A0=B1=E9=8C=AF=E7=9A=84bugs=20close=20#444?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/rightside.pug | 2 +- package.json | 2 +- source/css/_global/function.styl | 4 ++-- source/css/_layout/aside.styl | 9 +++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/layout/includes/rightside.pug b/layout/includes/rightside.pug index 2b5658f..a52f6a1 100644 --- a/layout/includes/rightside.pug +++ b/layout/includes/rightside.pug @@ -21,7 +21,7 @@ if (theme.readmode || theme.translate.enable || (theme.darkmode.enable && theme.darkmode.button) || theme.change_font_size) button#rightside_config(type="button" title=_p("rightside.setting")) i.fas.fa-cog.fa-spin - if showToc && theme.aside.mobile + if showToc button#mobile-toc-button.close(type="button" title=_p("rightside.toc")) i.fas.fa-list-ul else if theme.translate.enable || (theme.darkmode.enable && theme.darkmode.button) || theme.change_font_size diff --git a/package.json b/package.json index 1a8bda0..0a26ee2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "3.4.0-b5", + "version": "3.4.0-b6", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": { diff --git a/source/css/_global/function.styl b/source/css/_global/function.styl index 5d282d2..e77ff53 100644 --- a/source/css/_global/function.styl +++ b/source/css/_global/function.styl @@ -37,8 +37,8 @@ maxWidth900() @media screen and (max-width: 900px) {block} -maxWidth901() - @media screen and (max-width: 900px) +minWidth901() + @media screen and (min-width: 901px) {block} minWidth900() diff --git a/source/css/_layout/aside.styl b/source/css/_layout/aside.styl index 369d002..469909d 100644 --- a/source/css/_layout/aside.styl +++ b/source/css/_layout/aside.styl @@ -10,10 +10,6 @@ +maxWidth900() width: 100% - if hexo-config('aside.mobile') == false - +maxWidth768() - display: none - > .card-widget:first-child margin-top: 0 @@ -32,6 +28,11 @@ &:hover box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15) + if hexo-config('aside.mobile') == false + +maxWidth768() + &:not(#card-toc) + display: none + .card-info img width: 110px