feat: preconnect 根據 CDN 配置引入

feat: 移除 anchor 的 button, 直接點擊標題跳轉
feat: 更改 headline 的 hover 效果
improvement: tabs content 裏最後一個元素 margin-bottom 改為 0
fix: float 浮動佈局導致評論寬度異常的 bug
This commit is contained in:
Jerry
2023-09-23 02:00:02 +08:00
Unverified
parent deccde649b
commit f9a2ad70ce
16 changed files with 109 additions and 108 deletions

View File

@@ -593,8 +593,15 @@ document.addEventListener('DOMContentLoaded', function () {
saveToLocal.set('aside-status', saveStatus, 2)
$htmlDom.toggle('hide-aside')
},
'mobile-toc-button': () => { // Show mobile toc
document.getElementById('card-toc').classList.toggle('open')
'mobile-toc-button': item => { // Show mobile toc
const tocEle = document.getElementById('card-toc')
tocEle.style.transformOrigin = `right ${item.getBoundingClientRect().top + 17}px`
tocEle.style.transition = 'transform 0.3s ease-in-out'
tocEle.classList.toggle('open')
tocEle.addEventListener('transitionend', () => {
tocEle.style.transition = ''
tocEle.style.transformOrigin = ''
}, { once: true })
},
'chat-btn': () => { // Show chat
window.chatBtnFn()