From 6361f28328d3ecd601d616f87d2307b0f3f32266 Mon Sep 17 00:00:00 2001 From: Ayaka <26200808+KiritaniAyaka@users.noreply.github.com> Date: Fri, 8 Jul 2022 17:42:09 +0800 Subject: [PATCH 1/5] Update head.styl --- source/css/_layout/head.styl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/css/_layout/head.styl b/source/css/_layout/head.styl index 87aa211..2a722bb 100644 --- a/source/css/_layout/head.styl +++ b/source/css/_layout/head.styl @@ -321,9 +321,11 @@ background: var(--text-bg-hover) &:first-child - border-radius: 5px 5px 0 0 + border-top-left-radius: 5px + border-top-right-radius: 5px &:last-child - border-radius: 0 0 5px 5px + border-bottom-left-radius: 5px + border-bottom-right-radius: 5px a display: inline-block padding: 8px 16px From 91641646a726665a253a71837d206c19565e6479 Mon Sep 17 00:00:00 2001 From: DreamyTZK Date: Sun, 17 Jul 2022 14:31:24 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20artalk=E8=AF=84=E8=AE=BAoption?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/third-party/comments/artalk.pug | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/includes/third-party/comments/artalk.pug b/layout/includes/third-party/comments/artalk.pug index db117f5..97a5cd5 100644 --- a/layout/includes/third-party/comments/artalk.pug +++ b/layout/includes/third-party/comments/artalk.pug @@ -1,4 +1,4 @@ -- const { server, site } = theme.artalk +- const { server, site, option } = theme.artalk script. function addArtalkSource () { @@ -10,14 +10,14 @@ script. function loadArtalk () { function initArtalk () { - window.artalkItem = new Artalk({ + window.artalkItem = new Artalk(Object.assign({ el: '#artalk-wrap', server: '!{server}', site: '!{site}', pageKey: location.pathname, darkMode: document.documentElement.getAttribute('data-theme') === 'dark', countEl: '.artalk-count' - }) + },!{JSON.stringify(option)})) } if (typeof window.artalkItem === 'object') setTimeout(()=>{initArtalk()},200) From 26f2c1b4e30778e1eb0625e5cc21b2d146cf734d Mon Sep 17 00:00:00 2001 From: Dylan Lin Date: Fri, 12 Aug 2022 17:15:32 +0800 Subject: [PATCH 3/5] feat: Support typewriter effect speed options of Subtitle in _config.yml --- layout/includes/third-party/subtitle.pug | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/layout/includes/third-party/subtitle.pug b/layout/includes/third-party/subtitle.pug index 63915ec..d7cec58 100644 --- a/layout/includes/third-party/subtitle.pug +++ b/layout/includes/third-party/subtitle.pug @@ -1,4 +1,7 @@ - const { effect,loop,source,sub } = theme.subtitle +- const startDelay = theme.subtitle.startDelay ?? 300 +- const typeSpeed = theme.subtitle.typeSpeed ?? 150 +- const backSpeed = theme.subtitle.backSpeed ?? 50 - let subContent = sub || new Array() case source @@ -14,10 +17,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 +49,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 +81,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 +110,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]}' From d12f5be271abb03be443d0e5219a8a94e15eef44 Mon Sep 17 00:00:00 2001 From: Dylan Lin Date: Sat, 13 Aug 2022 02:29:20 +0800 Subject: [PATCH 4/5] docs: add default Effect Speed Options of Subtitle in _config.yml --- _config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_config.yml b/_config.yml index dcafa69..a5ffaba 100644 --- a/_config.yml +++ b/_config.yml @@ -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 From 8cfa1665b9c8795461c8adb7945e4a8445d3db4b Mon Sep 17 00:00:00 2001 From: Jerry Wong Date: Sat, 13 Aug 2022 12:59:53 +0800 Subject: [PATCH 5/5] Update subtitle.pug --- layout/includes/third-party/subtitle.pug | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/layout/includes/third-party/subtitle.pug b/layout/includes/third-party/subtitle.pug index d7cec58..9236757 100644 --- a/layout/includes/third-party/subtitle.pug +++ b/layout/includes/third-party/subtitle.pug @@ -1,7 +1,4 @@ -- const { effect,loop,source,sub } = theme.subtitle -- const startDelay = theme.subtitle.startDelay ?? 300 -- const typeSpeed = theme.subtitle.typeSpeed ?? 150 -- const backSpeed = theme.subtitle.backSpeed ?? 50 +- const { effect,loop,source,sub,startDelay,typeSpeed,backSpeed } = theme.subtitle - let subContent = sub || new Array() case source