mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
1. 更改手機頁面的menu和toc的顯示方式和顯示特效(ipad也能看TOC) 3. 可設置複製時,内容自動加上版權信息 4. 可修改tag的top_img 5. 可修改category的top_img 6. 可修改valine的背景 7. archives頁UI優化 8. ICP增加icon #37 9. 可設置主頁top_img的高度 10. 可設置主頁site-info的位置 11. category頁和tag頁的UI可以設置與主頁UI一樣 #31 12. 主頁subtitle可設置多個句子(不再限制2個) #37 13. 設置menu時,頭尾添加空格不受影響 14. 調整post頁的佈局 15. 书签添加icon 16. 公告icon效果 17. 首頁歸檔模塊,可設置數量限制,會顯示'查看更多'按鈕 18. 右下角按鈕調整。 19. 修复文章cover隨機图片生成,同一篇文章,不同地方的cover顯示不一样的bug 20. 修復gitalk語言設置無效的bug #35 21. 修復post頁面,當沒有設置word count時,閲讀量前有'|" 22. 修复sub-menu在safari的显示问题 23. 修复tags页评论居中问题 24. 修复header a hover 白色问题 25. 修復夜間模式下footer的顔色bug 26. 修復英文語言下,書簽英文顯示不完整的問題
76 lines
3.4 KiB
Plaintext
76 lines
3.4 KiB
Plaintext
extends includes/layout.pug
|
|
|
|
block top_img
|
|
- var top_img = page.top_img || page.cover || theme.post_meta.top_img || theme.post_img || theme.top_img || config.top_img
|
|
- var bg_img = top_img !== true ? `background-image: url(${top_img})` : ''
|
|
div#top-container(style=bg_img)
|
|
#post-info
|
|
#post-title
|
|
.posttitle=page.title || _p('no_title')
|
|
#post-meta
|
|
if (theme.post_meta.date_type)
|
|
if (theme.post_meta.date_type === 'both')
|
|
time.post-meta__date
|
|
i.fa.fa-calendar(aria-hidden="true")
|
|
=' '+_p('post.created')+' '+date(page.date, config.date_format)
|
|
span.post-meta__separator |
|
|
i.fa.fa-history(aria-hidden="true")
|
|
=' '+_p('post.updated')+' '+date(page.updated, config.date_format)
|
|
else
|
|
- var date_type = theme.post_meta.date_type === 'updated' ? 'updated' : 'date'
|
|
time.post-meta__date #[i.fa.fa-calendar(aria-hidden="true")] #[=date(page[date_type], config.date_format)]
|
|
|
|
if (theme.post_meta.categories && page.categories.data.length > 0)
|
|
if (theme.post_meta.date_type)
|
|
span.post-meta__separator.mobile_hidden |
|
|
span.mobile_hidden
|
|
each item, index in page.categories.data
|
|
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(aria-hidden="true")
|
|
.post-meta-wordcount
|
|
if (theme.wordcount && theme.wordcount.enable)
|
|
span= _p('post.wordcount') + ': '
|
|
span.word-count= wordcount(page.content)
|
|
span.post-meta__separator |
|
|
span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160}))
|
|
if (theme.wordcount && theme.wordcount.enable && theme.busuanzi.page_pv)
|
|
span.post-meta__separator |
|
|
if theme.busuanzi.page_pv
|
|
span= _p('post.page_pv') + ': '
|
|
span#busuanzi_value_page_pv
|
|
|
|
|
|
block content
|
|
article#post(class="")
|
|
#post-content.article-container!= page.content
|
|
if (theme.post_copyright && theme.post_copyright.enable && page.copyright != false)
|
|
.post-copyright
|
|
.post-copyright__author
|
|
span.post-copyright-meta= _p('post.copyright.author') + ": "
|
|
span.post-copyright-info
|
|
a(href=`mailto:${config.email}`) #[=config.author]
|
|
.post-copyright__type
|
|
span.post-copyright-meta= _p('post.copyright.link') + ": "
|
|
span.post-copyright-info
|
|
a(href=url_for(page.permalink)) #[=page.permalink]
|
|
.post-copyright__notice
|
|
span.post-copyright-meta= _p('post.copyright.copyright_notice') + ": "
|
|
span.post-copyright-info!= _p('post.copyright.copyright_content', theme.post_copyright.license_url, theme.post_copyright.license, config.url, config.title)
|
|
|
|
.tag_share
|
|
if (theme.post_meta.tags)
|
|
.post-meta__tag-list
|
|
each item, index in page.tags.data
|
|
a(href=url_for(item.path)).post-meta__tags #[=item.name]
|
|
include includes/share/index.pug
|
|
|
|
if theme.reward.enable
|
|
include includes/reward.pug
|
|
include includes/pagination.pug
|
|
|
|
if theme.related_post && theme.related_post.enable
|
|
!= related_posts(page,site.posts)
|
|
if page.comments !== false
|
|
include includes/comments/index.pug |