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
|
enable: false
|
||||||
# Typewriter Effect (打字效果)
|
# Typewriter Effect (打字效果)
|
||||||
effect: true
|
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 (循環打字)
|
||||||
loop: true
|
loop: true
|
||||||
# source 調用第三方服務
|
# source 調用第三方服務
|
||||||
@@ -631,6 +635,7 @@ subtitle:
|
|||||||
# 如果關閉打字效果,subtitle 只會顯示 sub 的第一行文字
|
# 如果關閉打字效果,subtitle 只會顯示 sub 的第一行文字
|
||||||
sub:
|
sub:
|
||||||
|
|
||||||
|
|
||||||
# Loading Animation (加載動畫)
|
# Loading Animation (加載動畫)
|
||||||
preloader: false
|
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()
|
- let subContent = sub || new Array()
|
||||||
|
|
||||||
case source
|
case source
|
||||||
@@ -14,10 +14,10 @@ case source
|
|||||||
sub.unshift(data.hitokoto, from)
|
sub.unshift(data.hitokoto, from)
|
||||||
window.typed = new Typed('#subtitle', {
|
window.typed = new Typed('#subtitle', {
|
||||||
strings: sub,
|
strings: sub,
|
||||||
startDelay: 300,
|
startDelay: !{startDelay},
|
||||||
typeSpeed: 150,
|
typeSpeed: !{typeSpeed},
|
||||||
loop: !{loop},
|
loop: !{loop},
|
||||||
backSpeed: 50,
|
backSpeed: !{backSpeed},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('subtitle').innerHTML = data.hitokoto
|
document.getElementById('subtitle').innerHTML = data.hitokoto
|
||||||
@@ -46,10 +46,10 @@ case source
|
|||||||
sub.unshift(con, from)
|
sub.unshift(con, from)
|
||||||
window.typed = new Typed('#subtitle', {
|
window.typed = new Typed('#subtitle', {
|
||||||
strings: sub,
|
strings: sub,
|
||||||
startDelay: 300,
|
startDelay: !{startDelay},
|
||||||
typeSpeed: 150,
|
typeSpeed: !{typeSpeed},
|
||||||
loop: !{loop},
|
loop: !{loop},
|
||||||
backSpeed: 50,
|
backSpeed: !{backSpeed},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('subtitle').innerHTML = con
|
document.getElementById('subtitle').innerHTML = con
|
||||||
@@ -78,10 +78,10 @@ case source
|
|||||||
sub.unshift(content)
|
sub.unshift(content)
|
||||||
window.typed = new Typed('#subtitle', {
|
window.typed = new Typed('#subtitle', {
|
||||||
strings: sub,
|
strings: sub,
|
||||||
startDelay: 300,
|
startDelay: !{startDelay},
|
||||||
typeSpeed: 150,
|
typeSpeed: !{typeSpeed},
|
||||||
loop: !{loop},
|
loop: !{loop},
|
||||||
backSpeed: 50,
|
backSpeed: !{backSpeed},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('subtitle').innerHTML = result.data.content
|
document.getElementById('subtitle').innerHTML = result.data.content
|
||||||
@@ -107,10 +107,10 @@ case source
|
|||||||
if (!{effect}) {
|
if (!{effect}) {
|
||||||
window.typed = new Typed("#subtitle", {
|
window.typed = new Typed("#subtitle", {
|
||||||
strings: !{JSON.stringify(subContent)},
|
strings: !{JSON.stringify(subContent)},
|
||||||
startDelay: 300,
|
startDelay: !{startDelay},
|
||||||
typeSpeed: 150,
|
typeSpeed: !{typeSpeed},
|
||||||
loop: !{loop},
|
loop: !{loop},
|
||||||
backSpeed: 50
|
backSpeed: !{backSpeed}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("subtitle").innerHTML = '!{subContent[0]}'
|
document.getElementById("subtitle").innerHTML = '!{subContent[0]}'
|
||||||
|
|||||||
Reference in New Issue
Block a user