From 1c759e4cf7caf067d77437d004a2c8a6f127bae6 Mon Sep 17 00:00:00 2001 From: lensferno Date: Sun, 2 Jul 2023 21:20:39 +0800 Subject: [PATCH] patch --- layout/archive.pug | 54 +++----------------------------------- layout/includes/layout.pug | 5 +++- layout/page.pug | 6 ++--- layout/post.pug | 2 -- 4 files changed, 10 insertions(+), 57 deletions(-) diff --git a/layout/archive.pug b/layout/archive.pug index aa07988..190bc53 100644 --- a/layout/archive.pug +++ b/layout/archive.pug @@ -1,54 +1,6 @@ - extends includes/layout.pug block content - - var categoriesList = list_categories({ show_count: false }) - - var tagsList = list_tags({ show_count: false }) - - var archivesList = list_archives({ show_count: false }) - - div.archive - if !is_year() - - h1 Archives - - if theme.atom - p The feed is available via  - a(href=theme.atom) atom - span . - br - - aside - h2 Categories - if categoriesList - != categoriesList - else - p None. - br - - aside - h2 Tags - if tagsList - != tagsList - else - p None. - br - - aside - h2 Archives - if archivesList - != archivesList - else - p None. - br - - else - - h1= page.month + '/' + page.year - - - page.posts.each(function(article){ - .archive-list-item - a(href=url_for(article.path))= article.title - time(datetime=date_xml(article.date))= date(article.date) - - }) - - #paginator!= paginator() + .index-content + include includes/_partials/left_declaration.pug + include includes/_partials/post_list/post_list.pug diff --git a/layout/includes/layout.pug b/layout/includes/layout.pug index be97d12..f65c393 100644 --- a/layout/includes/layout.pug +++ b/layout/includes/layout.pug @@ -37,7 +37,10 @@ html(lang=config.language) block content .right-content +information_card({name: '全站总字数', value: totalcount(site)}) - + //- if is_page() || is_post() + //- .toc + //- != toc(page.content) + footer#footer.footer include ./_partials/footer.pug .bottom-declaration diff --git a/layout/page.pug b/layout/page.pug index 882eaf7..24f197d 100644 --- a/layout/page.pug +++ b/layout/page.pug @@ -9,7 +9,8 @@ block content .article-container .article-header - const has_cover = (page.cover !== undefined && page.cover !== null && page.cover != '') - img.post-cover(src=has_cover ? page.cover : "/img/no_image.svg") + a.cover-container(data-fancybox data-src=page.cover) + img.post-cover(src=has_cover ? page.cover : "/img/no_image.svg") .article-info span.article-title= page.title @@ -32,7 +33,7 @@ block content span.author #{author} hr - .main-content + #main-content.main-content != page.content hr @@ -47,4 +48,3 @@ block content pageview: true, path: document.location.pathname, }); - \ No newline at end of file diff --git a/layout/post.pug b/layout/post.pug index 754a070..24f197d 100644 --- a/layout/post.pug +++ b/layout/post.pug @@ -48,5 +48,3 @@ block content pageview: true, path: document.location.pathname, }); - - \ No newline at end of file