mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
✨ 增加mac light 代碼框 ✨ 增加文章過期提醒配置 ✨ 文章copyright 可單獨配置 ✨ card-category 中category名稱和數字限制一行顯示 ✨ 簡繁轉換優化,placeholder文字也會被轉換 🐛 修復配置PWA參數時,如果網站是子目錄時,會出現加載不到文件的bugs 調整當card-category有收縮按鈕時的顯示佈局
91 lines
4.2 KiB
Plaintext
91 lines
4.2 KiB
Plaintext
#post-info
|
|
#post-title
|
|
.posttitle= page.title || _p('no_title')
|
|
|
|
#post-meta
|
|
.meta-firstline
|
|
if (theme.post_meta.post.date_type)
|
|
if (theme.post_meta.post.date_type === 'both')
|
|
time.post-meta__date
|
|
span.post-meta__date-created(title= _p('post.created')+' '+full_date(page.date))
|
|
i.far.fa-calendar-alt.fa-fw
|
|
=' '+_p('post.created')+' '+date(page.date, config.date_format)
|
|
span.post-meta__separator |
|
|
span.post-meta__date-updated(title= _p('post.updated')+' '+full_date(page.updated))
|
|
i.fas.fa-history.fa-fw
|
|
=' '+_p('post.updated')+' '+date(page.updated, config.date_format)
|
|
else
|
|
- 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 ? 'fas fa-history' :'far fa-calendar-alt'
|
|
- var data_info = data_type_update ? _p('post.updated') : _p('post.created')
|
|
time.post-meta__date(title=data_info + ' ' + full_date(page[date_type]))
|
|
i.fa-fw(class=date_icon)
|
|
=' ' + data_info + ' ' + date(page[date_type], config.date_format)
|
|
|
|
if (theme.post_meta.post.categories && page.categories.data.length > 0)
|
|
span.post-meta__categories
|
|
if (theme.post_meta.post.date_type)
|
|
span.post-meta__separator |
|
|
|
|
each item, index in page.categories.data
|
|
i.fas.fa-inbox.fa-fw.post-meta__icon
|
|
a(href=url_for(item.path)).post-meta__categories #[=item.name]
|
|
if (index < page.categories.data.length - 1)
|
|
i.fas.fa-angle-right.post-meta__separator
|
|
|
|
.meta-secondline
|
|
- let postWordcount = theme.wordcount.enable && (theme.wordcount.post_wordcount || theme.wordcount.min2read)
|
|
if (postWordcount)
|
|
span.post-meta-wordcount
|
|
if theme.wordcount.post_wordcount
|
|
i.far.fa-file-word.fa-fw.post-meta__icon
|
|
span= _p('post.wordcount') + ':'
|
|
span.word-count= wordcount(page.content)
|
|
if theme.wordcount.min2read
|
|
span.post-meta__separator |
|
|
if theme.wordcount.min2read
|
|
i.far.fa-clock.fa-fw.post-meta__icon
|
|
span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160}))
|
|
|
|
.meta-thirdline
|
|
span.post-meta-pv-cv
|
|
if (postWordcount && theme.busuanzi.page_pv)
|
|
span.post-meta__separator |
|
|
if theme.busuanzi.page_pv
|
|
i.far.fa-eye.fa-fw.post-meta__icon
|
|
span=_p('post.page_pv') + ':'
|
|
span#busuanzi_value_page_pv
|
|
|
|
if page.comments !== false && theme.comments.use && theme.comments.count
|
|
span.post-meta-commentcount
|
|
|
|
- let whichCount = theme.comments.use[0]
|
|
if whichCount === 'Disqus' || whichCount === 'Disqusjs'
|
|
if (postWordcount || theme.busuanzi.page_pv)
|
|
span.post-meta__separator |
|
|
i.far.fa-comments.fa-fw.post-meta__icon
|
|
span= _p('post.comments') + ':'
|
|
span.disqus-comment-count.comment-count
|
|
a(href=full_url_for(page.path) + '#disqus_thread')
|
|
else if whichCount === 'Valine'
|
|
if (postWordcount || theme.busuanzi.page_pv)
|
|
span.post-meta__separator |
|
|
i.far.fa-comments.fa-fw.post-meta__icon
|
|
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")
|
|
else if whichCount === 'Gitalk'
|
|
if (postWordcount || theme.busuanzi.page_pv)
|
|
span.post-meta__separator |
|
|
i.far.fa-comments.fa-fw.post-meta__icon
|
|
span= _p('post.comments') + ':'
|
|
a(href=url_for(page.path) + '#post-comment')
|
|
span.gitalk-comment-count.comment-count
|
|
else if whichCount === 'Facebook Comments'
|
|
if (postWordcount || theme.busuanzi.page_pv)
|
|
span.post-meta__separator |
|
|
i.far.fa-comments.fa-fw.post-meta__icon
|
|
span= _p('post.comments') + ':'
|
|
a.comment-count(href=url_for(page.path) + '#post-comment')
|
|
span.fb-comments-count(data-href=urlNoIndex()) |