mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:40:55 +08:00
v2.1.0
1. 可設置隱藏文章 2. 適配 Hexo 的 Tag Plugins Code Block With marked lines 顯示 3. 可配置首頁cover顯示的位置 4. 更改深色模式下的配色 5. activate_power_mode 增加關閉顏色和抖動 6. 增加谷歌廣告,騰訊分析 7. 相關文章增加時間顯示,調整佈局,垂直居中 8. 文章頁面,top_img增加評論數顯示 9. 可以取消點擊圖片觀看大圖 10. mathjax和kathex可設置每頁都加載還是按需加載 11. 深色模式下,滾動條顔色的適配 12. 優化gitalk 在 dark mode下的顯示 13. 文章頁,文章標題過長時,只顯示三行內容 14. 深色模式下,背景圖片加上蒙板 15. 優化深色/閲讀模式下,canvas的顯示 16. 優化打賞的特效和移動到二維碼不會立刻消失 17. 優化sub-menu樣式 18. 修改aside 的tags顔色,在深色模式下不會出現觀看困難 19. 升級 normalize.css 到最新版 20. 優化手機上toc和menu的打開動畫 21. 優化代碼框打開關閉的特效 22. 精簡js,部分操作改為css控制 23. 優化主題的一些動畫,不會過於生硬 1. 修復當圖片被a標簽包圍時,點擊圖標沒有跳轉到對應網頁而是出現大圖觀看模式的bug 2. 修復當網址有subdirectory時,menu、打賞二維碼和lodding_bg 鏈接路徑錯誤的bug 3. 修復當網址有subdirectory時, 4. 修復katex 的 CSS無法讀取bug 5. 修復搜索按鈕在文章頁不顯示的bug 6. 修復gitalk css引用失敗的bug 7. 修復 點擊特效 煙花 無效的bug 8. 修復gitalk報path.startsWith is not a function的bug 9. 修復 閲讀模式下,背景沒有變純色的bug 10. 修復閲讀模式下,header 偶爾出現沒有靠攏頂部的bug 11. 修復Hexo Tag Plugins Block Quote 裏的鏈接顯示出外面的Bug 12. 修復aside歸檔日期過長導致錯位的bug 13. 修復toc為空時,toc按鈕仍存在的bug 14. 修復關閉懶加載後,頭像無法顯示的bug 15. 修復深色模式下,切換readmode偶爾會無效的bug 16. 修復在一些手機設備上,toc和menu的按鈕顯示不對齊的bug #72
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
.card_widget.card-announcement
|
||||
.card-widget.card-announcement
|
||||
.card-content
|
||||
.item_headline
|
||||
.item-headline
|
||||
i.fa.fa-bullhorn.card-announcement-animation(aria-hidden="true")
|
||||
span= _p('aside.card_announcement')
|
||||
.announcement_content= theme.announcement.content
|
||||
@@ -1,6 +1,6 @@
|
||||
.card_widget.card-archives
|
||||
.card-widget.card-archives
|
||||
.card-content
|
||||
.item_headline
|
||||
.item-headline
|
||||
i.fa.fa-archive(aria-hidden="true")
|
||||
span= _p('aside.card_archives')
|
||||
div.archives_item!= list_archives({type:'monthly',format: 'YYYY年MM月'})
|
||||
!= list_archives({type:'monthly',format: 'YYYY年MM月'})
|
||||
|
||||
@@ -1,43 +1,36 @@
|
||||
.card_widget.card-author
|
||||
.card-widget.card-info
|
||||
.card-content
|
||||
.post_data
|
||||
.data-item.is_center
|
||||
img.lazyload.avatar_img(src=url_for(theme.avatar) onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||
p.author-info__name.is_center= config.author
|
||||
p.author-info__description.is_center= config.description
|
||||
.card-info-avatar.is-center
|
||||
img.avatar-img(src=url_for(theme.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.lodding_bg.flink) + `'` alt="avatar")
|
||||
.author-info__name= config.author
|
||||
.author-info__description= config.description
|
||||
|
||||
.post_data.data_config
|
||||
.card-info-data
|
||||
if site.posts.length
|
||||
.data-item.is_center
|
||||
.data_link
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
p.headline= _p('aside.articles')
|
||||
p.length_num= site.posts.length
|
||||
.card-info-data-item.is-center
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
.headline= _p('aside.articles')
|
||||
.length_num= site.posts.length
|
||||
|
||||
if site.tags.length
|
||||
.data-item.is_center
|
||||
.data_link
|
||||
a(href=url_for(config.tag_dir) + '/' )
|
||||
p.headline= _p('aside.tags')
|
||||
p.length_num= site.tags.length
|
||||
.card-info-data-item.is-center
|
||||
a(href=url_for(config.tag_dir) + '/' )
|
||||
.headline= _p('aside.tags')
|
||||
.length_num= site.tags.length
|
||||
|
||||
if site.categories.length
|
||||
.data-item.is_center
|
||||
.data_link
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
p.headline= _p('aside.categories')
|
||||
p.length_num= site.categories.length
|
||||
.card-info-data-item.is-center
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
.headline= _p('aside.categories')
|
||||
.length_num= site.categories.length
|
||||
|
||||
.post_data.is_center
|
||||
a#bookmark-it.data-item.bookmark.bookmarke--primary.bookmark--animated(href="javascript:;" title= _p('aside.card_bookmark') target="_self")
|
||||
.card-info-bookmark.is-center
|
||||
a#bookmark-it.bookmark.button--primary.button--animated(href="javascript:;" title= _p('aside.card_bookmark') target="_self")
|
||||
i.fa.fa-bookmark(aria-hidden="true")
|
||||
span= _p('aside.card_bookmark') || 'Follow Me'
|
||||
|
||||
|
||||
|
||||
if(theme.social)
|
||||
.post_data.data_config
|
||||
#aside-social-icons
|
||||
.card-info-social-icons.is-center
|
||||
each url, icon in theme.social
|
||||
a.social-icon.data-item(href=url target="_blank")
|
||||
i(class=icon)
|
||||
a.social-icon(href=url target="_blank")
|
||||
i(class=icon aria-hidden="true")
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
if site.categories.length
|
||||
.card_widget.card-categories
|
||||
.card-widget.card-categories
|
||||
.card-content
|
||||
.item_headline
|
||||
.item-headline
|
||||
i.fa.fa-folder-open(aria-hidden="true")
|
||||
span= _p('aside.card_categories')
|
||||
ul.aside_category_item
|
||||
ul.aside-category-item
|
||||
mixin displayCategories(parent = undefined)
|
||||
- site.categories.find({ parent }).sort("name").each(function(category) {
|
||||
- var childCount = site.categories.find({ parent: category._id }).count();
|
||||
li.aside_category_list
|
||||
a.aside_category_list_link(href=url_for(category.path))
|
||||
span.aside_category_list_name= category.name
|
||||
span.aside_category_list_length= category.length
|
||||
li.aside-category-list
|
||||
a.aside-category-list_link(href=url_for(category.path))
|
||||
span.aside-category-list_name= category.name
|
||||
span.aside-category-list_length= category.length
|
||||
|
||||
if childCount > 0
|
||||
ul.aside_category_item.child
|
||||
ul.aside-category-item.child
|
||||
+displayCategories(category._id)
|
||||
- })
|
||||
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
.card_widget.card-recent-post
|
||||
.card-widget.card-recent-post
|
||||
.card-content
|
||||
.item_headline
|
||||
.item-headline
|
||||
i.fa.fa-history(aria-hidden="true")
|
||||
span= _p('aside.card_recent_post')
|
||||
.aside_recent_item
|
||||
.aside-recent-item
|
||||
- site.posts.sort('date', -1).limit(5).each(function(article){
|
||||
.aside_recent_post
|
||||
.aside-recent-post
|
||||
- var link = article.link || article.path
|
||||
- var title = article.title || _p('no_title')
|
||||
a(href=url_for(link))
|
||||
- var post_cover = article.cover
|
||||
.aside_post_cover
|
||||
.aside-post-cover
|
||||
if theme.lazyload.enable
|
||||
img.aside_post_bg.lazyload(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
img.aside-post-bg.lazyload(data-src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` title=title alt=title)
|
||||
else
|
||||
img.aside_post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
div#aside_title
|
||||
.aside_post_title(href=url_for(link) title=article.title || _p('no_title'))= article.title || _p('no_title')
|
||||
img.aside-post-bg(src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` title=title alt=title)
|
||||
.aside-post-title
|
||||
.aside-post_title(href=url_for(link) title=article.title || _p('no_title'))= article.title || _p('no_title')
|
||||
if (theme.post_meta.date_type)
|
||||
- var date_type = theme.post_meta.date_type == 'updated' ? 'updated' : 'date'
|
||||
time.aside_post_meta.post-meta__date #[=date(article[date_type], config.date_format)]
|
||||
time.aside-post_meta.post-meta__date #[=date(article[date_type], config.date_format)]
|
||||
|
||||
- })
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if site.tags.length
|
||||
.card_widget.card-tags
|
||||
.card-widget.card-tags
|
||||
.card-content
|
||||
.item_headline
|
||||
.item-headline
|
||||
i.fa.fa-tags(aria-hidden="true")
|
||||
span= _p('aside.card_tags')
|
||||
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 24, amount: 200, color: true, start_color: '#999', end_color: '#000'})
|
||||
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 24, amount: 200, color: true, start_color: '#999', end_color: '#99a9bf'})
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
.card_widget.card-webinfo
|
||||
.card-widget.card-webinfo
|
||||
.card-content
|
||||
.item_headline
|
||||
.item-headline
|
||||
i.fa.fa-line-chart(aria-hidden="true")
|
||||
span= _p('aside.card_webinfo.headline')
|
||||
.webinfo
|
||||
.webinfo_item
|
||||
.webinfo_article_name= _p('aside.card_webinfo.article_name') + " :"
|
||||
.webinfo_article_count= site.posts.length
|
||||
.webinfo-item
|
||||
.webinfo-article-name= _p('aside.card_webinfo.article_name') + " :"
|
||||
.webinfo-article-count= site.posts.length
|
||||
if theme.runtimeshow.enable
|
||||
.webinfo_item
|
||||
.webinfo_runtime_name= _p('aside.card_webinfo.runtime_name') + " :"
|
||||
#webinfo_runtime_count.webinfo_runtime_count
|
||||
script#runtionshow(src=url_for(theme.CDN.runtimeshow) start_date=theme.runtimeshow.start_date)
|
||||
|
||||
.webinfo-item
|
||||
.webinfo-runtime-name= _p('aside.card_webinfo.runtime_name') + " :"
|
||||
#webinfo-runtime-count.webinfo-runtime-count(start_date=theme.runtimeshow.start_date)
|
||||
if theme.busuanzi.site_uv
|
||||
.webinfo_item
|
||||
.webinfo_site_uv_name= _p('aside.card_webinfo.site_uv_name') + " :"
|
||||
.webinfo_site_uv_count#busuanzi_value_site_uv
|
||||
.webinfo-item
|
||||
.webinfo-site-uv-name= _p('aside.card_webinfo.site_uv_name') + " :"
|
||||
.webinfo-site-uv-count#busuanzi_value_site_uv
|
||||
if theme.busuanzi.site_pv
|
||||
.webinfo_item
|
||||
.webinfo_site_name= _p('aside.card_webinfo.site_pv_name') + " :"
|
||||
.webinfo_site_pv_count#busuanzi_value_site_pv
|
||||
.webinfo-item
|
||||
.webinfo-site-name= _p('aside.card_webinfo.site_pv_name') + " :"
|
||||
.webinfo-site-pv-count#busuanzi_value_site_pv
|
||||
|
||||
|
||||
21
layout/includes/widget/index.pug
Normal file
21
layout/includes/widget/index.pug
Normal file
@@ -0,0 +1,21 @@
|
||||
if theme.aside.card_author
|
||||
include ./card_author.pug
|
||||
|
||||
if theme.aside.card_announcement
|
||||
include ./card_announcement.pug
|
||||
|
||||
if theme.aside.card_recent_post
|
||||
include ./card_recent_post.pug
|
||||
|
||||
if theme.aside.card_categories
|
||||
include ./card_categories.pug
|
||||
|
||||
if theme.aside.card_tags
|
||||
include ./card_tags.pug
|
||||
|
||||
if theme.aside.card_archives
|
||||
include ./card_archives.pug
|
||||
|
||||
if theme.aside.card_webinfo
|
||||
include ./card_webinfo.pug
|
||||
|
||||
Reference in New Issue
Block a user