hexo-theme-butterfly/layout/includes/layout.pug
Jerry 931a0ba82d breaking changes: archives 隱藏 aside 設置更改
feat: tag 和 category 頁面可設置隱藏 aside
feat: 子歸檔頁面顯示的文章數量不再顯示總文章數量,而是對應的子歸檔文章數量
feat: 為一些數據加載增加 loading 顯示
improvement: 修改 note 圖標 class 名字,避免第三方圖標覆蓋主題樣式
2022-06-17 01:01:46 +08:00

48 lines
1.6 KiB
Plaintext

- var htmlClassHideAside = theme.aside.enable && theme.aside.hide ? 'hide-aside' : ''
- page.aside = is_archive() ? theme.aside.display.archive: is_category() ? theme.aside.display.category : is_tag() ? theme.aside.display.tag : page.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})
if page.type !== '404'
#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})
else
include ./404.pug
include ./rightside.pug
!=partial('includes/third-party/search/index', {}, {cache: true})
include ./additional-js.pug