Skip to content

Commit

Permalink
label: 3.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryc127 committed May 5, 2021
2 parents 637da07 + 92121d7 commit f4e5cef
Show file tree
Hide file tree
Showing 33 changed files with 202 additions and 185 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
![hexo version](https://img.shields.io/badge/hexo-5.0+-0e83c)
![license](https://img.shields.io/github/license/jerryc127/hexo-theme-butterfly?color=FF5531)

![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/theme-butterfly-readme.png)

Demo: 👍 [Butterfly](https://butterfly.js.org/) || 🤞 [MYW](https://immyw.com/)

Docs: 📖 [Butterfly Docs](https://butterfly.js.org/posts/21cfbf15/)
Expand Down Expand Up @@ -80,9 +82,9 @@ npm i hexo-theme-butterfly
- [X] Comment (Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo)
- [x] Multiple Comment System Support
- [x] Online Chats (Chatra/Tidio/Daovoice/Gitter/Crisp)
- [x] Web analytics (Baidu Analytics/Google Analytics/Tencent Analytics/CNZZ Analytics)
- [x] Web analytics
- [x] Google AdSense
- [x] Webmaster Verification (google/Bing/Baidu/360/Yandex)
- [x] Webmaster Verification
- [x] Change website colour scheme
- [x] Typewriter Effect: activate_power_mode
- [x] Background effects (Canvas ribbon/canvas_ribbon_piao/canvas_nest)
Expand All @@ -97,6 +99,9 @@ npm i hexo-theme-butterfly

## Screenshots

![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-1.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-2.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-3.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-4.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-1.png)

![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-2.png)
9 changes: 7 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
![hexo version](https://img.shields.io/badge/hexo-5.0+-0e83c)
![license](https://img.shields.io/github/license/jerryc127/hexo-theme-butterfly?color=FF5531)

![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/theme-butterfly-readme.png)

預覽: 👍 [Butterfly](https://butterfly.js.org/) || 🤞 [MYW](https://immyw.com/)

文檔: 📖 [Butterfly Docs](https://butterfly.js.org/posts/21cfbf15/)
Expand Down Expand Up @@ -79,7 +81,7 @@ theme: butterfly
- [X] 多種評論系統(Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo)
- [x] 支持雙評論部署
- [x] 多種在線聊天(Chatra/Tidio/Daovoice/Gitter/Crisp)
- [x] 多種分析系統(百度分析/谷歌分析/騰訊分析/CNZZ分析)
- [x] 多種分析系統
- [x] 谷歌廣告/手動廣告位置
- [x] 各種站長驗證(Google/Bing/Baidu/360/Yandex)
- [x] 修改網站配色
Expand All @@ -96,6 +98,9 @@ theme: butterfly

## 截圖

![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-1.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-2.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-3.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-4.jpg)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-1.png)

![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-2.png)
32 changes: 10 additions & 22 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# format: name: link || icon
# sub-menu
# name || icon:
# name || link || icon
# name: link || icon

menu:
# Home: / || fas fa-home
Expand Down Expand Up @@ -459,25 +459,11 @@ google_adsense:
# Verification (站長驗證)
# --------------------------------------

# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
google_site_verification:

# Bing Webmaster tools verification setting
# See: https://www.bing.com/webmaster/
bing_site_verification:

# Baidu Webmaster tools verification setting
# See: https://ziyuan.baidu.com/site/
baidu_site_verification:

# 360 Webmaster tools verification setting
# see http://zhanzhang.so.com/
qihu_site_verification:

# Yandex Webmaster tools verification setting
# see https://webmaster.yandex.com/
yandex_site_verification:
site_verification:
# - name: google_site_verification
# content: xxxxxx
# - name: baidu_site_verification
# content: xxxxxxx

# Beautify/Effect (美化/效果)
# --------------------------------------
Expand Down Expand Up @@ -828,10 +814,12 @@ pangu:
field: site # site/post

# Lazyload (圖片懶加載)
# https://github.com/verlok/lazyload
# https://github.com/verlok/vanilla-lazyload
lazyload:
enable: false
post: /img/loading.gif
field: site # site/post
placeholder:
blur: false

# PWA
# See https://github.com/JLHwung/hexo-offline
Expand Down
28 changes: 0 additions & 28 deletions layout/404.pug

This file was deleted.

17 changes: 17 additions & 0 deletions layout/includes/404.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- var top_img = theme.error_404.background || theme.default_top_img
- var bg_img = `background-image: url('${url_for(top_img)}')`

#body-wrap.error
div(style='display: none')
include ./header/index.pug

#error-wrap
.error-content
.error-img(style=bg_img)
.error-info
h1.error_title= '404'
.error_subtitle= theme.error_404.subtitle
a.button--animated(href=config.root)
i.fas.fa-rocket
= _p('error404.back_button')

18 changes: 9 additions & 9 deletions layout/includes/head/config_site.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
var showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true )
-
script#config-diff
.
var GLOBAL_CONFIG_SITE = {
isPost: !{is_post()},
isHome: !{is_home()},
isHighlightShrink: !{isHighlightShrink},
isToc: !{showToc},
postUpdate: '!{full_date(page.updated)}'
}
script#config-diff.
var GLOBAL_CONFIG_SITE = {
title: '!{pageTitle}',
isPost: !{is_post()},
isHome: !{is_home()},
isHighlightShrink: !{isHighlightShrink},
isToc: !{showToc},
postUpdate: '!{full_date(page.updated)}'
}
17 changes: 3 additions & 14 deletions layout/includes/head/site_verification.pug
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
if theme.google_site_verification
meta(name="google-site-verification" content=theme.google_site_verification)

if theme.bing_site_verification
meta(name="msvalidate.01" content=theme.bing_site_verification)

if theme.baidu_site_verification
meta(name="baidu-site-verification" content=theme.baidu_site_verification)

if theme.qihu_site_verification
meta(name="360-site-verification" content=theme.qihu_site_verification)

if theme.yandex_site_verification
meta(name="yandex-verification" content=theme.yandex_site_verification)
if theme.site_verification
each item in theme.site_verification
meta(name=item.name content=item.content)
42 changes: 23 additions & 19 deletions layout/includes/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,32 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside

!=partial('includes/sidebar', {}, {cache: true})

#body-wrap(class=pageType)
include ./header/index.pug
if page.type !== '404'
#body-wrap(class=pageType)
include ./header/index.pug

main#content-inner.layout(class=hideAside)
if body
div!= body
else
block content
if theme.aside.enable && page.aside !== false
include widget/index.pug

- var footerBg = theme.footer_bg
if (footerBg)
if (footerBg === true)
- var footer_bg = bg_img
main#content-inner.layout(class=hideAside)
if body
div!= body
else
block content
if theme.aside.enable && page.aside !== false
include widget/index.pug

- var footerBg = theme.footer_bg
if (footerBg)
if (footerBg === true)
- var footer_bg = bg_img
else
- var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url('${url_for(footerBg)}')` : `background: ${footerBg}`
else
- var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url('${url_for(footerBg)}')` : `background: ${footerBg}`
else
- var footer_bg = ''
- var footer_bg = ''

footer#footer(style=footer_bg)
!=partial('includes/footer', {}, {cache: true})

footer#footer(style=footer_bg)
!=partial('includes/footer', {}, {cache: true})
else
include ./404.pug

include ./rightside.pug
!=partial('includes/third-party/search/index', {}, {cache: true})
Expand Down
5 changes: 1 addition & 4 deletions layout/includes/mixins/article-sort.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ mixin articleSort(posts)
.article-sort-item(class=no_cover)
if article.cover && theme.cover.archives_enable
a.article-sort-item-img(href=url_for(article.path) title=title)
if theme.lazyload.enable
img(data-lazy-src=url_for(article.cover) alt=title onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'`)
else
img(src=url_for(article.cover) alt=title onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'`)
img(src=url_for(article.cover) alt=title onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'`)
.article-sort-item-info
.article-sort-item-time
i.far.fa-calendar-alt
Expand Down
5 changes: 1 addition & 4 deletions layout/includes/mixins/post-ui.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ mixin postUI(posts)
if post_cover && theme.cover.index_enable
.post_cover(class=leftOrRight)
a(href=url_for(link) title=title)
if theme.lazyload.enable
img.post_bg(data-lazy-src=url_for(post_cover) onerror=`this.onerror=null;this.src='`+ url_for(theme.error_img.post_page) + `'` alt=title)
else
img.post_bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src='`+ url_for(theme.error_img.post_page) + `'` alt=title)
img.post_bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src='`+ url_for(theme.error_img.post_page) + `'` alt=title)
.recent-post-info(class=no_cover)
a.article-title(href=url_for(link) title=title)= title
.article-meta-wrap
Expand Down
5 changes: 1 addition & 4 deletions layout/includes/page/flink.pug
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
each item in i.link_list
.flink-list-item
a(href=url_for(item.link) title=item.name target="_blank")
if theme.lazyload.enable
img(data-lazy-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
else
img(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
img(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
span.flink-item-name= item.name
span.flink-item-desc(title=item.descr)= item.descr
!= page.content
Expand Down
10 changes: 2 additions & 8 deletions layout/includes/pagination.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ if is_post()
.prev-post(class=hasPageNext)
- var pagination_cover = prev.cover === false ? prev.randomcover : prev.cover
a(href=url_for(prev.path))
if theme.lazyload.enable
img.prev-cover(data-lazy-src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of previous post')
else
img.prev-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of previous post')
img.prev-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of previous post')
.pagination-info
.label=_p('pagination.prev')
.prev_info=prev.title
Expand All @@ -28,10 +25,7 @@ if is_post()
- var pagination_cover = next.cover == false ? next.randomcover : next.cover
.next-post(class=hasPagePrev)
a(href=url_for(next.path))
if theme.lazyload.enable
img.next-cover(data-lazy-src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of next post')
else
img.next-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of next post')
img.next-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of next post')
.pagination-info
.label=_p('pagination.next')
.next_info=next.title
Expand Down
5 changes: 1 addition & 4 deletions layout/includes/post/reward.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
- var clickTo = item.link ? item.link : item.img
li.reward-item
a(href=url_for(clickTo) target='_blank')
if theme.lazyload.enable
img.post-qr-code-img(data-lazy-src=url_for(item.img) alt=item.text)
else
img.post-qr-code-img(src=url_for(item.img) alt=item.text)
img.post-qr-code-img(src=url_for(item.img) alt=item.text)
.post-qr-code-desc=item.text

5 changes: 1 addition & 4 deletions layout/includes/sidebar.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#menu-mask
#sidebar-menus
.author-avatar
if theme.lazyload.enable
img.avatar-img(data-lazy-src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar")
else
img.avatar-img(src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar")
img.avatar-img(src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar")
.site-data
if site.posts.length
.data-item.is-center
Expand Down
1 change: 1 addition & 0 deletions layout/includes/third-party/comments/disqusjs.pug
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ if is_post() && !theme.comments.lazyload && theme.comments.count && theme.commen
} else {
DISQUSWIDGETS.getCount({reset: true});
}

Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,8 @@ script.

newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})
})




Loading

0 comments on commit f4e5cef

Please sign in to comment.