mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
feat: 主頁文章時間和文章頁文章時間可以配置顯示日期還是相對時間 feat: top_img 可配置 [留空(默認色)/顏色/漸變色/圖片鏈接/ false(不顯示top_img)] feat: footer可配置背景 [留空/false(默認色)/顏色/漸變色/圖片鏈接/true(跟top_img一樣)] improvement: preloader 在 pjax 下 每個頁面都會加載 improvement: 修改判斷,避免用户設置2個lightbox 而導致報錯(只能設置一個) improvement: 精確時間顯示 (剛剛/幾分鐘前/幾小時前/幾天前/幾個月前) improvement: 刪除不必要的語言文件和css chore: update hexo-renderer-stylus to 2.0.1
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
- var hideAside = !theme.aside.enable || page.aside === false ? 'hide-aside' : ''
|
|
|
|
doctype html
|
|
html(lang=config.language data-theme=theme.display_mode)
|
|
head
|
|
include ./head.pug
|
|
body
|
|
if theme.preloader
|
|
!=partial('includes/loading/loading', {}, {cache:theme.fragment_cache})
|
|
|
|
!=partial('includes/mobile-sidebar/index', {}, {cache:theme.fragment_cache})
|
|
|
|
#body-wrap
|
|
if theme.background
|
|
- var is_photo = theme.background.startsWith('url') ? 'photo':'color'
|
|
#web_bg(data-type=is_photo)
|
|
|
|
include ./sidebar.pug
|
|
include ./header/index.pug
|
|
|
|
if (!is_post())
|
|
main#content-inner.layout_page(class=hideAside)
|
|
if body
|
|
div!= body
|
|
else
|
|
block content
|
|
if theme.aside.enable && page.aside !== false
|
|
!=partial('includes/widget/index', {}, {cache:theme.fragment_cache})
|
|
else
|
|
main#content-inner.layout_post
|
|
if body
|
|
div!= body
|
|
else
|
|
block content
|
|
|
|
- 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:theme.fragment_cache})
|
|
|
|
include ./rightside.pug
|
|
!=partial('includes/third-party/search/index', {}, {cache:theme.fragment_cache})
|
|
include ./additional-js.pug |