Skip to content

Commit

Permalink
feat: 當設置aside mobile為false時,toc仍然能顯示
Browse files Browse the repository at this point in the history
fix: 修復resize 時,toc 的位置問題
fix: 修復當aside mobile設為false時,文章頁 js報錯的bugs close jerryc127#444
  • Loading branch information
jerryc127 committed Dec 11, 2020
1 parent ecca262 commit 6fda7ef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion layout/includes/rightside.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_global/function.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 5 additions & 4 deletions source/css/_layout/aside.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
+maxWidth900()
width: 100%

if hexo-config('aside.mobile') == false
+maxWidth768()
display: none

> .card-widget:first-child
margin-top: 0

Expand All @@ -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
Expand Down

0 comments on commit 6fda7ef

Please sign in to comment.