From 40fd319cb25f93e1a11f2befd2bdddc073e8e1f9 Mon Sep 17 00:00:00 2001 From: Jerry <16351105+jerryc127@users.noreply.github.com> Date: Mon, 24 Aug 2020 22:56:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=BE=A9=E7=95=B6=E9=97=9C?= =?UTF-8?q?=E9=96=89=E4=BB=A3=E7=A2=BC=E6=B8=B2=E6=9F=93=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=A8=99=E7=B0=BD=E5=A4=96=E6=8C=82=E8=A3=8F=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A2=BC=E5=A1=8A=E6=9C=83=E8=A2=AB=E5=A3=93=E7=B8=AE=E5=88=B0?= =?UTF-8?q?=E4=B8=80=E8=A1=8C=E7=9A=84bugs=20improvements:=20=E5=84=AA?= =?UTF-8?q?=E5=8C=96=E7=B6=B2=E7=AB=99=E6=9C=80=E5=BE=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=99=82=E9=96=93=E9=A1=AF=E7=A4=BA=EF=BC=8C=E2=80=990?= =?UTF-8?q?=E5=A4=A9=E5=89=8D=E2=80=98=E6=94=B9=E7=88=B2=E2=80=99=E4=BB=8A?= =?UTF-8?q?=E5=A4=A9=E2=80=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++- .github/ISSUE_TEMPLATE/custom.md | 1 - .github/stale.yml | 1 - README.md | 45 +++++++++++++++++++++++++-- README_CN.md | 46 ++++++++++++++++++++++++++-- languages/default.yml | 1 + languages/en.yml | 1 + languages/zh-CN.yml | 1 + languages/zh-TW.yml | 1 + layout/includes/head/config.pug | 10 +++++- scripts/tags/hide.js | 2 +- scripts/tags/mermaid.js | 4 +-- scripts/tags/note.js | 4 +-- source/js/main.js | 8 +++-- 14 files changed, 109 insertions(+), 20 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f9db5fb..f8c2d62 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,8 @@ assignees: '' --- + + diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md index 48d5f81..4842758 100644 --- a/.github/ISSUE_TEMPLATE/custom.md +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -4,7 +4,6 @@ about: Describe this issue template's purpose here. title: '' labels: '' assignees: '' - --- diff --git a/.github/stale.yml b/.github/stale.yml index 355bbee..2d74a9c 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -8,7 +8,6 @@ exemptLabels: - security - bug - enhancement - - Solved - documentation # Label to use when marking an issue as stale staleLabel: wontfix diff --git a/README.md b/README.md index af0c3b1..0d0ac47 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,49 @@ npm i hexo-theme-butterfly > npm install hexo-renderer-pug hexo-renderer-stylus +## Features + +- [x] Card UI Design +- [X] Support sub-menu +- [x] Two Column designs +- [x] Responsive Web Design +- [x] Dark Mode +- [x] Pjax +- [x] Read Mode +- [x] Conversion between Traditional and Simplified Chinese +- [X] TOC catalog is available for both computers and mobile phones +- [X] Color themes (darker/pale night/light/ocean/mac/mac light), support custom colors +- [X] Code Blocks (Display code language/close or expand Code Blocks/Copy Button/word wrap) +- [X] Disable copy/Add a Copyright Notice to the Copied Text +- [X] Search (Algolia SearchZ/Local Search) +- [x] Mathjax and Katex +- [x] Built-in 404 page +- [x] WordCount +- [x] Related articles +- [x] Displays outdated notice for a post +- [x] Share (AddThis/Sharejs/Addtoany) +- [X] Comment (Disqus/Disqusjs/Livere/Gitalk/Valine/Utterances/Facebook Comments) +- [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] Google AdSense +- [x] Webmaster Verification (google/Bing/Baidu/360/Yandex) +- [x] Change website colour scheme +- [x] Typewriter Effect: activate_power_mode +- [x] Background effects (Canvas ribbon/canvas_ribbon_piao/canvas_nest) +- [x] Mouse click effects (Fireworks/Heart/Text) +- [x] Preloader/Loading Animation +- [x] Busuanzi visitor counter +- [x] Medium Zoom/Fancybox +- [x] Mermaid +- [x] Justified Gallery +- [x] Lazyload images +- [x] Instantpage/Pangu/Snackbar notification toast/PWA...... + ## Screenshots - + - + - \ No newline at end of file + diff --git a/README_CN.md b/README_CN.md index 6d4750a..84b0645 100644 --- a/README_CN.md +++ b/README_CN.md @@ -49,9 +49,49 @@ theme: butterfly >如果你沒有pug以及stylus的渲染器,請下載安裝: npm install hexo-renderer-pug hexo-renderer-stylus --save +## 特色 + +- [x] 卡片化設計 +- [X] 支持二級目錄 +- [x] 雙欄設計 +- [x] 響應式主題 +- [x] 夜間模式 +- [x] Pjax +- [x] 文章閲讀模式 +- [x] 簡體和繁體轉換 +- [X] 電腦和手機都可查看TOC目錄 +- [X] 內置多種代碼配色(darker/pale night/light/ocean/mac/mac light),可自定義代碼配色 +- [X] 代碼塊顯示代碼語言/關閉或展開代碼塊/代碼複製/代碼自動換行 +- [X] 可關閉文字複製/可開啟內容複製增加版權信息) +- [X] 兩種搜索(Algolia搜索和本地搜索) +- [x] Mathjax 和 Katex +- [x] 內置404頁面 +- [x] 顯示字數統計 +- [x] 顯示相關文章 +- [x] 過期文章提醒 +- [x] 多種分享系統(AddThis/Sharejs/Addtoany) +- [X] 多種評論系統(Disqus/Disqusjs/Livere/Gitalk/Valine/Utterances/Facebook Comments) +- [x] 支持雙評論部署 +- [x] 多種在線聊天(Chatra/Tidio/Daovoice/Gitter/Crisp) +- [x] 多種分析系統(百度分析/谷歌分析/騰訊分析/CNZZ分析) +- [x] 谷歌廣告/手動廣告位置 +- [x] 各種站長驗證(Google/Bing/Baidu/360/Yandex) +- [x] 修改網站配色 +- [x] 打字特效 activate_power_mode +- [x] 多種背景特效(靜止彩帶/動態彩帶/Canvas Nest) +- [x] 多種鼠標點擊特效(煙花/文字/愛心) +- [x] 內置一種 Preloader 加載動畫 +- [x] 不蒜子訪問統計 +- [x] 兩種大圖模式(Medium Zoom/Fancybox) +- [x] Mermaid 圖表顯示 +- [x] 照片牆 +- [x] 圖片懶加載 +- [x] Instantpage/Pangu/Snackbar彈窗/PWA...... + ## 截圖 - - + - \ No newline at end of file + + + diff --git a/languages/default.yml b/languages/default.yml index 137ed36..b63eb7f 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -70,6 +70,7 @@ aside: unit: days last_push_date: name: Last Push + zero_day: Today suffix: days ago site_wordcount: Total Count site_uv_name: UV diff --git a/languages/en.yml b/languages/en.yml index 137ed36..b63eb7f 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -70,6 +70,7 @@ aside: unit: days last_push_date: name: Last Push + zero_day: Today suffix: days ago site_wordcount: Total Count site_uv_name: UV diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 99ce029..c1bbd90 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -72,6 +72,7 @@ aside: unit: 天 last_push_date: name: 最后更新时间 + zero_day: 今天 suffix: 天前 site_wordcount: 本站总字数 site_uv_name: 本站访客数 diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index 1eb98f6..d859c40 100644 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -72,6 +72,7 @@ aside: unit: 天 last_push_date: name: 最後更新時間 + zero_day: 今天 suffix: 天前 site_wordcount: 本站總字數 site_uv_name: 本站訪客數 diff --git a/layout/includes/head/config.pug b/layout/includes/head/config.pug index 8237842..2235984 100644 --- a/layout/includes/head/config.pug +++ b/layout/includes/head/config.pug @@ -95,6 +95,14 @@ }) } + let last_push_date = 'undefined'; + if (theme.aside.card_webinfo.last_push_date) { + last_push_date = JSON.stringify({ + zeroDay: _p("aside.card_webinfo.last_push_date.zero_day"), + suffix: _p("aside.card_webinfo.last_push_date.suffix") + }) + } + script. var GLOBAL_CONFIG = { root: '!{config.root}', @@ -114,7 +122,7 @@ script. message_next: '!{_p("Snackbar.bookmark.message_next")}' }, runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}', - last_push_date: '!{theme.aside.card_webinfo.last_push_date ? _p("aside.card_webinfo.last_push_date.suffix") : ""}', + last_push_date: !{last_push_date}, copyright: !{copyright}, ClickShowText: !{ClickShowText}, medium_zoom: !{theme.medium_zoom}, diff --git a/scripts/tags/hide.js b/scripts/tags/hide.js index b57c776..eb7059f 100644 --- a/scripts/tags/hide.js +++ b/scripts/tags/hide.js @@ -44,7 +44,7 @@ function hideBlock (args, content) { group += '"' return `
` + ` } function hideToggle (args, content) { diff --git a/scripts/tags/mermaid.js b/scripts/tags/mermaid.js index e45b10a..f1a85d4 100644 --- a/scripts/tags/mermaid.js +++ b/scripts/tags/mermaid.js @@ -7,9 +7,7 @@ 'use strict' function mermaid (args, content) { - return `