mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
feat: 可配置最新評論的緩存時間 fix: 修復pjax下不會跳轉404頁面的bug fix: 修復手持設備橫向翻轉時,menu 沒有進行判斷,而導致樣式錯亂的bug fix: 修復文字點擊關閉random無效的bug fix: 修復子目錄下,打賞圖片跳轉鏈接會錯誤的bug improvement: 文章版權右上角改為 版權icon improvement: pangu的操作範圍增大到 body-wrap裏的內容 improvement: pug 判斷優化 improvement: 最新評論js優化 remove: 移除 fragment_cache 配置(默認開啟) remove: 移除百度推送(百度已棄用)和百度轉碼
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
- var htmlClassHideAside = theme.aside.enable && theme.aside.hide ? 'hide-aside' : ''
|
|
- var hideAside = !theme.aside.enable || page.aside === false ? 'hide-aside' : ''
|
|
- var pageType = is_post() ? 'post' : 'page'
|
|
|
|
doctype html
|
|
html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside)
|
|
head
|
|
include ./head.pug
|
|
body
|
|
if theme.preloader
|
|
!=partial('includes/loading/loading', {}, {cache: true})
|
|
|
|
if theme.background
|
|
#web_bg
|
|
|
|
!=partial('includes/sidebar', {}, {cache: true})
|
|
|
|
#body-wrap(class=pageType)
|
|
include ./header/index.pug
|
|
|
|
main#content-inner.layout(class=hideAside)
|
|
if body
|
|
div!= body
|
|
else
|
|
block content
|
|
if theme.aside.enable && page.aside !== false
|
|
include widget/index.pug
|
|
|
|
- var footerBg = theme.footer_bg
|
|
if (footerBg)
|
|
if (footerBg === true)
|
|
- var footer_bg = bg_img
|
|
else
|
|
- var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url('${url_for(footerBg)}')` : `background: ${footerBg}`
|
|
else
|
|
- var footer_bg = ''
|
|
|
|
footer#footer(style=footer_bg)
|
|
!=partial('includes/footer', {}, {cache: true})
|
|
|
|
include ./rightside.pug
|
|
!=partial('includes/third-party/search/index', {}, {cache: true})
|
|
include ./additional-js.pug |