Compare commits

..

8 Commits
5.4.1 ... 5.4.3

12 changed files with 38 additions and 23 deletions

View File

@@ -22,9 +22,9 @@ if nav
- const sinceYear = owner.since - const sinceYear = owner.since
span.copyright span.copyright
if sinceYear && sinceYear != currentYear if sinceYear && sinceYear != currentYear
!= `©${sinceYear} - ${currentYear} By ${config.author}` != `© ${sinceYear} - ${currentYear} By ${config.author}`
else else
!= `©${currentYear} By ${config.author}` != `© ${currentYear} By ${config.author}`
if copyright.enable if copyright.enable
- const v = copyright.version ? getVersion() : false - const v = copyright.version ? getVersion() : false
span.framework-info span.framework-info

View File

@@ -14,6 +14,7 @@ script.
const $body = document.body const $body = document.body
const preloader = { const preloader = {
endLoading: () => { endLoading: () => {
if ($loadingBox.classList.contains('loaded')) return
$body.style.overflow = '' $body.style.overflow = ''
$loadingBox.classList.add('loaded') $loadingBox.classList.add('loaded')
}, },
@@ -24,7 +25,15 @@ script.
} }
preloader.initLoading() preloader.initLoading()
window.addEventListener('load', preloader.endLoading)
if (document.readyState === 'complete') {
preloader.endLoading()
} else {
window.addEventListener('load', preloader.endLoading)
document.addEventListener('DOMContentLoaded', preloader.endLoading)
// Add timeout protection: force end after 7 seconds
setTimeout(preloader.endLoading, 7000)
}
if (!{theme.pjax && theme.pjax.enable}) { if (!{theme.pjax && theme.pjax.enable}) {
btf.addGlobalFn('pjaxSend', preloader.initLoading, 'preloader_init') btf.addGlobalFn('pjaxSend', preloader.initLoading, 'preloader_init')

View File

@@ -1,5 +1,5 @@
script. script.
(() = { (() => {
const abcjsInit = () => { const abcjsInit = () => {
const abcjsFn = () => { const abcjsFn = () => {
setTimeout(() => { setTimeout(() => {

View File

@@ -18,7 +18,9 @@ script.
includeReply: false includeReply: false
}).then(function (res) { }).then(function (res) {
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => { document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
item.textContent = res[index].count if (res[index]) {
item.textContent = res[index].count
}
}) })
}).catch(function (err) { }).catch(function (err) {
console.log(err) console.log(err)

View File

@@ -3,7 +3,7 @@
script. script.
(() => { (() => {
const isShuoshuo = GLOBAL_CONFIG_SITE.pageType === 'shuoshuo' const isShuoshuo = GLOBAL_CONFIG_SITE.pageType === 'shuoshuo'
const option = !{JSON.stringify(option)} const options = !{JSON.stringify(option)}
const loadScript = src => { const loadScript = src => {
const script = document.createElement('script') const script = document.createElement('script')
@@ -42,8 +42,8 @@ script.
host: '!{host}', host: '!{host}',
site_id: '!{siteId}', site_id: '!{siteId}',
theme: document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light', theme: document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light',
...option, ...options,
url: isShuoshuo ? window.location.origin + path : (option && option.url) || window.location.origin + window.location.pathname url: isShuoshuo ? window.location.origin + path : (options && options.url) || window.location.origin + window.location.pathname
} }
if (window.REMARK42) { if (window.REMARK42) {

View File

@@ -1,6 +1,6 @@
{ {
"name": "hexo-theme-butterfly", "name": "hexo-theme-butterfly",
"version": "5.4.1", "version": "5.4.3",
"description": "A Simple and Card UI Design theme for Hexo", "description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json", "main": "package.json",
"scripts": { "scripts": {

View File

@@ -9,7 +9,7 @@ activate_power_mode:
algolia_search: algolia_search:
name: algoliasearch name: algoliasearch
file: dist/lite/builds/browser.umd.js file: dist/lite/builds/browser.umd.js
version: 5.30.0 version: 5.34.1
aplayer_css: aplayer_css:
name: aplayer name: aplayer
file: dist/APlayer.min.css file: dist/APlayer.min.css
@@ -80,12 +80,12 @@ egjs_infinitegrid:
fancybox: fancybox:
name: '@fancyapps/ui' name: '@fancyapps/ui'
file: dist/fancybox/fancybox.umd.js file: dist/fancybox/fancybox.umd.js
version: 6.0.7 version: 6.0.17
other_name: fancyapps-ui other_name: fancyapps-ui
fancybox_css: fancybox_css:
name: '@fancyapps/ui' name: '@fancyapps/ui'
file: dist/fancybox/fancybox.css file: dist/fancybox/fancybox.css
version: 6.0.7 version: 6.0.17
other_name: fancyapps-ui other_name: fancyapps-ui
fireworks: fireworks:
name: butterfly-extsrc name: butterfly-extsrc
@@ -111,7 +111,7 @@ instantpage:
instantsearch: instantsearch:
name: instantsearch.js name: instantsearch.js
file: dist/instantsearch.production.min.js file: dist/instantsearch.production.min.js
version: 4.79.0 version: 4.79.2
katex: katex:
name: katex name: katex
file: dist/katex.min.css file: dist/katex.min.css
@@ -137,7 +137,7 @@ medium_zoom:
mermaid: mermaid:
name: mermaid name: mermaid
file: dist/mermaid.min.js file: dist/mermaid.min.js
version: 11.8.0 version: 11.9.0
meting_js: meting_js:
name: butterfly-extsrc name: butterfly-extsrc
file: metingjs/dist/Meting.min.js file: metingjs/dist/Meting.min.js
@@ -203,9 +203,9 @@ waline_css:
name: '@waline/client' name: '@waline/client'
file: dist/waline.css file: dist/waline.css
other_name: waline other_name: waline
version: 3.5.7 version: 3.6.0
waline_js: waline_js:
name: '@waline/client' name: '@waline/client'
file: dist/waline.js file: dist/waline.js
other_name: waline other_name: waline
version: 3.5.7 version: 3.6.0

View File

@@ -11,7 +11,7 @@
.fontawesomeIcon .fontawesomeIcon
display: inline-block display: inline-block
font-weight: 600 font-weight: 600
font-family: 'Font Awesome 6 Free' font-family: 'Font Awesome 7 Free', 'Font Awesome 6 Free'
text-rendering: auto text-rendering: auto
-webkit-font-smoothing: antialiased -webkit-font-smoothing: antialiased

View File

@@ -222,3 +222,7 @@ blockquote
& > :last-child & > :last-child
margin-bottom: 0 !important margin-bottom: 0 !important
.fa-fw
width: 1.25em
text-align: center

View File

@@ -23,8 +23,8 @@
&:not(#card-toc) &:not(#card-toc)
display: none display: none
&:last-child // &:last-child
margin-bottom: 0 // margin-bottom: 0
.card-info .card-info
.author-info .author-info