mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-03 22:22:00 +08:00
Merge branch 'dev'
This commit is contained in:
commit
dcb35181fc
7 files changed
+27
-14
No files matched your search
@@ -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
|
||||||
|
|||||||
@@ -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')
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "5.4.2",
|
"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": {
|
||||||
|
|||||||
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user