Compare commits

..

34 Commits
3.0.0 ... 3.2.0

125 changed files with 3618 additions and 3264 deletions

View File

@@ -7,14 +7,16 @@ assignees: ''
---
<!-- Do not delete the template (不要刪除模板) -->
<!--
IMPORTANT: Please follow the template to create a new issue.
重要:請依照該模板來提交。
If you upgrade from the old version, and an error occurs when running, please copy the new content in the config to the butterfly.yml
如果你是由舊版本升級到新版執行時出現報錯請首先把config裡新的內容複製到舊的butterfly設定去如有
如果你是由舊版本升級到新版執行時出現報錯請首先把config裡新的內容複製到舊的butterfly設定去(如有)
If you are a problem when visit the website, please open your browser 'developer tools (shortcut F12)' and check the console if there is an error, include your website address in the feedback
If you are a problem when visiting the website, please open your browser 'developer tools (shortcut F12)' and check the console if there is an error, include your website address in the feedback
如果你是線上訪問出現問題請檢查瀏覽器開發人員工具快捷鍵F12的console是否有報錯反饋時附上你的網站
-->

View File

@@ -4,7 +4,6 @@ about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

1
.github/stale.yml vendored
View File

@@ -8,7 +8,6 @@ exemptLabels:
- security
- bug
- enhancement
- Solved
- documentation
# Label to use when marking an issue as stale
staleLabel: wontfix

View File

@@ -2,9 +2,8 @@
![version](https://img.shields.io/github/package-json/v/jerryc127/hexo-theme-butterfly)
![https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff](https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff)
![hexo version](https://img.shields.io/badge/hexo-4.0+-0e83c)
![hexo version](https://img.shields.io/badge/hexo-4.2+-0e83c)
![npm download](https://img.shields.io/npm/dw/hexo-theme-butterfly?color=green)
![nodejs version](https://img.shields.io/badge/node.js-8.0+-yellow)
![license](https://img.shields.io/github/license/jerryc127/hexo-theme-butterfly?color=FF5531)
Demo: 👍 [Butterfly](https://demo.jerryc.me/) || 🤞 [JerryC](https://jerryc.me/)
@@ -17,6 +16,8 @@ Based on [hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody) t
### GIT
> If you are in Mainland China, you can download in [Gitee](https://gitee.com/iamjerryw/hexo-theme-butterfly)
Stable branch [recommend]:
```
@@ -49,10 +50,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
![image](https://user-images.githubusercontent.com/16351105/58887365-1272f780-8718-11e9-9329-3292c6ba20d4.png)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-1.png)
![](https://user-images.githubusercontent.com/16351105/58887457-3cc4b500-8718-11e9-9417-2bdea603c92e.png)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-2.png)
![](https://user-images.githubusercontent.com/16351105/69338594-7d03f980-0c9e-11ea-8b64-7f165e6508e2.png)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-post.png)

View File

@@ -2,9 +2,8 @@
![version](https://img.shields.io/github/package-json/v/jerryc127/hexo-theme-butterfly)
![https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff](https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff)
![hexo version](https://img.shields.io/badge/hexo-4.0+-0e83c)
![hexo version](https://img.shields.io/badge/hexo-4.2+-0e83c)
![npm download](https://img.shields.io/npm/dw/hexo-theme-butterfly?color=green)
![nodejs version](https://img.shields.io/badge/node.js-8.0+-yellow)
![license](https://img.shields.io/github/license/jerryc127/hexo-theme-butterfly?color=FF5531)
@@ -18,6 +17,8 @@
### Git 安裝
> 本倉庫同時上傳到 [Gitee](https://gitee.com/iamjerryw/hexo-theme-butterfly),如果你訪問 Github 緩慢,可從 Gitee 中下載。
在博客根目錄裡安裝穩定版【推薦】
```powershell
@@ -49,9 +50,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......
## 截圖
![image](https://user-images.githubusercontent.com/16351105/58887365-1272f780-8718-11e9-9329-3292c6ba20d4.png)
![image](https://user-images.githubusercontent.com/16351105/58887457-3cc4b500-8718-11e9-9417-2bdea603c92e.png)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-1.png)
![](https://user-images.githubusercontent.com/16351105/69338594-7d03f980-0c9e-11ea-8b64-7f165e6508e2.png)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-2.png)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-post.png)

View File

@@ -17,10 +17,13 @@ menu:
# Link: /link/ || fas fa-link
# About: /about/ || fas fa-heart
# Hide the child menu items in mobile sidebar
hide_sidebar_menu_child: false
# Code Blocks (代碼相關)
# --------------------------------------
highlight_theme: light # default / darker / pale night / light / ocean / mac / mac light / false
highlight_theme: light # darker / pale night / light / ocean / mac / mac light / false
highlight_copy: true # copy button
highlight_lang: true # show the code language
highlight_shrink: false # true: shrink the code blocks / false: expand the code blocks | none: expand code blocks and hide the button
@@ -88,26 +91,36 @@ favicon: /img/favicon.png
# Avatar (頭像)
avatar:
img: /img/avatar.png
img:
effect: false
# the banner image of home page
# The banner image of home page
index_img:
# if the banner of page not setting, it will show the top_img
default_top_img: https://i.loli.net/2020/05/01/IuWi8QbHvzjlOPw.jpg
# If the banner of page not setting, it will show the top_img
default_top_img:
# the banner image of archive page
# The banner image of archive page
archive_img:
# the banner image of tag page
# If the banner of tag page not setting, it will show the top_img
# note: tag page, not tags page (子標籤頁面的 top_img)
tag_img:
# the banner image of category page
# The banner image of tag page
# format:
# - tag name: xxxxx
tag_per_img:
# If the banner of category page not setting, it will show the top_img
# note: category page, not categories page (子分類頁面的 top_img)
category_img:
# The banner image of category page
# format:
# - category name: xxxxx
category_per_img:
# If you are using hexo-douban, you can configure it (如果你有使用 hexo-douban,可配置這個)
# douban:
# meta: false
@@ -125,7 +138,7 @@ cover:
position: both
# When cover is not set, the default cover is displayed (當沒有設置cover時默認的封面顯示)
default_cover:
- https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg
# - https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg
# Replace Broken Images (替換無法顯示的圖片)
error_img:
@@ -141,11 +154,13 @@ error_404:
post_meta:
page: # Home Page
date_type: created # created or updated or both 主頁文章日期是創建日或者更新日或都顯示
date_format: date # date/relative 顯示日期還是相對日期
categories: true # true or false 主頁是否顯示分類
tags: false # true or false 主頁是否顯示標籤
label: true # true or false 顯示描述性文字
post:
date_type: both # created or updated or both 文章頁日期是創建日或者更新日或都顯示
date_format: date # date/relative 顯示日期還是相對日期
categories: true # true or false 文章頁是否顯示分類
tags: true # true or false 文章頁是否顯示標籤
label: true # true or false 顯示描述性文字
@@ -161,6 +176,7 @@ wordcount:
# 1: description
# 2: both (if the description exists, it will show description, or show the auto_excerpt)
# 3: auto_excerpt (default)
# false: do not show the article introduction
index_post_content:
method: 3
length: 500 # if you set method to 2 or 3, the length need to config
@@ -232,14 +248,7 @@ sharejs:
# https://www.addtoany.com/
addtoany:
enable: false
item:
- facebook
- twitter
- wechat
- sina_weibo
- facebook_messenger
- email
- copy_link
item: facebook,twitter,wechat,sina_weibo,facebook_messenger,email,copy_link
# Comments System
# --------------------------------------
@@ -386,14 +395,21 @@ footer:
# --------------------------------------
# Baidu Analytics
# https://tongji.baidu.com/web/welcome/login
baidu_analytics:
# Google Analytics
# https://analytics.google.com/analytics/web/
google_analytics:
# Tencent Analytics ID
# https://mta.qq.com
tencent_analytics:
# CNZZ Analytics
# https://www.umeng.com/
cnzz_analytics:
# Advertisement
# --------------------------------------
@@ -470,17 +486,18 @@ tag_ui: # 留空或 index
# Website Background (設置網站背景)
# can set it to color or image (可設置圖片 或者 顔色)
# The formal of color: '#49B202'
# The formal of image: url(http://xxxxxx.com/xxx.jpg)
# White color will be shown as default
background:
# Show the footer background image (same as top_img)
# Footer Background
footer_bg: false
# the position of bottom right button/default unit: px (右下角按鈕距離底部的距離/默認單位為px)
rightside-bottom:
# Enter transitions (開啓網頁進入效果)
enter_transitions: true
# Background effects (背景特效)
# --------------------------------------
@@ -494,8 +511,8 @@ canvas_ribbon:
click_to_change: false
mobile: false
# Dynamic ribbon (動態彩帶)
canvas_ribbon_piao:
# Fluttering Ribbon (動態彩帶)
canvas_fluttering_ribbon:
enable: false
mobile: false
@@ -515,23 +532,28 @@ activate_power_mode:
enable: false
colorful: true # open particle animation (冒光特效)
shake: true # open shake (抖動特效)
mobile: false
# Mouse click effects: fireworks (鼠標點擊效果: 煙火特效)
fireworks:
enable: false
zIndex: 9999 # -1 or 9999
mobile: false
# Mouse click effects: Heart symbol (鼠標點擊效果: 愛心)
click_heart: false
click_heart:
enable: false
mobile: false
# Mouse click effects: words (鼠標點擊效果: 文字)
ClickShowText:
enable: false
text:
- I
- LOVE
- YOU
# - I
# - LOVE
# - YOU
fontSize: 15px
mobile: false
# Default display mode (網站默認的顯示模式)
# light (default) / dark
@@ -547,14 +569,16 @@ beautify:
# Global font settings
# Don't modify the following settings unless you know how they work (非必要不要修改)
font:
global-font-size:
code-font-size:
font-family:
code-font:
code-font-family:
# Font settings for the site title and site subtitle
# 左上角網站名字 主頁居中網站名字
blog_title_font:
font_link: https://fonts.googleapis.com/css?family=Titillium+Web&display=swap
font-family: Titillium Web, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif
# blog_title_font:
# font_link: https://fonts.googleapis.com/css?family=Titillium+Web&display=swap
# font-family: Titillium Web, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif
# The setting of divider icon (水平分隔線圖標設置)
hr_icon:
@@ -621,7 +645,10 @@ aside:
format: MMMM YYYY # eg: YYYY年MM月
order: -1 # Sort of order. 1, asc for ascending; -1, desc for descending
limit: 8 # if set 0 will show all
card_webinfo: true
card_webinfo:
enable: true
post_count: true
last_push_date: true
# busuanzi count for PV / UV in site
# 訪問人數
@@ -636,6 +663,25 @@ runtimeshow:
enable: false
publish_date:
# Aside widget - Newest Comments
newest_comments:
enable: false
limit: 6
avatar: true
leancloud:
enable: false
appId: # leancloud application app id
appKey: # leancloud application app key
serverURL: # This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in)
default_avatar: # mp/identicon/monsterid/wavatar/retro/robohash/blank
github_issues:
enable: false
repo:
disqus:
enable: false
forum:
api_key:
# Bottom right button (右下角按鈕)
# --------------------------------------
@@ -706,10 +752,21 @@ note:
# other
# --------------------------------------
# Artitalk
# see https://artitalk.js.org/
artitalk:
appId:
appKey:
option:
# Pjax [Beta]
# It may contain bugs and unstable, give feedback when you find the bugs.
# https://github.com/MoOx/pjax
pjax: false
pjax:
enable: false
exclude:
# - xxxx
# - xxxx
# Inject the css and script (aplayer/meting)
aplayerInject:
@@ -731,7 +788,7 @@ baidu_push: false
# https://instant.page/
# prefetch (預加載)
instantpage: true
instantpage: false
# https://github.com/vinta/pangu.js
# Insert a space between Chinese character and English character (中英文之間添加空格)
@@ -742,7 +799,7 @@ pangu:
# Lazyload (圖片懶加載)
# https://github.com/verlok/lazyload
lazyload:
enable: true
enable: false
post: /img/loading.gif
# PWA
@@ -751,7 +808,6 @@ lazyload:
# pwa:
# enable: false
# manifest: /image/pwa/manifest.json
# theme_color: "#fff"
# apple_touch_icon: /image/pwa/apple-touch-icon.png
# favicon_32_32: /image/pwa/32.png
# favicon_16_16: /image/pwa/16.png
@@ -819,9 +875,9 @@ CDN:
busuanzi: //busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js
# background effect
canvas_ribbon: /js/third-party/canvas-ribbon.js
canvas_ribbon_piao: /js/third-party/piao.js
canvas_nest: /js/third-party/canvas-nest.js
canvas_ribbon: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js
canvas_fluttering_ribbon: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js
canvas_nest: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-nest.min.js
lazyload: https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js
instantpage: https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js
@@ -838,11 +894,10 @@ CDN:
snackbar: https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js
# effect
anime: https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js
activate_power_mode: /js/third-party/activate-power-mode.js
fireworks: /js/third-party/fireworks.js
click_heart: /js/third-party/click_heart.js
ClickShowText: /js/third-party/ClickShowText.js
activate_power_mode: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js
fireworks: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js
click_heart: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js
ClickShowText: https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-show-text.min.js
# fontawesome
fontawesome: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css
@@ -858,3 +913,10 @@ CDN:
aplayer_css: https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css
aplayer_js: https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js
meting_js: https://cdn.jsdelivr.net/gh/metowolf/MetingJS@1.2/dist/Meting.min.js
# Prism.js
prismjs_js: https://cdn.jsdelivr.net/npm/prismjs/prism.min.js
prismjs_lineNumber_js: https://cdn.jsdelivr.net/npm/prismjs/plugins/line-numbers/prism-line-numbers.min.js
prismjs_autoloader: https://cdn.jsdelivr.net/npm/prismjs/plugins/autoloader/prism-autoloader.min.js
artitalk: https://cdn.jsdelivr.net/npm/artitalk

View File

@@ -65,21 +65,32 @@ aside:
card_webinfo:
headline: Info
article_name: Article
runtime_name: Run time
runtime:
name: Run time
unit: days
last_push_date:
name: Last Push
site_wordcount: Total Count
site_uv_name: UV
site_pv_name: PV
more_button: More
card_newest_comments:
heading: Newest Comments
loading_text: loading...
error: Unable to get the data, please make sure the settings are correct.
date_suffix:
just: Just
min: minutes ago
hour: hours ago
day: days ago
month: months ago
donate: Donate
share: Share
bookmark:
title: Bookmark
rightside:
readmode_title: Read Mode
font_plus_title: Increase Font Size
font_minus_title: Decrease Font Size
translate_title: Switch Between Traditional Chinese And Simplified Chinese
night_mode_title: Switch Between Light And Dark Mode
back_to_top: Back To Top
@@ -87,8 +98,6 @@ rightside:
scroll_to_comment: Scroll To Comments
setting: Setting
runtime_unit: days
copy_copyright:
author: Author
link: Link
@@ -96,9 +105,6 @@ copy_copyright:
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
Snackbar:
bookmark:
message_prev: Press
message_next: to bookmark this page
chs_to_cht: Traditional Chinese Activated Manually
cht_to_chs: Simplified Chinese Activated Manually
day_to_night: Dark Mode Activated Manually

View File

@@ -65,21 +65,32 @@ aside:
card_webinfo:
headline: Info
article_name: Article
runtime_name: Run time
runtime:
name: Run time
unit: days
last_push_date:
name: Last Push
site_wordcount: Total Count
site_uv_name: UV
site_pv_name: PV
more_button: More
card_newest_comments:
heading: Newest Comments
loading_text: loading...
error: Unable to get the data, please make sure the settings are correct.
date_suffix:
just: Just
min: minutes ago
hour: hours ago
day: days ago
month: months ago
donate: Donate
share: Share
bookmark:
title: Bookmark
rightside:
readmode_title: Read Mode
font_plus_title: Increase Font Size
font_minus_title: Decrease Font Size
translate_title: Switch Between Traditional Chinese And Simplified Chinese
night_mode_title: Switch Between Light And Dark Mode
back_to_top: Back To Top
@@ -87,8 +98,6 @@ rightside:
scroll_to_comment: Scroll To Comments
setting: Setting
runtime_unit: days
copy_copyright:
author: Author
link: Link
@@ -96,9 +105,6 @@ copy_copyright:
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
Snackbar:
bookmark:
message_prev: Press
message_next: to bookmark this page
chs_to_cht: Traditional Chinese Activated Manually
cht_to_chs: Simplified Chinese Activated Manually
day_to_night: Dark Mode Activated Manually

View File

@@ -67,21 +67,32 @@ aside:
card_webinfo:
headline: 网站资讯
article_name: 文章数目
runtime_name: 已运行时间
runtime:
name: 已运行时间
unit:
last_push_date:
name: 最后更新时间
site_wordcount: 本站总字数
site_uv_name: 本站访客数
site_pv_name: 本站总访问量
more_button: 查看更多
card_newest_comments:
heading: 最新评论
loading_text: 正在加载中...
error: 无法获取资料,请确认相关配置是否正确
date_suffix:
just: 刚刚
min: 分钟前
hour: 小时前
day: 天前
month: 个月前
donate: 打赏
share: 分享
bookmark:
title: 添加书签
rightside:
readmode_title: 阅读模式
font_plus_title: 放大字体
font_minus_title: 缩小字体
translate_title: 简繁转换
night_mode_title: 浅色和深色模式转换
back_to_top: 回到顶部
@@ -89,8 +100,6 @@ rightside:
scroll_to_comment: 直达评论
setting: 设置
runtime_unit:
copy_copyright:
author: 作者
link: 链接
@@ -98,15 +107,11 @@ copy_copyright:
info: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
Snackbar:
bookmark:
message_prev:
message_next: 键将本页加入书签
chs_to_cht: 你已切换为繁体
cht_to_chs: 你已切换为简体
day_to_night: 你已切换为深色模式
night_to_day: 你已切换为浅色模式
error_title: 页面没有找到
loading: 加载中...
error404:

View File

@@ -67,21 +67,32 @@ aside:
card_webinfo:
headline: 網站資訊
article_name: 文章數目
runtime_name: 已執行時間
runtime:
name: 已運行時間
unit:
last_push_date:
name: 最後更新時間
site_wordcount: 本站總字數
site_uv_name: 本站訪客數
site_pv_name: 本站總訪問量
more_button: 檢視更多
card_newest_comments:
heading: 最新評論
loading_text: 正在加載中...
error: 無法獲取資料,請確認相關配置是否正確
date_suffix:
just: 剛剛
min: 分鐘前
hour: 小時前
day: 天前
month: 個月前
donate: 打賞
share: 分享
bookmark:
title: 新增書籤
rightside:
readmode_title: 閱讀模式
font_plus_title: 放大字型
font_minus_title: 縮小字型
translate_title: 簡繁轉換
night_mode_title: 淺色和深色模式轉換
back_to_top: 回到頂部
@@ -89,8 +100,6 @@ rightside:
scroll_to_comment: 直達評論
setting: 設定
runtime_unit:
copy_copyright:
author: 作者
link: 連結
@@ -98,9 +107,6 @@ copy_copyright:
info: 著作權歸作者所有。商業轉載請聯絡作者獲得授權,非商業轉載請註明出處。
Snackbar:
bookmark:
message_prev:
message_next: 鍵將本頁加入書籤
chs_to_cht: 你已切換為繁體
cht_to_chs: 你已切換為簡體
day_to_night: 你已切換為深色模式

View File

@@ -13,8 +13,7 @@ html(lang=config.language data-theme=theme.display_mode)
canvas.fireworks
if theme.background
- var is_photo = theme.background.startsWith('url') ? 'photo':'color'
#web_bg(data-type=is_photo)
#web_bg
#error-wrap
.error-content

View File

@@ -1,24 +0,0 @@
#page
.flink#article-container
if site.data.link
each i in site.data.link
if i.class_name
h2!= i.class_name
if i.class_desc
.flink-desc!=i.class_desc
.flink-list
each item in i.link_list
.flink-list-item
a(href=url_for(item.link) title=item.name target="_blank")
if theme.lazyload.enable
img(data-lazy-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
else
img(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
span.flink-item-name= item.name
span.flink-item-desc(title=item.descr)= item.descr
!= page.content
if page.comments !== false && theme.comments && theme.comments.use
- var commentsJsLoad = true
!=partial('includes/third-party/comments/index', {}, {cache:theme.fragment_cache})

View File

@@ -15,7 +15,7 @@ div
script(src=url_for(theme.CDN.instantpage) type="module" defer)
if theme.lazyload.enable
script(src=url_for(theme.CDN.lazyload) async)
script(src=url_for(theme.CDN.lazyload))
if (theme.snackbar && theme.snackbar.enable)
script(src=url_for(theme.CDN.snackbar))
@@ -33,9 +33,12 @@ div
!=partial('includes/loading/loading-js', {}, {cache:theme.fragment_cache})
.js-pjax
if is_home() && theme.subtitle.enable
if theme.subtitle.enable && is_home() && theme.index_img !== false
include ./third-party/subtitle.pug
if page.type === 'artitalk'
include ./third-party/artitalk.pug
include ./third-party/math/index.pug
if commentsJsLoad
@@ -44,6 +47,14 @@ div
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async src=url_for(theme.CDN.busuanzi))
!=partial('includes/third-party/prismjs', {}, {cache:theme.fragment_cache})
if theme.aside.enable && theme.newest_comments.enable
if theme.pjax.enable
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
else if (!is_post() && page.aside !== false)
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
!=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)})
!=partial('includes/third-party/effect', {}, {cache:theme.fragment_cache})
@@ -51,11 +62,13 @@ div
!=partial('includes/third-party/chat/index', {}, {cache:theme.fragment_cache})
if theme.aplayerInject && theme.aplayerInject.enable
if theme.pjax || theme.aplayerInject.per_page
if theme.pjax.enable || theme.aplayerInject.per_page
include ./head/aplayer.pug
else if page.aplayer
include ./head/aplayer.pug
if theme.pjax
if theme.pjax.enable
!=partial('includes/third-party/pjax', {}, {cache:theme.fragment_cache})
!=partial('includes/third-party/baidu_push', {}, {cache:theme.fragment_cache})

View File

@@ -10,52 +10,45 @@
- var isSubtitle = config.subtitle ? ' - ' + config.subtitle : ''
- var tabTitle = is_home() || !pageTitle ? config.title + isSubtitle : pageTitle + ' | ' + config.title
- var pageDescription = page_description()
- var pageKeywords
- if (page.keywords) pageKeywords = Array.isArray(page.keywords) ? (page.keywords).join(',') : ([]).join(',') || page.keywords
- else if (page.tags && page.tags.length) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',')
- else pageKeywords = Array.isArray(config.keywords) ? (config.keywords).join(','): ([]).join(',') || config.keywords
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
- var pageCopyright = config.copyright || config.author
- var themeColor = theme.display_mode === 'dark' ? '#0d0d0d' : '#ffffff'
meta(charset='UTF-8')
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width,initial-scale=1")
title= tabTitle
meta(name="description" content!=pageDescription)
if pageKeywords
meta(name="keywords" content=pageKeywords)
meta(name="author" content=pageAuthor)
meta(name="copyright" content=pageCopyright)
meta(name ="format-detection" content="telephone=no")
!=favicon_tag(theme.favicon || config.favicon)
link(rel="canonical" href=urlNoIndex())
meta(name="theme-color" content=themeColor)
if theme.disable_baidu_transformation
meta(http-equiv="Cache-Control" content="no-transform")
meta(http-equiv="Cache-Control" content="no-siteapp")
//- Open_Graph
include ./head/Open_Graph.pug
!=favicon_tag(theme.favicon || config.favicon)
link(rel="canonical" href=urlNoIndex())
//- 預解析
!=partial('includes/head/preconnect', {}, {cache:theme.fragment_cache})
//- 網站驗證
!=partial('includes/head/site_verification', {}, {cache:theme.fragment_cache})
//- Open_Graph
include ./head/Open_Graph.pug
if theme.facebook_comments.app_id
meta(property="fb:app_id" content=theme.facebook_comments.app_id )
if theme.facebook_comments.user_id
meta(property="fb:admins" content=theme.facebook_comments.user_id)
//- PWA
if (theme.pwa && theme.pwa.enable)
!=partial('includes/head/pwa', {}, {cache:theme.fragment_cache})
if theme.darkmode.enable
!=partial('includes/head/darkmode', {}, {cache:theme.fragment_cache})
//- main css
link(rel='stylesheet', href=url_for(theme.CDN.main_css))
link(rel='stylesheet', href=url_for(theme.CDN.fontawesome))
@@ -77,7 +70,7 @@ if theme.algolia_search.enable
!=partial('includes/head/analytics', {}, {cache:theme.fragment_cache})
//- font
if theme.blog_title_font.font_link
if theme.blog_title_font && theme.blog_title_font.font_link
link(rel='stylesheet' href=url_for(theme.blog_title_font.font_link))
//- global config
@@ -86,5 +79,7 @@ if theme.blog_title_font.font_link
include ./head/config_site.pug
include ./head/noscript.pug
!=partial('includes/head/darkmode', {}, {cache:theme.fragment_cache})
!=fragment_cache('injectHead', function(){return injectHtml(theme.inject.head)})

View File

@@ -1,12 +1,11 @@
- var contentType = is_post() ? 'article' : 'website'
if theme.Open_Graph_meta
meta(property="og:type" content=contentType)
meta(property="og:title" content=pageTitle)
meta(property="og:url" content=urlNoIndex())
meta(property="og:site_name" content=config.title)
meta(property="og:description" content!=pageDescription)
meta(property="og:image" content=full_url_for(page.cover || theme.avatar.img))
meta(property="article:published_time" content=date_xml(page.date))
meta(property="article:modified_time" content=date_xml(page.updated))
meta(name="twitter:card" content="summary")
- let contentType = is_post() ? 'article' : 'website'
- let metaImage = full_url_for(page.cover || theme.avatar.img)
- let fb_appId = theme.facebook_comments.app_id || ''
- let fb_admins = theme.facebook_comments.user_id || ''
!= open_graph({type: contentType, image: metaImage, fb_admins: fb_admins, fb_app_id: fb_appId})
else
meta(name="description" content=page_description())

View File

@@ -17,4 +17,16 @@ if theme.google_analytics
gtag('config', '!{theme.google_analytics}');
if theme.tencent_analytics
script(src=`https://tajs.qq.com/stats?sId=${theme.tencent_analytics}` charset="UTF-8" data-pjax)
script.
var _mtac = {};
(function() {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "!{theme.tencent_analytics}");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
if theme.cnzz_analytics
script(async data-pjax src=`https://s4.cnzz.com/z_stat.php?id=${theme.cnzz_analytics}&web_id=${theme.cnzz_analytics}`)

View File

@@ -1,6 +1,6 @@
-
var algolia = 'undefined';
var env = process.env;
let algolia = 'undefined';
let env = process.env;
if (theme.algolia_search.enable) {
algolia = JSON.stringify({
appId: env.ALGOLIA_APP_ID || config.algolia.appId || config.algolia.applicationID,
@@ -16,7 +16,7 @@
})
}
var localSearch = 'undefined';
let localSearch = 'undefined';
if (theme.local_search && theme.local_search.enable) {
localSearch = JSON.stringify({
path: config.search.path,
@@ -26,7 +26,8 @@
}
})
}
var translate = 'undefined';
let translate = 'undefined';
if (theme.translate && theme.translate.enable){
translate = JSON.stringify({
defaultEncoding: theme.translate.defaultEncoding,
@@ -36,7 +37,7 @@
})
}
var copyright = 'undefined';
let copyright = 'undefined';
if (theme.copy.enable && theme.copy.copyright.enable){
copyright = JSON.stringify({
limitCount: theme.copy.copyright.limit_count,
@@ -49,7 +50,7 @@
})
}
var ClickShowText = 'undefined';
let ClickShowText = 'undefined';
if (theme.ClickShowText && theme.ClickShowText.enable) {
ClickShowText = JSON.stringify({
text: theme.ClickShowText.text.join(","),
@@ -57,14 +58,9 @@
})
}
var Snackbar = 'undefined';
let Snackbar = 'undefined';
if (theme.snackbar && theme.snackbar.enable) {
Snackbar = JSON.stringify({
bookmark: {
message_prev: _p("Snackbar.bookmark.message_prev"),
message_next: _p("Snackbar.bookmark.message_next")
},
chs_to_cht: _p("Snackbar.chs_to_cht"),
cht_to_chs: _p("Snackbar.cht_to_chs"),
day_to_night: _p("Snackbar.day_to_night"),
@@ -75,7 +71,7 @@
})
}
var noticeOutdate = 'undefined';
let noticeOutdate = 'undefined';
if (theme.noticeOutdate && theme.noticeOutdate.enable) {
noticeOutdate = JSON.stringify({
limitDay: theme.noticeOutdate.limit_day,
@@ -85,38 +81,81 @@
})
}
let highlight = 'undefined';
if ((config.highlight && config.highlight.enable) || (config.prismjs && config.prismjs.enable)) {
highlight = JSON.stringify({
plugin: config.highlight.enable ? 'highlighjs' : 'prismjs',
highlightCopy: theme.highlight_copy,
highlightLang: theme.highlight_lang
})
}
script.
var GLOBAL_CONFIG = {
root: '!{config.root}',
hexoversion: '!{get_hexo_version()}',
algolia: !{algolia},
localSearch: !{localSearch},
translate: !{translate},
noticeOutdate: !{noticeOutdate},
highlight: !{highlight},
copy: {
success: '!{_p("copy.success")}',
error: '!{_p("copy.error")}',
noSupport: '!{_p("copy.noSupport")}'
},
bookmark: {
message_prev: '!{_p("Snackbar.bookmark.message_prev")}',
message_next: '!{_p("Snackbar.bookmark.message_next")}'
relativeDate: {
homepage: !{theme.post_meta.page.date_format === 'relative'},
post: !{theme.post_meta.post.date_format === 'relative'}
},
runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}',
date_suffix: {
just: '!{_p("date_suffix.just")}',
min: '!{_p("date_suffix.min")}',
hour: '!{_p("date_suffix.hour")}',
day: '!{_p("date_suffix.day")}',
month: '!{_p("date_suffix.month")}'
},
runtime_unit: '!{_p("runtime_unit")}',
runtime: !{theme.runtimeshow.enable},
copyright: !{copyright},
ClickShowText: !{ClickShowText},
medium_zoom: !{theme.medium_zoom},
fancybox: !{theme.fancybox},
lightbox: '!{ theme.medium_zoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null" )}',
Snackbar: !{Snackbar},
justifiedGallery: {
js: '!{theme.CDN.justifiedGallery_js}',
css: '!{theme.CDN.justifiedGallery_css}'
},
baiduPush: !{theme.baidu_push},
highlightCopy: !{theme.highlight_copy},
highlightLang: !{theme.highlight_lang},
isPhotoFigcaption: !{theme.photofigcaption},
islazyload: !{theme.lazyload.enable},
isanchor: !{theme.anchor}
};
var saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}

View File

@@ -1,52 +1,47 @@
script.
var activateDarkMode = function () {
if theme.darkmode.enable
script.
(function () {
window.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#000')
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
var activateLightMode = function () {
window.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#fff')
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
var getCookies = function (name) {
const value = `; ${document.cookie}`
const parts = value.split(`; ${name}=`)
if (parts.length === 2) return parts.pop().split(';').shift()
}
var autoChangeMode = '#{theme.darkmode.autoChangeMode}'
var t = getCookies('theme')
const autoChangeMode = '#{theme.darkmode.autoChangeMode}'
const t = saveToLocal.get('theme')
if (autoChangeMode === '1') {
var isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
var isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
var isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
var hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
if (t === undefined) {
if (isLightMode) activateLightMode()
else if (isDarkMode) activateDarkMode()
else if (isNotSpecified || hasNoSupport) {
console.log('You specified no preference for a color scheme or your browser does not support it. I Schedule dark mode during night time.')
var now = new Date()
var hour = now.getHours()
var isNight = hour <= 6 || hour >= 18
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
isNight ? activateDarkMode() : activateLightMode()
}
window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
if (Cookies.get('theme') === undefined) {
if (saveToLocal.get('theme') === undefined) {
e.matches ? activateDarkMode() : activateLightMode()
}
})
} else if (t === 'light') activateLightMode()
else activateDarkMode()
} else if (autoChangeMode === '2') {
now = new Date()
hour = now.getHours()
isNight = hour <= 6 || hour >= 18
const now = new Date()
const hour = now.getHours()
const isNight = hour <= 6 || hour >= 18
if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
else if (t === 'light') activateLightMode()
else activateDarkMode()
@@ -54,3 +49,5 @@ script.
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
}
})()

View File

@@ -1,9 +1,14 @@
noscript.
<style>
<style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style>

View File

@@ -7,9 +7,12 @@ if theme.baidu_analytics
link(rel="preconnect" href="//hm.baidu.com")
if theme.tencent_analytics
link(rel="preconnect" href="//ta.qq.com")
link(rel="preconnect" href="//pingjs.qq.com")
if theme.blog_title_font.font_link && theme.blog_title_font.font_link.indexOf('//fonts.googleapis.com') != -1
if theme.cnzz_analytics
link(rel="preconnect" href="//s4.cnzz.com")
if theme.blog_title_font && theme.blog_title_font.font_link && theme.blog_title_font.font_link.indexOf('//fonts.googleapis.com') != -1
link(rel="preconnect" href="//fonts.googleapis.com" crossorigin)
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv

View File

@@ -1,6 +1,4 @@
link(rel="manifest" href=url_for(theme.pwa.manifest))
if(theme.pwa.theme_color)
meta(name="theme-color" content=theme.pwa.theme_color)
if(theme.pwa.theme_color)
meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
if(theme.pwa.apple_touch_icon)

View File

@@ -1,43 +1,60 @@
if is_home()
- var top_img = theme.index_img || theme.default_top_img
else if is_post()
if page.top_img !== false
if is_post()
- var top_img = page.top_img || page.cover || page.randomcover || theme.default_top_img
else if is_archive()
- var top_img = theme.archive_img || theme.default_top_img
else if is_tag()
- var top_img = theme.tag_img || theme.default_top_img
else if is_category()
- var top_img = theme.category_img || theme.default_top_img
else
else if is_page()
- var top_img = page.top_img || theme.default_top_img
else if is_tag()
- var top_img = theme.tag_per_img && theme.tag_per_img[page.tag]
- top_img = top_img ? top_img : (theme.tag_img !== false ? theme.tag_img || theme.default_top_img : false)
else if is_category()
- var top_img = theme.category_per_img && theme.category_per_img[page.category]
- top_img = top_img ? top_img : (theme.category_img !== false ? theme.category_img || theme.default_top_img : false)
else if is_home()
- var top_img = theme.index_img !== false ? theme.index_img || theme.default_top_img : false
else if is_archive()
- var top_img = theme.archive_img !== false ? theme.archive_img || theme.default_top_img : false
else
- var top_img = page.top_img || theme.default_top_img
if theme.douban
if theme.douban
- var doubanExist = false
if is_current('/movies/', [strict])
- var top_img = theme.douban.movies_img || theme.default_top_img
- var top_img = theme.douban.movies_img !== false ? theme.douban.movies_img || theme.default_top_img : false
- doubanExist = true
else if is_current('/books/', [strict])
- var top_img = theme.douban.books_img || theme.default_top_img
- var top_img = theme.douban.books_img !== false ? theme.douban.books_img || theme.default_top_img : false
- doubanExist = true
else if is_current('/games/', [strict])
- var top_img = theme.douban.games_img || theme.default_top_img
- var top_img = theme.douban.games_img !== false ? theme.douban.games_img || theme.default_top_img : false
- doubanExist = true
- var bg_img = top_img && top_img !== true ? `background-image: url(${url_for(top_img)})` : ''
- var site_title = is_archive() ? _p('page.archives') : page.title || page.tag || page.category || config.title
- var isHomeClass = is_home() ? 'full_page' : 'not-index-bg'
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
if top_img !== false
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url(${url_for(top_img)})` : `background: ${top_img}`
- var bg_img = top_img ? imgSource : ''
- var site_title = is_archive() ? _p('page.archives') : page.title || page.tag || page.category || config.title
- var isHomeClass = is_home() ? 'full_page' : 'not-index-bg'
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
else
- var isHomeClass = 'no-top-img'
else
- var top_img = false
- var isHomeClass = 'no-top-img'
header#page-header(class=isHomeClass style=bg_img)
!=partial('includes/header/nav', {}, {cache:theme.fragment_cache})
if is_home()
if top_img !== false
if is_post()
include ./post-info.pug
else if is_home()
#site-info
h1#site_title=site_title
#site_subtitle
h1#site-title=site_title
#site-subtitle
span#subtitle
if(theme.social)
#site_social_icons
!=fragment_cache('social', function(){return partial('includes/header/social')})
#scroll_down
#scroll-down
i.fas.fa-angle-down.scroll-down-effects
else if is_post()
include ./post-info.pug
else
#page_site-info
h1#site_title=site_title
#page-site-info
h1#site-title=site_title

View File

@@ -1,4 +1,7 @@
if theme.menu
//- for mobile sidebar
- let sidebarChildHide = theme.hide_sidebar_menu_child ? 'hide' : ''
.menus_items
each value, label in theme.menu
if !Array.isArray(value)
@@ -13,7 +16,7 @@ if theme.menu
if label.split('||')[1]
i.fa-fw(class=trim(label.split('||')[1]))
span=' '+ trim(label.split('||')[0])
i.fas.fa-chevron-down.expand
i.fas.fa-chevron-down.expand(class=sidebarChildHide)
ul.menus_item_child
each i in value
li

View File

@@ -1,8 +1,8 @@
nav#nav
span#blog_name.pull-left
a#site-name.blog_title(href=url_for('/')) #[=config.title]
span#blog_name
a#site-name(href=url_for('/')) #[=config.title]
span.pull-right.menus
span#menus
if (theme.algolia_search.enable || theme.local_search.enable)
#search_button
a.site-page.social-icon.search
@@ -10,7 +10,7 @@ nav#nav
span=' '+_p('search')
!=fragment_cache('menus', function(){return partial('includes/header/menu_item')})
span.toggle-menu.close
span#toggle-menu.close
a.site-page
i.fas.fa-bars.fa-fw

View File

@@ -12,8 +12,7 @@ html(lang=config.language data-theme=theme.display_mode)
#body-wrap
if theme.background
- var is_photo = theme.background.startsWith('url') ? 'photo':'color'
#web_bg(data-type=is_photo)
#web_bg
include ./sidebar.pug
include ./header/index.pug
@@ -24,7 +23,8 @@ html(lang=config.language data-theme=theme.display_mode)
div!= body
else
block content
include widget/index.pug
if theme.aside.enable && page.aside !== false
!=partial('includes/widget/index', {}, {cache:theme.fragment_cache})
else
main#content-inner.layout_post
if body
@@ -32,9 +32,16 @@ html(lang=config.language data-theme=theme.display_mode)
else
block content
- var footer_bg = theme.footer_bg == false ? '' : bg_img
- var is_bg = theme.footer_bg == false ? 'color' : 'photo'
footer#footer(style=footer_bg data-type=is_bg)
- var footerBg = theme.footer_bg
if (footerBg)
if (footerBg === true)
- var footer_bg = bg_img
else
- var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url(${url_for(footerBg)})` : `background: ${footerBg}`
else
- var footer_bg = ''
footer#footer(style=footer_bg)
!=partial('includes/footer', {}, {cache:theme.fragment_cache})
include ./rightside.pug

View File

@@ -1,6 +1,13 @@
script.
var endLoading = function () {
var preloader = {
endLoading: () => {
document.body.style.overflow = 'auto';
document.getElementById('loading-box').classList.add("loaded")
},
initLoading: () => {
document.body.style.overflow = '';
document.getElementById('loading-box').classList.remove("loaded")
}
window.addEventListener('load',endLoading)
}
window.addEventListener('load',()=> {preloader.endLoading()})

View File

@@ -57,9 +57,12 @@ mixin postUI(posts)
span.article-meta__link #[='•']
//- Display the article introduction on homepage
if theme.index_post_content.method == 1
case theme.index_post_content.method
when false
- break
when 1
.content!= article.description
else if theme.index_post_content.method == 2
when 2
if article.description
.content!= article.description
else
@@ -67,7 +70,7 @@ mixin postUI(posts)
- let expert = content.substring(0, theme.index_post_content.length)
- content.length > theme.index_post_content.length ? expert += ' ...' : ''
.content!= expert
else
default
- const content = strip_html(article.content)
- let expert = content.substring(0, theme.index_post_content.length)
- content.length > theme.index_post_content.length ? expert += ' ...' : ''
@@ -75,4 +78,4 @@ mixin postUI(posts)
if theme.ad && theme.ad.index
if (index + 1) % 3 == 0
.recent-post-item.ad_height!=theme.ad.index
.recent-post-item.ad-height!=theme.ad.index

View File

@@ -0,0 +1,4 @@
if top_img === false
h1.page-title= page.title
#artitalk_main

View File

@@ -0,0 +1,5 @@
.category-lists
.category-title.is-center= _p('page.category')
| -
span.category-amount= site.categories.length
div!= list_categories()

View File

@@ -0,0 +1,6 @@
if theme.douban && theme.douban.meta && doubanExist
meta(name="referrer" content="no-referrer")
#article-container
if top_img === false
h1.page-title= page.title
!= page.content

View File

@@ -0,0 +1,19 @@
.flink#article-container
if site.data.link
each i in site.data.link
if i.class_name
h2!= i.class_name
if i.class_desc
.flink-desc!=i.class_desc
.flink-list
each item in i.link_list
.flink-list-item
a(href=url_for(item.link) title=item.name target="_blank")
if theme.lazyload.enable
img(data-lazy-src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
else
img(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name )
span.flink-item-name= item.name
span.flink-item-desc(title=item.descr)= item.descr
!= page.content

View File

@@ -0,0 +1,5 @@
.tag-cloud-title.is-center= _p('page.tag')
| -
span.tag-cloud-amount= site.tags.length
.tag-cloud-list.is-center
!=cloudTags({source: site.tags, minfontsize: 1.2, maxfontsize: 2.1, limit: 0, unit: 'em'})

View File

@@ -1,32 +1,31 @@
section#rightside
#rightside-config-hide
if is_post()
if theme.readmode
if is_post() && theme.readmode
button#readmode(type="button" title=_p('rightside.readmode_title'))
i.fas.fa-book-open
button#font_plus(type="button" title=_p('rightside.font_plus_title'))
i.fas.fa-plus
button#font_minus(type="button" title=_p('rightside.font_minus_title'))
i.fas.fa-minus
if theme.translate && theme.translate.enable
if theme.translate.enable
button#translateLink(type="button" title=_p('rightside.translate_title'))= theme.translate.default
if theme.darkmode.enable && theme.darkmode.button
button#darkmode(type="button" title=_p('rightside.night_mode_title'))
i.fas.fa-adjust
#rightside-config-show
if is_post()
if (theme.readmode || theme.translate.enable || (theme.darkmode.enable && theme.darkmode.button))
button#rightside_config(type="button" title=_p("rightside.setting"))
i.fas.fa-cog
if is_post() && page.comments !== false && theme.comments.use
if commentsJsLoad
a#to_comment(href="#post-comment" title=_p("rightside.scroll_to_comment"))
i.fas.fa-comments
if showToc
button#mobile-toc-button.close(type="button" title=_p("rightside.toc"))
i.fas.fa-list-ul
else if theme.translate.enable || (theme.darkmode.enable && theme.darkmode.button)
button#rightside_config(type="button" title=_p("rightside.setting"))
i.fas.fa-cog
if theme.chat_btn
button#chat_btn(type="button" title=_p("rightside.chat_btn"))
i.fas.fa-sms
button#go-up(type="button" title=_p("rightside.back_to_top"))
i.fas.fa-arrow-up

View File

@@ -0,0 +1,24 @@
- let option = theme.artitalk.option ? JSON.stringify(theme.artitalk.option) : false
script.
(()=>{
let setting = {
appId: '!{theme.artitalk.appId}',
appKey: '!{theme.artitalk.appKey}',
}
if (!{Boolean(option)}) {
const otherSetting = !{option}
setting = Object.assign({}, setting, otherSetting)
}
const init = () => {
new Artitalk(setting)
}
if (typeof Artitalk === 'function') {
init()
} else {
$.getScript('!{theme.CDN.artitalk}',init)
}
})()

View File

@@ -0,0 +1,15 @@
if theme.baidu_push
script.
(function(){
const bp = document.createElement('script');
const curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https'){
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else{
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
bp.dataset.pjax = ''
const s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})()

View File

@@ -16,7 +16,7 @@ if theme.chat_btn
initGitter()
if (!{theme.pjax}) {
if (!{theme.pjax.enable}) {
document.addEventListener('pjax:complete', () => {
chat.destroy()
initGitter()

View File

@@ -25,7 +25,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Disqus' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.getElementById('disqus_thread'), loadDisqus)
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('disqus_thread'), loadDisqus)
else loadDisqus()
} else {
function loadOtherComment () {

View File

@@ -34,7 +34,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Disqusjs' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.getElementById('disqus_thread'), loadDisqusjs)
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('disqus_thread'), loadDisqusjs)
else loadDisqusjs()
}
else {

View File

@@ -16,7 +16,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Facebook Comments' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.querySelector('#post-comment .fb-comments'), loadFBComment)
if (!{theme.comments.lazyload}) btf.loadComment(document.querySelector('#post-comment .fb-comments'), loadFBComment)
else loadFBComment()
} else {
function loadOtherComment () {

View File

@@ -40,7 +40,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Gitalk' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.getElementById('gitalk-container'), loadGitalk)
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('gitalk-container'), loadGitalk)
else loadGitalk()
} else {
function loadOtherComment () {

View File

@@ -16,7 +16,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Livere' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.getElementById('lv-container'), loadLivere)
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('lv-container'), loadLivere)
else loadLivere()
}
else {

View File

@@ -25,7 +25,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Utterances' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.getElementById('utterances-wrap'), loadUtterances)
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('utterances-wrap'), loadUtterances)
else loadUtterances()
} else {
function loadOtherComment () {

View File

@@ -5,7 +5,7 @@ if site.data.valine
script.
function loadValine () {
function initValine () {
window.valine = new Valine({
const initData = {
el: '#vcomment',
appId: '#{theme.valine.appId}',
appKey: '#{theme.valine.appKey}',
@@ -20,8 +20,13 @@ script.
emojiMaps: !{emojiMaps},
enableQQ: #{theme.valine.enableQQ},
path: window.location.pathname,
});
if ('#{theme.valine.requiredFields}') { valine.config.requiredFields= '#{theme.valine.requiredFields}'.split(',') }
}
if (!{Boolean(theme.valine.requiredFields)}) {
initData.requiredFields= ('!{theme.valine.requiredFields}'.split(','))
}
const valine = new Valine(initData)
}
if (typeof Valine === 'function') initValine()
@@ -29,7 +34,7 @@ script.
}
if ('!{theme.comments.use[0]}' === 'Valine' || !!{theme.comments.lazyload}) {
if (!{theme.comments.lazyload}) loadComment(document.querySelector('#vcomment'),loadValine)
if (!{theme.comments.lazyload}) btf.loadComment(document.querySelector('#vcomment'),loadValine)
else setTimeout(() => loadValine(), 0)
} else {
function loadOtherComment () {

View File

@@ -1,14 +1,13 @@
if theme.fireworks && theme.fireworks.enable
canvas.fireworks
script(src=url_for(theme.CDN.anime))
canvas.fireworks(mobile=`${theme.fireworks.mobile}`)
script(src=url_for(theme.CDN.fireworks))
if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
script(defer id="ribbon" src=url_for(theme.CDN.canvas_ribbon) size=theme.canvas_ribbon.size
alpha=theme.canvas_ribbon.alpha zIndex=theme.canvas_ribbon.zIndex mobile=`${theme.canvas_ribbon.mobile}` data-click=`${theme.canvas_ribbon.click_to_change}`)
if (theme.canvas_ribbon_piao && theme.canvas_ribbon_piao.enable)
script(defer id="ribbon_piao" mobile=`${theme.canvas_ribbon_piao.mobile}` src=url_for(theme.CDN.canvas_ribbon_piao))
if (theme.canvas_fluttering_ribbon && theme.canvas_fluttering_ribbon.enable)
script(defer id="fluttering_ribbon" mobile=`${theme.canvas_fluttering_ribbon.mobile}` src=url_for(theme.CDN.canvas_fluttering_ribbon))
if (theme.canvas_nest && theme.canvas_nest.enable)
script#canvas_nest(defer color=theme.canvas_nest.color opacity=theme.canvas_nest.opacity zIndex=theme.canvas_nest.zIndex count=theme.canvas_nest.count mobile=`${theme.canvas_nest.mobile}` src=url_for(theme.CDN.canvas_nest))
@@ -16,13 +15,14 @@ if (theme.canvas_nest && theme.canvas_nest.enable)
if theme.activate_power_mode.enable
script(src=url_for(theme.CDN.activate_power_mode))
script.
POWERMODE.colorful = #{theme.activate_power_mode.colorful};
POWERMODE.shake = #{theme.activate_power_mode.shake};
POWERMODE.colorful = !{theme.activate_power_mode.colorful};
POWERMODE.shake = !{theme.activate_power_mode.shake};
POWERMODE.mobile = !{theme.activate_power_mode.mobile};
document.body.addEventListener('input', POWERMODE);
//- 鼠標特效
if theme.click_heart
script(src=url_for(theme.CDN.click_heart) async)
if theme.click_heart && theme.click_heart.enable
script#click-heart(src=url_for(theme.CDN.click_heart) async mobile=`${theme.click_heart.mobile}`)
if theme.ClickShowText && theme.ClickShowText.enable
script(src=url_for(theme.CDN.ClickShowText) async)
script#click-show-text(src=url_for(theme.CDN.ClickShowText) async mobile=`${theme.ClickShowText.mobile}`)

View File

@@ -28,7 +28,15 @@ script.
math.end = {node: text, delim: '', n: 0}
doc.math.push(math)
}
}, '']
}, ''],
addClass: [200,() => {
document.querySelectorAll('mjx-container:not([display=\'true\']').forEach( node => {
const target = node.parentNode
if (!target.classList.contains('has-jax')) {
target.classList.add('mathjax-overflow')
}
})
}, '', false]
}
}
}

View File

@@ -7,7 +7,7 @@ script.
mermaid.initialize({
theme: '!{theme.mermaid.theme}',
})
!{theme.pjax} && mermaid.init()
!{theme.pjax.enable} && mermaid.init()
})
}
}

View File

@@ -0,0 +1,74 @@
script.
window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<[^>]+>/g,"") // remove html tag
content = content.replace(/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|jpeg|gif|png|webp)/g, '') // remove image link
content = content.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, '') // remove url
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getDisqusComment = () => {
let disqusArray = []
$.getJSON('https://disqus.com/api/3.0/forums/listPosts.json?forum=!{theme.newest_comments.disqus.forum}&related=thread&limit=!{theme.newest_comments.limit}&api_key=!{theme.newest_comments.disqus.api_key}', function(data){
$.each(data.response, (i, item) => {
disqusArray.push({
'avatar': item.author.avatar.cache,
'content': changeContent(item.message),
'nick': item.author.name,
'url': item.url,
'date': item.createdAt
})
})
// set expiry to 10 min
saveToLocal.set('disqus-newest-comments', JSON.stringify(disqusArray), 10/(60*24))
generateHtml(disqusArray)
}).fail(()=>{
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= "!{_p('aside.card_newest_comments.error')}"
})
}
const generateHtml = array => {
let result = ''
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (!{theme.newest_comments.avatar}) {
result += `<a href='${array[i].url}' class='thumbnail'><img src='${array[i].avatar}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick}</span><time> / ${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= result
window.pjax && window.pjax.refresh($dom)
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('disqus-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getDisqusComment()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})

View File

@@ -0,0 +1,74 @@
script.
window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<[^>]+>/g,"") // remove html tag
content = content.replace(/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|jpeg|gif|png|webp)/g, '') // remove image link
content = content.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, '') // remove url
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getGithubIssues = () => {
let githubArray = []
$.getJSON('https://api.github.com/repos/!{theme.newest_comments.github_issues.repo}/issues/comments?sort=updated&direction=desc&per_page=!{theme.newest_comments.limit}&page=1', (data) => {
$.each(data, (index, item) => {
githubArray.push({
'avatar': item.user.avatar_url,
'content': changeContent(item.body),
'nick': item.user.login,
'url': item.html_url,
'date': item.updated_at
})
})
saveToLocal.set('github-newest-comments', JSON.stringify(githubArray), 10/(60*24))
generateHtml(githubArray)
}).fail(()=>{
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= "!{_p('aside.card_newest_comments.error')}"
})
}
const generateHtml = array => {
let result = ''
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (!{theme.newest_comments.avatar}) {
result += `<a href='${array[i].url}' class="thumbnail"><img src='${array[i].avatar}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick}</span><time> / ${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= result
window.pjax && window.pjax.refresh($dom)
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('github-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getGithubIssues()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})

View File

@@ -0,0 +1,6 @@
if theme.newest_comments.leancloud.enable
include ./leancloud.pug
else if theme.newest_comments.github_issues.enable
include ./github-issues.pug
else if theme.newest_comments.disqus.enable
include ./disqus-comment.pug

View File

@@ -0,0 +1,99 @@
script(src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.17.0/js/md5.min.js")
script.
window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<[^>]+>/g,"") // remove html tag
content = content.replace(/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|jpeg|gif|png|webp)/g, '') // remove image link
content = content.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, '') // remove url
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getIcon = (icon, mail) => {
if (icon) return icon
let defaultIcon = '!{ theme.newest_comments.leancloud.default_avatar ? `?d=${theme.newest_comments.leancloud.default_avatar}` : ''}'
let iconUrl = `https://gravatar.loli.net/avatar/${md5(mail.toLowerCase()) + defaultIcon}`
return iconUrl
}
const generateHtml = array => {
let result = ''
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (!{theme.newest_comments.avatar}) {
result += `<a href='${array[i].url}' class="thumbnail"><img src='${getIcon(array[i].avatar, array[i].mail)}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick}</span><time> / ${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= result
window.pjax && window.pjax.refresh($dom)
}
const getValineData = () => {
let serverURL = ''
if (!{Boolean(theme.newest_comments.leancloud.serverURL)}) {
serverURL = '!{theme.newest_comments.leancloud.serverURL}'
} else {
serverURL = 'https://!{theme.newest_comments.leancloud.appId.substring(0,8)}.api.lncldglobal.com'
}
var settings = {
"url": `${serverURL}/1.1/classes/Comment?limit=!{theme.newest_comments.limit}&order=-createdAt`,
"method": "GET",
"timeout": 0,
"headers": {
"X-LC-Id": '!{theme.newest_comments.leancloud.appId}',
"X-LC-Key": '!{theme.newest_comments.leancloud.appKey}',
"Content-Type": "application/json"
},
}
$.ajax(settings).done((response) => {
var valineArray = []
response.results.forEach((e)=>{
valineArray.push({
'avatar': e.QQAvatar,
'content': changeContent(e.comment),
'mail': e.mail,
'nick': e.nick,
'url': e.url,
'date': e.createdAt,
})
})
saveToLocal.set('leancloud-newest-comments', JSON.stringify(valineArray), 10/(60*24))
generateHtml(valineArray)
}).fail(()=>{
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= "!{_p('aside.card_newest_comments.error')}"
})
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('leancloud-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getValineData()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})

View File

@@ -1,27 +1,39 @@
- var pjaxExclude = 'a:not([target="_blank"])'
if theme.pjax.exclude
each val in theme.pjax.exclude
- pjaxExclude = pjaxExclude + `:not([href="${val}"])`
script(src=url_for(theme.CDN.pjax))
script.
var pjax = new Pjax({
elements: 'a:not([target="_blank"])',
selectors: [
let pjaxSelectors = [
'title',
'meta[name=description]',
'#config_change',
'#body-wrap',
'#rightside-config-hide',
'#rightside-config-show',
'.js-pjax'
],
]
if (!{Boolean(theme.Open_Graph_meta && theme.comments.use && theme.comments.use.includes('Livere'))}) {
pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}
var pjax = new Pjax({
elements: '!{pjaxExclude}',
selectors: pjaxSelectors,
cacheBust: false,
analytics: !{theme.google_analytics ? true : false},
scrollRestoration: false
})
document.addEventListener('pjax:complete', function () {
refreshFn()
window.refreshFn()
$('script[data-pjax]').each(function () {
$(this).parent().append($(this).remove())
})
GLOBAL_CONFIG.islazyload && lazyLoadInstance.update()
GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()
typeof chatBtnFn === 'function' && chatBtnFn()
typeof panguInit === 'function' && panguInit()
@@ -32,9 +44,21 @@ script.
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()
// Analytics
if (!{theme.tencent_analytics ? true : false}) {
MtaH5.pgv()
}
// prismjs
typeof Prism === 'object' && Prism.highlightAll()
typeof preloader === 'object' && preloader.endLoading()
})
document.addEventListener('pjax:send', function () {
typeof preloader === 'object' && preloader.initLoading()
if (window.aplayers) {
for (let i = 0; i < window.aplayers.length; i++) {
if (!window.aplayers[i].options.fixed) {
@@ -50,7 +74,5 @@ script.
//reset readmode
$('body').hasClass('read-mode') && $('body').removeClass('read-mode')
//reset font-size
$('body').css('font-size') !== originFontSize && $('body').css('font-size', parseFloat(originFontSize))
})

View File

@@ -0,0 +1,5 @@
if config.prismjs && config.prismjs.enable && !config.prismjs.preprocess
script(src=url_for(theme.CDN.prismjs_js))
script(src=url_for(theme.CDN.prismjs_autoloader))
if config.prismjs.line_number
script(src=url_for(theme.CDN.prismjs_lineNumber_js))

View File

@@ -1,6 +1,7 @@
.addtoany
.a2a_kit.a2a_kit_size_32.a2a_default_style
each name in theme.addtoany.item
- let addtoanyItem = theme.addtoany.item.split(',')
each name in addtoanyItem
a(class="a2a_button_" + name)
a.a2a_dd(href="https://www.addtoany.com/share")

View File

@@ -11,19 +11,19 @@
.card-info-data
if site.posts.length
.card-info-data-item.is-center
a(href=url_for(config.archive_dir))
a(href=url_for(config.archive_dir) + '/')
.headline= _p('aside.articles')
.length_num= site.posts.length
if site.tags.length
.card-info-data-item.is-center
a(href=url_for(config.tag_dir))
a(href=url_for(config.tag_dir) + '/')
.headline= _p('aside.tags')
.length_num= site.tags.length
if site.categories.length
.card-info-data-item.is-center
a(href=url_for(config.category_dir))
a(href=url_for(config.category_dir) + '/')
.headline= _p('aside.categories')
.length_num= site.categories.length

View File

@@ -0,0 +1,7 @@
.card-widget#card-newest-comments
.card-content
.item-headline
i.fas.fa-bolt
span= _p('aside.card_newest_comments.heading')
.aside-list
span= _p('aside.card_newest_comments.loading_text')

View File

@@ -3,25 +3,25 @@
.item-headline
i.fas.fa-history
span= _p('aside.card_recent_post')
.aside-recent-item
.aside-list
- let postLimit = theme.aside.card_recent_post.limit === 0 ? site.posts.length : theme.aside.card_recent_post.limit || 5
- let sort = theme.aside.card_recent_post.sort === 'updated' ? 'updated' : 'date'
- site.posts.sort(sort, -1).limit(postLimit).each(function(article){
.aside-recent-post
- let link = article.link || article.path
- let title = article.title || _p('no_title')
- let no_cover = article.cover === false || !theme.cover.aside_enable ? 'no-aside-cover' : ''
- let no_cover = article.cover === false || !theme.cover.aside_enable ? 'no-cover' : ''
- let post_cover = article.cover
.aside-list-item(class=no_cover)
if post_cover && theme.cover.aside_enable
a.aside-post-cover(href=url_for(link) title=title)
a.thumbnail(href=url_for(link) title=title)
if theme.lazyload.enable
img.aside-post-bg(data-lazy-src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title)
img(data-lazy-src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title)
else
img.aside-post-bg(src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title)
.aside-post-info(class=no_cover)
a.aside-post-title(href=url_for(link) title=title)= title
img(src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title)
.content
a.title(href=url_for(link) title=title)= title
if theme.aside.card_recent_post.sort === 'updated'
time.aside-post_meta.post-meta-updated(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated)) #[=date(article.updated, config.date_format)]
time(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated)) #[=date(article.updated, config.date_format)]
else
time.aside-post_meta.post-meta-date(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date)) #[=date(article.date, config.date_format)]
time(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date)) #[=date(article.date, config.date_format)]
- })

View File

@@ -7,6 +7,6 @@ if site.tags.length
- let tagLimit = theme.aside.card_tags.limit === 0 ? 0 : theme.aside.card_tags.limit || 40
if theme.aside.card_tags.color
.card-tag-cloud!=cloudTags({source: site.tags, minfontsize: 16, maxfontsize: 22, limit: tagLimit})
.card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.1, maxfontsize: 1.5, limit: tagLimit, unit: 'em'})
else
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 22, amount: tagLimit , color: true, start_color: '#999', end_color: '#99a9bf'})
.card-tag-cloud!= tagcloud({min_font: 1.1, max_font: 1.5, amount: tagLimit , color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'})

View File

@@ -4,23 +4,28 @@
i.fas.fa-chart-line
span= _p('aside.card_webinfo.headline')
.webinfo
if theme.aside.card_webinfo.post_count
.webinfo-item
.webinfo-article-name= _p('aside.card_webinfo.article_name') + " :"
.webinfo-article-count= site.posts.length
.item-name= _p('aside.card_webinfo.article_name') + " :"
.item-count= site.posts.length
if theme.runtimeshow.enable
.webinfo-item
.webinfo-runtime-name= _p('aside.card_webinfo.runtime_name') + " :"
#webinfo-runtime-count.webinfo-runtime-count(publish_date=theme.runtimeshow.publish_date)
.item-name= _p('aside.card_webinfo.runtime.name') + " :"
.item-count#runtimeshow(data-publishDate=date_xml(theme.runtimeshow.publish_date))
if theme.wordcount.enable && theme.wordcount.total_wordcount
.webinfo-item
.webinfo-site-wordcount-name=_p('aside.card_webinfo.site_wordcount') + " :"
.webinfo-site-wordcount=totalcount(site)
.item-name=_p('aside.card_webinfo.site_wordcount') + " :"
.item-count=totalcount(site)
if theme.busuanzi.site_uv
.webinfo-item
.webinfo-site-uv-name= _p('aside.card_webinfo.site_uv_name') + " :"
.webinfo-site-uv-count#busuanzi_value_site_uv
.item-name= _p('aside.card_webinfo.site_uv_name') + " :"
.item-count#busuanzi_value_site_uv
if theme.busuanzi.site_pv
.webinfo-item
.webinfo-site-name= _p('aside.card_webinfo.site_pv_name') + " :"
.webinfo-site-pv-count#busuanzi_value_site_pv
.item-name= _p('aside.card_webinfo.site_pv_name') + " :"
.item-count#busuanzi_value_site_pv
if theme.aside.card_webinfo.last_push_date
.webinfo-item
.item-name= _p('aside.card_webinfo.last_push_date.name') + " :"
.item-count#last-push-date(data-lastPushDate=date_xml(Date.now()))

View File

@@ -1,19 +1,20 @@
if theme.aside.enable
if page.aside !== false
#aside_content.aside_content
#aside_content.aside_content
if theme.aside.card_author.enable
!=partial('includes/widget/card_author', {}, {cache:theme.fragment_cache})
include ./card_author.pug
.sticky_layout
if theme.aside.card_announcement.enable
!=partial('includes/widget/card_announcement', {}, {cache:theme.fragment_cache})
include ./card_announcement.pug
if theme.aside.card_recent_post.enable
!=partial('includes/widget/card_recent_post', {}, {cache:theme.fragment_cache})
include ./card_recent_post.pug
if theme.newest_comments.enable
include ./card_newest_comment.pug
if theme.ad && theme.ad.aside
!=partial('includes/widget/card_ad', {}, {cache:theme.fragment_cache})
include ./card_ad.pug
if theme.aside.card_categories.enable
!=partial('includes/widget/card_categories', {}, {cache:theme.fragment_cache})
include ./card_categories.pug
if theme.aside.card_tags.enable
!=partial('includes/widget/card_tags', {}, {cache:theme.fragment_cache})
include ./card_tags.pug
if theme.aside.card_archives.enable
!=partial('includes/widget/card_archives', {}, {cache:theme.fragment_cache})
if theme.aside.card_webinfo
!=partial('includes/widget/card_webinfo', {}, {cache:theme.fragment_cache})
include ./card_archives.pug
if theme.aside.card_webinfo.enable
include ./card_webinfo.pug

View File

@@ -1,34 +1,19 @@
extends includes/layout.pug
block content
if page.type === 'tags'
.tag-cloud
.tag-cloud__title= _p('page.tag')
| -
span.tag-cloud__amount= site.tags.length
.tag-cloud-tags
!=cloudTags({source: site.tags, minfontsize: 15, maxfontsize: 30, limit: 0})
if page.comments !== false && theme.comments && theme.comments.use
- var commentsJsLoad = true
!=partial('includes/third-party/comments/index', {}, {cache:theme.fragment_cache})
else if page.type === 'link'
include flink.pug
else if page.type === 'categories'
.category-content
.category-lists
.category__title= _p('page.category')
| -
span.category__amount= site.categories.length
div!= list_categories()
if page.comments !== false && theme.comments && theme.comments.use
- var commentsJsLoad = true
!=partial('includes/third-party/comments/index', {}, {cache:theme.fragment_cache})
else
#page
if theme.douban && theme.douban.meta
if (is_current('/movies/', [strict]) || is_current('/books/', [strict]) || is_current('/games/', [strict]))
meta(name="referrer" content="no-referrer")
#article-container!= page.content
case page.type
when 'tags'
include includes/page/tags.pug
when 'link'
include includes/page/flink.pug
when 'categories'
include includes/page/categories.pug
when 'artitalk'
include includes/page/artitalk.pug
default
include includes/page/default-page.pug
if page.comments !== false && theme.comments && theme.comments.use
- var commentsJsLoad = true
!=partial('includes/third-party/comments/index', {}, {cache:theme.fragment_cache})

View File

@@ -2,6 +2,9 @@ extends includes/layout.pug
block content
article#post(class="")
if top_img === false
include includes/header/post-info.pug
#article-container.post-content!=page.content
include includes/post/post-copyright.pug
.tag_share

View File

@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
"version": "3.0.0",
"version": "3.2.0",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
@@ -23,7 +23,7 @@
"email": "wong@jerryc.me"
},
"dependencies": {
"hexo-renderer-stylus": "^1.1.0",
"hexo-renderer-stylus": "^2.0.1",
"hexo-renderer-pug": "^1.0.0"
},
"homepage": "https://demo.jerryc.me/",

View File

@@ -0,0 +1,12 @@
const logger = require('hexo-log')()
hexo.extend.filter.register('before_generate', () => {
// Get first two digits of the Hexo version number
var hexoVer = hexo.version.replace(/(^.*\..*)\..*/, '$1')
if (hexoVer < 4.2) {
logger.error('Please update Hexo to V4.2.0 or higher!')
logger.error('請把 Hexo 升級到 V4.2.0 或更高的版本!')
process.exit(-1)
}
})

View File

@@ -1,14 +1,18 @@
/**
* Note: configs in _data/butterfly.yml will replace configs in hexo.theme.config.
* Note: configs in _data/butterfly.yml will merge configs with hexo.theme.config.
*/
'use strict'
const { deepMerge } = require('hexo-util')
hexo.on('generateBefore', function () {
const rootConfig = hexo.config
if (hexo.locals.get) {
const data = hexo.locals.get('data')
data && data.butterfly && (hexo.theme.config = data.butterfly)
if (data && data.butterfly) {
hexo.theme.config = deepMerge(hexo.theme.config, data.butterfly)
}
}
hexo.theme.config.rootConfig = rootConfig
})

View File

@@ -1,6 +1,8 @@
const logger = require('hexo-log')()
hexo.on('ready', () => {
const { version } = require('../../package.json')
hexo.log.info(`
logger.info(`
===================================================================
##### # # ##### ##### ###### ##### ###### # # #

View File

@@ -6,8 +6,13 @@
'use strict'
hexo.extend.filter.register('before_post_render', function (data) {
if (data.top_img && data.top_img.indexOf('/') === -1) data.top_img = data.path + data.top_img
if (data.cover && data.cover.indexOf('/') === -1) data.cover = data.path + data.cover
if (hexo.theme.config.rootConfig.post_asset_folder) {
const imgTestReg = /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/
const topImg = data.top_img
const cover = data.cover
if (topImg && topImg.indexOf('/') === -1 && imgTestReg.test(topImg)) data.top_img = data.path + topImg
if (cover && cover.indexOf('/') === -1) data.cover = data.path + cover
}
if (data.cover === false) {
data.randomcover = randomCover()
@@ -33,6 +38,7 @@ function randomCover () {
return cover
}
} else {
return theme.default_top_img
cover = 'https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg'
return cover
}
}

View File

@@ -91,7 +91,7 @@ hexo.extend.helper.register('aside_archives', function (options = {}) {
if (len > Judge) {
result += '<li class="card-archive-list-item more is-center">'
result += `<a class="card-archive-list-link-more" href="${this.url_for(archiveDir)}">
result += `<a class="card-archive-list-link-more" href="${this.url_for(archiveDir)}/">
<span>${moreButton}</span><i class="fas fa-angle-right" ></i></a></li>`
}
result += '</ul>'

View File

@@ -83,13 +83,13 @@ hexo.extend.helper.register('aside_categories', function (categories, options) {
let moreHtml = ''
if (categories.length <= limit) return ''
moreHtml += '<li class="card-category-list-item more is-center">'
moreHtml += `<a class="card-category-list-link-more" href="${categoryDir}">
moreHtml += `<a class="card-category-list-link-more" href="${categoryDir}/">
<span>${buttonLabel}</span><i class="fas fa-angle-right"></i></a></li>`
return moreHtml
}
return `<ul class="card-category-list">
return `<ul class="card-category-list" id="aside-cat-list">
${list[0]}
${moreButton()}
</ul>`

View File

@@ -34,17 +34,32 @@ hexo.extend.helper.register('injectHtml', function (data) {
hexo.extend.helper.register('cloudTags', function (options = {}) {
const env = this
const source = options.source
let source = options.source
const minfontsize = options.minfontsize
const maxfontsize = options.maxfontsize
const limit = options.limit
const unit = options.unit || 'px'
let result = ''
const tagLimit = limit === 0 ? source.length : limit
source.sort('name').limit(tagLimit).forEach(function (tags) {
const fontSize = Math.floor(Math.random() * (maxfontsize - minfontsize) + minfontsize) + 'px'
if (limit > 0) {
source = source.limit(limit)
}
const sizes = []
source.sort('length').forEach(tag => {
const { length } = tag
if (sizes.includes(length)) return
sizes.push(length)
})
const length = sizes.length - 1
source.forEach(tag => {
const ratio = length ? sizes.indexOf(tag.length) / length : 0
const size = minfontsize + ((maxfontsize - minfontsize) * ratio)
let style = `font-size: ${parseFloat(size.toFixed(2))}${unit};`
const color = 'rgb(' + Math.floor(Math.random() * 201) + ', ' + Math.floor(Math.random() * 201) + ', ' + Math.floor(Math.random() * 201) + ')' // 0,0,0 -> 200,200,200
result += `<a href='${env.url_for(tags.path)}' style='font-size:${fontSize}; color:${color}'>${tags.name}</a>`
style += ` color: ${color}`
result += `<a href="${env.url_for(tag.path)}" style="${style}">${tag.name}</a>`
})
return result
})
@@ -61,3 +76,7 @@ hexo.extend.helper.register('urlNoIndex', function () {
hexo.extend.helper.register('md5', function (path) {
return crypto.createHash('md5').update(decodeURI(this.url_for(path))).digest('hex')
})
hexo.extend.helper.register('get_hexo_version', function () {
return hexo.version
})

View File

@@ -48,11 +48,11 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
if (relatedPosts.length > 0) {
result += '<div class="relatedPosts">'
result +=
'<div class="relatedPosts_headline"><i class="fas fa-thumbs-up fa-fw"></i><span>' +
'<div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>' +
' ' +
headlineLang +
'</span></div>'
result += '<div class="relatedPosts_list">'
result += '<div class="relatedPosts-list">'
for (let i = 0; i < Math.min(relatedPosts.length, limitNum); i++) {
const cover =
@@ -60,33 +60,33 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
? relatedPosts[i].randomcover
: relatedPosts[i].cover
result +=
'<div class="relatedPosts_item"><a href="' +
'<div><a href="' +
hexoConfig.root +
relatedPosts[i].path +
'" title="' +
relatedPosts[i].title +
'">'
result +=
'<img class="relatedPosts_cover" ' +
'<img class="cover" ' +
lazySrc +
'="' +
cover +
this.url_for(cover) +
'">'
if (dateType === 'created') {
result +=
'<div class="relatedPosts_main is-center"><div class="relatedPosts_date"><i class="far fa-calendar-alt fa-fw"></i>' +
'<div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i>' +
' ' +
this.date(relatedPosts[i].created, hexoConfig.date_format) +
'</div>'
} else {
result +=
'<div class="relatedPosts_main is-center"><div class="relatedPosts_date"><i class="fas fa-history fa-fw"></i>' +
'<div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i>' +
' ' +
this.date(relatedPosts[i].updated, hexoConfig.date_format) +
'</div>'
}
result +=
'<div class="relatedPosts_title">' + relatedPosts[i].title + '</div>'
'<div class="title">' + relatedPosts[i].title + '</div>'
result += '</div></a></div>'
}

View File

@@ -44,7 +44,7 @@ function hideBlock (args, content) {
group += '"'
return `<div class="hide-block"><button type="button" class="hide-button button--animated" ${group}>${display}
</button><span class="hide-content">${hexo.render.renderSync({ text: content, engine: 'markdown' }).split('\n').join('')}</span></div>`
</button><span class="hide-content">${hexo.render.renderSync({ text: content, engine: 'markdown' })}</span></div>`
}
function hideToggle (args, content) {
@@ -63,7 +63,7 @@ function hideToggle (args, content) {
group += '"'
return `<div class="hide-toggle" ${border}><div class="hide-button toggle-title" ${group}><i class="fas fa-caret-right fa-fw"></i><span>${display}</span></div>
<div class="hide-content">${hexo.render.renderSync({ text: content, engine: 'markdown' }).split('\n').join('')}</div></div>`
<div class="hide-content">${hexo.render.renderSync({ text: content, engine: 'markdown' })}</div></div>`
}
hexo.extend.tag.register('hideInline', hideInline)

View File

@@ -7,9 +7,7 @@
'use strict'
function mermaid (args, content) {
return `<div class="mermaid">
${content}
</div>`
return `<div class="mermaid">${content}</div>`
}
hexo.extend.tag.register('mermaid', mermaid, { ends: true })

View File

@@ -1,14 +1,26 @@
/**
* note.js
* transplant from hexo-theme-next
* Modify by Jerry
*/
'use strict'
function postNote (args, content) {
return `<div class="note ${args.join(' ')}">
${hexo.render.renderSync({ text: content, engine: 'markdown' }).split('\n').join('')}
</div>`
const styleConfig = hexo.theme.config.note.style
const lastArgs = args[args.length - 1]
if (!(lastArgs === 'flat' || lastArgs === 'modern' || lastArgs === 'simple' || lastArgs === 'disabled')) {
args.push(styleConfig)
}
let icon = ''
const iconArray = args[args.length - 2]
if (iconArray && iconArray.startsWith('fa')) {
icon = `<i class="note-icon ${iconArray}"></i>`
args[args.length - 2] = 'icon'
}
return `<div class="note ${args.join(' ')}">${icon + hexo.render.renderSync({ text: content, engine: 'markdown' })}</div>`
}
hexo.extend.tag.register('note', postNote, { ends: true })

View File

@@ -44,7 +44,7 @@ function postTabs (args, content) {
const icon = tabIcon.trim()
tabIcon.length > 0 && (tabIcon = `<i class="${icon}"${isOnlyicon}></i>`)
const toTop = '<button type="button" class="tab-to-top" onclick="scrollToDest($(this).parents(\'.tabs\'),65)"><i class="fas fa-arrow-up"></i></button>'
const toTop = '<button type="button" class="tab-to-top"><i class="fas fa-arrow-up"></i></button>'
const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : ''
tabNav += `<li class="tab${isActive}"><button type="button" data-href="#${tabHref}">${tabIcon + tabCaption.trim()}</button></li>`

View File

@@ -17,30 +17,217 @@
text-rendering: auto
-webkit-font-smoothing: antialiased
[data-theme='light']
--global-bg: $body-bg
--font-color: $font-black
--hr-border: lighten($theme-hr-color, 50%)
--hr-before-color: lighten($theme-hr-color, 30%)
--search-bg: $search-bg
--search-input-color: $search-input-color
--search-result-title: $search-result-title
--preloader-bg: $preloader-bg
--preloader-color: $preloader-word-color
--tab-border-color: $tab-border-color
--tab-botton-bg: $tab-botton-bg
--tab-botton-color: $tab-botton-color
--tab-button-hover-bg: $tab-button-hover-bg
--tab-button-active-bg: $tab-button-active-bg
--card-bg: $card-bg
--sidebar-bg: $sidebar-background
--btn-hover-color: $button-hover-color
--btn-color: $button-color
--btn-bg: $button-bg
--text-bg-hover: $text-bg-hover
--light-grey: $light-grey
--white: $white
--text-highlight-color: $text-highlight-color
--blockquote-color: $blockquote-color
--blockquote-bg: $blockquote-background-color
--reward-pop: $reward-pop-up-bg
maxWidth600()
@media screen and (max-width: 600px)
{block}
maxWidth768()
@media screen and (max-width: 768px)
{block}
minWidth768()
@media screen and (min-width: 768px)
{block}
maxWidth1024()
@media screen and (max-width: 1024px)
{block}
maxWidth900()
@media screen and (max-width: 900px)
{block}
minWidth900()
@media screen and (min-width: 900px)
{block}
minWidth2000()
@media screen and (min-width: 2000px)
{block}
// animation
if hexo-config('enter_transitions')
#content-inner,
#footer
animation: main 1s
#page-header
animation: header-effect 1s
#site-title,
#site-subtitle
animation: titlescale 1s
#nav.show
animation: headerNoOpacity 1s
canvas:not(#ribbon-canvas),
#web_bg
animation: to_show 4s
#ribbon-canvas
animation: ribbon_to_show 4s
.tocOpenPc
.sidebar-toc__title
animation: tocsidebarLtoR .5s
.sidebar-toc__progress
animation: tocsidebarLtoR .7s
.sidebar-toc__content
animation: tocsidebarLtoR .9s
.tocOpenMobile
.sidebar-toc__title
animation: tocsidebarRtoL .4s
.sidebar-toc__progress
animation: tocsidebarRtoL .6s
.sidebar-toc__content
animation: tocsidebarRtoL .7s
#mobile-sidebar-menus
&.open
for i in 1 2 3 4
> :nth-child({i})
animation: sidebarItem (i / 5)s
.card-announcement-animation
color: #FF0000
animation: announ_animation .8s linear infinite
.scroll-down-effects
animation: scroll-down-effect 1.5s infinite
if hexo-config('avatar.effect') == true
.avatar-img
animation: avatar_turn_around 2s linear infinite
.reward-main
animation: donate_effcet .3s .1s ease both
@keyframes scroll-down-effect
0%
top: 0
opacity: .4
50%
top: -16px
opacity: 1
100%
top: 0
opacity: .4
@keyframes header-effect
0%
opacity: 0
transform: translateY(-50px)
100%
opacity: 1
transform: translateY(0)
@keyframes headerNoOpacity
0%
transform: translateY(-50px)
100%
transform: translateY(0)
@keyframes main
0%
opacity: 0
transform: translateY(50px)
100%
opacity: 1
transform: translateY(0)
@keyframes titlescale
0%
opacity: 0
transform: scale(.7)
100%
opacity: 1
transform: scale(1)
@keyframes search_close
0%
opacity: 1
transform: scale(1)
100%
opacity: 0
transform: scale(.7)
@keyframes to_show
0%
opacity: 0
100%
opacity: 1
@keyframes ribbon_to_show
0%
opacity: 0
100%
opacity: hexo-config('canvas_ribbon.alpha')
@keyframes avatar_turn_around
from
transform: rotate(0)
to
transform: rotate(360deg)
@keyframes sub_menus
0%
opacity: 0
transform: translateY(10px)
100%
opacity: 1
transform: translateY(0)
@keyframes donate_effcet
0%
opacity: 0
transform: translateY(-20px)
100%
opacity: 1
transform: translateY(0)
@keyframes announ_animation
0%,
to
transform: scale(1)
50%
transform: scale(1.2)
@keyframes sidebarItem
0%
transform: translateX(200px)
100%
transform: translateX(0)
@keyframes tocsidebarRtoL
0%
transform: translateX(200px)
100%
transform: translateX(0)
@keyframes tocsidebarLtoR
0%
transform: translateX(-200px)
100%
transform: translateX(0)

View File

@@ -1,6 +1,35 @@
[data-theme='light']
--global-bg: $body-bg
--font-color: $font-black
--hr-border: lighten($theme-hr-color, 50%)
--hr-before-color: lighten($theme-hr-color, 30%)
--search-bg: $search-bg
--search-input-color: $search-input-color
--search-result-title: $search-result-title
--preloader-bg: $preloader-bg
--preloader-color: $preloader-word-color
--tab-border-color: $tab-border-color
--tab-botton-bg: $tab-botton-bg
--tab-botton-color: $tab-botton-color
--tab-button-hover-bg: $tab-button-hover-bg
--tab-button-active-bg: $tab-button-active-bg
--card-bg: $card-bg
--sidebar-bg: $sidebar-background
--btn-hover-color: $button-hover-color
--btn-color: $button-color
--btn-bg: $button-bg
--text-bg-hover: $text-bg-hover
--light-grey: $light-grey
--white: $white
--text-highlight-color: $text-highlight-color
--blockquote-color: $blockquote-color
--blockquote-bg: $blockquote-background-color
--reward-pop: $reward-pop-up-bg
--sidebar-icon-color: $sidebar-icon-color
html
height: 100%
font-size: $rem
font-size: 20px
body
position: relative
@@ -112,34 +141,16 @@ button
cursor: pointer
// font
#page-header #site_title,
#page-header #site_subtitle,
#site-title,
#site-subtitle,
#site-name,
#aside_content .author-info__name,
#aside_content .author-info__description
font-family: $site-name-font
.is-right
text-align: right
.is-left
text-align: left
.is-center
text-align: center
.is_visible
display: block !important
.is-visible-inline
display: inline-block !important
.is-invisible
display: none !important
.is-hidden
overflow: hidden
.copy-true
user-select: all
@@ -186,191 +197,6 @@ img:not([src])
.post-ad
margin: 2rem 0
.ad_height
.ad-height
display: block !important
height: auto !important
// animation
#content-inner,
#footer
animation: main 1s
#page-header
animation: header-effect 1s
#site_title,
#site_subtitle
animation: titlescale 1s
canvas:not(#ribbon-canvas),
#web_bg
animation: to_show 4s
#ribbon-canvas
animation: ribbon_to_show 4s
.card-announcement-animation
color: #FF0000
animation: announ_animation .8s linear infinite
.scroll-down-effects
animation: scroll-down-effect 1.5s infinite
if hexo-config('avatar.effect') == true
.avatar-img
animation: avatar_turn_around 2s linear infinite
.reward-main
animation: donate_effcet .3s .1s ease both
.tocOpenPc
.sidebar-toc__title
animation: tocsidebarLtoR .5s
.sidebar-toc__progress
animation: tocsidebarLtoR .7s
.sidebar-toc__content
animation: tocsidebarLtoR .9s
.tocOpenMobile
.sidebar-toc__title
animation: tocsidebarRtoL .4s
.sidebar-toc__progress
animation: tocsidebarRtoL .6s
.sidebar-toc__content
animation: tocsidebarRtoL .7s
#mobile-sidebar-menus
&.open
transform: translate3d(-100%, 0, 0)
for i in 1 2 3 4
> :nth-child({i})
animation: sidebarItem (i / 5) s
@keyframes scroll-down-effect
0%
top: 0
opacity: .4
50%
top: -16px
opacity: 1
100%
top: 0
opacity: .4
@keyframes header-effect
0%
opacity: 0
transform: translateY(-50px)
100%
opacity: 1
transform: translateY(0)
@keyframes headerNoOpacity
0%
transform: translateY(-50px)
100%
transform: translateY(0)
@keyframes main
0%
opacity: 0
transform: translateY(50px)
100%
opacity: 1
transform: translateY(0)
@keyframes titlescale
0%
opacity: 0
transform: scale(.7)
100%
opacity: 1
transform: scale(1)
@keyframes search_close
0%
opacity: 1
transform: scale(1)
100%
opacity: 0
transform: scale(.7)
@keyframes to_show
0%
opacity: 0
100%
opacity: 1
@keyframes ribbon_to_show
0%
opacity: 0
100%
opacity: hexo-config('canvas_ribbon.alpha')
@keyframes avatar_turn_around
from
transform: rotate(0)
to
transform: rotate(360deg)
@keyframes sub_menus
0%
opacity: 0
transform: translateY(10px)
100%
opacity: 1
transform: translateY(0)
@keyframes donate_effcet
0%
opacity: 0
transform: translateY(-20px)
100%
opacity: 1
transform: translateY(0)
@keyframes announ_animation
0%,
to
transform: scale(1)
50%
transform: scale(1.2)
@keyframes sidebarItem
0%
transform: translateX(200px)
100%
transform: translateX(0)
@keyframes tocsidebarRtoL
0%
transform: translateX(200px)
100%
transform: translateX(0)
@keyframes tocsidebarLtoR
0%
transform: translateX(-200px)
100%
transform: translateX(0)

View File

@@ -1,12 +1,16 @@
// https://github.com/equinusocio/vsc-material-theme
$highlight_theme = hexo-config('highlight_theme')
$highlighEnable = hexo-config('rootConfig.highlight') && hexo-config('rootConfig.highlight.enable')
$prismjsEnable = hexo-config('rootConfig.prismjs') && hexo-config('rootConfig.prismjs.enable')
wordWrap = !hexo-config('rootConfig.highlight.line_number') && hexo-config('code_word_wrap')
@require 'theme'
if $highlight_theme != false
@require 'diff'
if $highlighEnable
@require 'highlight/index'
wordWrap = !hexo-config('rootConfig.highlight.line_number') && hexo-config('code_word_wrap')
if $prismjsEnable
@require 'prismjs/index'
$code-block
overflow: auto
@@ -45,7 +49,8 @@ blockquote
#article-container
pre,
code
font-family: $code-font !important
font-size: $code-font-size
font-family: $code-font-family !important
code
padding: .1rem .2rem
@@ -74,33 +79,10 @@ blockquote
padding: 8px 0
border: none
.line
if wordWrap
&:before
display: inline-block
padding: 0 .3rem 0 0
min-width: 1.6rem
color: $highlight-gutter.color
content: counter(line)
counter-increment: line
text-align: left
&.marked
background-color: $highlight-selection
table
display: block
overflow: auto
border: none
td
padding: 0
border: none
figcaption
clearfix()
figcaption,
.caption
padding: .3rem 0 .1rem .7rem
font-size: 1em
font-size: $code-font-size
line-height: 1em
a
@@ -111,26 +93,16 @@ blockquote
&:hover
border-bottom-color: $highlight-foreground
.gutter pre
padding-right: .5rem
padding-left: .5rem
background-color: $highlight-gutter.bg-color
color: $highlight-gutter.color
text-align: right
.code pre
padding-right: .5rem
padding-left: .5rem
width: 100%
.highlight-tools
position: relative
display: flex
align-items: center
overflow: hidden
width: 100%
height: 1.5rem
min-height: 1.2rem
height: 2.15em
background: $highlight-tools.bg-color
color: $highlight-tools.color
font-size: 14px
font-size: $code-font-size
&.closed + table
display: none
@@ -151,20 +123,17 @@ blockquote
.code-lang
position: absolute
left: .7rem
text-transform: capitalize
text-transform: uppercase
font-weight: bold
font-size: .8rem
line-height: 1.5rem
font-size: 1.15em
.copy-notice
position: absolute
top: .25rem
right: 1.7rem
opacity: 0
.copy-button
position: absolute
top: .4rem
right: .7rem
cursor: pointer
transition: color .2s
@@ -191,7 +160,6 @@ blockquote
.highlight-tools
&:after
position: absolute
top: .45rem
left: .7rem
width: 12px
height: 12px

View File

@@ -1,4 +1,3 @@
// For diff highlight
figure.highlight
table
&::-webkit-scrollbar-thumb

View File

@@ -0,0 +1,39 @@
if $highlight_theme != false
@require 'diff'
#article-container
figure.highlight
.line
if wordWrap
&:before
display: inline-block
padding: 0 .3rem 0 0
min-width: 1.6rem
color: $highlight-gutter.color
content: counter(line)
counter-increment: line
text-align: left
&.marked
background-color: $highlight-selection
table
display: block
overflow: auto
border: none
td
padding: 0
border: none
.gutter pre
padding-right: .5rem
padding-left: .5rem
background-color: $highlight-gutter.bg-color
color: $highlight-gutter.color
text-align: right
.code pre
padding-right: .5rem
padding-left: .5rem
width: 100%

View File

@@ -0,0 +1,302 @@
if $highlight_theme == 'light' || ($highlight_theme == 'mac light')
// prism-base16-ateliersulphurpool.light
pre[class*='language-']
.token.function
color: #ffb62c
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata
color: rgba(149, 165, 166, .8)
.token.punctuation
color: #5e6687
.token.namespace
opacity: .7
.token.operator,
.token.boolean,
.token.number
color: #c76b29
.token.property
color: #c08b30
.token.tag
color: #3d8fd1
.token.string
color: #22a2c9
.token.selector
color: #6679cc
.token.attr-name
color: #c76b29
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string
color: #22a2c9
.token.attr-value,
.token.keyword,
.token.control,
.token.directive,
.token.unit
color: #ac9739
.token.statement,
.token.regex,
.token.atrule
color: #22a2c9
.token.placeholder,
.token.variable
color: #3d8fd1
.token.deleted
text-decoration: line-through
.token.inserted
border-bottom: 1px dotted #202746
text-decoration: none
.token.italic
font-style: italic
.token.important,
.token.bold
font-weight: bold
.token.important
color: #c94922
.token.entity
cursor: help
pre > code.highlight
outline: .4em solid #c94922
outline-offset: .4em
if $highlight_theme == 'darker' || ($highlight_theme == 'mac')
// prism-atom-dark
pre[class*='language-']
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata
color: #7C7C7C
.token.punctuation
color: #c5c8c6
.namespace
opacity: .7
.token.property,
.token.keyword,
.token.tag
color: #96CBFE
.token.class-name
color: #FFFFB6
.token.boolean,
.token.constant
color: #99CC99
.token.symbol,
.token.deleted
color: #f92672
.token.number
color: #FF73FD
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted
color: #A8FF60
.token.variable
color: #C6C5FE
.token.operator
color: #EDEDED
.token.entity
color: #FFFFB6
cursor: help
.token.url
color: #96CBFE
.language-css .token.string,
.style .token.string
color: #87C38A
.token.atrule,
.token.attr-value
color: #F9EE98
.token.function
color: #DAD085
.token.regex
color: #E9C062
.token.important
color: #fd971f
.token.important,
.token.bold
font-weight: bold
.token.italic
font-style: italic
if $highlight_theme == 'pale night'
// prism-dracula
pre[class*='language-']
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata
color: #6272a4
.token.punctuation
color: #f8f8f2
.namespace
opacity: .7
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted
color: #ff79c6
.token.boolean,
.token.number
color: #bd93f9
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted
color: #50fa7b
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable
color: #f8f8f2
.token.atrule,
.token.attr-value,
.token.function,
.token.class-name
color: #f1fa8c
.token.keyword
color: #8be9fd
.token.regex,
.token.important
color: #ffb86c
.token.important,
.token.bold
font-weight: bold
.token.italic
font-style: italic
.token.entity
cursor: help
if $highlight_theme == 'ocean'
// prism-material-oceanic
pre[class*='language-']
&.language-css > code,
&.language-sass > code,
&.language-scss > code
color: #fd9170 !important
.namespace
opacity: .7
.token.atrule,
.token.symbol,
.token.constant,
.token.boolean,
.token.function
color: #c792ea
.token.attr-name,
.token.builtin,
.token.class
color: #ffcb6b
.token.attr-value,
.token.attribute,
.token.pseudo-class,
.token.pseudo-element,
.token.string
color: #c3e88d
.token.cdata,
.token.property,
.token.char,
.token.inserted
color: #80cbc4
.token.class-name,
.token.color,
.token.hexcode,
.token.regex
color: #f2ff00
.token.comment,
.token.prolog,
.token.doctype
color: #546e7a
.token.deleted,
.token.variable,
.token.entity,
.token.selector,
.token.tag,
.token.unit
color: #f07178
.token.id
color: #c792ea
font-weight: bold
.token.important
color: #c792ea
font-weight: bold
.token.keyword
color: #c792ea
font-style: italic
.token.number,
.token.url
color: #fd9170
.token.operator,
.token.punctuation
color: #89ddff

View File

@@ -0,0 +1,20 @@
if hexo-fonfig('rootConfig.prismjs.line_number')
@require 'line-number'
if $highlight_theme != false
@require 'diff'
#article-container
pre[class*='language-']
&::-webkit-scrollbar-thumb
background: $highlight-scrollbar
&:not(.line-numbers)
padding: 10px 20px
.caption
margin-left: -3.8em
padding: .2rem .8rem !important
a
padding: 0 !important

View File

@@ -0,0 +1,34 @@
#article-container
pre[class*='language-']
&.line-numbers
position: relative
padding-left: 3.8em
counter-reset: linenumber
line-height: $line-height-code-block
> code
position: relative
white-space: inherit
line-height: $line-height-code-block
.line-numbers-rows
position: absolute
top: 0
left: -3.8em
width: 3em
letter-spacing: -1px
font-size: 100%
pointer-events: none
user-select: none
& > span
display: block
counter-increment: linenumber
pointer-events: none
&:before
display: block
padding-right: .8em
color: $highlight-gutter.color
content: counter(linenumber)
text-align: right

View File

@@ -1,45 +1,7 @@
$highlight_theme = hexo-config('highlight_theme')
if $highlight_theme == 'default'
$highlight-background = #263238
$highlight-current-line = #efefef
$highlight-selection = #80CBC420
$highlight-foreground = #EEFFFF
$highlight-comment = #546E7A
$highlight-red = #FF5370
$highlight-orange = #F78C6C
$highlight-yellow = #FFCB6B
$highlight-green = #C3E88D
$highlight-aqua = #89DDFF
$highlight-blue = #82AAFF
$highlight-purple = #C792EA
$highlight-deletion = #BF42BF
$highlight-addition = #105EDE
$highlight-gutter = {
color: alpha($highlight-foreground, .5),
bg-color: $highlight-background
}
$highlight-tools = {
color: alpha($highlight-foreground, .8),
bg-color: darken($highlight-background, 2)
}
$highlight-scrollbar = darken($highlight-background, 6)
if $highlight_theme == 'darker' || ($highlight_theme == 'mac')
$highlight-background = #212121
$highlight-current-line = #282a2e
$highlight-selection = #61616150
$highlight-foreground = #EEFFFF
$highlight-comment = #969896
$highlight-red = #FF5370
$highlight-orange = #F78C6C
$highlight-yellow = #FFCB6B
$highlight-green = #C3E88D
$highlight-aqua = #89DDFF
$highlight-blue = #82AAFF
$highlight-purple = #C792EA
$highlight-deletion = #BF42BF
$highlight-addition = #105EDE
$highlight-mac-border = rgba(0, 0, 0, .4)
$highlight-gutter = {
color: alpha($highlight-foreground, .5),
@@ -51,12 +13,8 @@ if $highlight_theme == 'darker' || ($highlight_theme == 'mac')
}
$highlight-scrollbar = darken($highlight-background, 6)
if $highlight_theme == 'pale night'
$highlight-background = #292D3E
$highlight-current-line = #393939
$highlight-selection = #717CB450
$highlight-foreground = #A6ACCD
$highlight-comment = #676E95
if $highlighEnable
$highlight-comment = #969896
$highlight-red = #FF5370
$highlight-orange = #F78C6C
$highlight-yellow = #FFCB6B
@@ -66,6 +24,11 @@ if $highlight_theme == 'pale night'
$highlight-purple = #C792EA
$highlight-deletion = #BF42BF
$highlight-addition = #105EDE
if $highlight_theme == 'pale night'
$highlight-background = #292D3E
$highlight-selection = #717CB450
$highlight-foreground = #A6ACCD
$highlight-gutter = {
color: alpha($highlight-foreground, .5),
bg-color: $highlight-background
@@ -76,12 +39,8 @@ if $highlight_theme == 'pale night'
}
$highlight-scrollbar = darken($highlight-background, 6)
if $highlight_theme == 'ocean'
$highlight-background = #0F111A
$highlight-current-line = #000000
$highlight-selection = #717CB450
$highlight-foreground = #8F93A2
$highlight-comment = rgba(101, 115, 126, .8)
if $highlighEnable
$highlight-comment = #676E95
$highlight-red = #FF5370
$highlight-orange = #F78C6C
$highlight-yellow = #FFCB6B
@@ -91,6 +50,11 @@ if $highlight_theme == 'ocean'
$highlight-purple = #C792EA
$highlight-deletion = #BF42BF
$highlight-addition = #105EDE
if $highlight_theme == 'ocean'
$highlight-background = #0F111A
$highlight-selection = #717CB450
$highlight-foreground = #8F93A2
$highlight-gutter = {
color: alpha($highlight-foreground, .5),
bg-color: $highlight-background
@@ -101,11 +65,34 @@ if $highlight_theme == 'ocean'
}
$highlight-scrollbar = darken($highlight-background, 5)
if $highlighEnable
$highlight-comment = rgba(101, 115, 126, .8)
$highlight-red = #FF5370
$highlight-orange = #F78C6C
$highlight-yellow = #FFCB6B
$highlight-green = #C3E88D
$highlight-aqua = #89DDFF
$highlight-blue = #82AAFF
$highlight-purple = #C792EA
$highlight-deletion = #BF42BF
$highlight-addition = #105EDE
if $highlight_theme == 'light' || ($highlight_theme == 'mac light')
$highlight-background = #F6F8FA
$highlight-current-line = #00346e
$highlight-selection = #80CBC440
$highlight-foreground = #90A4AE
$highlight-mac-border = rgba(144, 164, 174, .4)
$highlight-tools = {
color: $highlight-foreground,
bg-color: darken($highlight-background, 5)
}
$highlight-gutter = {
color: alpha($highlight-foreground, .5),
bg-color: $highlight-background
}
$highlight-scrollbar = darken($highlight-background, 8)
if $highlighEnable
$highlight-comment = rgba(149, 165, 166, .8)
$highlight-red = #E53935
$highlight-orange = #F76D47
@@ -116,16 +103,6 @@ if $highlight_theme == 'light' || ($highlight_theme == 'mac light')
$highlight-purple = #7C4DFF
$highlight-deletion = #BF42BF
$highlight-addition = #105EDE
$highlight-mac-border = rgba(144, 164, 174, .4)
$highlight-gutter = {
color: alpha($highlight-foreground, .5),
bg-color: $highlight-background
}
$highlight-tools = {
color: $highlight-foreground,
bg-color: darken($highlight-background, 5)
}
$highlight-scrollbar = darken($highlight-background, 8)
if $highlight_theme == false
$highlight-background = #F6F8FA
@@ -139,3 +116,4 @@ if $highlight_theme == false
color: $highlight-foreground,
bg-color: darken($highlight-background, 5)
}
$highlight-scrollbar = darken($highlight-background, 8)

View File

@@ -20,7 +20,7 @@ if hexo-config('error_404.enable')
background: var(--card-bg)
box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
@media screen and (max-width: 768px)
+maxWidth768()
flex-direction: column
margin: 0
height: 25rem
@@ -34,7 +34,7 @@ if hexo-config('error_404.enable')
background-position: center
background-size: cover
@media screen and (max-width: 768px)
+maxWidth768()
flex: 1
width: 100%
border-top-right-radius: 8px
@@ -47,7 +47,7 @@ if hexo-config('error_404.enable')
font-size: 14px
font-family: $site-name-font
@media screen and (max-width: 768px)
+maxWidth768()
flex: 1.1
width: 100%
@@ -55,7 +55,7 @@ if hexo-config('error_404.enable')
margin-top: -4rem
font-size: 9em
@media screen and (max-width: 768px)
+maxWidth768()
margin-top: -3rem
.error_subtitle

View File

@@ -1,11 +1,12 @@
#aside_content
width: 25%
.card-widget:not(:first-child)
margin-top: 1rem
> .card-widget:first-child
margin-top: 0
.card-widget
overflow: hidden
margin-top: 1rem
border-radius: 8px
background: var(--card-bg)
box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
@@ -27,7 +28,7 @@
.author-info
&__name
font-weight: 500
font-size: 1.1rem
font-size: 1.57em
&__description
margin-top: -.3rem
@@ -45,12 +46,12 @@
.headline
@extend .limit-one-line
color: var(--font-color)
font-size: .7rem
font-size: 1em
.length_num
margin-top: -.3rem
color: var(--text-highlight-color)
font-size: 1rem
font-size: 1.4em
.card-info-social-icons
margin: .3rem 0 -.3rem
@@ -58,7 +59,7 @@
.social-icon
margin: 0 .5rem
color: var(--font-color)
font-size: 1rem
font-size: 1.4em
cursor: pointer
i
@@ -72,7 +73,7 @@
background-color: var(--btn-bg)
color: var(--btn-color)
text-align: center
line-height: 1.6rem
line-height: 2.4
span
padding-left: .5rem
@@ -81,11 +82,21 @@
padding: 1rem 1.2rem
.item-headline
font-size: .8rem
font-size: 1.2em
span
margin-left: .5rem
& + div,
& + ul
padding: .3rem 0 0
.sticky_layout
+minWidth900()
position: sticky
position: -webkit-sticky
top: 20px
.card-tag-cloud
a
display: inline-block
@@ -94,63 +105,79 @@
&:hover
color: $text-hover !important
.card-recent-post
.aside-recent-item
margin: 10px 0 -15px
.aside-list
& > span
display: block
margin-bottom: .5rem
text-align: center
& > .aside-recent-post
margin-bottom: 10px
& > .aside-list-item
display: flex
align-items: center
padding: .3rem 0
.aside-post-cover
float: left
&:first-child
padding-top: 0
&:not(:last-child)
border-bottom: 1px dashed #f5f5f5
&:last-child
padding-bottom: 0
.thumbnail
overflow: hidden
width: 66px
height: 66px
width: w = 4.2em
height: w
.aside-post-bg
padding: 0
max-width: 100%
& > img
width: 100%
height: 100%
transition: all .6s
object-fit: cover
&:hover
box-shadow: none
transform: scale(1.1)
.aside-post-info
.aside-post_meta
.content
flex: 1
padding-left: 10px
color: $theme-meta-color
font-size: .6rem
word-break: break-all
.aside-post-title
& > .name
@extend .limit-more-line
-webkit-line-clamp: 1
& > time,
& > .name
display: block
color: $theme-meta-color
font-size: 85%
& > .title,
& > .comment
@extend .limit-more-line
padding-left: 10px
height: 40px
color: var(--font-color)
line-height: 1rem
font-size: 95%
line-height: 1.5
-webkit-line-clamp: 2
&:hover
color: $text-hover
&.no-aside-cover
.aside-post-title
height: auto
&.no-cover
min-height: 4.4em
.card-archives ul.card-archive-list,
.card-categories ul.card-category-list
margin: 0
padding: .2rem 0 0
list-style: none
.card-archives ul.card-archive-list > .card-archive-list-item,
.card-categories ul.card-category-list > .card-category-list-item
a
display: inline-block
padding: .15rem 1rem
padding: .15rem .5rem
width: 100%
color: var(--font-color)
transition: all .4s
@@ -211,25 +238,17 @@
.card-webinfo
.webinfo
padding: .2rem 1rem
.webinfo-item
display: block
padding: 4px 0 0
display: flex
align-items: center
padding: .1rem .5rem 0
div
&:first-child
display: inline-block
flex: 1
padding-right: 1rem
&:last-child
display: inline-block
float: right
@media screen and (max-width: 900px)
.layout_page
flex-direction: column
#recent-posts,
+maxWidth900()
#aside_content
width: 100% !important
@@ -237,7 +256,7 @@
.card-widget:first-child
margin-top: 1rem
@media screen and (min-width: 900px)
+minWidth900()
#aside_content
.card-widget
if hexo-config('aside.position') == 'right'
@@ -246,6 +265,6 @@
margin-right: 15px
if hexo-config('aside.mobile') == false
@media screen and (max-width: $sm)
+maxWidth768()
#aside_content
display: none

View File

@@ -1,33 +0,0 @@
.category-content
ul
margin-top: .4rem
padding: 0 0 0 1rem
list-style: none
counter-reset: li
ul
padding-left: .2rem
li
position: relative
margin: .3rem 0
padding: .1rem .2rem .1rem 1rem
&:before
position: absolute
left: 0
cursor: pointer
transition: all .3s ease-out
$w = .3rem
top: 10px
width: w = $w
height: h = w
border: .5 * w solid $light-blue
border-radius: w
background: transparent
content: ''
line-height: h
&:hover
&:before
border-color: $pseudo-hover

View File

@@ -6,7 +6,7 @@
display: inline-block
vertical-align: middle
font-weight: 700
font-size: 20px
font-size: 1.43em
.comment-switch
display: inline-block
@@ -33,10 +33,10 @@
label
position: relative
display: inline-block
margin: 0 .4rem
margin: -4px .4rem 0
width: 42px
height: 22px
vertical-align: sub
vertical-align: middle
input#switch-comments-btn
width: 0

View File

@@ -2,7 +2,6 @@
position: relative
width: 100%
background-color: $light-blue
background-attachment: scroll
background-position: center center
background-size: cover
background-repeat: no-repeat
@@ -19,27 +18,27 @@
padding: 0 .5rem
width: 100%
#site_title,
#site_subtitle,
#scroll_down .scroll-down-effects
#site-title,
#site-subtitle,
#scroll-down .scroll-down-effects
text-align: center
text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
line-height: 1.5
#site_title
#site-title
margin: 0
color: var(--white)
font-size: 1.3rem
font-size: 1.85em
@media screen and (min-width: $sm)
font-size: 2rem
+minWidth768()
font-size: 2.85em
#site_subtitle
#site-subtitle
color: var(--light-grey)
font-size: .8rem
font-size: 1.15em
@media screen and (min-width: $sm)
font-size: 1.2rem
+minWidth768()
font-size: 1.72em
#site_social_icons
display: none
@@ -47,17 +46,17 @@
width: 15rem
text-align: center
@media screen and (max-width: $sm)
+maxWidth768()
display: block
.social-icon
margin: 0 .5rem
color: var(--light-grey)
text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
font-size: 1rem
font-size: 1.43em
cursor: pointer
#scroll_down
#scroll-down
position: absolute
bottom: 0
width: 100%
@@ -73,23 +72,23 @@
&.not-index-bg
height: 20rem
@media screen and (max-width: $sm)
+maxWidth768()
height: 14rem
#page_site-info
#page-site-info
position: absolute
top: 10rem
padding: 0 .5rem
width: 100%
@media screen and (max-width: $sm)
+maxWidth768()
top: 7rem
// post
&.post-bg
height: 20rem
@media screen and (max-width: $sm)
+maxWidth768()
height: 18rem
&:before
@@ -102,6 +101,19 @@
background-color: alpha($dark-black, .5)
content: ''
&.no-top-img
margin-bottom: .5rem
height: 60px
background: 0
#nav
background: rgba(255, 255, 255, .8)
box-shadow: 0 5px 6px -5px rgba(133, 133, 133, .6)
a
color: var(--font-color)
text-shadow: none
#post-info
position: absolute
bottom: 1.5rem
@@ -109,16 +121,17 @@
width: 100%
text-align: left
@media screen and (max-width: $sm)
+maxWidth768()
bottom: 1.1rem
padding: 0 1.1rem
#post-info
#post-title
margin-bottom: .4rem
font-size: 1.5rem
font-size: 2.15em
@media screen and (max-width: $sm)
font-size: 1.2rem
+maxWidth768()
font-size: 1.72em
.posttitle
@extend .limit-more-line
@@ -130,12 +143,12 @@
color: var(--light-grey)
font-size: 95%
@media screen and (min-width: $sm)
+minWidth768()
> .meta-secondline
> span:first-child
display: none
@media screen and (max-width: $sm)
+maxWidth768()
font-size: 90%
> .meta-firstline,
@@ -163,6 +176,27 @@
color: $text-hover
text-decoration: underline
if hexo-config('post_meta.post.date_format') == 'relative'
time
display: none
// for not top_img
#post
& > #post-info
margin-bottom: 1.5rem
.posttitle
padding-bottom: .2rem
border-bottom: 1px solid var(--light-grey)
color: var(--text-highlight-color)
[data-theme='light']
#post
#post-info
#post-meta,
#post-meta a
color: #78818a
// css hack
// all browser in ios and safari in all apple device
_::-webkit-full-page-media,
@@ -174,22 +208,30 @@ _:future,
position: absolute
top: 0
z-index: 90
padding: 10px 36px
display: flex
flex-wrap: wrap
align-items: center
padding: 0 36px
width: 100%
height: 58px
border: none
font-size: 18px
height: 60px
font-size: 1.3em
opacity: 0
transition: all .5s
@media screen and (max-width: $sm)
padding: 10px .8rem
+maxWidth768()
padding: 0 16px
&:not(.fixed)
.menus
#menus
padding-right: 0 !important
.toggle-menu
&.show
opacity: 1
#blog_name
flex: 1
#toggle-menu
display: none
padding: .1rem 0 0 .3rem
vertical-align: top
@@ -197,10 +239,6 @@ _:future,
&:hover
color: var(--white)
&.is-visible-inline
.site-page
font-size: inherit
a
color: var(--light-grey)
@@ -217,7 +255,7 @@ _:future,
a,
#site-name,
.toggle-menu
#toggle-menu
color: var(--font-color)
text-shadow: none
@@ -300,6 +338,19 @@ _:future,
color: var(--font-color)
text-shadow: none
&.hide-menu
#toggle-menu
display: inline-block !important
.site-page
font-size: inherit
.menus_items
display: none !important
#search_button span
display: none !important
#search_button
display: inline
padding: 0 0 0 .7rem
@@ -308,5 +359,5 @@ _:future,
position: relative
padding-bottom: .3rem
text-shadow: .05rem .05rem .1rem rgba($dark-black, .3)
font-size: .7rem
font-size: .78em
cursor: pointer

View File

@@ -5,7 +5,6 @@ if hexo-config('preloader')
width: 50%
height: 100%
background-color: var(--preloader-bg)
transition: all .5s
#loading-box
.loading-left-bg
@@ -53,9 +52,11 @@ if hexo-config('preloader')
&.loaded
.loading-left-bg
transition: all .5s
transform: translate(-100%, 0)
.loading-right-bg
transition: all .5s
transform: translate(100%, 0)
.spinner-box

View File

@@ -19,6 +19,9 @@
background: var(--sidebar-bg)
transition: all .5s
&.open
transform: translate3d(-100%, 0, 0)
& > .mobile_author_icon
padding: 1.3rem 1.5rem 0
text-align: center
@@ -47,12 +50,10 @@
.length_num
color: var(--text-highlight-color)
font-size: .9rem
font-size: 1.28em
.headline
display: block
color: var(--font-color)
font-size: .7rem
hr
margin: 1rem auto
@@ -66,7 +67,7 @@
display: block
padding: .3rem 1.5rem
color: var(--font-color)
font-size: .8rem
font-size: 1.15em
cursor: pointer
i:first-child
@@ -81,13 +82,16 @@
.expand
position: absolute
right: 0
padding: .4rem
top: .78em
right: .4rem
transition: transform .3s
&.closed
&.hide
transform: rotate(90deg) !important
.menus_item_child
margin: 0
list-style: none
if hexo-config('hide_sidebar_menu_child')
display: none

View File

@@ -1,382 +0,0 @@
.layout_page
display: flex
align-items: flex-start
margin: 0 auto
padding: 2rem 15px
max-width: 1200px
// index
#recent-posts
width: 75%
& > .recent-post-item:not(:first-child)
margin-top: 1rem
& > .recent-post-item
display: flex
flex-direction: row
align-items: center
padding: 0
height: 280px
border-radius: 8px
background: var(--card-bg)
box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
transition: all .3s
&:hover
box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
img.post_bg
transform: scale(1.1)
if hexo-config('cover.position') == 'both'
.left_radius
border-radius: 8px 0 0 8px
.right_radius
order: 2
border-radius: 0 8px 8px 0
else if hexo-config('cover.position') == 'left'
.left_radius
border-radius: 8px 0 0 8px
.right_radius
border-radius: 8px 0 0 8px
else if hexo-config('cover.position') == 'right'
.left_radius
order: 2
border-radius: 0 8px 8px 0
.right_radius
order: 2
border-radius: 0 8px 8px 0
.post_cover
overflow: hidden
width: 45%
height: 280px
-webkit-mask-image: -webkit-radial-gradient(white, black)
img.post_bg
display: block
margin: 0
padding: 0
width: 100%
height: 100%
border: 0
transition: all .6s
object-fit: cover
&:hover
transform: scale(1.1)
& >.recent-post-info
display: inline-block
overflow: hidden
padding: 0 40px
width: 55%
&.no-cover
width: 100%
& > .article-title
@extend .limit-more-line
margin-bottom: .3rem
color: var(--text-highlight-color)
font-size: 1.2rem
line-height: 1.4
transition: all .2s ease-in-out
-webkit-line-clamp: 2
&:hover
color: $text-hover
& > .article-meta-wrap
color: $theme-meta-color
font-size: 90%
& > .post-meta-date
cursor: default
.sticky
color: $sticky-color
i
margin: 0 .2rem 0 0
.article-meta-label
if hexo-config('post_meta.page.label')
padding-right: .2rem
else
display: none
.article-meta__separator
margin: 0 .3rem
.article-meta__link
margin: 0 .2rem
.fa-angle-right
margin: 0 .2rem
a
color: $theme-meta-color
&:hover
color: $text-hover
text-decoration: underline
& > .content
@extend .limit-more-line
margin-top: .3rem
-webkit-line-clamp: 3
// tags page
.tag-cloud
a
display: inline-block
padding: 0 .4rem
cursor: pointer
transition: all .3s
&:hover
color: $text-hover !important
transform: scale(1.1)
&__title
text-align: center
font-size: 1.8rem
&-tags
text-align: center
.layout_post > #post,
.layout_page > div:first-child:not(.recent-posts)
padding: 50px 40px
border-radius: 8px
background: var(--card-bg)
box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
transition: all .3s
&:hover
box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
.layout_page
& > div:first-child:not(.recent-posts)
width: 75%
.article-sort
margin-left: .5rem
padding-left: 1rem
border-left: 2px solid lighten($light-blue, 20)
&-title
position: relative
margin-left: .5rem
padding-bottom: 1.2rem
padding-left: 1rem
font-size: 1.2rem
line-height: 1
&:hover
&:before
border-color: $pseudo-hover
&:before
position: absolute
top: .25rem
left: calc(-.5rem + 1px)
z-index: 1
width: w = .5rem
height: h = w
border: .5 * w solid $light-blue
border-radius: w
background: var(--card-bg)
content: ''
line-height: h
transition: all .2s ease-in-out
&:after
position: absolute
bottom: 0
left: 0
z-index: 0
width: .1rem
height: 1.3rem
background: lighten($light-blue, 20)
content: ''
&-item
position: relative
margin: 0 0 1rem .5rem
width: 100%
height: 80px
transition: all .2s ease-in-out
&:hover
&:before
border-color: $pseudo-hover
&:before
$w = .3rem
position: absolute
top: 1.8rem
left: calc(-1rem - 17px)
width: w = $w
height: h = w
border: .5 * w solid $light-blue
border-radius: w
background: var(--card-bg)
content: ''
line-height: h
transition: all .2s ease-in-out
&.no-article-cover
display: flex
flex-direction: column
justify-content: center
.article-sort-item-info
padding: 0
width: 100%
&.year
height: auto
font-size: 1rem
&:hover
&:before
border-color: $light-blue
&:before
top: .7rem
border-color: $pseudo-hover
&-time
color: $theme-meta-color
font-size: .9em
time
padding-left: .4rem
cursor: default
&-title
@extend .limit-more-line
color: var(--font-color)
font-size: 1.1em
transition: all .3s
-webkit-line-clamp: 2
&:hover
color: $text-hover
transform: translateX(20px)
&-img
float: left
overflow: hidden
width: 80px
height: 80px
img
width: 100%
height: 100%
transition: all .6s
object-fit: cover
&:hover
transform: scale(1.1)
&-info
display: inline-block
overflow: hidden
padding: 0 1rem
width: calc(100% - 80px)
.category-lists
padding: 1rem 0 1.5rem
.category__title
text-align: center
font-size: 1.8rem
.category-list
a
color: var(--font-color)
cursor: pointer
&:hover
color: $text-hover
.category-list-count
margin-left: .4rem
color: $theme-meta-color
&:before
content: '('
&:after
content: ')'
// aside
.hide-aside
max-width: 1000px
& > div
width: 100% !important
@media screen and (max-width: $sm)
.layout_page
padding: 1rem 5px !important
& > div:first-child:not(.recent-posts)
padding: 1.8rem .7rem
.category-lists
padding: 0
#recent-posts
.recent-post-item
flex-direction: column
height: auto !important
.post_cover
order: 1 !important
width: 100%
height: 230px
border-radius: 8px 8px 0 0
.recent-post-info
order: 2 !important
padding: 1rem 1rem 1.5rem
width: 100%
&.no-cover
padding: 1.5rem 1rem
.article-title
font-size: 1rem
.content
height: auto
@media screen and (min-width: 900px)
if hexo-config('aside.position') == 'left'
#recent-posts,
#page,
.category-content,
#archive,
.tag-cloud,
#tag,
#category
order: 2
@media screen and (max-width: 900px)
.layout_page
& > div:first-child:not(.recent-posts)
width: 100% !important
// ie10-ios11使
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active)
.recent-post-info
.content
height: 90px

View File

@@ -75,7 +75,7 @@
margin: 2rem 0 !important
background: $dark-black
@media screen and (max-width: 768px)
+maxWidth768()
.prev-post,
.next-post
width: 100% !important

View File

@@ -58,7 +58,7 @@ beautify()
list-style: none
counter-reset: li
@media screen and (max-width: $sm)
+maxWidth768()
padding: 0 0 0 .4rem
p
@@ -68,7 +68,7 @@ beautify()
ul
padding-left: .6rem
@media screen and (max-width: $sm)
+maxWidth768()
padding-left: .2rem
li
@@ -92,30 +92,30 @@ beautify()
ol
> li
&:not(.tab)
padding: .1rem .2rem .1rem 1.4rem
padding: .2em .2em .2em 1.8em
&:before
margin-top: .3rem
width: w = 1rem
margin-top: .65em
width: w = 1.45em
height: h = w
border-radius: .5 * w
content: counter(li)
counter-increment: li
text-align: center
font-size: .6rem
font-size: .85em
line-height: h
ul
> li:not(.tab)
padding: .1rem .2rem .1rem 1rem
padding: .2em .2em .2em 1.4em
&:hover
&:before
border-color: $pseudo-hover
&:before
$w = .3rem
top: 10px
$w = .42em
top: .78em
width: w = $w
height: h = w
border: .5 * w solid $light-blue
@@ -204,8 +204,7 @@ img
border: 1px solid $light-blue
border-radius: .6rem
color: $light-blue
font-size: 12px
cursor: pointer
font-size: .85em
transition: all .2s ease-in-out
&:hover
@@ -219,14 +218,14 @@ img
width: fit-content
.social-share
font-size: 12px
font-size: .85em
.social-share-icon
margin: 0 4px
width: 26px
height: 26px
font-size: 15px
line-height: 25px
width: w = 1.85em
height: w
font-size: 1.2em
line-height: w
.post-copyright
position: relative
@@ -295,29 +294,29 @@ img
.post-outdate-notice
position: relative
margin: 0 0 1rem
padding: .5rem 1.2rem
padding: .5em 1.2em
border-radius: 3px
background-color: $noticeOutdate-bg
color: $noticeOutdate-color
if hexo-config('noticeOutdate.style') == 'flat'
padding: .5rem 1.2rem .5rem 1.8rem
padding: .5em 1em .5em 2.6em
border-left: 5px solid $noticeOutdate-border
&:before
@extend .fontawesomeIcon
position: absolute
top: 50%
left: 1em
left: .9em
color: $noticeOutdate-border
content: '\f071'
transform: translateY(-50%)
@media screen and (max-width: 1024px)
+maxWidth1024()
.layout_post
width: auto
@media screen and (max-width: $sm)
+maxWidth768()
.layout_post
padding: 1rem 5px
@@ -325,7 +324,7 @@ img
padding: 1.8rem .7rem
// adjust the layout width in big screen
@media screen and (min-width: $lr)
+minWidth2000()
.layout_post
max-width: 1300px

View File

@@ -1,12 +1,13 @@
.relatedPosts
margin-top: 1rem
.relatedPosts_headline
& > .headline
margin-bottom: 5px
font-weight: 700
font-size: 20px
font-size: 1.43em
.relatedPosts_item
& > .relatedPosts-list
& > div
position: relative
display: inline-block
overflow: hidden
@@ -17,37 +18,37 @@
vertical-align: bottom
&:hover
.relatedPosts_cover
.cover
opacity: .8
transform: scale(1.1)
@media screen and (max-width: 768px)
+maxWidth768()
margin: 2px
width: calc(50% - 4px)
height: 150px
@media screen and (max-width: 480px)
+maxWidth600()
width: calc(100% - 4px)
.relatedPosts_cover
.cover
width: 100%
height: 100%
opacity: .4
transition: all .6s
object-fit: cover
.relatedPosts_main
.content
position: absolute
top: 50%
padding: 0 1rem
width: 100%
transform: translate(0, -50%)
.relatedPosts_date
.date
color: var(--light-grey)
font-size: 90%
.relatedPosts_title
.title
@extend .limit-more-line
color: var(--white)
-webkit-line-clamp: 2

View File

@@ -36,5 +36,5 @@
#mobile-toc-button
display: none
@media screen and (max-width: $bg)
+maxWidth1024()
display: block

View File

@@ -3,11 +3,12 @@
bottom: $sidebar-icon-top
left: $sidebar-icon-left
z-index: 100
color: var(--sidebar-icon-color)
font-size: $sidebar-icon-size
cursor: pointer
transition: all .2s
@media screen and (max-width: $bg)
+maxWidth1024()
display: none
#sidebar
@@ -21,7 +22,12 @@
background: var(--sidebar-bg)
opacity: .9
@media screen and (max-width: $bg)
&.tocOpenPc
& > #toggle-sidebar
color: #99a9bf
transform: rotateZ(180deg)
+maxWidth1024()
right: -($mobile-sidebar-width)
left: auto
z-index: 103

View File

@@ -1,4 +1,6 @@
#vcomment
font-size: 1.1em
.vbtn
border: none
background: var(--btn-bg)
@@ -11,6 +13,9 @@
textarea
background: url(hexo-config('valine.bg')) 100% 100% no-repeat
&:focus
background: none
.vimg
transition: all .3s
@@ -57,12 +62,14 @@
padding: .3rem 0 .8em
// mathjax
.mathjax-overflow
overflow-x: auto
overflow-y: hidden
mjx-container[jax='CHTML'][display='true']
overflow-x: auto
overflow-y: hidden
padding-bottom: .5rem
outline: 0
line-height: 2
padding-bottom: .3rem
.aplayer
color: $font-black

View File

@@ -1,65 +1,57 @@
if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
[data-theme='dark']
--global-bg: darken(#121212, 2)
--font-color: alpha(#FFFFFF, .6)
--hr-border: alpha(#FFFFFF, .3)
--hr-before-color: alpha(#FFFFFF, .6)
--font-color: alpha(#FFFFFF, .7)
--hr-border: alpha(#FFFFFF, .4)
--hr-before-color: alpha(#FFFFFF, .7)
--search-bg: #121212
--search-input-color: alpha(#FFFFFF, .6)
--search-result-title: alpha(#FFFFFF, .8)
--search-input-color: alpha(#FFFFFF, .7)
--search-result-title: alpha(#FFFFFF, .9)
--preloader-bg: darken(#121212, 2)
--preloader-color: alpha(#FFFFFF, .6)
--preloader-color: alpha(#FFFFFF, .7)
--tab-border-color: #2c2c2c
--tab-botton-bg: #2c2c2c
--tab-botton-color: alpha(#FFFFFF, .6)
--tab-botton-color: alpha(#FFFFFF, .7)
--tab-button-hover-bg: lighten(#121212, 15)
--tab-button-active-bg: #121212
--card-bg: #121212
--sidebar-bg: #121212
--btn-hover-color: lighten(#121212, 40)
--btn-color: alpha(#FFFFFF, .6)
--btn-color: alpha(#FFFFFF, .7)
--btn-bg: lighten(#121212, 5)
--text-bg-hover: lighten(#121212, 15)
--light-grey: alpha(#FFFFFF, .6)
--white: alpha(#FFFFFF, .8)
--text-highlight-color: alpha(#FFFFFF, .8)
--blockquote-color: alpha(#FFFFFF, .6)
--light-grey: alpha(#FFFFFF, .7)
--white: alpha(#FFFFFF, .9)
--text-highlight-color: alpha(#FFFFFF, .9)
--blockquote-color: alpha(#FFFFFF, .7)
--blockquote-bg: lighten(#121212, 10)
--reward-pop: lighten(#121212, 10)
--sidebar-icon-color: alpha(#FFFFFF, .7)
// footer
#web_bg[data-type=color],
#footer[data-type=color]
background: darken(#121212, 2)
#web_bg[data-type=photo]:before,
#footer[data-type=photo]:before
#web_bg:before,
#footer:before,
#page-header:before
position: absolute
width: 100%
height: 100%
background-color: alpha($dark-black, .7)
content: ''
#page-header
background-color: #121212
#article-container code
#article-container
code
background: #2c2c2c
pre > code
background: 0
.note
code
background: $code-background
//
#page-header
&:before
position: absolute
top: 0
left: 0
display: block
width: 100%
height: 100%
background-color: alpha($dark-black, .7)
content: ''
& > #nav
&.fixed
& > #nav.fixed,
&.no-top-img #nav
background: alpha(#121212, .8)
box-shadow: 0 5px 6px -5px rgba(133, 133, 133, 0)
@@ -68,20 +60,24 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
pre,
.highlight:not(.js-file-line-container)
background-color: lighten(#121212, 2) !important
color: alpha(#FFFFFF, .6) !important
color: alpha(#FFFFFF, .7) !important
figure.highlight
box-shadow: none
if hexo-config('rootConfig.highlight') && hexo-config('rootConfig.highlight.enable')
table::-webkit-scrollbar-thumb
background: lighten(#121212, 5)
.line:before
color: alpha(#FFFFFF, .6) !important
color: alpha(#FFFFFF, .7) !important
.hljs
background-color: lighten(#121212, 2) !important
pre[class*='language-']::-webkit-scrollbar-thumb
background: lighten(#121212, 5)
.highlight-tools
background: lighten(#121212, 3) !important
color: #90a4ae !important
@@ -92,12 +88,12 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
background: #2c2c2c !important
label
filter: brightness(.7)
filter: brightness(.8)
// note
if hexo-config('note.style') == 'modern' || hexo-config('note.style') == 'flat'
.note
filter: brightness(.7)
filter: brightness(.8)
// hide-tags
.hide-button,
@@ -109,14 +105,17 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
img,
.gist,
.aplayer
filter: brightness(.7)
filter: brightness(.8)
#aside_content .aside-list > .aside-list-item:not(:last-child)
border-bottom: 1px dashed alpha(#FFFFFF, .1)
//
// hexo-blog-encrypt
#hexo-blog-encrypt
label,
input
color: alpha(#FFFFFF, .6) !important
color: alpha(#FFFFFF, .7) !important
input
background-color: #121212
@@ -126,24 +125,30 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
filter: brightness(.8)
svg
fill: alpha(#FFFFFF, .8) !important
fill: alpha(#FFFFFF, .9) !important
// Disqus and Disqusjs
#disqus_thread
#dsqjs
.dsqjs-tab-active,
.dsqjs-no-comment
color: alpha(#FFFFFF, .6)
color: alpha(#FFFFFF, .7)
.dsqjs-order-label
background-color: lighten(#121212, 5)
.dsqjs-post-body
color: alpha(#FFFFFF, .6)
color: alpha(#FFFFFF, .7)
code,
pre
background: #2c2c2c
blockquote
color: alpha(#FFFFFF, .6)
color: alpha(#FFFFFF, .7)
#artitalk_main #lazy
background: #121212
#operare_artitalk .c2
background: #121212

View File

@@ -0,0 +1,115 @@
.article-sort
margin-left: .5rem
padding-left: 1rem
border-left: 2px solid lighten($light-blue, 20)
&-title
position: relative
margin-left: .5rem
padding-bottom: 1rem
padding-left: 1rem
font-size: 1.72em
&:hover
&:before
border-color: $pseudo-hover
&:before
position: absolute
top: calc(((100% - 1.8rem) / 2))
left: -.45rem
z-index: 1
width: w = .5rem
height: h = w
border: .5 * w solid $light-blue
border-radius: w
background: var(--card-bg)
content: ''
line-height: h
transition: all .2s ease-in-out
&:after
position: absolute
bottom: 0
left: 0
z-index: 0
width: .1rem
height: 1.5em
background: lighten($light-blue, 20)
content: ''
&-item
position: relative
display: flex
align-items: center
margin: 0 0 1rem .5rem
transition: all .2s ease-in-out
&:hover
&:before
border-color: $pseudo-hover
&:before
$w = .3rem
position: absolute
left: calc(-1rem - 17px)
width: w = $w
height: h = w
border: .5 * w solid $light-blue
border-radius: w
background: var(--card-bg)
content: ''
transition: all .2s ease-in-out
&.no-article-cover
height: 80px
.article-sort-item-info
padding: 0
&.year
font-size: 1.43em
&:hover
&:before
border-color: $light-blue
&:before
border-color: $pseudo-hover
&-time
color: $theme-meta-color
font-size: 95%
time
padding-left: .3rem
cursor: default
&-title
@extend .limit-more-line
color: var(--font-color)
font-size: 1.1em
transition: all .3s
-webkit-line-clamp: 2
&:hover
color: $text-hover
transform: translateX(10px)
&-img
overflow: hidden
width: 80px
height: 80px
img
width: 100%
height: 100%
transition: all .6s
object-fit: cover
&:hover
transform: scale(1.1)
&-info
flex: 1
padding: 0 .8rem

View File

@@ -0,0 +1,62 @@
#page
.category-lists
padding: 1rem 0 1.5rem
+maxWidth768()
padding: 0
.category-title
font-size: 2.57em
+maxWidth768()
font-size: 2em
.category-list
a
color: var(--font-color)
&:hover
color: $text-hover
.category-list-count
margin-left: .4rem
color: $theme-meta-color
&:before
content: '('
&:after
content: ')'
ul
margin-top: .4rem
padding: 0 0 0 1rem
list-style: none
counter-reset: li
ul
padding-left: .2rem
li
position: relative
margin: .3rem 0
padding: .12em .4em .12em 1.4em
&:before
position: absolute
left: 0
cursor: pointer
transition: all .3s ease-out
$w = .43em
top: .7em
width: w = $w
height: h = w
border: .5 * w solid $light-blue
border-radius: w
background: transparent
content: ''
// line-height: h
&:hover
&:before
border-color: $pseudo-hover

Some files were not shown because too many files have changed in this diff Show More