feat: 可配置 typed.js 的參數 closed #1154

fix: 修復 typeJSFn 重複賦值的 bug
fix: 修復固定狀態欄後,標題有陰影的 bug
fix: 修復 gallery 標籤將圖片鏈接截斷導致404無法加載圖片的 bug closed #1160
fix: 修復開啟導航欄固定後,點擊部分滾動向上的按鈕,滾動的目標部分被導航欄遮擋的 bug closed #1158
fix: 修復固定導航欄後,toc 被遮擋的 closed #1159
fix: 切換簡繁時,會改變 html 的 lang 屬性
This commit is contained in:
Jerry
2023-01-17 14:46:55 +08:00
Unverified
parent 929a5608d3
commit 396fb102da
7 changed files with 108 additions and 112 deletions

View File

@@ -122,7 +122,8 @@ const btf = {
scrollToDest: (pos, time = 500) => {
const currentPos = window.pageYOffset
if (currentPos > pos) pos = pos - 70
const isNavFixed = document.getElementById('page-header').classList.contains('fixed')
if (currentPos > pos || isNavFixed) pos = pos - 70
if ('scrollBehavior' in document.documentElement.style) {
window.scrollTo({