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

@@ -485,7 +485,13 @@ $(function () {
$rightsideEle.on('click', '#hide-aside-btn', () => {
const $htmlDom = $(document.documentElement)
$htmlDom.hasClass('hide-aside') ? $htmlDom.removeClass('hide-aside') : $htmlDom.addClass('hide-aside')
if ($htmlDom.hasClass('hide-aside')) {
$htmlDom.removeClass('hide-aside')
saveToLocal.set('aside-status', 'show', 2)
} else {
$htmlDom.addClass('hide-aside')
saveToLocal.set('aside-status', 'hide', 2)
}
})
/**
@@ -624,7 +630,9 @@ $(function () {
const switchComments = function () {
let switchDone = false
$('#switch-comments-btn').on('click', function () {
$('#comment-switch > .switch-btn').on('click', function () {
const $btn = $(this)
$btn.hasClass('move') ? $btn.removeClass('move') : $btn.addClass('move')
$('#post-comment > .comment-wrap > div').each(function (i, o) {
const $this = $(o)
if ($this.is(':visible')) {