update theme to butterfly

This commit is contained in:
2026-01-05 19:48:25 +08:00
parent a2934b5576
commit 9619cab07b
33 changed files with 440 additions and 999 deletions

View File

@@ -14,9 +14,9 @@ if choose
else
- pjaxSelectors.unshift('meta[name="description"]')
script(src=url_for(theme.asset.pjax))
script(src=url_for(theme.asset.pjax) defer)
script.
(() => {
document.addEventListener('DOMContentLoaded', () => {
const pjaxSelectors = !{JSON.stringify(pjaxSelectors)}
window.pjax = new Pjax({
@@ -65,10 +65,9 @@ script.
document.addEventListener('pjax:error', e => {
if (e.request.status === 404) {
const usePjax = !{theme.pjax && theme.pjax.enable}
!{theme.error_404 && theme.error_404.enable}
? (usePjax ? pjax.loadUrl('!{url_for("/404.html")}') : window.location.href = '!{url_for("/404.html")}')
? pjax.loadUrl('!{url_for("/404.html")}')
: window.location.href = e.request.responseURL
}
})
})()
})