feat: 增加Twikoo評論 #402

improvement: 滾動到評論按鈕只要用評論的頁面就出現
improvement: aside狀態存localstore
fix: 修復disqusjs沒有設置api時,沒有反代的bugs
fix: 修復aside在font-matter aside為false時,收縮按鈕依舊出現和點擊按鈕會出現空白的bugs #398
This commit is contained in:
Jerry
2020-10-27 22:14:47 +08:00
Unverified
parent 6b35388f33
commit d2f5af32ae
14 changed files with 139 additions and 101 deletions

View File

@@ -8,7 +8,7 @@
font-weight: 700
font-size: 1.43em
.comment-switch
#comment-switch
display: inline-block
if hexo-config('comments.text')
@@ -30,46 +30,34 @@
.second-comment
color: $comments-switch-second-text
label
.switch-btn
position: relative
display: inline-block
margin: -4px .4rem 0
width: 42px
height: 22px
border-radius: 34px
background-color: $comments-switch-first-text
vertical-align: middle
cursor: pointer
transition: .4s
input#switch-comments-btn
width: 0
height: 0
opacity: 0
&:checked + .slider
background-color: $comments-switch-second-text
&:checked + .slider:before
transform: translateX(20px)
.slider
&:before
position: absolute
top: 0
right: 0
bottom: 0
left: 0
border-radius: 34px
background-color: $comments-switch-first-text
cursor: pointer
bottom: 4px
left: 4px
width: 14px
height: 14px
border-radius: 50%
background-color: $comments-switch-round
content: ''
transition: .4s
&.move
background-color: $comments-switch-second-text
&:before
position: absolute
bottom: 4px
left: 4px
width: 14px
height: 14px
border-radius: 50%
background-color: $comments-switch-round
content: ''
transition: .4s
transform: translateX(20px)
.comment-wrap
> div:nth-child(2)