mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
Compare commits
12 Commits
@@ -15,7 +15,7 @@ git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes
|
|||||||
如果想要安裝比較新的dev分支,可以
|
如果想要安裝比較新的dev分支,可以
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone -b div https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly
|
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly
|
||||||
```
|
```
|
||||||
|
|
||||||
## 应用主题
|
## 应用主题
|
||||||
@@ -29,8 +29,7 @@ theme: Butterfly
|
|||||||
|
|
||||||
## 文档
|
## 文档
|
||||||
|
|
||||||
可查看[这里](https://jerryc.me/posts/21cfbf15)
|
可查看或[这里](https://docs.jerryc.me/)或[这里](https://jerryc.me/posts/21cfbf15)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 截图
|
## 截图
|
||||||
|
|||||||
230
_config.yml
230
_config.yml
@@ -3,13 +3,15 @@
|
|||||||
# ---------------
|
# ---------------
|
||||||
# theme_color:
|
# theme_color:
|
||||||
# enable: true
|
# enable: true
|
||||||
# main: "#7A7FF1"
|
# main: "#49B1F5"
|
||||||
# paginator: "#7A7FF1"
|
# paginator: "#00c4b6"
|
||||||
# button_hover: "#FF7242"
|
# button_hover: "#FF7242"
|
||||||
# text_selection: "#69c46d"
|
# text_selection: "#00c4b6"
|
||||||
# link_color: "#858585"
|
# link_color: "#99a9bf"
|
||||||
|
# meta_color: '#858585'
|
||||||
# hr_color: "#A4D8FA"
|
# hr_color: "#A4D8FA"
|
||||||
# read-mode-bg_color: '#FAF9DE'
|
# read-mode-bg_color: '#FAF9DE'
|
||||||
|
# inline-code-color: '#F47466'
|
||||||
|
|
||||||
# Main menu navigation
|
# Main menu navigation
|
||||||
# format: xxx: /xxx/||icon
|
# format: xxx: /xxx/||icon
|
||||||
@@ -45,11 +47,13 @@ favicon: /img/favicon.ico
|
|||||||
# Highlight theme
|
# Highlight theme
|
||||||
# ---------------
|
# ---------------
|
||||||
highlight_theme: light
|
highlight_theme: light
|
||||||
highlight_copy: true
|
highlight_copy: false #代碼複製按鈕
|
||||||
|
highlight_lang: true #代碼語言顯示
|
||||||
|
highlight_shrink: false #代碼框不展開,需點擊 '>' 打開
|
||||||
|
|
||||||
code_word_wrap: false
|
code_word_wrap: false
|
||||||
|
|
||||||
# Nav settings
|
# social settings
|
||||||
# formal:
|
# formal:
|
||||||
# icon: link
|
# icon: link
|
||||||
# ---------------
|
# ---------------
|
||||||
@@ -57,6 +61,7 @@ social:
|
|||||||
fa fa-github: https://github.com/jerryc127
|
fa fa-github: https://github.com/jerryc127
|
||||||
fa fa-rss: /atom.xml
|
fa fa-rss: /atom.xml
|
||||||
|
|
||||||
|
#### search ####
|
||||||
# Algolia search
|
# Algolia search
|
||||||
# ---------------
|
# ---------------
|
||||||
algolia_search:
|
algolia_search:
|
||||||
@@ -69,7 +74,6 @@ algolia_search:
|
|||||||
hits_empty: "We didn't find any results for the search: ${query}" # if there are no result
|
hits_empty: "We didn't find any results for the search: ${query}" # if there are no result
|
||||||
hits_stats: "${hits} results found in ${time} ms"
|
hits_stats: "${hits} results found in ${time} ms"
|
||||||
|
|
||||||
|
|
||||||
# Local search
|
# Local search
|
||||||
# Please see doc for more details: https://jerryc.me/posts/21cfbf15/#本地搜索
|
# Please see doc for more details: https://jerryc.me/posts/21cfbf15/#本地搜索
|
||||||
# ---------------
|
# ---------------
|
||||||
@@ -95,8 +99,7 @@ katex:
|
|||||||
hide_scrollbar: true
|
hide_scrollbar: true
|
||||||
|
|
||||||
|
|
||||||
|
#### Analysis ####
|
||||||
# Analysis
|
|
||||||
# ---------------
|
# ---------------
|
||||||
# baidu_analytics:
|
# baidu_analytics:
|
||||||
|
|
||||||
@@ -121,14 +124,11 @@ cdn:
|
|||||||
css:
|
css:
|
||||||
fontawesome: https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css
|
fontawesome: https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css
|
||||||
# fontawesomeV5: https://use.fontawesome.com/releases/v5.8.1/css/all.css
|
# fontawesomeV5: https://use.fontawesome.com/releases/v5.8.1/css/all.css
|
||||||
googlefont: https://fonts.googleapis.com/css?family=Titillium+Web
|
|
||||||
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css
|
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css
|
||||||
js:
|
js:
|
||||||
jquery: https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js
|
jquery: https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js
|
||||||
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js
|
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js
|
||||||
js-cookies: https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js
|
js-cookies: https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js
|
||||||
lozy: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
|
|
||||||
|
|
||||||
|
|
||||||
# Post info settings
|
# Post info settings
|
||||||
# ---------------
|
# ---------------
|
||||||
@@ -154,7 +154,6 @@ lodding_bg:
|
|||||||
flink: /img/friend_404.gif
|
flink: /img/friend_404.gif
|
||||||
post_page: /img/404.jpg
|
post_page: /img/404.jpg
|
||||||
|
|
||||||
|
|
||||||
post_meta:
|
post_meta:
|
||||||
date_type: both # or created or updated 文章日期是创建日或者更新日或都显示
|
date_type: both # or created or updated 文章日期是创建日或者更新日或都显示
|
||||||
categories: true # or false 是否显示分类
|
categories: true # or false 是否显示分类
|
||||||
@@ -177,13 +176,14 @@ post_copyright:
|
|||||||
license: CC BY-NC-SA 4.0
|
license: CC BY-NC-SA 4.0
|
||||||
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||||
|
|
||||||
|
# 自動節選
|
||||||
auto_excerpt:
|
auto_excerpt:
|
||||||
enable: true
|
enable: true
|
||||||
length: 150
|
length: 150
|
||||||
|
|
||||||
|
|
||||||
# Share System
|
#### Share System ####
|
||||||
# ---------------
|
# -----------------------------------------
|
||||||
addThis:
|
addThis:
|
||||||
enable: false
|
enable: false
|
||||||
pubid:
|
pubid:
|
||||||
@@ -204,8 +204,8 @@ addtoany:
|
|||||||
- email
|
- email
|
||||||
- copy_link
|
- copy_link
|
||||||
|
|
||||||
# Comments System
|
#### Comments System ####
|
||||||
# ---------------
|
# ------------------------------------
|
||||||
disqus:
|
disqus:
|
||||||
enable: false
|
enable: false
|
||||||
shortname:
|
shortname:
|
||||||
@@ -241,12 +241,12 @@ valine:
|
|||||||
verify: false # valine verify code (true/false)
|
verify: false # valine verify code (true/false)
|
||||||
pageSize: 10 # comment list page size
|
pageSize: 10 # comment list page size
|
||||||
avatar: monsterid # gravatar style https://valine.js.org/#/avatar
|
avatar: monsterid # gravatar style https://valine.js.org/#/avatar
|
||||||
lang: en # i18n: zh-cn/en/tw
|
lang: en # i18n: zh-cn/en
|
||||||
placeholder: Please leave your footprints # valine comment input placeholder(like: Please leave your footprints )
|
placeholder: Please leave your footprints # valine comment input placeholder(like: Please leave your footprints )
|
||||||
guest_info: nick,mail,link #valine comment header inf
|
guest_info: nick,mail,link #valine comment header inf
|
||||||
|
|
||||||
# Footer Settings
|
##### Footer Settings ####
|
||||||
# ---------------
|
# ------------------------------------
|
||||||
since: 2018
|
since: 2018
|
||||||
|
|
||||||
footer_custom_text:
|
footer_custom_text:
|
||||||
@@ -259,15 +259,8 @@ ICP:
|
|||||||
url:
|
url:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
# busuanzi count for PV / UV in site
|
|
||||||
busuanzi:
|
|
||||||
site_uv: true
|
|
||||||
site_pv: true
|
|
||||||
page_pv: true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### 站長驗證 ####
|
||||||
# Google Webmaster tools verification setting
|
# Google Webmaster tools verification setting
|
||||||
# See: https://www.google.com/webmasters/
|
# See: https://www.google.com/webmasters/
|
||||||
google_site_verification:
|
google_site_verification:
|
||||||
@@ -276,10 +269,6 @@ google_site_verification:
|
|||||||
# See: https://www.bing.com/webmaster/
|
# See: https://www.bing.com/webmaster/
|
||||||
bing_site_verification:
|
bing_site_verification:
|
||||||
|
|
||||||
# Yandex Webmaster tools verification setting
|
|
||||||
# See: https://webmaster.yandex.ru/
|
|
||||||
#yandex_site_verification:
|
|
||||||
|
|
||||||
# Baidu Webmaster tools verification setting
|
# Baidu Webmaster tools verification setting
|
||||||
# See: https://ziyuan.baidu.com/site/
|
# See: https://ziyuan.baidu.com/site/
|
||||||
baidu_site_verification:
|
baidu_site_verification:
|
||||||
@@ -288,6 +277,8 @@ baidu_site_verification:
|
|||||||
# see http://zhanzhang.so.com/
|
# see http://zhanzhang.so.com/
|
||||||
qihu_site_verification:
|
qihu_site_verification:
|
||||||
|
|
||||||
|
|
||||||
|
# 友情鏈接界面設置
|
||||||
Flink:
|
Flink:
|
||||||
headline: 友情鏈接
|
headline: 友情鏈接
|
||||||
info_headline: 我的Blog資料
|
info_headline: 我的Blog資料
|
||||||
@@ -297,25 +288,7 @@ Flink:
|
|||||||
info: Blog 簡介: 今日事,今日畢
|
info: Blog 簡介: 今日事,今日畢
|
||||||
comment: 如果需要交換友鏈,請留言
|
comment: 如果需要交換友鏈,請留言
|
||||||
|
|
||||||
|
# 打賞按鈕
|
||||||
|
|
||||||
runtimeshow:
|
|
||||||
enable: true
|
|
||||||
start_date: 6/7/2018 00:00:00
|
|
||||||
|
|
||||||
|
|
||||||
nightshift:
|
|
||||||
enable: true
|
|
||||||
|
|
||||||
|
|
||||||
activate_power_mode:
|
|
||||||
enable: false
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
announcement:
|
|
||||||
content: 感謝訪問本站,若喜歡請收藏 ^_^
|
|
||||||
|
|
||||||
reward:
|
reward:
|
||||||
enable: true
|
enable: true
|
||||||
QR_code:
|
QR_code:
|
||||||
@@ -326,11 +299,26 @@ reward:
|
|||||||
img: /img/alipay.jpg
|
img: /img/alipay.jpg
|
||||||
text: 支付寶
|
text: 支付寶
|
||||||
|
|
||||||
|
# 推薦文章
|
||||||
related_post:
|
related_post:
|
||||||
enable: true
|
enable: true
|
||||||
limit: 6 # 顯示推薦文章數目
|
limit: 6 # 顯示推薦文章數目
|
||||||
|
|
||||||
# canvas_ribbon
|
#### 美化/效果 ####
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
# 設置網站背景
|
||||||
|
# 可設置圖片 或者 顔色
|
||||||
|
# 圖片格式 background: url(http://xxxxxx.com/xxx.jpg)
|
||||||
|
# 顔色 background: '#49B202'
|
||||||
|
# 留空 顯示白色
|
||||||
|
background:
|
||||||
|
|
||||||
|
# footer是否顯示圖片背景(與top_img一致)
|
||||||
|
footer_bg: false
|
||||||
|
|
||||||
|
|
||||||
|
# canvas_ribbon 禁止彩帶背景
|
||||||
# See: https://github.com/hustcc/ribbon.js
|
# See: https://github.com/hustcc/ribbon.js
|
||||||
canvas_ribbon:
|
canvas_ribbon:
|
||||||
enable: false
|
enable: false
|
||||||
@@ -339,45 +327,75 @@ canvas_ribbon:
|
|||||||
zIndex: -1
|
zIndex: -1
|
||||||
click_to_change: false
|
click_to_change: false
|
||||||
|
|
||||||
|
# 動態彩帶
|
||||||
canvas_ribbon_piao:
|
canvas_ribbon_piao:
|
||||||
enable: true
|
enable: false
|
||||||
|
|
||||||
|
# canvas_nest
|
||||||
|
# https://github.com/hustcc/canvas-nest.js
|
||||||
|
canvas_nest:
|
||||||
|
enable: false
|
||||||
|
color: '0,0,255' #color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
|
||||||
|
opacity: 0.7 # the opacity of line (0~1), default: 0.5.
|
||||||
|
zIndex: -1 # z-index property of the background, default: -1.
|
||||||
|
count: 99 # the number of lines, default: 99.
|
||||||
|
script: https://cdn.jsdelivr.net/gh/jerryc127/CDN/js/canvas-nest.js # or /js/third-party/canvas-nest.js
|
||||||
|
|
||||||
# 避免重複網址分散seo
|
# 打字效果
|
||||||
canonical: true
|
activate_power_mode:
|
||||||
|
enable: false
|
||||||
|
|
||||||
# 禁止百度轉碼
|
# 鼠標點擊效果
|
||||||
disable_baidu_transformation: true
|
fireworks:
|
||||||
|
enable: false
|
||||||
|
|
||||||
twitter_meta: true
|
# 頭像會一直轉圈
|
||||||
Open_Graph_meta: true
|
avatar_effect: false
|
||||||
|
|
||||||
#閲讀模式
|
# 網站顯示模式
|
||||||
readmode:
|
# day 默認模式
|
||||||
enable: true
|
# night 黑暗模式(不建議)
|
||||||
|
display_mode: day
|
||||||
|
|
||||||
|
# 美化post頁顯示
|
||||||
|
post_beautify:
|
||||||
|
enable: false
|
||||||
|
title-prefix-icon: '\f0c1'
|
||||||
|
title-prefix-icon-color: "#F47466"
|
||||||
|
|
||||||
|
# 全局字體
|
||||||
font:
|
font:
|
||||||
enable: false
|
enable: false
|
||||||
font-family: Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB,"Microsoft JhengHei", "MicrMicrosoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
font-family: Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB,"Microsoft JhengHei", "MicrMicrosoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||||
code-font: consolas, Menlo, "PingFang SC", "Microsoft JhengHei","Microsoft YaHei", monospace, Helvetica Neue For Number
|
code-font: consolas, Menlo, "PingFang SC", "Microsoft JhengHei","Microsoft YaHei", monospace, Helvetica Neue For Number
|
||||||
|
|
||||||
|
# 網站名字字體
|
||||||
|
# 左上角網站名字 主頁居中網站名字
|
||||||
|
blog_title_font:
|
||||||
|
font_link: https://fonts.googleapis.com/css?family=Titillium+Web #字體鏈接
|
||||||
|
font-family: Titillium Web, PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||||
|
|
||||||
# 水平分隔綫
|
# 水平分隔綫
|
||||||
hr:
|
hr:
|
||||||
enable: false
|
enable: false
|
||||||
#fontawesome上圖標的Unicode
|
icon: '\f21c' #fontawesome上圖標的Unicode
|
||||||
icon: '\f21c'
|
|
||||||
icon-top: -20px
|
icon-top: -20px
|
||||||
|
|
||||||
# 主頁subtitle
|
# 主頁subtitle
|
||||||
|
# 打字效果
|
||||||
subtitle:
|
subtitle:
|
||||||
enable: true
|
enable: true
|
||||||
sub1: 今日事,今日畢
|
sub1: 今日事,今日畢
|
||||||
sub2: Never put off till tomorrow what you can do today
|
sub2: Never put off till tomorrow what you can do today #如果有符號 ' ,記得前面加上 \
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### 側邊欄 ####
|
||||||
|
#-------------------------------------
|
||||||
# 側邊欄顯示設置
|
# 側邊欄顯示設置
|
||||||
aside:
|
aside:
|
||||||
|
position: right # left or right
|
||||||
card_author: true
|
card_author: true
|
||||||
card_announcement: true
|
card_announcement: true
|
||||||
card_recent_post: true
|
card_recent_post: true
|
||||||
@@ -386,28 +404,94 @@ aside:
|
|||||||
card_archives: true
|
card_archives: true
|
||||||
card_webinfo: true
|
card_webinfo: true
|
||||||
|
|
||||||
|
# 網站公告
|
||||||
|
announcement:
|
||||||
|
content: 感謝訪問本站,若喜歡請收藏 ^_^
|
||||||
|
|
||||||
## chinese traditional to Simplified
|
# busuanzi count for PV / UV in site
|
||||||
|
# 訪問人數
|
||||||
|
busuanzi:
|
||||||
|
site_uv: true
|
||||||
|
site_pv: true
|
||||||
|
page_pv: true
|
||||||
|
|
||||||
|
# 網頁開通時間
|
||||||
|
# 格式: 月/日/年 時間
|
||||||
|
# 也可以寫成 年/月/日 時間
|
||||||
|
runtimeshow:
|
||||||
|
enable: true
|
||||||
|
start_date: 6/7/2018 00:00:00
|
||||||
|
|
||||||
|
|
||||||
|
#### 右下角按鈕 ####
|
||||||
|
#----------------------------------------------
|
||||||
|
# 簡繁轉換
|
||||||
translate:
|
translate:
|
||||||
enable: true
|
enable: true
|
||||||
# 默認按鈕顯示文字
|
# 默認按鈕顯示文字
|
||||||
default: 簡
|
default: 繁
|
||||||
#网站默认语言,1: 繁體中文, 2: 简体中文
|
#网站默认语言,1: 繁體中文, 2: 简体中文
|
||||||
defaultEncoding: 1
|
defaultEncoding: 2
|
||||||
#延迟时间,若不在前, 要设定延迟翻译时间, 如100表示100ms,默认为0
|
#延迟时间,若不在前, 要设定延迟翻译时间, 如100表示100ms,默认为0
|
||||||
translateDelay: 0
|
translateDelay: 0
|
||||||
#博客网址
|
#博客网址
|
||||||
cookieDomain: "https://jerryc.me/"
|
cookieDomain: "https://xxx/"
|
||||||
#當文字是簡體時,按鈕顯示的文字
|
#當文字是簡體時,按鈕顯示的文字
|
||||||
msgToTraditionalChinese: "繁"
|
msgToTraditionalChinese: "繁"
|
||||||
#當文字是繁體時,按鈕顯示的文字
|
#當文字是繁體時,按鈕顯示的文字
|
||||||
msgToSimplifiedChinese: "简"
|
msgToSimplifiedChinese: "简"
|
||||||
|
|
||||||
|
# 夜間模式
|
||||||
|
nightshift:
|
||||||
|
enable: true
|
||||||
|
|
||||||
# 鼠標點擊效果
|
#閲讀模式
|
||||||
fireworks:
|
readmode:
|
||||||
enable: false
|
enable: true
|
||||||
|
|
||||||
|
|
||||||
|
#### other ####
|
||||||
|
#------------------------------------------------
|
||||||
|
|
||||||
#百度推送
|
#百度推送
|
||||||
baidu_push:
|
baidu_push:
|
||||||
enable: false
|
enable: false
|
||||||
|
|
||||||
|
# https://instant.page/
|
||||||
|
# prefetch預加載
|
||||||
|
instantpage:
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
# Note (Bootstrap Callout)
|
||||||
|
# https://muse.theme-next.org/docs/tag-plugins/note
|
||||||
|
note:
|
||||||
|
# Note tag style values:
|
||||||
|
# - simple bs-callout old alert style. Default.
|
||||||
|
# - modern bs-callout new (v2-v3) alert style.
|
||||||
|
# - flat flat callout style with background, like on Mozilla or StackOverflow.
|
||||||
|
# - disabled disable all CSS styles import of note tag.
|
||||||
|
style: simple
|
||||||
|
icons: true
|
||||||
|
border_radius: 3
|
||||||
|
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
|
||||||
|
# Offset also applied to label tag variables. This option can work with disabled note tag.
|
||||||
|
light_bg_offset: 0
|
||||||
|
|
||||||
|
# 圖片懶加載
|
||||||
|
lazyload:
|
||||||
|
enable: true
|
||||||
|
script: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
|
||||||
|
|
||||||
|
# 避免重複網址分散seo
|
||||||
|
canonical: true
|
||||||
|
|
||||||
|
# 禁止百度轉碼
|
||||||
|
disable_baidu_transformation: true
|
||||||
|
|
||||||
|
# twitter分享自動帶上樣式
|
||||||
|
# https://i.loli.net/2019/09/08/qm3RfvUCKbct1Wz.png
|
||||||
|
twitter_meta: true
|
||||||
|
|
||||||
|
# facebook QQ 等 分享自動帶上樣式
|
||||||
|
# https://i.loli.net/2019/09/08/2wbFJEKloisRvhj.png
|
||||||
|
Open_Graph_meta: true
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ page:
|
|||||||
|
|
||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
no_title: No title
|
no_title: No title
|
||||||
read_more: Read more
|
archives: Archives
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: Created
|
created: Created
|
||||||
@@ -50,7 +50,6 @@ pagination:
|
|||||||
next: Next Post
|
next: Next Post
|
||||||
|
|
||||||
comment: Comment
|
comment: Comment
|
||||||
relatedPosts_headline: Recommend
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: Articles
|
articles: Articles
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ page:
|
|||||||
|
|
||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
no_title: No title
|
no_title: No title
|
||||||
read_more: Read more
|
archives: Archives
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: Created
|
created: Created
|
||||||
@@ -50,7 +50,6 @@ pagination:
|
|||||||
next: Next Post
|
next: Next Post
|
||||||
|
|
||||||
comment: Comment
|
comment: Comment
|
||||||
relatedPosts_headline: Recommend
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: Articles
|
articles: Articles
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ page:
|
|||||||
|
|
||||||
sticky: 置顶
|
sticky: 置顶
|
||||||
no_title: 无题
|
no_title: 无题
|
||||||
read_more: 阅读更多
|
archives: 时间轴
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: 发表于
|
created: 发表于
|
||||||
@@ -51,7 +51,6 @@ pagination:
|
|||||||
next: 下一篇
|
next: 下一篇
|
||||||
|
|
||||||
comment: 评论
|
comment: 评论
|
||||||
relatedPosts_headline: 相关推荐
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: 文章
|
articles: 文章
|
||||||
|
|||||||
@@ -20,15 +20,11 @@ page:
|
|||||||
sticky: 置頂
|
sticky: 置頂
|
||||||
no_title: 無題
|
no_title: 無題
|
||||||
archives: 時間軸
|
archives: 時間軸
|
||||||
read_more: 閲讀更多
|
|
||||||
created_date: 發表於
|
|
||||||
update_date: 更新於
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: 發表於
|
created: 發表於
|
||||||
updated: 更新於
|
updated: 更新於
|
||||||
wordcount: 字數總計
|
wordcount: 字數總計
|
||||||
commentcount: 評論數
|
|
||||||
min2read: "閲讀時長: %s 分鐘"
|
min2read: "閲讀時長: %s 分鐘"
|
||||||
page_pv: 閲讀量
|
page_pv: 閲讀量
|
||||||
copyright:
|
copyright:
|
||||||
@@ -56,7 +52,6 @@ pagination:
|
|||||||
next: 下一篇
|
next: 下一篇
|
||||||
|
|
||||||
comment: 評論
|
comment: 評論
|
||||||
relatedPosts_headline: 相關推薦
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: 文章
|
articles: 文章
|
||||||
|
|||||||
@@ -6,7 +6,10 @@
|
|||||||
each item in i.link_list
|
each item in i.link_list
|
||||||
li.md-links-item
|
li.md-links-item
|
||||||
a(href=item.link title=item.name target="_blank")
|
a(href=item.link title=item.name target="_blank")
|
||||||
img.lozad(data-src=item.avatar alt=item.name onerror=`onerror=null;src='${theme.lodding_bg.flink}'` height="72px")
|
if theme.lazyload.enable
|
||||||
|
img.lozad(data-src=item.avatar onerror=`onerror=null;src='${theme.lodding_bg.flink}'` height="72px")
|
||||||
|
else
|
||||||
|
img(src=item.avatar onerror=`onerror=null;src='${theme.lodding_bg.flink}'` height="72px")
|
||||||
div(class="md-links-title")= item.name
|
div(class="md-links-title")= item.name
|
||||||
<br/>
|
<br/>
|
||||||
div(class="md-links-des")=item.descr
|
div(class="md-links-des")=item.descr
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
|
|||||||
if (theme.canvas_ribbon_piao && theme.canvas_ribbon_piao.enable)
|
if (theme.canvas_ribbon_piao && theme.canvas_ribbon_piao.enable)
|
||||||
include ./third-party/canvas-ribbon-piao.pug
|
include ./third-party/canvas-ribbon-piao.pug
|
||||||
|
|
||||||
|
if (theme.canvas_nest && theme.canvas_nest.enable)
|
||||||
|
include ./third-party/canvas-nest.pug
|
||||||
|
|
||||||
if theme.baidu_push && theme.baidu_push.enable
|
if theme.baidu_push && theme.baidu_push.enable
|
||||||
script(src=url_for('js/baidupush.js'))
|
script(src=url_for('js/baidupush.js'))
|
||||||
|
|
||||||
@@ -57,7 +60,7 @@ if is_home()
|
|||||||
e[i].style.height = n + "px";
|
e[i].style.height = n + "px";
|
||||||
$("#site-info").each(function () {
|
$("#site-info").each(function () {
|
||||||
var x = $(this).height();
|
var x = $(this).height();
|
||||||
$(this).css({"padding-top": (n-x)/2 , "padding-bottom":(n-x)/2 })
|
$(this).css("top", (n-x)/2)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,4 +91,11 @@ if is_home()
|
|||||||
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
||||||
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")
|
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")
|
||||||
|
|
||||||
|
if theme.instantpage.enable
|
||||||
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")
|
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")
|
||||||
|
|
||||||
|
if theme.lazyload.enable
|
||||||
|
script(src=url_for(theme.lazyload.script))
|
||||||
|
script.
|
||||||
|
const observer = lozad(); // lazy loads elements with default selector as '.lozad'
|
||||||
|
observer.observe();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
if theme.disqus.enable
|
if theme.disqus && theme.disqus.enable
|
||||||
#disqus_thread
|
#disqus_thread
|
||||||
script.
|
script.
|
||||||
var unused = null;
|
var unused = null;
|
||||||
|
|||||||
@@ -1,40 +1,35 @@
|
|||||||
if theme.disqus.enable
|
if theme.disqus && theme.disqus.enable
|
||||||
hr
|
hr
|
||||||
#post-comment
|
#post-comment
|
||||||
.comment_headling
|
.comment_headling
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||||
=" "
|
span= ' ' + _p('comment')
|
||||||
span= _p('comment')
|
|
||||||
include ./disqus.pug
|
include ./disqus.pug
|
||||||
else if theme.laibili && theme.laibili.enable
|
else if theme.laibili && theme.laibili.enable
|
||||||
hr
|
hr
|
||||||
#post-comment
|
#post-comment
|
||||||
.comment_headling
|
.comment_headling
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||||
=" "
|
span= ' ' + _p('comment')
|
||||||
span= _p('comment')
|
|
||||||
include ./laibili.pug
|
include ./laibili.pug
|
||||||
else if theme.gitment && theme.gitment.enable
|
else if theme.gitment && theme.gitment.enable
|
||||||
hr
|
hr
|
||||||
#post-comment
|
#post-comment
|
||||||
.comment_headling
|
.comment_headling
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||||
=" "
|
span= ' ' + _p('comment')
|
||||||
span= _p('comment')
|
|
||||||
include ./gitment.pug
|
include ./gitment.pug
|
||||||
else if theme.gitalk && theme.gitalk.enable
|
else if theme.gitalk && theme.gitalk.enable
|
||||||
hr
|
hr
|
||||||
#post-comment
|
#post-comment
|
||||||
.comment_headling
|
.comment_headling
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||||
=" "
|
span= ' ' + _p('comment')
|
||||||
span= _p('comment')
|
|
||||||
include ./gitalk.pug
|
include ./gitalk.pug
|
||||||
else if theme.valine && theme.valine.enable
|
else if theme.valine && theme.valine.enable
|
||||||
hr
|
hr
|
||||||
#post-comment
|
#post-comment
|
||||||
.comment_headling
|
.comment_headling
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||||
=" "
|
span= ' ' + _p('comment')
|
||||||
span= _p('comment')
|
|
||||||
include ./valine.pug
|
include ./valine.pug
|
||||||
@@ -2,58 +2,15 @@ if theme.valine && theme.valine.enable
|
|||||||
#vcomment.vcomment
|
#vcomment.vcomment
|
||||||
script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
|
script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
|
||||||
script.
|
script.
|
||||||
var notify = '#{ theme.valine.notify }' == true ? true : false;
|
var notify = #{ theme.valine.notify } == true ? true : false;
|
||||||
var verify = '#{ theme.valine.verify }' == true ? true : false;
|
var verify = #{ theme.valine.verify } == true ? true : false;
|
||||||
var GUEST_INFO = ['nick','mail','link'];
|
var GUEST_INFO = ['nick','mail','link'];
|
||||||
var guest_info = '#{ theme.valine.guest_info }'.split(',').filter(function(item){
|
var guest_info = '#{ theme.valine.guest_info }'.split(',').filter(function(item){
|
||||||
return GUEST_INFO.indexOf(item) > -1
|
return GUEST_INFO.indexOf(item) > -1
|
||||||
});
|
});
|
||||||
guest_info = guest_info.length == 0 ? GUEST_INFO :guest_info;
|
guest_info = guest_info.length == 0 ? GUEST_INFO :guest_info;
|
||||||
|
|
||||||
var localeName = 'tw',
|
window.valine = new Valine({
|
||||||
localeMode = {
|
|
||||||
head: {
|
|
||||||
nick: '暱稱(必填)',
|
|
||||||
mail: '郵箱(必填,可以收到回復提醒)',
|
|
||||||
link: '網址(選填)',
|
|
||||||
},
|
|
||||||
tips: {
|
|
||||||
comments: '評論',
|
|
||||||
sofa: '快來做第一個評論的人吧~',
|
|
||||||
busy: '還在提交中,請稍候...',
|
|
||||||
again: '這麼簡單也能錯,也是沒誰了.'
|
|
||||||
},
|
|
||||||
ctrl: {
|
|
||||||
reply: '回覆',
|
|
||||||
ok: '好的',
|
|
||||||
sure: '確認',
|
|
||||||
cancel: '取消',
|
|
||||||
confirm: '確認',
|
|
||||||
continue: '繼續',
|
|
||||||
more: '查看更多...',
|
|
||||||
try: '再試試?',
|
|
||||||
preview: '預覽',
|
|
||||||
emoji: '表情'
|
|
||||||
},
|
|
||||||
error: {
|
|
||||||
99: '初始化失敗,請檢查init中的`el`元素.',
|
|
||||||
100: '初始化失敗,請檢查你的AppId和AppKey.',
|
|
||||||
401: '未經授權的操作,請檢查你的AppId和AppKey.',
|
|
||||||
403: '訪問被api域名白名單拒絕,請檢查你的安全域名設置.',
|
|
||||||
},
|
|
||||||
timeago: {
|
|
||||||
seconds: '秒前',
|
|
||||||
minutes: '分鐘前',
|
|
||||||
hours: '小時前',
|
|
||||||
days: '天前',
|
|
||||||
now: '剛剛'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
window.valine = new Valine();
|
|
||||||
valine.installLocale(localeName,localeMode);
|
|
||||||
|
|
||||||
valine.init({
|
|
||||||
el:'#vcomment',
|
el:'#vcomment',
|
||||||
notify:notify,
|
notify:notify,
|
||||||
verify:verify,
|
verify:verify,
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ script.
|
|||||||
localSearch: !{localSearch},
|
localSearch: !{localSearch},
|
||||||
translate: !{translate},
|
translate: !{translate},
|
||||||
highlight_copy: '!{theme.highlight_copy}',
|
highlight_copy: '!{theme.highlight_copy}',
|
||||||
|
highlight_lang: '!{theme.highlight_lang}',
|
||||||
|
highlight_shrink: '!{theme.highlight_shrink}',
|
||||||
copy: {
|
copy: {
|
||||||
success: '!{_p("copy.success")}',
|
success: '!{_p("copy.success")}',
|
||||||
error: '!{_p("copy.error")}',
|
error: '!{_p("copy.error")}',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#footer.layout
|
#footer
|
||||||
- var now = new Date()
|
- var now = new Date()
|
||||||
- var nowYear = now.getFullYear()
|
- var nowYear = now.getFullYear()
|
||||||
if theme.since && theme.since != nowYear
|
if theme.since && theme.since != nowYear
|
||||||
|
|||||||
@@ -110,6 +110,9 @@ if theme.qihu_site_verification
|
|||||||
- var preload_img = page.top_img || theme.top_img || config.top_img
|
- var preload_img = page.top_img || theme.top_img || config.top_img
|
||||||
|
|
||||||
if (is_archive() && preload_archive_img)
|
if (is_archive() && preload_archive_img)
|
||||||
link(rel="preload" href=url_for(preload_img) as="image" )
|
link(rel="preload" href=url_for(preload_archive_img) as="image" )
|
||||||
else if (!is_post() && preload_img)
|
else if (!is_post() && preload_img)
|
||||||
link(rel="preload" href=url_for(preload_img) as="image" )
|
link(rel="preload" href=url_for(preload_img) as="image" )
|
||||||
|
|
||||||
|
if theme.blog_title_font.font_link
|
||||||
|
link(rel='stylesheet', href=url_for(theme.blog_title_font.font_link))
|
||||||
@@ -7,16 +7,55 @@
|
|||||||
.menu-icon-second
|
.menu-icon-second
|
||||||
.menu-icon-third
|
.menu-icon-third
|
||||||
|
|
||||||
|
.menu_mask
|
||||||
|
|
||||||
span.pull-right.menus
|
span.pull-right.menus
|
||||||
.mobile_author_icon
|
.mobile_author_icon
|
||||||
img.lozad(data-src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
img.lozad.avatar_img(src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||||
.mobile_author-info__description= config.description
|
.mobile_post_data
|
||||||
|
if site.posts.length
|
||||||
|
.mobile_data_item.text-center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.archive_dir) + '/')
|
||||||
|
.headline= _p('aside.articles')
|
||||||
|
.length_num= site.posts.length
|
||||||
|
|
||||||
|
if site.tags.length
|
||||||
|
.mobile_data_item.text-center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.tag_dir) + '/' )
|
||||||
|
.headline= _p('aside.tags')
|
||||||
|
.length_num= site.tags.length
|
||||||
|
|
||||||
|
if site.categories.length
|
||||||
|
.mobile_data_item.text-center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.category_dir) + '/')
|
||||||
|
.headline= _p('aside.categories')
|
||||||
|
.length_num= site.categories.length
|
||||||
|
|
||||||
hr
|
hr
|
||||||
.menus_item
|
.menus_items
|
||||||
each value, label in theme.menu
|
each value, label in theme.menu
|
||||||
|
if !Array.isArray(value)
|
||||||
|
.menus_item
|
||||||
a.site-page(href=value.split('||')[0])
|
a.site-page(href=value.split('||')[0])
|
||||||
i.fa-fw(class=value.split('||')[1])
|
i.fa-fw(class=value.split('||')[1])
|
||||||
span=' '+label
|
span=' '+label
|
||||||
|
else
|
||||||
|
.menus_item
|
||||||
|
a.site-page
|
||||||
|
i.fa-fw(class=label.split('||')[1] aria-hidden="true")
|
||||||
|
span=' '+label.split('||')[0]
|
||||||
|
i.fa.fa-chevron-down.menus-expand(aria-hidden="true")
|
||||||
|
ul.menus_item_child
|
||||||
|
each i in value
|
||||||
|
li
|
||||||
|
a.site-page(href=i.split('||')[1])
|
||||||
|
i.fa-fw(class=i.split('||')[2])
|
||||||
|
span=' '+i.split('||')[0]
|
||||||
|
|
||||||
|
|
||||||
script.
|
script.
|
||||||
document.body.addEventListener('touchstart', function(){ });
|
document.body.addEventListener('touchstart', function(){ });
|
||||||
span.pull-right
|
span.pull-right
|
||||||
|
|||||||
@@ -7,18 +7,23 @@
|
|||||||
- if (is_year()) pageTitle += ': ' + page.year
|
- if (is_year()) pageTitle += ': ' + page.year
|
||||||
- var pageTitle_saved //- 暫時存儲pageTitle
|
- var pageTitle_saved //- 暫時存儲pageTitle
|
||||||
- var pageTitle_no_include_blog_name //- 存儲pageTitle, 不帶 " | ",meta用
|
- var pageTitle_no_include_blog_name //- 存儲pageTitle, 不帶 " | ",meta用
|
||||||
|
- var home_subtitle_true //有subtitle
|
||||||
//- home時顯示config.title (JerryC),其他顯示 pageTitle。meta用
|
//- home時顯示config.title (JerryC),其他顯示 pageTitle。meta用
|
||||||
- is_home() ? pageTitle_no_include_blog_name = config.title : pageTitle_no_include_blog_name = pageTitle
|
- is_home() ? pageTitle_no_include_blog_name = config.title : pageTitle_no_include_blog_name = pageTitle
|
||||||
//- 暫時存儲pageTitle
|
//- 暫時存儲pageTitle
|
||||||
- pageTitle ? pageTitle_saved = pageTitle + ' | ' + config.title : pageTitle_saved = config.title
|
- pageTitle ? pageTitle_saved = pageTitle + ' | ' + config.title : pageTitle_saved = config.title
|
||||||
|
//- 是否有 config.subtitle 是各自显示
|
||||||
|
- config.subtitle ? home_subtitle_true = ' - ' + config.subtitle : home_subtitle_true = ''
|
||||||
//- home時pageTitle顯示 JerryC - subtitle,其他顯示 pageTitle | JerryC
|
//- home時pageTitle顯示 JerryC - subtitle,其他顯示 pageTitle | JerryC
|
||||||
- is_home() ? pageTitle = config.title + ' - ' + config.subtitle : pageTitle = pageTitle_saved
|
- is_home() ? pageTitle = config.title + home_subtitle_true : pageTitle = pageTitle_saved
|
||||||
|
|
||||||
- var pageDescription = page.description || page.title || config.description || ''
|
- var pageDescription = page.description || page.title || config.description || ''
|
||||||
- var pageKeywords = (config.keywords || []).join(',')
|
- var pageKeywords = (config.keywords || []).join(',')
|
||||||
- if (page.tags && page.tags.data) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',')
|
- if (page.tags && page.tags.data) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',')
|
||||||
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
|
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
|
||||||
- var pageCopyright = config.copyright || config.author
|
- var pageCopyright = config.copyright || config.author
|
||||||
|
- var body_class = theme.display_mode == 'night' ? 'night-mode' : ''
|
||||||
|
|
||||||
|
|
||||||
doctype html
|
doctype html
|
||||||
html(lang=config.language)
|
html(lang=config.language)
|
||||||
@@ -41,9 +46,11 @@ html(lang=config.language)
|
|||||||
link(rel='stylesheet', href=item)
|
link(rel='stylesheet', href=item)
|
||||||
include ./head.pug
|
include ./head.pug
|
||||||
include ./config.pug
|
include ./config.pug
|
||||||
body
|
body(class=body_class)
|
||||||
if theme.fireworks && theme.fireworks.enable
|
if theme.fireworks && theme.fireworks.enable
|
||||||
canvas.fireworks
|
canvas.fireworks
|
||||||
|
if theme.background
|
||||||
|
#web_bg
|
||||||
if (is_post() && page.toc != false && theme.toc.enable)
|
if (is_post() && page.toc != false && theme.toc.enable)
|
||||||
i.fa.fa-arrow-right#toggle-sidebar(aria-hidden="true")
|
i.fa.fa-arrow-right#toggle-sidebar(aria-hidden="true")
|
||||||
include ./sidebar.pug
|
include ./sidebar.pug
|
||||||
@@ -63,14 +70,14 @@ html(lang=config.language)
|
|||||||
div!= body
|
div!= body
|
||||||
else
|
else
|
||||||
block content
|
block content
|
||||||
//- - var top_img = page.top_img || theme.post_meta.top_img || theme.top_img || config.top_img || true
|
|
||||||
//- - var bg_img = top_img !== true ? `background-image: url(${top_img})` : ''
|
- var footer_bg = theme.footer_bg == false ? '' : bg_img
|
||||||
//- - var footer_bg_class= bg_img ? 'footer-bg' : ''
|
footer(style=footer_bg)
|
||||||
//- footer(style=bg_img class=footer_bg_class)
|
|
||||||
footer
|
|
||||||
include ./footer.pug
|
include ./footer.pug
|
||||||
i.fa.fa-arrow-up#go-up(aria-hidden="true")
|
i.fa.fa-arrow-up#go-up(aria-hidden="true")
|
||||||
include ./rightside.pug
|
include ./rightside.pug
|
||||||
|
if (is_post())
|
||||||
|
include ./post-bottom.pug
|
||||||
each item in theme.cdn.js
|
each item in theme.cdn.js
|
||||||
if item !== undefined
|
if item !== undefined
|
||||||
script(src=url_for(item))
|
script(src=url_for(item))
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ else
|
|||||||
|
|
||||||
|
|
||||||
if is_home()
|
if is_home()
|
||||||
nav#nav.full_page(style=bg_img)
|
nav#nav.full_page
|
||||||
|
.nav_bg(style=bg_img)
|
||||||
include ./header.pug
|
include ./header.pug
|
||||||
#site-info
|
#site-info
|
||||||
#site-title
|
#site-title
|
||||||
@@ -25,7 +26,8 @@ if is_home()
|
|||||||
i.fa.fa-angle-down.scroll-down-effects
|
i.fa.fa-angle-down.scroll-down-effects
|
||||||
|
|
||||||
else
|
else
|
||||||
nav#nav.bg_local(style=bg_img)
|
nav#nav.not_index_bg
|
||||||
|
.nav_bg(style=bg_img)
|
||||||
include ./header.pug
|
include ./header.pug
|
||||||
#page_site-info
|
#page_site-info
|
||||||
#site-title
|
#site-title
|
||||||
|
|||||||
@@ -14,43 +14,49 @@ else
|
|||||||
if(page.prev)
|
if(page.prev)
|
||||||
if(page.next)
|
if(page.next)
|
||||||
.prev-post.pull-left
|
.prev-post.pull-left
|
||||||
- var pagination_cover = page.prev.cover || theme.default_cover
|
- var pagination_cover = page.prev.cover || random_cover()
|
||||||
a(href=url_for(page.prev.path))
|
a(href=url_for(page.prev.path))
|
||||||
|
if theme.lazyload.enable
|
||||||
img.prev_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` )
|
img.prev_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` )
|
||||||
|
else
|
||||||
|
img.prev_cover(src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` )
|
||||||
|
|
||||||
.label=_p('pagination.prev')
|
.label=_p('pagination.prev')
|
||||||
.prev_info
|
.prev_info
|
||||||
//- i.fa.fa-chevron-left
|
|
||||||
span=page.prev.title
|
span=page.prev.title
|
||||||
else
|
else
|
||||||
.prev-post.pull-full
|
.prev-post.pull-full
|
||||||
- var pagination_cover = page.prev.cover || theme.default_cover
|
- var pagination_cover = page.prev.cover || random_cover()
|
||||||
a(href=url_for(page.prev.path))
|
a(href=url_for(page.prev.path))
|
||||||
|
if theme.lazyload.enable
|
||||||
img.prev_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
img.prev_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.prev_cover(src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
.label=_p('pagination.prev')
|
.label=_p('pagination.prev')
|
||||||
.prev_info
|
.prev_info
|
||||||
//- i.fa.fa-chevron-left
|
|
||||||
span=page.prev.title
|
span=page.prev.title
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(page.next)
|
if(page.next)
|
||||||
if(page.prev)
|
if(page.prev)
|
||||||
.next-post.pull-right
|
.next-post.pull-right
|
||||||
- var pagination_cover = page.next.cover || theme.default_cover
|
- var pagination_cover = page.next.cover || random_cover()
|
||||||
a(href=url_for(page.next.path))
|
a(href=url_for(page.next.path))
|
||||||
|
if theme.lazyload.enable
|
||||||
img.next_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
img.next_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.next_cover(src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
.label=_p('pagination.next')
|
.label=_p('pagination.next')
|
||||||
.next_info
|
.next_info
|
||||||
span=page.next.title
|
span=page.next.title
|
||||||
//- i.fa.fa-chevron-right
|
|
||||||
else
|
else
|
||||||
.next-post.pull-full
|
.next-post.pull-full
|
||||||
- var pagination_cover = page.next.cover || theme.default_cover
|
- var pagination_cover = page.next.cover || random_cover()
|
||||||
a(href=url_for(page.next.path))
|
a(href=url_for(page.next.path))
|
||||||
|
if theme.lazyload.enable
|
||||||
img.next_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
img.next_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.next_cover(src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
.label=_p('pagination.next')
|
.label=_p('pagination.next')
|
||||||
.next_info
|
.next_info
|
||||||
span=page.next.title
|
span=page.next.title
|
||||||
//- i.fa.fa-chevron-right
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
17
layout/includes/post-bottom.pug
Normal file
17
layout/includes/post-bottom.pug
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
- var no_comment_show = page.comments !== false ? '' : 'no_comment_show'
|
||||||
|
- var no_toc_show = (is_post() && page.toc != false && theme.toc.enable) ? '' : 'no_toc_show'
|
||||||
|
#post_bottom(class= no_comment_show + ' ' + no_toc_show)
|
||||||
|
#post_bottom_items
|
||||||
|
if page.comments !== false
|
||||||
|
a#mobile_to_comment(href="#post-comment")
|
||||||
|
i.mobile_scroll_to_comment.fa.fa-comments
|
||||||
|
|
||||||
|
if (is_post() && page.toc != false && theme.toc.enable)
|
||||||
|
i#mobile_toc.fa.fa-list
|
||||||
|
#toc_mobile
|
||||||
|
.toc_mobile_headline= _p('sidebar.catalog')
|
||||||
|
if (page.encrypt == true)
|
||||||
|
.toc-div-class(style="display:none")!=toc(page.origin,{"class":"toc_mobile_items"})
|
||||||
|
else
|
||||||
|
!=toc(page.content,{"class":"toc_mobile_items"})
|
||||||
|
|
||||||
@@ -3,23 +3,34 @@ each article , index in page.posts.data
|
|||||||
- var link = article.link || article.path
|
- var link = article.link || article.path
|
||||||
if index%2 == 0
|
if index%2 == 0
|
||||||
.post_cover.is_left
|
.post_cover.is_left
|
||||||
a(href=url_for(link))
|
a(href=url_for(link) title=article.title || _p('no_title'))
|
||||||
- var post_cover = article.cover
|
- var post_cover = article.cover
|
||||||
- var default_post_cover = theme.default_cover
|
- var default_post_cover = random_cover()
|
||||||
if (post_cover)
|
if (post_cover)
|
||||||
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
if theme.lazyload.enable
|
||||||
|
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
else
|
else
|
||||||
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
if theme.lazyload.enable
|
||||||
|
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.post_bg(src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
else
|
else
|
||||||
.post_cover.is_right
|
.post_cover.is_right
|
||||||
a(href=url_for(link))
|
a(href=url_for(link) title=article.title || _p('no_title'))
|
||||||
- var post_cover = article.cover
|
- var post_cover = article.cover
|
||||||
- var default_post_cover = theme.default_cover
|
- var default_post_cover = random_cover()
|
||||||
if (post_cover)
|
if (post_cover)
|
||||||
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
if theme.lazyload.enable
|
||||||
|
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
else
|
else
|
||||||
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
if theme.lazyload.enable
|
||||||
|
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.post_bg(src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
.recent-post-info
|
.recent-post-info
|
||||||
a.article-title(href=url_for(link) title= article.title || _p('no_title'))= article.title || _p('no_title')
|
a.article-title(href=url_for(link) title= article.title || _p('no_title'))= article.title || _p('no_title')
|
||||||
if (article.top)
|
if (article.top)
|
||||||
@@ -51,8 +62,6 @@ each article , index in page.posts.data
|
|||||||
- let expert = content.substring(0, theme.auto_excerpt.length)
|
- let expert = content.substring(0, theme.auto_excerpt.length)
|
||||||
- content.length > theme.auto_excerpt.length ? expert += ' ...' : ''
|
- content.length > theme.auto_excerpt.length ? expert += ' ...' : ''
|
||||||
.content!= expert
|
.content!= expert
|
||||||
.more_setting
|
|
||||||
a.more.more--border.more--primary.more--animated(href=url_for(link) + '#more' style="margin-top: 14px")= _p('read_more')
|
|
||||||
else
|
else
|
||||||
.content!= article.description
|
.content!= article.description
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
.relatedPosts
|
|
||||||
.relatedPosts_headline
|
|
||||||
i.fa.fa-thumbs-up(aria-hidden="true")
|
|
||||||
span=' ' + _p('relatedPosts_headline')
|
|
||||||
.relatedPosts_list!= related_posts(page,site.posts)
|
|
||||||
.clear_both
|
|
||||||
@@ -6,60 +6,6 @@
|
|||||||
ul.reward-all
|
ul.reward-all
|
||||||
each item in theme.reward.QR_code
|
each item in theme.reward.QR_code
|
||||||
li.reward-item
|
li.reward-item
|
||||||
img.lozad.post-qr-code__img(data-src=(item.itemlist||item).img)
|
img.lozad.post-qr-code__img(src=(item.itemlist||item).img)
|
||||||
.post-qr-code__desc=(item.itemlist||item).text
|
.post-qr-code__desc=(item.itemlist||item).text
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- donate-share样式1
|
|
||||||
//- .post-reward-share
|
|
||||||
//- .post-reward
|
|
||||||
//- a.reward-buttom
|
|
||||||
//- i.fa.fa-qrcode
|
|
||||||
//- = ' ' + _p('donate')
|
|
||||||
//- .reward-main
|
|
||||||
//- ul.reward-all
|
|
||||||
//- each item in theme.QR_code
|
|
||||||
//- li.reward-item
|
|
||||||
//- img.lozad.post-qr-code__img(data-src=(item.itemlist||item).img)
|
|
||||||
//- .post-qr-code__desc=(item.itemlist||item).text
|
|
||||||
|
|
||||||
//- .post-share
|
|
||||||
//- include share/index.pug
|
|
||||||
//- a.share-buttom
|
|
||||||
//- i.fa.fa-share-alt
|
|
||||||
//- = ' ' + _p('share')
|
|
||||||
|
|
||||||
//- donate-share样式1
|
|
||||||
//- #social
|
|
||||||
//- .social-main
|
|
||||||
//- span.social-donate
|
|
||||||
//- a#social-donate
|
|
||||||
//- i.fa.fa-qrcode
|
|
||||||
//- = _p('donate')
|
|
||||||
|
|
||||||
|
|
||||||
//- .circle
|
|
||||||
//- .circle-empty
|
|
||||||
//- span
|
|
||||||
//- span.circle_item
|
|
||||||
//- a(style="cursor:pointer")
|
|
||||||
|
|
||||||
//- .social-sharebutton
|
|
||||||
//- span.share-s
|
|
||||||
//- a(href="javascript:void(0)" id="share-s" title=_p('share'))
|
|
||||||
//- i.fa.fa-share-alt
|
|
||||||
//- = _p('share')
|
|
||||||
//- include share/index.pug
|
|
||||||
|
|
||||||
|
|
||||||
//- if (theme.QR_code)
|
|
||||||
//- if (theme.QR_code.length > 0)
|
|
||||||
//- .post-qr-code
|
|
||||||
//- each item in theme.QR_code
|
|
||||||
//- .post-qr-code-item
|
|
||||||
//- img.lozad.post-qr-code__img(data-src=(item.itemlist||item).img)
|
|
||||||
//- .post-qr-code__desc=(item.itemlist||item).text
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
section#rightside.rightside
|
section#rightside.rightside
|
||||||
|
if is_post() && page.comments !== false
|
||||||
|
a#to_comment(href="#post-comment")
|
||||||
|
i.scroll_to_comment.fa.fa-comments
|
||||||
if theme.readmode.enable && is_post()
|
if theme.readmode.enable && is_post()
|
||||||
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
|
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
|
||||||
i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
|
i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
|
||||||
@@ -6,4 +9,5 @@ section#rightside.rightside
|
|||||||
if theme.translate && theme.translate.enable
|
if theme.translate && theme.translate.enable
|
||||||
a#translateLink.translate_chn_to_cht(href="javascript:translatePage();" title=_p('rightside.translate_title'))= theme.translate.default
|
a#translateLink.translate_chn_to_cht(href="javascript:translatePage();" title=_p('rightside.translate_title'))= theme.translate.default
|
||||||
if theme.nightshift.enable
|
if theme.nightshift.enable
|
||||||
i#nightshift.fa.fa-moon-o.nightshift(title=_p('rightside.night_mode_title'))
|
- var display_mode = theme.display_mode == 'night'? 'fa fa-sun-o' : 'fa fa-moon-o'
|
||||||
|
i#nightshift.nightshift(class=display_mode title=_p('rightside.night_mode_title'))
|
||||||
|
|||||||
@@ -17,4 +17,8 @@
|
|||||||
span.progress-num 0
|
span.progress-num 0
|
||||||
span.progress-percentage %
|
span.progress-percentage %
|
||||||
div.sidebar-toc__progress-bar
|
div.sidebar-toc__progress-bar
|
||||||
|
if (page.encrypt == true)
|
||||||
|
div.sidebar-toc__content.toc-div-class(style="display:none")!=toc(page.origin, {list_number: tocNumber})
|
||||||
|
else
|
||||||
div.sidebar-toc__content!=toc(page.content, {list_number: tocNumber})
|
div.sidebar-toc__content!=toc(page.content, {list_number: tocNumber})
|
||||||
|
|
||||||
1
layout/includes/third-party/canvas-nest.pug
vendored
Normal file
1
layout/includes/third-party/canvas-nest.pug
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
script(color=theme.canvas_nest.color opacity=theme.canvas_nest.opacity zIndex=theme.canvas_nest.zIndex count=theme.canvas_nest.count src=url_for(theme.canvas_nest.script))
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
.card-content
|
.card-content
|
||||||
.post_data
|
.post_data
|
||||||
.data-item.text-center
|
.data-item.text-center
|
||||||
img.lozad(data-src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
img.lozad.avatar_img(src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||||
p.author-info__name.text-center= config.author
|
p.author-info__name.text-center= config.author
|
||||||
p.author-info__description.text-center= config.description
|
p.author-info__description.text-center= config.description
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if site.categories.length
|
||||||
.card_widget.card-categories
|
.card_widget.card-categories
|
||||||
.card-content
|
.card-content
|
||||||
.item_headline
|
.item_headline
|
||||||
|
|||||||
@@ -9,12 +9,18 @@
|
|||||||
- var link = article.link || article.path
|
- var link = article.link || article.path
|
||||||
a(href=url_for(link))
|
a(href=url_for(link))
|
||||||
- var post_cover = article.cover
|
- var post_cover = article.cover
|
||||||
- var default_post_cover = theme.default_cover
|
- var default_post_cover = random_cover()
|
||||||
.aside_post_cover
|
.aside_post_cover
|
||||||
if (post_cover)
|
if (post_cover)
|
||||||
|
if theme.lazyload.enable
|
||||||
img.aside_post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
img.aside_post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||||
else
|
else
|
||||||
|
img.aside_post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||||
|
else
|
||||||
|
if theme.lazyload.enable
|
||||||
img.aside_post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
img.aside_post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||||
|
else
|
||||||
|
img.aside_post_bg(src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||||
div#aside_title
|
div#aside_title
|
||||||
.aside_post_title(href=url_for(link) title=article.title || _p('no_title'))= article.title || _p('no_title')
|
.aside_post_title(href=url_for(link) title=article.title || _p('no_title'))= article.title || _p('no_title')
|
||||||
if (theme.post_meta.date_type)
|
if (theme.post_meta.date_type)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
if site.tags.length
|
||||||
.card_widget.card-tags
|
.card_widget.card-tags
|
||||||
.card-content
|
.card-content
|
||||||
.item_headline
|
.item_headline
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ block content
|
|||||||
.tag-cloud__title= _p('page.tag')
|
.tag-cloud__title= _p('page.tag')
|
||||||
| -
|
| -
|
||||||
span.tag-cloud__amount= site.tags.length
|
span.tag-cloud__amount= site.tags.length
|
||||||
.tag-cloud-tags!= tagcloud({min_font: 20, max_font: 43, amount: 200, color: true, start_color: '#A4D8FA', end_color: '#0790E8'})
|
.tag-cloud-tags!= tags(site.tags)
|
||||||
if page.comments !== false
|
if page.comments !== false
|
||||||
include includes/comments/index.pug
|
include includes/comments/index.pug
|
||||||
#aside_content.aside_content
|
#aside_content.aside_content
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ block top_img
|
|||||||
block content
|
block content
|
||||||
article#post(class="")
|
article#post(class="")
|
||||||
#post-content.article-container!= page.content
|
#post-content.article-container!= page.content
|
||||||
if (theme.post_copyright && theme.post_copyright.enable)
|
if (theme.post_copyright && theme.post_copyright.enable && page.copyright != false)
|
||||||
.post-copyright
|
.post-copyright
|
||||||
.post-copyright__author
|
.post-copyright__author
|
||||||
span.post-copyright-meta= _p('post.copyright.author') + ": "
|
span.post-copyright-meta= _p('post.copyright.author') + ": "
|
||||||
@@ -71,6 +71,6 @@ block content
|
|||||||
include includes/pagination.pug
|
include includes/pagination.pug
|
||||||
|
|
||||||
if theme.related_post && theme.related_post.enable
|
if theme.related_post && theme.related_post.enable
|
||||||
include includes/related-posts.pug
|
!= related_posts(page,site.posts)
|
||||||
if page.comments !== false
|
if page.comments !== false
|
||||||
include includes/comments/index.pug
|
include includes/comments/index.pug
|
||||||
6
package.json
Normal file
6
package.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "hexo-theme-melody",
|
||||||
|
"version": "1.1.5",
|
||||||
|
"description": "A Hexo Theme: Butterfly"
|
||||||
|
|
||||||
|
}
|
||||||
15
scripts/note.js
Normal file
15
scripts/note.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* note.js
|
||||||
|
* transplant from hexo-theme-next
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function postNote(args, content) {
|
||||||
|
return `<div class="note ${args.join(' ')}">
|
||||||
|
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
hexo.extend.tag.register('note', postNote, {ends: true});
|
||||||
|
hexo.extend.tag.register('subnote', postNote, {ends: true});
|
||||||
20
scripts/post-lazyload.js
Normal file
20
scripts/post-lazyload.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
'use strict';
|
||||||
|
let cheerio;
|
||||||
|
hexo.extend.filter.register('after_post_render', data => {
|
||||||
|
var theme = hexo.theme.config;
|
||||||
|
if (!theme.lazyload.enable) return;
|
||||||
|
|
||||||
|
if (!cheerio) cheerio = require('cheerio');
|
||||||
|
|
||||||
|
const $ = cheerio.load(data.content, {decodeEntities: false});
|
||||||
|
const images = $('img');
|
||||||
|
if (!images.length) return;
|
||||||
|
|
||||||
|
images.each((i, o) => {
|
||||||
|
let src = $(o).attr('src');
|
||||||
|
$(o).attr('data-src', src).removeAttr('src');
|
||||||
|
$(o).addClass('lozad');
|
||||||
|
});
|
||||||
|
|
||||||
|
data.content = $.html();
|
||||||
|
}, 100);
|
||||||
13
scripts/random_cover.js
Normal file
13
scripts/random_cover.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
hexo.extend.helper.register('random_cover', function () {
|
||||||
|
var cover;
|
||||||
|
var num;
|
||||||
|
if (!Array.isArray(hexo.theme.config.default_cover)) {
|
||||||
|
cover = hexo.theme.config.default_cover
|
||||||
|
return cover
|
||||||
|
} else {
|
||||||
|
num = Math.floor(Math.random() * (hexo.theme.config.default_cover.length));
|
||||||
|
cover = hexo.theme.config.default_cover[num];
|
||||||
|
return cover
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
@@ -23,16 +23,39 @@ hexo.extend.helper.register('related_posts', function(currentPost, allPosts){
|
|||||||
if (relatedPosts.length == 0) { return '' };
|
if (relatedPosts.length == 0) { return '' };
|
||||||
var result = "";
|
var result = "";
|
||||||
var limit_num = hexo.theme.config.related_post.limit || 6
|
var limit_num = hexo.theme.config.related_post.limit || 6
|
||||||
|
var lang = hexo.theme.config.rootConfig.language;
|
||||||
|
var headline_lang;
|
||||||
|
if (lang === 'zh-CN') {
|
||||||
|
headline_lang = '相关推荐';
|
||||||
|
} else if ( lang === 'zh-TW') {
|
||||||
|
headline_lang = '相關推薦';
|
||||||
|
} else {
|
||||||
|
headline_lang = 'Recommend';
|
||||||
|
}
|
||||||
|
|
||||||
relatedPosts = relatedPosts.sort(compare('weight'));
|
relatedPosts = relatedPosts.sort(compare('weight'));
|
||||||
|
var lazy_src = hexo.theme.config.lazyload.enable ? lazy_src = 'data-src' : lazy_src = 'src'
|
||||||
|
var lazy_class = hexo.theme.config.lazyload.enable ? lazy_class = 'lozad' : lazy_class = ''
|
||||||
|
|
||||||
|
if (relatedPosts.length > 0) {
|
||||||
|
result += '<div class="relatedPosts">'
|
||||||
|
result += '<div class="relatedPosts_headline"><i class="fa fa-fw fa-thumbs-up" aria-hidden="true"></i><span>' + ' ' + headline_lang + '</span></div>'
|
||||||
|
result += '<div class="relatedPosts_list">'
|
||||||
|
|
||||||
for (var i = 0; i < Math.min(relatedPosts.length, limit_num); i++) {
|
for (var i = 0; i < Math.min(relatedPosts.length, limit_num); i++) {
|
||||||
|
|
||||||
var cover = relatedPosts[i].cover|| hexo.theme.config.default_cover|| data.butterfly.default_cover
|
var cover = relatedPosts[i].cover || random_cover()
|
||||||
result += '<div class="relatedPosts_item"><a href="/' + relatedPosts[i].path + '" title="' + relatedPosts[i].title +'">';
|
|
||||||
result += '<img class="relatedPosts_cover lozad" data-src="' + cover + '">';
|
result += '<div class="relatedPosts_item"><a href="' + hexo.theme.config.rootConfig.root + relatedPosts[i].path + '" title="' + relatedPosts[i].title + '">';
|
||||||
|
result += '<img class="relatedPosts_cover '+ lazy_class + '"' + lazy_src + '="' + cover + '">';
|
||||||
result += '<div class="relatedPosts_title">' + relatedPosts[i].title + '</div>';
|
result += '<div class="relatedPosts_title">' + relatedPosts[i].title + '</div>';
|
||||||
result += '</a></div>'
|
result += '</a></div>'
|
||||||
}; // console.log(relatedPosts);
|
};
|
||||||
|
|
||||||
|
result += '</div><div class="clear_both"></div></div>'
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
hexo.extend.helper.register('echo', function(path){
|
hexo.extend.helper.register('echo', function(path){
|
||||||
return path;
|
return path;
|
||||||
@@ -62,3 +85,15 @@ function compare (attr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function random_cover() {
|
||||||
|
var post_cover;
|
||||||
|
var num;
|
||||||
|
if (!Array.isArray(hexo.theme.config.default_cover)) {
|
||||||
|
post_cover = hexo.theme.config.default_cover
|
||||||
|
return post_cover
|
||||||
|
} else {
|
||||||
|
num = Math.floor(Math.random() * (hexo.theme.config.default_cover.length));
|
||||||
|
post_cover = hexo.theme.config.default_cover[num];
|
||||||
|
return post_cover
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
16
scripts/tags.js
Normal file
16
scripts/tags.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
hexo.extend.helper.register('tags', function (site_tags) {
|
||||||
|
var result = "";
|
||||||
|
site_tags.sort('path').each(function (tags) {
|
||||||
|
var fontSize = Math.floor(Math.random() * 15 + 15) + "px"; //15 ~ 30
|
||||||
|
var 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="' + hexo.theme.config.rootConfig.root + tags.path + '" style="font-size:' + fontSize + ';color:' + color + '">' + tags.name + '</a>'
|
||||||
|
})
|
||||||
|
return result;
|
||||||
|
})
|
||||||
@@ -23,6 +23,19 @@ body
|
|||||||
*::-webkit-scrollbar-track
|
*::-webkit-scrollbar-track
|
||||||
background-color: transparent
|
background-color: transparent
|
||||||
|
|
||||||
|
|
||||||
|
#web_bg
|
||||||
|
background: $web-bg
|
||||||
|
height: 100%
|
||||||
|
width: 100%
|
||||||
|
background-size: cover
|
||||||
|
position: fixed
|
||||||
|
z-index: -999
|
||||||
|
background-attachment: local
|
||||||
|
background-repeat: no-repeat
|
||||||
|
background-position: center
|
||||||
|
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
@@ -62,7 +75,6 @@ h6
|
|||||||
position: fixed
|
position: fixed
|
||||||
right: $go-up-right
|
right: $go-up-right
|
||||||
bottom: $go-up-bottom
|
bottom: $go-up-bottom
|
||||||
z-index: 100
|
|
||||||
font-size: $sidebar-icon-size
|
font-size: $sidebar-icon-size
|
||||||
opacity: 0
|
opacity: 0
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
@@ -161,6 +173,10 @@ table
|
|||||||
color: #fff
|
color: #fff
|
||||||
border-color: #fff
|
border-color: #fff
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: darken($light-blue, 40)
|
||||||
|
|
||||||
|
|
||||||
textarea
|
textarea
|
||||||
font-size: 0.7rem
|
font-size: 0.7rem
|
||||||
background: url(/img/comment_bg.png) 100% 100% no-repeat
|
background: url(/img/comment_bg.png) 100% 100% no-repeat
|
||||||
@@ -182,11 +198,8 @@ table
|
|||||||
.vnum
|
.vnum
|
||||||
font-size: 1.1rem
|
font-size: 1.1rem
|
||||||
|
|
||||||
.vnick
|
|
||||||
font-size: 100%
|
|
||||||
|
|
||||||
.vsys
|
.vsys
|
||||||
font-size: 70%
|
font-size: 80%
|
||||||
|
|
||||||
.vtime
|
.vtime
|
||||||
font-size: .65rem
|
font-size: .65rem
|
||||||
@@ -195,31 +208,37 @@ table
|
|||||||
font-size: 100%
|
font-size: 100%
|
||||||
|
|
||||||
.vat
|
.vat
|
||||||
font-size: .7125rem;
|
font-size: .7125rem
|
||||||
color: $cyan;
|
color: $cyan
|
||||||
border: 1px solid $cyan;
|
border: 1px solid $cyan
|
||||||
padding: 0 .8rem;
|
padding: 0 .8rem
|
||||||
border-radius: 5px;
|
border-radius: 5px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: alpha($cyan,0.5)
|
||||||
|
|
||||||
#site-title, #site-sub-title,
|
code, pre
|
||||||
|
font-size: 98%
|
||||||
|
font-family: $code-font
|
||||||
|
|
||||||
|
.full_page #site-title,
|
||||||
|
.full_page #site-sub-title,
|
||||||
#site-name,
|
#site-name,
|
||||||
#aside_content .author-info__name,
|
#aside_content .author-info__name,
|
||||||
#aside_content .author-info__description
|
#aside_content .author-info__description
|
||||||
font-family: 'Titillium Web',Lato,PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
font-family: $site-name-font
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#rightside
|
#rightside
|
||||||
right: -38px
|
right: -38px
|
||||||
z-index: 100
|
|
||||||
position: fixed
|
position: fixed
|
||||||
bottom: 50px
|
bottom: 60px
|
||||||
padding-bottom: 32px
|
|
||||||
opacity: 0
|
opacity: 0
|
||||||
transition: all .2s
|
transition: all .2s
|
||||||
|
|
||||||
#readmode,#font_plus,#font_minus
|
|
||||||
|
#readmode,#font_plus,#font_minus,#to_comment
|
||||||
width: 30px
|
width: 30px
|
||||||
height: 30px
|
height: 30px
|
||||||
background-color: $light-blue
|
background-color: $light-blue
|
||||||
@@ -232,6 +251,9 @@ table
|
|||||||
cursor: pointer
|
cursor: pointer
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
|
|
||||||
|
#to_comment
|
||||||
|
display: none
|
||||||
|
|
||||||
#font_minus,#font_plus
|
#font_minus,#font_plus
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
@@ -276,70 +298,67 @@ table
|
|||||||
|
|
||||||
|
|
||||||
// bookmark 樣式
|
// bookmark 樣式
|
||||||
.fc-container .fancybox-bg {
|
.fc-container .fancybox-bg
|
||||||
background: #eee;
|
background: #eee
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-is-open.fc-container .fancybox-bg {
|
|
||||||
opacity: 0.95;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc-content {
|
.fancybox-is-open.fc-container .fancybox-bg
|
||||||
margin: 20px;
|
opacity: 0.95
|
||||||
max-width: 550px;
|
|
||||||
padding: 50px;
|
|
||||||
box-shadow: 10px 10px 60px -25px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc-content h3 {
|
|
||||||
margin-top: 0;
|
|
||||||
font-size: 1.6em;
|
|
||||||
letter-spacing: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc-content p {
|
.fc-content
|
||||||
color: #666;
|
margin: 20px
|
||||||
line-height: 1.5;
|
max-width: 550px
|
||||||
}
|
padding: 50px
|
||||||
|
box-shadow: 10px 10px 60px -25px
|
||||||
|
border-radius: 4px
|
||||||
|
|
||||||
|
|
||||||
|
.fc-content h3
|
||||||
|
margin-top: 0
|
||||||
|
font-size: 1.6em
|
||||||
|
letter-spacing: normal
|
||||||
|
|
||||||
|
|
||||||
|
.fc-content p
|
||||||
|
color: #666
|
||||||
|
line-height: 1.5
|
||||||
|
|
||||||
|
|
||||||
|
.fc-content p:last-child
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
.fc-content p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Custom animation */
|
/* Custom animation */
|
||||||
.fancybox-fx-material.fancybox-slide--previous,
|
.fancybox-fx-material.fancybox-slide--previous,
|
||||||
.fancybox-fx-material.fancybox-slide--next {
|
.fancybox-fx-material.fancybox-slide--next
|
||||||
transform: translateY(-60px) scale(1.1);
|
transform: translateY(-60px) scale(1.1)
|
||||||
opacity: 0;
|
opacity: 0
|
||||||
}
|
|
||||||
|
|
||||||
|
.fancybox-fx-material.fancybox-slide--current
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0) scale(1)
|
||||||
|
|
||||||
.fancybox-fx-material.fancybox-slide--current {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0) scale(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bookmark-ok
|
.bookmark-ok
|
||||||
background: #FF6666;
|
background: #FF6666
|
||||||
border-width: 0;
|
border-width: 0
|
||||||
color: #fff;
|
color: #fff
|
||||||
text-decoration: none;
|
text-decoration: none
|
||||||
padding: 7px 20px;
|
padding: 7px 20px
|
||||||
line-height: 1.5;
|
line-height: 1.5
|
||||||
border-radius: 20px;
|
border-radius: 20px
|
||||||
text-transform: uppercase;
|
text-transform: uppercase
|
||||||
font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif
|
||||||
font-size: 80%;
|
font-size: 80%
|
||||||
font-weight: 700;
|
font-weight: 700
|
||||||
margin: 5px 5px 5px 0;
|
margin: 5px 5px 5px 0
|
||||||
display: inline-block;
|
display: inline-block
|
||||||
cursor: pointer;
|
cursor: pointer
|
||||||
outline: none;
|
outline: none
|
||||||
transition: all .2s ease-in-out;
|
transition: all .2s ease-in-out
|
||||||
-webkit-user-select: none;
|
user-select: none
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
.tright
|
.tright
|
||||||
text-align: right
|
text-align: right
|
||||||
@@ -347,7 +366,18 @@ table
|
|||||||
.is_visible
|
.is_visible
|
||||||
display: block !important
|
display: block !important
|
||||||
|
|
||||||
|
.is_invisible
|
||||||
|
display: none !important
|
||||||
|
|
||||||
|
.is_hidden
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
.fireworks
|
.fireworks
|
||||||
position: fixed
|
position: fixed
|
||||||
z-index: -1
|
z-index: -1
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
|
|
||||||
|
|
||||||
|
// 去掉加載黑框
|
||||||
|
img[src=""],img:not([src])
|
||||||
|
opacity: 0
|
||||||
|
|||||||
@@ -2,21 +2,8 @@
|
|||||||
@require "theme"
|
@require "theme"
|
||||||
@require "diff"
|
@require "diff"
|
||||||
|
|
||||||
languages = "js" "javascript" "python" "ruby" "xml" "html" "css" "perl" "sql" "coffeescript" "java" "scala" "kotlin" "c" "c\+\+" "go" "less" "sass" "scss" "stylus" "styl" "typescript" "ts" "bash" "yml" "yaml" "gradle" "groovy" "ejs" "swig" "markdown"
|
|
||||||
wordWrap = !hexo-config("rootConfig.highlight.line_number") && hexo-config("code_word_wrap")
|
wordWrap = !hexo-config("rootConfig.highlight.line_number") && hexo-config("code_word_wrap")
|
||||||
|
|
||||||
loopForLanguages()
|
|
||||||
for lang in languages
|
|
||||||
.article-container
|
|
||||||
figure.highlight
|
|
||||||
&{"." + lang}
|
|
||||||
table
|
|
||||||
&:before
|
|
||||||
content: lang
|
|
||||||
|
|
||||||
loopForLanguages()
|
|
||||||
|
|
||||||
// Placeholder: $code-block
|
|
||||||
$code-block
|
$code-block
|
||||||
overflow: auto
|
overflow: auto
|
||||||
margin: 1rem 0
|
margin: 1rem 0
|
||||||
@@ -102,18 +89,8 @@ blockquote
|
|||||||
width: auto
|
width: auto
|
||||||
border: none
|
border: none
|
||||||
|
|
||||||
&:before
|
if hexo-config('highlight_shrink') == true
|
||||||
position: absolute
|
display: none
|
||||||
z-index: 1
|
|
||||||
display: inline-block
|
|
||||||
margin-top: -1.4rem
|
|
||||||
padding: 0 0.7rem
|
|
||||||
width: 5rem
|
|
||||||
color: $highlight-foreground
|
|
||||||
content: "Code"
|
|
||||||
font-weight: bold
|
|
||||||
font-size: 0.8rem
|
|
||||||
line-height: 1.4rem
|
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
position: absolute
|
position: absolute
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
transition: all .3s
|
transition: all .3s
|
||||||
background: #fff
|
background: #fff
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
margin-left: 15px
|
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
.headline
|
.headline
|
||||||
display: block
|
display: block
|
||||||
font-size: 0.7rem
|
font-size: 0.7rem
|
||||||
letter-spacing: 1px
|
// letter-spacing: 1px
|
||||||
margin-bottom: -21px
|
margin-bottom: -21px
|
||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
color:#4c4948
|
color:#4c4948
|
||||||
@@ -260,9 +259,6 @@
|
|||||||
.card-archives
|
.card-archives
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
|
|
||||||
.card-announcement-animation
|
|
||||||
animation: announ_animation 1.5s infinite
|
|
||||||
|
|
||||||
.card-webinfo
|
.card-webinfo
|
||||||
.webinfo
|
.webinfo
|
||||||
padding: 0.2rem 1rem
|
padding: 0.2rem 1rem
|
||||||
@@ -303,6 +299,14 @@
|
|||||||
width: 100% !important
|
width: 100% !important
|
||||||
|
|
||||||
.card_widget
|
.card_widget
|
||||||
margin-left: 0 !important
|
margin-left: 0
|
||||||
|
margin-right: 0
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (min-width: 900px)
|
||||||
|
#aside_content
|
||||||
|
.card_widget
|
||||||
|
if hexo-config("aside.position") == "right"
|
||||||
|
margin-left: 15px
|
||||||
|
else
|
||||||
|
margin-right: 15px
|
||||||
|
|||||||
@@ -2,16 +2,29 @@ footer
|
|||||||
margin-top: 1rem
|
margin-top: 1rem
|
||||||
background: $light-blue
|
background: $light-blue
|
||||||
background-attachment: local
|
background-attachment: local
|
||||||
|
|
||||||
&.footer-bg
|
|
||||||
background-position: bottom
|
background-position: bottom
|
||||||
background-size: cover
|
background-size: cover
|
||||||
|
position: relative
|
||||||
|
|
||||||
|
if hexo-config('footer_bg') != false
|
||||||
|
&:before
|
||||||
|
position: absolute
|
||||||
|
bottom: 0
|
||||||
|
left: 0
|
||||||
|
display: block
|
||||||
|
content: ''
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
opacity: 0.5
|
||||||
|
background-color: #394245
|
||||||
|
background-image: linear-gradient(234deg, #394245 0%, #000 100%)
|
||||||
|
|
||||||
|
|
||||||
#footer
|
#footer
|
||||||
padding: 1.2rem 1rem 1rem
|
padding: 1.2rem 1rem 1rem
|
||||||
color: $light-grey
|
color: $light-grey
|
||||||
text-align: center
|
text-align: center
|
||||||
|
position: relative
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $light-grey
|
color: $light-grey
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
#nav
|
#nav
|
||||||
position: relative
|
position: relative
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
|
|
||||||
|
&.full_page
|
||||||
|
height: 100vh
|
||||||
|
|
||||||
|
.nav_bg
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
background-color: $light-blue
|
background-color: $light-blue
|
||||||
background-position: center
|
background-position: center
|
||||||
background-size: cover
|
background-size: cover
|
||||||
|
|
||||||
|
|
||||||
&.full_page
|
|
||||||
background-attachment: local
|
background-attachment: local
|
||||||
height: 100vh
|
|
||||||
|
|
||||||
&.bg_local
|
&.not_index_bg
|
||||||
background-attachment: local
|
height: 20rem
|
||||||
|
|
||||||
|
|
||||||
#site-social-icons
|
#site-social-icons
|
||||||
@@ -31,11 +34,9 @@
|
|||||||
color: $white
|
color: $white
|
||||||
|
|
||||||
#site-info
|
#site-info
|
||||||
// position: absolute
|
position: absolute
|
||||||
width: 100%
|
width: 100%
|
||||||
// top: 43%
|
top: 43%
|
||||||
padding-top: 43%
|
|
||||||
padding-bottom: 43%
|
|
||||||
|
|
||||||
#site-title,
|
#site-title,
|
||||||
#site-sub-title
|
#site-sub-title
|
||||||
@@ -51,6 +52,11 @@
|
|||||||
#site-sub-title
|
#site-sub-title
|
||||||
font-size: 0.8rem
|
font-size: 0.8rem
|
||||||
|
|
||||||
|
#page_site-info
|
||||||
|
position: absolute
|
||||||
|
top: 10rem
|
||||||
|
width: 100%
|
||||||
|
|
||||||
.scroll-down
|
.scroll-down
|
||||||
position: absolute
|
position: absolute
|
||||||
bottom: 0
|
bottom: 0
|
||||||
@@ -60,6 +66,10 @@
|
|||||||
font-size: 30px
|
font-size: 30px
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
.scroll-down-effects
|
||||||
|
position: absolute
|
||||||
|
color: #fff
|
||||||
|
|
||||||
|
|
||||||
#page-header
|
#page-header
|
||||||
position: absolute
|
position: absolute
|
||||||
@@ -105,40 +115,74 @@
|
|||||||
-webkit-transform: rotate(-45deg) translate(4px, -4px)
|
-webkit-transform: rotate(-45deg) translate(4px, -4px)
|
||||||
transform: rotate(-45deg) translate(4px, -4px)
|
transform: rotate(-45deg) translate(4px, -4px)
|
||||||
|
|
||||||
|
.menu_mask
|
||||||
|
position: fixed
|
||||||
|
top: 0
|
||||||
|
bottom: 0
|
||||||
|
width: 100%
|
||||||
|
height: 110vh
|
||||||
|
left: 0
|
||||||
|
right: 0
|
||||||
|
background: alpha($black,0.7)
|
||||||
|
display: none
|
||||||
|
|
||||||
.menus
|
.menus
|
||||||
.mobile_author_icon
|
.mobile_author_icon
|
||||||
display: none
|
display: none
|
||||||
padding: 3rem 1.5rem 0
|
padding: 1.3rem 1.5rem 0
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
|
||||||
img
|
img
|
||||||
height: 120px
|
height: 120px
|
||||||
width: 120px
|
width: 120px
|
||||||
display: inline-block
|
display: inline-block
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
border-radius: 70px
|
border-radius: 70px
|
||||||
-webkit-transition: all .3s
|
transition: all .3s
|
||||||
-moz-transition: all .3s
|
|
||||||
-o-transition: all .3s
|
.mobile_post_data
|
||||||
-ms-transition: all .3s
|
display: flex
|
||||||
|
justify-content: center
|
||||||
|
padding: .6rem .5rem 0
|
||||||
|
display: none
|
||||||
|
|
||||||
|
.mobile_data_item
|
||||||
|
flex: 1
|
||||||
|
|
||||||
|
.mobile_data_link
|
||||||
|
a
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
.length_num
|
||||||
|
font-size: .9rem
|
||||||
|
color: #000
|
||||||
|
|
||||||
|
.headline
|
||||||
|
display: block
|
||||||
|
font-size: 0.7rem
|
||||||
|
// letter-spacing: .5px
|
||||||
|
text-transform: uppercase
|
||||||
|
color:#4c4948
|
||||||
|
|
||||||
|
.menus-expand
|
||||||
|
position: absolute
|
||||||
|
width: 30px !important
|
||||||
|
height: 30px
|
||||||
|
right: 0
|
||||||
|
padding: 6px
|
||||||
|
display: none
|
||||||
|
transform: rotate(0deg)
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
&.menus-closed
|
||||||
|
transform: rotate(180deg) !important
|
||||||
transition: all .3s
|
transition: all .3s
|
||||||
|
|
||||||
hr
|
hr
|
||||||
margin: 1rem auto
|
margin: 1rem auto
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
&.menu_open
|
|
||||||
display: block
|
|
||||||
animation: menu_open .3s
|
|
||||||
|
|
||||||
&.menu_close
|
|
||||||
animation: menu_close .3s
|
|
||||||
display: block
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $light-grey
|
color: $light-grey
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
@@ -148,13 +192,10 @@
|
|||||||
|
|
||||||
.site-page
|
.site-page
|
||||||
position: relative
|
position: relative
|
||||||
margin-left: 0.6rem
|
|
||||||
padding-bottom: 0.3rem
|
padding-bottom: 0.3rem
|
||||||
text-shadow: 0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.3)
|
text-shadow: 0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.3)
|
||||||
font-size: 0.7rem
|
font-size: 0.7rem
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
margin-left: 1rem
|
|
||||||
|
|
||||||
&::after
|
&::after
|
||||||
position: absolute
|
position: absolute
|
||||||
bottom: 0
|
bottom: 0
|
||||||
@@ -214,8 +255,52 @@
|
|||||||
#site-sub-title
|
#site-sub-title
|
||||||
font-size: 1.2rem
|
font-size: 1.2rem
|
||||||
|
|
||||||
@media screen and (max-width: $sm)
|
#page-header
|
||||||
|
.menus_item
|
||||||
|
display: inline-block
|
||||||
|
padding: 0 0.5rem
|
||||||
|
|
||||||
|
&:hover,&:focus
|
||||||
|
.menus_item_child
|
||||||
|
display: block
|
||||||
|
|
||||||
|
.menus_item_child
|
||||||
|
position: absolute
|
||||||
|
background-color: alpha($white, 0.8)
|
||||||
|
padding: 8px 10px
|
||||||
|
width: fit-content
|
||||||
|
border-radius: 5px
|
||||||
|
box-shadow: 0 5px 20px -4px rgba(0,0,0,.5)
|
||||||
|
display: none
|
||||||
|
opacity: 1
|
||||||
|
animation: sub_menus .3s .1s ease both
|
||||||
|
|
||||||
|
&:before
|
||||||
|
content: ""
|
||||||
|
position: absolute
|
||||||
|
top: -20px
|
||||||
|
left: 50%
|
||||||
|
margin-left: -10px
|
||||||
|
border-width: 10px
|
||||||
|
border-style: solid
|
||||||
|
border-color: transparent transparent alpha($white, 0.8)
|
||||||
|
|
||||||
|
.menus_item_child li
|
||||||
|
list-style: none
|
||||||
|
text-align: center
|
||||||
|
|
||||||
|
a
|
||||||
|
color: #3b3a3a;
|
||||||
|
text-shadow: none;
|
||||||
|
|
||||||
|
&.fixed.visible
|
||||||
|
.menus_item_child
|
||||||
|
background-color: #ffffff
|
||||||
|
|
||||||
|
&:before
|
||||||
|
border-color: transparent transparent #ffffff
|
||||||
|
|
||||||
|
@media screen and (max-width: $sm)
|
||||||
#page-header
|
#page-header
|
||||||
padding: 10px 0.8rem
|
padding: 10px 0.8rem
|
||||||
|
|
||||||
@@ -225,41 +310,56 @@
|
|||||||
.menus
|
.menus
|
||||||
position: fixed
|
position: fixed
|
||||||
top: 0
|
top: 0
|
||||||
right: 0
|
right: -250px
|
||||||
width: 100%
|
width: 250px
|
||||||
height 101vh
|
height 101vh
|
||||||
background: $white
|
background: $white
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.27)
|
box-shadow: 0 0 4px rgba(0, 0, 0, 0.27)
|
||||||
z-index: -1
|
z-index: 1
|
||||||
overflow: auto
|
overflow-y: scroll
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
|
.mobile_post_data
|
||||||
|
display: flex
|
||||||
|
|
||||||
|
.menus_items
|
||||||
a
|
a
|
||||||
display: inline-block !important
|
display: block !important
|
||||||
opacity: 1 !important
|
opacity: 1 !important
|
||||||
// margin-left: 0
|
|
||||||
// padding-top: 0.3rem
|
|
||||||
// padding-bottom: 0.3rem
|
|
||||||
// padding-left: 0.6rem
|
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: .5rem 1rem
|
padding: .3rem 1.5rem
|
||||||
color: $font-black
|
color: $font-black
|
||||||
text-shadow: none
|
text-shadow: none
|
||||||
font-size: 0.8rem
|
font-size: 0.8rem
|
||||||
z-index: 0
|
z-index: 0
|
||||||
|
text-overflow: ellipsis
|
||||||
|
overflow: hidden
|
||||||
|
white-space: nowrap
|
||||||
|
|
||||||
|
i
|
||||||
|
width: 30%
|
||||||
|
text-align: left
|
||||||
|
|
||||||
|
span
|
||||||
|
width 70%
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: $light-blue
|
color: $light-blue
|
||||||
|
|
||||||
|
.menus-expand
|
||||||
|
display: inline-block
|
||||||
|
|
||||||
|
.menus_item_child
|
||||||
|
list-style: none
|
||||||
|
margin: 0
|
||||||
|
|
||||||
.mobile_author_icon
|
.mobile_author_icon
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.menus_item
|
.menus_items
|
||||||
padding: 0 .5rem
|
padding: 0 .5rem
|
||||||
margin-bottom: 4rem
|
margin-bottom: 5rem
|
||||||
text-align: center
|
|
||||||
|
|
||||||
hr
|
hr
|
||||||
display: block
|
display: block
|
||||||
@@ -272,5 +372,8 @@
|
|||||||
|
|
||||||
&.fixed.open-sidebar
|
&.fixed.open-sidebar
|
||||||
.search
|
.search
|
||||||
display: inline-block;
|
display: inline-block
|
||||||
opacity: 1;
|
opacity: 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
||||||
.night-mode
|
.night-mode
|
||||||
footer
|
|
||||||
background: #2d3035
|
|
||||||
|
|
||||||
#sidebar
|
#sidebar
|
||||||
background: #2d3035 !important
|
background: #2d3035 !important
|
||||||
box-shadow: -0.25rem 0 0.25rem #2d3035 !important
|
box-shadow: -0.25rem 0 0.25rem #2d3035 !important
|
||||||
@@ -39,7 +36,7 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
|
|
||||||
// 評論
|
// 評論
|
||||||
#vcomment
|
#vcomment
|
||||||
*
|
p,a,textarea,.vemoji-btn,.vpreview-btn,input,path,.vcount,.vnum,.vtime,.vsys,.vsys,.vnick
|
||||||
color: #99a9bf !important
|
color: #99a9bf !important
|
||||||
|
|
||||||
.vsys
|
.vsys
|
||||||
@@ -48,6 +45,26 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
.vbtn
|
.vbtn
|
||||||
background: rgb(45, 48, 53) !important
|
background: rgb(45, 48, 53) !important
|
||||||
color: #99a9bf !important
|
color: #99a9bf !important
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
.vwrap
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
input
|
||||||
|
border-bottom: 1px dashed #616a6b
|
||||||
|
|
||||||
|
.vh
|
||||||
|
border-bottom: 1px dashed #616a6b
|
||||||
|
|
||||||
|
pre
|
||||||
|
background-color: #2d3035
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
.vcontent.expand:before
|
||||||
|
background: linear-gradient(180deg,hsla(0, 0%, 0%, 0),hsl(218, 8%, 19%))
|
||||||
|
|
||||||
|
.vcontent.expand:after
|
||||||
|
background: hsla(204, 5%, 22%, 1)
|
||||||
|
|
||||||
.recent-post-item .article-title
|
.recent-post-item .article-title
|
||||||
color: #99a9bf
|
color: #99a9bf
|
||||||
@@ -108,7 +125,6 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
background: rgb(27, 38, 59)
|
background: rgb(27, 38, 59)
|
||||||
|
|
||||||
.post-cards,.md-links-item
|
.post-cards,.md-links-item
|
||||||
// background: #2d3035
|
|
||||||
a
|
a
|
||||||
color: #99a9bf
|
color: #99a9bf
|
||||||
|
|
||||||
@@ -127,7 +143,8 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
|
|
||||||
.translate_chn_to_cht,
|
.translate_chn_to_cht,
|
||||||
.nightshift,
|
.nightshift,
|
||||||
#readmode
|
#readmode,
|
||||||
|
#to_comment
|
||||||
background-color: #2d3035 !important
|
background-color: #2d3035 !important
|
||||||
|
|
||||||
img
|
img
|
||||||
@@ -163,7 +180,8 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
background:#2d3035
|
background:#2d3035
|
||||||
|
|
||||||
#nav,
|
#nav,
|
||||||
#top-container
|
#top-container,
|
||||||
|
footer
|
||||||
&::before
|
&::before
|
||||||
content: ""
|
content: ""
|
||||||
position: absolute
|
position: absolute
|
||||||
@@ -182,10 +200,14 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
|
|
||||||
#site-info .blogtitle,
|
#site-info .blogtitle,
|
||||||
span.subtitle,
|
span.subtitle,
|
||||||
|
#site-title,
|
||||||
#post-info .posttitle,
|
#post-info .posttitle,
|
||||||
#post-info #post-meta,
|
#post-info #post-meta,
|
||||||
#site-social-icons i,
|
#site-social-icons i,
|
||||||
#top-container a
|
#top-container a,
|
||||||
|
#footer,
|
||||||
|
#footer a,
|
||||||
|
#page-header a
|
||||||
color: rgba(238,238,238,.6)
|
color: rgba(238,238,238,.6)
|
||||||
|
|
||||||
//打賞 分享
|
//打賞 分享
|
||||||
@@ -200,9 +222,30 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
&::-webkit-scrollbar-thumb
|
&::-webkit-scrollbar-thumb
|
||||||
background: lighten(#2d3035,5)
|
background: lighten(#2d3035,5)
|
||||||
|
|
||||||
.more
|
|
||||||
|
#post_bottom
|
||||||
|
background: #2d3035
|
||||||
|
box-shadow: 0 -5px 6px -5px rgba(133,133,133,0)
|
||||||
|
|
||||||
|
i
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
#toc_mobile
|
||||||
|
background: #2d3035
|
||||||
|
|
||||||
|
a
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
#web_bg
|
||||||
|
background-color: #2d3032
|
||||||
|
|
||||||
|
#hbe-security
|
||||||
|
label
|
||||||
|
color: #99a9bf !important
|
||||||
|
input
|
||||||
background-color: #616a6b
|
background-color: #616a6b
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px)
|
@media screen and (max-width: 768px)
|
||||||
.night-mode
|
.night-mode
|
||||||
color: #99a9bf
|
color: #99a9bf
|
||||||
@@ -211,6 +254,12 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
#page-header
|
#page-header
|
||||||
.menus
|
.menus
|
||||||
background: #2d3035
|
background: #2d3035
|
||||||
|
|
||||||
|
.headline
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
.length_num
|
||||||
|
color: darken(#99a9bf,10) !important
|
||||||
a
|
a
|
||||||
color: #99a9bf !important
|
color: #99a9bf !important
|
||||||
.menu-icon-first,
|
.menu-icon-first,
|
||||||
@@ -227,6 +276,18 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
.recent-post-item
|
.recent-post-item
|
||||||
background: #2d3035 !important
|
background: #2d3035 !important
|
||||||
|
|
||||||
|
#page-header
|
||||||
|
.menus_item_child
|
||||||
|
background-color: #2d3035 !important
|
||||||
|
|
||||||
|
&:before
|
||||||
|
border-color: transparent transparent #2d3035 !important
|
||||||
|
|
||||||
|
li
|
||||||
|
a
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
256
source/css/_layout/note.styl
Normal file
256
source/css/_layout/note.styl
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
.note
|
||||||
|
$note-icons = hexo-config('note.icons')
|
||||||
|
$note-style = hexo-config('note.style')
|
||||||
|
margin: 10px 0
|
||||||
|
padding: 15px
|
||||||
|
position: relative
|
||||||
|
|
||||||
|
if ($note-style == 'simple')
|
||||||
|
border: 1px solid $light-grey
|
||||||
|
border-left-width: 5px
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $whitesmoke
|
||||||
|
border: 1px solid transparent
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: lighten($light-grey, 65%)
|
||||||
|
border: initial
|
||||||
|
border-left: 5px solid $light-grey
|
||||||
|
|
||||||
|
|
||||||
|
if (hexo-config('note.border_radius') is a 'unit')
|
||||||
|
border-radius: unit(hexo-config('note.border_radius'), px)
|
||||||
|
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
if ($note-icons)
|
||||||
|
margin-top: 3px
|
||||||
|
else
|
||||||
|
margin-top: 0
|
||||||
|
|
||||||
|
|
||||||
|
border-bottom: initial
|
||||||
|
margin-bottom: 0
|
||||||
|
padding-top: 0 !important
|
||||||
|
|
||||||
|
|
||||||
|
p, ul, ol, table, pre, blockquote, img
|
||||||
|
&:first-child
|
||||||
|
margin-top: 0
|
||||||
|
|
||||||
|
&:last-child
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
padding-left: 45px
|
||||||
|
|
||||||
|
&::before
|
||||||
|
font-family: 'FontAwesome'
|
||||||
|
font-size: larger
|
||||||
|
left: 15px
|
||||||
|
position: absolute
|
||||||
|
top: 13px
|
||||||
|
|
||||||
|
&.default
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: $note-default-bg
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $note-modern-default-bg
|
||||||
|
border-color: $note-modern-default-border
|
||||||
|
color: $note-modern-default-text
|
||||||
|
|
||||||
|
a, span.exturl
|
||||||
|
&:not(.btn)
|
||||||
|
border-bottom: 1px solid $note-modern-default-text
|
||||||
|
color: $note-modern-default-text
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-bottom: 1px solid $note-modern-default-hover
|
||||||
|
color: $note-modern-default-hover
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
border-left-color: $note-default-border
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
color: $note-default-text
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
&::before
|
||||||
|
content: $note-default-icon
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
color: $note-default-text
|
||||||
|
|
||||||
|
&.primary
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: $note-primary-bg
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $note-modern-primary-bg
|
||||||
|
border-color: $note-modern-primary-border
|
||||||
|
color: $note-modern-primary-text
|
||||||
|
|
||||||
|
a, span.exturl
|
||||||
|
&:not(.btn)
|
||||||
|
border-bottom: 1px solid $note-modern-primary-text
|
||||||
|
color: $note-modern-primary-text
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-bottom: 1px solid $note-modern-primary-hover
|
||||||
|
color: $note-modern-primary-hover
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
border-left-color: $note-primary-border
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
color: $note-primary-text
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
&::before
|
||||||
|
content: $note-primary-icon
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
color: $note-primary-text
|
||||||
|
|
||||||
|
&.info
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: $note-info-bg
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $note-modern-info-bg
|
||||||
|
border-color: $note-modern-info-border
|
||||||
|
color: $note-modern-info-text
|
||||||
|
|
||||||
|
a, span.exturl
|
||||||
|
&:not(.btn)
|
||||||
|
border-bottom: 1px solid $note-modern-info-text
|
||||||
|
color: $note-modern-info-text
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-bottom: 1px solid $note-modern-info-hover
|
||||||
|
color: $note-modern-info-hover
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
border-left-color: $note-info-border
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
color: $note-info-text
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
&::before
|
||||||
|
content: $note-info-icon
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
color: $note-info-text
|
||||||
|
|
||||||
|
&.success
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: $note-success-bg
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $note-modern-success-bg
|
||||||
|
border-color: $note-modern-success-border
|
||||||
|
color: $note-modern-success-text
|
||||||
|
|
||||||
|
a, span.exturl
|
||||||
|
&:not(.btn)
|
||||||
|
border-bottom: 1px solid $note-modern-success-text
|
||||||
|
color: $note-modern-success-text
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-bottom: 1px solid $note-modern-success-hover
|
||||||
|
color: $note-modern-success-hover
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
border-left-color: $note-success-border
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
color: $note-success-text
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
&::before
|
||||||
|
content: $note-success-icon
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
color: $note-success-text
|
||||||
|
|
||||||
|
&.warning
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: $note-warning-bg
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $note-modern-warning-bg
|
||||||
|
border-color: $note-modern-warning-border
|
||||||
|
color: $note-modern-warning-text
|
||||||
|
|
||||||
|
a, span.exturl
|
||||||
|
&:not(.btn)
|
||||||
|
border-bottom: 1px solid $note-modern-warning-text
|
||||||
|
color: $note-modern-warning-text
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-bottom: 1px solid $note-modern-warning-hover
|
||||||
|
color: $note-modern-warning-hover
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
border-left-color: $note-warning-border
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
color: $note-warning-text
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
&::before
|
||||||
|
content: $note-warning-icon
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
color: $note-warning-text
|
||||||
|
|
||||||
|
&.danger
|
||||||
|
if ($note-style == 'flat')
|
||||||
|
background-color: $note-danger-bg
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style == 'modern')
|
||||||
|
background-color: $note-modern-danger-bg
|
||||||
|
border-color: $note-modern-danger-border
|
||||||
|
color: $note-modern-danger-text
|
||||||
|
|
||||||
|
a, span.exturl
|
||||||
|
&:not(.btn)
|
||||||
|
border-bottom: 1px solid $note-modern-danger-text
|
||||||
|
color: $note-modern-danger-text
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-bottom: 1px solid $note-modern-danger-hover
|
||||||
|
color: $note-modern-danger-hover
|
||||||
|
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
border-left-color: $note-danger-border
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6
|
||||||
|
color: $note-danger-text
|
||||||
|
|
||||||
|
if ($note-icons)
|
||||||
|
&:not(.no-icon)
|
||||||
|
&::before
|
||||||
|
content: $note-danger-icon
|
||||||
|
|
||||||
|
if ($note-style != 'modern')
|
||||||
|
color: $note-danger-text
|
||||||
@@ -105,24 +105,6 @@ galleryItemStyle(w, h)
|
|||||||
time
|
time
|
||||||
color: $grey
|
color: $grey
|
||||||
|
|
||||||
.more_setting
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.more
|
|
||||||
display: inline-block
|
|
||||||
padding: 0 1rem
|
|
||||||
height: h = 1.6rem
|
|
||||||
// background: $light-blue
|
|
||||||
// color: $white
|
|
||||||
text-align: center
|
|
||||||
text-decoration: none
|
|
||||||
line-height: h
|
|
||||||
cursor: pointer
|
|
||||||
// transition: all 0.2s ease-in-out
|
|
||||||
|
|
||||||
// &:hover
|
|
||||||
// background: $ruby
|
|
||||||
|
|
||||||
.article-title
|
.article-title
|
||||||
margin-bottom: 0.3rem
|
margin-bottom: 0.3rem
|
||||||
color: $black
|
color: $black
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
img.prev_cover, img.next_cover
|
img.prev_cover, img.next_cover
|
||||||
position: absolute
|
position: absolute
|
||||||
padding: 0
|
padding: 0
|
||||||
z-index: 50
|
|
||||||
top: 0
|
top: 0
|
||||||
left: 0
|
left: 0
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
if hexo-config("post_beautify.enable")
|
||||||
|
headStyle(fontsize)
|
||||||
|
padding-left: unit(fontsize + 0.3, "rem")
|
||||||
|
|
||||||
|
code
|
||||||
|
font-size: unit(fontsize, "rem")
|
||||||
|
|
||||||
|
&:before
|
||||||
|
top: calc(50% - unit(fontsize / 2 - 0.05, "rem"))
|
||||||
|
font-size: unit(fontsize, "rem")
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
padding-left: unit(fontsize + 0.2, "rem")
|
||||||
|
|
||||||
|
|
||||||
#post-title
|
#post-title
|
||||||
font-size: 1.4rem
|
font-size: 1.4rem
|
||||||
|
|
||||||
@@ -100,6 +115,114 @@
|
|||||||
#post-content
|
#post-content
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
|
|
||||||
|
if hexo-config("post_beautify.enable")
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6
|
||||||
|
cursor: pointer
|
||||||
|
transition: all 0.2s ease-out
|
||||||
|
|
||||||
|
&:before
|
||||||
|
position: absolute
|
||||||
|
top: calc(50% - 0.35rem)
|
||||||
|
left: 0
|
||||||
|
color: $title-prefix-icon-color
|
||||||
|
content: $title-prefix-icon
|
||||||
|
font: normal normal normal 14px / 1 FontAwesome
|
||||||
|
font-size: 0.8rem
|
||||||
|
transition: all 0.2s ease-out
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
padding-left: 1.1rem
|
||||||
|
|
||||||
|
&:before
|
||||||
|
color: $light-blue
|
||||||
|
|
||||||
|
h1
|
||||||
|
headStyle(1)
|
||||||
|
|
||||||
|
h2
|
||||||
|
headStyle(0.9)
|
||||||
|
|
||||||
|
h3
|
||||||
|
headStyle(0.8)
|
||||||
|
|
||||||
|
h4
|
||||||
|
headStyle(0.7)
|
||||||
|
|
||||||
|
h5
|
||||||
|
headStyle(0.6)
|
||||||
|
|
||||||
|
h6
|
||||||
|
headStyle(0.6)
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul
|
||||||
|
margin-top: 0.4rem
|
||||||
|
padding: 0 0 0 0.8rem
|
||||||
|
list-style: none
|
||||||
|
counter-reset: li
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul
|
||||||
|
padding-left: 0.5rem
|
||||||
|
|
||||||
|
li
|
||||||
|
position: relative
|
||||||
|
margin: 0.2rem 0
|
||||||
|
padding: 0.1rem 0.5rem 0.1rem 1.5rem
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
&:before
|
||||||
|
transform: rotate(360deg)
|
||||||
|
|
||||||
|
&:before
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: 0
|
||||||
|
background: $light-blue
|
||||||
|
color: $white
|
||||||
|
cursor: pointer
|
||||||
|
transition: all 0.3s ease-out
|
||||||
|
|
||||||
|
ol
|
||||||
|
> li
|
||||||
|
&:before
|
||||||
|
margin-top: 0.2rem
|
||||||
|
width: w = 1.2rem
|
||||||
|
height: h = w
|
||||||
|
border-radius: 0.5 * w
|
||||||
|
content: counter(li)
|
||||||
|
counter-increment: li
|
||||||
|
text-align: center
|
||||||
|
font-size: 0.6rem
|
||||||
|
line-height: h
|
||||||
|
|
||||||
|
ul
|
||||||
|
> li
|
||||||
|
&:hover
|
||||||
|
&:before
|
||||||
|
border-color: $ruby
|
||||||
|
|
||||||
|
&:before
|
||||||
|
$w = 0.3rem
|
||||||
|
top: 10px
|
||||||
|
margin-left: 0.45rem
|
||||||
|
width: w = $w
|
||||||
|
height: h = w
|
||||||
|
border: 0.5 * w solid $light-blue
|
||||||
|
border-radius: w
|
||||||
|
background: $white
|
||||||
|
content: ""
|
||||||
|
line-height: h
|
||||||
|
|
||||||
|
else
|
||||||
ol,
|
ol,
|
||||||
ul
|
ul
|
||||||
margin-top: 0.4rem
|
margin-top: 0.4rem
|
||||||
@@ -162,6 +285,31 @@ img
|
|||||||
&:hover
|
&:hover
|
||||||
color: darken($highlight-aqua, 20%)
|
color: darken($highlight-aqua, 20%)
|
||||||
|
|
||||||
|
.code_lang
|
||||||
|
position: absolute
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
line-height: 1.4rem;
|
||||||
|
color: $highlight-foreground
|
||||||
|
left: 30px
|
||||||
|
z-index: 1
|
||||||
|
cursor: pointer
|
||||||
|
|
||||||
|
.code-expand
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
color: $highlight-foreground
|
||||||
|
padding: 7px 10px
|
||||||
|
z-index: 1
|
||||||
|
cursor: pointer
|
||||||
|
transition: all .3s
|
||||||
|
transform: rotate(0deg)
|
||||||
|
|
||||||
|
.code-closed
|
||||||
|
transform: rotate(-90deg) !important
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
|
||||||
.copy-notice
|
.copy-notice
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0
|
top: 0
|
||||||
@@ -229,8 +377,6 @@ img
|
|||||||
.layout
|
.layout
|
||||||
width: $content-large-width
|
width: $content-large-width
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.katex-wrap
|
.katex-wrap
|
||||||
overflow: auto
|
overflow: auto
|
||||||
if hexo-config("katex") && hexo-config("katex.hide_scrollbar")
|
if hexo-config("katex") && hexo-config("katex.hide_scrollbar")
|
||||||
@@ -249,7 +395,7 @@ img
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 900px)
|
@media screen and (max-width: 1024px)
|
||||||
.layout
|
.layout
|
||||||
margin: 0 15px
|
margin: 0 15px
|
||||||
width: auto
|
width: auto
|
||||||
|
|||||||
70
source/css/_layout/post_bottom.styl
Normal file
70
source/css/_layout/post_bottom.styl
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#post_bottom
|
||||||
|
position: fixed
|
||||||
|
bottom: -50px
|
||||||
|
background: alpha($white, 0.8)
|
||||||
|
width: 100%
|
||||||
|
border: none
|
||||||
|
box-shadow: 0 -5px 6px -5px alpha($grey, 0.6)
|
||||||
|
display: none
|
||||||
|
transition: all .2s
|
||||||
|
cursor: pointer
|
||||||
|
z-index: 100
|
||||||
|
|
||||||
|
&.toc_mobile_show
|
||||||
|
bottom: 0
|
||||||
|
|
||||||
|
#mobile_to_comment,#mobile_toc
|
||||||
|
width: 50%
|
||||||
|
text-align: center
|
||||||
|
font-size: 18px
|
||||||
|
padding: 7px 0
|
||||||
|
display: inline-block
|
||||||
|
color: $light-black
|
||||||
|
|
||||||
|
a
|
||||||
|
text-decoration: none
|
||||||
|
color: $light-black
|
||||||
|
|
||||||
|
#toc_mobile
|
||||||
|
box-shadow: 0 0 4px alpha($grey, 0.6)
|
||||||
|
background: $white
|
||||||
|
width: 50%
|
||||||
|
height: 70%
|
||||||
|
position: fixed
|
||||||
|
bottom: 60px
|
||||||
|
right: 10px
|
||||||
|
overflow: scroll
|
||||||
|
padding: 15px 10px
|
||||||
|
font-size: 15px
|
||||||
|
border-radius: 10px
|
||||||
|
display: none
|
||||||
|
|
||||||
|
ol,li
|
||||||
|
list-style: none
|
||||||
|
padding: 0 0 0 5px
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
a
|
||||||
|
&:hover
|
||||||
|
color: $light-blue
|
||||||
|
|
||||||
|
.toc_mobile_headline
|
||||||
|
text-align: center
|
||||||
|
font-size: 18px
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
|
&.no_comment_show
|
||||||
|
#mobile_toc
|
||||||
|
width: 100%
|
||||||
|
padding: 16px 0
|
||||||
|
|
||||||
|
#toc_mobile
|
||||||
|
right: 25%
|
||||||
|
|
||||||
|
&.no_toc_show
|
||||||
|
#mobile_to_comment
|
||||||
|
width: 100%
|
||||||
|
|
||||||
|
@media screen and (max-width:768px)
|
||||||
|
#post_bottom
|
||||||
|
display: block
|
||||||
@@ -35,7 +35,7 @@ if hexo-config("readmode") && hexo-config("readmode.enable")
|
|||||||
|
|
||||||
#page-header
|
#page-header
|
||||||
&.fixed
|
&.fixed
|
||||||
background: none
|
background: alpha(darken($pale-yellow,5),0.5)
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
|
|
||||||
&.open-sidebar
|
&.open-sidebar
|
||||||
@@ -99,6 +99,29 @@ if hexo-config("readmode") && hexo-config("readmode.enable")
|
|||||||
.copy-notice
|
.copy-notice
|
||||||
background: darken($pale-yellow,10)
|
background: darken($pale-yellow,10)
|
||||||
|
|
||||||
|
.toc_mobile_show
|
||||||
|
background: alpha(darken($pale-yellow,5),0.5) !important
|
||||||
|
box-shadow: none !important
|
||||||
|
|
||||||
|
#post_bottom_items
|
||||||
|
#mobile_to_comment
|
||||||
|
display: none
|
||||||
|
#mobile_toc
|
||||||
|
width: 100%
|
||||||
|
padding: 16px 0
|
||||||
|
#toc_mobile
|
||||||
|
right: 25%
|
||||||
|
background: darken($pale-yellow,5)
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (min-width: 768px)
|
||||||
|
.read-mode
|
||||||
|
.menus_item_child
|
||||||
|
background-color: darken($pale-yellow,5) !important
|
||||||
|
|
||||||
|
&:before
|
||||||
|
border-color: transparent transparent darken($pale-yellow,5) !important
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,6 @@
|
|||||||
|
|
||||||
.relatedPosts_cover
|
.relatedPosts_cover
|
||||||
border: 0
|
border: 0
|
||||||
-webkit-transition: all 0.6s
|
|
||||||
-moz-transition: all 0.6s
|
|
||||||
-o-transition: all 0.6s
|
|
||||||
-ms-transition: all 0.6s
|
|
||||||
transition: all 0.6s
|
transition: all 0.6s
|
||||||
display: block
|
display: block
|
||||||
width: 100%
|
width: 100%
|
||||||
@@ -60,7 +56,6 @@
|
|||||||
clear: both
|
clear: both
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width:768px)
|
@media screen and (max-width:768px)
|
||||||
.relatedPosts_item
|
.relatedPosts_item
|
||||||
width: calc(100%/2 - 4px)
|
width: calc(100%/2 - 4px)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
left: 0
|
left: 0
|
||||||
transition: all 0.6s
|
transition: all 0.6s
|
||||||
display: none
|
display: none
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
.reward-all
|
.reward-all
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
background: $sidebar-background
|
background: $sidebar-background
|
||||||
box-shadow: -0.25rem 0 0.25rem rgba(232, 237, 250, 0.6) inset
|
box-shadow: -0.25rem 0 0.25rem rgba(232, 237, 250, 0.6) inset
|
||||||
opacity: 0.9
|
opacity: 0.9
|
||||||
transition: all 0.2s
|
|
||||||
|
|
||||||
.sidebar-toc
|
.sidebar-toc
|
||||||
ol,
|
ol,
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#recent-posts
|
#recent-posts
|
||||||
|
width: 75%
|
||||||
|
|
||||||
.recent-post-item
|
.recent-post-item
|
||||||
padding: 0
|
padding: 0
|
||||||
box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
|
box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
|
||||||
border-radius: 8px
|
border-radius: 8px
|
||||||
-webkit-transition: all 0.3s
|
|
||||||
-moz-transition: all 0.3s
|
|
||||||
-o-transition: all 0.3s
|
|
||||||
-ms-transition: all 0.3s
|
|
||||||
transition: all 0.3s
|
transition: all 0.3s
|
||||||
background: #fff
|
background: #fff
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
@@ -34,9 +32,6 @@
|
|||||||
height: 280px
|
height: 280px
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
img.post_bg
|
img.post_bg
|
||||||
border: 0
|
border: 0
|
||||||
transition: all .6s
|
transition: all .6s
|
||||||
@@ -76,53 +71,6 @@ a.article-meta__categories
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
height: 90px
|
height: 90px
|
||||||
|
|
||||||
.more {
|
|
||||||
position: relative
|
|
||||||
letter-spacing: 1.2px
|
|
||||||
text-transform: uppercase
|
|
||||||
overflow: hidden
|
|
||||||
z-index: 1
|
|
||||||
background-color: $light-blue
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
outline: none
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.more--primary {
|
|
||||||
color: $white
|
|
||||||
}
|
|
||||||
|
|
||||||
.more--animated {
|
|
||||||
transition-property: color
|
|
||||||
transition-duration: 0.5s
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
content: ""
|
|
||||||
position: absolute
|
|
||||||
top: 0
|
|
||||||
left: 0
|
|
||||||
right: 0
|
|
||||||
bottom: 0
|
|
||||||
background: $ruby
|
|
||||||
transform: scaleX(0)
|
|
||||||
transform-origin: 0 50%
|
|
||||||
transition-property: transform
|
|
||||||
transition-duration: 0.5s
|
|
||||||
transition-timing-function: ease-out
|
|
||||||
z-index: -1
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: white
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
transform: scaleX(1)
|
|
||||||
transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.layout_page
|
.layout_page
|
||||||
display: flex
|
display: flex
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
@@ -130,8 +78,6 @@ a.article-meta__categories
|
|||||||
align-items: flex-start
|
align-items: flex-start
|
||||||
padding: 0 15px
|
padding: 0 15px
|
||||||
|
|
||||||
#recent-posts
|
|
||||||
width: 75%
|
|
||||||
|
|
||||||
#page,.category-content,.flink
|
#page,.category-content,.flink
|
||||||
padding: 40px 44px 44px
|
padding: 40px 44px 44px
|
||||||
@@ -150,20 +96,26 @@ a.article-meta__categories
|
|||||||
-webkit-box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
|
-webkit-box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
|
||||||
box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
|
box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
|
||||||
|
|
||||||
#page_site-info
|
|
||||||
padding: 10rem 1rem 7rem
|
|
||||||
#site-title
|
@media screen and (min-width: 900px)
|
||||||
font-family: PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
if hexo-config("aside.position") == "left"
|
||||||
|
#recent-posts
|
||||||
|
order: 2
|
||||||
|
|
||||||
|
#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
||||||
|
order: 2
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 900px)
|
@media screen and (max-width: 900px)
|
||||||
#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
||||||
width: 100% !important
|
width: 100% !important
|
||||||
|
|
||||||
// .recent-post-info
|
|
||||||
// padding: 40px 30px 20px
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width:768px)
|
@media screen and (max-width:768px)
|
||||||
|
#web_bg
|
||||||
|
display: none
|
||||||
|
|
||||||
.recent-post-item
|
.recent-post-item
|
||||||
height: auto !important
|
height: auto !important
|
||||||
border-radius: 8px
|
border-radius: 8px
|
||||||
@@ -203,26 +155,15 @@ a.article-meta__categories
|
|||||||
-webkit-box-shadow: none
|
-webkit-box-shadow: none
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
|
|
||||||
|
|
||||||
.layout_page
|
.layout_page
|
||||||
padding: 0 !important
|
padding: 0 !important
|
||||||
|
|
||||||
#aside_content
|
#aside_content
|
||||||
display: none !important
|
display: none !important
|
||||||
// .card_widget
|
|
||||||
// box-shadow: none
|
|
||||||
// border-radius: 0
|
|
||||||
// border-top: 1px dashed #a4d8fa
|
|
||||||
|
|
||||||
// &:hover
|
|
||||||
// box-shadow: none
|
|
||||||
|
|
||||||
|
|
||||||
.category-lists
|
.category-lists
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.recent-post-info
|
.recent-post-info
|
||||||
padding: 20px 10px !important
|
padding: 20px 10px !important
|
||||||
width: 100%
|
width: 100%
|
||||||
@@ -230,14 +171,15 @@ a.article-meta__categories
|
|||||||
#recent-posts #pagination
|
#recent-posts #pagination
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
|
||||||
.more_setting
|
#nav
|
||||||
display: block !important
|
#site-social-icons
|
||||||
|
|
||||||
#nav #site-social-icons
|
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
|
&.not_index_bg
|
||||||
|
height: 14rem
|
||||||
|
|
||||||
#page_site-info
|
#page_site-info
|
||||||
padding: 7rem 1rem 5rem
|
top: 7rem
|
||||||
|
|
||||||
#top-container
|
#top-container
|
||||||
height: 14rem
|
height: 14rem
|
||||||
@@ -254,11 +196,10 @@ a.article-meta__categories
|
|||||||
display: none !important
|
display: none !important
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.layout_page,
|
.layout_page,
|
||||||
.layout_post,
|
.layout_post,
|
||||||
footer
|
footer
|
||||||
animation: main 1s;
|
animation: main 1s
|
||||||
|
|
||||||
#nav,
|
#nav,
|
||||||
#top-container
|
#top-container
|
||||||
@@ -267,109 +208,82 @@ footer
|
|||||||
#site-title
|
#site-title
|
||||||
animation: titlescale 1s
|
animation: titlescale 1s
|
||||||
|
|
||||||
.search-dialog
|
canvas,#web_bg
|
||||||
transition: all .2s
|
animation: to_show 4s
|
||||||
|
|
||||||
|
.card-announcement-animation
|
||||||
|
animation: announ_animation 1.5s infinite
|
||||||
|
|
||||||
.scroll-down-effects
|
.scroll-down-effects
|
||||||
-webkit-animation: pulse 1.5s infinite
|
animation: scroll-down-effect 1.5s infinite
|
||||||
animation: pulse 1.5s infinite
|
|
||||||
// font-size: 28px
|
|
||||||
position: absolute
|
|
||||||
color: #fff
|
|
||||||
|
|
||||||
.is_hidden
|
if hexo-config("avatar_effect") == true
|
||||||
overflow: hidden
|
.avatar_img
|
||||||
@keyframes pulse{
|
animation: avatar_turn_around 2s linear infinite
|
||||||
|
|
||||||
0%,to{
|
.reward-main
|
||||||
// -ms-filter:"alpha(opacity=40)"
|
animation: donate_effcet .3s .1s ease both;
|
||||||
// filter:alpha(opacity=40)
|
|
||||||
opacity:.4
|
|
||||||
top:0}
|
@keyframes scroll-down-effect
|
||||||
50%{
|
0%
|
||||||
// -ms-filter:none
|
opacity: 0.4
|
||||||
// -webkit-filter:none
|
top: 0
|
||||||
// filter:none
|
50%
|
||||||
opacity: 1
|
opacity: 1
|
||||||
top:-16px}
|
top: -16px
|
||||||
}
|
100%
|
||||||
|
opacity: 0.4
|
||||||
|
top: 0
|
||||||
|
|
||||||
@keyframes header {
|
@keyframes header
|
||||||
0% {
|
0%
|
||||||
opacity: 0;
|
opacity: 0
|
||||||
transform: translateY(-50px)
|
transform: translateY(-50px)
|
||||||
}
|
100%
|
||||||
100% {
|
opacity: 1
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0)
|
transform: translateY(0)
|
||||||
}
|
|
||||||
|
|
||||||
}
|
@keyframes main
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
@keyframes main {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(50px)
|
transform: translateY(50px)
|
||||||
}
|
100%
|
||||||
100% {
|
opacity: 1
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0)
|
transform: translateY(0)
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes titlescale{
|
@keyframes titlescale
|
||||||
|
0%
|
||||||
0% {
|
opacity: 0
|
||||||
// opacity:0;
|
|
||||||
transform: scale(0.7)
|
transform: scale(0.7)
|
||||||
}
|
100%
|
||||||
100% {
|
opacity: 1
|
||||||
// opacity:1;
|
|
||||||
transform: scale(1)
|
transform: scale(1)
|
||||||
}
|
|
||||||
|
|
||||||
}
|
@keyframes to_show
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
@keyframes avatar_turn_around
|
||||||
|
from
|
||||||
|
transform: rotate(0deg)
|
||||||
|
to
|
||||||
|
transform: rotate(360deg)
|
||||||
|
|
||||||
.article-container .code_full_page
|
@keyframes sub_menus
|
||||||
position: fixed;
|
0%
|
||||||
top: 0;
|
opacity: 0
|
||||||
left: 0;
|
transform: translateY(10px)
|
||||||
width: 100%;
|
100%
|
||||||
height: 100%;
|
opacity: 1
|
||||||
min-width: 100%;
|
transform: translateY(0)
|
||||||
z-index: 9999;
|
|
||||||
margin: 0;
|
|
||||||
animation: code_full_page 1s;
|
|
||||||
|
|
||||||
.code_body
|
@keyframes donate_effcet
|
||||||
overflow: hidden
|
0%
|
||||||
|
opacity: 0
|
||||||
@keyframes code_full_page{
|
transform: translateY(-20px)
|
||||||
0%{transform:scale(0)}
|
100%
|
||||||
50%{transform:scale(1)}
|
opacity: 1
|
||||||
80%{transform:scale(.98)}
|
transform: translateY(0)
|
||||||
100%{transform:scale(1)}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes menu_open{
|
|
||||||
0% {
|
|
||||||
transform: scale(0)
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes menu_close{
|
|
||||||
0% {
|
|
||||||
transform: scale(1)
|
|
||||||
display: block
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(0)
|
|
||||||
display: none
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,11 +7,15 @@ $theme-meta-color = #858585
|
|||||||
$theme-link-color = #99a9bf
|
$theme-link-color = #99a9bf
|
||||||
$theme-hr-color = #A4D8FA
|
$theme-hr-color = #A4D8FA
|
||||||
$theme-read-mode-bg-color = #FAF9DE
|
$theme-read-mode-bg-color = #FAF9DE
|
||||||
|
$inline-code-color = #F47466
|
||||||
$font-family= Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
$font-family= Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||||
$code-font = consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number
|
$code-font = consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number
|
||||||
|
$site-name-font = "Titillium Web", Lato,PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||||
//hr icon
|
//hr icon
|
||||||
$hr-icon = '\f0c4'
|
$hr-icon = '\f0c4'
|
||||||
$hr-icon-top = -10px
|
$hr-icon-top = -10px
|
||||||
|
$title-prefix-icon = '\f0c1'
|
||||||
|
$title-prefix-icon-color = #F47466
|
||||||
|
|
||||||
if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
||||||
$theme-color = convert(hexo-config("theme_color.main")) || #49B1F5
|
$theme-color = convert(hexo-config("theme_color.main")) || #49B1F5
|
||||||
@@ -22,15 +26,24 @@ if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
|||||||
$theme-meta-color = convert(hexo-config("theme_color.meta_color")) || #858585
|
$theme-meta-color = convert(hexo-config("theme_color.meta_color")) || #858585
|
||||||
$theme-hr-color = convert(hexo-config("theme_color.hr_color")) || #A4D8FA
|
$theme-hr-color = convert(hexo-config("theme_color.hr_color")) || #A4D8FA
|
||||||
$theme-read-mode-bg-color = convert(hexo-config("theme_color.read-mode-bg_color")) || #FAF9DE
|
$theme-read-mode-bg-color = convert(hexo-config("theme_color.read-mode-bg_color")) || #FAF9DE
|
||||||
|
$inline-code-color = convert(hexo-config("theme_color.inline-code-color")) || #F47466
|
||||||
|
|
||||||
if hexo-config("font") && hexo-config("font.enable")
|
if hexo-config("font") && hexo-config("font.enable")
|
||||||
$font-family = convert(hexo-config("font.font-family")) || 'Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif'
|
$font-family = convert(hexo-config("font.font-family")) || 'Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif'
|
||||||
$code-font = convert(hexo-config("font.code-font")) || 'consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number'
|
$code-font = convert(hexo-config("font.code-font")) || 'consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number'
|
||||||
|
|
||||||
|
if hexo-config("blog_title_font.font-family")
|
||||||
|
$site-name-font = convert(hexo-config("blog_title_font.font-family")) || '"Titillium Web",Lato,PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif'
|
||||||
|
|
||||||
|
|
||||||
if hexo-config("hr") && hexo-config("hr.enable")
|
if hexo-config("hr") && hexo-config("hr.enable")
|
||||||
$hr-icon = hexo-config("hr.icon") || '\f0c4'
|
$hr-icon = hexo-config("hr.icon") || '\f0c4'
|
||||||
$hr-icon-top = convert(hexo-config("hr.icon-top")) || -10px
|
$hr-icon-top = convert(hexo-config("hr.icon-top")) || -10px
|
||||||
|
|
||||||
|
if hexo-config("post_beautify.enable")
|
||||||
|
$title-prefix-icon = hexo-config("post_beautify.title-prefix-icon") || '\f0c1'
|
||||||
|
$title-prefix-icon-color= convert(hexo-config("post_beautify.title-prefix-icon-color")) || #F47466
|
||||||
|
|
||||||
|
|
||||||
// Global Variables
|
// Global Variables
|
||||||
$font-size = 14px
|
$font-size = 14px
|
||||||
@@ -38,6 +51,7 @@ $font-color = #1F2D3D
|
|||||||
$rem = 20px
|
$rem = 20px
|
||||||
$font-family = $font-family
|
$font-family = $font-family
|
||||||
$code-font = $code-font
|
$code-font = $code-font
|
||||||
|
$site-name-font = $site-name-font
|
||||||
$text-line-height = 2
|
$text-line-height = 2
|
||||||
$sm = 768px
|
$sm = 768px
|
||||||
$bg = 1024px
|
$bg = 1024px
|
||||||
@@ -48,6 +62,7 @@ $sidebar-icon-left = $sidebar-icon-top - 4px
|
|||||||
$sidebar-icon-size = 16px
|
$sidebar-icon-size = 16px
|
||||||
$go-up-bottom = $sidebar-icon-top
|
$go-up-bottom = $sidebar-icon-top
|
||||||
$go-up-right = -($sidebar-icon-left)
|
$go-up-right = -($sidebar-icon-left)
|
||||||
|
$web-bg = convert(hexo-config("background"))
|
||||||
// Global color & SVG
|
// Global color & SVG
|
||||||
$pale-blue = $theme-hr-color
|
$pale-blue = $theme-hr-color
|
||||||
$light-blue = $theme-color
|
$light-blue = $theme-color
|
||||||
@@ -74,6 +89,7 @@ $light-grey = #EEEEEE
|
|||||||
$grey = $theme-meta-color
|
$grey = $theme-meta-color
|
||||||
$pale-yellow = $theme-read-mode-bg-color
|
$pale-yellow = $theme-read-mode-bg-color
|
||||||
$white = #FFFFFF
|
$white = #FFFFFF
|
||||||
|
$whitesmoke = #f5f5f5;
|
||||||
$dark-white = #F9F9F9
|
$dark-white = #F9F9F9
|
||||||
$font-black = #4C4948
|
$font-black = #4C4948
|
||||||
$selection = $theme-text-selection-color
|
$selection = $theme-text-selection-color
|
||||||
@@ -81,7 +97,7 @@ $selection = $theme-text-selection-color
|
|||||||
// code
|
// code
|
||||||
$code-font-size = $font-size
|
$code-font-size = $font-size
|
||||||
$code-font-family = $font-family
|
$code-font-family = $font-family
|
||||||
$code-foreground = $font-color
|
$code-foreground = $inline-code-color
|
||||||
$code-background = rgba(27, 31, 35, 0.05)
|
$code-background = rgba(27, 31, 35, 0.05)
|
||||||
$line-height-code-block = 20px
|
$line-height-code-block = 20px
|
||||||
$blockquote-color = #6a737d
|
$blockquote-color = #6a737d
|
||||||
@@ -98,4 +114,73 @@ $img-border-padding = 4px
|
|||||||
$sidebar-width = 300px
|
$sidebar-width = 300px
|
||||||
$sidebar-background = #f6f8fa
|
$sidebar-background = #f6f8fa
|
||||||
|
|
||||||
|
// Note colors
|
||||||
|
// --------------------------------------------------
|
||||||
|
hexo-config('note.light_bg_offset') is a 'unit' ? ($lbg = unit(hexo-config('note.light_bg_offset'),"%")) : ($lbg = 0);
|
||||||
|
|
||||||
|
// Default
|
||||||
|
$note-default-border = #777;
|
||||||
|
$note-default-bg = lighten(spin($note-default-border, 0), 94% + $lbg);
|
||||||
|
$note-default-text = $note-default-border;
|
||||||
|
$note-default-icon = "\f0a9";
|
||||||
|
|
||||||
|
$note-modern-default-border = #e1e1e1;
|
||||||
|
$note-modern-default-bg = lighten(spin($note-modern-default-border, 10), 60% + ($lbg * 4));
|
||||||
|
$note-modern-default-text = #666;
|
||||||
|
$note-modern-default-hover = darken(spin($note-modern-default-text, -10), 32%);
|
||||||
|
|
||||||
|
// Primary
|
||||||
|
$note-primary-border = #6f42c1;
|
||||||
|
$note-primary-bg = lighten(spin($note-primary-border, 10), 92% + $lbg);
|
||||||
|
$note-primary-text = $note-primary-border;
|
||||||
|
$note-primary-icon = "\f055";
|
||||||
|
|
||||||
|
$note-modern-primary-border = #e1c2ff;
|
||||||
|
$note-modern-primary-bg = lighten(spin($note-modern-primary-border, 10), 40% + ($lbg * 4));
|
||||||
|
$note-modern-primary-text = #6f42c1;
|
||||||
|
$note-modern-primary-hover = darken(spin($note-modern-primary-text, -10), 22%);
|
||||||
|
|
||||||
|
// Info
|
||||||
|
$note-info-border = #428bca;
|
||||||
|
$note-info-bg = lighten(spin($note-info-border, -10), 91% + $lbg);
|
||||||
|
$note-info-text = $note-info-border;
|
||||||
|
$note-info-icon = "\f05a";
|
||||||
|
|
||||||
|
$note-modern-info-border = #b3e5ef;
|
||||||
|
$note-modern-info-bg = lighten(spin($note-modern-info-border, 10), 50% + ($lbg * 4));
|
||||||
|
$note-modern-info-text = #31708f;
|
||||||
|
$note-modern-info-hover = darken(spin($note-modern-info-text, -10), 32%);
|
||||||
|
|
||||||
|
// Success
|
||||||
|
$note-success-border = #5cb85c;
|
||||||
|
$note-success-bg = lighten(spin($note-success-border, 10), 90% + $lbg);
|
||||||
|
$note-success-text = $note-success-border;
|
||||||
|
$note-success-icon = "\f058";
|
||||||
|
|
||||||
|
$note-modern-success-border = #d0e6be;
|
||||||
|
$note-modern-success-bg = lighten(spin($note-modern-success-border, 10), 40% + ($lbg * 4));
|
||||||
|
$note-modern-success-text = #3c763d;
|
||||||
|
$note-modern-success-hover = darken(spin($note-modern-success-text, -10), 27%);
|
||||||
|
|
||||||
|
// Warning
|
||||||
|
$note-warning-border = #f0ad4e;
|
||||||
|
$note-warning-bg = lighten(spin($note-warning-border, 10), 88% + $lbg);
|
||||||
|
$note-warning-text = $note-warning-border;
|
||||||
|
$note-warning-icon = "\f06a";
|
||||||
|
|
||||||
|
$note-modern-warning-border = #fae4cd;
|
||||||
|
$note-modern-warning-bg = lighten(spin($note-modern-warning-border, 10), 43% + ($lbg * 4));
|
||||||
|
$note-modern-warning-text = #8a6d3b;
|
||||||
|
$note-modern-warning-hover = darken(spin($note-modern-warning-text, -10), 18%);
|
||||||
|
|
||||||
|
// Danger
|
||||||
|
$note-danger-border = #d9534f;
|
||||||
|
$note-danger-bg = lighten(spin($note-danger-border, -10), 92% + $lbg);
|
||||||
|
$note-danger-text = $note-danger-border;
|
||||||
|
$note-danger-icon = "\f056";
|
||||||
|
|
||||||
|
$note-modern-danger-border = #ebcdd2;
|
||||||
|
$note-modern-danger-bg = lighten(spin($note-modern-danger-border, 10), 35% + ($lbg * 4));
|
||||||
|
$note-modern-danger-text = #a94442;
|
||||||
|
$note-modern-danger-hover = darken(spin($note-modern-danger-text, -10), 22%);
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ $(function () {
|
|||||||
$('body').animate({
|
$('body').animate({
|
||||||
paddingLeft: 300
|
paddingLeft: 300
|
||||||
}, 200)
|
}, 200)
|
||||||
$('#sidebar').animate({}, function () {
|
|
||||||
$('#sidebar').css({
|
$('#sidebar').animate({
|
||||||
'transform': 'translateX(300px)'
|
left: 0
|
||||||
}, 200)
|
}, 200)
|
||||||
})
|
|
||||||
$('#toggle-sidebar').animate({}, function () {
|
$('#toggle-sidebar').animate({}, function () {
|
||||||
$('#toggle-sidebar').css({
|
$('#toggle-sidebar').css({
|
||||||
'transform': 'rotateZ(180deg)',
|
'transform': 'rotateZ(180deg)',
|
||||||
@@ -45,11 +45,9 @@ $(function () {
|
|||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
}, 200)
|
}, 200)
|
||||||
|
|
||||||
$('#sidebar').animate({}, function () {
|
$('#sidebar').animate({
|
||||||
$('#sidebar').css({
|
left: -300
|
||||||
'transform': 'translateX(0px)'
|
}, 200)
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
$('#toggle-sidebar').animate({}, function () {
|
$('#toggle-sidebar').animate({}, function () {
|
||||||
$('#toggle-sidebar').css({
|
$('#toggle-sidebar').css({
|
||||||
@@ -63,11 +61,11 @@ $(function () {
|
|||||||
$('body').animate({
|
$('body').animate({
|
||||||
paddingLeft: 300
|
paddingLeft: 300
|
||||||
}, 200)
|
}, 200)
|
||||||
$('#sidebar').animate({}, function () {
|
|
||||||
$('#sidebar').css({
|
$('#sidebar').animate({
|
||||||
'transform': 'translateX(300px)'
|
left: 0
|
||||||
})
|
}, 200)
|
||||||
})
|
|
||||||
$('#toggle-sidebar').animate({}, function () {
|
$('#toggle-sidebar').animate({}, function () {
|
||||||
$('#toggle-sidebar').css({
|
$('#toggle-sidebar').css({
|
||||||
'transform': 'rotateZ(180deg)',
|
'transform': 'rotateZ(180deg)',
|
||||||
@@ -82,7 +80,8 @@ $(function () {
|
|||||||
// 首页fullpage添加
|
// 首页fullpage添加
|
||||||
// 添加class
|
// 添加class
|
||||||
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {} else {
|
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {} else {
|
||||||
$('.full_page').css('background-attachment', 'fixed')
|
$('.full_page .nav_bg').css('background-attachment', 'fixed');
|
||||||
|
$('#to_comment').css("display", "block")
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------
|
||||||
@@ -94,37 +93,6 @@ $(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------
|
|
||||||
// tags 隨機大小 顔色
|
|
||||||
var list = document.querySelectorAll(".tag-cloud .tag-cloud-tags a");
|
|
||||||
|
|
||||||
if ($(window).width() > 768) {
|
|
||||||
Array.prototype.forEach.call(list, (item, index) => {
|
|
||||||
item.style.fontSize = Math.floor(Math.random() * 20 + 15) + "px"; //15 ~ 35
|
|
||||||
item.style.color =
|
|
||||||
"rgb(" +
|
|
||||||
Math.floor(Math.random() * 201) +
|
|
||||||
", " +
|
|
||||||
Math.floor(Math.random() * 201) +
|
|
||||||
", " +
|
|
||||||
Math.floor(Math.random() * 201) +
|
|
||||||
")"; // 0,0,0 -> 200,200,200
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Array.prototype.forEach.call(list, (item, index) => {
|
|
||||||
item.style.fontSize = Math.floor(Math.random() * 13 + 15) + "px"; //15 ~ 28
|
|
||||||
item.style.color =
|
|
||||||
"rgb(" +
|
|
||||||
Math.floor(Math.random() * 201) +
|
|
||||||
", " +
|
|
||||||
Math.floor(Math.random() * 201) +
|
|
||||||
", " +
|
|
||||||
Math.floor(Math.random() * 201) +
|
|
||||||
")"; // 0,0,0 -> 200,200,200
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------
|
||||||
// bookmark
|
// bookmark
|
||||||
$.fancyConfirm = function (opts) {
|
$.fancyConfirm = function (opts) {
|
||||||
@@ -182,10 +150,10 @@ $(function () {
|
|||||||
//-------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------
|
||||||
//代码copy
|
//代码copy
|
||||||
// Add copy icon
|
// Add copy icon
|
||||||
|
$('figure.highlight').wrap('<div class="code-area-wrap"></div>')
|
||||||
|
|
||||||
var highlight_copy = GLOBAL_CONFIG.highlight_copy
|
var highlight_copy = GLOBAL_CONFIG.highlight_copy
|
||||||
if (highlight_copy == 'true') {
|
if (highlight_copy == 'true') {
|
||||||
$('figure.highlight').wrap('<div class="code-area-wrap"></div>')
|
|
||||||
var $copyIcon = $('<i class="fa fa-clipboard" aria-hidden="true"></i>')
|
var $copyIcon = $('<i class="fa fa-clipboard" aria-hidden="true"></i>')
|
||||||
var $notice = $('<div class="copy-notice"></div>')
|
var $notice = $('<div class="copy-notice"></div>')
|
||||||
$('.code-area-wrap').prepend($copyIcon)
|
$('.code-area-wrap').prepend($copyIcon)
|
||||||
@@ -240,27 +208,71 @@ $(function () {
|
|||||||
selection.removeAllRanges()
|
selection.removeAllRanges()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//代碼框語言識別
|
||||||
|
var highlight_lang = GLOBAL_CONFIG.highlight_lang
|
||||||
|
if (highlight_lang == 'true') {
|
||||||
|
var $highlight_lang = $('<div class="code_lang"></div>')
|
||||||
|
$('figure').before($highlight_lang)
|
||||||
|
var lang_name_index
|
||||||
|
var lang_name
|
||||||
|
$('figure').each(function () {
|
||||||
|
lang_name_index = lang_name = $(this).attr('class').split(' ')[1];
|
||||||
|
if (lang_name_index == 'js')
|
||||||
|
lang_name = 'javascript'
|
||||||
|
if (lang_name_index == 'md')
|
||||||
|
lang_name = 'markdown'
|
||||||
|
if (lang_name_index == 'plain')
|
||||||
|
lang_name = 'code'
|
||||||
|
if (lang_name_index == 'py')
|
||||||
|
lang_name = 'python'
|
||||||
|
|
||||||
|
$(this).siblings(".code_lang").text(lang_name)
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//代碼收縮
|
||||||
|
var highlight_shrink = GLOBAL_CONFIG.highlight_shrink
|
||||||
|
if (highlight_shrink == 'true') {
|
||||||
|
var $code_expand = $('<i class="fa fa-angle-down code-expand code-closed" aria-hidden="true"></i>')
|
||||||
|
} else {
|
||||||
|
var $code_expand = $('<i class="fa fa-angle-down code-expand" aria-hidden="true"></i>')
|
||||||
|
}
|
||||||
|
$('.code-area-wrap').prepend($code_expand)
|
||||||
|
$('.code-area-wrap .code-expand').on('click', function () {
|
||||||
|
if ($(this).hasClass('code-closed')) {
|
||||||
|
$(this).siblings('figure').find('table').show();
|
||||||
|
$(this).removeClass('code-closed');
|
||||||
|
} else {
|
||||||
|
$(this).siblings('figure').find('table').hide();
|
||||||
|
$(this).addClass('code-closed');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------
|
||||||
//fancybox
|
//fancybox
|
||||||
var imgList = $(".recent-post-info img");
|
var imgList = $(".recent-post-info img").not('.no-fancybox');
|
||||||
if (imgList.length === 0) {
|
if (imgList.length === 0) {
|
||||||
imgList = $("#post-content img");
|
imgList = $("#post-content img").not('.no-fancybox');
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < imgList.length; i++) {
|
for (var i = 0; i < imgList.length; i++) {
|
||||||
|
var lazyload_src = imgList[i].src ? imgList[i].src : imgList.eq(i).attr("data-src")
|
||||||
|
|
||||||
var $a = $(
|
var $a = $(
|
||||||
'<a href="' +
|
'<a href="' +
|
||||||
imgList[i].src +
|
lazyload_src +
|
||||||
'" data-fancybox="group" data-caption="' +
|
'" data-fancybox="group" data-caption="' +
|
||||||
imgList[i].alt +
|
imgList[i].alt +
|
||||||
'" class="fancybox"></a>'
|
'" class="fancybox"></a>'
|
||||||
);
|
)
|
||||||
var alt = imgList[i].alt;
|
|
||||||
var $wrap = $(imgList[i]).wrap($a);
|
|
||||||
if (alt) {
|
|
||||||
$wrap.after('<div class="img-alt">' + alt + "</div>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var alt = imgList[i].alt
|
||||||
|
var $wrap = $(imgList[i]).wrap($a)
|
||||||
|
if (alt) {
|
||||||
|
$wrap.after('<div class="img-alt">' + alt + '</div>')
|
||||||
|
}
|
||||||
|
}
|
||||||
$().fancybox({
|
$().fancybox({
|
||||||
selector: "[data-fancybox]",
|
selector: "[data-fancybox]",
|
||||||
loop: true,
|
loop: true,
|
||||||
@@ -292,97 +304,55 @@ $(function () {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------
|
|
||||||
//lazy懶加載
|
|
||||||
//把img的src删除,添加data-src,用于lozad.js
|
|
||||||
var $img = $("#post img");
|
|
||||||
$img.addClass("lozad");
|
|
||||||
$img.each(function () {
|
|
||||||
var src_link = $(this).attr("src");
|
|
||||||
$(this).attr("data-src", src_link);
|
|
||||||
$(this).removeAttr("src");
|
|
||||||
})
|
|
||||||
|
|
||||||
const observer = lozad(); // lazy loads elements with default selector as '.lozad'
|
|
||||||
observer.observe();
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------
|
||||||
/** head点击*/
|
/** head点击*/
|
||||||
$('.toggle-menu').on('click', function () {
|
$('.toggle-menu').on('click', function () {
|
||||||
|
|
||||||
if ($(".toggle-menu").hasClass("open")) {
|
if ($(".toggle-menu").hasClass("open")) {
|
||||||
$(".toggle-menu").removeClass("open").addClass("close");
|
$(".toggle-menu").removeClass("open").addClass("close");
|
||||||
$("#page-header #site-name,#page-header .search").css({'color':'#3b3a3a','text-shadow': 'none'})
|
|
||||||
$(".toggle-menu *").css({ 'background-color': '#3b3a3a', 'text-shadow': 'none' });
|
|
||||||
$('body').addClass("is_hidden");
|
$('body').addClass("is_hidden");
|
||||||
$('.menus').addClass("menu_open");
|
$('.menus').animate({
|
||||||
} else {
|
right: 0
|
||||||
$(".toggle-menu").removeClass("close").addClass("open");
|
|
||||||
$("#page-header #site-name,#page-header .search").css({ 'color': '', 'text-shadow': '' });
|
|
||||||
$(".toggle-menu *").css({ 'background-color': '', 'text-shadow': '' });
|
|
||||||
$('body').removeClass("is_hidden");
|
|
||||||
$('.menus').removeClass("menu_open").addClass('menu_close');
|
|
||||||
setTimeout(function () {
|
|
||||||
$('.menus').removeClass("menu_close")
|
|
||||||
|
|
||||||
}, 300)
|
}, 300)
|
||||||
|
$('.menu_mask,.menus').css("display", "block")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const fixScroll = (scrollEl) => {
|
$('.menu_mask ').on('click touchstart', function () {
|
||||||
let startY
|
$(".toggle-menu").removeClass("close").addClass("open");
|
||||||
scrollEl.addEventListener('touchstart', function (event) {
|
$('body').removeClass("is_hidden");
|
||||||
// 如果多於1根手指點擊屏幕,則不處理
|
$('.menus').animate({
|
||||||
if (event.targetTouches.length > 1) {
|
right: -250
|
||||||
return
|
}, 300, function () {
|
||||||
}
|
{
|
||||||
// 儲存手指的初始位置
|
$('.menus').css({
|
||||||
startY = event.targetTouches[0].clientY
|
'display': ''
|
||||||
}, false)
|
|
||||||
scrollEl.addEventListener('touchmove', function (event) {
|
|
||||||
if (event.targetTouches.length > 1) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 判斷手指滑動方向, y大於0時向下滑動, 小於0時向上滑動
|
|
||||||
const y = event.targetTouches[0].clientY - startY
|
|
||||||
// 如果到頂時繼續向下拉
|
|
||||||
if (scrollEl.scrollTop <= 0 && y > 0) {
|
|
||||||
// 重置滾動距離為最小值
|
|
||||||
scrollEl.scrollTop = 0
|
|
||||||
// 阻止滾動
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
// 如果到底時繼續上滑
|
|
||||||
const maxScrollTop = scrollEl.scrollHeight - scrollEl.clientHeight
|
|
||||||
if (maxScrollTop - scrollEl.scrollTop <= 0 && y < 0) {
|
|
||||||
scrollEl.scrollTop = maxScrollTop
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
passive: false
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const scrollEl = document.querySelector(".menus");
|
})
|
||||||
fixScroll(scrollEl)
|
$('.menu_mask').css("display", "")
|
||||||
|
})
|
||||||
|
|
||||||
$(window).on('resize', function (e) {
|
$(window).on('resize', function (e) {
|
||||||
if (!$('.toggle-menu').is(':visible')) {
|
if (!$('.toggle-menu').is(':visible')) {
|
||||||
if ($(".toggle-menu").hasClass("close")) {
|
if ($(".toggle-menu").hasClass("close")) {
|
||||||
$(".toggle-menu").removeClass("close").addClass("open");
|
$(".toggle-menu").removeClass("close").addClass("open");
|
||||||
$("#page-header #site-name,#page-header .search").css({ 'color': '', 'text-shadow': '' });
|
|
||||||
$(".toggle-menu *").css({ 'background-color': '', 'text-shadow': '' });
|
|
||||||
$('body').removeClass("is_hidden");
|
$('body').removeClass("is_hidden");
|
||||||
$('.menus').removeClass("menu_open");
|
$('.menus').animate({
|
||||||
|
right: -250
|
||||||
|
}, 300)
|
||||||
|
$('.menu_mask').css("display", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------
|
||||||
/** scroll 滚动 toc*/
|
/** scroll 滚动 toc*/
|
||||||
var initTop = 0
|
var initTop = 0
|
||||||
$('.toc-child').hide()
|
$('.toc-child').hide()
|
||||||
|
|
||||||
|
var is_post_bottom = ($('#post_bottom').hasClass('no_comment_show')) && ($('#post_bottom').hasClass('no_toc_show'))
|
||||||
|
|
||||||
// main of scroll
|
// main of scroll
|
||||||
$(window).scroll(throttle(function (event) {
|
$(window).scroll(throttle(function (event) {
|
||||||
var currentTop = $(this).scrollTop()
|
var currentTop = $(this).scrollTop()
|
||||||
@@ -391,6 +361,8 @@ $(function () {
|
|||||||
scrollPercent(currentTop)
|
scrollPercent(currentTop)
|
||||||
// head position
|
// head position
|
||||||
findHeadPosition(currentTop)
|
findHeadPosition(currentTop)
|
||||||
|
auto_scroll_toc(currentTop)
|
||||||
|
|
||||||
}
|
}
|
||||||
var isUp = scrollDirection(currentTop)
|
var isUp = scrollDirection(currentTop)
|
||||||
|
|
||||||
@@ -399,8 +371,18 @@ $(function () {
|
|||||||
|
|
||||||
if (isUp) {
|
if (isUp) {
|
||||||
$('#page-header').hasClass('visible') ? $('#page-header').removeClass('visible') : console.log()
|
$('#page-header').hasClass('visible') ? $('#page-header').removeClass('visible') : console.log()
|
||||||
|
if (!is_post_bottom) {
|
||||||
|
$('#post_bottom').removeClass('toc_mobile_show')
|
||||||
|
$('#toc_mobile').hasClass('is_visible') ? $('#toc_mobile').removeClass('is_visible') : console.log()
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#page-header').hasClass('visible') ? console.log() : $('#page-header').addClass('visible')
|
$('#page-header').hasClass('visible') ? console.log() : $('#page-header').addClass('visible')
|
||||||
|
if (!is_post_bottom) {
|
||||||
|
$('#post_bottom').addClass('toc_mobile_show')
|
||||||
|
$('#toc_mobile').hasClass('is_visible') ? $('#toc_mobile').removeClass('is_visible') : console.log()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$('#page-header').addClass('fixed')
|
$('#page-header').addClass('fixed')
|
||||||
if ($('#go-up').css('opacity') === '0') {
|
if ($('#go-up').css('opacity') === '0') {
|
||||||
@@ -426,6 +408,10 @@ $(function () {
|
|||||||
} else {
|
} else {
|
||||||
if (currentTop === 0) {
|
if (currentTop === 0) {
|
||||||
$('#page-header').removeClass('fixed').removeClass('visible')
|
$('#page-header').removeClass('fixed').removeClass('visible')
|
||||||
|
if (!is_post_bottom) {
|
||||||
|
$('#post_bottom').removeClass('toc_mobile_show')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#go-up').animate({}, function () {
|
$('#go-up').animate({}, function () {
|
||||||
@@ -441,8 +427,21 @@ $(function () {
|
|||||||
'transform': 'translateX(0)'
|
'transform': 'translateX(0)'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_post_bottom) {
|
||||||
|
if ($(window).width() <= 768 && $('#post_bottom').hasClass('toc_mobile_show')) {
|
||||||
|
$('#rightside').css('bottom', '110px')
|
||||||
|
$('#go-up').css('bottom', '70px')
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('#rightside').css('bottom', '60px')
|
||||||
|
$('#go-up').css('bottom', '20px')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}, 50, 100))
|
}, 50, 100))
|
||||||
|
|
||||||
// go up smooth scroll
|
// go up smooth scroll
|
||||||
@@ -451,9 +450,9 @@ $(function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// head scroll
|
// head scroll
|
||||||
$('#post-content').find('h1,h2,h3,h4,h5,h6').on('click', function (e) {
|
// $('#post-content').find('h1,h2,h3,h4,h5,h6').on('click', function (e) {
|
||||||
scrollToHead('#' + $(this).attr('id'))
|
// scrollToHead('#' + $(this).attr('id'))
|
||||||
})
|
// })
|
||||||
|
|
||||||
// head scroll
|
// head scroll
|
||||||
$('.toc-link').on('click', function (e) {
|
$('.toc-link').on('click', function (e) {
|
||||||
@@ -546,41 +545,79 @@ $(function () {
|
|||||||
// Hide their respective list of subsections
|
// Hide their respective list of subsections
|
||||||
.find('.toc-child').hide()
|
.find('.toc-child').hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//代碼框雙擊全屏
|
function auto_scroll_toc(currentTop) {
|
||||||
$('figure').on('dblclick', function (e) {
|
if ($('.toc-link').hasClass('active')) {
|
||||||
if (e.target !== this)
|
var active_position = $(".active").offset().top;
|
||||||
return;
|
var sidebar_scrolltop = $("#sidebar").scrollTop();
|
||||||
$(this).toggleClass('code_full_page');
|
if (active_position > (currentTop + $(window).height() - 50)) {
|
||||||
$('body').toggleClass('code_body');
|
$("#sidebar").scrollTop(sidebar_scrolltop + 100);
|
||||||
});
|
} else if (active_position < currentTop + 50) {
|
||||||
|
$("#sidebar").scrollTop(sidebar_scrolltop - 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//閲讀模式
|
//閲讀模式
|
||||||
$("#readmode").click(function () {
|
$("#readmode").click(function () {
|
||||||
|
|
||||||
if (Cookies.get("night-mode") == "night") {
|
if (Cookies.get("night-mode") == "night") {
|
||||||
$('body').toggleClass('night-mode');
|
$('body').toggleClass('night-mode');
|
||||||
$('body').toggleClass('read-mode');
|
$('body').toggleClass('read-mode');
|
||||||
$('#font_plus,#font_minus').toggleClass('is_visible');
|
$('#font_plus,#font_minus,#to_comment').toggleClass('is_visible');
|
||||||
|
$('#to_comment').toggleClass('is_invisible');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('body').toggleClass('read-mode');
|
$('body').toggleClass('read-mode');
|
||||||
$('#font_plus,#font_minus').toggleClass('is_visible');
|
$('#font_plus,#font_minus,#to_comment').toggleClass('is_visible');
|
||||||
|
$('#to_comment').toggleClass('is_invisible');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//閲讀模式下字體調整
|
//閲讀模式下字體調整
|
||||||
$("#font_plus").click(function () {
|
$("#font_plus").click(function () {
|
||||||
var font_size_record = parseFloat($('body').css('font-size'))
|
var font_size_record = parseFloat($('body').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('pre').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('code').css('font-size'))
|
||||||
$('body').css('font-size', font_size_record + 1)
|
$('body').css('font-size', font_size_record + 1)
|
||||||
|
$('pre').css('font-size', font_size_record + 1)
|
||||||
|
$('code').css('font-size', font_size_record + 1)
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#font_minus").click(function () {
|
$("#font_minus").click(function () {
|
||||||
var font_size_record = parseFloat($('body').css('font-size'))
|
var font_size_record = parseFloat($('body').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('pre').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('code').css('font-size'))
|
||||||
$('body').css('font-size', font_size_record - 1)
|
$('body').css('font-size', font_size_record - 1)
|
||||||
|
$('pre').css('font-size', font_size_record - 1)
|
||||||
|
$('code').css('font-size', font_size_record - 1)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 手機顯示toc
|
||||||
|
$('#mobile_toc').on('click', function () {
|
||||||
|
$("#toc_mobile").toggleClass('is_visible')
|
||||||
|
})
|
||||||
|
|
||||||
|
// sub-menus 位置調整
|
||||||
|
if ( $(window).width() > 768 ) {
|
||||||
|
$('.menus_item_child').each(function () {
|
||||||
|
var a_width= $(this).siblings('a').outerWidth(true);
|
||||||
|
var child_width = $(this).outerWidth(true);
|
||||||
|
$(this).css("margin-left", -(child_width/ 2 - a_width/ 2))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 手機端sub-menu 展開/收縮
|
||||||
|
$('.menus-expand').on('click', function () {
|
||||||
|
if ($(this).hasClass('menus-closed')) {
|
||||||
|
$(this).parents('.menus_item').find('.menus_item_child').show();
|
||||||
|
$(this).removeClass('menus-closed');
|
||||||
|
} else {
|
||||||
|
$(this).parents('.menus_item').find('.menus_item_child').hide();
|
||||||
|
$(this).addClass('menus-closed');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -11,6 +11,10 @@ $(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeReadModel() {
|
function changeReadModel() {
|
||||||
|
|
||||||
|
if (Cookies.get("night-mode") == null)
|
||||||
|
return
|
||||||
|
|
||||||
if (Cookies.get("night-mode") == "night") {
|
if (Cookies.get("night-mode") == "night") {
|
||||||
$("body").addClass("night-mode");
|
$("body").addClass("night-mode");
|
||||||
$("#nightshift").removeClass("fa-moon-o").addClass("fa-sun-o");
|
$("#nightshift").removeClass("fa-moon-o").addClass("fa-sun-o");
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $(function () {
|
|||||||
$('.search-dialog').css({
|
$('.search-dialog').css({
|
||||||
'display': 'block',
|
'display': 'block',
|
||||||
'animation': 'titlescale 0.5s'
|
'animation': 'titlescale 0.5s'
|
||||||
})
|
}),300
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.ais-search-box--input').focus()
|
$('.ais-search-box--input').focus()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $(function () {
|
|||||||
$('.search-dialog').css({
|
$('.search-dialog').css({
|
||||||
'display': 'block',
|
'display': 'block',
|
||||||
'animation': 'titlescale 0.5s'
|
'animation': 'titlescale 0.5s'
|
||||||
})
|
}),300
|
||||||
})
|
})
|
||||||
$('#local-search-input input').focus()
|
$('#local-search-input input').focus()
|
||||||
|
|
||||||
|
|||||||
11
source/js/third-party/canvas-nest.js
vendored
Normal file
11
source/js/third-party/canvas-nest.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
!function(){
|
||||||
|
var userAgentInfo = navigator.userAgent;
|
||||||
|
var Agents = ["iPad", "iPhone", "Android",
|
||||||
|
"SymbianOS", "Windows Phone",
|
||||||
|
"iPod", "webOS", "BlackBerry", "IEMobile"];
|
||||||
|
for (var v = 0; v < Agents.length; v++) {
|
||||||
|
if (userAgentInfo.indexOf(Agents[v]) > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function o(w,v,i){return w.getAttribute(v)||i}function j(i){return document.getElementsByTagName(i)}function l(){var i=j("script"),w=i.length,v=i[w-1];return{l:w,z:o(v,"zIndex",-1),o:o(v,"opacity",0.5),c:o(v,"color","0,0,0"),n:o(v,"count",99)}}function k(){r=u.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=u.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function b(){e.clearRect(0,0,r,n);var w=[f].concat(t);var x,v,A,B,z,y;t.forEach(function(i){i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>r||i.x<0?-1:1,i.ya*=i.y>n||i.y<0?-1:1,e.fillRect(i.x-0.5,i.y-0.5,1,1);for(v=0;v<w.length;v++){x=w[v];if(i!==x&&null!==x.x&&null!==x.y){B=i.x-x.x,z=i.y-x.y,y=B*B+z*z;y<x.max&&(x===f&&y>=x.max/2&&(i.x-=0.03*B,i.y-=0.03*z),A=(x.max-y)/x.max,e.beginPath(),e.lineWidth=A/2,e.strokeStyle="rgba("+s.c+","+(A+0.2)+")",e.moveTo(i.x,i.y),e.lineTo(x.x,x.y),e.stroke())}}w.splice(w.indexOf(i),1)}),m(b)}var u=document.createElement("canvas"),s=l(),c="c_n"+s.l,e=u.getContext("2d"),r,n,m=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(i){window.setTimeout(i,1000/45)},a=Math.random,f={x:null,y:null,max:20000};u.id=c;u.style.cssText="position:fixed;top:0;left:0;z-index:"+s.z+";opacity:"+s.o;j("body")[0].appendChild(u);k(),window.onresize=k;window.onmousemove=function(i){i=i||window.event,f.x=i.clientX,f.y=i.clientY},window.onmouseout=function(){f.x=null,f.y=null};for(var t=[],p=0;s.n>p;p++){var h=a()*r,g=a()*n,q=2*a()-1,d=2*a()-1;t.push({x:h,y:g,xa:q,ya:d,max:6000})}setTimeout(function(){b()},100)}();
|
||||||
Reference in New Issue
Block a user