diff --git a/layout/includes/head.pug b/layout/includes/head.pug index ddbb16f..696306f 100644 --- a/layout/includes/head.pug +++ b/layout/includes/head.pug @@ -34,8 +34,9 @@ if theme.disable_baidu_transformation if page.hide == true meta(name="robots" content="noindex") -if theme.douban.meta && (is_current('/movies/', [strict]) || is_current('/books/', [strict]) || is_current('/games/', [strict])) - meta(name="referrer" content="no-referrer") +if theme.douban + if theme.douban.meta && (is_current('/movies/', [strict]) || is_current('/books/', [strict]) || is_current('/games/', [strict])) + meta(name="referrer" content="no-referrer") //- 預解析 !=partial('includes/head/dns_prefetch', {}, {cache:theme.fragment_cache}) diff --git a/layout/includes/header/post-info.pug b/layout/includes/header/post-info.pug index 86629b2..fd533d8 100644 --- a/layout/includes/header/post-info.pug +++ b/layout/includes/header/post-info.pug @@ -5,39 +5,44 @@ if (theme.post_meta.post.date_type) if (theme.post_meta.post.date_type === 'both') time.post-meta__date - i.fa.fa-calendar.fa-fw(aria-hidden="true") + i.fa.fa-calendar(aria-hidden="true") =' '+_p('post.created')+' '+date(page.date, config.date_format) span.post-meta__separator | - i.fa.fa-history.fa-fw(aria-hidden="true") + i.fa.fa-history(aria-hidden="true") =' '+_p('post.updated')+' '+date(page.updated, config.date_format) else - - var date_type = theme.post_meta.post.date_type === 'updated' ? 'updated' : 'date' - time.post-meta__date #[i.fa.fa-calendar.fa-fw(aria-hidden="true")] #[=date(page[date_type], config.date_format)] + - var data_type_update = theme.post_meta.post.date_type === 'updated' + - var date_type = data_type_update ? 'updated' : 'date' + - var date_icon = data_type_update ? 'fa-history' :'fa-calendar' + - var data_info = data_type_update ? _p('post.updated') : _p('post.created') + time.post-meta__date + i.fa(class=date_icon aria-hidden="true") + =' ' + data_info + ' ' + date(page[date_type], config.date_format) if (theme.post_meta.post.categories && page.categories.data.length > 0) if (theme.post_meta.post.date_type) span.post-meta__separator | span each item, index in page.categories.data - i.fa.fa-inbox.post-meta__icon.fa-fw(aria-hidden="true") + i.fa.fa-inbox.post-meta__icon(aria-hidden="true") a(href=url_for(item.path)).post-meta__categories #[=item.name] if (index < page.categories.data.length - 1) - i.fa.fa-angle-right.fa-fw(aria-hidden="true") + i.fa.fa-angle-right.post-meta__separator(aria-hidden="true") .post-meta-wordcount if (theme.wordcount && theme.wordcount.enable) - var wordCountIcon = theme.fontawesome_v5 && theme.fontawesome_v5.enable ? 'far fa-file-word' : 'fa fa-file-word-o' - i.post-meta__icon.fa-fw(class=wordCountIcon aria-hidden="true") + i.post-meta__icon(class=wordCountIcon aria-hidden="true") span= _p('post.wordcount') + ':' span.word-count= wordcount(page.content) span.post-meta__separator | - var readCountIcon = theme.fontawesome_v5 && theme.fontawesome_v5.enable ? 'far fa-clock' : 'fa fa-clock-o' - i.post-meta__icon.fa-fw(class=readCountIcon aria-hidden="true") + i.post-meta__icon(class=readCountIcon aria-hidden="true") span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160})) .post-meta-pv-cv if (theme.wordcount && theme.wordcount.enable && theme.busuanzi.page_pv) span.post-meta__separator | if theme.busuanzi.page_pv - i.fa.fa-eye.post-meta__icon.fa-fw(aria-hidden="true") + i.fa.fa-eye.post-meta__icon(aria-hidden="true") span=_p('post.page_pv') + ':' span#busuanzi_value_page_pv @@ -45,21 +50,21 @@ if ((theme.disqus && theme.disqus.enable && theme.disqus.count && page.comments !== false) || (theme.disqusjs && theme.disqusjs.enable && theme.disqusjs.count && page.comments !== false)) if (theme.busuanzi && theme.busuanzi.page_pv) span.post-meta__separator | - i.post-meta__icon.fa-fw(class=commentCount aria-hidden="true") + i.post-meta__icon(class=commentCount aria-hidden="true") span= _p('post.comments') + ':' span.disqus-comment-count.comment-count a(href=full_url_for(page.path) + '#disqus_thread') if (theme.valine && theme.valine.enable && theme.valine.count && page.comments !== false) if (theme.busuanzi && theme.busuanzi.page_pv) span.post-meta__separator | - i.post-meta__icon.fa-fw(class=commentCount aria-hidden="true") + i.post-meta__icon(class=commentCount aria-hidden="true") span= _p('post.comments') + ':' a(href=url_for(page.path) + '#post-comment' itemprop="discussionUrl") span.valine-comment-count.comment-count(data-xid=url_for(page.path) itemprop="commentCount") if (theme.gitalk && theme.gitalk.enable && theme.gitalk.count && page.comments !== false) if (theme.busuanzi && theme.busuanzi.page_pv) span.post-meta__separator | - i.post-meta__icon.fa-fw(class=commentCount aria-hidden="true") + i.post-meta__icon(class=commentCount aria-hidden="true") span= _p('post.comments') + ':' a(href=url_for(page.path) + '#post-comment') span.gitalk-comment-count.comment-count diff --git a/layout/includes/mixins/UI.pug b/layout/includes/mixins/UI.pug index 6292c82..be072ec 100644 --- a/layout/includes/mixins/UI.pug +++ b/layout/includes/mixins/UI.pug @@ -19,14 +19,17 @@ mixin UI_NEW(posts) if (theme.post_meta.page.date_type) if (theme.post_meta.page.date_type === 'both') time.post-meta__date - i.fa.fa-calendar.fa-fw(aria-hidden="true") - =date(page.date, config.date_format) + i.fa.fa-calendar(aria-hidden="true") + =date(article.date, config.date_format) span.article-meta__separator | - i.fa.fa-history.fa-fw(aria-hidden="true") - =date(page.updated, config.date_format) + i.fa.fa-history(aria-hidden="true") + =date(article.updated, config.date_format) else - - var date_type = theme.post_meta.post.date_type === 'updated' ? 'updated' : 'date' - time.post-meta__date #[i.fa.fa-calendar.fa-fw(aria-hidden="true")]#[=date(page[date_type], config.date_format)] + - var date_type = theme.post_meta.page.date_type === 'updated' ? 'updated' : 'date' + - var date_icon = theme.post_meta.page.date_type === 'updated' ? 'fa-history' :'fa-calendar' + time.post-meta__date + i.fa(class=date_icon aria-hidden="true") + =date(article[date_type], config.date_format) if (theme.post_meta.page.categories && article.categories.data.length > 0) span.article-meta span.article-meta__separator | diff --git a/layout/includes/recent-posts.pug b/layout/includes/recent-posts.pug index 091bbd1..b5a27bd 100644 --- a/layout/includes/recent-posts.pug +++ b/layout/includes/recent-posts.pug @@ -23,14 +23,17 @@ each article , index in page.posts.data if (theme.post_meta.page.date_type) if (theme.post_meta.page.date_type === 'both') time.post-meta__date - i.fa.fa-calendar.fa-fw(aria-hidden="true") - =date(page.date, config.date_format) + i.fa.fa-calendar(aria-hidden="true") + =date(article.date, config.date_format) span.article-meta__separator | - i.fa.fa-history.fa-fw(aria-hidden="true") - =date(page.updated, config.date_format) + i.fa.fa-history(aria-hidden="true") + =date(article.updated, config.date_format) else - - var date_type = theme.post_meta.post.date_type === 'updated' ? 'updated' : 'date' - time.post-meta__date #[i.fa.fa-calendar.fa-fw(aria-hidden="true")]#[=date(page[date_type], config.date_format)] + - var date_type = theme.post_meta.page.date_type === 'updated' ? 'updated' : 'date' + - var date_icon = theme.post_meta.page.date_type === 'updated' ? 'fa-history' :'fa-calendar' + time.post-meta__date + i.fa(class=date_icon aria-hidden="true") + =date(article[date_type], config.date_format) if (theme.post_meta.page.categories && article.categories.data.length > 0) span.article-meta span.article-meta__separator | @@ -53,6 +56,4 @@ each article , index in page.posts.data - content.length > theme.auto_excerpt.length ? expert += ' ...' : '' .content!= expert else - .content!= article.description - - + .content!= article.description \ No newline at end of file diff --git a/source/css/_layout/head.styl b/source/css/_layout/head.styl index 33e5f1e..8991e0d 100644 --- a/source/css/_layout/head.styl +++ b/source/css/_layout/head.styl @@ -101,6 +101,8 @@ -webkit-box-orient: vertical #post-meta + font-size: 95% + .word-count, #busuanzi_value_page_pv, .comment-count