mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-06-05 21:01:46 +08:00
fix
This commit is contained in:
@@ -619,6 +619,10 @@ subtitle:
|
||||
enable: false
|
||||
# Typewriter Effect (打字效果)
|
||||
effect: true
|
||||
# Effect Speed Options (打字效果速度參數)
|
||||
startDelay: 300 # time before typing starts in milliseconds
|
||||
typeSpeed: 150 # type speed in milliseconds
|
||||
backSpeed: 50 # backspacing speed in milliseconds
|
||||
# loop (循環打字)
|
||||
loop: true
|
||||
# source 調用第三方服務
|
||||
@@ -631,6 +635,7 @@ subtitle:
|
||||
# 如果關閉打字效果,subtitle 只會顯示 sub 的第一行文字
|
||||
sub:
|
||||
|
||||
|
||||
# Loading Animation (加載動畫)
|
||||
preloader: false
|
||||
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
- const { effect,loop,source,sub } = theme.subtitle
|
||||
- const { effect,loop,source,sub,startDelay,typeSpeed,backSpeed } = theme.subtitle
|
||||
- let subContent = sub || new Array()
|
||||
|
||||
case source
|
||||
@@ -14,10 +14,10 @@ case source
|
||||
sub.unshift(data.hitokoto, from)
|
||||
window.typed = new Typed('#subtitle', {
|
||||
strings: sub,
|
||||
startDelay: 300,
|
||||
typeSpeed: 150,
|
||||
startDelay: !{startDelay},
|
||||
typeSpeed: !{typeSpeed},
|
||||
loop: !{loop},
|
||||
backSpeed: 50,
|
||||
backSpeed: !{backSpeed},
|
||||
})
|
||||
} else {
|
||||
document.getElementById('subtitle').innerHTML = data.hitokoto
|
||||
@@ -46,10 +46,10 @@ case source
|
||||
sub.unshift(con, from)
|
||||
window.typed = new Typed('#subtitle', {
|
||||
strings: sub,
|
||||
startDelay: 300,
|
||||
typeSpeed: 150,
|
||||
startDelay: !{startDelay},
|
||||
typeSpeed: !{typeSpeed},
|
||||
loop: !{loop},
|
||||
backSpeed: 50,
|
||||
backSpeed: !{backSpeed},
|
||||
})
|
||||
} else {
|
||||
document.getElementById('subtitle').innerHTML = con
|
||||
@@ -78,10 +78,10 @@ case source
|
||||
sub.unshift(content)
|
||||
window.typed = new Typed('#subtitle', {
|
||||
strings: sub,
|
||||
startDelay: 300,
|
||||
typeSpeed: 150,
|
||||
startDelay: !{startDelay},
|
||||
typeSpeed: !{typeSpeed},
|
||||
loop: !{loop},
|
||||
backSpeed: 50,
|
||||
backSpeed: !{backSpeed},
|
||||
})
|
||||
} else {
|
||||
document.getElementById('subtitle').innerHTML = result.data.content
|
||||
@@ -107,10 +107,10 @@ case source
|
||||
if (!{effect}) {
|
||||
window.typed = new Typed("#subtitle", {
|
||||
strings: !{JSON.stringify(subContent)},
|
||||
startDelay: 300,
|
||||
typeSpeed: 150,
|
||||
startDelay: !{startDelay},
|
||||
typeSpeed: !{typeSpeed},
|
||||
loop: !{loop},
|
||||
backSpeed: 50
|
||||
backSpeed: !{backSpeed}
|
||||
})
|
||||
} else {
|
||||
document.getElementById("subtitle").innerHTML = '!{subContent[0]}'
|
||||
|
||||
Reference in New Issue
Block a user