You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.4 KiB

1 year ago
- var pageTitle = page.title || config.subtitle || ''
- if (is_archive()) pageTitle = 'Archives'
- if (is_tag()) pageTitle = 'Tag: ' + page.tag
- if (is_category()) pageTitle = 'Category: ' + page.category
- if (is_month()) pageTitle += ': ' + page.month + '/' + page.year
- if (is_year()) pageTitle += ': ' + page.year
- pageTitle += ' [ ' + config.title + ' ]'
1 year ago
include _partials/information_card.pug
1 year ago
doctype html
1 year ago
html(lang=config.language)
1 year ago
head
meta(charset='UTF-8')
title= pageTitle
1 year ago
//- script(src="/js/lazysizes.min.js")
1 year ago
if theme.stylesheets !== undefined && theme.stylesheets.length > 0
//- stylesheets list from _config.yml
each url in theme.stylesheets
link(rel='stylesheet', href=url)
1 year ago
if is_post() || is_page()
link(rel="stylesheet", href="/css/highlight.css")
1 year ago
link(rel="stylesheet", href="https://unpkg.com/@waline/client@v2/dist/waline.css")
1 year ago
link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css")
script(src="/js/util.js")
1 year ago
body
1 year ago
#container.container
1 year ago
header#header.header
1 year ago
include ./_partials/header.pug
1 year ago
.bottom-declaration
.bottom-declaration-line
.bottom-declaration-dotted
1 year ago
1 year ago
main#main.main
1 year ago
block content
.right-content
+information_card({name: '全站总字数', value: totalcount(site)})
1 year ago
1 year ago
footer#footer.footer
1 year ago
include ./_partials/footer.pug
.bottom-declaration
.bottom-declaration-line
.bottom-declaration-dotted
1 year ago
//- 这段script一定要放在body结束前,否则lazyload不生效
1 year ago
script(src="/js/lazyload.min.js")
script.
window.lazyLoad = new LazyLoad({
elements_selector: 'img',
threshold: 0
});
1 year ago
script(src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js")
script.
let postImageElements = document.querySelectorAll('.main-content img');
postImageElements.forEach(element => {
if (element.parentNode.tagName !== 'A') {
const dataSrc = element.getAttribute("data-src")
const dataCaption = element.title || element.alt || ''
utils.wrapElement(element, 'a', { href: dataSrc, 'data-fancybox': '', 'data-caption': dataCaption, 'data-thumb': dataSrc })
}
})
Fancybox.bind('[data-fancybox]', {});
script