Skip to content

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
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 jerryc127#72
  • Loading branch information
jerryc127 committed Dec 19, 2019
1 parent 90726f1 commit eae6948
Show file tree
Hide file tree
Showing 104 changed files with 3,219 additions and 3,955 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hexo-theme-butterfly

<a href="https://github.com/jerryc127/hexo-theme-butterfly/releases"><img alt="Version" src="https://img.shields.io/badge/release-2.0.0-blue"/></a>
<a href="https://github.com/jerryc127/hexo-theme-butterfly/releases"><img alt="Version" src="https://img.shields.io/badge/release-2.1.0-blue"/></a>
<a href="https://jerryc.me"><img alt="Author" src="https://img.shields.io/badge/author-JerryC-blur"/></a>
<a href="https://hexo.io"><img alt="Hexo" src="https://img.shields.io/badge/hexo-3.0+-0e83c"/></a>
<a href="https://nodejs.org/"><img alt="node.js" src="https://img.shields.io/badge/node.js-6.0-blur"/></a>
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hexo-theme-butterfly

<a href="https://github.com/jerryc127/hexo-theme-butterfly/releases"><img alt="Version" src="https://img.shields.io/badge/release-2.0.0-blue"/></a>
<a href="https://github.com/jerryc127/hexo-theme-butterfly/releases"><img alt="Version" src="https://img.shields.io/badge/release-2.1.0-blue"/></a>
<a href="https://jerryc.me"><img alt="Author" src="https://img.shields.io/badge/author-JerryC-blur"/></a>
<a href="https://hexo.io"><img alt="Hexo" src="https://img.shields.io/badge/hexo-3.0+-0e83c"/></a>
<a href="https://nodejs.org/"><img alt="node.js" src="https://img.shields.io/badge/node.js-6.0-blur"/></a>
Expand Down
170 changes: 94 additions & 76 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ favicon: /img/favicon.ico

# Highlight theme
# ---------------
highlight_theme: light # default, light, darker, pale night, ocean
highlight_copy: false #代碼複製按鈕
highlight_theme: light # default / darker / pale night / light / ocean
highlight_copy: true #代碼複製按鈕
highlight_lang: true #代碼語言顯示
highlight_shrink: false #代碼框不展開,需點擊 '>' 打開
highlight_shrink: false # true 全部代碼框不展開,需點擊 '>' 打開 / false 代碼框展開,有'>'點擊按鈕 | none 代碼框展開,不顯示 '>' 按鈕

code_word_wrap: false

Expand Down Expand Up @@ -83,56 +83,49 @@ local_search:
# ---------------
mathjax:
enable: false
# true 表示每一頁都加載mathjax.js
# false 需要時加載,須在使用的Markdown Front-matter 加上 mathjax: true
per_page: false

# KaTeX
# ---------------
katex:
enable: false
# true 表示每一頁都加載katex.js
# false 需要時加載,須在使用的Markdown Front-matter 加上 katex: true
per_page: false
hide_scrollbar: true

#### Analysis ####
# ---------------
# baidu_analytics:

#Google Analytics
google_analytics:


# Post info settings
# ---------------
# avatar: /img/avatar.png
avatar: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/avatar.png
avatar: /img/avatar.png

# the banner image of index
top_img: https://i.loli.net/2019/05/22/5ce53eb6dc82757840.jpg
# 以下鏈接是動態壁紙,每次刷新會更換
# https://source.unsplash.com/collection/collectionid/1600x900
# https://uploadbeta.com/api/pictures/random/?key=BingEverydayWallpaperPicture
# https://api.dujin.org/bing/1920.php
# https://api.dujin.org/bing/1366.php
index_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/index.jpg

# if the banner of page not setting,it will show the top_img
default_top_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/top_img_index.jpg
default_top_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/index.jpg

# the default cover of the post
default_cover: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png
default_cover: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/default.png

# the banner image of archive page
archive_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/archive.jpg
archive_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/archive.jpg

# the banner image of tag page
tag_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/tag-bg.png
tag_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/tag.png

# the banner image of category page
category_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/category-bg
category_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/category.jpg

# 如果你有使用hexo-douban去生成movie界面,可配置這個
movies_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/Photo/movie.jpg
movies_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/movie.jpg

# if the photo link cannot connect,it will show that
lodding_bg:
flink: /img/friend_404.gif
post_page: /img/404.jpg
flink: /img/friend_404.gif #404后圖片
post_page: /img/404.jpg #404后圖片
# post: /img/loading.gif ##加載動畫

post_meta:
date_type: both # or created or updated 文章日期是创建日或者更新日或都显示
Expand Down Expand Up @@ -188,22 +181,21 @@ addtoany:
disqus:
enable: false
shortname:
count: false # top_img顯示評論數

# laibili:
# enable: false
# uid:

# gitalk:
# enable: false
# client_id:
# client_secret:
# repo:
# owner:
# admin:
# language: # en , zh-CN , zh-TW
#### Using this js for redirect to gitalk container after login
#### See https://github.com/gitalk/gitalk/issues/125
# js: https://cdn.jsdelivr.net/gh/upupming/gitalk@36368e5dffd049e956cdbbd751ff96c28d8255cf/dist/gitalk.min.js
laibili:
enable: false
uid:

gitalk:
enable: false
client_id:
client_secret:
repo:
owner:
admin:
language: # en , zh-CN , zh-TW
count: false # top_img顯示評論數

# valine comment system. https://valine.js.org
valine:
Expand All @@ -218,10 +210,11 @@ valine:
placeholder: Please leave your footprints # valine comment input placeholder(like: Please leave your footprints )
guest_info: nick,mail,link #valine comment header info
bg: /img/comment_bg.png # valine background
count: false # top_img顯示評論數

##### Footer Settings ####
# ------------------------------------
since: 2018
since: 2019

footer_custom_text:

Expand All @@ -234,6 +227,25 @@ ICP:
text:
icon: /img/icp.png

#### Analysis ####
# ---------------
baidu_analytics:

# Google Analytics
google_analytics:

# Tencent_analytics ID
tencent_analytics:

# Ads
# ---------------
# Google Adsense
google_adsense:
enable: false
js: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
client:
enable_page_level_ads: true

#### 站長驗證 ####
# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
Expand Down Expand Up @@ -276,6 +288,7 @@ reward:
related_post:
enable: true
limit: 6 # 顯示推薦文章數目
date_type: created # or created or updated 文章日期顯示创建日或者更新日

#### 美化/效果 ####
#--------------------------------
Expand All @@ -298,9 +311,13 @@ related_post:
# 主頁設置
# 默認top_img全屏,site_info在中間
# 使用默認, 都無需填寫(建議默認)
index_site_info_top: #主頁標題距離頂部距離 例如 300px/300em/300rem/10%
index_top_img_height: #主頁top_img高度 例如 300px/300em/300rem 不能使用百分比

# 主頁文章COVER顯示位置
# 三個值可配置 left , right , both
# left(全部圖片顯示在左邊),right(全部圖片顯示在右邊),both(左右左右順序顯示)
index_post_cover: both

# category和tag頁的UI設置
# index 值代表 UI將與首頁的UI一樣
# 默認跟archives頁面UI一樣
Expand Down Expand Up @@ -338,7 +355,7 @@ canvas_ribbon_piao:
# https://github.com/hustcc/canvas-nest.js
canvas_nest:
enable: false
color: '0,0,255' #color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
color: "0,0,255" #color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
opacity: 0.7 # the opacity of line (0~1), default: 0.5.
zIndex: -1 # z-index property of the background, default: -1.
count: 99 # the number of lines, default: 99.
Expand All @@ -347,6 +364,8 @@ canvas_nest:
# 打字效果
activate_power_mode:
enable: false
colorful: true # 冒光特效
shake: true # 抖動特效

# 鼠標點擊效果
# 避免卡頓,建議只開啓一個
Expand All @@ -361,7 +380,7 @@ click_heart:
# 點擊出現文字,文字可自行修改
ClickShowText:
enable: false
text:
text:
- 富强
- 民主
- 文明
Expand Down Expand Up @@ -410,10 +429,10 @@ hr:

# 主頁subtitle
# 打字效果
subtitle:
subtitle:
enable: true
# source調用第三方服務
# source: false 關閉調用
# source: false 關閉調用
# source: 1 調用金山詞霸的每日一句(簡體)
# source: 2 調用一言网的一句話(簡體) #https://hitokoto.cn/
# source: 3 調用一句网(簡體) http://yijuzhan.com/
Expand All @@ -425,7 +444,6 @@ subtitle:
- 今日事&#44;今日畢
- Never put off till tomorrow what you can do today


#### 側邊欄 ####
#-------------------------------------
# 手機頁面( 顯示寬度 < 768px )是否顯示aside内容
Expand Down Expand Up @@ -496,20 +514,26 @@ autoChangeMode: false
#------------------------------------------------

# 圖片大圖查看模式
# 默認為 fancybox http://fancyapps.com/fancybox/3/
# 可以選擇改爲 medium_zoom https://github.com/francoischalifour/medium-zoom
# 可選 medium_zoom 或者 fancybox
# 只選一個 或者 兩個都不選
#--------------------------------------------
# medium_zoom https://github.com/francoischalifour/medium-zoom
medium_zoom:
enable: false

# fancybox http://fancyapps.com/fancybox/3/
fancybox:
enable: true

# Snackbar 彈窗
# https://github.com/polonel/SnackBar
# position 彈窗位置
# 可選 top-left / top-center / top-right / bottom-left / bottom-center / bottom-right
snackbar:
enable: false
position: bottom-left
bg_light: '#49b1f5' #light mode時彈窗背景
bg_dark: '#2d3035' #dark mode時彈窗背景
bg_light: "#49b1f5" #light mode時彈窗背景
bg_dark: "#2d3035" #dark mode時彈窗背景

#百度推送
baidu_push:
Expand Down Expand Up @@ -554,22 +578,20 @@ twitter_meta: true
# https://i.loli.net/2019/09/08/2wbFJEKloisRvhj.png
Open_Graph_meta: true


# CDN
# 網站必須
# 可根據需要自行添加js/css
CDN_USE:
css:
- /css/index.css
- https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css
# - https://use.fontawesome.com/releases/v5.8.1/css/all.css #fontawesomeV5_css
# - https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css #fontawesomeV5_css

js:
- https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js #/js/third-party/jquery.min.js
- https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js #/js/third-party/jquery.min.js
- /js/utils.js
- /js/main.js


# CDN
# 非必要不要修改
CDN:
Expand All @@ -581,14 +603,12 @@ CDN:

# share
addtoany: https://static.addtoany.com/menu/page.js
sharejs: https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js
sharejs_css: https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css
sharejs: https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js
sharejs_css: https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css

#search
algolia_search: https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js
algolia_search_css: https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css
algolia_js: /js/search/algolia.js
local_search: /js/search/local-search.js
algolia_search: https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.js
algolia_search_css: https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.css

mathjax: https://cdn.jsdelivr.net/npm/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML
katex: https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css
Expand All @@ -599,9 +619,9 @@ CDN:
busuanzi: //busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js

# 背景特效
canvas_ribbon: /js/third-party/canvas-ribbon.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/canvas-ribbon.js
canvas_ribbon_piao: /js/third-party/piao.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/piao.js
canvas_nest: /js/third-party/canvas-nest.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/canvas-nest.js
canvas_ribbon: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/canvas-ribbon.js
canvas_ribbon_piao: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/piao.js
canvas_nest: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/canvas-nest.js

lazyload: https://cdn.jsdelivr.net/npm/lazysizes@latest/lazysizes.min.js
instantpage: https://cdn.jsdelivr.net/npm/instant.page@latest/instantpage.min.js
Expand All @@ -610,19 +630,17 @@ CDN:
js_cookies: https://cdn.jsdelivr.net/npm/js-cookie/dist/js.cookie.min.js

fancybox_css: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js #/js/third-party/jquery.fancybox.min.js
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js
medium_zoom: https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js

snackbar_css: https://cdn.jsdelivr.net/npm/node-snackbar@0.1.15/dist/snackbar.min.css
snackbar: https://cdn.jsdelivr.net/npm/node-snackbar@0.1.15/dist/snackbar.min.js
snackbar_css: https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css
snackbar: https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js

#鼠标点击特效
anime: https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js #/js/third-party/anime.min.js
activate_power_mode: /js/third-party/activate-power-mode.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/activate-power-mode.js
fireworks: /js/third-party/fireworks.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/fireworks.js
click_heart: /js/third-party/click_heart.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/click_heart.js
ClickShowText: /js/third-party/ClickShowText.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/ClickShowText.js
anime: https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js
activate_power_mode: https://cdn.jsdelivr.net/npm/activate-power-mode/dist/activate-power-mode.min.js
fireworks: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/fireworks.js
click_heart: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/click_heart.js
ClickShowText: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/ClickShowText.js

translate: /js/tw_cn.js
runtimeshow: js/runtimeshow.js

1 change: 1 addition & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ post:
wordcount: Word count
min2read: "Reading time: %s min"
page_pv: Post View
comments: comments
copyright:
author: Author
link: Link
Expand Down
1 change: 1 addition & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ post:
wordcount: Word count
min2read: "Reading time: %s min"
page_pv: Post View
comments: comments
copyright:
author: Author
link: Link
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ post:
wordcount: 字数总计
min2read: "阅读时长: %s 分钟"
page_pv: 阅读量
comments: 评论数
copyright:
author: 文章作者
link: 文章链接
Expand Down
1 change: 1 addition & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ post:
wordcount: 字數總計
min2read: "閲讀時長: %s 分鐘"
page_pv: 閲讀量
comments: 評論數
copyright:
author: 文章作者
link: 文章鏈接
Expand Down
Loading

0 comments on commit eae6948

Please sign in to comment.