mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +08:00
feat: 預設關閉 structured_data
feat: 升級一些項目依賴 feat: 重寫 README.md 和 README_CN.md,改進文檔結構和內容 feat: tags 標籤插件夜間模式調整 feat: 加按鈕懸停效果和動畫 fix: 修復右下角箭頭圖標位置沒有居中的 bug feat: 增加右下角箭頭和滾動百分比的切換效果 improvement: 優化 tags 頁標籤雲顯示效果 improvement: 整合部分js到 init.js improvement: 統一 CSS 變數使用,改進主題一致性
This commit is contained in:
310
README.md
310
README.md
@@ -1,117 +1,193 @@
|
|||||||
<div align="right">
|
<div align="right">
|
||||||
<a title="Chinese" href="/README_CN.md">中文</a>
|
<a title="中文" href="/README_CN.md">中文</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<img src="./source/img/butterfly-icon.png" width="150" height="150" />
|
<img src="./source/img/butterfly-icon.png" width="150" height="150" alt="Butterfly Logo" />
|
||||||
|
|
||||||
# hexo-theme-butterfly
|
# hexo-theme-butterfly
|
||||||
|
|
||||||

|
A modern, elegant and feature-rich theme for Hexo
|
||||||

|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|

|
||||||
📢 Demo: [Butterfly](https://butterfly.js.org/) / [CrazyWong](https://blog.crazywong.com/)
|

|
||||||
|

|
||||||
📖 Docs: [English](https://butterfly.js.org/en/posts/butterfly-docs-en-get-started/) / [Chinese](https://butterfly.js.org/posts/21cfbf15/)
|
|
||||||
|
📢 **Demo**: [Butterfly Official](https://butterfly.js.org/) | [CrazyWong's Blog](https://blog.crazywong.com/)
|
||||||

|
|
||||||
|
📖 **Documentation**: [English Docs](https://butterfly.js.org/en/posts/butterfly-docs-en-get-started/) | [中文文档](https://butterfly.js.org/posts/21cfbf15/)
|
||||||
</div>
|
|
||||||
|

|
||||||
---
|
|
||||||
|
</div>
|
||||||
## 💻 Installation
|
|
||||||
|
---
|
||||||
### GIT
|
|
||||||
|
## 🚀 Quick Start
|
||||||
> If you are in Mainland China, you can download in [Gitee](https://gitee.com/immyw/hexo-theme-butterfly.git)
|
|
||||||
|
### 💾 Installation
|
||||||
Stable branch [recommend]:
|
|
||||||
|
#### Method 1: Git Installation (Recommended)
|
||||||
```
|
|
||||||
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
> 💡 **Tip**: If GitHub access is slow in mainland China, you can use the [Gitee Mirror](https://gitee.com/immyw/hexo-theme-butterfly.git)
|
||||||
```
|
|
||||||
|
Execute in your Hexo blog root directory:
|
||||||
Dev branch:
|
|
||||||
|
```bash
|
||||||
```
|
# Install stable version (recommended)
|
||||||
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
||||||
```
|
```
|
||||||
|
|
||||||
### NPM
|
```bash
|
||||||
|
# Install development version (early access to new features)
|
||||||
> It supports Hexo 5.0.0 or later
|
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
||||||
|
```
|
||||||
In Hexo site root directory
|
|
||||||
|
#### Method 2: NPM Installation
|
||||||
```powershell
|
|
||||||
npm i hexo-theme-butterfly
|
> ⚠️ **Note**: NPM installation only supports Hexo 5.0.0 and above
|
||||||
```
|
|
||||||
|
```bash
|
||||||
## ⚙ Configuration
|
npm install hexo-theme-butterfly
|
||||||
|
```
|
||||||
Set theme in the hexo work folder's root config file `_config.yml`:
|
|
||||||
|
### ⚙️ Theme Configuration
|
||||||
> theme: butterfly
|
|
||||||
|
1. **Enable Theme**: Modify your Hexo configuration file `_config.yml`:
|
||||||
If you don't have pug & stylus renderer, try this:
|
|
||||||
|
```yaml
|
||||||
> npm install hexo-renderer-pug hexo-renderer-stylus
|
theme: butterfly
|
||||||
|
```
|
||||||
## 🎉 Features
|
|
||||||
|
2. **Install Dependencies**: If you haven't installed pug and stylus renderers, please run:
|
||||||
- [x] Card UI Design
|
|
||||||
- [x] Rounded Design/Squared Design
|
```bash
|
||||||
- [X] Support sub-menu
|
npm install hexo-renderer-pug hexo-renderer-stylus --save
|
||||||
- [x] Two-column layout
|
```
|
||||||
- [x] Responsive Web Design
|
|
||||||
- [x] Dark Mode
|
## ✨ Theme Features
|
||||||
- [x] Pjax
|
|
||||||
- [x] Read Mode
|
### 🎨 Design Style
|
||||||
- [x] Conversion between Traditional and Simplified Chinese
|
- [x] **Card-based Design** - Modern card-style layout
|
||||||
- [X] TOC catalog is available for both computers and mobile phones
|
- [x] **Rounded/Square Design** - Customizable border styles
|
||||||
- [X] Built-in Syntax Highlighting Themes (darker/pale night/light/ocean), also support customization
|
- [x] **Responsive Design** - Perfect adaptation to all screen sizes
|
||||||
- [X] Code Blocks (Display code language/close or expand Code Blocks/Copy Button/word wrap)
|
- [x] **Two-column Layout** - Optimized reading experience
|
||||||
- [X] Disable copy/Add a Copyright Notice to the Copied Text
|
- [x] **Dark Mode** - Eye-friendly night mode
|
||||||
- [X] Search (Algolia Search/Local Search)
|
|
||||||
- [x] Mathjax and Katex
|
### 📝 Content Features
|
||||||
- [x] Built-in 404 page
|
- [x] **Multi-level Menu** - Support for secondary navigation menus
|
||||||
- [x] WordCount
|
- [x] **Reading Mode** - Focused article reading experience
|
||||||
- [x] Related articles
|
- [x] **TOC Navigation** - Desktop and mobile TOC support
|
||||||
- [x] Displays outdated notice for a post
|
- [x] **Word Count** - Display article word count and reading time
|
||||||
- [x] Share (Sharejs/Addtoany)
|
- [x] **Related Articles** - Smart recommendation of related content
|
||||||
- [X] Comment (Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo/Giscus/Remark42/artalk)
|
- [x] **Outdated Reminder** - Automatic article update status alerts
|
||||||
- [x] Multiple Comment System Support
|
- [x] **Traditional/Simplified Chinese** - Support for Traditional and Simplified Chinese switching
|
||||||
- [x] Online Chats (Chatra/Tidio/Crisp)
|
- [x] **Tag Plugins** - Rich tag plugin support
|
||||||
- [x] Web analytics
|
|
||||||
- [x] Google AdSense
|
### 🔍 Search & Navigation
|
||||||
- [x] Webmaster Verification
|
- [x] **Multiple Search Options** - Algolia Search / Local Search / Docsearch
|
||||||
- [x] Change website colour scheme
|
- [x] **Built-in 404** - Beautiful 404 error page
|
||||||
- [x] Typewriter Effect: activate_power_mode
|
- [x] **Pjax Support** - Smooth page transition experience
|
||||||
- [x] Background effects (Canvas ribbon/canvas_ribbon_piao/canvas_nest)
|
|
||||||
- [x] Mouse click effects (Fireworks/Heart/Text)
|
### 🎨 Code Display
|
||||||
- [x] Preloader/Loading Animation/pace.js
|
- [x] **Syntax Highlighting** - Built-in multiple themes (darker/pale night/light/ocean)
|
||||||
- [x] Busuanzi visitor counter
|
- [x] **Code Features** - Language display/fold expand/copy button/auto-wrap
|
||||||
- [x] Medium Zoom/Fancybox
|
- [x] **Math Formulas** - Support for Mathjax and Katex
|
||||||
- [x] Mermaid
|
|
||||||
- [x] Chart.js
|
### 💬 Social Interaction
|
||||||
- [x] Justified Gallery
|
- [x] **Multiple Comment Systems** - Disqus/Gitalk/Valine/Waline/Twikoo/Giscus/Artalk etc.
|
||||||
- [x] Lazyload images
|
- [x] **Dual Comments Support** - Enable two comment systems simultaneously
|
||||||
- [x] Instantpage/Snackbar notification toast/PWA......
|
- [x] **Share Features** - Sharejs/Addtoany sharing components
|
||||||
|
- [x] **Live Chat** - Chatra/Tidio/Crisp instant messaging
|
||||||
## ✨ Contributors
|
|
||||||
|
### 📊 Analytics & Statistics
|
||||||
<a href="https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors">
|
- [x] **Visit Statistics** - Busuanzi counter
|
||||||
<img src="https://contrib.rocks/image?repo=jerryc127/hexo-theme-butterfly" />
|
- [x] **Site Analytics** - Google Analytics/Baidu Analytics/Cloudflare Analytics/Microsoft Clarity/Umami
|
||||||
</a>
|
- [x] **Webmaster Verification** - Major search engine verification
|
||||||
|
- [x] **Ad Support** - Google AdSense/custom ad slots
|
||||||
## 📷 Screenshots
|
|
||||||
|
### 🎪 Visual Effects
|
||||||

|
- [x] **Typing Effects** - activate_power_mode animations
|
||||||

|
- [x] **Background Effects** - Static ribbons/dynamic ribbons/floating ribbons/Canvas Nest
|
||||||

|
- [x] **Mouse Effects** - Fireworks/hearts/text click effects
|
||||||

|
- [x] **Loading Animations** - Preloader and pace.js progress bars
|
||||||
|
- [x] **Image Effects** - Medium Zoom/Fancybox image lightbox
|
||||||
|
- [x] **Lazy Loading** - Image lazy loading optimization
|
||||||
|
|
||||||
|
### 🛠️ Advanced Features
|
||||||
|
- [x] **PWA Support** - Progressive Web App
|
||||||
|
- [x] **Copy Protection** - Disable text copying/copyright info append
|
||||||
|
- [x] **Theme Customization** - Custom site color schemes
|
||||||
|
- [x] **Chart Support** - Mermaid flowcharts/Chart.js data charts
|
||||||
|
- [x] **Music Notation** - ABCJS music notation support
|
||||||
|
- [x] **Music Player** - APlayer/Meting music playback
|
||||||
|
- [x] **Article Series** - Series article organization
|
||||||
|
- [x] **Instantpage** - Page preloading acceleration
|
||||||
|
- [x] **Snackbar** - Elegant notification messages
|
||||||
|
|
||||||
|
## 🤝 Contributors
|
||||||
|
|
||||||
|
Thanks to all the developers who have contributed to the Butterfly theme!
|
||||||
|
|
||||||
|
[](https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors)
|
||||||
|
|
||||||
|
## 📸 Screenshots
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
## ⭐ Star History
|
||||||
|
|
||||||
|
[](https://star-history.com/#jerryc127/hexo-theme-butterfly&Date)
|
||||||
|
|
||||||
|
## 🤝 Building a Better Theme Together
|
||||||
|
|
||||||
|
We believe **the power of open source comes from everyone's participation**! Whether you're a developer, designer, or user, you can contribute to the development of the Butterfly theme.
|
||||||
|
|
||||||
|
### 💬 Get Help & Support
|
||||||
|
|
||||||
|
- 🐛 **Found a bug?** → [GitHub Issues](https://github.com/jerryc127/hexo-theme-butterfly/issues) - Let's solve it together!
|
||||||
|
- 💡 **Have ideas?** → [GitHub Discussions](https://github.com/jerryc127/hexo-theme-butterfly/discussions) - Share your creative ideas!
|
||||||
|
- 📚 **Learning to use?** → [Official Documentation](https://butterfly.js.org/) - Detailed usage guide
|
||||||
|
- 💬 **Real-time discussion?** → [Telegram Group](https://t.me/bu2fly) - Chat with community members
|
||||||
|
|
||||||
|
### 🎯 Contributing
|
||||||
|
|
||||||
|
Want to make Butterfly better? We welcome any form of contribution:
|
||||||
|
|
||||||
|
- **🔧 Code Contributions** - Fix bugs, add new features, optimize performance
|
||||||
|
- **📝 Documentation** - Improve docs, translate content, write tutorials
|
||||||
|
- **🎨 Design Suggestions** - UI/UX improvements, theme colors, icon design
|
||||||
|
- **🧪 Testing & Feedback** - Test new features, report issues, provide user experience
|
||||||
|
- **💰 Financial Support** - [Sponsor the Project](https://buy.stripe.com/3cs6rP6YA91sbbG5kk) - Support long-term development
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
This project is licensed under the [Apache 2.0](LICENSE) License.
|
||||||
|
|
||||||
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
|
This theme is developed based on [hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody). Thanks to the original author for their excellent work that provided inspiration and foundation!
|
||||||
|
|
||||||
|
Thanks to all friends who have contributed to the development of the Butterfly theme. Your support has made this theme continuously improve and progress.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
**✨ If this theme helps you, please give us a ⭐ Star! ✨**
|
||||||
|
</div>
|
||||||
|
|||||||
222
README_CN.md
222
README_CN.md
@@ -4,114 +4,190 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<img src="./source/img/butterfly-icon.png" width="150" height="150" />
|
<img src="./source/img/butterfly-icon.png" width="150" height="150" alt="Butterfly Logo" />
|
||||||
|
|
||||||
# hexo-theme-butterfly
|
# hexo-theme-butterfly
|
||||||
|
|
||||||
|
一個適用於 Hexo 的現代化、美觀且功能豐富的主題
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
📢 預覽: [Butterfly](https://butterfly.js.org/) / [CrazyWong](https://blog.crazywong.com/)
|
📢 **在線預覽**: [Butterfly 官方](https://butterfly.js.org/) | [CrazyWong 博客](https://blog.crazywong.com/)
|
||||||
|
|
||||||
📖 文檔: [中文](https://butterfly.js.org/posts/21cfbf15/) / [English](https://butterfly.js.org/en/posts/butterfly-docs-en-get-started/)
|
📖 **完整文檔**: [中文文檔](https://butterfly.js.org/posts/21cfbf15/) | [English Docs](https://butterfly.js.org/en/posts/butterfly-docs-en-get-started/)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 💻 安裝
|
## 🚀 快速開始
|
||||||
|
|
||||||
### Git 安裝
|
### 💾 安裝方式
|
||||||
|
|
||||||
> 本倉庫同時上傳到 [Gitee](https://gitee.com/immyw/hexo-theme-butterfly.git),如果你訪問 Github 緩慢,可從 Gitee 中下載。
|
#### 方式一:Git 安裝(推薦)
|
||||||
|
|
||||||
在博客根目錄裡安裝穩定版【推薦】
|
> 💡 **提示**: 如果您在中國大陸訪問 GitHub 速度較慢,可以使用 [Gitee 鏡像](https://gitee.com/immyw/hexo-theme-butterfly.git)
|
||||||
|
|
||||||
```powershell
|
在您的 Hexo 博客根目錄下執行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 安裝穩定版本(推薦)
|
||||||
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
||||||
```
|
```
|
||||||
|
|
||||||
如果想要安裝比較新的dev分支,可以
|
```bash
|
||||||
|
# 安裝開發版本(搶先體驗新功能)
|
||||||
```powershell
|
|
||||||
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
|
||||||
```
|
```
|
||||||
|
|
||||||
### npm 安裝
|
#### 方式二:NPM 安裝
|
||||||
|
|
||||||
> 此方法只支持Hexo 5.0.0以上版本
|
> ⚠️ **注意**: NPM 安裝方式僅支援 Hexo 5.0.0 及以上版本
|
||||||
|
|
||||||
在博客根目錄裡
|
```bash
|
||||||
|
npm install hexo-theme-butterfly
|
||||||
```powershell
|
|
||||||
npm i hexo-theme-butterfly
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⚙ 應用主題
|
### ⚙️ 主題配置
|
||||||
|
|
||||||
修改hexo配置文件`_config.yml`,把主題改為`Butterfly`
|
1. **啟用主題**: 修改您的 Hexo 配置檔案 `_config.yml`:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
theme: butterfly
|
theme: butterfly
|
||||||
```
|
```
|
||||||
|
|
||||||
>如果你沒有pug以及stylus的渲染器,請下載安裝: npm install hexo-renderer-pug hexo-renderer-stylus --save
|
2. **安裝依賴**: 如果您尚未安裝 pug 和 stylus 渲染器,請執行:
|
||||||
|
|
||||||
## 🎉 特色
|
```bash
|
||||||
|
npm install hexo-renderer-pug hexo-renderer-stylus --save
|
||||||
|
```
|
||||||
|
|
||||||
- [x] 卡片化設計
|
## ✨ 主題特色
|
||||||
- [x] 圓角化設計/直角化設計
|
|
||||||
- [X] 支持二級目錄
|
|
||||||
- [x] 雙欄設計
|
|
||||||
- [x] 響應式主題
|
|
||||||
- [x] 夜間模式
|
|
||||||
- [x] Pjax
|
|
||||||
- [x] 文章閲讀模式
|
|
||||||
- [x] 簡體和繁體轉換
|
|
||||||
- [X] 電腦和手機都可查看TOC目錄
|
|
||||||
- [X] 內置多種代碼配色(darker/pale night/light/ocean),可自定義代碼配色
|
|
||||||
- [X] 代碼塊顯示代碼語言/關閉或展開代碼塊/代碼複製/代碼自動換行
|
|
||||||
- [X] 可關閉文字複製/可開啟內容複製增加版權信息)
|
|
||||||
- [X] 兩種搜索( Algolia 搜索和本地搜索)
|
|
||||||
- [x] Mathjax 和 Katex
|
|
||||||
- [x] 內置404頁面
|
|
||||||
- [x] 顯示字數統計
|
|
||||||
- [x] 顯示相關文章
|
|
||||||
- [x] 過期文章提醒
|
|
||||||
- [x] 多種分享系統(Sharejs/Addtoany)
|
|
||||||
- [X] 多種評論系統(Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo/Giscus/Remark42/artalk)
|
|
||||||
- [x] 支持雙評論部署
|
|
||||||
- [x] 多種在線聊天(Chatra/Tidio/Crisp)
|
|
||||||
- [x] 多種分析系統
|
|
||||||
- [x] 谷歌廣告/手動廣告位置
|
|
||||||
- [x] 各種站長驗證
|
|
||||||
- [x] 修改網站配色
|
|
||||||
- [x] 打字特效 activate_power_mode
|
|
||||||
- [x] 多種背景特效(靜止彩帶/動態彩帶/Canvas Nest)
|
|
||||||
- [x] 多種鼠標點擊特效(煙花/文字/愛心)
|
|
||||||
- [x] 內置一種 Preloader 加載動畫和 pace.js 加載動畫條
|
|
||||||
- [x] 不蒜子訪問統計
|
|
||||||
- [x] 兩種大圖模式(Medium Zoom/Fancybox)
|
|
||||||
- [x] Mermaid 圖表顯示
|
|
||||||
- [x] Chart.js 圖表顯示
|
|
||||||
- [x] 照片牆
|
|
||||||
- [x] 圖片懶加載
|
|
||||||
- [x] Instantpage/Snackbar彈窗/PWA......
|
|
||||||
|
|
||||||
## ✨ 貢獻者
|
### 🎨 設計風格
|
||||||
|
- [x] **卡片化設計** - 現代化的卡片式佈局
|
||||||
|
- [x] **圓角/直角設計** - 支援自訂邊框樣式
|
||||||
|
- [x] **響應式設計** - 完美適配各種螢幕尺寸
|
||||||
|
- [x] **雙欄佈局** - 優化的閱讀體驗
|
||||||
|
- [x] **深色模式** - 護眼的夜間模式
|
||||||
|
|
||||||
<a href="https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors">
|
### 📝 內容功能
|
||||||
<img src="https://contrib.rocks/image?repo=jerryc127/hexo-theme-butterfly" />
|
- [x] **多級選單** - 支援二級導航選單
|
||||||
</a>
|
- [x] **閱讀模式** - 專注的文章閱讀體驗
|
||||||
|
- [x] **目錄導航** - 電腦和手機雙端支援 TOC
|
||||||
|
- [x] **字數統計** - 顯示文章字數和閱讀時間
|
||||||
|
- [x] **相關文章** - 智能推薦相關內容
|
||||||
|
- [x] **過期提醒** - 自動提示文章更新狀態
|
||||||
|
- [x] **簡繁轉換** - 支援繁體中文和簡體中文切換
|
||||||
|
- [x] **標籤外掛** - 豐富的標籤外掛支持
|
||||||
|
|
||||||
## 📷 截圖
|
### 🔍 搜尋與導航
|
||||||
|
- [x] **多種搜尋** - Algolia 搜尋 / 本地搜尋 / Docsearch
|
||||||
|
- [x] **內建 404** - 美觀的 404 錯誤頁面
|
||||||
|
- [x] **Pjax 支援** - 流暢的頁面切換體驗
|
||||||
|
|
||||||

|
### 🎨 程式碼展示
|
||||||

|
- [x] **語法高亮** - 內建多種主題(darker/pale night/light/ocean)
|
||||||

|
- [x] **程式碼功能** - 語言顯示/摺疊展開/複製按鈕/自動換行
|
||||||

|
- [x] **數學公式** - 支援 Mathjax 和 Katex
|
||||||
|
|
||||||
|
### 💬 社交互動
|
||||||
|
- [x] **多元評論系統** - Disqus/Gitalk/Valine/Waline/Twikoo/Giscus/Artalk 等
|
||||||
|
- [x] **雙評論支援** - 可同時啟用兩套評論系統
|
||||||
|
- [x] **分享功能** - Sharejs/Addtoany 分享套件
|
||||||
|
- [x] **線上客服** - Chatra/Tidio/Crisp 即時聊天
|
||||||
|
|
||||||
|
### 📊 數據分析
|
||||||
|
- [x] **訪問統計** - 不蒜子計數器
|
||||||
|
- [x] **網站分析** - Google Analytics/百度統計/Cloudflare Analytics/Microsoft Clarity/Umami
|
||||||
|
- [x] **站長驗證** - 各大搜尋引擎驗證
|
||||||
|
- [x] **廣告支援** - Google AdSense/自訂廣告位
|
||||||
|
|
||||||
|
### 🎪 視覺效果
|
||||||
|
- [x] **打字特效** - activate_power_mode 動畫
|
||||||
|
- [x] **背景特效** - 靜態彩帶/動態彩帶/飄帶效果/Canvas Nest
|
||||||
|
- [x] **滑鼠特效** - 煙花/愛心/文字點擊效果
|
||||||
|
- [x] **載入動畫** - Preloader 和 pace.js 進度條
|
||||||
|
- [x] **圖片效果** - Medium Zoom/Fancybox 圖片燈箱
|
||||||
|
- [x] **懶載入** - 圖片延遲載入優化
|
||||||
|
|
||||||
|
### 🛠️ 進階功能
|
||||||
|
- [x] **PWA 支援** - 漸進式網頁應用
|
||||||
|
- [x] **複製保護** - 可關閉文字複製/版權資訊追加
|
||||||
|
- [x] **主題定製** - 自訂網站配色方案
|
||||||
|
- [x] **圖表支援** - Mermaid 流程圖/Chart.js 數據圖表
|
||||||
|
- [x] **音樂符號** - ABCJS 音樂記譜法支援
|
||||||
|
- [x] **音樂播放器** - APlayer/Meting 音樂播放功能
|
||||||
|
- [x] **系列文章** - 系列文章組織功能
|
||||||
|
- [x] **Instantpage** - 頁面預載入加速
|
||||||
|
- [x] **Snackbar** - 優雅的提示訊息
|
||||||
|
|
||||||
|
## 🤝 貢獻者
|
||||||
|
|
||||||
|
感謝所有為 Butterfly 主題做出貢獻的開發者們!
|
||||||
|
|
||||||
|
[](https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors)
|
||||||
|
|
||||||
|
## 📸 主題截圖
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
## ⭐ Star 趨勢
|
||||||
|
|
||||||
|
[](https://star-history.com/#jerryc127/hexo-theme-butterfly&Date)
|
||||||
|
|
||||||
|
## 🤝 一起構建更美好的主題
|
||||||
|
|
||||||
|
我們相信,**開源的力量來自於每一個人的參與**!無論您是開發者、設計師還是用戶,都可以為 Butterfly 主題的發展貢獻力量。
|
||||||
|
|
||||||
|
### 💬 獲取幫助與支援
|
||||||
|
|
||||||
|
- 🐛 **發現問題?** → [GitHub Issues](https://github.com/jerryc127/hexo-theme-butterfly/issues) - 讓我們一起解決!
|
||||||
|
- 💡 **有好想法?** → [GitHub Discussions](https://github.com/jerryc127/hexo-theme-butterfly/discussions) - 分享您的創意想法!
|
||||||
|
- 📚 **學習使用?** → [官方文檔](https://butterfly.js.org/) - 詳細的使用指南
|
||||||
|
- 💬 **即時討論?** → [Telegram 群組](https://t.me/bu2fly) - 與社群成員實時交流
|
||||||
|
|
||||||
|
### 🎯 參與貢獻
|
||||||
|
|
||||||
|
想要讓 Butterfly 變得更好嗎?我們歡迎您的任何形式的貢獻:
|
||||||
|
|
||||||
|
- **🔧 代碼貢獻** - 修復 Bug、添加新功能、優化性能
|
||||||
|
- **📝 文檔完善** - 改進文檔、翻譯內容、撰寫教程
|
||||||
|
- **🎨 設計建議** - UI/UX 改進、主題配色、圖示設計
|
||||||
|
- **🧪 測試反饋** - 測試新功能、回報問題、提供使用體驗
|
||||||
|
- **💰 資金支援** - [贊助項目](https://buy.stripe.com/3cs6rP6YA91sbbG5kk) - 支持長期發展
|
||||||
|
|
||||||
|
## 📄 授權條款
|
||||||
|
|
||||||
|
本專案採用 [Apache 2.0](LICENSE) 授權條款。
|
||||||
|
|
||||||
|
## 🙏 致敬與感謝
|
||||||
|
|
||||||
|
本主題基於 [hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody) 進行開發,感謝原作者的精彩創作為我們提供了靈感與基礎!
|
||||||
|
|
||||||
|
感謝所有為 Butterfly 主題發展做出貢獻的朋友們,是你們的支持讓這個主題能夠不斷完善與進步。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
**✨ 如果這個主題對您有幫助,請給我們一個 ⭐ Star!✨**
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1033,7 +1033,7 @@ Open_Graph_meta:
|
|||||||
|
|
||||||
# Structured Data
|
# Structured Data
|
||||||
# https://developers.google.com/search/docs/guides/intro-structured-data
|
# https://developers.google.com/search/docs/guides/intro-structured-data
|
||||||
structured_data: true
|
structured_data: false
|
||||||
|
|
||||||
# Add the vendor prefixes to ensure compatibility
|
# Add the vendor prefixes to ensure compatibility
|
||||||
css_prefix: true
|
css_prefix: true
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ if theme.aside.card_tags.enable
|
|||||||
- limit = limit === 0 ? 0 : limit || 40
|
- limit = limit === 0 ? 0 : limit || 40
|
||||||
|
|
||||||
if theme.aside.card_tags.color
|
if theme.aside.card_tags.color
|
||||||
.card-tag-cloud!= cloudTags({source: site.tags, orderby: orderby, order: order, minfontsize: 1.15, maxfontsize: 1.45, limit: limit, unit: 'em'})
|
.card-tag-cloud!= cloudTags({source: site.tags, orderby: orderby, order: order, minfontsize: 1.15, maxfontsize: 1.45, limit: limit, unit: 'em', page: 'index'})
|
||||||
else
|
else
|
||||||
.card-tag-cloud!= tagcloud({orderby: orderby, order: order, min_font: 1.1, max_font: 1.5, amount: limit , color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'})
|
.card-tag-cloud!= tagcloud({orderby: orderby, order: order, min_font: 1.1, max_font: 1.5, amount: limit , color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "5.4.3",
|
"version": "5.5.0-b1",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"hexo-renderer-pug": "^3.0.0",
|
"hexo-renderer-pug": "^3.0.0",
|
||||||
"hexo-renderer-stylus": "^3.0.1",
|
"hexo-renderer-stylus": "^3.0.1",
|
||||||
"hexo-util": "^3.3.0",
|
"hexo-util": "^3.3.0",
|
||||||
"moment-timezone": "^0.5.48"
|
"moment-timezone": "^0.6.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://butterfly.js.org/",
|
"homepage": "https://butterfly.js.org/",
|
||||||
"author": "Jerry <my@crazywong.com>",
|
"author": "Jerry <my@crazywong.com>",
|
||||||
|
|||||||
590
scripts/common/default_config.js
Normal file
590
scripts/common/default_config.js
Normal file
@@ -0,0 +1,590 @@
|
|||||||
|
// Butterfly 主題默認配置
|
||||||
|
// Default configuration for Butterfly theme
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
nav: {
|
||||||
|
logo: null,
|
||||||
|
display_title: true,
|
||||||
|
display_post_title: true,
|
||||||
|
fixed: false
|
||||||
|
},
|
||||||
|
menu: null,
|
||||||
|
code_blocks: {
|
||||||
|
theme: 'light',
|
||||||
|
macStyle: false,
|
||||||
|
height_limit: false,
|
||||||
|
word_wrap: false,
|
||||||
|
copy: true,
|
||||||
|
language: true,
|
||||||
|
shrink: false,
|
||||||
|
fullpage: false
|
||||||
|
},
|
||||||
|
social: null,
|
||||||
|
favicon: '/img/favicon.png',
|
||||||
|
avatar: {
|
||||||
|
img: '/img/butterfly-icon.png',
|
||||||
|
effect: false
|
||||||
|
},
|
||||||
|
disable_top_img: false,
|
||||||
|
default_top_img: null,
|
||||||
|
index_img: null,
|
||||||
|
archive_img: null,
|
||||||
|
tag_img: null,
|
||||||
|
tag_per_img: null,
|
||||||
|
category_img: null,
|
||||||
|
category_per_img: null,
|
||||||
|
footer_img: false,
|
||||||
|
background: null,
|
||||||
|
cover: {
|
||||||
|
index_enable: true,
|
||||||
|
aside_enable: true,
|
||||||
|
archives_enable: true,
|
||||||
|
default_cover: null
|
||||||
|
},
|
||||||
|
error_img: {
|
||||||
|
flink: '/img/friend_404.gif',
|
||||||
|
post_page: '/img/404.jpg'
|
||||||
|
},
|
||||||
|
error_404: {
|
||||||
|
enable: false,
|
||||||
|
subtitle: 'Page Not Found',
|
||||||
|
background: '/img/error-page.png'
|
||||||
|
},
|
||||||
|
post_meta: {
|
||||||
|
page: {
|
||||||
|
date_type: 'created',
|
||||||
|
date_format: 'date',
|
||||||
|
categories: true,
|
||||||
|
tags: false,
|
||||||
|
label: true
|
||||||
|
},
|
||||||
|
post: {
|
||||||
|
position: 'left',
|
||||||
|
date_type: 'both',
|
||||||
|
date_format: 'date',
|
||||||
|
categories: true,
|
||||||
|
tags: true,
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
index_site_info_top: null,
|
||||||
|
index_top_img_height: null,
|
||||||
|
subtitle: {
|
||||||
|
enable: false,
|
||||||
|
effect: true,
|
||||||
|
typed_option: null,
|
||||||
|
source: false,
|
||||||
|
sub: null
|
||||||
|
},
|
||||||
|
index_layout: 3,
|
||||||
|
index_post_content: {
|
||||||
|
method: 3,
|
||||||
|
length: 500
|
||||||
|
},
|
||||||
|
toc: {
|
||||||
|
post: true,
|
||||||
|
page: false,
|
||||||
|
number: true,
|
||||||
|
expand: false,
|
||||||
|
style_simple: false,
|
||||||
|
scroll_percent: true
|
||||||
|
},
|
||||||
|
post_copyright: {
|
||||||
|
enable: true,
|
||||||
|
decode: false,
|
||||||
|
author_href: null,
|
||||||
|
license: 'CC BY-NC-SA 4.0',
|
||||||
|
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/'
|
||||||
|
},
|
||||||
|
reward: {
|
||||||
|
enable: false,
|
||||||
|
text: null,
|
||||||
|
QR_code: null
|
||||||
|
},
|
||||||
|
post_edit: {
|
||||||
|
enable: false,
|
||||||
|
url: null
|
||||||
|
},
|
||||||
|
related_post: {
|
||||||
|
enable: true,
|
||||||
|
limit: 6,
|
||||||
|
date_type: 'created'
|
||||||
|
},
|
||||||
|
post_pagination: 1,
|
||||||
|
noticeOutdate: {
|
||||||
|
enable: false,
|
||||||
|
style: 'flat',
|
||||||
|
limit_day: 365,
|
||||||
|
position: 'top',
|
||||||
|
message_prev: 'It has been',
|
||||||
|
message_next: 'days since the last update, the content of the article may be outdated.'
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
nav: null,
|
||||||
|
owner: {
|
||||||
|
enable: true,
|
||||||
|
since: 2025
|
||||||
|
},
|
||||||
|
copyright: {
|
||||||
|
enable: true,
|
||||||
|
version: true
|
||||||
|
},
|
||||||
|
custom_text: null
|
||||||
|
},
|
||||||
|
aside: {
|
||||||
|
enable: true,
|
||||||
|
hide: false,
|
||||||
|
button: true,
|
||||||
|
mobile: true,
|
||||||
|
position: 'right',
|
||||||
|
display: {
|
||||||
|
archive: true,
|
||||||
|
tag: true,
|
||||||
|
category: true
|
||||||
|
},
|
||||||
|
card_author: {
|
||||||
|
enable: true,
|
||||||
|
description: null,
|
||||||
|
button: {
|
||||||
|
enable: true,
|
||||||
|
icon: 'fab fa-github',
|
||||||
|
text: 'Follow Me',
|
||||||
|
link: 'https://github.com/xxxxxx'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
card_announcement: {
|
||||||
|
enable: true,
|
||||||
|
content: 'This is my Blog'
|
||||||
|
},
|
||||||
|
card_recent_post: {
|
||||||
|
enable: true,
|
||||||
|
limit: 5,
|
||||||
|
sort: 'date',
|
||||||
|
sort_order: null
|
||||||
|
},
|
||||||
|
card_newest_comments: {
|
||||||
|
enable: false,
|
||||||
|
sort_order: null,
|
||||||
|
limit: 6,
|
||||||
|
storage: 10,
|
||||||
|
avatar: true
|
||||||
|
},
|
||||||
|
card_categories: {
|
||||||
|
enable: true,
|
||||||
|
limit: 8,
|
||||||
|
expand: 'none',
|
||||||
|
sort_order: null
|
||||||
|
},
|
||||||
|
card_tags: {
|
||||||
|
enable: true,
|
||||||
|
limit: 40,
|
||||||
|
color: false,
|
||||||
|
orderby: 'random',
|
||||||
|
order: 1,
|
||||||
|
sort_order: null
|
||||||
|
},
|
||||||
|
card_archives: {
|
||||||
|
enable: true,
|
||||||
|
type: 'monthly',
|
||||||
|
format: 'MMMM YYYY',
|
||||||
|
order: -1,
|
||||||
|
limit: 8,
|
||||||
|
sort_order: null
|
||||||
|
},
|
||||||
|
card_post_series: {
|
||||||
|
enable: true,
|
||||||
|
series_title: false,
|
||||||
|
orderBy: 'date',
|
||||||
|
order: -1
|
||||||
|
},
|
||||||
|
card_webinfo: {
|
||||||
|
enable: true,
|
||||||
|
post_count: true,
|
||||||
|
last_push_date: true,
|
||||||
|
sort_order: null,
|
||||||
|
runtime_date: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rightside_bottom: null,
|
||||||
|
translate: {
|
||||||
|
enable: false,
|
||||||
|
default: '繁',
|
||||||
|
defaultEncoding: 2,
|
||||||
|
translateDelay: 0,
|
||||||
|
msgToTraditionalChinese: '繁',
|
||||||
|
msgToSimplifiedChinese: '簡'
|
||||||
|
},
|
||||||
|
readmode: true,
|
||||||
|
darkmode: {
|
||||||
|
enable: true,
|
||||||
|
button: true,
|
||||||
|
autoChangeMode: false,
|
||||||
|
start: null,
|
||||||
|
end: null
|
||||||
|
},
|
||||||
|
rightside_scroll_percent: false,
|
||||||
|
rightside_item_order: {
|
||||||
|
enable: false,
|
||||||
|
hide: null,
|
||||||
|
show: null
|
||||||
|
},
|
||||||
|
rightside_config_animation: true,
|
||||||
|
anchor: {
|
||||||
|
auto_update: false,
|
||||||
|
click_to_scroll: false
|
||||||
|
},
|
||||||
|
photofigcaption: false,
|
||||||
|
copy: {
|
||||||
|
enable: true,
|
||||||
|
copyright: {
|
||||||
|
enable: false,
|
||||||
|
limit_count: 150
|
||||||
|
}
|
||||||
|
},
|
||||||
|
wordcount: {
|
||||||
|
enable: false,
|
||||||
|
post_wordcount: true,
|
||||||
|
min2read: true,
|
||||||
|
total_wordcount: true
|
||||||
|
},
|
||||||
|
busuanzi: {
|
||||||
|
site_uv: true,
|
||||||
|
site_pv: true,
|
||||||
|
page_pv: true
|
||||||
|
},
|
||||||
|
math: {
|
||||||
|
use: null,
|
||||||
|
per_page: true,
|
||||||
|
hide_scrollbar: false,
|
||||||
|
mathjax: {
|
||||||
|
enableMenu: true,
|
||||||
|
tags: 'none'
|
||||||
|
},
|
||||||
|
katex: {
|
||||||
|
copy_tex: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
use: null,
|
||||||
|
placeholder: null,
|
||||||
|
algolia_search: {
|
||||||
|
hitsPerPage: 6
|
||||||
|
},
|
||||||
|
local_search: {
|
||||||
|
preload: false,
|
||||||
|
top_n_per_article: 1,
|
||||||
|
unescape: false,
|
||||||
|
CDN: null
|
||||||
|
},
|
||||||
|
docsearch: {
|
||||||
|
appId: null,
|
||||||
|
apiKey: null,
|
||||||
|
indexName: null,
|
||||||
|
option: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
share: {
|
||||||
|
use: 'sharejs',
|
||||||
|
sharejs: {
|
||||||
|
sites: 'facebook,twitter,wechat,weibo,qq'
|
||||||
|
},
|
||||||
|
addtoany: {
|
||||||
|
item: 'facebook,twitter,wechat,sina_weibo,facebook_messenger,email,copy_link'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
comments: {
|
||||||
|
use: null,
|
||||||
|
text: true,
|
||||||
|
lazyload: false,
|
||||||
|
count: false,
|
||||||
|
card_post_count: false
|
||||||
|
},
|
||||||
|
disqus: {
|
||||||
|
shortname: null,
|
||||||
|
apikey: null
|
||||||
|
},
|
||||||
|
disqusjs: {
|
||||||
|
shortname: null,
|
||||||
|
apikey: null,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
livere: {
|
||||||
|
uid: null
|
||||||
|
},
|
||||||
|
gitalk: {
|
||||||
|
client_id: null,
|
||||||
|
client_secret: null,
|
||||||
|
repo: null,
|
||||||
|
owner: null,
|
||||||
|
admin: null,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
valine: {
|
||||||
|
appId: null,
|
||||||
|
appKey: null,
|
||||||
|
avatar: 'monsterid',
|
||||||
|
serverURLs: null,
|
||||||
|
bg: null,
|
||||||
|
visitor: false,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
waline: {
|
||||||
|
serverURL: null,
|
||||||
|
bg: null,
|
||||||
|
pageview: false,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
utterances: {
|
||||||
|
repo: null,
|
||||||
|
issue_term: 'pathname',
|
||||||
|
light_theme: 'github-light',
|
||||||
|
dark_theme: 'photon-dark',
|
||||||
|
js: null,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
facebook_comments: {
|
||||||
|
app_id: null,
|
||||||
|
user_id: null,
|
||||||
|
pageSize: 10,
|
||||||
|
order_by: 'social',
|
||||||
|
lang: 'en_US'
|
||||||
|
},
|
||||||
|
twikoo: {
|
||||||
|
envId: null,
|
||||||
|
region: null,
|
||||||
|
visitor: false,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
giscus: {
|
||||||
|
repo: null,
|
||||||
|
repo_id: null,
|
||||||
|
category_id: null,
|
||||||
|
light_theme: 'light',
|
||||||
|
dark_theme: 'dark',
|
||||||
|
js: null,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
remark42: {
|
||||||
|
host: null,
|
||||||
|
siteId: null,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
artalk: {
|
||||||
|
server: null,
|
||||||
|
site: null,
|
||||||
|
visitor: false,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
chat: {
|
||||||
|
use: null,
|
||||||
|
rightside_button: false,
|
||||||
|
button_hide_show: false
|
||||||
|
},
|
||||||
|
chatra: {
|
||||||
|
id: null
|
||||||
|
},
|
||||||
|
tidio: {
|
||||||
|
public_key: null
|
||||||
|
},
|
||||||
|
crisp: {
|
||||||
|
website_id: null
|
||||||
|
},
|
||||||
|
google_tag_manager: {
|
||||||
|
tag_id: null,
|
||||||
|
domain: 'https://www.googletagmanager.com'
|
||||||
|
},
|
||||||
|
baidu_analytics: null,
|
||||||
|
google_analytics: null,
|
||||||
|
cloudflare_analytics: null,
|
||||||
|
microsoft_clarity: null,
|
||||||
|
umami_analytics: {
|
||||||
|
enable: false,
|
||||||
|
serverURL: null,
|
||||||
|
website_id: null,
|
||||||
|
option: null,
|
||||||
|
UV_PV: {
|
||||||
|
site_uv: false,
|
||||||
|
site_pv: false,
|
||||||
|
page_pv: false,
|
||||||
|
token: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
google_adsense: {
|
||||||
|
enable: false,
|
||||||
|
auto_ads: true,
|
||||||
|
js: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
|
||||||
|
client: null,
|
||||||
|
enable_page_level_ads: true
|
||||||
|
},
|
||||||
|
ad: {
|
||||||
|
index: null,
|
||||||
|
aside: null,
|
||||||
|
post: null
|
||||||
|
},
|
||||||
|
site_verification: null,
|
||||||
|
category_ui: null,
|
||||||
|
tag_ui: null,
|
||||||
|
rounded_corners_ui: true,
|
||||||
|
text_align_justify: false,
|
||||||
|
mask: {
|
||||||
|
header: true,
|
||||||
|
footer: true
|
||||||
|
},
|
||||||
|
preloader: {
|
||||||
|
enable: false,
|
||||||
|
source: 1,
|
||||||
|
pace_css_url: null
|
||||||
|
},
|
||||||
|
enter_transitions: true,
|
||||||
|
display_mode: 'light',
|
||||||
|
beautify: {
|
||||||
|
enable: false,
|
||||||
|
field: 'post',
|
||||||
|
title_prefix_icon: null,
|
||||||
|
title_prefix_icon_color: null
|
||||||
|
},
|
||||||
|
font: {
|
||||||
|
global_font_size: null,
|
||||||
|
code_font_size: null,
|
||||||
|
font_family: null,
|
||||||
|
code_font_family: null
|
||||||
|
},
|
||||||
|
blog_title_font: {
|
||||||
|
font_link: null,
|
||||||
|
font_family: null
|
||||||
|
},
|
||||||
|
hr_icon: {
|
||||||
|
enable: true,
|
||||||
|
icon: null,
|
||||||
|
icon_top: null
|
||||||
|
},
|
||||||
|
activate_power_mode: {
|
||||||
|
enable: false,
|
||||||
|
colorful: true,
|
||||||
|
shake: true,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
canvas_ribbon: {
|
||||||
|
enable: false,
|
||||||
|
size: 150,
|
||||||
|
alpha: 0.6,
|
||||||
|
zIndex: -1,
|
||||||
|
click_to_change: false,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
canvas_fluttering_ribbon: {
|
||||||
|
enable: false,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
canvas_nest: {
|
||||||
|
enable: false,
|
||||||
|
color: '0,0,255',
|
||||||
|
opacity: 0.7,
|
||||||
|
zIndex: -1,
|
||||||
|
count: 99,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
fireworks: {
|
||||||
|
enable: false,
|
||||||
|
zIndex: 9999,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
click_heart: {
|
||||||
|
enable: false,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
clickShowText: {
|
||||||
|
enable: false,
|
||||||
|
text: null,
|
||||||
|
fontSize: '15px',
|
||||||
|
random: false,
|
||||||
|
mobile: false
|
||||||
|
},
|
||||||
|
lightbox: null,
|
||||||
|
series: {
|
||||||
|
enable: false,
|
||||||
|
orderBy: 'title',
|
||||||
|
order: 1,
|
||||||
|
number: true
|
||||||
|
},
|
||||||
|
abcjs: {
|
||||||
|
enable: false,
|
||||||
|
per_page: true
|
||||||
|
},
|
||||||
|
mermaid: {
|
||||||
|
enable: false,
|
||||||
|
code_write: false,
|
||||||
|
theme: {
|
||||||
|
light: 'default',
|
||||||
|
dark: 'dark'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chartjs: {
|
||||||
|
enable: false,
|
||||||
|
fontColor: {
|
||||||
|
light: 'rgba(0, 0, 0, 0.8)',
|
||||||
|
dark: 'rgba(255, 255, 255, 0.8)'
|
||||||
|
},
|
||||||
|
borderColor: {
|
||||||
|
light: 'rgba(0, 0, 0, 0.1)',
|
||||||
|
dark: 'rgba(255, 255, 255, 0.2)'
|
||||||
|
},
|
||||||
|
scale_ticks_backdropColor: {
|
||||||
|
light: 'transparent',
|
||||||
|
dark: 'transparent'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
note: {
|
||||||
|
style: 'flat',
|
||||||
|
icons: true,
|
||||||
|
border_radius: 3,
|
||||||
|
light_bg_offset: 0
|
||||||
|
},
|
||||||
|
pjax: {
|
||||||
|
enable: false,
|
||||||
|
exclude: null
|
||||||
|
},
|
||||||
|
aplayerInject: {
|
||||||
|
enable: false,
|
||||||
|
per_page: true
|
||||||
|
},
|
||||||
|
snackbar: {
|
||||||
|
enable: false,
|
||||||
|
position: 'bottom-left',
|
||||||
|
bg_light: '#49b1f5',
|
||||||
|
bg_dark: '#1f1f1f'
|
||||||
|
},
|
||||||
|
instantpage: false,
|
||||||
|
lazyload: {
|
||||||
|
enable: false,
|
||||||
|
native: false,
|
||||||
|
field: 'site',
|
||||||
|
placeholder: null,
|
||||||
|
blur: false
|
||||||
|
},
|
||||||
|
pwa: {
|
||||||
|
enable: false,
|
||||||
|
manifest: null,
|
||||||
|
apple_touch_icon: null,
|
||||||
|
favicon_32_32: null,
|
||||||
|
favicon_16_16: null,
|
||||||
|
mask_icon: null
|
||||||
|
},
|
||||||
|
Open_Graph_meta: {
|
||||||
|
enable: true,
|
||||||
|
option: null
|
||||||
|
},
|
||||||
|
structured_data: false,
|
||||||
|
css_prefix: true,
|
||||||
|
inject: {
|
||||||
|
head: null,
|
||||||
|
bottom: null
|
||||||
|
},
|
||||||
|
CDN: {
|
||||||
|
internal_provider: 'local',
|
||||||
|
third_party_provider: 'jsdelivr',
|
||||||
|
version: false,
|
||||||
|
custom_format: null,
|
||||||
|
option: null
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/**
|
|
||||||
* Capitalize the first letter of comment name
|
|
||||||
*/
|
|
||||||
|
|
||||||
hexo.extend.filter.register('before_generate', () => {
|
|
||||||
const themeConfig = hexo.theme.config
|
|
||||||
let { use } = themeConfig.comments
|
|
||||||
if (!use) return
|
|
||||||
|
|
||||||
// Make sure use is an array
|
|
||||||
use = Array.isArray(use) ? use : use.split(',')
|
|
||||||
|
|
||||||
// Capitalize the first letter of each comment name
|
|
||||||
use = use.map(item =>
|
|
||||||
item.trim().toLowerCase().replace(/\b[a-z]/g, s => s.toUpperCase())
|
|
||||||
)
|
|
||||||
|
|
||||||
// Disqus and Disqusjs conflict, only keep the first one
|
|
||||||
if (use.includes('Disqus') && use.includes('Disqusjs')) {
|
|
||||||
use = [use[0]]
|
|
||||||
}
|
|
||||||
|
|
||||||
themeConfig.comments.use = use
|
|
||||||
})
|
|
||||||
@@ -1,20 +1,87 @@
|
|||||||
hexo.extend.filter.register('before_generate', () => {
|
const { deepMerge } = require('hexo-util')
|
||||||
// Get first two digits of the Hexo version number
|
const path = require('path')
|
||||||
const { version, log, locals } = hexo
|
const fs = require('fs')
|
||||||
const hexoVer = version.replace(/(^.*\..*)\..*/, '$1')
|
|
||||||
|
// Cache default config to avoid repeated file reads
|
||||||
if (hexoVer < 5.3) {
|
let cachedDefaultConfig = null
|
||||||
log.error('Please update Hexo to V5.3.0 or higher!')
|
|
||||||
log.error('請把 Hexo 升級到 V5.3.0 或更高的版本!')
|
/**
|
||||||
process.exit(-1)
|
* Check Hexo version and configuration
|
||||||
}
|
*/
|
||||||
|
function checkHexoEnvironment (hexo) {
|
||||||
if (locals.get) {
|
const { version, log, locals } = hexo
|
||||||
const data = locals.get('data')
|
|
||||||
if (data && data.butterfly) {
|
const [major, minor] = version.split('.').map(Number)
|
||||||
log.error("'butterfly.yml' is deprecated. Please use '_config.butterfly.yml'")
|
const requiredMajor = 5
|
||||||
log.error("'butterfly.yml' 已經棄用,請使用 '_config.butterfly.yml'")
|
const requiredMinor = 3
|
||||||
process.exit(-1)
|
|
||||||
}
|
if (major < requiredMajor || (major === requiredMajor && minor < requiredMinor)) {
|
||||||
}
|
log.error('Please update Hexo to V5.3.0 or higher!')
|
||||||
})
|
log.error('請把 Hexo 升級到 V5.3.0 或更高的版本!')
|
||||||
|
process.exit(-1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for deprecated configuration file
|
||||||
|
if (locals.get) {
|
||||||
|
const data = locals.get('data')
|
||||||
|
if (data && data.butterfly) {
|
||||||
|
log.error("'butterfly.yml' is deprecated. Please use '_config.butterfly.yml'")
|
||||||
|
log.error("'butterfly.yml' 已經棄用,請使用 '_config.butterfly.yml'")
|
||||||
|
process.exit(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load default configuration
|
||||||
|
*/
|
||||||
|
function loadDefaultConfig () {
|
||||||
|
if (cachedDefaultConfig) {
|
||||||
|
return cachedDefaultConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
const configPath = path.join(__dirname, '../common/default_config.js')
|
||||||
|
cachedDefaultConfig = require(configPath)
|
||||||
|
return cachedDefaultConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process comment system configuration
|
||||||
|
*/
|
||||||
|
function processCommentConfig (themeConfig) {
|
||||||
|
const { comments } = themeConfig
|
||||||
|
if (!comments || !comments.use) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let { use } = comments
|
||||||
|
|
||||||
|
if (!Array.isArray(use)) {
|
||||||
|
use = typeof use === 'string' ? use.split(',') : [use]
|
||||||
|
}
|
||||||
|
|
||||||
|
use = use
|
||||||
|
.map(item => {
|
||||||
|
if (typeof item !== 'string') return item
|
||||||
|
return item.trim().toLowerCase().replace(/\b[a-z]/g, s => s.toUpperCase())
|
||||||
|
})
|
||||||
|
.filter(Boolean)
|
||||||
|
|
||||||
|
// Handle Disqus and Disqusjs conflict
|
||||||
|
if (use.includes('Disqus') && use.includes('Disqusjs')) {
|
||||||
|
hexo.log.warn('Disqus and Disqusjs conflict detected, keeping only the first one')
|
||||||
|
hexo.log.warn('檢測到 Disqus 和 Disqusjs 衝突,只保留第一個')
|
||||||
|
use = [use[0]]
|
||||||
|
}
|
||||||
|
|
||||||
|
themeConfig.comments.use = use
|
||||||
|
}
|
||||||
|
|
||||||
|
hexo.extend.filter.register('before_generate', () => {
|
||||||
|
checkHexoEnvironment(hexo)
|
||||||
|
|
||||||
|
const defaultConfig = loadDefaultConfig()
|
||||||
|
hexo.theme.config = deepMerge(defaultConfig, hexo.theme.config)
|
||||||
|
|
||||||
|
processCommentConfig(hexo.theme.config)
|
||||||
|
}, 1)
|
||||||
|
|||||||
@@ -1,593 +0,0 @@
|
|||||||
const { deepMerge } = require('hexo-util')
|
|
||||||
|
|
||||||
hexo.extend.filter.register('before_generate', () => {
|
|
||||||
const defaultConfig = {
|
|
||||||
nav: {
|
|
||||||
logo: null,
|
|
||||||
display_title: true,
|
|
||||||
display_post_title: true,
|
|
||||||
fixed: false
|
|
||||||
},
|
|
||||||
menu: null,
|
|
||||||
code_blocks: {
|
|
||||||
theme: 'light',
|
|
||||||
macStyle: false,
|
|
||||||
height_limit: false,
|
|
||||||
word_wrap: false,
|
|
||||||
copy: true,
|
|
||||||
language: true,
|
|
||||||
shrink: false,
|
|
||||||
fullpage: false
|
|
||||||
},
|
|
||||||
social: null,
|
|
||||||
favicon: '/img/favicon.png',
|
|
||||||
avatar: {
|
|
||||||
img: '/img/butterfly-icon.png',
|
|
||||||
effect: false
|
|
||||||
},
|
|
||||||
disable_top_img: false,
|
|
||||||
default_top_img: null,
|
|
||||||
index_img: null,
|
|
||||||
archive_img: null,
|
|
||||||
tag_img: null,
|
|
||||||
tag_per_img: null,
|
|
||||||
category_img: null,
|
|
||||||
category_per_img: null,
|
|
||||||
footer_img: false,
|
|
||||||
background: null,
|
|
||||||
cover: {
|
|
||||||
index_enable: true,
|
|
||||||
aside_enable: true,
|
|
||||||
archives_enable: true,
|
|
||||||
default_cover: null
|
|
||||||
},
|
|
||||||
error_img: {
|
|
||||||
flink: '/img/friend_404.gif',
|
|
||||||
post_page: '/img/404.jpg'
|
|
||||||
},
|
|
||||||
error_404: {
|
|
||||||
enable: false,
|
|
||||||
subtitle: 'Page Not Found',
|
|
||||||
background: '/img/error-page.png'
|
|
||||||
},
|
|
||||||
post_meta: {
|
|
||||||
page: {
|
|
||||||
date_type: 'created',
|
|
||||||
date_format: 'date',
|
|
||||||
categories: true,
|
|
||||||
tags: false,
|
|
||||||
label: true
|
|
||||||
},
|
|
||||||
post: {
|
|
||||||
position: 'left',
|
|
||||||
date_type: 'both',
|
|
||||||
date_format: 'date',
|
|
||||||
categories: true,
|
|
||||||
tags: true,
|
|
||||||
label: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
index_site_info_top: null,
|
|
||||||
index_top_img_height: null,
|
|
||||||
subtitle: {
|
|
||||||
enable: false,
|
|
||||||
effect: true,
|
|
||||||
typed_option: null,
|
|
||||||
source: false,
|
|
||||||
sub: null
|
|
||||||
},
|
|
||||||
index_layout: 3,
|
|
||||||
index_post_content: {
|
|
||||||
method: 3,
|
|
||||||
length: 500
|
|
||||||
},
|
|
||||||
toc: {
|
|
||||||
post: true,
|
|
||||||
page: false,
|
|
||||||
number: true,
|
|
||||||
expand: false,
|
|
||||||
style_simple: false,
|
|
||||||
scroll_percent: true
|
|
||||||
},
|
|
||||||
post_copyright: {
|
|
||||||
enable: true,
|
|
||||||
decode: false,
|
|
||||||
author_href: null,
|
|
||||||
license: 'CC BY-NC-SA 4.0',
|
|
||||||
license_url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/'
|
|
||||||
},
|
|
||||||
reward: {
|
|
||||||
enable: false,
|
|
||||||
text: null,
|
|
||||||
QR_code: null
|
|
||||||
},
|
|
||||||
post_edit: {
|
|
||||||
enable: false,
|
|
||||||
url: null
|
|
||||||
},
|
|
||||||
related_post: {
|
|
||||||
enable: true,
|
|
||||||
limit: 6,
|
|
||||||
date_type: 'created'
|
|
||||||
},
|
|
||||||
post_pagination: 1,
|
|
||||||
noticeOutdate: {
|
|
||||||
enable: false,
|
|
||||||
style: 'flat',
|
|
||||||
limit_day: 365,
|
|
||||||
position: 'top',
|
|
||||||
message_prev: 'It has been',
|
|
||||||
message_next: 'days since the last update, the content of the article may be outdated.'
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
nav: null,
|
|
||||||
owner: {
|
|
||||||
enable: true,
|
|
||||||
since: 2024
|
|
||||||
},
|
|
||||||
copyright: {
|
|
||||||
enable: true,
|
|
||||||
version: true
|
|
||||||
},
|
|
||||||
custom_text: null
|
|
||||||
},
|
|
||||||
aside: {
|
|
||||||
enable: true,
|
|
||||||
hide: false,
|
|
||||||
button: true,
|
|
||||||
mobile: true,
|
|
||||||
position: 'right',
|
|
||||||
display: {
|
|
||||||
archive: true,
|
|
||||||
tag: true,
|
|
||||||
category: true
|
|
||||||
},
|
|
||||||
card_author: {
|
|
||||||
enable: true,
|
|
||||||
description: null,
|
|
||||||
button: {
|
|
||||||
enable: true,
|
|
||||||
icon: 'fab fa-github',
|
|
||||||
text: 'Follow Me',
|
|
||||||
link: 'https://github.com/xxxxxx'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
card_announcement: {
|
|
||||||
enable: true,
|
|
||||||
content: 'This is my Blog'
|
|
||||||
},
|
|
||||||
card_recent_post: {
|
|
||||||
enable: true,
|
|
||||||
limit: 5,
|
|
||||||
sort: 'date',
|
|
||||||
sort_order: null
|
|
||||||
},
|
|
||||||
card_newest_comments: {
|
|
||||||
enable: false,
|
|
||||||
sort_order: null,
|
|
||||||
limit: 6,
|
|
||||||
storage: 10,
|
|
||||||
avatar: true
|
|
||||||
},
|
|
||||||
card_categories: {
|
|
||||||
enable: true,
|
|
||||||
limit: 8,
|
|
||||||
expand: 'none',
|
|
||||||
sort_order: null
|
|
||||||
},
|
|
||||||
card_tags: {
|
|
||||||
enable: true,
|
|
||||||
limit: 40,
|
|
||||||
color: false,
|
|
||||||
orderby: 'random',
|
|
||||||
order: 1,
|
|
||||||
sort_order: null
|
|
||||||
},
|
|
||||||
card_archives: {
|
|
||||||
enable: true,
|
|
||||||
type: 'monthly',
|
|
||||||
format: 'MMMM YYYY',
|
|
||||||
order: -1,
|
|
||||||
limit: 8,
|
|
||||||
sort_order: null
|
|
||||||
},
|
|
||||||
card_post_series: {
|
|
||||||
enable: true,
|
|
||||||
series_title: false,
|
|
||||||
orderBy: 'date',
|
|
||||||
order: -1
|
|
||||||
},
|
|
||||||
card_webinfo: {
|
|
||||||
enable: true,
|
|
||||||
post_count: true,
|
|
||||||
last_push_date: true,
|
|
||||||
sort_order: null,
|
|
||||||
runtime_date: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rightside_bottom: null,
|
|
||||||
translate: {
|
|
||||||
enable: false,
|
|
||||||
default: '繁',
|
|
||||||
defaultEncoding: 2,
|
|
||||||
translateDelay: 0,
|
|
||||||
msgToTraditionalChinese: '繁',
|
|
||||||
msgToSimplifiedChinese: '簡'
|
|
||||||
},
|
|
||||||
readmode: true,
|
|
||||||
darkmode: {
|
|
||||||
enable: true,
|
|
||||||
button: true,
|
|
||||||
autoChangeMode: false,
|
|
||||||
start: null,
|
|
||||||
end: null
|
|
||||||
},
|
|
||||||
rightside_scroll_percent: false,
|
|
||||||
rightside_item_order: {
|
|
||||||
enable: false,
|
|
||||||
hide: null,
|
|
||||||
show: null
|
|
||||||
},
|
|
||||||
rightside_config_animation: true,
|
|
||||||
anchor: {
|
|
||||||
auto_update: false,
|
|
||||||
click_to_scroll: false
|
|
||||||
},
|
|
||||||
photofigcaption: false,
|
|
||||||
copy: {
|
|
||||||
enable: true,
|
|
||||||
copyright: {
|
|
||||||
enable: false,
|
|
||||||
limit_count: 150
|
|
||||||
}
|
|
||||||
},
|
|
||||||
wordcount: {
|
|
||||||
enable: false,
|
|
||||||
post_wordcount: true,
|
|
||||||
min2read: true,
|
|
||||||
total_wordcount: true
|
|
||||||
},
|
|
||||||
busuanzi: {
|
|
||||||
site_uv: true,
|
|
||||||
site_pv: true,
|
|
||||||
page_pv: true
|
|
||||||
},
|
|
||||||
math: {
|
|
||||||
use: null,
|
|
||||||
per_page: true,
|
|
||||||
hide_scrollbar: false,
|
|
||||||
mathjax: {
|
|
||||||
enableMenu: true,
|
|
||||||
tags: 'none'
|
|
||||||
},
|
|
||||||
katex: {
|
|
||||||
copy_tex: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
search: {
|
|
||||||
use: null,
|
|
||||||
placeholder: null,
|
|
||||||
algolia_search: {
|
|
||||||
hitsPerPage: 6
|
|
||||||
},
|
|
||||||
local_search: {
|
|
||||||
preload: false,
|
|
||||||
top_n_per_article: 1,
|
|
||||||
unescape: false,
|
|
||||||
CDN: null
|
|
||||||
},
|
|
||||||
docsearch: {
|
|
||||||
appId: null,
|
|
||||||
apiKey: null,
|
|
||||||
indexName: null,
|
|
||||||
option: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
share: {
|
|
||||||
use: 'sharejs',
|
|
||||||
sharejs: {
|
|
||||||
sites: 'facebook,twitter,wechat,weibo,qq'
|
|
||||||
},
|
|
||||||
addtoany: {
|
|
||||||
item: 'facebook,twitter,wechat,sina_weibo,facebook_messenger,email,copy_link'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
comments: {
|
|
||||||
use: null,
|
|
||||||
text: true,
|
|
||||||
lazyload: false,
|
|
||||||
count: false,
|
|
||||||
card_post_count: false
|
|
||||||
},
|
|
||||||
disqus: {
|
|
||||||
shortname: null,
|
|
||||||
apikey: null
|
|
||||||
},
|
|
||||||
disqusjs: {
|
|
||||||
shortname: null,
|
|
||||||
apikey: null,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
livere: {
|
|
||||||
uid: null
|
|
||||||
},
|
|
||||||
gitalk: {
|
|
||||||
client_id: null,
|
|
||||||
client_secret: null,
|
|
||||||
repo: null,
|
|
||||||
owner: null,
|
|
||||||
admin: null,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
valine: {
|
|
||||||
appId: null,
|
|
||||||
appKey: null,
|
|
||||||
avatar: 'monsterid',
|
|
||||||
serverURLs: null,
|
|
||||||
bg: null,
|
|
||||||
visitor: false,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
waline: {
|
|
||||||
serverURL: null,
|
|
||||||
bg: null,
|
|
||||||
pageview: false,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
utterances: {
|
|
||||||
repo: null,
|
|
||||||
issue_term: 'pathname',
|
|
||||||
light_theme: 'github-light',
|
|
||||||
dark_theme: 'photon-dark',
|
|
||||||
js: null,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
facebook_comments: {
|
|
||||||
app_id: null,
|
|
||||||
user_id: null,
|
|
||||||
pageSize: 10,
|
|
||||||
order_by: 'social',
|
|
||||||
lang: 'en_US'
|
|
||||||
},
|
|
||||||
twikoo: {
|
|
||||||
envId: null,
|
|
||||||
region: null,
|
|
||||||
visitor: false,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
giscus: {
|
|
||||||
repo: null,
|
|
||||||
repo_id: null,
|
|
||||||
category_id: null,
|
|
||||||
light_theme: 'light',
|
|
||||||
dark_theme: 'dark',
|
|
||||||
js: null,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
remark42: {
|
|
||||||
host: null,
|
|
||||||
siteId: null,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
artalk: {
|
|
||||||
server: null,
|
|
||||||
site: null,
|
|
||||||
visitor: false,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
chat: {
|
|
||||||
use: null,
|
|
||||||
rightside_button: false,
|
|
||||||
button_hide_show: false
|
|
||||||
},
|
|
||||||
chatra: {
|
|
||||||
id: null
|
|
||||||
},
|
|
||||||
tidio: {
|
|
||||||
public_key: null
|
|
||||||
},
|
|
||||||
crisp: {
|
|
||||||
website_id: null
|
|
||||||
},
|
|
||||||
google_tag_manager: {
|
|
||||||
tag_id: null,
|
|
||||||
domain: 'https://www.googletagmanager.com'
|
|
||||||
},
|
|
||||||
baidu_analytics: null,
|
|
||||||
google_analytics: null,
|
|
||||||
cloudflare_analytics: null,
|
|
||||||
microsoft_clarity: null,
|
|
||||||
umami_analytics: {
|
|
||||||
enable: false,
|
|
||||||
serverURL: null,
|
|
||||||
website_id: null,
|
|
||||||
option: null,
|
|
||||||
UV_PV: {
|
|
||||||
site_uv: false,
|
|
||||||
site_pv: false,
|
|
||||||
page_pv: false,
|
|
||||||
token: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
google_adsense: {
|
|
||||||
enable: false,
|
|
||||||
auto_ads: true,
|
|
||||||
js: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
|
|
||||||
client: null,
|
|
||||||
enable_page_level_ads: true
|
|
||||||
},
|
|
||||||
ad: {
|
|
||||||
index: null,
|
|
||||||
aside: null,
|
|
||||||
post: null
|
|
||||||
},
|
|
||||||
site_verification: null,
|
|
||||||
category_ui: null,
|
|
||||||
tag_ui: null,
|
|
||||||
rounded_corners_ui: true,
|
|
||||||
text_align_justify: false,
|
|
||||||
mask: {
|
|
||||||
header: true,
|
|
||||||
footer: true
|
|
||||||
},
|
|
||||||
preloader: {
|
|
||||||
enable: false,
|
|
||||||
source: 1,
|
|
||||||
pace_css_url: null
|
|
||||||
},
|
|
||||||
enter_transitions: true,
|
|
||||||
display_mode: 'light',
|
|
||||||
beautify: {
|
|
||||||
enable: false,
|
|
||||||
field: 'post',
|
|
||||||
title_prefix_icon: null,
|
|
||||||
title_prefix_icon_color: null
|
|
||||||
},
|
|
||||||
font: {
|
|
||||||
global_font_size: null,
|
|
||||||
code_font_size: null,
|
|
||||||
font_family: null,
|
|
||||||
code_font_family: null
|
|
||||||
},
|
|
||||||
blog_title_font: {
|
|
||||||
font_link: null,
|
|
||||||
font_family: null
|
|
||||||
},
|
|
||||||
hr_icon: {
|
|
||||||
enable: true,
|
|
||||||
icon: null,
|
|
||||||
icon_top: null
|
|
||||||
},
|
|
||||||
activate_power_mode: {
|
|
||||||
enable: false,
|
|
||||||
colorful: true,
|
|
||||||
shake: true,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
canvas_ribbon: {
|
|
||||||
enable: false,
|
|
||||||
size: 150,
|
|
||||||
alpha: 0.6,
|
|
||||||
zIndex: -1,
|
|
||||||
click_to_change: false,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
canvas_fluttering_ribbon: {
|
|
||||||
enable: false,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
canvas_nest: {
|
|
||||||
enable: false,
|
|
||||||
color: '0,0,255',
|
|
||||||
opacity: 0.7,
|
|
||||||
zIndex: -1,
|
|
||||||
count: 99,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
fireworks: {
|
|
||||||
enable: false,
|
|
||||||
zIndex: 9999,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
click_heart: {
|
|
||||||
enable: false,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
clickShowText: {
|
|
||||||
enable: false,
|
|
||||||
text: null,
|
|
||||||
fontSize: '15px',
|
|
||||||
random: false,
|
|
||||||
mobile: false
|
|
||||||
},
|
|
||||||
lightbox: null,
|
|
||||||
series: {
|
|
||||||
enable: false,
|
|
||||||
orderBy: 'title',
|
|
||||||
order: 1,
|
|
||||||
number: true
|
|
||||||
},
|
|
||||||
abcjs: {
|
|
||||||
enable: false,
|
|
||||||
per_page: true
|
|
||||||
},
|
|
||||||
mermaid: {
|
|
||||||
enable: false,
|
|
||||||
code_write: false,
|
|
||||||
theme: {
|
|
||||||
light: 'default',
|
|
||||||
dark: 'dark'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
chartjs: {
|
|
||||||
enable: false,
|
|
||||||
fontColor: {
|
|
||||||
light: 'rgba(0, 0, 0, 0.8)',
|
|
||||||
dark: 'rgba(255, 255, 255, 0.8)'
|
|
||||||
},
|
|
||||||
borderColor: {
|
|
||||||
light: 'rgba(0, 0, 0, 0.1)',
|
|
||||||
dark: 'rgba(255, 255, 255, 0.2)'
|
|
||||||
},
|
|
||||||
scale_ticks_backdropColor: {
|
|
||||||
light: 'transparent',
|
|
||||||
dark: 'transparent'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
note: {
|
|
||||||
style: 'flat',
|
|
||||||
icons: true,
|
|
||||||
border_radius: 3,
|
|
||||||
light_bg_offset: 0
|
|
||||||
},
|
|
||||||
pjax: {
|
|
||||||
enable: false,
|
|
||||||
exclude: null
|
|
||||||
},
|
|
||||||
aplayerInject: {
|
|
||||||
enable: false,
|
|
||||||
per_page: true
|
|
||||||
},
|
|
||||||
snackbar: {
|
|
||||||
enable: false,
|
|
||||||
position: 'bottom-left',
|
|
||||||
bg_light: '#49b1f5',
|
|
||||||
bg_dark: '#1f1f1f'
|
|
||||||
},
|
|
||||||
instantpage: false,
|
|
||||||
lazyload: {
|
|
||||||
enable: false,
|
|
||||||
native: false,
|
|
||||||
field: 'site',
|
|
||||||
placeholder: null,
|
|
||||||
blur: false
|
|
||||||
},
|
|
||||||
pwa: {
|
|
||||||
enable: false,
|
|
||||||
manifest: null,
|
|
||||||
apple_touch_icon: null,
|
|
||||||
favicon_32_32: null,
|
|
||||||
favicon_16_16: null,
|
|
||||||
mask_icon: null
|
|
||||||
},
|
|
||||||
Open_Graph_meta: {
|
|
||||||
enable: true,
|
|
||||||
option: null
|
|
||||||
},
|
|
||||||
structured_data: true,
|
|
||||||
css_prefix: true,
|
|
||||||
inject: {
|
|
||||||
head: null,
|
|
||||||
bottom: null
|
|
||||||
},
|
|
||||||
CDN: {
|
|
||||||
internal_provider: 'local',
|
|
||||||
third_party_provider: 'jsdelivr',
|
|
||||||
version: false,
|
|
||||||
custom_format: null,
|
|
||||||
option: null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hexo.theme.config = deepMerge(defaultConfig, hexo.theme.config)
|
|
||||||
}, 1)
|
|
||||||
@@ -13,7 +13,7 @@ hexo.extend.helper.register('postDesc', data => {
|
|||||||
|
|
||||||
hexo.extend.helper.register('cloudTags', function (options = {}) {
|
hexo.extend.helper.register('cloudTags', function (options = {}) {
|
||||||
const env = this
|
const env = this
|
||||||
let { source, minfontsize, maxfontsize, limit, unit = 'px', orderby, order } = options
|
let { source, minfontsize, maxfontsize, limit, unit = 'px', orderby, order, page = 'tags' } = options
|
||||||
|
|
||||||
if (limit > 0) {
|
if (limit > 0) {
|
||||||
source = source.limit(limit)
|
source = source.limit(limit)
|
||||||
@@ -29,14 +29,19 @@ hexo.extend.helper.register('cloudTags', function (options = {}) {
|
|||||||
return `rgb(${Math.max(r, 50)}, ${Math.max(g, 50)}, ${Math.max(b, 50)})`
|
return `rgb(${Math.max(r, 50)}, ${Math.max(g, 50)}, ${Math.max(b, 50)})`
|
||||||
}
|
}
|
||||||
|
|
||||||
const generateStyle = (size, unit) =>
|
const generateStyle = (size, unit, page) => {
|
||||||
`font-size: ${parseFloat(size.toFixed(2)) + unit}; color: ${getRandomColor()};`
|
if (page === 'tags') {
|
||||||
|
return `font-size: ${parseFloat(size.toFixed(2)) + unit}; background-color: ${getRandomColor()};`
|
||||||
|
} else {
|
||||||
|
return `font-size: ${parseFloat(size.toFixed(2)) + unit}; color: ${getRandomColor()};`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const length = sizes.length - 1
|
const length = sizes.length - 1
|
||||||
const result = source.sort(orderby, order).map(tag => {
|
const result = source.sort(orderby, order).map(tag => {
|
||||||
const ratio = length ? sizes.indexOf(tag.length) / length : 0
|
const ratio = length ? sizes.indexOf(tag.length) / length : 0
|
||||||
const size = minfontsize + ((maxfontsize - minfontsize) * ratio)
|
const size = minfontsize + ((maxfontsize - minfontsize) * ratio)
|
||||||
const style = generateStyle(size, unit)
|
const style = generateStyle(size, unit, page)
|
||||||
return `<a href="${env.url_for(tag.path)}" style="${style}">${tag.name}</a>`
|
return `<a href="${env.url_for(tag.path)}" style="${style}">${tag.name}</a>`
|
||||||
}).join('')
|
}).join('')
|
||||||
|
|
||||||
|
|||||||
@@ -49,4 +49,4 @@ const hideToggle = (args, content) => {
|
|||||||
|
|
||||||
hexo.extend.tag.register('hideInline', hideInline)
|
hexo.extend.tag.register('hideInline', hideInline)
|
||||||
hexo.extend.tag.register('hideBlock', hideBlock, { ends: true })
|
hexo.extend.tag.register('hideBlock', hideBlock, { ends: true })
|
||||||
hexo.extend.tag.register('hideToggle', hideToggle, { ends: true })
|
hexo.extend.tag.register('hideToggle', hideToggle, { ends: true })
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const score = (args, content) => {
|
|||||||
try {
|
try {
|
||||||
paramsObj = JSON.parse(paramPart)
|
paramsObj = JSON.parse(paramPart)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Failed to parse JSON in score tag:", e)
|
console.error('Failed to parse JSON in score tag:', e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use double quotes for data-params attribute value,
|
// Use double quotes for data-params attribute value,
|
||||||
@@ -47,4 +47,4 @@ const score = (args, content) => {
|
|||||||
</div>`
|
</div>`
|
||||||
}
|
}
|
||||||
|
|
||||||
hexo.extend.tag.register("score", score, { ends: true })
|
hexo.extend.tag.register('score', score, { ends: true })
|
||||||
|
|||||||
@@ -181,6 +181,60 @@ if hexo-config('avatar.effect') == true
|
|||||||
.reward-main
|
.reward-main
|
||||||
animation: donate_effcet .3s .1s ease both
|
animation: donate_effcet .3s .1s ease both
|
||||||
|
|
||||||
|
.btn-effects
|
||||||
|
position: relative
|
||||||
|
overflow: hidden
|
||||||
|
transition: all .3s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
transform: translateZ(0)
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, .15)
|
||||||
|
text-decoration: none
|
||||||
|
transform: translateY(-1px) scale(1.02)
|
||||||
|
|
||||||
|
&:active
|
||||||
|
transition-duration: .1s
|
||||||
|
transform: translateY(0) scale(.98)
|
||||||
|
|
||||||
|
i
|
||||||
|
display: inline-block
|
||||||
|
vertical-align: middle
|
||||||
|
transition: all .3s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
|
&:hover i
|
||||||
|
animation: buttonIconBounce .6s ease-in-out
|
||||||
|
|
||||||
|
i + span
|
||||||
|
margin-left: 6px
|
||||||
|
vertical-align: middle
|
||||||
|
transition: margin-left .3s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
|
&:hover i + span
|
||||||
|
margin-left: 8px
|
||||||
|
|
||||||
|
&::before
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: -100%
|
||||||
|
z-index: 1
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent)
|
||||||
|
content: ''
|
||||||
|
transition: left .5s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
|
&:hover::before
|
||||||
|
left: 100%
|
||||||
|
|
||||||
|
& > *
|
||||||
|
position: relative
|
||||||
|
z-index: 2
|
||||||
|
|
||||||
|
.btn-effects-large
|
||||||
|
&:hover
|
||||||
|
box-shadow: 0 6px 16px rgba(0, 0, 0, .2)
|
||||||
|
transform: translateY(-2px) scale(1.03)
|
||||||
|
|
||||||
@keyframes scroll-down-effect
|
@keyframes scroll-down-effect
|
||||||
0%
|
0%
|
||||||
opacity: .4
|
opacity: .4
|
||||||
@@ -278,3 +332,17 @@ if hexo-config('avatar.effect') == true
|
|||||||
|
|
||||||
100%
|
100%
|
||||||
transform: translateX(0)
|
transform: translateX(0)
|
||||||
|
|
||||||
|
@keyframes buttonIconBounce
|
||||||
|
0%,
|
||||||
|
100%
|
||||||
|
transform: translateY(0) scale(1)
|
||||||
|
|
||||||
|
25%
|
||||||
|
transform: translateY(-3px) scale(1.1) rotateZ(-5deg)
|
||||||
|
|
||||||
|
50%
|
||||||
|
transform: translateY(0) scale(1.05) rotateZ(0)
|
||||||
|
|
||||||
|
75%
|
||||||
|
transform: translateY(-1px) scale(1.02) rotateZ(2deg)
|
||||||
@@ -39,6 +39,65 @@
|
|||||||
--zoom-bg: #fff
|
--zoom-bg: #fff
|
||||||
--mark-bg: alpha($dark-black, .3)
|
--mark-bg: alpha($dark-black, .3)
|
||||||
|
|
||||||
|
// tags plugin
|
||||||
|
:root
|
||||||
|
--btn-color: $btn-color
|
||||||
|
--btn-default-color: $btn-default-color
|
||||||
|
--tags-blue-color: $tagsP-blue-color
|
||||||
|
--tags-blue-color-lighten: lighten($tagsP-blue-color, 85%)
|
||||||
|
--tags-pink-color: $tagsP-pink-color
|
||||||
|
--tags-pink-color-lighten: lighten($tagsP-pink-color, 85%)
|
||||||
|
--tags-red-color: $tagsP-red-color
|
||||||
|
--tags-red-color-lighten: lighten($tagsP-red-color, 85%)
|
||||||
|
--tags-orange-color: $tagsP-orange-color
|
||||||
|
--tags-orange-color-lighten: lighten($tagsP-orange-color, 85%)
|
||||||
|
--tags-purple-color: $tagsP-purple-color
|
||||||
|
--tags-purple-color-lighten: lighten($tagsP-purple-color, 85%)
|
||||||
|
--tags-green-color: $tagsP-green-color
|
||||||
|
--tags-green-color-lighten: lighten($tagsP-green-color, 85%)
|
||||||
|
--note-default-border: $note-default-border
|
||||||
|
--note-default-bg: $note-default-bg
|
||||||
|
--note-default-text: $note-default-text
|
||||||
|
--note-modern-default-border: $note-modern-default-border
|
||||||
|
--note-modern-default-bg: $note-modern-default-bg
|
||||||
|
--note-modern-default-text: $note-modern-default-text
|
||||||
|
--note-modern-default-hover: $note-modern-default-hover
|
||||||
|
--note-primary-border: $note-primary-border
|
||||||
|
--note-primary-bg: $note-primary-bg
|
||||||
|
--note-primary-text: $note-primary-text
|
||||||
|
--note-modern-primary-border: $note-modern-primary-border
|
||||||
|
--note-modern-primary-bg: $note-modern-primary-bg
|
||||||
|
--note-modern-primary-text: $note-modern-primary-text
|
||||||
|
--note-modern-primary-hover: $note-modern-primary-hover
|
||||||
|
--note-info-border: $note-info-border
|
||||||
|
--note-info-bg: $note-info-bg
|
||||||
|
--note-info-text: $note-info-text
|
||||||
|
--note-modern-info-border: $note-modern-info-border
|
||||||
|
--note-modern-info-bg: $note-modern-info-bg
|
||||||
|
--note-modern-info-text: $note-modern-info-text
|
||||||
|
--note-modern-info-hover: $note-modern-info-hover
|
||||||
|
--note-success-border: $note-success-border
|
||||||
|
--note-success-bg: $note-success-bg
|
||||||
|
--note-success-text: $note-success-text
|
||||||
|
--note-modern-success-border: $note-modern-success-border
|
||||||
|
--note-modern-success-bg: $note-modern-success-bg
|
||||||
|
--note-modern-success-text: $note-modern-success-text
|
||||||
|
--note-modern-success-hover: $note-modern-success-hover
|
||||||
|
--note-warning-border: $note-warning-border
|
||||||
|
--note-warning-bg: $note-warning-bg
|
||||||
|
--note-warning-text: $note-warning-text
|
||||||
|
--note-modern-warning-border: $note-modern-warning-border
|
||||||
|
--note-modern-warning-bg: $note-modern-warning-bg
|
||||||
|
--note-modern-warning-text: $note-modern-warning-text
|
||||||
|
--note-modern-warning-hover: $note-modern-warning-hover
|
||||||
|
--note-danger-border: $note-danger-border
|
||||||
|
--note-danger-bg: $note-danger-bg
|
||||||
|
--note-danger-text: $note-danger-text
|
||||||
|
--note-modern-danger-border: $note-modern-danger-border
|
||||||
|
--note-modern-danger-bg: $note-modern-danger-bg
|
||||||
|
--note-modern-danger-text: $note-modern-danger-text
|
||||||
|
--note-modern-danger-hover: $note-modern-danger-hover
|
||||||
|
|
||||||
body
|
body
|
||||||
position: relative
|
position: relative
|
||||||
overflow-y: scroll
|
overflow-y: scroll
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
text-align: center
|
text-align: center
|
||||||
line-height: 2.4
|
line-height: 2.4
|
||||||
addBorderRadius(7)
|
addBorderRadius(7)
|
||||||
|
@extend .btn-effects
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: var(--btn-hover-color)
|
background-color: var(--btn-hover-color)
|
||||||
|
|||||||
@@ -15,9 +15,12 @@
|
|||||||
color: var(--btn-color)
|
color: var(--btn-color)
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
addBorderRadius()
|
addBorderRadius()
|
||||||
|
@extend .btn-effects
|
||||||
|
@extend .btn-effects-large
|
||||||
|
|
||||||
i
|
i
|
||||||
margin-right: 5px
|
margin-right: 5px
|
||||||
|
vertical-align: baseline
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
.reward-button
|
.reward-button
|
||||||
@@ -28,7 +31,7 @@
|
|||||||
|
|
||||||
.reward-main
|
.reward-main
|
||||||
position: absolute
|
position: absolute
|
||||||
bottom: 40px
|
bottom: 50px
|
||||||
left: 0
|
left: 0
|
||||||
z-index: 100
|
z-index: 100
|
||||||
display: none
|
display: none
|
||||||
|
|||||||
@@ -54,19 +54,52 @@
|
|||||||
|
|
||||||
if hexo-config('rightside_scroll_percent')
|
if hexo-config('rightside_scroll_percent')
|
||||||
#go-up
|
#go-up
|
||||||
|
position: relative
|
||||||
|
|
||||||
.scroll-percent
|
.scroll-percent
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: 0
|
||||||
display: none
|
display: none
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
opacity: 0
|
||||||
|
transition: all .4s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
transform: scale(.8)
|
||||||
|
|
||||||
|
i
|
||||||
|
position: relative
|
||||||
|
z-index: 1
|
||||||
|
width: 100%
|
||||||
|
opacity: 1
|
||||||
|
transition: all .4s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
transform: scale(1)
|
||||||
|
|
||||||
&.show-percent
|
&.show-percent
|
||||||
.scroll-percent
|
.scroll-percent
|
||||||
display: block
|
display: block
|
||||||
|
opacity: 1
|
||||||
|
transform: scale(1)
|
||||||
|
animation: fadeInScale .4s ease-out
|
||||||
|
|
||||||
& + i
|
i
|
||||||
display: none
|
opacity: 0
|
||||||
|
transform: scale(.8)
|
||||||
|
|
||||||
&:hover
|
&:hover.show-percent
|
||||||
.scroll-percent
|
.scroll-percent
|
||||||
display: none
|
opacity: 0
|
||||||
|
transform: scale(.8)
|
||||||
|
|
||||||
& + i
|
i
|
||||||
display: block
|
opacity: 1 !important
|
||||||
|
transform: scale(1) !important
|
||||||
|
|
||||||
|
@keyframes fadeInScale
|
||||||
|
from
|
||||||
|
opacity: 0
|
||||||
|
transform: scale(.8)
|
||||||
|
|
||||||
|
to
|
||||||
|
opacity: 1
|
||||||
|
transform: scale(1)
|
||||||
@@ -33,6 +33,56 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
|
|||||||
--timeline-bg: lighten(#121212, 5)
|
--timeline-bg: lighten(#121212, 5)
|
||||||
--zoom-bg: #121212
|
--zoom-bg: #121212
|
||||||
--mark-bg: alpha($dark-black, .6)
|
--mark-bg: alpha($dark-black, .6)
|
||||||
|
--btn-color: darken($btn-color, 20%)
|
||||||
|
--btn-default-color: lighten($btn-default-color, 20%)
|
||||||
|
--tags-blue-color: desaturate(darken($tagsP-blue-color, 20%), 25%)
|
||||||
|
--tags-blue-color-lighten: rgba(66, 139, 202, .15)
|
||||||
|
--tags-pink-color: desaturate(darken($tagsP-pink-color, 22%), 30%)
|
||||||
|
--tags-pink-color-lighten: rgba(255, 105, 180, .15)
|
||||||
|
--tags-red-color: desaturate(darken($tagsP-red-color, 25%), 28%)
|
||||||
|
--tags-red-color-lighten: rgba(255, 0, 0, .15)
|
||||||
|
--tags-orange-color: desaturate(darken($tagsP-orange-color, 22%), 32%)
|
||||||
|
--tags-orange-color-lighten: rgba(255, 140, 0, .15)
|
||||||
|
--tags-purple-color: desaturate(darken($tagsP-purple-color, 18%), 30%)
|
||||||
|
--tags-purple-color-lighten: rgba(111, 66, 193, .15)
|
||||||
|
--tags-green-color: desaturate(darken($tagsP-green-color, 20%), 28%)
|
||||||
|
--tags-green-color-lighten: rgba(92, 184, 92, .15)
|
||||||
|
--note-default-border: $note-dark-default-border
|
||||||
|
--note-default-bg: $note-dark-default-bg
|
||||||
|
--note-default-text: $note-dark-default-text
|
||||||
|
--note-modern-default-border: $note-dark-modern-default-border
|
||||||
|
--note-modern-default-bg: $note-dark-modern-default-bg
|
||||||
|
--note-modern-default-text: $note-dark-modern-default-text
|
||||||
|
--note-primary-border: $note-dark-primary-border
|
||||||
|
--note-primary-bg: $note-dark-primary-bg
|
||||||
|
--note-primary-text: $note-dark-primary-text
|
||||||
|
--note-modern-primary-border: $note-dark-modern-primary-border
|
||||||
|
--note-modern-primary-bg: $note-dark-modern-primary-bg
|
||||||
|
--note-modern-primary-text: $note-dark-modern-primary-text
|
||||||
|
--note-info-border: $note-dark-info-border
|
||||||
|
--note-info-bg: $note-dark-info-bg
|
||||||
|
--note-info-text: $note-dark-info-text
|
||||||
|
--note-modern-info-border: $note-dark-modern-info-border
|
||||||
|
--note-modern-info-bg: $note-dark-modern-info-bg
|
||||||
|
--note-modern-info-text: $note-dark-modern-info-text
|
||||||
|
--note-success-border: $note-dark-success-border
|
||||||
|
--note-success-bg: $note-dark-success-bg
|
||||||
|
--note-success-text: $note-dark-success-text
|
||||||
|
--note-modern-success-border: $note-dark-modern-success-border
|
||||||
|
--note-modern-success-bg: $note-dark-modern-success-bg
|
||||||
|
--note-modern-success-text: $note-dark-modern-success-text
|
||||||
|
--note-warning-border: $note-dark-warning-border
|
||||||
|
--note-warning-bg: $note-dark-warning-bg
|
||||||
|
--note-warning-text: $note-dark-warning-text
|
||||||
|
--note-modern-warning-border: $note-dark-modern-warning-border
|
||||||
|
--note-modern-warning-bg: $note-dark-modern-warning-bg
|
||||||
|
--note-modern-warning-text: $note-dark-modern-warning-text
|
||||||
|
--note-danger-border: $note-dark-danger-border
|
||||||
|
--note-danger-bg: $note-dark-danger-bg
|
||||||
|
--note-danger-text: $note-dark-danger-text
|
||||||
|
--note-modern-danger-border: $note-dark-modern-danger-border
|
||||||
|
--note-modern-danger-bg: $note-dark-modern-danger-bg
|
||||||
|
--note-modern-danger-text: $note-dark-modern-danger-text
|
||||||
|
|
||||||
#web_bg:before
|
#web_bg:before
|
||||||
position: absolute
|
position: absolute
|
||||||
@@ -78,23 +128,17 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
|
|||||||
#switch-btn
|
#switch-btn
|
||||||
filter: brightness(.8)
|
filter: brightness(.8)
|
||||||
|
|
||||||
// note
|
|
||||||
if hexo-config('note.style') == 'modern' || hexo-config('note.style') == 'flat'
|
|
||||||
.note
|
|
||||||
filter: brightness(.8)
|
|
||||||
|
|
||||||
// hide-tags
|
// hide-tags
|
||||||
.hide-button,
|
.hide-button,
|
||||||
.btn-beautify,
|
|
||||||
.hl-label,
|
|
||||||
#post-outdate-notice,
|
#post-outdate-notice,
|
||||||
.error-img,
|
.error-img,
|
||||||
.container iframe,
|
.container iframe,
|
||||||
.gist,
|
.gist,
|
||||||
.ads-wrap
|
.ads-wrap,
|
||||||
|
.tag-cloud-list > a
|
||||||
filter: brightness(.8)
|
filter: brightness(.8)
|
||||||
|
|
||||||
img
|
img:not(.cover)
|
||||||
if hexo-config('lazyload.enable') && hexo-config('lazyload.blur') && !hexo-config('lazyload.placeholder')
|
if hexo-config('lazyload.enable') && hexo-config('lazyload.blur') && !hexo-config('lazyload.placeholder')
|
||||||
filter: blur(0) brightness(.8)
|
filter: blur(0) brightness(.8)
|
||||||
else
|
else
|
||||||
@@ -148,7 +192,7 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
|
|||||||
--at-color-font: alpha(#FFFFFF, .7)
|
--at-color-font: alpha(#FFFFFF, .7)
|
||||||
--at-color-meta: alpha(#FFFFFF, .7)
|
--at-color-meta: alpha(#FFFFFF, .7)
|
||||||
--at-color-grey: alpha(#FFFFFF, .7)
|
--at-color-grey: alpha(#FFFFFF, .7)
|
||||||
|
|
||||||
.atk-send-btn,
|
.atk-send-btn,
|
||||||
.atk-badge
|
.atk-badge
|
||||||
color: alpha(#FFFFFF, .7) !important
|
color: alpha(#FFFFFF, .7) !important
|
||||||
|
|||||||
@@ -1,27 +1,91 @@
|
|||||||
.tag-cloud
|
.tag-cloud
|
||||||
&-list
|
&-list
|
||||||
|
animation: tagsFadeIn .6s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
|
&:hover a:not(:hover)
|
||||||
|
opacity: .7
|
||||||
|
transform: scale(.98)
|
||||||
|
|
||||||
a
|
a
|
||||||
|
position: relative
|
||||||
display: inline-block
|
display: inline-block
|
||||||
margin: 2px
|
margin: 5px
|
||||||
padding: 2px 7px
|
padding: 3px 12px
|
||||||
line-height: 1.7
|
line-height: 1.7
|
||||||
transition: all .3s
|
transition: all .3s cubic-bezier(.4, 0, .2, 1)
|
||||||
addBorderRadius(5)
|
addBorderRadius(7)
|
||||||
|
overflow: hidden
|
||||||
|
color: white
|
||||||
|
transform: translateY(0) scale(1)
|
||||||
|
will-change: transform, background-color, box-shadow
|
||||||
|
|
||||||
|
&::before
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: -100%
|
||||||
|
z-index: -1
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent)
|
||||||
|
content: ''
|
||||||
|
transition: left .6s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background: var(--btn-bg) !important
|
background: var(--btn-hover-color) !important
|
||||||
box-shadow: 2px 2px 6px rgba(0, 0, 0, .2)
|
box-shadow:
|
||||||
|
0 6px 20px rgba(0, 0, 0, .12),
|
||||||
|
0 4px 8px rgba(0, 0, 0, .08),
|
||||||
|
0 0 0 1px rgba(255, 255, 255, .05)
|
||||||
color: var(--btn-color) !important
|
color: var(--btn-color) !important
|
||||||
|
transform: translateY(-2px) scale(1.02)
|
||||||
|
|
||||||
|
&::before
|
||||||
|
left: 100%
|
||||||
|
|
||||||
|
&:active
|
||||||
|
box-shadow:
|
||||||
|
0 3px 8px rgba(0, 0, 0, .15),
|
||||||
|
0 1px 3px rgba(0, 0, 0, .1)
|
||||||
|
transition: all .15s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
transform: translateY(-1px) scale(.98)
|
||||||
|
|
||||||
+maxWidth768()
|
+maxWidth768()
|
||||||
zoom: .85
|
zoom: .85
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
transform: translateY(-1px) scale(1.01)
|
||||||
|
|
||||||
|
&:active
|
||||||
|
transform: translateY(0) scale(.99)
|
||||||
|
|
||||||
|
&::before
|
||||||
|
display: none
|
||||||
|
|
||||||
&-title
|
&-title
|
||||||
font-size: 2.57em
|
font-size: 2.57em
|
||||||
|
animation: titleSlideIn .8s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
+maxWidth768()
|
+maxWidth768()
|
||||||
font-size: 2em
|
font-size: 2em
|
||||||
|
|
||||||
|
@keyframes tagsFadeIn
|
||||||
|
from
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(20px)
|
||||||
|
|
||||||
|
to
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0)
|
||||||
|
|
||||||
|
@keyframes titleSlideIn
|
||||||
|
from
|
||||||
|
opacity: 0
|
||||||
|
transform: translateX(-30px)
|
||||||
|
|
||||||
|
to
|
||||||
|
opacity: 1
|
||||||
|
transform: translateX(0)
|
||||||
|
|
||||||
.page-title
|
.page-title
|
||||||
& + .tag-cloud-list
|
& + .tag-cloud-list
|
||||||
text-align: left
|
text-align: left
|
||||||
|
|||||||
@@ -7,21 +7,20 @@
|
|||||||
display: inline-block
|
display: inline-block
|
||||||
margin: 0 4px 6px
|
margin: 0 4px 6px
|
||||||
padding: 0 15px
|
padding: 0 15px
|
||||||
background-color: var(--btn-beautify-color, $btn-default-color)
|
background-color: var(--btn-beautify-color, var(--btn-default-color))
|
||||||
color: $btn-color
|
color: var(--btn-color, $btn-color)
|
||||||
|
vertical-align: top
|
||||||
line-height: 2
|
line-height: 2
|
||||||
addBorderRadius()
|
addBorderRadius()
|
||||||
|
@extend .btn-effects
|
||||||
|
|
||||||
for $type in $color-types
|
for $type in $color-types
|
||||||
&.{$type}
|
&.{$type}
|
||||||
--btn-beautify-color: lookup('$tagsP-' + $type + '-color')
|
--btn-beautify-color: unquote('var(--tags-' + $type + '-color)')
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: var(--btn-hover-color)
|
background-color: var(--btn-hover-color)
|
||||||
|
|
||||||
i + span
|
|
||||||
margin-left: 6px
|
|
||||||
|
|
||||||
&:not(.block) + .btn-beautify:not(.block)
|
&:not(.block) + .btn-beautify:not(.block)
|
||||||
margin: 0 4px 20px
|
margin: 0 4px 20px
|
||||||
|
|
||||||
@@ -39,18 +38,26 @@
|
|||||||
|
|
||||||
&.larger
|
&.larger
|
||||||
padding: 6px 15px
|
padding: 6px 15px
|
||||||
|
@extend .btn-effects-large
|
||||||
&:hover
|
|
||||||
text-decoration: none
|
|
||||||
|
|
||||||
&.outline
|
&.outline
|
||||||
border: 1px solid transparent
|
border: 1px solid transparent
|
||||||
border-color: var(--btn-beautify-color, $btn-default-color)
|
border-color: var(--btn-beautify-color, var(--btn-default-color))
|
||||||
background-color: transparent
|
background-color: transparent
|
||||||
color: var(--btn-beautify-color, $btn-default-color)
|
color: var(--btn-beautify-color, var(--btn-default-color))
|
||||||
|
|
||||||
|
i,
|
||||||
|
span
|
||||||
|
transition: color .3s cubic-bezier(.4, 0, .2, 1)
|
||||||
|
|
||||||
|
&::before
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .1), transparent)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: var(--btn-beautify-color, $btn-default-color)
|
border-color: var(--btn-beautify-color, var(--btn-default-color))
|
||||||
|
background-color: var(--btn-beautify-color, var(--btn-default-color))
|
||||||
|
color: var(--btn-color) !important
|
||||||
|
|
||||||
&:hover
|
i,
|
||||||
color: white !important
|
span
|
||||||
|
color: var(--btn-color)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
background: $tag-hide-bg
|
background: $tag-hide-bg
|
||||||
color: var(--white)
|
color: var(--white)
|
||||||
addBorderRadius()
|
addBorderRadius()
|
||||||
|
@extend .btn-effects
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: var(--btn-hover-color)
|
background-color: var(--btn-hover-color)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
.hl-label
|
.hl-label
|
||||||
padding: 2px 4px
|
padding: 2px 4px
|
||||||
color: $btn-color
|
color: var(--btn-color, $btn-color)
|
||||||
addBorderRadius(3)
|
addBorderRadius(3)
|
||||||
|
|
||||||
&.default
|
&.default
|
||||||
background-color: $btn-default-color
|
background-color: var(--btn-default-color)
|
||||||
|
|
||||||
for $type in $color-types
|
for $type in $color-types
|
||||||
&.{$type}
|
&.{$type}
|
||||||
background-color: lookup('$tagsP-' + $type + '-color')
|
background-color: unquote('var(--tags-' + $type + '-color)')
|
||||||
|
|||||||
@@ -19,32 +19,32 @@
|
|||||||
for $type in $color-types
|
for $type in $color-types
|
||||||
&.{$type}
|
&.{$type}
|
||||||
&:not(.disabled)
|
&:not(.disabled)
|
||||||
border-left-color: lookup('$tagsP-' + $type + '-color') !important
|
border-left-color: unquote('var(--tags-' + $type + '-color)') !important
|
||||||
|
|
||||||
&.modern
|
&.modern
|
||||||
border-left-color: transparent !important
|
border-left-color: transparent !important
|
||||||
color: lookup('$tagsP-' + $type + '-color')
|
color: unquote('var(--tags-' + $type + '-color)')
|
||||||
|
|
||||||
&:not(.simple)
|
&:not(.simple)
|
||||||
background: lighten(lookup('$tagsP-' + $type + '-color'), 85%) !important
|
background: unquote('var(--tags-' + $type + '-color-lighten)')
|
||||||
|
|
||||||
& > .note-icon
|
& > .note-icon
|
||||||
color: lookup('$tagsP-' + $type + '-color')
|
color: unquote('var(--tags-' + $type + '-color)')
|
||||||
|
|
||||||
&.simple
|
&.simple
|
||||||
border: 1px solid #EEEEEE
|
border: 1px solid var(--note-default-border)
|
||||||
border-left-width: 5px
|
border-left-width: 5px
|
||||||
|
|
||||||
&.modern
|
&.modern
|
||||||
border: 1px solid transparent !important
|
border: 1px solid transparent !important
|
||||||
background-color: #f5f5f5
|
background-color: var(--note-modern-default-bg)
|
||||||
color: $font-black
|
color: var(--note-modern-default-text)
|
||||||
|
|
||||||
&.flat
|
&.flat
|
||||||
border: initial
|
border: initial
|
||||||
border-left: 5px solid #EEEEEE
|
border-left: 5px solid var(--note-default-border)
|
||||||
background-color: lighten(#EEEEEE, 65%)
|
background-color: var(--note-default-bg)
|
||||||
color: $font-black
|
color: var(--note-default-text)
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
@@ -90,29 +90,30 @@
|
|||||||
for $type in $note-types
|
for $type in $note-types
|
||||||
&.{$type}
|
&.{$type}
|
||||||
&.flat
|
&.flat
|
||||||
background: lookup('$note-' + $type + '-bg')
|
background: unquote('var(--note-' + $type + '-bg)')
|
||||||
|
color: var(--font-color)
|
||||||
|
|
||||||
&.modern
|
&.modern
|
||||||
border-color: lookup('$note-modern-' + $type + '-border')
|
border-color: unquote('var(--note-modern-' + $type + '-border)') !important
|
||||||
background: lookup('$note-modern-' + $type + '-bg')
|
background: unquote('var(--note-modern-' + $type + '-bg)')
|
||||||
color: lookup('$note-modern-' + $type + '-text')
|
color: unquote('var(--note-modern-' + $type + '-text)')
|
||||||
|
|
||||||
a
|
a
|
||||||
&:not(.btn)
|
&:not(.btn)
|
||||||
color: lookup('$note-modern-' + $type + '-text')
|
color: unquote('var(--note-modern-' + $type + '-text)')
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: lookup('$note-modern-' + $type + '-hover')
|
color: unquote('var(--note-modern-' + $type + '-hover)')
|
||||||
|
|
||||||
&:not(.modern)
|
&:not(.modern)
|
||||||
border-left-color: lookup('$note-' + $type + '-border')
|
border-left-color: unquote('var(--note-' + $type + '-border)')
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6
|
h6
|
||||||
color: lookup('$note-' + $type + '-text')
|
color: unquote('var(--note-' + $type + '-text)')
|
||||||
|
|
||||||
if $note-icons
|
if $note-icons
|
||||||
&:not(.no-icon)
|
&:not(.no-icon)
|
||||||
@@ -121,4 +122,4 @@
|
|||||||
|
|
||||||
&:not(.modern)
|
&:not(.modern)
|
||||||
&::before
|
&::before
|
||||||
color: lookup('$note-' + $type + '-text')
|
color: unquote('var(--note-' + $type + '-text)')
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ $code-foreground = $themeColorEnable && hexo-config('theme_color.code_foreground
|
|||||||
$code-background = $themeColorEnable && hexo-config('theme_color.code_background') ? convert(hexo-config('theme_color.code_background')) : rgba(27, 31, 35, .05)
|
$code-background = $themeColorEnable && hexo-config('theme_color.code_background') ? convert(hexo-config('theme_color.code_background')) : rgba(27, 31, 35, .05)
|
||||||
$theme-toc-color = $themeColorEnable && hexo-config('theme_color.toc_color') ? convert(hexo-config('theme_color.toc_color')) : $strong-cyan
|
$theme-toc-color = $themeColorEnable && hexo-config('theme_color.toc_color') ? convert(hexo-config('theme_color.toc_color')) : $strong-cyan
|
||||||
// font
|
// font
|
||||||
|
|
||||||
$chineseFont = $language == 'zh-CN' ? 'Microsoft YaHei' : 'Microsoft JhengHei'
|
$chineseFont = $language == 'zh-CN' ? 'Microsoft YaHei' : 'Microsoft JhengHei'
|
||||||
$default-font-family = -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Lato, Roboto, 'PingFang SC', $chineseFont, sans-serif
|
$default-font-family = -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Lato, Roboto, 'PingFang SC', $chineseFont, sans-serif
|
||||||
$default-code-font = consolas, Menlo, monospace, 'PingFang SC', $chineseFont, sans-serif
|
$default-code-font = consolas, Menlo, monospace, 'PingFang SC', $chineseFont, sans-serif
|
||||||
|
|
||||||
$font-family = hexo-config('font.font_family') ? unquote(hexo-config('font.font_family')) : $default-font-family
|
$font-family = hexo-config('font.font_family') ? unquote(hexo-config('font.font_family')) : $default-font-family
|
||||||
$code-font-family = hexo-config('font.code_font_family') ? unquote(hexo-config('font.code_font_family')) : $default-code-font
|
$code-font-family = hexo-config('font.code_font_family') ? unquote(hexo-config('font.code_font_family')) : $default-code-font
|
||||||
$site-name-font = hexo-config('blog_title_font.font_family') && unquote(hexo-config('blog_title_font.font_family'))
|
$site-name-font = hexo-config('blog_title_font.font_family') && unquote(hexo-config('blog_title_font.font_family'))
|
||||||
@@ -184,3 +182,52 @@ $tab-to-top-color = #99a9bf
|
|||||||
$tab-to-top-hover-color = $theme-color
|
$tab-to-top-hover-color = $theme-color
|
||||||
// Tag Plugins - timeline
|
// Tag Plugins - timeline
|
||||||
$timeline-default-color = $theme-color
|
$timeline-default-color = $theme-color
|
||||||
|
// note - darkmode
|
||||||
|
// Default
|
||||||
|
$note-dark-default-border = #5a5a5a
|
||||||
|
$note-dark-default-bg = #2b2b2b
|
||||||
|
$note-dark-default-text = #b3b3b3
|
||||||
|
$note-dark-modern-default-border = #9a9a9a
|
||||||
|
$note-dark-modern-default-bg = #353535
|
||||||
|
$note-dark-modern-default-text = #c4c4c4
|
||||||
|
$note-dark-modern-default-hover = #d0d0d0
|
||||||
|
// Primary
|
||||||
|
$note-dark-primary-border = #5935a1
|
||||||
|
$note-dark-primary-bg = #2e1c3e
|
||||||
|
$note-dark-primary-text = #a47dd4
|
||||||
|
$note-dark-modern-primary-border = #9985cc
|
||||||
|
$note-dark-modern-primary-bg = #3c2d4c
|
||||||
|
$note-dark-modern-primary-text = #b693e6
|
||||||
|
$note-dark-modern-primary-hover = #c9a8f0
|
||||||
|
// Info
|
||||||
|
$note-dark-info-border = #346fa2
|
||||||
|
$note-dark-info-bg = #1f2e3b
|
||||||
|
$note-dark-info-text = #7bb3db
|
||||||
|
$note-dark-modern-info-border = #7ca8b5
|
||||||
|
$note-dark-modern-info-bg = #2b3c44
|
||||||
|
$note-dark-modern-info-text = #8fc6e0
|
||||||
|
$note-dark-modern-info-hover = #a3d4ea
|
||||||
|
// Success
|
||||||
|
$note-dark-success-border = #4a944a
|
||||||
|
$note-dark-success-bg = #202e20
|
||||||
|
$note-dark-success-text = #82c682
|
||||||
|
$note-dark-modern-success-border = #8bb087
|
||||||
|
$note-dark-modern-success-bg = #2c3d2c
|
||||||
|
$note-dark-modern-success-text = #96d196
|
||||||
|
$note-dark-modern-success-hover = #a8dca8
|
||||||
|
// Warning
|
||||||
|
$note-dark-warning-border = #c08a3e
|
||||||
|
$note-dark-warning-bg = #3e301f
|
||||||
|
$note-dark-warning-text = #e6ba6b
|
||||||
|
$note-dark-modern-warning-border = #b8a285
|
||||||
|
$note-dark-modern-warning-bg = #4b3c2b
|
||||||
|
$note-dark-modern-warning-text = #d4b373
|
||||||
|
$note-dark-modern-warning-hover = #e0c080
|
||||||
|
// Danger
|
||||||
|
$note-dark-danger-border = #b34440
|
||||||
|
$note-dark-danger-bg = #3b201f
|
||||||
|
$note-dark-danger-text = #e67572
|
||||||
|
$note-dark-modern-danger-border = #c7898c
|
||||||
|
$note-dark-modern-danger-bg = #4d2b2e
|
||||||
|
$note-dark-modern-danger-text = #d98b8e
|
||||||
|
$note-dark-modern-danger-hover = #e59fa2
|
||||||
@@ -249,7 +249,7 @@
|
|||||||
'rotateCW',
|
'rotateCW',
|
||||||
'flipX',
|
'flipX',
|
||||||
'flipY',
|
'flipY',
|
||||||
"reset"
|
'reset'
|
||||||
],
|
],
|
||||||
right: ['autoplay', 'thumbs', 'close']
|
right: ['autoplay', 'thumbs', 'close']
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user