mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
Compare commits
25 Commits
11
README.md
11
README.md
@@ -1,5 +1,11 @@
|
|||||||
# hexo-theme-butterfly
|
# hexo-theme-butterfly
|
||||||
|
|
||||||
|
<a href="https://github.com/jerryc127/hexo-theme-butterfly/releases"><img alt="Version" src="https://img.shields.io/badge/release-2.0.0-blue"/></a>
|
||||||
|
<a href="https://jerryc.me"><img alt="Author" src="https://img.shields.io/badge/author-JerryC-blur"/></a>
|
||||||
|
<a href="https://hexo.io"><img alt="Hexo" src="https://img.shields.io/badge/hexo-3.0+-0e83c"/></a>
|
||||||
|
<a href="https://nodejs.org/"><img alt="node.js" src="https://img.shields.io/badge/node.js-6.0-blur"/></a>
|
||||||
|
|
||||||
|
|
||||||
[预览](https://jerryc.me/)
|
[预览](https://jerryc.me/)
|
||||||
|
|
||||||
一款基于[hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody)修改的主题
|
一款基于[hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody)修改的主题
|
||||||
@@ -25,12 +31,11 @@ git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/Bu
|
|||||||
theme: Butterfly
|
theme: Butterfly
|
||||||
```
|
```
|
||||||
|
|
||||||
>如果你没有pug以及stylus的渲染器,请下载安装: npm install hexo-renderer-jade hexo-renderer-stylus --save or yarn add hexo-renderer-jade hexo-renderer-stylus
|
>如果你没有pug以及stylus的渲染器,请下载安装: npm install hexo-renderer-pug hexo-renderer-stylus --save or yarn add hexo-renderer-pug hexo-renderer-stylus
|
||||||
|
|
||||||
## 文档
|
## 文档
|
||||||
|
|
||||||
可查看或[这里](https://docs.jerryc.me/)或[这里](https://jerryc.me/posts/21cfbf15)
|
可查看[这里](https://jerryc.me/posts/21cfbf15)
|
||||||
|
|
||||||
|
|
||||||
## 截图
|
## 截图
|
||||||

|

|
||||||
|
|||||||
508
_config.yml
508
_config.yml
@@ -1,28 +1,19 @@
|
|||||||
# Theme color for customize
|
|
||||||
# Notice: color value must in double quotes like "#000" or may cause error!
|
|
||||||
# ---------------
|
|
||||||
# theme_color:
|
|
||||||
# enable: true
|
|
||||||
# main: "#7A7FF1"
|
|
||||||
# paginator: "#7A7FF1"
|
|
||||||
# button_hover: "#FF7242"
|
|
||||||
# text_selection: "#69c46d"
|
|
||||||
# link_color: "#858585"
|
|
||||||
# hr_color: "#A4D8FA"
|
|
||||||
# read-mode-bg_color: '#FAF9DE'
|
|
||||||
|
|
||||||
# Main menu navigation
|
# Main menu navigation
|
||||||
# format: xxx: /xxx/||icon
|
|
||||||
# ---------------
|
# ---------------
|
||||||
|
# format: xxx: 連結 || icon
|
||||||
|
# sub-menu
|
||||||
|
# xxx || icon:
|
||||||
|
# xxx || 連結 || icon
|
||||||
menu:
|
menu:
|
||||||
Home: /||fa fa-home
|
Home: / || fa fa-home
|
||||||
Archives: /archives/||fa fa-archive
|
Archives: /archives/ || fa fa-archive
|
||||||
Tags: /tags/||fa fa-tags
|
Tags: /tags/ || fa fa-tags
|
||||||
Categories: /categories/||fa fa-folder-open
|
Categories: /categories/ || fa fa-folder-open
|
||||||
Link: /link/||fa fa-link
|
Link: /link/ || fa fa-link
|
||||||
About: /about/||fa fa-heart
|
About: /about/ || fa fa-heart
|
||||||
# #XXX: /xxx
|
List||fa fa-list:
|
||||||
|
- Music || /music/ || fa fa-music
|
||||||
|
- Movie || /movies/ || fa fa-film
|
||||||
|
|
||||||
# Favicon
|
# Favicon
|
||||||
# ---------------
|
# ---------------
|
||||||
@@ -39,24 +30,33 @@ favicon: /img/favicon.ico
|
|||||||
# favicon_32_32: /img/pwa/32.png
|
# favicon_32_32: /img/pwa/32.png
|
||||||
# favicon_16_16: /img/pwa/16.png
|
# favicon_16_16: /img/pwa/16.png
|
||||||
# mask_icon: /img/pwa/safari-pinned-tab.svg
|
# mask_icon: /img/pwa/safari-pinned-tab.svg
|
||||||
# shortcut_icon: /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
|
# copy setting
|
||||||
# formal:
|
# 是否禁止複製(如果禁止,highlight_copy的功能將無效)
|
||||||
|
# copyright 複製的内容後面加上版權信息
|
||||||
|
copy:
|
||||||
|
enable: true # true 開啓 / false 禁止
|
||||||
|
copyright: false
|
||||||
|
|
||||||
|
# social settings
|
||||||
|
# formal:
|
||||||
# icon: link
|
# icon: link
|
||||||
# ---------------
|
# ---------------
|
||||||
social:
|
social:
|
||||||
fa fa-github: https://github.com/jerryc127
|
fa fa-github: https://github.com/jerryc127
|
||||||
|
fa fa-envelope: mailto:xxxxxxxx@gmail.com
|
||||||
fa fa-rss: /atom.xml
|
fa fa-rss: /atom.xml
|
||||||
|
|
||||||
|
#### search ####
|
||||||
# Algolia search
|
# Algolia search
|
||||||
# ---------------
|
# ---------------
|
||||||
algolia_search:
|
algolia_search:
|
||||||
@@ -69,7 +69,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/#本地搜索
|
||||||
# ---------------
|
# ---------------
|
||||||
@@ -84,64 +83,36 @@ local_search:
|
|||||||
# ---------------
|
# ---------------
|
||||||
mathjax:
|
mathjax:
|
||||||
enable: false
|
enable: false
|
||||||
cdn: https://cdn.jsdelivr.net/npm/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML
|
|
||||||
|
|
||||||
# KaTeX
|
# KaTeX
|
||||||
# ---------------
|
# ---------------
|
||||||
katex:
|
katex:
|
||||||
enable: false
|
enable: false
|
||||||
cdn:
|
|
||||||
css: https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css
|
|
||||||
hide_scrollbar: true
|
hide_scrollbar: true
|
||||||
|
|
||||||
|
#### Analysis ####
|
||||||
|
|
||||||
# Analysis
|
|
||||||
# ---------------
|
# ---------------
|
||||||
# baidu_analytics:
|
# baidu_analytics:
|
||||||
|
|
||||||
#Google Analytics
|
#Google Analytics
|
||||||
google_analytics:
|
google_analytics:
|
||||||
|
|
||||||
|
|
||||||
# stylesheets loaded in the <head>
|
|
||||||
# ---------------
|
|
||||||
stylesheets:
|
|
||||||
- /css/index.css
|
|
||||||
|
|
||||||
# scripts loaded in the end of the body
|
|
||||||
# ---------------
|
|
||||||
scripts:
|
|
||||||
- /js/utils.js
|
|
||||||
- /js/main.js
|
|
||||||
|
|
||||||
# cdn for third-party library
|
|
||||||
# ---------------
|
|
||||||
cdn:
|
|
||||||
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
|
|
||||||
googlefont: https://fonts.googleapis.com/css?family=Titillium+Web
|
|
||||||
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css
|
|
||||||
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
|
|
||||||
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
|
||||||
# ---------------
|
# ---------------
|
||||||
# avatar: /img/avatar.png
|
# avatar: /img/avatar.png
|
||||||
avatar: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/avatar.png
|
avatar: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/avatar.png
|
||||||
|
|
||||||
# the banner image of index
|
# the banner image of index
|
||||||
# if the banner of another page not setting,it will show the top_img
|
|
||||||
top_img: https://i.loli.net/2019/05/22/5ce53eb6dc82757840.jpg
|
top_img: https://i.loli.net/2019/05/22/5ce53eb6dc82757840.jpg
|
||||||
|
# 以下鏈接是動態壁紙,每次刷新會更換
|
||||||
|
# https://source.unsplash.com/collection/collectionid/1600x900
|
||||||
|
# https://uploadbeta.com/api/pictures/random/?key=BingEverydayWallpaperPicture
|
||||||
|
# https://api.dujin.org/bing/1920.php
|
||||||
|
# https://api.dujin.org/bing/1366.php
|
||||||
|
|
||||||
#the banner image of post
|
# if the banner of page not setting,it will show the top_img
|
||||||
# if the post not set the post cover and post top image, it will show it
|
default_top_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/top_img_index.jpg
|
||||||
post_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/post.png
|
|
||||||
|
|
||||||
# the default cover of the post
|
# the default cover of the post
|
||||||
default_cover: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png
|
default_cover: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg.png
|
||||||
@@ -149,12 +120,20 @@ default_cover: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/cover/default_bg
|
|||||||
# the banner image of archive page
|
# the banner image of archive page
|
||||||
archive_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/archive.jpg
|
archive_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/archive.jpg
|
||||||
|
|
||||||
|
# the banner image of tag page
|
||||||
|
tag_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/tag-bg.png
|
||||||
|
|
||||||
|
# the banner image of category page
|
||||||
|
category_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/category-bg
|
||||||
|
|
||||||
|
# 如果你有使用hexo-douban去生成movie界面,可配置這個
|
||||||
|
movies_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/Photo/movie.jpg
|
||||||
|
|
||||||
# if the photo link cannot connect,it will show that
|
# if the photo link cannot connect,it will show that
|
||||||
lodding_bg:
|
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 +156,13 @@ 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,30 +183,24 @@ addtoany:
|
|||||||
- email
|
- email
|
||||||
- copy_link
|
- copy_link
|
||||||
|
|
||||||
# Comments System
|
#### Comments System ####
|
||||||
# ---------------
|
# ------------------------------------
|
||||||
disqus:
|
disqus:
|
||||||
enable: false
|
enable: false
|
||||||
shortname:
|
shortname:
|
||||||
|
|
||||||
# laibili:
|
|
||||||
# enable: false
|
|
||||||
# uid:
|
|
||||||
|
|
||||||
# gitment
|
# laibili:
|
||||||
# enable: false
|
# enable: false
|
||||||
# owner:
|
# uid:
|
||||||
# repo:
|
|
||||||
# client_id:
|
|
||||||
# client_secret:
|
|
||||||
|
|
||||||
# gitalk:
|
# gitalk:
|
||||||
# enable: false
|
# enable: false
|
||||||
# client_id:
|
# client_id:
|
||||||
# client_secret:
|
# client_secret:
|
||||||
# repo:
|
# repo:
|
||||||
# owner:
|
# owner:
|
||||||
# admin:
|
# admin:
|
||||||
|
# language: # en , zh-CN , zh-TW
|
||||||
#### Using this js for redirect to gitalk container after login
|
#### Using this js for redirect to gitalk container after login
|
||||||
#### See https://github.com/gitalk/gitalk/issues/125
|
#### See https://github.com/gitalk/gitalk/issues/125
|
||||||
# js: https://cdn.jsdelivr.net/gh/upupming/gitalk@36368e5dffd049e956cdbbd751ff96c28d8255cf/dist/gitalk.min.js
|
# js: https://cdn.jsdelivr.net/gh/upupming/gitalk@36368e5dffd049e956cdbbd751ff96c28d8255cf/dist/gitalk.min.js
|
||||||
@@ -235,18 +208,19 @@ disqus:
|
|||||||
# valine comment system. https://valine.js.org
|
# valine comment system. https://valine.js.org
|
||||||
valine:
|
valine:
|
||||||
enable: false # if you want use valine,please set this value is true
|
enable: false # if you want use valine,please set this value is true
|
||||||
appId: # leancloud application app id
|
appId: # leancloud application app id
|
||||||
appKey: # leancloud application app key
|
appKey: # leancloud application app key
|
||||||
notify: false # valine mail notify (true/false) https://github.com/xCss/Valine/wiki
|
notify: false # valine mail notify (true/false) https://github.com/xCss/Valine/wiki
|
||||||
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 info
|
||||||
|
bg: /img/comment_bg.png # valine background
|
||||||
|
|
||||||
# Footer Settings
|
##### Footer Settings ####
|
||||||
# ---------------
|
# ------------------------------------
|
||||||
since: 2018
|
since: 2018
|
||||||
|
|
||||||
footer_custom_text:
|
footer_custom_text:
|
||||||
@@ -256,18 +230,11 @@ footer_copyright:
|
|||||||
|
|
||||||
ICP:
|
ICP:
|
||||||
enable: false
|
enable: false
|
||||||
url:
|
url:
|
||||||
text:
|
text:
|
||||||
|
icon: /img/icp.png
|
||||||
|
|
||||||
# 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:
|
||||||
@@ -284,6 +251,7 @@ 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資料
|
||||||
@@ -293,25 +261,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:
|
||||||
@@ -322,11 +272,54 @@ 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
|
#### 美化/效果 ####
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
# Theme color for customize
|
||||||
|
# Notice: color value must in double quotes like "#000" or may cause error!
|
||||||
|
# ---------------
|
||||||
|
# theme_color:
|
||||||
|
# enable: true
|
||||||
|
# main: "#49B1F5"
|
||||||
|
# paginator: "#00c4b6"
|
||||||
|
# button_hover: "#FF7242"
|
||||||
|
# text_selection: "#00c4b6"
|
||||||
|
# link_color: "#99a9bf"
|
||||||
|
# meta_color: '#858585'
|
||||||
|
# hr_color: "#A4D8FA"
|
||||||
|
# read-mode-bg_color: '#FAF9DE'
|
||||||
|
# inline-code-color: '#F47466'
|
||||||
|
|
||||||
|
# 主頁設置
|
||||||
|
# 默認top_img全屏,site_info在中間
|
||||||
|
# 使用默認, 都無需填寫(建議默認)
|
||||||
|
index_site_info_top: #主頁標題距離頂部距離 例如 300px/300em/300rem/10%
|
||||||
|
index_top_img_height: #主頁top_img高度 例如 300px/300em/300rem 不能使用百分比
|
||||||
|
|
||||||
|
# category和tag頁的UI設置
|
||||||
|
# index 值代表 UI將與首頁的UI一樣
|
||||||
|
# 默認跟archives頁面UI一樣
|
||||||
|
category_ui: # 留空或index
|
||||||
|
tag_ui: # 留空或index
|
||||||
|
|
||||||
|
# 設置網站背景
|
||||||
|
# 可設置圖片 或者 顔色
|
||||||
|
# 圖片格式 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
|
||||||
@@ -334,46 +327,110 @@ canvas_ribbon:
|
|||||||
alpha: 0.6
|
alpha: 0.6
|
||||||
zIndex: -1
|
zIndex: -1
|
||||||
click_to_change: false
|
click_to_change: false
|
||||||
|
mobile: false # false 手機端不顯示 true 手機端顯示
|
||||||
|
|
||||||
|
# 動態彩帶
|
||||||
canvas_ribbon_piao:
|
canvas_ribbon_piao:
|
||||||
enable: true
|
enable: false
|
||||||
|
mobile: false # false 手機端不顯示 true 手機端顯示
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
mobile: false # false 手機端不顯示 true 手機端顯示
|
||||||
|
|
||||||
# 避免重複網址分散seo
|
# 打字效果
|
||||||
canonical: true
|
activate_power_mode:
|
||||||
|
enable: false
|
||||||
|
|
||||||
# 禁止百度轉碼
|
# 鼠標點擊效果
|
||||||
disable_baidu_transformation: true
|
# 避免卡頓,建議只開啓一個
|
||||||
|
# 點擊烟火特效
|
||||||
|
fireworks:
|
||||||
|
enable: false
|
||||||
|
|
||||||
twitter_meta: true
|
# 點擊出現愛心
|
||||||
Open_Graph_meta: true
|
click_heart:
|
||||||
|
enable: false
|
||||||
|
|
||||||
#閲讀模式
|
# 點擊出現文字,文字可自行修改
|
||||||
readmode:
|
ClickShowText:
|
||||||
enable: true
|
enable: false
|
||||||
|
text:
|
||||||
|
- 富强
|
||||||
|
- 民主
|
||||||
|
- 文明
|
||||||
|
- 和谐
|
||||||
|
- 自由
|
||||||
|
- 平等
|
||||||
|
- 公正
|
||||||
|
- 法治
|
||||||
|
- 爱国
|
||||||
|
- 敬业
|
||||||
|
- 诚信
|
||||||
|
- 友善
|
||||||
|
fontSize: 15px
|
||||||
|
|
||||||
|
# 頭像會一直轉圈
|
||||||
|
avatar_effect: false
|
||||||
|
|
||||||
|
# 網站顯示模式
|
||||||
|
# light 默認模式
|
||||||
|
# dark 黑暗模式(不建議)
|
||||||
|
display_mode: light
|
||||||
|
|
||||||
|
# 美化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, 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 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 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: 今日事,今日畢
|
# source調用第三方服務
|
||||||
sub2: Never put off till tomorrow what you can do today
|
# source: false 關閉調用
|
||||||
|
# source: 1 調用金山詞霸的每日一句(簡體)
|
||||||
|
# source: 2 調用一言网的一句話(簡體) #https://hitokoto.cn/
|
||||||
|
# source: 3 調用一句网(簡體) http://yijuzhan.com/
|
||||||
|
# source: 4 調用今日詩詞(簡體) https://www.jinrishici.com/
|
||||||
|
# subtitle 會先顯示 source , 再顯示 sub 的内容
|
||||||
|
source: false
|
||||||
|
# (如果有英文逗號' , ',請使用轉義字符 ,)
|
||||||
|
sub:
|
||||||
|
- 今日事,今日畢
|
||||||
|
- 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
|
||||||
@@ -382,28 +439,187 @@ 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: "简"
|
||||||
|
|
||||||
|
#閲讀模式
|
||||||
|
readmode:
|
||||||
|
enable: true
|
||||||
|
|
||||||
# 鼠標點擊效果
|
# 夜間模式
|
||||||
fireworks:
|
darkmode:
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
# 自動切換 dark mode和 light mode
|
||||||
|
# autoChangeMode: 1 跟隨系統而變化,不支持的瀏覽器/系統將按照時間晚上6點到早上6點之間切換為 dark mode
|
||||||
|
# autoChangeMode: 2 只按照時間晚上6點到早上6點之間切換為 dark mode
|
||||||
|
# autoChangeMode: false 取消自動切換
|
||||||
|
autoChangeMode: false
|
||||||
|
|
||||||
|
#### other ####
|
||||||
|
#------------------------------------------------
|
||||||
|
|
||||||
|
# 圖片大圖查看模式
|
||||||
|
# 默認為 fancybox http://fancyapps.com/fancybox/3/
|
||||||
|
# 可以選擇改爲 medium_zoom https://github.com/francoischalifour/medium-zoom
|
||||||
|
medium_zoom:
|
||||||
enable: false
|
enable: false
|
||||||
|
|
||||||
|
# Snackbar 彈窗
|
||||||
|
# https://github.com/polonel/SnackBar
|
||||||
|
# position 彈窗位置
|
||||||
|
# 可選 top-left / top-center / top-right / bottom-left / bottom-center / bottom-right
|
||||||
|
snackbar:
|
||||||
|
enable: false
|
||||||
|
position: bottom-left
|
||||||
|
bg_light: '#49b1f5' #light mode時彈窗背景
|
||||||
|
bg_dark: '#2d3035' #dark mode時彈窗背景
|
||||||
|
|
||||||
#百度推送
|
#百度推送
|
||||||
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: flat
|
||||||
|
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
|
||||||
|
|
||||||
|
# 圖片懶加載
|
||||||
|
# https://github.com/aFarkas/lazysizes
|
||||||
|
lazyload:
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
# 避免重複網址分散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
|
||||||
|
|
||||||
|
|
||||||
|
# CDN
|
||||||
|
# 網站必須
|
||||||
|
# 可根據需要自行添加js/css
|
||||||
|
CDN_USE:
|
||||||
|
css:
|
||||||
|
- /css/index.css
|
||||||
|
- https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css
|
||||||
|
# - https://use.fontawesome.com/releases/v5.8.1/css/all.css #fontawesomeV5_css
|
||||||
|
|
||||||
|
js:
|
||||||
|
- https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js #/js/third-party/jquery.min.js
|
||||||
|
- /js/utils.js
|
||||||
|
- /js/main.js
|
||||||
|
|
||||||
|
|
||||||
|
# CDN
|
||||||
|
# 非必要不要修改
|
||||||
|
CDN:
|
||||||
|
#comments
|
||||||
|
blueimp-md5: https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js
|
||||||
|
gitalk: https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js
|
||||||
|
gitalk_css: https://cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.css
|
||||||
|
valine: https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js
|
||||||
|
|
||||||
|
# share
|
||||||
|
addtoany: https://static.addtoany.com/menu/page.js
|
||||||
|
sharejs: https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js
|
||||||
|
sharejs_css: https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css
|
||||||
|
|
||||||
|
#search
|
||||||
|
algolia_search: https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js
|
||||||
|
algolia_search_css: https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css
|
||||||
|
algolia_js: /js/search/algolia.js
|
||||||
|
local_search: /js/search/local-search.js
|
||||||
|
|
||||||
|
mathjax: https://cdn.jsdelivr.net/npm/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML
|
||||||
|
katex: https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css
|
||||||
|
katex_copytex: https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js
|
||||||
|
katex_copytex_css: https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css
|
||||||
|
|
||||||
|
#不蒜子計數器
|
||||||
|
busuanzi: //busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js
|
||||||
|
|
||||||
|
# 背景特效
|
||||||
|
canvas_ribbon: /js/third-party/canvas-ribbon.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/canvas-ribbon.js
|
||||||
|
canvas_ribbon_piao: /js/third-party/piao.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/piao.js
|
||||||
|
canvas_nest: /js/third-party/canvas-nest.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/canvas-nest.js
|
||||||
|
|
||||||
|
lazyload: https://cdn.jsdelivr.net/npm/lazysizes@latest/lazysizes.min.js
|
||||||
|
instantpage: https://cdn.jsdelivr.net/npm/instant.page@latest/instantpage.min.js
|
||||||
|
|
||||||
|
typed: https://cdn.jsdelivr.net/npm/typed.js
|
||||||
|
js_cookies: https://cdn.jsdelivr.net/npm/js-cookie/dist/js.cookie.min.js
|
||||||
|
|
||||||
|
fancybox_css: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css
|
||||||
|
fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js #/js/third-party/jquery.fancybox.min.js
|
||||||
|
medium_zoom: https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js
|
||||||
|
|
||||||
|
snackbar_css: https://cdn.jsdelivr.net/npm/node-snackbar@0.1.15/dist/snackbar.min.css
|
||||||
|
snackbar: https://cdn.jsdelivr.net/npm/node-snackbar@0.1.15/dist/snackbar.min.js
|
||||||
|
|
||||||
|
#鼠标点击特效
|
||||||
|
anime: https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js #/js/third-party/anime.min.js
|
||||||
|
activate_power_mode: /js/third-party/activate-power-mode.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/activate-power-mode.js
|
||||||
|
fireworks: /js/third-party/fireworks.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/fireworks.js
|
||||||
|
click_heart: /js/third-party/click_heart.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/click_heart.js
|
||||||
|
ClickShowText: /js/third-party/ClickShowText.js # https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@latest/js/ClickShowText.js
|
||||||
|
|
||||||
|
translate: /js/tw_cn.js
|
||||||
|
runtimeshow: js/runtimeshow.js
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
no_title: No title
|
no_title: No title
|
||||||
archives: Archives
|
archives: Archives
|
||||||
read_more: Read more
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: Created
|
created: Created
|
||||||
@@ -51,7 +50,6 @@ pagination:
|
|||||||
next: Next Post
|
next: Next Post
|
||||||
|
|
||||||
comment: Comment
|
comment: Comment
|
||||||
relatedPosts_headline: Recommend
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: Articles
|
articles: Articles
|
||||||
@@ -75,8 +73,7 @@ share: Share
|
|||||||
|
|
||||||
bookmark:
|
bookmark:
|
||||||
title: Bookmark
|
title: Bookmark
|
||||||
message_prev: Press
|
|
||||||
message_next: to bookmark this page
|
|
||||||
|
|
||||||
rightside:
|
rightside:
|
||||||
readmode_title: Read Mode
|
readmode_title: Read Mode
|
||||||
@@ -84,5 +81,24 @@ rightside:
|
|||||||
font_minus_title: Decrease font size
|
font_minus_title: Decrease font size
|
||||||
translate_title: Traditional Chinese and Simplified Chinese Conversion
|
translate_title: Traditional Chinese and Simplified Chinese Conversion
|
||||||
night_mode_title: Dark Mode
|
night_mode_title: Dark Mode
|
||||||
|
back_to_top: Back to top
|
||||||
|
toc: Table of Contents
|
||||||
|
scroll_to_comment: Scroll to comment
|
||||||
|
setting: Setting
|
||||||
|
|
||||||
runtime_unit: days
|
runtime_unit: days
|
||||||
|
|
||||||
|
copy_copyright:
|
||||||
|
author: Author
|
||||||
|
link: Link
|
||||||
|
source: Source
|
||||||
|
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
||||||
|
|
||||||
|
Snackbar:
|
||||||
|
bookmark:
|
||||||
|
message_prev: Press
|
||||||
|
message_next: to bookmark this page
|
||||||
|
chs_to_cht: Traditional Chinese Activated Manually
|
||||||
|
cht_to_chs: Simplified Chinese Activated Manually
|
||||||
|
day_to_night: Light Mode Activated Manually
|
||||||
|
night_to_day: Dark Mode Activated Manually
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
no_title: No title
|
no_title: No title
|
||||||
archives: Archives
|
archives: Archives
|
||||||
read_more: Read more
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: Created
|
created: Created
|
||||||
@@ -51,7 +50,6 @@ pagination:
|
|||||||
next: Next Post
|
next: Next Post
|
||||||
|
|
||||||
comment: Comment
|
comment: Comment
|
||||||
relatedPosts_headline: Recommend
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: Articles
|
articles: Articles
|
||||||
@@ -74,8 +72,6 @@ donate: Donate
|
|||||||
share: Share
|
share: Share
|
||||||
bookmark:
|
bookmark:
|
||||||
title: Bookmark
|
title: Bookmark
|
||||||
message_prev: Press
|
|
||||||
message_next: to bookmark this page
|
|
||||||
|
|
||||||
rightside:
|
rightside:
|
||||||
readmode_title: Read Mode
|
readmode_title: Read Mode
|
||||||
@@ -83,5 +79,24 @@ rightside:
|
|||||||
font_minus_title: Decrease font size
|
font_minus_title: Decrease font size
|
||||||
translate_title: Traditional Chinese and Simplified Chinese Conversion
|
translate_title: Traditional Chinese and Simplified Chinese Conversion
|
||||||
night_mode_title: Dark Mode
|
night_mode_title: Dark Mode
|
||||||
|
back_to_top: Back to top
|
||||||
|
toc: Table of Contents
|
||||||
|
scroll_to_comment: Scroll to comment
|
||||||
|
setting: Setting
|
||||||
|
|
||||||
runtime_unit: days
|
runtime_unit: days
|
||||||
|
|
||||||
|
copy_copyright:
|
||||||
|
author: Author
|
||||||
|
link: Link
|
||||||
|
source: Source
|
||||||
|
info: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
||||||
|
|
||||||
|
Snackbar:
|
||||||
|
bookmark:
|
||||||
|
message_prev: Press
|
||||||
|
message_next: to bookmark this page
|
||||||
|
chs_to_cht: Traditional Chinese Activated Manually
|
||||||
|
cht_to_chs: Simplified Chinese Activated Manually
|
||||||
|
day_to_night: Light Mode Activated Manually
|
||||||
|
night_to_day: Dark Mode Activated Manually
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: 置顶
|
sticky: 置顶
|
||||||
no_title: 无题
|
no_title: 无题
|
||||||
archives: 时间轴
|
archives: 时间轴
|
||||||
read_more: 阅读更多
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: 发表于
|
created: 发表于
|
||||||
@@ -52,7 +51,6 @@ pagination:
|
|||||||
next: 下一篇
|
next: 下一篇
|
||||||
|
|
||||||
comment: 评论
|
comment: 评论
|
||||||
relatedPosts_headline: 相关推荐
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: 文章
|
articles: 文章
|
||||||
@@ -75,8 +73,7 @@ donate: 打赏
|
|||||||
share: 分享
|
share: 分享
|
||||||
bookmark:
|
bookmark:
|
||||||
title: 添加书签
|
title: 添加书签
|
||||||
message_prev: 按
|
|
||||||
message_next: 键将本页加入书签
|
|
||||||
|
|
||||||
rightside:
|
rightside:
|
||||||
readmode_title: 阅读模式
|
readmode_title: 阅读模式
|
||||||
@@ -84,5 +81,24 @@ rightside:
|
|||||||
font_minus_title: 缩小字体
|
font_minus_title: 缩小字体
|
||||||
translate_title: 简繁转换
|
translate_title: 简繁转换
|
||||||
night_mode_title: 夜间模式
|
night_mode_title: 夜间模式
|
||||||
|
back_to_top: 回到顶部
|
||||||
|
toc: 目录
|
||||||
|
scroll_to_comment: 直达评论
|
||||||
|
setting: 设置
|
||||||
|
|
||||||
runtime_unit: 天
|
runtime_unit: 天
|
||||||
|
|
||||||
|
copy_copyright:
|
||||||
|
author: 作者
|
||||||
|
link: 链接
|
||||||
|
source: 来源
|
||||||
|
info: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
|
||||||
|
|
||||||
|
Snackbar:
|
||||||
|
bookmark:
|
||||||
|
message_prev: 按
|
||||||
|
message_next: 键将本页加入书签
|
||||||
|
chs_to_cht: 你已切换为繁体
|
||||||
|
cht_to_chs: 你已切换为简体
|
||||||
|
day_to_night: 你已切换为深色模式
|
||||||
|
night_to_day: 你已切换为浅色模式
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ page:
|
|||||||
articles: 文章總覽
|
articles: 文章總覽
|
||||||
tag: 標籤
|
tag: 標籤
|
||||||
category: 分類
|
category: 分類
|
||||||
archives: 歸檔
|
archives: 時間軸
|
||||||
|
|
||||||
sticky: 置頂
|
sticky: 置頂
|
||||||
no_title: 無題
|
no_title: 無題
|
||||||
archives: 時間軸
|
archives: 時間軸
|
||||||
read_more: 閲讀更多
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: 發表於
|
created: 發表於
|
||||||
@@ -53,7 +52,6 @@ pagination:
|
|||||||
next: 下一篇
|
next: 下一篇
|
||||||
|
|
||||||
comment: 評論
|
comment: 評論
|
||||||
relatedPosts_headline: 相關推薦
|
|
||||||
|
|
||||||
aside:
|
aside:
|
||||||
articles: 文章
|
articles: 文章
|
||||||
@@ -76,8 +74,7 @@ donate: 打賞
|
|||||||
share: 分享
|
share: 分享
|
||||||
bookmark:
|
bookmark:
|
||||||
title: 添加書籤
|
title: 添加書籤
|
||||||
message_prev: 按
|
|
||||||
message_next: 鍵將本頁加入書籤
|
|
||||||
|
|
||||||
rightside:
|
rightside:
|
||||||
readmode_title: 閲讀模式
|
readmode_title: 閲讀模式
|
||||||
@@ -85,5 +82,26 @@ rightside:
|
|||||||
font_minus_title: 縮小字體
|
font_minus_title: 縮小字體
|
||||||
translate_title: 簡繁轉換
|
translate_title: 簡繁轉換
|
||||||
night_mode_title: 夜間模式
|
night_mode_title: 夜間模式
|
||||||
|
back_to_top: 回到頂部
|
||||||
|
toc: 目錄
|
||||||
|
scroll_to_comment: 直達評論
|
||||||
|
setting: 設置
|
||||||
|
|
||||||
|
runtime_unit: 天
|
||||||
|
|
||||||
|
copy_copyright:
|
||||||
|
author: 作者
|
||||||
|
link: 鏈接
|
||||||
|
source: 來源
|
||||||
|
info: 著作權歸作者所有。商業轉載請聯繫作者獲得授權,非商業轉載請註明出處。
|
||||||
|
|
||||||
|
Snackbar:
|
||||||
|
bookmark:
|
||||||
|
message_prev: 按
|
||||||
|
message_next: 鍵將本頁加入書籤
|
||||||
|
chs_to_cht: 你已切換為繁體
|
||||||
|
cht_to_chs: 你已切換為簡體
|
||||||
|
day_to_night: 你已切換為深色模式
|
||||||
|
night_to_day: 你已切換為淺色模式
|
||||||
|
|
||||||
|
|
||||||
runtime_unit: 天
|
|
||||||
@@ -8,4 +8,4 @@ block content
|
|||||||
+articleSort(page.posts)
|
+articleSort(page.posts)
|
||||||
include includes/pagination.pug
|
include includes/pagination.pug
|
||||||
#aside_content.aside_content
|
#aside_content.aside_content
|
||||||
include includes/aside.pug
|
include includes/aside.pug
|
||||||
|
|||||||
@@ -1,11 +1,19 @@
|
|||||||
extends includes/layout.pug
|
extends includes/layout.pug
|
||||||
|
|
||||||
block content
|
block content
|
||||||
include ./includes/mixins/article-sort.pug
|
if theme.category_ui == 'index'
|
||||||
#category
|
include ./includes/mixins/UI.pug
|
||||||
.article-sort-title= _p('page.category') + ' - ' + page.category
|
#recent-posts.recent-posts.category_ui
|
||||||
+articleSort(page.posts)
|
+UI_NEW(page.posts)
|
||||||
include includes/pagination.pug
|
include includes/pagination.pug
|
||||||
#aside_content.aside_content
|
#aside_content.aside_content
|
||||||
include includes/aside.pug
|
include includes/aside.pug
|
||||||
|
else
|
||||||
|
include ./includes/mixins/article-sort.pug
|
||||||
|
#category
|
||||||
|
.article-sort-title= _p('page.category') + ' - ' + page.category
|
||||||
|
+articleSort(page.posts)
|
||||||
|
include includes/pagination.pug
|
||||||
|
#aside_content.aside_content
|
||||||
|
include includes/aside.pug
|
||||||
|
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
.flink
|
.flink
|
||||||
each i in site.data.link
|
each i in site.data.link
|
||||||
p.comment-word= i.class_name
|
h1= i.class_name
|
||||||
.post-cards
|
.post-cards
|
||||||
ul.md-links
|
ul.md-links
|
||||||
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.lazyload(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
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
extends includes/layout.pug
|
|
||||||
|
|
||||||
block content
|
|
||||||
include includes/gallery/layout.pug
|
|
||||||
@@ -1,20 +1,25 @@
|
|||||||
|
if (theme.medium_zoom && theme.medium_zoom.enable)
|
||||||
|
script(src=url_for(theme.CDN.medium_zoom))
|
||||||
|
else
|
||||||
|
script(src=url_for(theme.CDN.fancybox))
|
||||||
|
|
||||||
if (theme.algolia_search.enable)
|
if (theme.algolia_search.enable)
|
||||||
script(async src=url_for('/js/search/algolia.js'))
|
script(async src=url_for(theme.CDN.algolia_js))
|
||||||
if (theme.mathjax && theme.mathjax.enable)
|
if (theme.mathjax && theme.mathjax.enable)
|
||||||
if(!is_tag() && !is_category() && !is_archive())
|
if(!is_tag() && !is_category() && !is_archive() && !is_home())
|
||||||
include ./third-party/mathjax.pug
|
include ./third-party/mathjax.pug
|
||||||
if (theme.katex && theme.katex.enable)
|
if (theme.katex && theme.katex.enable)
|
||||||
if(!is_tag() && !is_category() && !is_archive())
|
if(!is_tag() && !is_category() && !is_archive() && !is_home())
|
||||||
include ./third-party/katex.pug
|
include ./third-party/katex.pug
|
||||||
if (theme.local_search && theme.local_search.enable)
|
if (theme.local_search && theme.local_search.enable)
|
||||||
script(async src=url_for('/js/search/local-search.js'))
|
script(async src=url_for(theme.CDN.local_search))
|
||||||
|
|
||||||
if theme.fireworks && theme.fireworks.enable
|
if theme.fireworks && theme.fireworks.enable
|
||||||
script(src='https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js')
|
script(src=url_for(theme.CDN.anime))
|
||||||
script(src=url_for('/js/third-party/fireworks.js'))
|
script(src=url_for(theme.CDN.fireworks))
|
||||||
|
|
||||||
if theme.nightshift.enable
|
if (theme.snackbar && theme.snackbar.enable)
|
||||||
script(src=url_for('js/nightshift.js'))
|
script(src=url_for(theme.CDN.snackbar))
|
||||||
|
|
||||||
if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
|
if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
|
||||||
include ./third-party/canvas-ribbon.pug
|
include ./third-party/canvas-ribbon.pug
|
||||||
@@ -22,70 +27,39 @@ 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'))
|
||||||
|
|
||||||
if theme.activate_power_mode.enable
|
if theme.activate_power_mode.enable
|
||||||
script(src=url_for('js/activate-power-mode.js'))
|
script(src=url_for(theme.CDN.activate_power_mode))
|
||||||
script.
|
script.
|
||||||
POWERMODE.colorful = true; // make power mode colorful
|
POWERMODE.colorful = true; // make power mode colorful
|
||||||
POWERMODE.shake = true; // turn off shake
|
POWERMODE.shake = true; // turn off shake
|
||||||
document.body.addEventListener('input', POWERMODE);
|
document.body.addEventListener('input', POWERMODE);
|
||||||
|
|
||||||
if theme.translate && theme.translate.enable
|
if theme.translate && theme.translate.enable
|
||||||
script(src=url_for('/js/tw_cn.js'))
|
script(src=url_for(theme.CDN.translate))
|
||||||
script.
|
script.
|
||||||
translateInitilization()
|
translateInitilization()
|
||||||
|
|
||||||
|
if is_home()
|
||||||
if is_home() && theme.subtitle.enable
|
include index-js.pug
|
||||||
script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
|
|
||||||
script.
|
|
||||||
var typed = new Typed(".subtitle", {
|
|
||||||
strings: ['!{theme.subtitle.sub1}','!{theme.subtitle.sub2}'],
|
|
||||||
startDelay: 300,
|
|
||||||
typeSpeed: 100,
|
|
||||||
loop: true,
|
|
||||||
backSpeed: 50
|
|
||||||
});
|
|
||||||
|
|
||||||
if is_home()
|
|
||||||
script.
|
|
||||||
//首頁fullpage
|
|
||||||
function alignContent() {
|
|
||||||
for (var n = $(window).height(), e = document.querySelectorAll(".full_page"), i = 0; i < e.length; i++)
|
|
||||||
e[i].style.height = n + "px";
|
|
||||||
$("#site-info").each(function () {
|
|
||||||
var x = $(this).height();
|
|
||||||
$(this).css("top", (n-x)/2)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function recent_post_padding() {
|
|
||||||
$(".recent-post-info").each(function () {
|
|
||||||
var k = $(".recent-post-item").height();
|
|
||||||
var e = $(this).height();
|
|
||||||
$(this).css({"padding-top": (k-e)/2 , "padding-bottom": (k-e)/2 })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
alignContent();
|
|
||||||
|
|
||||||
//recent-post-item垂直置中
|
|
||||||
if ($(window).width() > 768) {
|
|
||||||
recent_post_padding();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(window).bind("resize", function () {
|
|
||||||
|
|
||||||
alignContent()
|
|
||||||
|
|
||||||
if ($(window).width() > 768) {
|
|
||||||
recent_post_padding();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
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=url_for(theme.CDN.busuanzi))
|
||||||
|
|
||||||
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")
|
if theme.instantpage.enable
|
||||||
|
script(src=url_for(theme.CDN.instantpage) type="module")
|
||||||
|
|
||||||
|
if theme.lazyload.enable
|
||||||
|
script(src=url_for(theme.CDN.lazyload) async="")
|
||||||
|
|
||||||
|
//- 鼠標特效
|
||||||
|
if theme.click_heart && theme.click_heart.enable
|
||||||
|
script(src=url_for(theme.CDN.click_heart))
|
||||||
|
|
||||||
|
if theme.ClickShowText && theme.ClickShowText.enable
|
||||||
|
script(src=url_for(theme.CDN.ClickShowText))
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ if theme.gitalk && theme.gitalk.enable
|
|||||||
owner: '!{theme.gitalk.owner}',
|
owner: '!{theme.gitalk.owner}',
|
||||||
admin: '!{theme.gitalk.admin}',
|
admin: '!{theme.gitalk.admin}',
|
||||||
id: md5(decodeURI(location.pathname)),
|
id: md5(decodeURI(location.pathname)),
|
||||||
language: '!{lang}'
|
language: '!{theme.gitalk.language}'
|
||||||
})
|
})
|
||||||
gitalk.render('gitalk-container')
|
gitalk.render('gitalk-container')
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
if theme.gitment && theme.gitment.enable
|
|
||||||
#gitment-container
|
|
||||||
script.
|
|
||||||
var gitment = new Gitment({
|
|
||||||
id: md5(decodeURI(location.pathname)),
|
|
||||||
owner: '!{theme.gitment.owner}',
|
|
||||||
repo: '!{theme.gitment.repo}',
|
|
||||||
oauth: {
|
|
||||||
client_id: '!{theme.gitment.client_id}',
|
|
||||||
client_secret: '!{theme.gitment.client_secret}'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
gitment.render('gitment-container')
|
|
||||||
@@ -1,40 +1,19 @@
|
|||||||
if theme.disqus.enable
|
- var d = theme.disqus && theme.disqus.enable
|
||||||
|
- var l = theme.laibili && theme.laibili.enable
|
||||||
|
- var gt = theme.gitalk && theme.gitalk.enable
|
||||||
|
- var v = theme.valine && theme.valine.enable
|
||||||
|
|
||||||
|
if d || l || gt || v
|
||||||
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')
|
if d
|
||||||
include ./disqus.pug
|
include ./disqus.pug
|
||||||
else if theme.laibili && theme.laibili.enable
|
else if l
|
||||||
hr
|
include ./laibili.pug
|
||||||
#post-comment
|
else if gt
|
||||||
.comment_headling
|
include ./gitalk.pug
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
else if v
|
||||||
=" "
|
include ./valine.pug
|
||||||
span= _p('comment')
|
|
||||||
include ./laibili.pug
|
|
||||||
else if theme.gitment && theme.gitment.enable
|
|
||||||
hr
|
|
||||||
#post-comment
|
|
||||||
.comment_headling
|
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
|
||||||
=" "
|
|
||||||
span= _p('comment')
|
|
||||||
include ./gitment.pug
|
|
||||||
else if theme.gitalk && theme.gitalk.enable
|
|
||||||
hr
|
|
||||||
#post-comment
|
|
||||||
.comment_headling
|
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
|
||||||
=" "
|
|
||||||
span= _p('comment')
|
|
||||||
include ./gitalk.pug
|
|
||||||
else if theme.valine && theme.valine.enable
|
|
||||||
hr
|
|
||||||
#post-comment
|
|
||||||
.comment_headling
|
|
||||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
|
||||||
=" "
|
|
||||||
span= _p('comment')
|
|
||||||
include ./valine.pug
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
if theme.valine && theme.valine.enable
|
if theme.valine && theme.valine.enable
|
||||||
#vcomment.vcomment
|
#vcomment.vcomment
|
||||||
script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
|
script(src=url_for(theme.CDN.valine))
|
||||||
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
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
}
|
}
|
||||||
var translate = 'undefined';
|
var translate = 'undefined';
|
||||||
if (theme.translate && theme.translate.enable){
|
if (theme.translate && theme.translate.enable){
|
||||||
var defaultEncoding;
|
|
||||||
translate = JSON.stringify({
|
translate = JSON.stringify({
|
||||||
defaultEncoding: theme.translate.defaultEncoding,
|
defaultEncoding: theme.translate.defaultEncoding,
|
||||||
translateDelay: theme.translate.translateDelay,
|
translateDelay: theme.translate.translateDelay,
|
||||||
@@ -38,9 +37,46 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var copyright = 'undefined' ;
|
||||||
|
if (theme.copy.enable && theme.copy.copyright){
|
||||||
|
copyright = JSON.stringify({
|
||||||
|
languages: {
|
||||||
|
author: _p("copy_copyright.author") + ': ' + config.author,
|
||||||
|
link: _p("copy_copyright.link") + ': ' + without_html,
|
||||||
|
source: _p("copy_copyright.source") + ': ' + config.title,
|
||||||
|
info: _p("copy_copyright.info")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var copy_copyright_js = theme.copy.enable && theme.copy.copyright;
|
||||||
|
|
||||||
|
var ClickShowText = 'undefined';
|
||||||
|
if (theme.ClickShowText && theme.ClickShowText.enable) {
|
||||||
|
ClickShowText = JSON.stringify({
|
||||||
|
text: theme.ClickShowText.text.join(","),
|
||||||
|
fontSize: theme.ClickShowText.fontSize
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var Snackbar = 'undefined';
|
||||||
|
if (theme.snackbar && theme.snackbar.enable) {
|
||||||
|
Snackbar = JSON.stringify({
|
||||||
|
bookmark: {
|
||||||
|
title: _p("Snackbar.bookmark.title"),
|
||||||
|
message_prev: _p("Snackbar.bookmark.message_prev"),
|
||||||
|
message_next: _p("Snackbar.bookmark.message_next")
|
||||||
|
},
|
||||||
|
chs_to_cht: _p("Snackbar.chs_to_cht"),
|
||||||
|
cht_to_chs: _p("Snackbar.cht_to_chs"),
|
||||||
|
day_to_night: _p("Snackbar.day_to_night"),
|
||||||
|
night_to_day: _p("Snackbar.night_to_day"),
|
||||||
|
bgLight: theme.snackbar.bg_light,
|
||||||
|
bgDark: theme.snackbar.bg_dark,
|
||||||
|
position: theme.snackbar.position,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
script.
|
script.
|
||||||
var GLOBAL_CONFIG = {
|
var GLOBAL_CONFIG = {
|
||||||
@@ -49,18 +85,24 @@ 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")}',
|
||||||
noSupport: '!{_p("copy.noSupport")}'
|
noSupport: '!{_p("copy.noSupport")}'
|
||||||
},
|
},
|
||||||
bookmark: {
|
bookmark: {
|
||||||
title: '!{_p("bookmark.title")}',
|
title: '!{_p("Snackbar.bookmark.title")}',
|
||||||
message_prev: '!{_p("bookmark.message_prev")}',
|
message_prev: '!{_p("Snackbar.bookmark.message_prev")}',
|
||||||
message_next: '!{_p("bookmark.message_next")}'
|
message_next: '!{_p("Snackbar.bookmark.message_next")}'
|
||||||
},
|
},
|
||||||
runtime_unit: '!{_p("runtime_unit")}'
|
runtime_unit: '!{_p("runtime_unit")}',
|
||||||
|
copyright: !{copyright},
|
||||||
|
copy_copyright_js: !{copy_copyright_js},
|
||||||
|
ClickShowText: !{ClickShowText},
|
||||||
|
medium_zoom: '!{theme.medium_zoom.enable}',
|
||||||
|
Snackbar: !{Snackbar}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
48
layout/includes/darkmode.pug
Normal file
48
layout/includes/darkmode.pug
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
script.
|
||||||
|
const autoChangeMode = '#{theme.autoChangeMode}'
|
||||||
|
var t = Cookies.get("theme");
|
||||||
|
if (autoChangeMode == '1'){
|
||||||
|
const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||||
|
const isLightMode = window.matchMedia("(prefers-color-scheme: light)").matches
|
||||||
|
const isNotSpecified = window.matchMedia("(prefers-color-scheme: no-preference)").matches
|
||||||
|
const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
|
||||||
|
|
||||||
|
if (t === undefined){
|
||||||
|
if (isLightMode) activateLightMode()
|
||||||
|
else if (isDarkMode) activateDarkMode()
|
||||||
|
else if (isNotSpecified || hasNoSupport){
|
||||||
|
console.log('You specified no preference for a color scheme or your browser does not support it. I Schedule dark mode during night time.')
|
||||||
|
now = new Date();
|
||||||
|
hour = now.getHours();
|
||||||
|
isNight = hour < 6 || hour >= 18
|
||||||
|
isNight ? activateDarkMode() : activateLightMode()
|
||||||
|
}
|
||||||
|
} else if (t == 'light') activateLightMode()
|
||||||
|
else activateDarkMode()
|
||||||
|
|
||||||
|
|
||||||
|
} else if (autoChangeMode == '2'){
|
||||||
|
now = new Date();
|
||||||
|
hour = now.getHours();
|
||||||
|
isNight = hour < 6 || hour >= 18
|
||||||
|
if(t === undefined) isNight? activateDarkMode() : activateLightMode()
|
||||||
|
else if (t === 'light') activateLightMode()
|
||||||
|
else activateDarkMode()
|
||||||
|
} else {
|
||||||
|
if ( t == 'dark' ) activateDarkMode()
|
||||||
|
else if ( t == 'light') activateLightMode()
|
||||||
|
}
|
||||||
|
|
||||||
|
function activateDarkMode(){
|
||||||
|
document.documentElement.setAttribute('data-theme', 'dark')
|
||||||
|
if (document.querySelector('meta[name="theme-color"]') !== null){
|
||||||
|
document.querySelector('meta[name="theme-color"]').setAttribute('content','#000')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function activateLightMode(){
|
||||||
|
document.documentElement.setAttribute('data-theme', 'light')
|
||||||
|
if (document.querySelector('meta[name="theme-color"]') !== null){
|
||||||
|
document.querySelector('meta[name="theme-color"]').setAttribute('content','#fff')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#footer.layout
|
#footer-wrap
|
||||||
- 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
|
||||||
@@ -19,4 +19,6 @@
|
|||||||
if theme.ICP.enable
|
if theme.ICP.enable
|
||||||
.icp
|
.icp
|
||||||
a(href=theme.ICP.url)
|
a(href=theme.ICP.url)
|
||||||
|
if theme.ICP.icon
|
||||||
|
img.icp-icon(src=url_for(theme.ICP.icon))
|
||||||
span=theme.ICP.text
|
span=theme.ICP.text
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
#gallery!= page.content
|
|
||||||
@@ -1,61 +1,25 @@
|
|||||||
|
if is_home()
|
||||||
|
- var top_img = theme.index_img || theme.default_top_img
|
||||||
|
else if is_archive()
|
||||||
|
- var top_img = theme.archive_img || theme.default_top_img
|
||||||
|
else if is_tag()
|
||||||
|
- var top_img = theme.tag_img || theme.default_top_img
|
||||||
|
else if is_category()
|
||||||
|
- var top_img = theme.category_img || theme.default_top_img
|
||||||
|
else if is_current('/movies/', [strict])
|
||||||
|
- var top_img = theme.movies_img || theme.default_top_img
|
||||||
|
else if !is_post()
|
||||||
|
- var top_img = page.top_img || theme.default_top_img
|
||||||
|
|
||||||
- var without_index = url.replace('index.html', '')
|
- var without_index = url.replace('index.html', '')
|
||||||
- var without_html = without_index.replace('.html', '')
|
- var without_html = without_index.replace('.html', '')
|
||||||
- var photo_check = page.cover || theme.avatar
|
- var photo_check = is_post() ? page.cover || theme.avatar : theme.avatar
|
||||||
- var photo_link = url_check (photo_check) ? photo_check : config.url + photo_check
|
- var photo_link = url_check (photo_check) ? photo_check : config.url + photo_check
|
||||||
|
|
||||||
meta(http-equiv="x-dns-prefetch-control" content="on")
|
//- 預解析
|
||||||
if theme.canonical
|
link(rel="preconnect" href="//cdn.jsdelivr.net")
|
||||||
link(rel="canonical" href=without_html)
|
|
||||||
|
|
||||||
if theme.twitter_meta
|
|
||||||
meta(name="twitter:card" content="summary_large_image")
|
|
||||||
meta(name="twitter:title" content=pageTitle_no_include_blog_name)
|
|
||||||
meta(name="twitter:description" content=pageDescription)
|
|
||||||
meta(name="twitter:image" content=photo_link)
|
|
||||||
|
|
||||||
if theme.Open_Graph_meta
|
|
||||||
if is_post()
|
|
||||||
meta(property="og:type" content="article")
|
|
||||||
else
|
|
||||||
meta(property="og:type" content="website")
|
|
||||||
|
|
||||||
meta(property="og:title" content=pageTitle_no_include_blog_name)
|
|
||||||
meta(property="og:url" content=without_html)
|
|
||||||
meta(property="og:site_name" content=config.title)
|
|
||||||
meta(property="og:description" content=pageDescription)
|
|
||||||
meta(property="og:image" content=photo_link)
|
|
||||||
|
|
||||||
if theme.disable_baidu_transformation
|
|
||||||
meta(http-equiv="Cache-Control" content="no-transform")
|
|
||||||
meta(http-equiv="Cache-Control" content="no-siteapp")
|
|
||||||
|
|
||||||
if is_post()
|
|
||||||
if(page.prev)
|
|
||||||
link(rel="prev" title=page.prev.title href=url_for(page.prev.permalink) )
|
|
||||||
if(page.next)
|
|
||||||
link(rel="next" title=page.next.title href=url_for(page.next.permalink) )
|
|
||||||
|
|
||||||
|
|
||||||
if theme.algolia_search.enable
|
|
||||||
link(rel="dns-prefetch" href="https://cdn.jsdelivr.net")
|
|
||||||
link(rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.css")
|
|
||||||
script(src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js" defer)
|
|
||||||
|
|
||||||
if (theme.gitment && theme.gitment.enable)
|
|
||||||
link(rel="dns-prefetch" href="https://unpkg.com")
|
|
||||||
link(rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/gitment/style/default.min.css")
|
|
||||||
script(src="https://cdn.jsdelivr.net/npm/gitment/dist/gitment.browser.min.js")
|
|
||||||
script(src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js")
|
|
||||||
if (theme.gitalk && theme.gitalk.enable)
|
|
||||||
link(rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.css")
|
|
||||||
if(theme.gitalk.js)
|
|
||||||
script(src=theme.gitalk.js)
|
|
||||||
else
|
|
||||||
script(src="https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js")
|
|
||||||
script(src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//- PWA
|
||||||
if (theme.pwa && theme.pwa.enable)
|
if (theme.pwa && theme.pwa.enable)
|
||||||
link(rel="manifest" href=theme.pwa.manifest)
|
link(rel="manifest" href=theme.pwa.manifest)
|
||||||
if(theme.pwa.theme_color)
|
if(theme.pwa.theme_color)
|
||||||
@@ -71,28 +35,7 @@ if (theme.pwa && theme.pwa.enable)
|
|||||||
if(theme.pwa.mask_icon)
|
if(theme.pwa.mask_icon)
|
||||||
link(rel="mask-icon" href=theme.pwa.mask_icon color="#5bbad5")
|
link(rel="mask-icon" href=theme.pwa.mask_icon color="#5bbad5")
|
||||||
|
|
||||||
|
//- 網站驗證
|
||||||
if theme.baidu_analytics
|
|
||||||
link(rel="dns-prefetch" href="https://hm.baidu.com")
|
|
||||||
script.
|
|
||||||
var _hmt = _hmt || [];
|
|
||||||
(function() {
|
|
||||||
var hm = document.createElement("script");
|
|
||||||
hm.src = "https://hm.baidu.com/hm.js?!{theme.baidu_analytics}";
|
|
||||||
var s = document.getElementsByTagName("script")[0];
|
|
||||||
s.parentNode.insertBefore(hm, s);
|
|
||||||
})();
|
|
||||||
if theme.google_analytics
|
|
||||||
link(rel="dns-prefetch" href="https://www.google-analytics.com")
|
|
||||||
script.
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', '!{theme.google_analytics}', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
|
|
||||||
if theme.google_site_verification
|
if theme.google_site_verification
|
||||||
meta(name="google-site-verification" content=theme.google_site_verification)
|
meta(name="google-site-verification" content=theme.google_site_verification)
|
||||||
|
|
||||||
@@ -105,11 +48,83 @@ if theme.baidu_site_verification
|
|||||||
if theme.qihu_site_verification
|
if theme.qihu_site_verification
|
||||||
meta(name="360-site-verification" content=theme.qihu_site_verification)
|
meta(name="360-site-verification" content=theme.qihu_site_verification)
|
||||||
|
|
||||||
|
//- twitter meta
|
||||||
|
if theme.twitter_meta
|
||||||
|
meta(name="twitter:card" content="summary_large_image")
|
||||||
|
meta(name="twitter:title" content=pageTitle_no_include_blog_name)
|
||||||
|
meta(name="twitter:description" content=pageDescription)
|
||||||
|
meta(name="twitter:image" content=photo_link)
|
||||||
|
|
||||||
- var preload_archive_img = theme.archive_img ||theme.top_img || config.top_img
|
//- Open_Graph
|
||||||
- var preload_img = page.top_img || theme.top_img || config.top_img
|
if theme.Open_Graph_meta
|
||||||
|
- var contentType = is_post() ? 'article' : 'website'
|
||||||
|
meta(property="og:type" content=contentType)
|
||||||
|
meta(property="og:title" content=pageTitle_no_include_blog_name)
|
||||||
|
meta(property="og:url" content=without_html)
|
||||||
|
meta(property="og:site_name" content=config.title)
|
||||||
|
meta(property="og:description" content=pageDescription)
|
||||||
|
meta(property="og:image" content=photo_link)
|
||||||
|
|
||||||
if (is_archive() && preload_archive_img)
|
if theme.disable_baidu_transformation
|
||||||
link(rel="preload" href=url_for(preload_archive_img) as="image" )
|
meta(http-equiv="Cache-Control" content="no-transform")
|
||||||
else if (!is_post() && preload_img)
|
meta(http-equiv="Cache-Control" content="no-siteapp")
|
||||||
link(rel="preload" href=url_for(preload_img) as="image" )
|
|
||||||
|
script(src=url_for(theme.CDN.js_cookies))
|
||||||
|
|
||||||
|
if (theme.darkmode && theme.darkmode.enable) || theme.autoChangeMode !== false
|
||||||
|
include ./darkmode
|
||||||
|
|
||||||
|
each item in theme.CDN_USE.css
|
||||||
|
link(rel='stylesheet', href=url_for(item))
|
||||||
|
|
||||||
|
if (theme.medium_zoom && !theme.medium_zoom.enable)
|
||||||
|
link(rel='stylesheet', href=url_for(theme.CDN.fancybox_css))
|
||||||
|
|
||||||
|
if (theme.snackbar && theme.snackbar.enable)
|
||||||
|
link(rel='stylesheet', href=url_for(theme.CDN.snackbar_css))
|
||||||
|
|
||||||
|
if theme.canonical
|
||||||
|
link(rel="canonical" href=without_html)
|
||||||
|
|
||||||
|
if is_post()
|
||||||
|
if(page.prev)
|
||||||
|
link(rel="prev" title=page.prev.title href=url_for(page.prev.permalink) )
|
||||||
|
if(page.next)
|
||||||
|
link(rel="next" title=page.next.title href=url_for(page.next.permalink) )
|
||||||
|
|
||||||
|
if theme.algolia_search.enable
|
||||||
|
link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.algolia_search_css))
|
||||||
|
script(src=url_for(theme.CDN.algolia_search) defer)
|
||||||
|
|
||||||
|
if (theme.gitalk && theme.gitalk.enable)
|
||||||
|
link(rel="stylesheet" type="text/css" href=url_for(gitalk_css))
|
||||||
|
script(src=url_for(theme.CDN.gitalk))
|
||||||
|
script(src=url_for(theme.CDN.blueimp-md5))
|
||||||
|
|
||||||
|
if theme.baidu_analytics
|
||||||
|
link(rel="dns-prefetch" href="https://hm.baidu.com")
|
||||||
|
script.
|
||||||
|
var _hmt = _hmt || [];
|
||||||
|
(function() {
|
||||||
|
var hm = document.createElement("script");
|
||||||
|
hm.src = "https://hm.baidu.com/hm.js?!{theme.baidu_analytics}";
|
||||||
|
var s = document.getElementsByTagName("script")[0];
|
||||||
|
s.parentNode.insertBefore(hm, s);
|
||||||
|
})();
|
||||||
|
|
||||||
|
if theme.google_analytics
|
||||||
|
link(rel="dns-prefetch" href="https://www.google-analytics.com")
|
||||||
|
script.
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
|
ga('create', '!{theme.google_analytics}', 'auto');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
|
||||||
|
if !is_post()
|
||||||
|
link(rel="preload" href=url_for(top_img) as="image" )
|
||||||
|
|
||||||
|
if theme.blog_title_font.font_link
|
||||||
|
link(rel='stylesheet', href=url_for(theme.blog_title_font.font_link))
|
||||||
@@ -1,26 +1,13 @@
|
|||||||
#page-header
|
#header
|
||||||
span.pull-left
|
#page-header
|
||||||
a#site-name.blog_title(href=url_for('/')) #[=config.title]
|
span#blog_name.pull_left
|
||||||
//- i.fa.fa-bars.toggle-menu.pull-right(aria-hidden="true")
|
a#site-name.blog_title(href=url_for('/')) #[=config.title]
|
||||||
.open.toggle-menu.pull-right
|
i.fa.fa-bars.fa-fw.toggle-menu.pull_right.close(aria-hidden="true")
|
||||||
.menu-icon-first
|
span.pull_right.menus
|
||||||
.menu-icon-second
|
.menus_items
|
||||||
.menu-icon-third
|
include menu_item.pug
|
||||||
|
span#search_button.pull_right
|
||||||
span.pull-right.menus
|
if (theme.algolia_search.enable || theme.local_search && theme.local_search.enable)
|
||||||
.mobile_author_icon
|
a.site-page.social-icon.search
|
||||||
img.lozad(data-src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
i.fa.fa-search.fa-fw
|
||||||
.mobile_author-info__description= config.description
|
span=' '+_p('search')
|
||||||
hr
|
|
||||||
.menus_item
|
|
||||||
each value, label in theme.menu
|
|
||||||
a.site-page(href=value.split('||')[0])
|
|
||||||
i.fa-fw(class=value.split('||')[1])
|
|
||||||
span=' '+label
|
|
||||||
script.
|
|
||||||
document.body.addEventListener('touchstart', function(){ });
|
|
||||||
span.pull-right
|
|
||||||
if (theme.algolia_search.enable || theme.local_search && theme.local_search.enable)
|
|
||||||
a.site-page.social-icon.search
|
|
||||||
i.fa.fa-search.fa-fw
|
|
||||||
span=' '+_p('search')
|
|
||||||
|
|||||||
113
layout/includes/index-js.pug
Normal file
113
layout/includes/index-js.pug
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
script.
|
||||||
|
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {} else {
|
||||||
|
$('.full_page .nav_bg').css('background-attachment', 'fixed');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if theme.subtitle.enable
|
||||||
|
script(src=url_for(theme.CDN.typed))
|
||||||
|
- var source = theme.subtitle.source
|
||||||
|
|
||||||
|
if source == '1' || source == '2'
|
||||||
|
script(src="https://cdn.jsdelivr.net/npm/bluebird@3/js/browser/bluebird.min.js")
|
||||||
|
script(src="https://cdn.jsdelivr.net/npm/whatwg-fetch@2.0.3/fetch.min.js")
|
||||||
|
|
||||||
|
if source == '1'
|
||||||
|
script.
|
||||||
|
fetch('https://api.ooopn.com/ciba/api.php',)
|
||||||
|
.then(function (res){
|
||||||
|
return res.json();
|
||||||
|
})
|
||||||
|
.then(function (data) {
|
||||||
|
var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(",");
|
||||||
|
var both = sub.unshift(data['ciba-en'],data.ciba)
|
||||||
|
var typed = new Typed(".subtitle", {
|
||||||
|
strings: sub,
|
||||||
|
startDelay: 300,
|
||||||
|
typeSpeed: 100,
|
||||||
|
loop: true,
|
||||||
|
backSpeed: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.error(err);
|
||||||
|
})
|
||||||
|
else if source == '2'
|
||||||
|
script.
|
||||||
|
fetch('https://v1.hitokoto.cn')
|
||||||
|
.then(function (res){
|
||||||
|
return res.json();
|
||||||
|
})
|
||||||
|
.then(function (data) {
|
||||||
|
var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(",");
|
||||||
|
var both = sub.unshift(data.hitokoto)
|
||||||
|
var typed = new Typed(".subtitle", {
|
||||||
|
strings: sub,
|
||||||
|
startDelay: 300,
|
||||||
|
typeSpeed: 100,
|
||||||
|
loop: true,
|
||||||
|
backSpeed: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.error(err);
|
||||||
|
})
|
||||||
|
else if source == "3"
|
||||||
|
script(type="text/javascript" src="http://yijuzhan.com/api/word.php?m=js")
|
||||||
|
script.
|
||||||
|
var con = str[0];
|
||||||
|
var author = "出自 " + str[1];
|
||||||
|
var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(",");
|
||||||
|
var both = sub.unshift(con,author)
|
||||||
|
var typed = new Typed(".subtitle", {
|
||||||
|
strings: sub,
|
||||||
|
startDelay: 300,
|
||||||
|
typeSpeed: 100,
|
||||||
|
loop: true,
|
||||||
|
backSpeed: 50
|
||||||
|
});
|
||||||
|
else if source == '4'
|
||||||
|
script(type="text/javascript" src="https://sdk.jinrishici.com/v2/browser/jinrishici.js")
|
||||||
|
script.
|
||||||
|
jinrishici.load(function(result) {
|
||||||
|
var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(",");
|
||||||
|
var content = result.data.content;
|
||||||
|
var both = sub.unshift(content)
|
||||||
|
var typed = new Typed(".subtitle", {
|
||||||
|
strings: sub,
|
||||||
|
startDelay: 300,
|
||||||
|
typeSpeed: 100,
|
||||||
|
loop: true,
|
||||||
|
backSpeed: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
else
|
||||||
|
script.
|
||||||
|
var typed = new Typed(".subtitle", {
|
||||||
|
strings: '!{theme.subtitle.sub}'.split(","),
|
||||||
|
startDelay: 300,
|
||||||
|
typeSpeed: 100,
|
||||||
|
loop: true,
|
||||||
|
backSpeed: 50
|
||||||
|
});
|
||||||
|
|
||||||
|
if !theme.index_top_img_height && !theme.index_site_info_top
|
||||||
|
script.
|
||||||
|
//首頁fullpage
|
||||||
|
function alignContent() {
|
||||||
|
for (var n = $(window).height(), e = document.querySelectorAll(".full_page"), i = 0; i < e.length; i++)
|
||||||
|
e[i].style.height = n + "px";
|
||||||
|
$("#site-info").each(function () {
|
||||||
|
var x = $(this).height();
|
||||||
|
$(this).css("top", (n-x)/2)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
alignContent();
|
||||||
|
|
||||||
|
$(window).bind("resize", function () {
|
||||||
|
alignContent()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7,21 +7,25 @@
|
|||||||
- 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
|
||||||
|
//- 判断keywords
|
||||||
|
|
||||||
- var pageDescription = page.description || page.title || config.description || ''
|
- var pageDescription = page.description || page.title || config.description || ''
|
||||||
- var pageKeywords = (config.keywords || []).join(',')
|
- var pageKeywords = Array.isArray(config.keywords) ? (config.keywords).join(','): ([]).join(',') || config.keywords
|
||||||
- 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
|
||||||
|
|
||||||
doctype html
|
doctype html
|
||||||
html(lang=config.language)
|
html(lang=config.language data-theme=theme.display_mode)
|
||||||
head
|
head
|
||||||
meta(charset='UTF-8')
|
meta(charset='UTF-8')
|
||||||
meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
||||||
@@ -33,51 +37,44 @@ html(lang=config.language)
|
|||||||
meta(name="copyright" content=pageCopyright)
|
meta(name="copyright" content=pageCopyright)
|
||||||
meta(name ="format-detection" content="telephone=no")
|
meta(name ="format-detection" content="telephone=no")
|
||||||
!=favicon_tag(config.favicon || theme.favicon || '/favicon.ico')
|
!=favicon_tag(config.favicon || theme.favicon || '/favicon.ico')
|
||||||
if theme.stylesheets !== undefined && theme.stylesheets.length > 0
|
|
||||||
each url in theme.stylesheets
|
|
||||||
link(rel='stylesheet', href=url_for(url))
|
|
||||||
each item in theme.cdn.css
|
|
||||||
if item !== undefined
|
|
||||||
link(rel='stylesheet', href=item)
|
|
||||||
include ./head.pug
|
include ./head.pug
|
||||||
include ./config.pug
|
include ./config.pug
|
||||||
body
|
body
|
||||||
if theme.fireworks && theme.fireworks.enable
|
if theme.fireworks && theme.fireworks.enable
|
||||||
canvas.fireworks
|
canvas.fireworks
|
||||||
if (is_post() && page.toc != false && theme.toc.enable)
|
include ./header.pug
|
||||||
i.fa.fa-arrow-right#toggle-sidebar(aria-hidden="true")
|
include ./mobile-sidebar.pug
|
||||||
include ./sidebar.pug
|
#body-wrap
|
||||||
if (!is_post())
|
if theme.background
|
||||||
include ./nav.pug
|
- var source = theme.background
|
||||||
#content-outer
|
- var is_photo = source.substring(3,0) === 'url' ? 'photo':'color'
|
||||||
block top_img
|
#web_bg(data-type=is_photo)
|
||||||
|
if (is_post() && page.toc != false && theme.toc.enable)
|
||||||
|
i.fa.fa-arrow-right#toggle-sidebar(aria-hidden="true")
|
||||||
|
include ./sidebar.pug
|
||||||
if (!is_post())
|
if (!is_post())
|
||||||
#content-inner.layout_page
|
include ./nav.pug
|
||||||
if body
|
#content-outer
|
||||||
div!= body
|
block top_img
|
||||||
else
|
if (!is_post())
|
||||||
block content
|
#content-inner.layout_page
|
||||||
else
|
if body
|
||||||
#content-inner.layout.layout_post
|
div!= body
|
||||||
if body
|
else
|
||||||
div!= body
|
block content
|
||||||
else
|
else
|
||||||
block content
|
#content-inner.layout.layout_post
|
||||||
//- - var top_img = page.top_img || theme.post_meta.top_img || theme.top_img || config.top_img || true
|
if body
|
||||||
//- - var bg_img = top_img !== true ? `background-image: url(${top_img})` : ''
|
div!= body
|
||||||
//- - var footer_bg_class= bg_img ? 'footer-bg' : ''
|
else
|
||||||
//- footer(style=bg_img class=footer_bg_class)
|
block content
|
||||||
footer
|
|
||||||
include ./footer.pug
|
- var footer_bg = theme.footer_bg == false ? '' : bg_img
|
||||||
i.fa.fa-arrow-up#go-up(aria-hidden="true")
|
footer#footer(style=footer_bg)
|
||||||
|
include ./footer.pug
|
||||||
include ./rightside.pug
|
include ./rightside.pug
|
||||||
each item in theme.cdn.js
|
each item in theme.CDN_USE.js
|
||||||
if item !== undefined
|
script(src=url_for(item))
|
||||||
script(src=url_for(item))
|
|
||||||
if theme.scripts !== undefined && theme.scripts.length > 0
|
|
||||||
//- scripts list from config.yml
|
|
||||||
each url in theme.scripts
|
|
||||||
script(src=url_for(url))
|
|
||||||
include ./additional-js.pug
|
include ./additional-js.pug
|
||||||
include ./search/index.pug
|
include ./search/index.pug
|
||||||
|
|
||||||
|
|||||||
18
layout/includes/menu_item.pug
Normal file
18
layout/includes/menu_item.pug
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
each value, label in theme.menu
|
||||||
|
if !Array.isArray(value)
|
||||||
|
.menus_item
|
||||||
|
a.site-page(href=trim(value.split('||')[0]))
|
||||||
|
i.fa-fw(class=trim(value.split('||')[1]))
|
||||||
|
span=' '+label
|
||||||
|
else
|
||||||
|
.menus_item
|
||||||
|
a.site-page
|
||||||
|
i.fa-fw(class=trim(label.split('||')[1]) aria-hidden="true")
|
||||||
|
span=' '+ trim(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=trim(i.split('||')[1]))
|
||||||
|
i.fa-fw(class=trim(i.split('||')[2]))
|
||||||
|
span=' '+trim(i.split('||')[0])
|
||||||
41
layout/includes/mixins/UI.pug
Normal file
41
layout/includes/mixins/UI.pug
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
mixin UI_NEW(posts)
|
||||||
|
- posts.each(function(article,index){
|
||||||
|
.recent-post-item.article-container
|
||||||
|
- var link = article.link || article.path
|
||||||
|
if index%2 == 0
|
||||||
|
.post_cover.pull_left.left_radius
|
||||||
|
a(href=url_for(link) title=article.title || _p('no_title'))
|
||||||
|
- var post_cover = article.cover
|
||||||
|
if theme.lazyload.enable
|
||||||
|
img.post_bg.lazyload(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
.post_cover.pull_right.right_radius
|
||||||
|
a(href=url_for(link) title=article.title || _p('no_title'))
|
||||||
|
- var post_cover = article.cover
|
||||||
|
if theme.lazyload.enable
|
||||||
|
img.post_bg.lazyload(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
else
|
||||||
|
img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
|
.recent-post-info
|
||||||
|
a.article-title(href=url_for(link) title= article.title || _p('no_title'))= article.title || _p('no_title')
|
||||||
|
if (theme.post_meta.date_type)
|
||||||
|
- var date_type = theme.post_meta.date_type == 'updated' ? 'updated' : 'date'
|
||||||
|
time.post-meta__date #[i.fa.fa-calendar(aria-hidden="true")] #[=date(article[date_type], config.date_format)]
|
||||||
|
if (theme.post_meta.categories && article.categories.data.length > 0)
|
||||||
|
span.article-meta
|
||||||
|
span.article-meta__separator |
|
||||||
|
each item, index in article.categories.data
|
||||||
|
i.fa.fa-inbox.article-meta__icon(aria-hidden="true")
|
||||||
|
a(href=url_for(item.path)).article-meta__categories #[=item.name]
|
||||||
|
if (index < article.categories.data.length - 1)
|
||||||
|
i.fa.fa-angle-right(aria-hidden="true")
|
||||||
|
if theme.auto_excerpt && theme.auto_excerpt.enable
|
||||||
|
- const content = strip_html(article.content)
|
||||||
|
- let expert = content.substring(0, theme.auto_excerpt.length)
|
||||||
|
- content.length > theme.auto_excerpt.length ? expert += ' ...' : ''
|
||||||
|
.content!= expert
|
||||||
|
else
|
||||||
|
.content!= article.description
|
||||||
|
- })
|
||||||
@@ -7,6 +7,12 @@ mixin articleSort(posts)
|
|||||||
- year = tempYear
|
- year = tempYear
|
||||||
.article-sort-item.year= year
|
.article-sort-item.year= year
|
||||||
.article-sort-item
|
.article-sort-item
|
||||||
time.article-sort-item__time= date(article.date)
|
.article-sort-img
|
||||||
a.article-sort-item__title(href=url_for(article.path))= article.title || 'No Title'
|
a.article-sort-item__img(href=url_for(article.path))
|
||||||
|
img(src=article.cover)
|
||||||
|
.article-sort-post
|
||||||
|
a.article-sort-item__post(href=url_for(article.path))
|
||||||
|
i.fa.fa-clock-o(aria-hidden="true")
|
||||||
|
time.article-sort-item__time= date(article.date)
|
||||||
|
.article-sort-item__title= article.title || 'No Title'
|
||||||
- })
|
- })
|
||||||
46
layout/includes/mobile-sidebar.pug
Normal file
46
layout/includes/mobile-sidebar.pug
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
#mobile-sidebar
|
||||||
|
#menu_mask
|
||||||
|
#mobile-sidebar-menus
|
||||||
|
.mobile_author_icon
|
||||||
|
img.lazyload.avatar_img(src=url_for(theme.avatar) onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||||
|
.mobile_post_data
|
||||||
|
if site.posts.length
|
||||||
|
.mobile_data_item.is_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.is_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.is_center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.category_dir) + '/')
|
||||||
|
.headline= _p('aside.categories')
|
||||||
|
.length_num= site.categories.length
|
||||||
|
hr
|
||||||
|
.menus_items
|
||||||
|
include menu_item.pug
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- const showToc = is_post() && page.toc != false && theme.toc.enable
|
||||||
|
-
|
||||||
|
let tocNumber
|
||||||
|
if (page.toc_number !== undefined) tocNumber = page.toc_number
|
||||||
|
else if (theme.toc.number !== undefined) tocNumber = theme.toc.number
|
||||||
|
else tocNumber = true
|
||||||
|
-
|
||||||
|
if (showToc)
|
||||||
|
#mobile-sidebar-toc
|
||||||
|
.toc_mobile_headline= _p('sidebar.catalog')
|
||||||
|
if (page.encrypt == true)
|
||||||
|
.toc-div-class(style="display:none")!=toc(page.origin,{"class":"toc_mobile_items",list_number:tocNumber})
|
||||||
|
else
|
||||||
|
!=toc(page.content,{"class":"toc_mobile_items",list_number:tocNumber})
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
if (is_archive())
|
|
||||||
- var top_img = theme.archive_img ||theme.top_img || config.top_img
|
|
||||||
else
|
|
||||||
- var top_img = page.top_img||theme.top_img || config.top_img
|
|
||||||
|
|
||||||
- var bg_img = top_img && top_img !== true ? `background-image: url(${top_img})` : ''
|
- var bg_img = top_img && top_img !== true ? `background-image: url(${top_img})` : ''
|
||||||
|
|
||||||
|
|
||||||
if is_home()
|
if is_home()
|
||||||
nav#nav.full_page(style=bg_img)
|
nav#nav.full_page
|
||||||
include ./header.pug
|
.nav_bg(style=bg_img)
|
||||||
#site-info
|
#site-info
|
||||||
#site-title
|
#site-title
|
||||||
span.blogtitle= page.title || page.tag || page.category || config.title
|
span.blogtitle= page.title || page.tag || page.category || config.title
|
||||||
@@ -25,8 +21,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
|
||||||
include ./header.pug
|
.nav_bg(style=bg_img)
|
||||||
#page_site-info
|
#page_site-info
|
||||||
#site-title
|
#site-title
|
||||||
if (is_archive())
|
if (is_archive())
|
||||||
|
|||||||
6
layout/includes/page_tag.pug
Normal file
6
layout/includes/page_tag.pug
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- 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
|
||||||
|
|
||||||
|
a(href=url_for(tags.path) style='font-size:' + fontSize + ';color:' + color)=tags.name
|
||||||
|
-})
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
var options = {
|
var options = {
|
||||||
prev_text: '<i class="fa fa-chevron-left"></i>',
|
prev_text: '<i class="fa fa-chevron-left"></i>',
|
||||||
next_text: '<i class="fa fa-chevron-right"></i>',
|
next_text: '<i class="fa fa-chevron-right"></i>',
|
||||||
mid_size: 1
|
mid_size: 1,
|
||||||
|
escape: false
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_post())
|
if(!is_post())
|
||||||
@@ -13,44 +14,50 @@ else
|
|||||||
nav#pagination.pagination_post
|
nav#pagination.pagination_post
|
||||||
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
|
||||||
a(href=url_for(page.prev.path))
|
a(href=url_for(page.prev.path))
|
||||||
img.prev_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` )
|
if theme.lazyload.enable
|
||||||
|
img.prev_cover.lazyload(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
|
||||||
a(href=url_for(page.prev.path))
|
a(href=url_for(page.prev.path))
|
||||||
img.prev_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
if theme.lazyload.enable
|
||||||
|
img.prev_cover.lazyload(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
|
||||||
a(href=url_for(page.next.path))
|
a(href=url_for(page.next.path))
|
||||||
img.next_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
if theme.lazyload.enable
|
||||||
|
img.next_cover.lazyload(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
|
||||||
a(href=url_for(page.next.path))
|
a(href=url_for(page.next.path))
|
||||||
img.next_cover.lozad(data-src=`${pagination_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
if theme.lazyload.enable
|
||||||
|
img.next_cover.lazyload(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
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,26 +2,23 @@ each article , index in page.posts.data
|
|||||||
.recent-post-item.article-container
|
.recent-post-item.article-container
|
||||||
- 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.pull_left.left_radius
|
||||||
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 = random_cover()
|
if theme.lazyload.enable
|
||||||
if (post_cover)
|
img.post_bg.lazyload(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
img.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.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
|
else
|
||||||
.post_cover.is_right
|
.post_cover.pull_right.right_radius
|
||||||
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 = random_cover()
|
if theme.lazyload.enable
|
||||||
if (post_cover)
|
img.post_bg.lazyload(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||||
img.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.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}'`)
|
||||||
|
|
||||||
.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)
|
||||||
span.article-meta
|
span.article-meta
|
||||||
i.fa.fa-thumb-tack.article-meta__icon.sticky
|
i.fa.fa-thumb-tack.article-meta__icon.sticky
|
||||||
@@ -38,21 +35,11 @@ each article , index in page.posts.data
|
|||||||
a(href=url_for(item.path)).article-meta__categories #[=item.name]
|
a(href=url_for(item.path)).article-meta__categories #[=item.name]
|
||||||
if (index < article.categories.data.length - 1)
|
if (index < article.categories.data.length - 1)
|
||||||
i.fa.fa-angle-right(aria-hidden="true")
|
i.fa.fa-angle-right(aria-hidden="true")
|
||||||
//- if (theme.post_meta.tags && article.tags.data.length > 0)
|
|
||||||
//- span.article-meta.tags
|
|
||||||
//- span.article-meta__separator |
|
|
||||||
//- each item, index in article.tags.data
|
|
||||||
//- i.fa.fa-tag.article-meta__icon(aria-hidden="true")
|
|
||||||
//- a(href=url_for(item.path)).article-meta__tags #[=item.name]
|
|
||||||
//- if (index < article.tags.data.length - 1)
|
|
||||||
//- span.article-meta__link -
|
|
||||||
if theme.auto_excerpt && theme.auto_excerpt.enable
|
if theme.auto_excerpt && theme.auto_excerpt.enable
|
||||||
- const content = strip_html(article.content)
|
- const content = strip_html(article.content)
|
||||||
- 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
|
|
||||||
@@ -1,65 +1,11 @@
|
|||||||
.post-reward
|
.post-reward
|
||||||
a.reward-buttom
|
a.reward-button
|
||||||
i.fa.fa-qrcode
|
i.fa.fa-qrcode
|
||||||
= ' ' + _p('donate')
|
= ' ' + _p('donate')
|
||||||
.reward-main
|
.reward-main
|
||||||
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.lazyload.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,9 +1,20 @@
|
|||||||
section#rightside.rightside
|
section#rightside.rightside
|
||||||
if theme.readmode.enable && is_post()
|
#rightside-config-hide
|
||||||
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
|
if theme.readmode.enable && is_post()
|
||||||
i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
|
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
|
||||||
i#font_minus.fa.fa-minus(title=_p('rightside.font_minus_title'))
|
i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
|
||||||
if theme.translate && theme.translate.enable
|
i#font_minus.fa.fa-minus(title=_p('rightside.font_minus_title'))
|
||||||
a#translateLink.translate_chn_to_cht(href="javascript:translatePage();" title=_p('rightside.translate_title'))= theme.translate.default
|
if theme.translate && theme.translate.enable
|
||||||
if theme.nightshift.enable
|
a#translateLink.translate_chn_to_cht(href="javascript:translatePage();" title=_p('rightside.translate_title') target="_self")= theme.translate.default
|
||||||
i#nightshift.fa.fa-moon-o.nightshift(title=_p('rightside.night_mode_title'))
|
if theme.darkmode && theme.darkmode.enable
|
||||||
|
- var display_mode = theme.display_mode == 'dark' ? 'fa fa-sun-o' : 'fa fa-moon-o'
|
||||||
|
i#darkmode.darkmode(class=display_mode title=_p('rightside.night_mode_title'))
|
||||||
|
#rightside-config-show
|
||||||
|
#rightside_config(title=_p("rightside.setting"))
|
||||||
|
i.fa.fa-cog(aria-hidden="true")
|
||||||
|
if is_post() && page.comments !== false && (d || l || gt || v)
|
||||||
|
a#to_comment(href="#post-comment" title=_p("rightside.scroll_to_comment"))
|
||||||
|
i.scroll_to_comment.fa.fa-comments
|
||||||
|
if is_post() && page.toc != false && theme.toc.enable
|
||||||
|
i#mobile-toc-button.fa.fa-list-ul.close(title=_p("rightside.toc") aria-hidden="true")
|
||||||
|
i.fa.fa-arrow-up#go-up(title=_p("rightside.back_to_top") aria-hidden="true")
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
a(class="a2a_button_" + name)
|
a(class="a2a_button_" + name)
|
||||||
|
|
||||||
a.a2a_dd(href="https://www.addtoany.com/share")
|
a.a2a_dd(href="https://www.addtoany.com/share")
|
||||||
script(async src="https://static.addtoany.com/menu/page.js")
|
script(async src=url_for(theme.CDN.addtoany))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
if (theme.sharejs && theme.sharejs.enable)
|
if (theme.sharejs && theme.sharejs.enable)
|
||||||
.social-share(data-image= page.cover|| theme.avatar data-sites= theme.sharejs.sites)
|
.social-share(data-image= page.cover|| theme.avatar data-sites= theme.sharejs.sites)
|
||||||
link(rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css")
|
link(rel="stylesheet" href=url_for(theme.CDN.sharejs_css))
|
||||||
script(src="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js")
|
script(src=url_for(theme.CDN.sharejs))
|
||||||
@@ -16,5 +16,9 @@
|
|||||||
span.progress-notice= _p('sidebar.have_read')
|
span.progress-notice= _p('sidebar.have_read')
|
||||||
span.progress-num 0
|
span.progress-num 0
|
||||||
span.progress-percentage %
|
span.progress-percentage %
|
||||||
div.sidebar-toc__progress-bar
|
div.sidebar-toc__progress-bar
|
||||||
div.sidebar-toc__content!=toc(page.content, {list_number: tocNumber})
|
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})
|
||||||
|
|
||||||
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#canvas_nest(color=theme.canvas_nest.color opacity=theme.canvas_nest.opacity zIndex=theme.canvas_nest.zIndex count=theme.canvas_nest.count mobile=`${theme.canvas_nest.mobile}` src=url_for(theme.CDN.canvas_nest))
|
||||||
@@ -1 +1 @@
|
|||||||
script(id="ribbon" src=url_for('https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/js/piao.js'))
|
script(id="ribbon_piao" mobile=`${theme.canvas_ribbon_piao.mobile}` src=url_for(theme.CDN.canvas_ribbon_piao))
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
script(id="ribbon" src=url_for('/js/third-party/canvas-ribbon.js') size=theme.canvas_ribbon.size
|
script(id="ribbon" src=url_for(theme.CDN.canvas_ribbon) size=theme.canvas_ribbon.size
|
||||||
alpha=theme.canvas_ribbon.alpha zIndex=theme.canvas_ribbon.zIndex data-click=`${theme.canvas_ribbon.click_to_change}`)
|
alpha=theme.canvas_ribbon.alpha zIndex=theme.canvas_ribbon.zIndex mobile=`${theme.canvas_ribbon.mobile}` data-click=`${theme.canvas_ribbon.click_to_change}`)
|
||||||
|
|
||||||
|
|||||||
4
layout/includes/third-party/katex.pug
vendored
4
layout/includes/third-party/katex.pug
vendored
@@ -1,6 +1,6 @@
|
|||||||
link(rel="stylesheet" type="text/css" href=theme.katex.cdn.css)
|
link(rel="stylesheet" type="text/css" href=theme.katex.cdn.css)
|
||||||
script(src='https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js')
|
script(src=url_for(theme.CDN.katex_copytex))
|
||||||
link(rel="stylesheet" type="text/css" href='https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css')
|
link(rel="stylesheet" type="text/css" href=theme.CDN.katex_copytex_css)
|
||||||
script.
|
script.
|
||||||
$(function () {
|
$(function () {
|
||||||
$('span.katex-display').wrap('<div class="katex-wrap"></div>')
|
$('span.katex-display').wrap('<div class="katex-wrap"></div>')
|
||||||
|
|||||||
2
layout/includes/third-party/mathjax.pug
vendored
2
layout/includes/third-party/mathjax.pug
vendored
@@ -24,4 +24,4 @@ script(type="text/x-mathjax-config").
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
script(src=theme.mathjax.cdn)
|
script(src=theme.CDN.mathjax)
|
||||||
@@ -1,35 +1,37 @@
|
|||||||
.card_widget.card-author
|
.card_widget.card-author
|
||||||
.card-content
|
.card-content
|
||||||
.post_data
|
.post_data
|
||||||
.data-item.text-center
|
.data-item.is_center
|
||||||
img.lozad(data-src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
img.lazyload.avatar_img(src=url_for(theme.avatar) onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||||
p.author-info__name.text-center= config.author
|
p.author-info__name.is_center= config.author
|
||||||
p.author-info__description.text-center= config.description
|
p.author-info__description.is_center= config.description
|
||||||
|
|
||||||
.post_data.data_config
|
.post_data.data_config
|
||||||
if site.posts.length
|
if site.posts.length
|
||||||
.data-item.text-center
|
.data-item.is_center
|
||||||
.data_link
|
.data_link
|
||||||
a(href=url_for(config.archive_dir) + '/')
|
a(href=url_for(config.archive_dir) + '/')
|
||||||
p.headline= _p('aside.articles')
|
p.headline= _p('aside.articles')
|
||||||
p.length_num= site.posts.length
|
p.length_num= site.posts.length
|
||||||
|
|
||||||
if site.tags.length
|
if site.tags.length
|
||||||
.data-item.text-center
|
.data-item.is_center
|
||||||
.data_link
|
.data_link
|
||||||
a(href=url_for(config.tag_dir) + '/' )
|
a(href=url_for(config.tag_dir) + '/' )
|
||||||
p.headline= _p('aside.tags')
|
p.headline= _p('aside.tags')
|
||||||
p.length_num= site.tags.length
|
p.length_num= site.tags.length
|
||||||
|
|
||||||
if site.categories.length
|
if site.categories.length
|
||||||
.data-item.text-center
|
.data-item.is_center
|
||||||
.data_link
|
.data_link
|
||||||
a(href=url_for(config.category_dir) + '/')
|
a(href=url_for(config.category_dir) + '/')
|
||||||
p.headline= _p('aside.categories')
|
p.headline= _p('aside.categories')
|
||||||
p.length_num= site.categories.length
|
p.length_num= site.categories.length
|
||||||
|
|
||||||
.post_data.text-center
|
.post_data.is_center
|
||||||
a#bookmark-it.data-item.bookmark.bookmarke--primary.bookmark--animated(href="javascript:;" title= _p('aside.card_bookmark') )= _p('aside.card_bookmark') || 'Follow Me'
|
a#bookmark-it.data-item.bookmark.bookmarke--primary.bookmark--animated(href="javascript:;" title= _p('aside.card_bookmark') target="_self")
|
||||||
|
i.fa.fa-bookmark(aria-hidden="true")
|
||||||
|
span= _p('aside.card_bookmark') || 'Follow Me'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
.card_widget.card-categories
|
if site.categories.length
|
||||||
.card-content
|
.card_widget.card-categories
|
||||||
.item_headline
|
.card-content
|
||||||
i.fa.fa-folder-open(aria-hidden="true")
|
.item_headline
|
||||||
span= _p('aside.card_categories')
|
i.fa.fa-folder-open(aria-hidden="true")
|
||||||
ul.aside_category_item
|
span= _p('aside.card_categories')
|
||||||
mixin displayCategories(parent = undefined)
|
ul.aside_category_item
|
||||||
- site.categories.find({ parent }).sort("name").each(function(category) {
|
mixin displayCategories(parent = undefined)
|
||||||
- var childCount = site.categories.find({ parent: category._id }).count();
|
- site.categories.find({ parent }).sort("name").each(function(category) {
|
||||||
li.aside_category_list
|
- var childCount = site.categories.find({ parent: category._id }).count();
|
||||||
a.aside_category_list_link(href=url_for(category.path))
|
li.aside_category_list
|
||||||
span.aside_category_list_name= category.name
|
a.aside_category_list_link(href=url_for(category.path))
|
||||||
span.aside_category_list_length= category.length
|
span.aside_category_list_name= category.name
|
||||||
|
span.aside_category_list_length= category.length
|
||||||
if childCount > 0
|
|
||||||
ul.aside_category_item.child
|
if childCount > 0
|
||||||
+displayCategories(category._id)
|
ul.aside_category_item.child
|
||||||
- })
|
+displayCategories(category._id)
|
||||||
|
- })
|
||||||
|
|
||||||
+displayCategories()
|
+displayCategories()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,11 @@
|
|||||||
- 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 = random_cover()
|
|
||||||
.aside_post_cover
|
.aside_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.lazyload(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.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(src=`${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,6 +1,7 @@
|
|||||||
.card_widget.card-tags
|
if site.tags.length
|
||||||
.card-content
|
.card_widget.card-tags
|
||||||
.item_headline
|
.card-content
|
||||||
i.fa.fa-tags(aria-hidden="true")
|
.item_headline
|
||||||
span= _p('aside.card_tags')
|
i.fa.fa-tags(aria-hidden="true")
|
||||||
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 24, amount: 200, color: true, start_color: '#999', end_color: '#000'})
|
span= _p('aside.card_tags')
|
||||||
|
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 24, amount: 200, color: true, start_color: '#999', end_color: '#000'})
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
.webinfo_item
|
.webinfo_item
|
||||||
.webinfo_runtime_name= _p('aside.card_webinfo.runtime_name') + " :"
|
.webinfo_runtime_name= _p('aside.card_webinfo.runtime_name') + " :"
|
||||||
#webinfo_runtime_count.webinfo_runtime_count
|
#webinfo_runtime_count.webinfo_runtime_count
|
||||||
script#runtionshow(src=url_for('js/runtimeshow.js') start_date=theme.runtimeshow.start_date)
|
script#runtionshow(src=url_for(theme.CDN.runtimeshow) start_date=theme.runtimeshow.start_date)
|
||||||
|
|
||||||
if theme.busuanzi.site_uv
|
if theme.busuanzi.site_uv
|
||||||
.webinfo_item
|
.webinfo_item
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ block content
|
|||||||
include includes/recent-posts.pug
|
include includes/recent-posts.pug
|
||||||
include includes/pagination.pug
|
include includes/pagination.pug
|
||||||
#aside_content.aside_content
|
#aside_content.aside_content
|
||||||
include includes/aside.pug
|
include includes/aside.pug
|
||||||
@@ -6,7 +6,8 @@ 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
|
||||||
|
include includes/page_tag.pug
|
||||||
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
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
extends includes/layout.pug
|
extends includes/layout.pug
|
||||||
|
|
||||||
block top_img
|
block top_img
|
||||||
- var top_img = page.top_img || page.cover || theme.post_meta.top_img || theme.post_img || theme.top_img || config.top_img
|
- var top_img = page.top_img || page.cover || theme.post_meta.top_img || theme.default_top_img
|
||||||
- var bg_img = top_img !== true ? `background-image: url(${top_img})` : ''
|
- var bg_img = top_img !== true ? `background-image: url(${top_img})` : ''
|
||||||
div#top-container(style=bg_img)
|
div#top-container(style=bg_img)
|
||||||
include ./includes/header.pug
|
|
||||||
#post-info
|
#post-info
|
||||||
#post-title
|
#post-title
|
||||||
.posttitle=page.title || _p('no_title')
|
.posttitle= page.title || _p('no_title')
|
||||||
#post-meta
|
#post-meta
|
||||||
if (theme.post_meta.date_type)
|
if (theme.post_meta.date_type)
|
||||||
if (theme.post_meta.date_type === 'both')
|
if (theme.post_meta.date_type === 'both')
|
||||||
@@ -30,22 +29,26 @@ block top_img
|
|||||||
a(href=url_for(item.path)).post-meta__categories #[=item.name]
|
a(href=url_for(item.path)).post-meta__categories #[=item.name]
|
||||||
if (index < page.categories.data.length - 1)
|
if (index < page.categories.data.length - 1)
|
||||||
i.fa.fa-angle-right(aria-hidden="true")
|
i.fa.fa-angle-right(aria-hidden="true")
|
||||||
if (theme.wordcount && theme.wordcount.enable)
|
.post-meta-wordcount
|
||||||
.post-meta-wordcount
|
if (theme.wordcount && theme.wordcount.enable)
|
||||||
|
i.fa.fa-file-word-o.post-meta__icon(aria-hidden="true")
|
||||||
span= _p('post.wordcount') + ': '
|
span= _p('post.wordcount') + ': '
|
||||||
span.word-count= wordcount(page.content)
|
span.word-count= wordcount(page.content)
|
||||||
span.post-meta__separator |
|
span.post-meta__separator |
|
||||||
|
i.fa.fa-clock-o.post-meta__icon(aria-hidden="true")
|
||||||
span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160}))
|
span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160}))
|
||||||
if theme.busuanzi.page_pv
|
if (theme.wordcount && theme.wordcount.enable && theme.busuanzi.page_pv)
|
||||||
span.post-meta__separator |
|
span.post-meta__separator |
|
||||||
span= _p('post.page_pv') + ': '
|
if theme.busuanzi.page_pv
|
||||||
span#busuanzi_value_page_pv
|
i.fa.fa-eye.post-meta__icon(aria-hidden="true")
|
||||||
|
span= _p('post.page_pv') + ': '
|
||||||
|
span#busuanzi_value_page_pv
|
||||||
|
|
||||||
|
|
||||||
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 +74,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
|
||||||
@@ -1,10 +1,18 @@
|
|||||||
extends includes/layout.pug
|
extends includes/layout.pug
|
||||||
|
|
||||||
block content
|
block content
|
||||||
include ./includes/mixins/article-sort.pug
|
if theme.tag_ui == 'index'
|
||||||
#tag
|
include ./includes/mixins/UI.pug
|
||||||
.article-sort-title= _p('page.tag') + ' - ' + page.tag
|
#recent-posts.recent-posts
|
||||||
+articleSort(page.posts)
|
+UI_NEW(page.posts)
|
||||||
include includes/pagination.pug
|
include includes/pagination.pug
|
||||||
#aside_content.aside_content
|
#aside_content.aside_content
|
||||||
include includes/aside.pug
|
include includes/aside.pug
|
||||||
|
else
|
||||||
|
include ./includes/mixins/article-sort.pug
|
||||||
|
#tag
|
||||||
|
.article-sort-title= _p('page.tag') + ' - ' + page.tag
|
||||||
|
+articleSort(page.posts)
|
||||||
|
include includes/pagination.pug
|
||||||
|
#aside_content.aside_content
|
||||||
|
include includes/aside.pug
|
||||||
|
|||||||
5
package.json
Normal file
5
package.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "hexo-theme-melody",
|
||||||
|
"version": "2.0.0",
|
||||||
|
"description": "A Hexo Theme: Butterfly"
|
||||||
|
}
|
||||||
@@ -1,16 +1,6 @@
|
|||||||
hexo.extend.tag.register('gallery', args => {
|
function gallery(args, content) {
|
||||||
const url = args[0]
|
return `<div class="justified-gallery">${hexo.render.renderSync({text: content, engine: 'markdown'})}
|
||||||
const title = args[1] || 'No title'
|
</div>`;
|
||||||
return `
|
}
|
||||||
<div
|
|
||||||
class="gallery-item"
|
hexo.extend.tag.register('gallery', gallery, {ends: true});
|
||||||
style="background-image: url('${url}')"
|
|
||||||
data-title="${title}"
|
|
||||||
data-url="${url}"
|
|
||||||
>
|
|
||||||
<div class="gallery-item__title">
|
|
||||||
${title}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
})
|
|
||||||
133
scripts/list_archives.js
Normal file
133
scripts/list_archives.js
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
hexo.extend.helper.register('list_archives', function (options = {}) {
|
||||||
|
|
||||||
|
const {
|
||||||
|
config
|
||||||
|
} = this;
|
||||||
|
const archiveDir = config.archive_dir;
|
||||||
|
const {
|
||||||
|
timezone
|
||||||
|
} = config;
|
||||||
|
const lang = this.page.lang || this.page.language || config.language;
|
||||||
|
let {
|
||||||
|
format
|
||||||
|
} = options;
|
||||||
|
const type = options.type || 'monthly';
|
||||||
|
const {
|
||||||
|
style = 'list', transform, separator = ', '
|
||||||
|
} = options;
|
||||||
|
const showCount = Object.prototype.hasOwnProperty.call(options, 'show_count') ? options.show_count : true;
|
||||||
|
const className = options.class || 'archive';
|
||||||
|
const order = options.order || -1;
|
||||||
|
const limit = 8;
|
||||||
|
let result = '';
|
||||||
|
|
||||||
|
var more_button
|
||||||
|
if (lang === 'zh-CN') {
|
||||||
|
more_button = '查看更多';
|
||||||
|
} else if (lang === 'zh-TW') {
|
||||||
|
more_button = '查看更多';
|
||||||
|
} else {
|
||||||
|
more_button = 'More';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!format) {
|
||||||
|
format = type === 'monthly' ? 'MMMM YYYY' : 'YYYY';
|
||||||
|
}
|
||||||
|
|
||||||
|
const posts = this.site.posts.sort('date', order);
|
||||||
|
if (!posts.length) return result;
|
||||||
|
|
||||||
|
const data = [];
|
||||||
|
let length = 0;
|
||||||
|
|
||||||
|
posts.forEach(post => {
|
||||||
|
// Clone the date object to avoid pollution
|
||||||
|
let date = post.date.clone();
|
||||||
|
|
||||||
|
if (timezone) date = date.tz(timezone);
|
||||||
|
if (lang) date = date.locale(lang);
|
||||||
|
|
||||||
|
const year = date.year();
|
||||||
|
const month = date.month() + 1;
|
||||||
|
const name = date.format(format);
|
||||||
|
const lastData = data[length - 1];
|
||||||
|
|
||||||
|
if (!lastData || lastData.name !== name) {
|
||||||
|
length = data.push({
|
||||||
|
name,
|
||||||
|
year,
|
||||||
|
month,
|
||||||
|
count: 1
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
lastData.count++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const link = item => {
|
||||||
|
let url = `${archiveDir}/${item.year}/`;
|
||||||
|
|
||||||
|
if (type === 'monthly') {
|
||||||
|
if (item.month < 10) url += '0';
|
||||||
|
url += `${item.month}/`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.url_for(url);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (style === 'list') {
|
||||||
|
result += `<ul class="${className}-list">`;
|
||||||
|
|
||||||
|
for (let i = 0, len = data.length; i < Math.min(len, limit); i++) {
|
||||||
|
const item = data[i];
|
||||||
|
|
||||||
|
result += `<li class="${className}-list-item">`;
|
||||||
|
|
||||||
|
result += `<a class="${className}-list-link" href="${link(item)}">`;
|
||||||
|
result += transform ? transform(item.name) : item.name;
|
||||||
|
|
||||||
|
|
||||||
|
if (showCount) {
|
||||||
|
result += `<span class="${className}-list-count">${item.count}</span>`;
|
||||||
|
}
|
||||||
|
result += '</a>';
|
||||||
|
result += '</li>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.length > limit) {
|
||||||
|
result += `<li class="${className}-list-item">`;
|
||||||
|
result += `<a class="${className}-list-link is_center" href="` + '/' + `${archiveDir}" >`;
|
||||||
|
result += more_button;
|
||||||
|
result += '</a>';
|
||||||
|
result += '</li>';
|
||||||
|
}
|
||||||
|
result += '</ul>';
|
||||||
|
} else {
|
||||||
|
for (let i = 0, len = data.length; i < Math.min(len, limit); i++) {
|
||||||
|
const item = data[i];
|
||||||
|
|
||||||
|
if (i) result += separator;
|
||||||
|
|
||||||
|
result += `<a class="${className}-link" href="${link(item)}">`;
|
||||||
|
result += transform ? transform(item.name) : item.name;
|
||||||
|
|
||||||
|
if (showCount) {
|
||||||
|
result += `<span class="${className}-count">${item.count}</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
result += '</a>';
|
||||||
|
}
|
||||||
|
if (data.length > limit) {
|
||||||
|
result += `<a class="${className}-link" is_center" href="${archiveDir}" >`;
|
||||||
|
result += more_button;
|
||||||
|
result += '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
})
|
||||||
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});
|
||||||
19
scripts/post-lazyload.js
Normal file
19
scripts/post-lazyload.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
'use strict';
|
||||||
|
hexo.extend.filter.register('after_post_render', data => {
|
||||||
|
var theme = hexo.theme.config;
|
||||||
|
if (!theme.lazyload.enable) return;
|
||||||
|
|
||||||
|
const 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('lazyload');
|
||||||
|
});
|
||||||
|
|
||||||
|
data.content = $.html();
|
||||||
|
}, 100);
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
hexo.extend.helper.register('random_cover', function () {
|
hexo.extend.filter.register('before_post_render', function(data){
|
||||||
|
data.cover = data.cover || random_cover()
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
var random_cover = function () {
|
||||||
var cover;
|
var cover;
|
||||||
var num;
|
var num;
|
||||||
if (!Array.isArray(hexo.theme.config.default_cover)) {
|
if (!Array.isArray(hexo.theme.config.default_cover)) {
|
||||||
@@ -10,4 +15,4 @@ hexo.extend.helper.register('random_cover', function () {
|
|||||||
return cover
|
return cover
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
}
|
||||||
@@ -1,38 +1,61 @@
|
|||||||
hexo.extend.helper.register('related_posts', function(currentPost, allPosts){
|
hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
|
||||||
var relatedPosts = [];
|
var relatedPosts = [];
|
||||||
currentPost.tags.forEach(function (tag) {
|
currentPost.tags.forEach(function (tag) {
|
||||||
allPosts.forEach(function (post) {
|
allPosts.forEach(function (post) {
|
||||||
if (isTagRelated(tag.name, post.tags)) {
|
if (isTagRelated(tag.name, post.tags)) {
|
||||||
var relatedPost = {
|
var relatedPost = {
|
||||||
title: post.title,
|
title: post.title,
|
||||||
path: post.path,
|
path: post.path,
|
||||||
cover: post.cover,
|
cover: post.cover,
|
||||||
weight: 1
|
weight: 1
|
||||||
};
|
};
|
||||||
var index = findItem(relatedPosts, 'path', post.path);
|
var index = findItem(relatedPosts, 'path', post.path);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
relatedPosts[index].weight += 1;
|
relatedPosts[index].weight += 1;
|
||||||
} else{
|
} else {
|
||||||
if (currentPost.path != post.path) {
|
if (currentPost.path != post.path) {
|
||||||
relatedPosts.push(relatedPost);
|
relatedPosts.push(relatedPost);
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
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 = 'lazyload' : 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|| random_cover()
|
var cover = relatedPosts[i].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 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>'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
@@ -61,16 +84,3 @@ function compare (attr) {
|
|||||||
return val2 - val1;
|
return val2 - val1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,6 +13,19 @@ body
|
|||||||
font-family: $font-family
|
font-family: $font-family
|
||||||
line-height: $text-line-height
|
line-height: $text-line-height
|
||||||
|
|
||||||
|
if !hexo-config('copy.enable')
|
||||||
|
user-select: none
|
||||||
|
-moz-user-select: none
|
||||||
|
-webkit-user-select: none
|
||||||
|
-ms-user-select: none
|
||||||
|
|
||||||
|
#body-wrap
|
||||||
|
position relative
|
||||||
|
flex: 1 auto
|
||||||
|
display: flex
|
||||||
|
flex-direction: column
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
*::-webkit-scrollbar
|
*::-webkit-scrollbar
|
||||||
width: 8px
|
width: 8px
|
||||||
height: 8px
|
height: 8px
|
||||||
@@ -23,6 +36,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,
|
||||||
@@ -58,20 +84,6 @@ h6
|
|||||||
transition: all 0.2s
|
transition: all 0.2s
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
#go-up
|
|
||||||
position: fixed
|
|
||||||
right: $go-up-right
|
|
||||||
bottom: $go-up-bottom
|
|
||||||
z-index: 100
|
|
||||||
font-size: $sidebar-icon-size
|
|
||||||
opacity: 0
|
|
||||||
cursor: pointer
|
|
||||||
transition: all .2s
|
|
||||||
|
|
||||||
.fancybox-caption
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
|
|
||||||
hr
|
hr
|
||||||
position: relative
|
position: relative
|
||||||
margin: 2rem auto
|
margin: 2rem auto
|
||||||
@@ -129,14 +141,47 @@ table
|
|||||||
background: $selection
|
background: $selection
|
||||||
color: $pale-grey
|
color: $pale-grey
|
||||||
|
|
||||||
.text-center
|
|
||||||
|
.full_page #site-title,
|
||||||
|
.full_page #site-sub-title,
|
||||||
|
#site-name,
|
||||||
|
#aside_content .author-info__name,
|
||||||
|
#aside_content .author-info__description
|
||||||
|
font-family: $site-name-font
|
||||||
|
|
||||||
|
.is_right
|
||||||
|
text-align: right
|
||||||
|
|
||||||
|
.is_left
|
||||||
|
text-align: left
|
||||||
|
|
||||||
|
.is_center
|
||||||
text-align: center
|
text-align: center
|
||||||
.pull-left
|
|
||||||
|
.is_visible
|
||||||
|
display: block !important
|
||||||
|
|
||||||
|
.is_invisible
|
||||||
|
display: none !important
|
||||||
|
|
||||||
|
.is_hidden
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
|
.pull_left
|
||||||
float: left
|
float: left
|
||||||
|
|
||||||
.pull-right
|
.pull_right
|
||||||
float: right
|
float: right
|
||||||
|
|
||||||
|
.fireworks
|
||||||
|
position: fixed
|
||||||
|
z-index: -1
|
||||||
|
pointer-events: none
|
||||||
|
|
||||||
|
|
||||||
|
.fireworks
|
||||||
|
z-index: 99999
|
||||||
|
|
||||||
@media screen and (max-width: $bg)
|
@media screen and (max-width: $bg)
|
||||||
i#toggle-sidebar,
|
i#toggle-sidebar,
|
||||||
#sidebar
|
#sidebar
|
||||||
@@ -146,208 +191,182 @@ table
|
|||||||
padding-left: 0 !important
|
padding-left: 0 !important
|
||||||
|
|
||||||
|
|
||||||
|
// 懶加載
|
||||||
|
.lazyload,
|
||||||
|
.lazyloading
|
||||||
|
opacity: 0
|
||||||
|
|
||||||
// valine
|
.lazyloaded
|
||||||
#vcomment
|
opacity: 1
|
||||||
font-size: inherit
|
transition: opacity 0.3s
|
||||||
|
|
||||||
input
|
|
||||||
font-size: 0.65rem
|
|
||||||
|
|
||||||
button
|
img[src=""],img:not([src])
|
||||||
font-size: .7rem
|
|
||||||
padding: .3rem 1rem
|
|
||||||
background-color: $light-blue
|
|
||||||
color: #fff
|
|
||||||
border-color: #fff
|
|
||||||
|
|
||||||
textarea
|
|
||||||
font-size: 0.7rem
|
|
||||||
background: url(/img/comment_bg.png) 100% 100% no-repeat
|
|
||||||
|
|
||||||
.info
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.vimg
|
|
||||||
border: 0
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
-moz-transform: rotate(540deg)
|
|
||||||
-o-transform: rotate(540deg)
|
|
||||||
-webkit-transform: rotate(540deg)
|
|
||||||
transform: rotate(540deg)
|
|
||||||
.vcount
|
|
||||||
font-size: 0.775rem
|
|
||||||
|
|
||||||
.vnum
|
|
||||||
font-size: 1.1rem
|
|
||||||
|
|
||||||
.vnick
|
|
||||||
font-size: 100%
|
|
||||||
|
|
||||||
.vsys
|
|
||||||
font-size: 70%
|
|
||||||
|
|
||||||
.vtime
|
|
||||||
font-size: .65rem
|
|
||||||
|
|
||||||
.vcontent
|
|
||||||
font-size: 100%
|
|
||||||
|
|
||||||
.vat
|
|
||||||
font-size: .7125rem;
|
|
||||||
color: $cyan;
|
|
||||||
border: 1px solid $cyan;
|
|
||||||
padding: 0 .8rem;
|
|
||||||
border-radius: 5px;
|
|
||||||
|
|
||||||
|
|
||||||
#site-title, #site-sub-title,
|
|
||||||
#site-name,
|
|
||||||
#aside_content .author-info__name,
|
|
||||||
#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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#rightside
|
|
||||||
right: -38px
|
|
||||||
z-index: 100
|
|
||||||
position: fixed
|
|
||||||
bottom: 50px
|
|
||||||
padding-bottom: 32px
|
|
||||||
opacity: 0
|
opacity: 0
|
||||||
transition: all .2s
|
|
||||||
|
|
||||||
#readmode,#font_plus,#font_minus
|
.justified-gallery
|
||||||
width: 30px
|
img
|
||||||
height: 30px
|
opacity 0
|
||||||
background-color: $light-blue
|
.fancybox
|
||||||
color: #e3e8ee
|
width: auto
|
||||||
text-align: center
|
text-align: inherit
|
||||||
line-height: 29px
|
.img-alt
|
||||||
font-size: 16px
|
|
||||||
display: block
|
|
||||||
margin-bottom: 2px
|
|
||||||
cursor: pointer
|
|
||||||
text-decoration: none
|
|
||||||
|
|
||||||
#font_minus,#font_plus
|
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
.translate_chn_to_cht
|
.medium-zoom-image--opened
|
||||||
width: 30px
|
margin: 0 !important
|
||||||
height: 30px
|
z-index: 99999 !important
|
||||||
background-color: $light-blue
|
|
||||||
color: #e3e8ee
|
|
||||||
text-align: center
|
|
||||||
line-height: 29px
|
|
||||||
font-size: 16px
|
|
||||||
display: block
|
|
||||||
margin-bottom: 2px
|
|
||||||
cursor: pointer
|
|
||||||
text-decoration: none
|
|
||||||
|
|
||||||
.nightshift
|
.medium-zoom-overlay
|
||||||
width: 30px
|
z-index: 99999 !important
|
||||||
height: 30px
|
|
||||||
background-color: $light-blue
|
// hexo tag video
|
||||||
color: #e3e8ee
|
.video-container
|
||||||
text-align: center
|
position: relative
|
||||||
font-size: 17px
|
padding-top: 56.25%
|
||||||
display: block
|
height: 0
|
||||||
margin-bottom: 2px
|
overflow: hidden
|
||||||
cursor: pointer
|
margin-bottom: 0.8rem
|
||||||
padding-top: 6px
|
|
||||||
|
iframe
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: 0
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
margin-top: 0
|
||||||
|
|
||||||
|
|
||||||
a
|
.layout_page,
|
||||||
&:hover
|
.layout_post,
|
||||||
color: white
|
#footer
|
||||||
&:after
|
animation: main 1s
|
||||||
color: white
|
|
||||||
|
|
||||||
|
#nav,
|
||||||
|
#top-container
|
||||||
|
animation: header 1s
|
||||||
|
|
||||||
|
#site-title
|
||||||
|
animation: titlescale 1s
|
||||||
|
|
||||||
|
canvas,
|
||||||
|
#web_bg
|
||||||
|
animation: to_show 4s
|
||||||
|
|
||||||
|
.card-announcement-animation
|
||||||
|
animation: announ_animation .8s linear infinite
|
||||||
|
color: #FF0000
|
||||||
|
|
||||||
|
.scroll-down-effects
|
||||||
|
animation: scroll-down-effect 1.5s infinite
|
||||||
|
|
||||||
|
if hexo-config("avatar_effect") == true
|
||||||
|
.avatar_img
|
||||||
|
animation: avatar_turn_around 2s linear infinite
|
||||||
|
|
||||||
|
.reward-main
|
||||||
|
animation: donate_effcet .3s .1s ease both
|
||||||
|
|
||||||
|
#rightside-config-hide
|
||||||
|
animation: rightside_in_animate .3s
|
||||||
|
|
||||||
|
@keyframes scroll-down-effect
|
||||||
|
0%
|
||||||
|
opacity: 0.4
|
||||||
|
top: 0
|
||||||
|
50%
|
||||||
|
opacity: 1
|
||||||
|
top: -16px
|
||||||
|
100%
|
||||||
|
opacity: 0.4
|
||||||
|
top: 0
|
||||||
|
|
||||||
|
@keyframes header
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(-50px)
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0)
|
||||||
|
|
||||||
|
@keyframes headerNoOpacity
|
||||||
|
0%
|
||||||
|
transform: translateY(-50px)
|
||||||
|
100%
|
||||||
|
transform: translateY(0)
|
||||||
|
|
||||||
|
@keyframes main
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(50px)
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0)
|
||||||
|
|
||||||
|
@keyframes titlescale
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
transform: scale(0.7)
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
transform: scale(1)
|
||||||
|
|
||||||
|
@keyframes search_close
|
||||||
|
0%
|
||||||
|
opacity: 1
|
||||||
|
transform: scale(1)
|
||||||
|
100%
|
||||||
|
opacity: 0
|
||||||
|
transform: scale(0.7)
|
||||||
|
|
||||||
|
@keyframes to_show
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
@keyframes avatar_turn_around
|
||||||
|
from
|
||||||
|
transform: rotate(0deg)
|
||||||
|
to
|
||||||
|
transform: rotate(360deg)
|
||||||
|
|
||||||
|
@keyframes sub_menus
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(10px)
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0)
|
||||||
|
|
||||||
|
@keyframes donate_effcet
|
||||||
|
0%
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(-20px)
|
||||||
|
100%
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0)
|
||||||
|
|
||||||
|
@keyframes announ_animation
|
||||||
|
0%,to
|
||||||
|
transform: scale(1)
|
||||||
|
50%
|
||||||
|
transform: scale(1.2)
|
||||||
|
|
||||||
|
@keyframes rightside_in_animate
|
||||||
|
0%
|
||||||
|
transform: translateX(28px)
|
||||||
|
100%
|
||||||
|
transform: translateX(0)
|
||||||
|
|
||||||
|
@keyframes rightside_out_animate
|
||||||
|
0%
|
||||||
|
transform: translateX(0)
|
||||||
|
100%
|
||||||
|
transform: translateX(28px)
|
||||||
|
|
||||||
|
@keyframes right_to_left
|
||||||
|
0%
|
||||||
|
transform: translateX(100px)
|
||||||
|
100%
|
||||||
|
transform: translateX(0)
|
||||||
|
|
||||||
|
|
||||||
.comment_headling
|
|
||||||
font-size: 20px
|
|
||||||
font-weight: 700
|
|
||||||
margin-bottom: 10px
|
|
||||||
|
|
||||||
|
|
||||||
// bookmark 樣式
|
|
||||||
.fc-container .fancybox-bg {
|
|
||||||
background: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-is-open.fc-container .fancybox-bg {
|
|
||||||
opacity: 0.95;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fc-content {
|
|
||||||
margin: 20px;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Custom animation */
|
|
||||||
.fancybox-fx-material.fancybox-slide--previous,
|
|
||||||
.fancybox-fx-material.fancybox-slide--next {
|
|
||||||
transform: translateY(-60px) scale(1.1);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fancybox-fx-material.fancybox-slide--current {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0) scale(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bookmark-ok
|
|
||||||
background: #FF6666;
|
|
||||||
border-width: 0;
|
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 7px 20px;
|
|
||||||
line-height: 1.5;
|
|
||||||
border-radius: 20px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 80%;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 5px 5px 5px 0;
|
|
||||||
display: inline-block;
|
|
||||||
cursor: pointer;
|
|
||||||
outline: none;
|
|
||||||
transition: all .2s ease-in-out;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
.tright
|
|
||||||
text-align: right
|
|
||||||
|
|
||||||
.is_visible
|
|
||||||
display: block !important
|
|
||||||
|
|
||||||
.fireworks
|
|
||||||
position: fixed
|
|
||||||
z-index: -1
|
|
||||||
pointer-events: none
|
|
||||||
@@ -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
|
||||||
@@ -41,6 +28,17 @@ blockquote
|
|||||||
color: $blockquote-color
|
color: $blockquote-color
|
||||||
background-color: lighten($blockquote-padding-color,33)
|
background-color: lighten($blockquote-padding-color,33)
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: 0 !important
|
||||||
|
padding: 0.5rem 0
|
||||||
|
|
||||||
|
footer
|
||||||
|
padding: 0 0 0.5rem 0
|
||||||
|
cite
|
||||||
|
&:before
|
||||||
|
content: "—"
|
||||||
|
padding: 0 .3em
|
||||||
|
|
||||||
.article-container
|
.article-container
|
||||||
pre,
|
pre,
|
||||||
code
|
code
|
||||||
@@ -62,11 +60,7 @@ blockquote
|
|||||||
color: $highlight-foreground
|
color: $highlight-foreground
|
||||||
text-shadow: none
|
text-shadow: none
|
||||||
|
|
||||||
.highlight
|
figure.highlight
|
||||||
@extend $code-block
|
|
||||||
position: relative
|
|
||||||
border-radius: 1px
|
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0
|
top: 0
|
||||||
@@ -76,6 +70,11 @@ blockquote
|
|||||||
background: darken($highlight-background, 5)
|
background: darken($highlight-background, 5)
|
||||||
content: ""
|
content: ""
|
||||||
|
|
||||||
|
.highlight
|
||||||
|
@extend $code-block
|
||||||
|
position: relative
|
||||||
|
border-radius: 1px
|
||||||
|
|
||||||
pre
|
pre
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 8px 0
|
padding: 8px 0
|
||||||
@@ -102,18 +101,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
|
||||||
|
|||||||
@@ -5,34 +5,27 @@
|
|||||||
-webkit-box-shadow: 0 4px 8px 6px rgba(7,17,27,.06)
|
-webkit-box-shadow: 0 4px 8px 6px rgba(7,17,27,.06)
|
||||||
box-shadow: 0 4px 8px 6px rgba(7,17,27,.06)
|
box-shadow: 0 4px 8px 6px rgba(7,17,27,.06)
|
||||||
border-radius: 8px
|
border-radius: 8px
|
||||||
-webkit-transition: all .3s
|
|
||||||
-moz-transition: all .3s
|
|
||||||
-o-transition: all .3s
|
|
||||||
-ms-transition: all .3s
|
|
||||||
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
|
||||||
-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)
|
||||||
|
|
||||||
.card-author
|
.card-author
|
||||||
img
|
img
|
||||||
height: 128px
|
height: 120px
|
||||||
width: 128px
|
width: 120px
|
||||||
|
padding: 0
|
||||||
display: inline-block
|
display: inline-block
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
border-radius: 70px
|
border-radius: 70px
|
||||||
transition: all .3s
|
transition: all .3s
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
-moz-transform: rotate(540deg)
|
|
||||||
-o-transform: rotate(540deg)
|
|
||||||
-webkit-transform: rotate(540deg)
|
|
||||||
transform: rotate(540deg)
|
transform: rotate(540deg)
|
||||||
|
|
||||||
.author-info
|
.author-info
|
||||||
&__name
|
&__name
|
||||||
font-size: 1.1rem
|
font-size: 1.1rem
|
||||||
@@ -55,10 +48,9 @@
|
|||||||
.headline
|
.headline
|
||||||
display: block
|
display: block
|
||||||
font-size: 0.7rem
|
font-size: 0.7rem
|
||||||
letter-spacing: 1px
|
|
||||||
margin-bottom: -21px
|
margin-bottom: -21px
|
||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
color:#4c4948
|
color:$font-black
|
||||||
|
|
||||||
#aside-social-icons
|
#aside-social-icons
|
||||||
margin: 0.5rem auto -0.7rem
|
margin: 0.5rem auto -0.7rem
|
||||||
@@ -67,8 +59,7 @@
|
|||||||
|
|
||||||
.social-icon
|
.social-icon
|
||||||
margin: 0 0.5rem
|
margin: 0 0.5rem
|
||||||
color: #4c4948
|
color: $font-black
|
||||||
/* text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15) */
|
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
@@ -76,18 +67,12 @@
|
|||||||
transition: all 0.3s
|
transition: all 0.3s
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
-moz-transform: rotate(540deg)
|
|
||||||
-o-transform: rotate(540deg)
|
|
||||||
-webkit-transform: rotate(540deg)
|
|
||||||
transform: rotate(540deg)
|
transform: rotate(540deg)
|
||||||
|
|
||||||
|
|
||||||
a#bookmark-it
|
#bookmark-it
|
||||||
display: inline-block
|
|
||||||
margin-top: .2rem
|
margin-top: .2rem
|
||||||
padding: 0 1rem
|
|
||||||
height: 1.6rem
|
height: 1.6rem
|
||||||
background: $light-blue
|
background-color: $light-blue
|
||||||
color: #fff
|
color: #fff
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
line-height: 1.6rem
|
line-height: 1.6rem
|
||||||
@@ -95,14 +80,17 @@
|
|||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
z-index: 1
|
z-index: 1
|
||||||
|
|
||||||
.toggle_change--primary,.bookmark--primary
|
span
|
||||||
|
padding-left: 10px
|
||||||
|
|
||||||
|
.bookmark--primary
|
||||||
color: $ruby
|
color: $ruby
|
||||||
|
|
||||||
.toggle_change--animated,.bookmark--animated
|
.bookmark--animated
|
||||||
transition-property: color
|
transition-property: color
|
||||||
transition-duration: 1s
|
transition-duration: 1s
|
||||||
|
|
||||||
&:before {
|
&:before
|
||||||
content: ""
|
content: ""
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0
|
top: 0
|
||||||
@@ -116,18 +104,13 @@
|
|||||||
transition-duration: 0.5s
|
transition-duration: 0.5s
|
||||||
transition-timing-function: ease-out
|
transition-timing-function: ease-out
|
||||||
z-index: -1
|
z-index: -1
|
||||||
}
|
|
||||||
|
&:hover
|
||||||
&:hover {
|
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
&:before {
|
&:before
|
||||||
transform: scaleX(1)
|
transform: scaleX(1)
|
||||||
transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66)
|
transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66)
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-content
|
.card-content
|
||||||
padding: 1rem 1.2rem
|
padding: 1rem 1.2rem
|
||||||
@@ -141,37 +124,24 @@
|
|||||||
flex-basis: auto
|
flex-basis: auto
|
||||||
justify-content: center
|
justify-content: center
|
||||||
|
|
||||||
|
|
||||||
.item_headline
|
.item_headline
|
||||||
font-size: 0.8rem
|
font-size: 0.8rem
|
||||||
|
|
||||||
span
|
span
|
||||||
margin-left: 10px
|
margin-left: 10px
|
||||||
|
|
||||||
.card-tag-cloud a
|
.card-tag-cloud
|
||||||
text-decoration: none
|
a
|
||||||
position: relative
|
text-decoration: none
|
||||||
padding-bottom: 0.3rem
|
position: relative
|
||||||
word-break: keep-all
|
padding-bottom: 0.3rem
|
||||||
|
word-break: keep-all
|
||||||
&::after
|
|
||||||
position: absolute
|
|
||||||
bottom: 0
|
|
||||||
left: 0
|
|
||||||
z-index: -1
|
|
||||||
width: 0
|
|
||||||
height: 3px
|
|
||||||
background-color: lighten($theme-color, 30%)
|
|
||||||
content: ""
|
|
||||||
transition: all 0.3s ease-in-out
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
color: $light-blue !important
|
|
||||||
|
|
||||||
&::after
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $light-blue !important
|
||||||
|
|
||||||
|
// &::after
|
||||||
|
// width: 100%
|
||||||
|
|
||||||
.aside_recent_item
|
.aside_recent_item
|
||||||
margin: 10px 0 -15px 0
|
margin: 10px 0 -15px 0
|
||||||
@@ -179,31 +149,35 @@
|
|||||||
.aside_recent_post
|
.aside_recent_post
|
||||||
a
|
a
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
color: #4c4948
|
color: $font-black
|
||||||
|
|
||||||
.aside_recent_post
|
.aside_recent_post
|
||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
.aside_post_cover
|
.aside_post_cover
|
||||||
height: 70px
|
height: 66px
|
||||||
width: 70px
|
width: 66px
|
||||||
float: left
|
float: left
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
.aside_post_bg
|
.aside_post_bg
|
||||||
object-fit: cover
|
object-fit: cover
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
padding: 0
|
||||||
|
transition: all .6s
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
|
transform: scale(1.1)
|
||||||
|
|
||||||
#aside_title
|
#aside_title
|
||||||
padding-top: 4px
|
|
||||||
|
|
||||||
.aside_post_meta
|
.aside_post_meta
|
||||||
font-size: 0.6rem
|
font-size: 0.6rem
|
||||||
padding-left: 5px
|
padding-left: 10px
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
.aside_post_title
|
.aside_post_title
|
||||||
line-height: 1rem
|
line-height: 1rem
|
||||||
@@ -211,14 +185,12 @@
|
|||||||
-webkit-line-clamp: 2
|
-webkit-line-clamp: 2
|
||||||
-webkit-box-orient: vertical
|
-webkit-box-orient: vertical
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
height: 41px
|
height: 40px
|
||||||
padding-left: 5px
|
padding-left: 10px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: $light-blue !important
|
color: $light-blue !important
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.aside_category_item,.archive-list
|
.aside_category_item,.archive-list
|
||||||
list-style: none
|
list-style: none
|
||||||
margin-bottom: -3px
|
margin-bottom: -3px
|
||||||
@@ -233,14 +205,18 @@
|
|||||||
|
|
||||||
.aside_category_list,.archive-list-item
|
.aside_category_list,.archive-list-item
|
||||||
margin-left: -40px
|
margin-left: -40px
|
||||||
padding: 0.2rem 1rem
|
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: $light-blue
|
background-color: $light-blue
|
||||||
color: #363636
|
color: #363636
|
||||||
a
|
a
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
color: #4c4948
|
color: $font-black
|
||||||
|
padding: 0.2rem 1rem
|
||||||
|
transition: .2s
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
padding: 0.2rem 0.85rem
|
||||||
|
|
||||||
.aside_category_list_name,.archive-list-link
|
.aside_category_list_name,.archive-list-link
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
@@ -251,17 +227,11 @@
|
|||||||
.aside_category_list_link,.archive-list-item
|
.aside_category_list_link,.archive-list-item
|
||||||
display: flex
|
display: flex
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.aside_category_list_length,.archive-list-count
|
.aside_category_list_length,.archive-list-count
|
||||||
float: right
|
float: right
|
||||||
|
|
||||||
.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
|
||||||
@@ -284,17 +254,6 @@
|
|||||||
float: right
|
float: right
|
||||||
display: inline-block
|
display: inline-block
|
||||||
|
|
||||||
|
|
||||||
@keyframes announ_animation{
|
|
||||||
0%,to{
|
|
||||||
color: #4c4948
|
|
||||||
}
|
|
||||||
50%{
|
|
||||||
color: #FF0000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 900px)
|
@media screen and (max-width: 900px)
|
||||||
.layout_page
|
.layout_page
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
@@ -303,6 +262,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
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
li
|
li
|
||||||
position: relative
|
position: relative
|
||||||
margin: 0.3rem 0
|
margin: 0.3rem 0
|
||||||
// padding-left: 0.3rem
|
|
||||||
padding: 0.1rem 0.5rem 0.1rem 1.5rem !important
|
padding: 0.1rem 0.5rem 0.1rem 1.5rem !important
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
|
|||||||
@@ -1,2 +1,66 @@
|
|||||||
#disqus_thread
|
#disqus_thread
|
||||||
margin-top: 1rem
|
margin-top: 1rem
|
||||||
|
|
||||||
|
.comment_headling
|
||||||
|
font-size: 20px
|
||||||
|
font-weight: 700
|
||||||
|
margin-bottom: 10px
|
||||||
|
|
||||||
|
// valine
|
||||||
|
#vcomment
|
||||||
|
font-size: inherit
|
||||||
|
|
||||||
|
input
|
||||||
|
font-size: 0.65rem
|
||||||
|
|
||||||
|
button
|
||||||
|
font-size: .7rem
|
||||||
|
padding: .3rem 1rem
|
||||||
|
background-color: $light-blue
|
||||||
|
color: #fff
|
||||||
|
border-color: #fff
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: darken($light-blue, 40)
|
||||||
|
|
||||||
|
textarea
|
||||||
|
font-size: 0.7rem
|
||||||
|
if hexo-config("valine.bg")
|
||||||
|
background: url(convert(hexo-config("valine.bg"))) 100% 100% no-repeat
|
||||||
|
|
||||||
|
.info
|
||||||
|
display: none
|
||||||
|
|
||||||
|
.vimg
|
||||||
|
border: 0
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
transform: rotate(540deg)
|
||||||
|
.vcount
|
||||||
|
font-size: 0.775rem
|
||||||
|
|
||||||
|
.vnum
|
||||||
|
font-size: 1.1rem
|
||||||
|
|
||||||
|
.vsys
|
||||||
|
font-size: 80%
|
||||||
|
|
||||||
|
.vtime
|
||||||
|
font-size: .65rem
|
||||||
|
|
||||||
|
.vcontent
|
||||||
|
font-size: 100%
|
||||||
|
|
||||||
|
.vat
|
||||||
|
font-size: .7125rem
|
||||||
|
color: $cyan
|
||||||
|
border: 1px solid $cyan
|
||||||
|
padding: 0 .8rem
|
||||||
|
border-radius: 5px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: alpha($cyan,0.5)
|
||||||
|
|
||||||
|
code, pre
|
||||||
|
font-size: 98%
|
||||||
|
|
||||||
|
|||||||
@@ -24,13 +24,10 @@
|
|||||||
text-overflow: ellipsis
|
text-overflow: ellipsis
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
border-radius: 8px
|
border-radius: 8px
|
||||||
-webkit-transform: perspective(1px) translateZ(0)
|
|
||||||
transform: perspective(1px) translateZ(0)
|
transform: perspective(1px) translateZ(0)
|
||||||
box-shadow: 0 0 1px rgba(0, 0, 0, 0)
|
box-shadow: 0 0 1px rgba(0, 0, 0, 0)
|
||||||
position: relative
|
position: relative
|
||||||
-webkit-transition-property: color
|
|
||||||
transition-property: color
|
transition-property: color
|
||||||
-webkit-transition-duration: 0.3s
|
|
||||||
transition-duration: 0.3s
|
transition-duration: 0.3s
|
||||||
|
|
||||||
img
|
img
|
||||||
@@ -39,14 +36,12 @@
|
|||||||
margin: 11px 10px
|
margin: 11px 10px
|
||||||
width: 70px
|
width: 70px
|
||||||
height: 70px
|
height: 70px
|
||||||
border: 0px solid #eaeefb
|
border: 0px solid #eaeefb
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
img
|
img
|
||||||
filter: unqoute("progid:DXImageTransform.Microsoft.BasicImage(rotation=3)")
|
filter: unqoute("progid:DXImageTransform.Microsoft.BasicImage(rotation=3)")
|
||||||
-moz-transform: rotate(540deg)
|
|
||||||
-o-transform: rotate(540deg)
|
|
||||||
-webkit-transform: rotate(540deg)
|
|
||||||
transform: rotate(540deg)
|
transform: rotate(540deg)
|
||||||
|
|
||||||
&:before
|
&:before
|
||||||
@@ -58,13 +53,9 @@
|
|||||||
right: 0
|
right: 0
|
||||||
bottom: 0
|
bottom: 0
|
||||||
background: $light-blue !important
|
background: $light-blue !important
|
||||||
-webkit-transform: scale(0)
|
|
||||||
transform: scale(0)
|
transform: scale(0)
|
||||||
-webkit-transition-property: transform
|
|
||||||
transition-property: transform
|
transition-property: transform
|
||||||
-webkit-transition-duration: 0.3s
|
|
||||||
transition-duration: 0.3s
|
transition-duration: 0.3s
|
||||||
-webkit-transition-timing-function: ease-out
|
|
||||||
transition-timing-function: ease-out
|
transition-timing-function: ease-out
|
||||||
|
|
||||||
.md-links-item:hover,
|
.md-links-item:hover,
|
||||||
@@ -94,7 +85,7 @@
|
|||||||
.post-cards
|
.post-cards
|
||||||
margin-top: 5px
|
margin-top: 5px
|
||||||
min-height: 100px
|
min-height: 100px
|
||||||
padding: 15px
|
padding: 0 15px
|
||||||
border-radius: 15px
|
border-radius: 15px
|
||||||
|
|
||||||
.comment-word
|
.comment-word
|
||||||
@@ -121,8 +112,6 @@
|
|||||||
li
|
li
|
||||||
width: calc(100%/2 - 14px)
|
width: calc(100%/2 - 14px)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width:600px)
|
@media screen and (max-width:600px)
|
||||||
.flink
|
.flink
|
||||||
.md-links
|
.md-links
|
||||||
|
|||||||
@@ -1,17 +1,30 @@
|
|||||||
footer
|
#footer
|
||||||
margin-top: 1rem
|
margin-top: 1rem
|
||||||
background: $light-blue
|
background: $light-blue
|
||||||
background-attachment: local
|
background-attachment: local
|
||||||
|
background-position: bottom
|
||||||
|
background-size: cover
|
||||||
|
position: relative
|
||||||
|
|
||||||
&.footer-bg
|
if hexo-config('footer_bg') != false
|
||||||
background-position: bottom
|
&:before
|
||||||
background-size: cover
|
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-wrap
|
||||||
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
|
||||||
@@ -24,3 +37,7 @@ footer
|
|||||||
.footer-separator
|
.footer-separator
|
||||||
margin: 0 0.2rem
|
margin: 0 0.2rem
|
||||||
|
|
||||||
|
.icp-icon
|
||||||
|
padding: 0 4px
|
||||||
|
vertical-align: text-bottom
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
#nav
|
#nav
|
||||||
position: relative
|
position: relative
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
background-color: $light-blue
|
|
||||||
background-position: center
|
|
||||||
background-size: cover
|
|
||||||
|
|
||||||
|
|
||||||
&.full_page
|
&.full_page
|
||||||
background-attachment: local
|
height: $index_top_img_height
|
||||||
height: 100vh
|
|
||||||
|
|
||||||
&.bg_local
|
.nav_bg
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
background-color: $light-blue
|
||||||
|
background-position: center
|
||||||
|
background-size: cover
|
||||||
background-attachment: local
|
background-attachment: local
|
||||||
|
|
||||||
|
&.not_index_bg
|
||||||
|
height: 20rem
|
||||||
|
|
||||||
#site-social-icons
|
#site-social-icons
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
@@ -33,7 +35,7 @@
|
|||||||
#site-info
|
#site-info
|
||||||
position: absolute
|
position: absolute
|
||||||
width: 100%
|
width: 100%
|
||||||
top: 43%
|
top: $index_site_info_top
|
||||||
|
|
||||||
#site-title,
|
#site-title,
|
||||||
#site-sub-title
|
#site-sub-title
|
||||||
@@ -49,6 +51,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
|
||||||
@@ -58,6 +65,12 @@
|
|||||||
font-size: 30px
|
font-size: 30px
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
.scroll-down-effects
|
||||||
|
position: absolute
|
||||||
|
color: $white
|
||||||
|
|
||||||
|
#header
|
||||||
|
position: relative
|
||||||
|
|
||||||
#page-header
|
#page-header
|
||||||
position: absolute
|
position: absolute
|
||||||
@@ -67,76 +80,18 @@
|
|||||||
width: 100%
|
width: 100%
|
||||||
border: none
|
border: none
|
||||||
font-size: 18px
|
font-size: 18px
|
||||||
transition: all 0.2s ease-in-out
|
transition: all .3s
|
||||||
|
opacity: 0
|
||||||
|
|
||||||
.toggle-menu
|
.toggle-menu
|
||||||
display: none
|
display: none
|
||||||
padding-top: 0.6rem
|
padding-top: 0.6rem
|
||||||
color: $light-grey
|
color: $light-grey
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
transition: all 0.2s ease-in-out
|
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: $white
|
color: $white
|
||||||
|
|
||||||
.menu-icon-first,
|
|
||||||
.menu-icon-second,
|
|
||||||
.menu-icon-third
|
|
||||||
width: 18px
|
|
||||||
height: 3px
|
|
||||||
background-color: #eee
|
|
||||||
margin: 2px 0
|
|
||||||
transition: 0.4s
|
|
||||||
|
|
||||||
&.close
|
|
||||||
/* 旋转第一条横线 */
|
|
||||||
.menu-icon-first
|
|
||||||
-webkit-transform: rotate(45deg) translate(4px, 3px)
|
|
||||||
transform: rotate(45deg) translate(4px, 3px)
|
|
||||||
|
|
||||||
/* 隐藏第二条横线 */
|
|
||||||
.menu-icon-second
|
|
||||||
opacity: 0
|
|
||||||
|
|
||||||
/* 旋转第三条横线 */
|
|
||||||
.menu-icon-third
|
|
||||||
-webkit-transform: rotate(-45deg) translate(4px, -4px)
|
|
||||||
transform: rotate(-45deg) translate(4px, -4px)
|
|
||||||
|
|
||||||
.menus
|
|
||||||
.mobile_author_icon
|
|
||||||
display: none
|
|
||||||
padding: 3rem 1.5rem 0
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
img
|
|
||||||
height: 120px
|
|
||||||
width: 120px
|
|
||||||
display: inline-block
|
|
||||||
vertical-align: top
|
|
||||||
border-radius: 70px
|
|
||||||
-webkit-transition: all .3s
|
|
||||||
-moz-transition: all .3s
|
|
||||||
-o-transition: all .3s
|
|
||||||
-ms-transition: all .3s
|
|
||||||
transition: all .3s
|
|
||||||
|
|
||||||
hr
|
|
||||||
margin: 1rem auto
|
|
||||||
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
|
||||||
@@ -144,30 +99,6 @@
|
|||||||
&:hover
|
&:hover
|
||||||
color: $white
|
color: $white
|
||||||
|
|
||||||
.site-page
|
|
||||||
position: relative
|
|
||||||
margin-left: 0.6rem
|
|
||||||
padding-bottom: 0.3rem
|
|
||||||
text-shadow: 0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.3)
|
|
||||||
font-size: 0.7rem
|
|
||||||
cursor: pointer
|
|
||||||
margin-left: 1rem
|
|
||||||
|
|
||||||
&::after
|
|
||||||
position: absolute
|
|
||||||
bottom: 0
|
|
||||||
left: 0
|
|
||||||
z-index: -1
|
|
||||||
width: 0
|
|
||||||
height: 3px
|
|
||||||
background-color: lighten($theme-color, 30%)
|
|
||||||
content: ""
|
|
||||||
transition: all 0.3s ease-in-out
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
&::after
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
&.fixed
|
&.fixed
|
||||||
position: fixed
|
position: fixed
|
||||||
top: -60px
|
top: -60px
|
||||||
@@ -178,97 +109,152 @@
|
|||||||
|
|
||||||
&.open-sidebar
|
&.open-sidebar
|
||||||
.site-page
|
.site-page
|
||||||
display: none
|
visibility: hidden
|
||||||
opacity: 0
|
|
||||||
|
|
||||||
a,
|
a,
|
||||||
#site-name
|
#site-name,
|
||||||
|
.toggle-menu
|
||||||
color: $light-black
|
color: $light-black
|
||||||
text-shadow: none
|
text-shadow: none
|
||||||
|
|
||||||
.menu-icon-first,
|
|
||||||
.menu-icon-second,
|
|
||||||
.menu-icon-third
|
|
||||||
background-color: $light-black
|
|
||||||
text-shadow: none
|
|
||||||
|
|
||||||
|
&:hover
|
||||||
&a,#site-name
|
color: $light-blue
|
||||||
&:hover
|
|
||||||
color: $light-blue
|
|
||||||
|
|
||||||
&.visible
|
&.visible
|
||||||
transform: translate3d(0, 100%, 0)
|
transform: translate3d(0, 100%, 0)
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
.menus_item_child
|
||||||
|
background-color: $white !important
|
||||||
|
|
||||||
|
&:before
|
||||||
|
border-color: transparent transparent $white !important
|
||||||
|
|
||||||
#site-name
|
#site-name
|
||||||
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
@media screen and (min-width: $sm)
|
.menus_item
|
||||||
|
display: inline-block
|
||||||
|
padding: 0 0 0 0.7rem
|
||||||
|
|
||||||
|
&:hover,&:focus
|
||||||
|
.menus_item_child
|
||||||
|
display: block
|
||||||
|
|
||||||
|
.menus-expand
|
||||||
|
transform: rotate(180deg) !important
|
||||||
|
|
||||||
|
.menus-expand
|
||||||
|
padding: 4px
|
||||||
|
transform: rotate(0deg)
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
.menus_item_child
|
||||||
|
position: absolute
|
||||||
|
background-color: alpha($white, 0.8)
|
||||||
|
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
|
||||||
|
padding: 0
|
||||||
|
margin-top: 10px
|
||||||
|
|
||||||
|
&: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)
|
||||||
|
|
||||||
|
li
|
||||||
|
list-style: none
|
||||||
|
text-align: center
|
||||||
|
padding: 0px 10px
|
||||||
|
|
||||||
|
&:first-child
|
||||||
|
padding: 6px 10px 0
|
||||||
|
|
||||||
|
&:last-child
|
||||||
|
padding: 0px 10px 6px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
a,i
|
||||||
|
color: $theme-color
|
||||||
|
|
||||||
|
a
|
||||||
|
color: #3b3a3a
|
||||||
|
text-shadow: none
|
||||||
|
#search_button
|
||||||
|
padding: 0 0 0 0.7rem
|
||||||
|
|
||||||
|
.site-page
|
||||||
|
position: relative
|
||||||
|
padding-bottom: 0.3rem
|
||||||
|
text-shadow: 0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.3)
|
||||||
|
font-size: 0.7rem
|
||||||
|
cursor: pointer
|
||||||
|
|
||||||
|
#page-header .menus_item > .site-page
|
||||||
|
&::after
|
||||||
|
position: absolute
|
||||||
|
bottom: 0
|
||||||
|
left: 0
|
||||||
|
z-index: -1
|
||||||
|
width: 0
|
||||||
|
height: 3px
|
||||||
|
background-color: lighten($theme-color, 30%)
|
||||||
|
content: ""
|
||||||
|
transition: all 0.3s ease-in-out
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
&::after
|
||||||
|
width: 100%
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (min-width: $sm)
|
||||||
#site-title
|
#site-title
|
||||||
font-size: 2rem
|
font-size: 2rem
|
||||||
|
|
||||||
#site-sub-title
|
#site-sub-title
|
||||||
font-size: 1.2rem
|
font-size: 1.2rem
|
||||||
|
|
||||||
@media screen and (max-width: $sm)
|
|
||||||
|
|
||||||
|
@media screen and (max-width: $sm)
|
||||||
#page-header
|
#page-header
|
||||||
padding: 10px 0.8rem
|
padding: 10px 0.8rem
|
||||||
|
|
||||||
.toggle-menu
|
#nav
|
||||||
|
#site-social-icons
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.menus
|
&.not_index_bg
|
||||||
position: fixed
|
height: 14rem
|
||||||
top: 0
|
|
||||||
right: 0
|
#page_site-info
|
||||||
width: 100%
|
top: 7rem
|
||||||
height 101vh
|
|
||||||
background: $white
|
#top-container
|
||||||
cursor: pointer
|
height: 14rem
|
||||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.27)
|
|
||||||
z-index: -1
|
#post-info
|
||||||
overflow: auto
|
bottom: 1rem
|
||||||
|
padding: 0 5%
|
||||||
|
|
||||||
|
.mobile_hidden
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
a
|
|
||||||
display: inline-block !important
|
|
||||||
opacity: 1 !important
|
|
||||||
// margin-left: 0
|
|
||||||
// padding-top: 0.3rem
|
|
||||||
// padding-bottom: 0.3rem
|
|
||||||
// padding-left: 0.6rem
|
|
||||||
margin: 0
|
|
||||||
padding: .5rem 1rem
|
|
||||||
color: $font-black
|
|
||||||
text-shadow: none
|
|
||||||
font-size: 0.8rem
|
|
||||||
z-index: 0
|
|
||||||
|
|
||||||
|
|
||||||
&:hover
|
@media screen and (max-width: $bg)
|
||||||
color: $light-blue
|
#page-header
|
||||||
|
&.fixed
|
||||||
.mobile_author_icon
|
&.open-sidebar
|
||||||
display: block
|
.site-page
|
||||||
|
display: inline-block
|
||||||
.menus_item
|
opacity: 1
|
||||||
padding: 0 .5rem
|
|
||||||
margin-bottom: 4rem
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
hr
|
|
||||||
display: block
|
|
||||||
|
|
||||||
.search
|
|
||||||
right: 0.5rem
|
|
||||||
|
|
||||||
span
|
|
||||||
display none
|
|
||||||
|
|
||||||
&.fixed.open-sidebar
|
|
||||||
.search
|
|
||||||
display: inline-block;
|
|
||||||
opacity: 1;
|
|
||||||
174
source/css/_layout/mobile-sidebar.styl
Normal file
174
source/css/_layout/mobile-sidebar.styl
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
#mobile-sidebar
|
||||||
|
#menu_mask
|
||||||
|
position: fixed
|
||||||
|
top: 0
|
||||||
|
bottom: 0
|
||||||
|
width: 100%
|
||||||
|
height: 110vh
|
||||||
|
left: 0
|
||||||
|
right: 0
|
||||||
|
background: alpha($black,0.7)
|
||||||
|
z-index: 102
|
||||||
|
display: none
|
||||||
|
|
||||||
|
#mobile-sidebar-menus,#mobile-sidebar-toc
|
||||||
|
position: fixed
|
||||||
|
top: 0
|
||||||
|
right: -254px
|
||||||
|
width: 250px
|
||||||
|
height 101vh
|
||||||
|
background: $white
|
||||||
|
cursor: pointer
|
||||||
|
box-shadow: 0 0 4px alpha($dark-black,0.27)
|
||||||
|
z-index: 103
|
||||||
|
overflow-y: scroll
|
||||||
|
display: block
|
||||||
|
transition: transform .3s
|
||||||
|
opacity: 0
|
||||||
|
will-change: transform
|
||||||
|
|
||||||
|
#mobile-sidebar-menus
|
||||||
|
.mobile_author_icon
|
||||||
|
padding: 1.3rem 1.5rem 0
|
||||||
|
text-align: center
|
||||||
|
|
||||||
|
img
|
||||||
|
height: 120px
|
||||||
|
width: 120px
|
||||||
|
padding: 0
|
||||||
|
display: inline-block
|
||||||
|
vertical-align: top
|
||||||
|
border-radius: 70px
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
.mobile_post_data
|
||||||
|
display: flex
|
||||||
|
justify-content: center
|
||||||
|
padding: .6rem .5rem 0
|
||||||
|
|
||||||
|
.mobile_data_item
|
||||||
|
flex: 1
|
||||||
|
|
||||||
|
.mobile_data_link
|
||||||
|
a
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
.length_num
|
||||||
|
font-size: .9rem
|
||||||
|
color: $dark-black
|
||||||
|
|
||||||
|
.headline
|
||||||
|
display: block
|
||||||
|
font-size: 0.7rem
|
||||||
|
text-transform: uppercase
|
||||||
|
color:$font-black
|
||||||
|
|
||||||
|
hr
|
||||||
|
margin: 1rem auto
|
||||||
|
|
||||||
|
.menus_items
|
||||||
|
padding: 0 .5rem
|
||||||
|
margin-bottom: 5rem
|
||||||
|
|
||||||
|
a
|
||||||
|
display: block !important
|
||||||
|
opacity: 1 !important
|
||||||
|
margin: 0
|
||||||
|
padding: .3rem 1.5rem
|
||||||
|
color: $font-black
|
||||||
|
text-shadow: none
|
||||||
|
font-size: 0.8rem
|
||||||
|
z-index: 0
|
||||||
|
text-overflow: ellipsis
|
||||||
|
overflow: hidden
|
||||||
|
white-space: nowrap
|
||||||
|
|
||||||
|
i
|
||||||
|
width: 30%
|
||||||
|
text-align: left
|
||||||
|
|
||||||
|
span
|
||||||
|
width 70%
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $light-blue
|
||||||
|
|
||||||
|
.menus-expand
|
||||||
|
position: absolute
|
||||||
|
width: 30px !important
|
||||||
|
height: 30px
|
||||||
|
right: 0
|
||||||
|
padding: 6px
|
||||||
|
transform: rotate(0deg)
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
&.menus-closed
|
||||||
|
transform: rotate(180deg) !important
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
.menus_item_child
|
||||||
|
list-style: none
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
#mobile-sidebar-toc
|
||||||
|
padding: 1rem 0.5rem 5rem 0.3rem
|
||||||
|
|
||||||
|
ol,li
|
||||||
|
list-style: none
|
||||||
|
padding: 0 0 0 8px
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
|
||||||
|
.toc_mobile_headline
|
||||||
|
text-align: center
|
||||||
|
font-size: 18px
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
|
a
|
||||||
|
text-decoration: none
|
||||||
|
color: $light-black
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $light-blue
|
||||||
|
|
||||||
|
// 手機打開menus,toc特效
|
||||||
|
.open-mobile-menus,
|
||||||
|
.open-mobile-toc
|
||||||
|
overflow: hidden
|
||||||
|
#body-wrap
|
||||||
|
transform: translateX(-250px)
|
||||||
|
#page-header
|
||||||
|
transform: translateX(-250px)
|
||||||
|
&.fixed.visible
|
||||||
|
transform: translate3d(-250px, 100%, 0)
|
||||||
|
#rightside
|
||||||
|
transform: translate3d(-288px, 0, 0) !important
|
||||||
|
|
||||||
|
.open-mobile-menus
|
||||||
|
padding-left: 0 !important
|
||||||
|
|
||||||
|
#mobile-sidebar
|
||||||
|
#mobile-sidebar-menus
|
||||||
|
transform: translateX(-254px)
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
// pc界面打開mobile-menus需關閉sidebar
|
||||||
|
#sidebar
|
||||||
|
left: -300px !important
|
||||||
|
|
||||||
|
.open-mobile-toc
|
||||||
|
#mobile-sidebar
|
||||||
|
#mobile-sidebar-toc
|
||||||
|
transform: translateX(-254px)
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
@media screen and (max-width: $sm)
|
||||||
|
#mobile-sidebar-menus
|
||||||
|
display: block !important
|
||||||
|
|
||||||
|
@media screen and (max-width: $bg)
|
||||||
|
#mobile-sidebar-toc
|
||||||
|
display: block !important
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,239 +0,0 @@
|
|||||||
if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|
||||||
.night-mode
|
|
||||||
footer
|
|
||||||
background: #2d3035
|
|
||||||
|
|
||||||
#sidebar
|
|
||||||
background: #2d3035 !important
|
|
||||||
box-shadow: -0.25rem 0 0.25rem #2d3035 !important
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb
|
|
||||||
background: lighten(#2d3035,5)
|
|
||||||
|
|
||||||
if hexo-config("local_search") && hexo-config("local_search.enable")
|
|
||||||
#local-search
|
|
||||||
background: #2d3035
|
|
||||||
.local-search-box--input
|
|
||||||
background: #2d3035
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
.search-result-title
|
|
||||||
color: #99a9bf
|
|
||||||
if hexo-config("algolia_search.enable")
|
|
||||||
#algolia-search
|
|
||||||
background: #2d3035
|
|
||||||
.ais-search-box--input
|
|
||||||
background: #2d3035
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
#algolia-search-results
|
|
||||||
.algolia-hit-item-link
|
|
||||||
color: #99a9bf !important
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
.article-container code
|
|
||||||
background: #616a6b
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
// 評論
|
|
||||||
#vcomment
|
|
||||||
*
|
|
||||||
color: #99a9bf !important
|
|
||||||
|
|
||||||
.vsys
|
|
||||||
background: rgb(97, 106, 107) !important
|
|
||||||
|
|
||||||
.vbtn
|
|
||||||
background: rgb(45, 48, 53) !important
|
|
||||||
color: #99a9bf !important
|
|
||||||
|
|
||||||
.recent-post-item .article-title
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
#page-header
|
|
||||||
&.fixed
|
|
||||||
background: #2d3035
|
|
||||||
box-shadow: 0 5px 6px -5px rgba(133,133,133,0)
|
|
||||||
|
|
||||||
a,
|
|
||||||
.toggle-menu,
|
|
||||||
#site-name
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
blockquote
|
|
||||||
border-left: 0.2rem solid #7A5353
|
|
||||||
color: #99a9bf
|
|
||||||
background-color: #2f3d49
|
|
||||||
|
|
||||||
hr
|
|
||||||
background: 0
|
|
||||||
border: 2px dashed #616A6B
|
|
||||||
&:before
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
.post-meta__tags
|
|
||||||
background: 0
|
|
||||||
border: 1px solid #99a9bf
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
|
|
||||||
.post-copyright
|
|
||||||
border: 1px solid #99a9bf
|
|
||||||
|
|
||||||
*
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
.article-container .highlight
|
|
||||||
background-color: #1B2631
|
|
||||||
.code pre
|
|
||||||
background-color: #1B2631
|
|
||||||
|
|
||||||
.gutter pre
|
|
||||||
background: #1C2833
|
|
||||||
|
|
||||||
|
|
||||||
&:after
|
|
||||||
background: rgb(27, 38, 59)
|
|
||||||
|
|
||||||
table
|
|
||||||
&:after,.copy-notice
|
|
||||||
background: rgb(27, 38, 59)
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb
|
|
||||||
background: lighten(#1B2631,10)
|
|
||||||
|
|
||||||
.copy-notice
|
|
||||||
background: rgb(27, 38, 59)
|
|
||||||
|
|
||||||
.post-cards,.md-links-item
|
|
||||||
// background: #2d3035
|
|
||||||
a
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
.aplayer
|
|
||||||
color: #000000
|
|
||||||
filter: brightness(0.6)
|
|
||||||
|
|
||||||
.article-sort-item__title
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
.category-list
|
|
||||||
a
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.translate_chn_to_cht,
|
|
||||||
.nightshift,
|
|
||||||
#readmode
|
|
||||||
background-color: #2d3035 !important
|
|
||||||
|
|
||||||
img
|
|
||||||
filter: brightness(0.6)
|
|
||||||
|
|
||||||
.layout_post
|
|
||||||
background:#2d3035
|
|
||||||
|
|
||||||
canvas
|
|
||||||
display: none !important
|
|
||||||
|
|
||||||
#aside_content
|
|
||||||
.card_widget
|
|
||||||
background:#2d3035 !important
|
|
||||||
.headline,
|
|
||||||
.length_num,
|
|
||||||
.aside_post_title,
|
|
||||||
.aside_category_list_link,
|
|
||||||
.archive-list-link,
|
|
||||||
.social-icon
|
|
||||||
color: #99a9bf !important
|
|
||||||
|
|
||||||
#bookmark-it
|
|
||||||
background: #616a6b !important
|
|
||||||
|
|
||||||
#archive,
|
|
||||||
.tag-cloud,
|
|
||||||
#tag,
|
|
||||||
.category-content,
|
|
||||||
#category,
|
|
||||||
#page,
|
|
||||||
.flink
|
|
||||||
background:#2d3035
|
|
||||||
|
|
||||||
#nav,
|
|
||||||
#top-container
|
|
||||||
&::before
|
|
||||||
content: ""
|
|
||||||
position: absolute
|
|
||||||
top: 0
|
|
||||||
bottom: 0
|
|
||||||
left: 0
|
|
||||||
right: 0
|
|
||||||
background-color: rgba(0,0,0,.6)
|
|
||||||
|
|
||||||
.layout_page
|
|
||||||
.post-meta__date,
|
|
||||||
.article-meta__separator,
|
|
||||||
.article-meta__categories,
|
|
||||||
i
|
|
||||||
color: #99a9bf
|
|
||||||
|
|
||||||
#site-info .blogtitle,
|
|
||||||
span.subtitle,
|
|
||||||
#post-info .posttitle,
|
|
||||||
#post-info #post-meta,
|
|
||||||
#site-social-icons i,
|
|
||||||
#top-container a
|
|
||||||
color: rgba(238,238,238,.6)
|
|
||||||
|
|
||||||
//打賞 分享
|
|
||||||
.post-reward
|
|
||||||
.reward-buttom
|
|
||||||
background-color: #616a6b
|
|
||||||
.post_share
|
|
||||||
filter: brightness(0.6)
|
|
||||||
img
|
|
||||||
filter: brightness(1)
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb
|
|
||||||
background: lighten(#2d3035,5)
|
|
||||||
|
|
||||||
.more
|
|
||||||
background-color: #616a6b
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px)
|
|
||||||
.night-mode
|
|
||||||
color: #99a9bf
|
|
||||||
background-color: rgb(45, 48, 53)
|
|
||||||
|
|
||||||
#page-header
|
|
||||||
.menus
|
|
||||||
background: #2d3035
|
|
||||||
a
|
|
||||||
color: #99a9bf !important
|
|
||||||
.menu-icon-first,
|
|
||||||
.menu-icon-second,
|
|
||||||
.menu-icon-third
|
|
||||||
background-color: #99a9bf !important
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: 768px)
|
|
||||||
.night-mode
|
|
||||||
color: #99a9bf
|
|
||||||
background-color: #2d3032
|
|
||||||
|
|
||||||
.recent-post-item
|
|
||||||
background: #2d3035 !important
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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 !important
|
||||||
|
|
||||||
|
&:last-child
|
||||||
|
margin-bottom: 0 !important
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
@@ -1,90 +1,78 @@
|
|||||||
galleryItemStyle(w, h)
|
.layout_page
|
||||||
.gallery
|
display: flex
|
||||||
&-item
|
margin: 0 auto
|
||||||
width: w
|
max-width: 1200px
|
||||||
height: unit(h, "rem")
|
align-items: flex-start
|
||||||
|
padding: 0 15px
|
||||||
|
|
||||||
&__title
|
//index
|
||||||
transform: translate3d(0, unit(h, "rem"), 0)
|
#recent-posts
|
||||||
|
width: 75%
|
||||||
|
|
||||||
&:hover
|
.recent-post-item
|
||||||
.gallery-item__title
|
padding: 0
|
||||||
transform: translate3d(0, unit(h - 1.5, "rem"), 0)
|
box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
|
||||||
|
border-radius: 8px
|
||||||
|
transition: all 0.3s
|
||||||
|
background: #fff
|
||||||
|
margin-top: 20px
|
||||||
|
height: 280px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
-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)
|
||||||
|
|
||||||
|
img.post_bg
|
||||||
|
transform:scale(1.1)
|
||||||
|
|
||||||
|
.left_radius
|
||||||
|
border-top-left-radius: 8px
|
||||||
|
border-bottom-left-radius: 8px
|
||||||
|
|
||||||
|
.right_radius
|
||||||
|
border-top-right-radius: 8px
|
||||||
|
border-bottom-right-radius: 8px
|
||||||
|
|
||||||
|
.post_cover
|
||||||
|
width: 45%
|
||||||
|
height: 280px
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
|
.post_bg
|
||||||
|
border: 0
|
||||||
|
transition: all .6s
|
||||||
|
display: block
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
padding: 0
|
||||||
|
margin: 0
|
||||||
|
object-fit: cover
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
transform:scale(1.1)
|
||||||
|
|
||||||
|
.recent-post-info
|
||||||
|
padding: 50px 40px
|
||||||
|
display: inline-block
|
||||||
|
width: 55%
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
|
|
||||||
|
a.article-meta__categories
|
||||||
|
text-decoration: none
|
||||||
|
color: #858585
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: #49b1f5 !important
|
||||||
|
|
||||||
.recent-post-item
|
|
||||||
.content
|
.content
|
||||||
|
display: -webkit-box
|
||||||
|
-webkit-line-clamp: 3
|
||||||
|
-webkit-box-orient: vertical
|
||||||
|
overflow: hidden
|
||||||
|
height: 90px
|
||||||
margin-top: 0.5rem
|
margin-top: 0.5rem
|
||||||
|
word-break: break-word
|
||||||
p
|
|
||||||
word-break: break-word
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
.article-type
|
|
||||||
margin-left: 0.3rem
|
|
||||||
color: $grey
|
|
||||||
|
|
||||||
.article-meta
|
.article-meta
|
||||||
color: $grey
|
color: $grey
|
||||||
@@ -104,24 +92,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
|
||||||
@@ -139,30 +109,58 @@ galleryItemStyle(w, h)
|
|||||||
word-wrap: break-word
|
word-wrap: break-word
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
// border-bottom: 1px solid $light-blue
|
|
||||||
color: $light-blue !important
|
color: $light-blue !important
|
||||||
|
|
||||||
.tag-cloud
|
.tag-cloud
|
||||||
padding: 1.5rem 1rem 2rem
|
padding: 40px 44px 44px
|
||||||
text-align: center
|
|
||||||
|
|
||||||
a
|
a
|
||||||
display: inline-block
|
display: inline-block
|
||||||
margin: 0 0.4rem
|
margin: 0 0.4rem
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: $ruby !important
|
color: $ruby !important
|
||||||
|
transform: scale(1.1)
|
||||||
|
|
||||||
&__title
|
&__title
|
||||||
font-size: 1.8rem
|
font-size: 1.8rem
|
||||||
|
text-align: center
|
||||||
|
|
||||||
|
&-tags
|
||||||
|
text-align: center
|
||||||
|
|
||||||
#tag,
|
#tag,
|
||||||
#category,
|
#category,
|
||||||
#archive
|
#archive
|
||||||
padding: 3rem 3rem 3rem
|
padding: 3rem 3rem 3rem
|
||||||
|
|
||||||
|
#page,
|
||||||
|
.category-content,
|
||||||
|
.flink
|
||||||
|
padding: 40px 44px 44px
|
||||||
|
|
||||||
|
|
||||||
|
#page,
|
||||||
|
.category-content,
|
||||||
|
#archive,
|
||||||
|
.tag-cloud,
|
||||||
|
.flink,
|
||||||
|
#tag,
|
||||||
|
#category
|
||||||
|
box-shadow: 0 4px 8px 6px rgba(7,17,27,.06)
|
||||||
|
border-radius: 8px
|
||||||
|
transition: all .3s
|
||||||
|
background: #fff
|
||||||
|
margin-top: 20px
|
||||||
|
width: 75%
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
|
||||||
|
|
||||||
|
|
||||||
.article-sort
|
.article-sort
|
||||||
padding-left: 1rem
|
padding-left: 1rem
|
||||||
border-left: 2px solid $pale-blue
|
border-left: 2px solid $pale-blue
|
||||||
@@ -204,7 +202,7 @@ galleryItemStyle(w, h)
|
|||||||
|
|
||||||
&-item
|
&-item
|
||||||
position: relative
|
position: relative
|
||||||
margin-bottom: 1rem
|
margin: 0 0 1rem 0.5rem
|
||||||
transition: all 0.2s ease-in-out
|
transition: all 0.2s ease-in-out
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
@@ -214,8 +212,8 @@ galleryItemStyle(w, h)
|
|||||||
&:before
|
&:before
|
||||||
$w = 0.3rem
|
$w = 0.3rem
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0.48rem
|
top: 1.8rem
|
||||||
left: calc(-1rem - 7px)
|
left: calc(-1rem - 17px)
|
||||||
width: w = $w
|
width: w = $w
|
||||||
height: h = w
|
height: h = w
|
||||||
border: 0.5 * w solid $light-blue
|
border: 0.5 * w solid $light-blue
|
||||||
@@ -235,20 +233,57 @@ galleryItemStyle(w, h)
|
|||||||
&:before
|
&:before
|
||||||
top: 0.7rem
|
top: 0.7rem
|
||||||
border-color: $ruby
|
border-color: $ruby
|
||||||
|
|
||||||
&__time
|
&__time
|
||||||
position: absolute
|
|
||||||
top: 0.1rem
|
|
||||||
color: $a-link-color
|
color: $a-link-color
|
||||||
|
font-size: 0.7rem
|
||||||
|
padding-left: 0.4rem
|
||||||
|
|
||||||
&__title
|
&__title
|
||||||
display: block
|
|
||||||
margin-left: 5rem
|
|
||||||
color: $font-black
|
color: $font-black
|
||||||
|
font-size: 0.75rem
|
||||||
|
height: 60px
|
||||||
|
overflow: hidden
|
||||||
|
display: -webkit-box
|
||||||
|
-webkit-line-clamp: 2
|
||||||
|
-webkit-box-orient: vertical
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $light-blue
|
||||||
|
transform: translateX(20px)
|
||||||
|
|
||||||
|
&__img
|
||||||
|
img
|
||||||
|
height: 100%
|
||||||
|
width: 100%
|
||||||
|
object-fit: cover
|
||||||
|
padding: 0
|
||||||
|
transition: all .6s
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
transform: scale(1.1)
|
||||||
|
|
||||||
|
&__post
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
font-size: 0.8rem
|
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $a-link-color
|
||||||
|
|
||||||
|
&-img
|
||||||
|
height: 80px
|
||||||
|
width: 80px
|
||||||
|
display: inline-block
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
|
&-post
|
||||||
|
display: inline-block
|
||||||
|
top: 0
|
||||||
|
position: absolute
|
||||||
|
margin-left: 1rem
|
||||||
|
|
||||||
|
|
||||||
.category-lists
|
.category-lists
|
||||||
padding: 1rem 0 1.5rem
|
padding: 1rem 0 1.5rem
|
||||||
|
|
||||||
@@ -272,48 +307,50 @@ galleryItemStyle(w, h)
|
|||||||
&:after
|
&:after
|
||||||
content: ")"
|
content: ")"
|
||||||
|
|
||||||
.gallery
|
|
||||||
&-item
|
|
||||||
position: relative
|
|
||||||
display: inline-block
|
|
||||||
overflow: hidden
|
|
||||||
margin: 0.4rem
|
|
||||||
width: 6rem
|
|
||||||
height: 6rem
|
|
||||||
background-position: 50% 50%
|
|
||||||
background-size: cover
|
|
||||||
background-repeat: no-repeat
|
|
||||||
cursor: pointer
|
|
||||||
transition: all 0.2s ease-in-out
|
|
||||||
|
|
||||||
&__title
|
|
||||||
position: absolute
|
|
||||||
overflow: hidden
|
|
||||||
padding: 0 0.4rem
|
|
||||||
width: 100%
|
|
||||||
height: 1.5rem
|
|
||||||
background: rgba(0, 0, 0, 0.5)
|
|
||||||
color: $pale-blue
|
|
||||||
text-align: center
|
|
||||||
text-overflow: ellipsis
|
|
||||||
white-space: nowrap
|
|
||||||
line-height: 1.5rem
|
|
||||||
transition: 0.2s ease-in-out
|
|
||||||
transform: translate3d(0, 6rem, 0)
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
.gallery-item__title
|
|
||||||
transform: translate3d(0, 4.5rem, 0)
|
|
||||||
|
|
||||||
@media screen and (max-width: $sm)
|
@media screen and (max-width: $sm)
|
||||||
.recent-post-item
|
.layout_page
|
||||||
.article-title
|
padding: 0 5px !important
|
||||||
font-size: 1rem
|
|
||||||
|
#page,
|
||||||
|
.category-content,
|
||||||
|
#archive,
|
||||||
|
.tag-cloud,
|
||||||
|
.flink,
|
||||||
|
#tag,
|
||||||
|
#category
|
||||||
|
padding: 1.8rem 1.3rem
|
||||||
|
margin-top: 10px
|
||||||
|
|
||||||
|
.category-lists
|
||||||
|
padding: 0
|
||||||
|
|
||||||
|
#recent-posts
|
||||||
|
.recent-post-item
|
||||||
|
height: auto !important
|
||||||
|
|
||||||
.article-meta.tags
|
.post_cover
|
||||||
display: none
|
width: 100%
|
||||||
|
height: 230px
|
||||||
|
border-radius: 8px 8px 0 0
|
||||||
|
|
||||||
galleryItemStyle(calc(50% - 22px), 6)
|
.recent-post-info
|
||||||
|
padding: 30px 25px 18px!important
|
||||||
|
width: 100%
|
||||||
|
|
||||||
|
.article-title
|
||||||
|
font-size: 1rem
|
||||||
|
|
||||||
|
.article-meta.tags
|
||||||
|
display: none
|
||||||
|
|
||||||
@media screen and (min-width: $md)
|
&:first-child
|
||||||
galleryItemStyle(8rem, 8)
|
margin-top: 10px
|
||||||
|
|
||||||
|
@media screen and (min-width: 900px)
|
||||||
|
if hexo-config("aside.position") == "left"
|
||||||
|
#recent-posts,#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
||||||
|
order: 2
|
||||||
|
|
||||||
|
@media screen and (max-width: 900px)
|
||||||
|
#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
||||||
|
width: 100% !important
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
color: $white
|
color: $white
|
||||||
cursor: default
|
cursor: default
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -57,13 +72,17 @@
|
|||||||
width: 100%
|
width: 100%
|
||||||
color: $light-grey
|
color: $light-grey
|
||||||
text-align: left
|
text-align: left
|
||||||
padding-left: 8%
|
padding: 0 8%
|
||||||
position: absolute
|
position: absolute
|
||||||
bottom: 1.5rem
|
bottom: 1.5rem
|
||||||
|
|
||||||
#post-title
|
#post-title
|
||||||
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
||||||
font-size: 1.5rem
|
font-size: 1.5rem
|
||||||
|
margin-bottom: 0.4rem
|
||||||
|
|
||||||
|
.posttitle
|
||||||
|
line-height: 1.5
|
||||||
|
|
||||||
i.fa.fa-angle-right
|
i.fa.fa-angle-right
|
||||||
margin: 0 0.3rem 0 0.2rem
|
margin: 0 0.3rem 0 0.2rem
|
||||||
@@ -93,29 +112,133 @@
|
|||||||
background: $light-blue
|
background: $light-blue
|
||||||
color: $white
|
color: $white
|
||||||
|
|
||||||
.layout
|
|
||||||
margin: 0 auto
|
|
||||||
max-width: 1000px
|
|
||||||
|
|
||||||
#post-content
|
#post-content
|
||||||
margin-bottom: 1rem
|
|
||||||
|
|
||||||
ol,
|
if hexo-config("post_beautify.enable")
|
||||||
ul
|
h1,
|
||||||
margin-top: 0.4rem
|
h2,
|
||||||
counter-reset: li
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6
|
||||||
|
cursor: pointer
|
||||||
|
transition: all 0.2s ease-out
|
||||||
|
|
||||||
p
|
&:before
|
||||||
margin: 0
|
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,
|
ol,
|
||||||
ul
|
ul
|
||||||
padding-left: 0.5rem
|
margin-top: 0.4rem
|
||||||
|
padding: 0 0 0 0.8rem
|
||||||
|
list-style: none
|
||||||
|
counter-reset: li
|
||||||
|
|
||||||
li
|
p
|
||||||
position: relative
|
margin: 0
|
||||||
margin: 0.3rem 0
|
|
||||||
padding-left: 0.3rem
|
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,
|
||||||
|
ul
|
||||||
|
margin-top: 0.4rem
|
||||||
|
counter-reset: li
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul
|
||||||
|
padding-left: 0.5rem
|
||||||
|
|
||||||
|
li
|
||||||
|
position: relative
|
||||||
|
margin: 0.3rem 0
|
||||||
|
padding-left: 0.3rem
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $a-link-color
|
color: $a-link-color
|
||||||
@@ -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
|
||||||
@@ -173,7 +321,7 @@ img
|
|||||||
|
|
||||||
.post-copyright
|
.post-copyright
|
||||||
position: relative
|
position: relative
|
||||||
margin-bottom: 0.4rem
|
margin: 1rem 0 0.5rem 0
|
||||||
padding: 0.5rem 0.8rem
|
padding: 0.5rem 0.8rem
|
||||||
border: 1px solid $light-grey
|
border: 1px solid $light-grey
|
||||||
transition: box-shadow 0.3s ease-in-out
|
transition: box-shadow 0.3s ease-in-out
|
||||||
@@ -211,13 +359,7 @@ img
|
|||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: $sm)
|
@media screen and (max-width: $sm)
|
||||||
.layout
|
|
||||||
margin: 0 30px
|
|
||||||
width: auto
|
|
||||||
|
|
||||||
#top-container
|
#top-container
|
||||||
// background-attachment: local
|
|
||||||
|
|
||||||
#post-title
|
#post-title
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
|
|
||||||
@@ -226,10 +368,8 @@ img
|
|||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: $md)
|
@media screen and (min-width: $md)
|
||||||
.layout
|
.layout_post
|
||||||
width: $content-large-width
|
width: $content-large-width
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.katex-wrap
|
.katex-wrap
|
||||||
overflow: auto
|
overflow: auto
|
||||||
@@ -239,48 +379,31 @@ img
|
|||||||
|
|
||||||
|
|
||||||
// 文章字體
|
// 文章字體
|
||||||
#post-content p {
|
#post-content p
|
||||||
font-size: 1.1em
|
font-size: 1.1em
|
||||||
}
|
|
||||||
|
|
||||||
#post-content ol, #post-content ul {
|
|
||||||
|
#post-content ol,
|
||||||
|
#post-content ul
|
||||||
font-size: 1em
|
font-size: 1em
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 900px)
|
|
||||||
.layout
|
|
||||||
margin: 0 15px
|
|
||||||
width: auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.layout_post
|
.layout_post
|
||||||
padding: 50px
|
padding: 50px
|
||||||
-webkit-box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
|
|
||||||
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: 40px
|
margin: 40px auto
|
||||||
margin-bottom: 40px
|
max-width: 1000px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
-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)
|
||||||
|
|
||||||
img
|
img
|
||||||
margin:0 auto
|
|
||||||
display:block
|
display:block
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.tag_share
|
.tag_share
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
@@ -309,4 +432,36 @@ img
|
|||||||
#post
|
#post
|
||||||
a
|
a
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
color: $light-blue
|
color: $light-blue
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6
|
||||||
|
margin: 1rem 0 0.8rem 0
|
||||||
|
|
||||||
|
img
|
||||||
|
margin: 0 auto 0.8rem
|
||||||
|
|
||||||
|
blockquote,
|
||||||
|
p
|
||||||
|
margin: 0 0 0.8rem 0
|
||||||
|
|
||||||
|
iframe,.note
|
||||||
|
margin: 0 0 0.8rem 0
|
||||||
|
|
||||||
|
.layout_post,
|
||||||
|
.layout_page
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
@media screen and (max-width: 1024px)
|
||||||
|
.layout_post
|
||||||
|
margin: 0 15px
|
||||||
|
width: auto
|
||||||
|
|
||||||
|
@media screen and (max-width:768px)
|
||||||
|
.layout_post
|
||||||
|
padding: 1.8rem 1rem
|
||||||
|
margin: 30px 5px
|
||||||
|
|||||||
@@ -7,47 +7,49 @@ if hexo-config("readmode") && hexo-config("readmode.enable")
|
|||||||
#toggle-sidebar
|
#toggle-sidebar
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
|
#page-header
|
||||||
|
#site-name,
|
||||||
|
.site-page,
|
||||||
|
.toggle-menu
|
||||||
|
text-shadow: none
|
||||||
|
color: $font-black
|
||||||
|
|
||||||
|
.menus_item_child
|
||||||
|
background-color: darken($pale-yellow,5) !important
|
||||||
|
|
||||||
|
&:before
|
||||||
|
border-color: transparent transparent darken($pale-yellow,5) !important
|
||||||
|
|
||||||
#top-container
|
#top-container
|
||||||
background-image: none !important
|
background-image: none !important
|
||||||
height: 14rem
|
height: 14rem
|
||||||
background-color: $pale-yellow
|
background-color: $pale-yellow
|
||||||
|
|
||||||
a
|
a
|
||||||
color: #4c4948
|
color: $font-black
|
||||||
|
|
||||||
|
|
||||||
&:before
|
&:before
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
#site-name,
|
|
||||||
.site-page
|
|
||||||
text-shadow: none
|
|
||||||
color: #4c4948
|
|
||||||
|
|
||||||
#post-info
|
#post-info
|
||||||
text-align: center
|
text-align: center
|
||||||
padding: 0
|
padding: 0
|
||||||
color: #4c4948
|
color: $font-black
|
||||||
|
|
||||||
#post-title,
|
#post-title,
|
||||||
#post-meta
|
#post-meta
|
||||||
text-shadow: none
|
text-shadow: none
|
||||||
|
|
||||||
#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
|
||||||
.site-page
|
.site-page
|
||||||
display: inline-block
|
display: inline-block
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
|
||||||
.toggle-menu
|
|
||||||
.menu-icon-first,
|
|
||||||
.menu-icon-second,
|
|
||||||
.menu-icon-third
|
|
||||||
background-color: #4c4948
|
|
||||||
|
|
||||||
.layout_post
|
.layout_post
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
@@ -74,13 +76,13 @@ if hexo-config("readmode") && hexo-config("readmode.enable")
|
|||||||
background-color: rgba(102,128,153,.05)
|
background-color: rgba(102,128,153,.05)
|
||||||
|
|
||||||
#rightside
|
#rightside
|
||||||
#nightshift
|
#darkmode
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
canvas
|
canvas
|
||||||
display: none !important
|
display: none !important
|
||||||
|
|
||||||
footer,
|
#footer,
|
||||||
#post-comment,
|
#post-comment,
|
||||||
hr,
|
hr,
|
||||||
.relatedPosts,
|
.relatedPosts,
|
||||||
@@ -98,8 +100,6 @@ if hexo-config("readmode") && hexo-config("readmode.enable")
|
|||||||
|
|
||||||
.copy-notice
|
.copy-notice
|
||||||
background: darken($pale-yellow,10)
|
background: darken($pale-yellow,10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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%
|
||||||
@@ -35,21 +31,21 @@
|
|||||||
object-fit: cover
|
object-fit: cover
|
||||||
|
|
||||||
.relatedPosts_title
|
.relatedPosts_title
|
||||||
color: #fff
|
color: #fff
|
||||||
position: absolute
|
position: absolute
|
||||||
left: 0
|
left: 0
|
||||||
right: 0
|
right: 0
|
||||||
top: 45%
|
top: 45%
|
||||||
height: 60px
|
height: 60px
|
||||||
padding: 0 30px
|
padding: 0 30px
|
||||||
display: -webkit-box
|
display: -webkit-box
|
||||||
-webkit-line-clamp: 2
|
-webkit-line-clamp: 2
|
||||||
-webkit-box-orient: vertical
|
-webkit-box-orient: vertical
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
width: 100%
|
width: 100%
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
.relatedPosts_headline
|
.relatedPosts_headline
|
||||||
font-size: 20px
|
font-size: 20px
|
||||||
@@ -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)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
text-align: center
|
text-align: center
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.reward-buttom
|
.reward-button
|
||||||
text-align: center
|
text-align: center
|
||||||
display: inline-block
|
display: inline-block
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
@@ -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
|
||||||
|
|||||||
63
source/css/_layout/rightside.styl
Normal file
63
source/css/_layout/rightside.styl
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#rightside
|
||||||
|
right: -38px
|
||||||
|
position: fixed
|
||||||
|
bottom: 40px
|
||||||
|
transition: all .3s
|
||||||
|
opacity 0
|
||||||
|
|
||||||
|
#rightside-config-hide
|
||||||
|
display none
|
||||||
|
|
||||||
|
#readmode,
|
||||||
|
#font_plus,
|
||||||
|
#font_minus,
|
||||||
|
#to_comment,
|
||||||
|
.darkmode,
|
||||||
|
#mobile-toc-button,
|
||||||
|
#go-up,
|
||||||
|
#rightside_config
|
||||||
|
width: 30px
|
||||||
|
height: 30px
|
||||||
|
background-color: $light-blue
|
||||||
|
color: $white
|
||||||
|
text-align: center
|
||||||
|
line-height: 29px
|
||||||
|
font-size: 16px
|
||||||
|
display: block
|
||||||
|
margin-bottom: 2px
|
||||||
|
cursor: pointer
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: $ruby
|
||||||
|
|
||||||
|
#rightside_config
|
||||||
|
i
|
||||||
|
animation: avatar_turn_around 2s linear infinite
|
||||||
|
|
||||||
|
.translate_chn_to_cht
|
||||||
|
width: 30px
|
||||||
|
height: 30px
|
||||||
|
background-color: $light-blue
|
||||||
|
color: $white
|
||||||
|
text-align: center
|
||||||
|
line-height: 29px
|
||||||
|
font-size: 16px
|
||||||
|
display: block
|
||||||
|
margin-bottom: 2px
|
||||||
|
cursor: pointer
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: $ruby
|
||||||
|
|
||||||
|
#mobile-toc-button
|
||||||
|
display: none
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width: $bg)
|
||||||
|
#rightside
|
||||||
|
#mobile-toc-button
|
||||||
|
display: block
|
||||||
|
|
||||||
|
|
||||||
@@ -10,8 +10,9 @@
|
|||||||
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
|
will-change: transform
|
||||||
|
transition: transform .2s
|
||||||
|
|
||||||
.sidebar-toc
|
.sidebar-toc
|
||||||
ol,
|
ol,
|
||||||
li
|
li
|
||||||
|
|||||||
300
source/css/_layout/z-darkmode.styl
Normal file
300
source/css/_layout/z-darkmode.styl
Normal file
@@ -0,0 +1,300 @@
|
|||||||
|
[data-theme="dark"]
|
||||||
|
body
|
||||||
|
color: #99a9bf
|
||||||
|
background-color: #2d3032
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
background: lighten(#2d3035,5)
|
||||||
|
|
||||||
|
#sidebar
|
||||||
|
background: #2d3035
|
||||||
|
box-shadow: -0.25rem 0 0.25rem #2d3035
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
background: lighten(#2d3035,5)
|
||||||
|
|
||||||
|
if hexo-config("local_search") && hexo-config("local_search.enable")
|
||||||
|
#local-search
|
||||||
|
background: #2d3035
|
||||||
|
.local-search-box--input
|
||||||
|
background: #2d3035
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
.search-result-title
|
||||||
|
color: #99a9bf
|
||||||
|
if hexo-config("algolia_search.enable")
|
||||||
|
#algolia-search
|
||||||
|
background: #2d3035
|
||||||
|
.ais-search-box--input
|
||||||
|
background: #2d3035
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
#algolia-search-results
|
||||||
|
.algolia-hit-item-link
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
.article-container code
|
||||||
|
background: #616a6b
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
if hexo-config('valine') && hexo-config('valine.enable')
|
||||||
|
// 評論
|
||||||
|
#vcomment
|
||||||
|
p,a,textarea,.vemoji-btn,.vpreview-btn,input,path,.vcount,.vnum,.vtime,.vsys,.vsys,.vnick
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
.vsys
|
||||||
|
background: rgb(97, 106, 107) !important
|
||||||
|
|
||||||
|
.vbtn
|
||||||
|
background: rgb(45, 48, 53) !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-posts
|
||||||
|
.recent-post-item
|
||||||
|
background: #2d3032 !important
|
||||||
|
|
||||||
|
.article-title
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
#page-header
|
||||||
|
&.fixed
|
||||||
|
background: #2d3035
|
||||||
|
box-shadow: 0 5px 6px -5px rgba(133,133,133,0)
|
||||||
|
|
||||||
|
a,
|
||||||
|
.toggle-menu,
|
||||||
|
#site-name
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
blockquote
|
||||||
|
color: #99a9bf
|
||||||
|
background-color: lighten(#2d3035,10)
|
||||||
|
|
||||||
|
hr
|
||||||
|
background: 0
|
||||||
|
border: 2px dashed #616A6B
|
||||||
|
&:before
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
.post-meta__tags
|
||||||
|
background: 0
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
.post-copyright
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
*
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
.article-container pre
|
||||||
|
background-color: lighten(#2d3035, 2)
|
||||||
|
|
||||||
|
.article-container .highlight:not(.js-file-line-container)
|
||||||
|
background-color: lighten(#2d3035, 2)
|
||||||
|
.code pre
|
||||||
|
background-color: lighten(#2d3035, 2)
|
||||||
|
|
||||||
|
.gutter pre
|
||||||
|
background: lighten(#2d3035, 3)
|
||||||
|
|
||||||
|
&:after
|
||||||
|
background: lighten(#2d3035, 3)
|
||||||
|
|
||||||
|
table
|
||||||
|
&:after,.copy-notice
|
||||||
|
background: lighten(#2d3035, 3)
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
background: lighten(#2d3035, 8)
|
||||||
|
|
||||||
|
.copy-notice
|
||||||
|
background: lighten(#2d3035, 3)
|
||||||
|
|
||||||
|
.aplayer
|
||||||
|
color: #000000
|
||||||
|
filter: brightness(0.6)
|
||||||
|
|
||||||
|
.translate_chn_to_cht,
|
||||||
|
.darkmode,
|
||||||
|
#readmode,
|
||||||
|
#to_comment,
|
||||||
|
#font_plus,
|
||||||
|
#font_minus,
|
||||||
|
#rightside_config,
|
||||||
|
#go-up,
|
||||||
|
#mobile-toc-button
|
||||||
|
background-color: lighten(#2d3035,10) !important
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background: lighten(#2d3035,20) !important
|
||||||
|
|
||||||
|
.md-links-item:before,
|
||||||
|
.aside_category_list:hover,
|
||||||
|
.archive-list-item:hover,
|
||||||
|
#bookmark-it,
|
||||||
|
.reward-button,
|
||||||
|
.reward-all,
|
||||||
|
.note
|
||||||
|
background-color: lighten(#2d3035,10) !important
|
||||||
|
|
||||||
|
img,iframe,.gist
|
||||||
|
filter: brightness(0.7)
|
||||||
|
|
||||||
|
#aside_content
|
||||||
|
.card_widget
|
||||||
|
background:#2d3035 !important
|
||||||
|
.headline,
|
||||||
|
.length_num,
|
||||||
|
.aside_post_title,
|
||||||
|
.aside_category_list_link,
|
||||||
|
.archive-list-link,
|
||||||
|
.social-icon
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
#archive,
|
||||||
|
.tag-cloud,
|
||||||
|
#tag,
|
||||||
|
.category-content,
|
||||||
|
#category,
|
||||||
|
#page,
|
||||||
|
.flink,
|
||||||
|
.layout_post,
|
||||||
|
#footer-wrap
|
||||||
|
background:#2d3035
|
||||||
|
|
||||||
|
#nav,
|
||||||
|
#top-container,
|
||||||
|
#footer
|
||||||
|
&::before
|
||||||
|
content: ""
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
bottom: 0
|
||||||
|
left: 0
|
||||||
|
right: 0
|
||||||
|
background-color: rgba(0,0,0,0.7)
|
||||||
|
|
||||||
|
#nav span,
|
||||||
|
#nav i,
|
||||||
|
#page-header a,
|
||||||
|
#page-header .toggle-menu,
|
||||||
|
#top-container #post-meta,
|
||||||
|
#top-container a,
|
||||||
|
.posttitle,
|
||||||
|
#footer-wrap,
|
||||||
|
#footer-wrap a
|
||||||
|
color: lighten(#99a9bf,10)
|
||||||
|
|
||||||
|
.recent-posts .post-meta__date,
|
||||||
|
.recent-posts .article-meta,
|
||||||
|
.recent-posts .article-meta__categories,
|
||||||
|
h1, h2, h3, h4, h5, h6,
|
||||||
|
.prev_info,
|
||||||
|
.next_info,
|
||||||
|
.post-reward .reward-button,
|
||||||
|
.fa-clipboard,
|
||||||
|
.gutter pre,
|
||||||
|
#bookmark-it,
|
||||||
|
.copy-notice,
|
||||||
|
.md-links-item a,
|
||||||
|
.category-list-link
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
.article-sort-item__title
|
||||||
|
color: #99a9bf
|
||||||
|
&:hover
|
||||||
|
color: #49b1f5
|
||||||
|
|
||||||
|
//打賞 分享
|
||||||
|
.post-reward
|
||||||
|
.reward-all:after
|
||||||
|
border-top: 13px solid lighten(#2d3035,10) !important
|
||||||
|
|
||||||
|
|
||||||
|
#web_bg[data-type=color]
|
||||||
|
background: #2d3032
|
||||||
|
|
||||||
|
#web_bg[data-type=photo]:before
|
||||||
|
content: ""
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
bottom: 0
|
||||||
|
left: 0
|
||||||
|
right: 0
|
||||||
|
background-color: rgba(0,0,0,0.8)
|
||||||
|
|
||||||
|
#hbe-security
|
||||||
|
label
|
||||||
|
color: #99a9bf !important
|
||||||
|
input
|
||||||
|
background-color: #616a6b
|
||||||
|
|
||||||
|
|
||||||
|
#mobile-sidebar
|
||||||
|
#mobile-sidebar-menus
|
||||||
|
background: #2d3035
|
||||||
|
|
||||||
|
.headline
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
.length_num
|
||||||
|
color: darken(#99a9bf,10) !important
|
||||||
|
a
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
#mobile-sidebar-toc
|
||||||
|
background: #2d3035
|
||||||
|
a
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
#page-header
|
||||||
|
.menus_item_child
|
||||||
|
background-color: #2d3035 !important
|
||||||
|
|
||||||
|
&:before
|
||||||
|
border-color: transparent transparent #2d3035 !important
|
||||||
|
|
||||||
|
li
|
||||||
|
a
|
||||||
|
color: #99a9bf
|
||||||
|
|
||||||
|
.bookmark--animated:before
|
||||||
|
background: lighten(#2d3035,20) !important
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,375 +0,0 @@
|
|||||||
#recent-posts
|
|
||||||
.recent-post-item
|
|
||||||
padding: 0
|
|
||||||
box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
|
|
||||||
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
|
|
||||||
background: #fff
|
|
||||||
margin-top: 20px
|
|
||||||
height: 280px
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
-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)
|
|
||||||
|
|
||||||
img.post_bg
|
|
||||||
transform:scale(1.1)
|
|
||||||
|
|
||||||
.is_left
|
|
||||||
float: left
|
|
||||||
border-top-left-radius: 8px
|
|
||||||
border-bottom-left-radius: 8px
|
|
||||||
|
|
||||||
.is_right
|
|
||||||
float: right
|
|
||||||
border-top-right-radius: 8px
|
|
||||||
border-bottom-right-radius: 8px
|
|
||||||
|
|
||||||
.post_cover
|
|
||||||
width: 45%
|
|
||||||
height: 280px
|
|
||||||
overflow: hidden
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
img.post_bg
|
|
||||||
border: 0
|
|
||||||
transition: all .6s
|
|
||||||
display: block
|
|
||||||
width: 100%
|
|
||||||
height: 100%
|
|
||||||
padding: 0
|
|
||||||
margin: 0
|
|
||||||
object-fit: cover
|
|
||||||
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
transform:scale(1.1)
|
|
||||||
|
|
||||||
#pagination
|
|
||||||
margin-top: 2rem
|
|
||||||
|
|
||||||
|
|
||||||
.recent-post-info
|
|
||||||
padding: 50px 40px
|
|
||||||
display: inline-block
|
|
||||||
width: 55%
|
|
||||||
overflow hidden
|
|
||||||
|
|
||||||
|
|
||||||
a.article-meta__categories
|
|
||||||
text-decoration: none
|
|
||||||
color: #858585
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
color: #49b1f5 !important
|
|
||||||
|
|
||||||
.content
|
|
||||||
display: -webkit-box
|
|
||||||
-webkit-line-clamp: 3
|
|
||||||
-webkit-box-orient: vertical
|
|
||||||
overflow: hidden
|
|
||||||
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
|
|
||||||
display: flex
|
|
||||||
margin: 0 auto
|
|
||||||
max-width: 1200px
|
|
||||||
align-items: flex-start
|
|
||||||
padding: 0 15px
|
|
||||||
|
|
||||||
#recent-posts
|
|
||||||
width: 75%
|
|
||||||
|
|
||||||
#page,.category-content,.flink
|
|
||||||
padding: 40px 44px 44px
|
|
||||||
|
|
||||||
#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
|
||||||
box-shadow: 0 4px 8px 6px rgba(7,17,27,.06)
|
|
||||||
border-radius: 8px
|
|
||||||
transition: all .3s
|
|
||||||
background: #fff
|
|
||||||
margin-top: 20px
|
|
||||||
width: 75%
|
|
||||||
|
|
||||||
.card_widget,#archive,.tag-cloud,#tag,.category-content,#category,#page,.flink
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
-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)
|
|
||||||
|
|
||||||
#page_site-info
|
|
||||||
padding: 10rem 1rem 7rem
|
|
||||||
#site-title
|
|
||||||
font-family: PingFang SC, Hiragino Sans GB, "Microsoft JhengHei", "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
|
||||||
|
|
||||||
@media screen and (max-width: 900px)
|
|
||||||
#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
|
|
||||||
width: 100% !important
|
|
||||||
|
|
||||||
// .recent-post-info
|
|
||||||
// padding: 40px 30px 20px
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width:768px)
|
|
||||||
.recent-post-item
|
|
||||||
height: auto !important
|
|
||||||
border-radius: 8px
|
|
||||||
|
|
||||||
.post_cover
|
|
||||||
width: 100% !important
|
|
||||||
height: 230px !important
|
|
||||||
border-radius: 8px !important
|
|
||||||
|
|
||||||
.recent-post-item,#page,.tag-cloud,.flink
|
|
||||||
margin-top: 1px
|
|
||||||
|
|
||||||
.recent-post-item,#page,.category-content,.tag-cloud,.flink
|
|
||||||
box-shadow: none !important
|
|
||||||
background: none !important
|
|
||||||
padding: 0px 20px 0 !important
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
-webkit-box-shadow: none
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
#archive,#category,#tag
|
|
||||||
box-shadow: none !important
|
|
||||||
background: none !important
|
|
||||||
padding: 0px 30px 0 !important
|
|
||||||
|
|
||||||
|
|
||||||
.layout_post
|
|
||||||
padding: 0 20px 0
|
|
||||||
border-radius: 0
|
|
||||||
-webkit-box-shadow: none
|
|
||||||
box-shadow: none
|
|
||||||
background: none
|
|
||||||
margin: 0
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
-webkit-box-shadow: none
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
|
|
||||||
.layout_page
|
|
||||||
padding: 0 !important
|
|
||||||
|
|
||||||
#aside_content
|
|
||||||
display: none !important
|
|
||||||
// .card_widget
|
|
||||||
// box-shadow: none
|
|
||||||
// border-radius: 0
|
|
||||||
// border-top: 1px dashed #a4d8fa
|
|
||||||
|
|
||||||
// &:hover
|
|
||||||
// box-shadow: none
|
|
||||||
|
|
||||||
|
|
||||||
.category-lists
|
|
||||||
padding: 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.recent-post-info
|
|
||||||
padding: 20px 10px !important
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
#recent-posts #pagination
|
|
||||||
margin-bottom: 0
|
|
||||||
|
|
||||||
.more_setting
|
|
||||||
display: block !important
|
|
||||||
|
|
||||||
#nav #site-social-icons
|
|
||||||
display: block
|
|
||||||
|
|
||||||
#page_site-info
|
|
||||||
padding: 7rem 1rem 5rem
|
|
||||||
|
|
||||||
#top-container
|
|
||||||
height: 14rem
|
|
||||||
|
|
||||||
#post-info
|
|
||||||
bottom: 1rem
|
|
||||||
padding-left: 5%
|
|
||||||
|
|
||||||
.mobile_hidden
|
|
||||||
display: none
|
|
||||||
|
|
||||||
|
|
||||||
canvas
|
|
||||||
display: none !important
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.layout_page,
|
|
||||||
.layout_post,
|
|
||||||
footer
|
|
||||||
animation: main 1s;
|
|
||||||
|
|
||||||
#nav,
|
|
||||||
#top-container
|
|
||||||
animation: header 1s
|
|
||||||
|
|
||||||
#site-title
|
|
||||||
animation: titlescale 1s
|
|
||||||
|
|
||||||
.search-dialog
|
|
||||||
transition: all .2s
|
|
||||||
|
|
||||||
.scroll-down-effects
|
|
||||||
-webkit-animation: pulse 1.5s infinite
|
|
||||||
animation: pulse 1.5s infinite
|
|
||||||
// font-size: 28px
|
|
||||||
position: absolute
|
|
||||||
color: #fff
|
|
||||||
|
|
||||||
.is_hidden
|
|
||||||
overflow: hidden
|
|
||||||
@keyframes pulse{
|
|
||||||
|
|
||||||
0%,to{
|
|
||||||
// -ms-filter:"alpha(opacity=40)"
|
|
||||||
// filter:alpha(opacity=40)
|
|
||||||
opacity:.4
|
|
||||||
top:0}
|
|
||||||
50%{
|
|
||||||
// -ms-filter:none
|
|
||||||
// -webkit-filter:none
|
|
||||||
// filter:none
|
|
||||||
opacity:1
|
|
||||||
top:-16px}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes header {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-50px)
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes main {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(50px)
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes titlescale{
|
|
||||||
|
|
||||||
0% {
|
|
||||||
// opacity:0;
|
|
||||||
transform: scale(0.7)
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
// opacity:1;
|
|
||||||
transform: scale(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.article-container .code_full_page
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
min-width: 100%;
|
|
||||||
z-index: 9999;
|
|
||||||
margin: 0;
|
|
||||||
animation: code_full_page 1s;
|
|
||||||
|
|
||||||
.code_body
|
|
||||||
overflow: hidden
|
|
||||||
|
|
||||||
@keyframes code_full_page{
|
|
||||||
0%{transform:scale(0)}
|
|
||||||
50%{transform:scale(1)}
|
|
||||||
80%{transform:scale(.98)}
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#algolia-search
|
#algolia-search
|
||||||
|
animation: titlescale 0.5s
|
||||||
|
|
||||||
.ais-search-box
|
.ais-search-box
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#local-search
|
#local-search
|
||||||
|
animation: titlescale 0.5s
|
||||||
|
|
||||||
.local-search-box
|
.local-search-box
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -46,8 +60,9 @@ $lg = 1450px
|
|||||||
$sidebar-icon-top = 20px
|
$sidebar-icon-top = 20px
|
||||||
$sidebar-icon-left = $sidebar-icon-top - 4px
|
$sidebar-icon-left = $sidebar-icon-top - 4px
|
||||||
$sidebar-icon-size = 16px
|
$sidebar-icon-size = 16px
|
||||||
$go-up-bottom = $sidebar-icon-top
|
$web-bg = convert(hexo-config("background"))
|
||||||
$go-up-right = -($sidebar-icon-left)
|
$index_top_img_height = convert(hexo-config('index_top_img_height')) || 100vh
|
||||||
|
$index_site_info_top = convert(hexo-config("index_site_info_top")) || 43%
|
||||||
// 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%);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB |
BIN
source/img/icp.png
Normal file
BIN
source/img/icp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
1
source/img/post_loadding.svg
Normal file
1
source/img/post_loadding.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="200px" height="200px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-pacman" style="background: none;"><g ng-attr-style="display:{{config.showBean}}" style="display:block"><circle cx="74.5405" cy="50" r="4" ng-attr-fill="{{config.c2}}" fill="#a3d9ef"><animate attributeName="cx" calcMode="linear" values="95;35" keyTimes="0;1" dur="0.8" begin="-0.536s" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" calcMode="linear" values="0;1;1" keyTimes="0;0.2;1" dur="0.8" begin="-0.536s" repeatCount="indefinite"></animate></circle><circle cx="94.9405" cy="50" r="4" ng-attr-fill="{{config.c2}}" fill="#a3d9ef"><animate attributeName="cx" calcMode="linear" values="95;35" keyTimes="0;1" dur="0.8" begin="-0.264s" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" calcMode="linear" values="0;1;1" keyTimes="0;0.2;1" dur="0.8" begin="-0.264s" repeatCount="indefinite"></animate></circle><circle cx="54.7405" cy="50" r="4" ng-attr-fill="{{config.c2}}" fill="#a3d9ef"><animate attributeName="cx" calcMode="linear" values="95;35" keyTimes="0;1" dur="0.8" begin="0s" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" calcMode="linear" values="0;1;1" keyTimes="0;0.2;1" dur="0.8" begin="0s" repeatCount="indefinite"></animate></circle></g><g ng-attr-transform="translate({{config.showBeanOffset}} 0)" transform="translate(-15 0)"><path d="M50 50L20 50A30 30 0 0 0 80 50Z" ng-attr-fill="{{config.c1}}" fill="#82bbe4" transform="rotate(29.6108 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;45 50 50;0 50 50" keyTimes="0;0.5;1" dur="0.8s" begin="0s" repeatCount="indefinite"></animateTransform></path><path d="M50 50L20 50A30 30 0 0 1 80 50Z" ng-attr-fill="{{config.c1}}" fill="#82bbe4" transform="rotate(-29.6108 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;-45 50 50;0 50 50" keyTimes="0;0.5;1" dur="0.8s" begin="0s" repeatCount="indefinite"></animateTransform></path></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB |
File diff suppressed because it is too large
Load Diff
@@ -1,31 +0,0 @@
|
|||||||
$(function () {
|
|
||||||
changeReadModel();
|
|
||||||
|
|
||||||
function switchReadMode() {
|
|
||||||
var next_mode = $("body").hasClass("night-mode") ? "day" : "night";
|
|
||||||
Cookies.set("night-mode", next_mode, {
|
|
||||||
expires: 7,
|
|
||||||
path: '/'
|
|
||||||
});
|
|
||||||
changeReadModel();
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeReadModel() {
|
|
||||||
if (Cookies.get("night-mode") == "night") {
|
|
||||||
$("body").addClass("night-mode");
|
|
||||||
$("#nightshift").removeClass("fa-moon-o").addClass("fa-sun-o");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 非夜間模式
|
|
||||||
if (Cookies.get("night-mode") == "day") {
|
|
||||||
$("body").removeClass("night-mode");
|
|
||||||
$("#nightshift").removeClass("fa-sun-o").addClass("fa-moon-o");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#nightshift").click(function () {
|
|
||||||
switchReadMode();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
var start_date = document.getElementById("runtionshow").getAttribute("start_date")
|
var start_date = document.getElementById("runtionshow").getAttribute("start_date")
|
||||||
|
|
||||||
function show_date_time() {
|
function show_date_time() {
|
||||||
window.setTimeout("show_date_time()", 1000);
|
|
||||||
BirthDay=new Date(start_date);
|
BirthDay=new Date(start_date);
|
||||||
today=new Date();
|
today=new Date();
|
||||||
timeold=(today.getTime()-BirthDay.getTime());
|
timeold=(today.getTime()-BirthDay.getTime());
|
||||||
@@ -11,6 +10,10 @@ function show_date_time() {
|
|||||||
daysold=Math.floor(e_daysold);
|
daysold=Math.floor(e_daysold);
|
||||||
webinfo_runtime_count.innerHTML= daysold + " " + GLOBAL_CONFIG.runtime_unit
|
webinfo_runtime_count.innerHTML= daysold + " " + GLOBAL_CONFIG.runtime_unit
|
||||||
}
|
}
|
||||||
|
|
||||||
show_date_time()
|
var interval;
|
||||||
|
show_date_time();
|
||||||
|
clearInterval(interval);
|
||||||
|
interval = setInterval(show_date_time, 10000);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ $(function () {
|
|||||||
|
|
||||||
$('.search-dialog').animate({}, function () {
|
$('.search-dialog').animate({}, function () {
|
||||||
$('.search-dialog').css({
|
$('.search-dialog').css({
|
||||||
'display': 'block',
|
'display': 'block'
|
||||||
'animation': 'titlescale 0.5s'
|
}),300
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.ais-search-box--input').focus()
|
$('.ais-search-box--input').focus()
|
||||||
@@ -22,12 +21,20 @@ $(function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
var closeSearch = function () {
|
var closeSearch = function () {
|
||||||
$('body').css('overflow', 'auto')
|
$('body').css('width', '')
|
||||||
|
$('body').css('overflow', '')
|
||||||
|
$('.search-dialog').css({
|
||||||
|
'animation': 'search_close .5s'
|
||||||
|
})
|
||||||
|
|
||||||
$('.search-dialog').animate({}, function () {
|
$('.search-dialog').animate({}, function () {
|
||||||
$('.search-dialog').css({
|
|
||||||
'display': 'none'
|
setTimeout(function () {
|
||||||
})
|
$('.search-dialog').css({
|
||||||
|
'animation': '',
|
||||||
|
'display': 'none'
|
||||||
|
})
|
||||||
|
},500)
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.search-mask').fadeOut();
|
$('.search-mask').fadeOut();
|
||||||
@@ -102,7 +109,7 @@ $(function () {
|
|||||||
return (
|
return (
|
||||||
'<hr>' +
|
'<hr>' +
|
||||||
stats +
|
stats +
|
||||||
'<span class="algolia-logo pull-right">' +
|
'<span class="algolia-logo pull_right">' +
|
||||||
' <img src="' + GLOBAL_CONFIG.root + 'img/algolia.svg" alt="Algolia" />' +
|
' <img src="' + GLOBAL_CONFIG.root + 'img/algolia.svg" alt="Algolia" />' +
|
||||||
'</span>'
|
'</span>'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ $(function () {
|
|||||||
$('body').css('overflow', 'hidden')
|
$('body').css('overflow', 'hidden')
|
||||||
$('.search-dialog').animate({}, function () {
|
$('.search-dialog').animate({}, function () {
|
||||||
$('.search-dialog').css({
|
$('.search-dialog').css({
|
||||||
'display': 'block',
|
'display': 'block'
|
||||||
'animation': 'titlescale 0.5s'
|
}),300
|
||||||
})
|
|
||||||
})
|
})
|
||||||
$('#local-search-input input').focus()
|
$('#local-search-input input').focus()
|
||||||
|
|
||||||
@@ -27,12 +26,22 @@ $(function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
var closeSearch = function () {
|
var closeSearch = function () {
|
||||||
$('body').css('overflow', 'auto')
|
$('body').css('width', '')
|
||||||
$('.search-dialog').animate({}, function () {
|
$('body').css('overflow', '')
|
||||||
$('.search-dialog').css({
|
$('.search-dialog').css({
|
||||||
'display': 'none'
|
'animation': 'search_close .5s'
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('.search-dialog').animate({}, function () {
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
$('.search-dialog').css({
|
||||||
|
'animation': '',
|
||||||
|
'display': 'none'
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
})
|
||||||
|
|
||||||
$('.search-mask').fadeOut();
|
$('.search-mask').fadeOut();
|
||||||
}
|
}
|
||||||
$('.search-mask, .search-close-button').on('click', closeSearch)
|
$('.search-mask, .search-close-button').on('click', closeSearch)
|
||||||
|
|||||||
42
source/js/third-party/ClickShowText.js
vendored
Normal file
42
source/js/third-party/ClickShowText.js
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
function co(){
|
||||||
|
var colorElements = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f";
|
||||||
|
var colorArray = colorElements.split(",");
|
||||||
|
var color ="#";
|
||||||
|
for(var i =0;i<6;i++){
|
||||||
|
color+=colorArray[Math.floor(Math.random()*16)];
|
||||||
|
}
|
||||||
|
return color;
|
||||||
|
};
|
||||||
|
var a_idx = 0;
|
||||||
|
jQuery(document).ready(function($) {
|
||||||
|
$("body").click(function (e) {
|
||||||
|
|
||||||
|
var config = GLOBAL_CONFIG.ClickShowText;
|
||||||
|
|
||||||
|
/*这个数组中的每一个字符是你要浮动显示的词或句子,每次点击鼠标后按顺序出现*/
|
||||||
|
var a = config.text.split(",");
|
||||||
|
var $i = $("<span/>").text(a[a_idx]);
|
||||||
|
a_idx = (a_idx + 1) % a.length;
|
||||||
|
var x = e.pageX,
|
||||||
|
y = e.pageY;
|
||||||
|
$i.css({
|
||||||
|
"z-index": 150,
|
||||||
|
"top": y - 20,
|
||||||
|
"left": x -40,
|
||||||
|
"position": "absolute",
|
||||||
|
"font-weight": "bold",
|
||||||
|
"color": co(),
|
||||||
|
"cursor": "default",
|
||||||
|
"font-size": config.fontSize || "inherit"
|
||||||
|
});
|
||||||
|
$("body").append($i);
|
||||||
|
$i.animate({
|
||||||
|
"top": y - 180,
|
||||||
|
"opacity": 0
|
||||||
|
},
|
||||||
|
1500,
|
||||||
|
function() {
|
||||||
|
$i.remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
88
source/js/third-party/canvas-nest.js
vendored
Normal file
88
source/js/third-party/canvas-nest.js
vendored
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
! function () {
|
||||||
|
var cn = document.getElementById('canvas_nest');
|
||||||
|
var mb = cn.getAttribute("mobile");
|
||||||
|
|
||||||
|
if (mb == 'false' && (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent))) {
|
||||||
|
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)
|
||||||
|
}();
|
||||||
26
source/js/third-party/canvas-ribbon.js
vendored
26
source/js/third-party/canvas-ribbon.js
vendored
@@ -4,8 +4,23 @@
|
|||||||
* Version: v1.0.1
|
* Version: v1.0.1
|
||||||
* GitHub: https://github.com/hustcc/ribbon.js
|
* GitHub: https://github.com/hustcc/ribbon.js
|
||||||
**/
|
**/
|
||||||
// changed by Molunerfinn
|
|
||||||
!(function () {
|
!(function () {
|
||||||
|
|
||||||
|
var script = document.getElementById('ribbon');
|
||||||
|
var mb = script.getAttribute("mobile");
|
||||||
|
if (mb == 'false' && (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
config = {
|
||||||
|
z: attr(script, 'zIndex', -1), // z-index
|
||||||
|
a: attr(script, 'alpha', 0.6), // alpha
|
||||||
|
s: attr(script, 'size', 90), // size
|
||||||
|
c: attr(script, 'data-click', true) // click-to-change
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function attr (node, attr, default_value) {
|
function attr (node, attr, default_value) {
|
||||||
if (default_value === true) {
|
if (default_value === true) {
|
||||||
return node.getAttribute(attr) || default_value
|
return node.getAttribute(attr) || default_value
|
||||||
@@ -13,15 +28,6 @@
|
|||||||
return Number(node.getAttribute(attr)) || default_value
|
return Number(node.getAttribute(attr)) || default_value
|
||||||
}
|
}
|
||||||
|
|
||||||
// get user config
|
|
||||||
var script = document.getElementById('ribbon'),
|
|
||||||
config = {
|
|
||||||
z: attr(script, 'zIndex', -1), // z-index
|
|
||||||
a: attr(script, 'alpha', 0.6), // alpha
|
|
||||||
s: attr(script, 'size', 90), // size
|
|
||||||
c: attr(script, 'data-click', true) // click-to-change
|
|
||||||
}
|
|
||||||
|
|
||||||
var canvas = document.createElement('canvas'),
|
var canvas = document.createElement('canvas'),
|
||||||
g2d = canvas.getContext('2d'),
|
g2d = canvas.getContext('2d'),
|
||||||
pr = window.devicePixelRatio || 1,
|
pr = window.devicePixelRatio || 1,
|
||||||
|
|||||||
1
source/js/third-party/click_heart.js
vendored
Normal file
1
source/js/third-party/click_heart.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
!function(e,t,a){function r(e){var a=t.createElement("div");a.className="heart",n.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}),t.body.appendChild(a)}var n=[];e.requestAnimationFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},function(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),function(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),r(e)}}(),function e(){for(var a=0;a<n.length;a++)n[a].alpha<=0?(t.body.removeChild(n[a].el),n.splice(a,1)):(n[a].y--,n[a].scale+=.004,n[a].alpha-=.013,n[a].el.style.cssText="left:"+n[a].x+"px;top:"+n[a].y+"px;opacity:"+n[a].alpha+";transform:scale("+n[a].scale+","+n[a].scale+") rotate(45deg);background:"+n[a].color+";z-index:99999");requestAnimationFrame(e)}()}(window,document);
|
||||||
518
source/js/third-party/piao.js
vendored
518
source/js/third-party/piao.js
vendored
@@ -1,12 +1,13 @@
|
|||||||
(function(name, factory) {
|
|
||||||
if (typeof window === "object") {
|
(function (name, factory) {
|
||||||
window[name] = factory()
|
if (typeof window === "object") {
|
||||||
}
|
window[name] = factory()
|
||||||
})("Ribbons", function() {
|
}
|
||||||
var _w = window,
|
})("Ribbons", function () {
|
||||||
_b = document.body,
|
var _w = window,
|
||||||
_d = document.documentElement;
|
_b = document.body,
|
||||||
var random = function() {
|
_d = document.documentElement;
|
||||||
|
var random = function () {
|
||||||
if (arguments.length === 1) {
|
if (arguments.length === 1) {
|
||||||
if (Array.isArray(arguments[0])) {
|
if (Array.isArray(arguments[0])) {
|
||||||
var index = Math.round(random(0, arguments[0].length - 1));
|
var index = Math.round(random(0, arguments[0].length - 1));
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
};
|
};
|
||||||
var screenInfo = function(e) {
|
var screenInfo = function (e) {
|
||||||
var width = Math.max(0, _w.innerWidth || _d.clientWidth || _b.clientWidth || 0),
|
var width = Math.max(0, _w.innerWidth || _d.clientWidth || _b.clientWidth || 0),
|
||||||
height = Math.max(0, _w.innerHeight || _d.clientHeight || _b.clientHeight || 0),
|
height = Math.max(0, _w.innerHeight || _d.clientHeight || _b.clientHeight || 0),
|
||||||
scrollx = Math.max(0, _w.pageXOffset || _d.scrollLeft || _b.scrollLeft || 0) - (_d.clientLeft || 0),
|
scrollx = Math.max(0, _w.pageXOffset || _d.scrollLeft || _b.scrollLeft || 0) - (_d.clientLeft || 0),
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
scrolly: scrolly
|
scrolly: scrolly
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var mouseInfo = function(e) {
|
var mouseInfo = function (e) {
|
||||||
var screen = screenInfo(e),
|
var screen = screenInfo(e),
|
||||||
mousex = e ? Math.max(0, e.pageX || e.clientX || 0) : 0,
|
mousex = e ? Math.max(0, e.pageX || e.clientX || 0) : 0,
|
||||||
mousey = e ? Math.max(0, e.pageY || e.clientY || 0) : 0;
|
mousey = e ? Math.max(0, e.pageY || e.clientY || 0) : 0;
|
||||||
@@ -44,60 +45,60 @@
|
|||||||
centery: mousey - screen.height / 2
|
centery: mousey - screen.height / 2
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Point = function(x, y) {
|
var Point = function (x, y) {
|
||||||
this.x = 0;
|
this.x = 0;
|
||||||
this.y = 0;
|
this.y = 0;
|
||||||
this.set(x, y)
|
this.set(x, y)
|
||||||
};
|
};
|
||||||
Point.prototype = {
|
Point.prototype = {
|
||||||
constructor: Point,
|
constructor: Point,
|
||||||
set: function(x, y) {
|
set: function (x, y) {
|
||||||
this.x = x || 0;
|
this.x = x || 0;
|
||||||
this.y = y || 0
|
this.y = y || 0
|
||||||
},
|
},
|
||||||
copy: function(point) {
|
copy: function (point) {
|
||||||
this.x = point.x || 0;
|
this.x = point.x || 0;
|
||||||
this.y = point.y || 0;
|
this.y = point.y || 0;
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
multiply: function(x, y) {
|
multiply: function (x, y) {
|
||||||
this.x *= x || 1;
|
this.x *= x || 1;
|
||||||
this.y *= y || 1;
|
this.y *= y || 1;
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
divide: function(x, y) {
|
divide: function (x, y) {
|
||||||
this.x /= x || 1;
|
this.x /= x || 1;
|
||||||
this.y /= y || 1;
|
this.y /= y || 1;
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
add: function(x, y) {
|
add: function (x, y) {
|
||||||
this.x += x || 0;
|
this.x += x || 0;
|
||||||
this.y += y || 0;
|
this.y += y || 0;
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
subtract: function(x, y) {
|
subtract: function (x, y) {
|
||||||
this.x -= x || 0;
|
this.x -= x || 0;
|
||||||
this.y -= y || 0;
|
this.y -= y || 0;
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
clampX: function(min, max) {
|
clampX: function (min, max) {
|
||||||
this.x = Math.max(min, Math.min(this.x, max));
|
this.x = Math.max(min, Math.min(this.x, max));
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
clampY: function(min, max) {
|
clampY: function (min, max) {
|
||||||
this.y = Math.max(min, Math.min(this.y, max));
|
this.y = Math.max(min, Math.min(this.y, max));
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
flipX: function() {
|
flipX: function () {
|
||||||
this.x *= -1;
|
this.x *= -1;
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
flipY: function() {
|
flipY: function () {
|
||||||
this.y *= -1;
|
this.y *= -1;
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Factory = function(options) {
|
var Factory = function (options) {
|
||||||
this._canvas = null;
|
this._canvas = null;
|
||||||
this._context = null;
|
this._context = null;
|
||||||
this._sto = null;
|
this._sto = null;
|
||||||
@@ -123,202 +124,211 @@
|
|||||||
this.setOptions(options);
|
this.setOptions(options);
|
||||||
this.init()
|
this.init()
|
||||||
};
|
};
|
||||||
Factory.prototype = {
|
Factory.prototype = {
|
||||||
constructor: Factory,
|
constructor: Factory,
|
||||||
setOptions: function(options) {
|
setOptions: function (options) {
|
||||||
if (typeof options === "object") {
|
if (typeof options === "object") {
|
||||||
for (var key in options) {
|
for (var key in options) {
|
||||||
if (options.hasOwnProperty(key)) {
|
if (options.hasOwnProperty(key)) {
|
||||||
this._options[key] = options[key]
|
this._options[key] = options[key]
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
init: function() {
|
|
||||||
try {
|
|
||||||
this._canvas = document.createElement("canvas");
|
|
||||||
this._canvas.style["display"] = "block";
|
|
||||||
this._canvas.style["position"] = "fixed";
|
|
||||||
this._canvas.style["margin"] = "0";
|
|
||||||
this._canvas.style["padding"] = "0";
|
|
||||||
this._canvas.style["border"] = "0";
|
|
||||||
this._canvas.style["outline"] = "0";
|
|
||||||
this._canvas.style["left"] = "0";
|
|
||||||
this._canvas.style["top"] = "0";
|
|
||||||
this._canvas.style["width"] = "100%";
|
|
||||||
this._canvas.style["height"] = "100%";
|
|
||||||
this._canvas.style["z-index"] = "-1";
|
|
||||||
this._onResize();
|
|
||||||
this._context = this._canvas.getContext("2d");
|
|
||||||
this._context.clearRect(0, 0, this._width, this._height);
|
|
||||||
this._context.globalAlpha = this._options.colorAlpha;
|
|
||||||
window.addEventListener("resize", this._onResize);
|
|
||||||
window.addEventListener("scroll", this._onScroll);
|
|
||||||
document.body.appendChild(this._canvas)
|
|
||||||
} catch (e) {
|
|
||||||
console.warn("Canvas Context Error: " + e.toString());
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this._onDraw()
|
|
||||||
},
|
|
||||||
addRibbon: function() {
|
|
||||||
var dir = Math.round(random(1, 9)) > 5 ? "right" : "left",
|
|
||||||
stop = 1000,
|
|
||||||
hide = 200,
|
|
||||||
min = 0 - hide,
|
|
||||||
max = this._width + hide,
|
|
||||||
movex = 0,
|
|
||||||
movey = 0,
|
|
||||||
startx = dir === "right" ? min : max,
|
|
||||||
starty = Math.round(random(0, this._height));
|
|
||||||
if (/^(top|min)$/i.test(this._options.verticalPosition)) {
|
|
||||||
starty = 0 + hide
|
|
||||||
} else if (/^(middle|center)$/i.test(this._options.verticalPosition)) {
|
|
||||||
starty = this._height / 2
|
|
||||||
} else if (/^(bottom|max)$/i.test(this._options.verticalPosition)) {
|
|
||||||
starty = this._height - hide
|
|
||||||
}
|
|
||||||
var ribbon = [],
|
|
||||||
point1 = new Point(startx, starty),
|
|
||||||
point2 = new Point(startx, starty),
|
|
||||||
point3 = null,
|
|
||||||
color = Math.round(random(0, 360)),
|
|
||||||
delay = 0;
|
|
||||||
while (true) {
|
|
||||||
if (stop <= 0) break;
|
|
||||||
stop--;
|
|
||||||
movex = Math.round((Math.random() * 1 - 0.2) * this._options.horizontalSpeed);
|
|
||||||
movey = Math.round((Math.random() * 1 - 0.5) * (this._height * 0.25));
|
|
||||||
point3 = new Point();
|
|
||||||
point3.copy(point2);
|
|
||||||
if (dir === "right") {
|
|
||||||
point3.add(movex, movey);
|
|
||||||
if (point2.x >= max) break
|
|
||||||
} else if (dir === "left") {
|
|
||||||
point3.subtract(movex, movey);
|
|
||||||
if (point2.x <= min) break
|
|
||||||
}
|
|
||||||
ribbon.push({
|
|
||||||
point1: new Point(point1.x, point1.y),
|
|
||||||
point2: new Point(point2.x, point2.y),
|
|
||||||
point3: point3,
|
|
||||||
color: color,
|
|
||||||
delay: delay,
|
|
||||||
dir: dir,
|
|
||||||
alpha: 0,
|
|
||||||
phase: 0
|
|
||||||
});
|
|
||||||
point1.copy(point2);
|
|
||||||
point2.copy(point3);
|
|
||||||
delay += 4;
|
|
||||||
color += this._options.colorCycleSpeed
|
|
||||||
}
|
|
||||||
this._ribbons.push(ribbon)
|
|
||||||
},
|
|
||||||
_drawRibbonSection: function(section) {
|
|
||||||
if (section) {
|
|
||||||
if (section.phase >= 1 && section.alpha <= 0) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if (section.delay <= 0) {
|
|
||||||
section.phase += 0.02;
|
|
||||||
section.alpha = Math.sin(section.phase) * 1;
|
|
||||||
section.alpha = section.alpha <= 0 ? 0 : section.alpha;
|
|
||||||
section.alpha = section.alpha >= 1 ? 1 : section.alpha;
|
|
||||||
if (this._options.animateSections) {
|
|
||||||
var mod = Math.sin(1 + section.phase * Math.PI / 2) * 0.1;
|
|
||||||
if (section.dir === "right") {
|
|
||||||
section.point1.add(mod, 0);
|
|
||||||
section.point2.add(mod, 0);
|
|
||||||
section.point3.add(mod, 0)
|
|
||||||
} else {
|
|
||||||
section.point1.subtract(mod, 0);
|
|
||||||
section.point2.subtract(mod, 0);
|
|
||||||
section.point3.subtract(mod, 0)
|
|
||||||
}
|
}
|
||||||
section.point1.add(0, mod);
|
|
||||||
section.point2.add(0, mod);
|
|
||||||
section.point3.add(0, mod)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
section.delay -= 0.5
|
|
||||||
}
|
|
||||||
var s = this._options.colorSaturation,
|
|
||||||
l = this._options.colorBrightness,
|
|
||||||
c = "hsla(" + section.color + ", " + s + ", " + l + ", " + section.alpha + " )";
|
|
||||||
this._context.save();
|
|
||||||
if (this._options.parallaxAmount !== 0) {
|
|
||||||
this._context.translate(0, this._scroll * this._options.parallaxAmount)
|
|
||||||
}
|
|
||||||
this._context.beginPath();
|
|
||||||
this._context.moveTo(section.point1.x, section.point1.y);
|
|
||||||
this._context.lineTo(section.point2.x, section.point2.y);
|
|
||||||
this._context.lineTo(section.point3.x, section.point3.y);
|
|
||||||
this._context.fillStyle = c;
|
|
||||||
this._context.fill();
|
|
||||||
if (this._options.strokeSize > 0) {
|
|
||||||
this._context.lineWidth = this._options.strokeSize;
|
|
||||||
this._context.strokeStyle = c;
|
|
||||||
this._context.lineCap = "round";
|
|
||||||
this._context.stroke()
|
|
||||||
}
|
|
||||||
this._context.restore()
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
_onDraw: function() {
|
|
||||||
for (var i = 0, t = this._ribbons.length; i < t; ++i) {
|
|
||||||
if (!this._ribbons[i]) {
|
|
||||||
this._ribbons.splice(i, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this._context.clearRect(0, 0, this._width, this._height);
|
|
||||||
for (var a = 0; a < this._ribbons.length; ++a) {
|
|
||||||
var ribbon = this._ribbons[a],
|
|
||||||
numSections = ribbon.length,
|
|
||||||
numDone = 0;
|
|
||||||
for (var b = 0; b < numSections; ++b) {
|
|
||||||
if (this._drawRibbonSection(ribbon[b])) {
|
|
||||||
numDone++
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (numDone >= numSections) {
|
},
|
||||||
this._ribbons[a] = null
|
init: function () {
|
||||||
|
try {
|
||||||
|
this._canvas = document.createElement("canvas");
|
||||||
|
this._canvas.style["display"] = "block";
|
||||||
|
this._canvas.style["position"] = "fixed";
|
||||||
|
this._canvas.style["margin"] = "0";
|
||||||
|
this._canvas.style["padding"] = "0";
|
||||||
|
this._canvas.style["border"] = "0";
|
||||||
|
this._canvas.style["outline"] = "0";
|
||||||
|
this._canvas.style["left"] = "0";
|
||||||
|
this._canvas.style["top"] = "0";
|
||||||
|
this._canvas.style["width"] = "100%";
|
||||||
|
this._canvas.style["height"] = "100%";
|
||||||
|
this._canvas.style["z-index"] = "-1";
|
||||||
|
this._onResize();
|
||||||
|
this._context = this._canvas.getContext("2d");
|
||||||
|
this._context.clearRect(0, 0, this._width, this._height);
|
||||||
|
this._context.globalAlpha = this._options.colorAlpha;
|
||||||
|
window.addEventListener("resize", this._onResize);
|
||||||
|
window.addEventListener("scroll", this._onScroll);
|
||||||
|
document.body.appendChild(this._canvas)
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Canvas Context Error: " + e.toString());
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
this._onDraw()
|
||||||
if (this._ribbons.length < this._options.ribbonCount) {
|
},
|
||||||
this.addRibbon()
|
addRibbon: function () {
|
||||||
}
|
var dir = Math.round(random(1, 9)) > 5 ? "right" : "left",
|
||||||
requestAnimationFrame(this._onDraw)
|
stop = 1000,
|
||||||
},
|
hide = 200,
|
||||||
_onResize: function(e) {
|
min = 0 - hide,
|
||||||
var screen = screenInfo(e);
|
max = this._width + hide,
|
||||||
this._width = screen.width;
|
movex = 0,
|
||||||
this._height = screen.height;
|
movey = 0,
|
||||||
if (this._canvas) {
|
startx = dir === "right" ? min : max,
|
||||||
this._canvas.width = this._width;
|
starty = Math.round(random(0, this._height));
|
||||||
this._canvas.height = this._height;
|
if (/^(top|min)$/i.test(this._options.verticalPosition)) {
|
||||||
if (this._context) {
|
starty = 0 + hide
|
||||||
this._context.globalAlpha = this._options.colorAlpha
|
} else if (/^(middle|center)$/i.test(this._options.verticalPosition)) {
|
||||||
|
starty = this._height / 2
|
||||||
|
} else if (/^(bottom|max)$/i.test(this._options.verticalPosition)) {
|
||||||
|
starty = this._height - hide
|
||||||
}
|
}
|
||||||
|
var ribbon = [],
|
||||||
|
point1 = new Point(startx, starty),
|
||||||
|
point2 = new Point(startx, starty),
|
||||||
|
point3 = null,
|
||||||
|
color = Math.round(random(0, 360)),
|
||||||
|
delay = 0;
|
||||||
|
while (true) {
|
||||||
|
if (stop <= 0) break;
|
||||||
|
stop--;
|
||||||
|
movex = Math.round((Math.random() * 1 - 0.2) * this._options.horizontalSpeed);
|
||||||
|
movey = Math.round((Math.random() * 1 - 0.5) * (this._height * 0.25));
|
||||||
|
point3 = new Point();
|
||||||
|
point3.copy(point2);
|
||||||
|
if (dir === "right") {
|
||||||
|
point3.add(movex, movey);
|
||||||
|
if (point2.x >= max) break
|
||||||
|
} else if (dir === "left") {
|
||||||
|
point3.subtract(movex, movey);
|
||||||
|
if (point2.x <= min) break
|
||||||
|
}
|
||||||
|
ribbon.push({
|
||||||
|
point1: new Point(point1.x, point1.y),
|
||||||
|
point2: new Point(point2.x, point2.y),
|
||||||
|
point3: point3,
|
||||||
|
color: color,
|
||||||
|
delay: delay,
|
||||||
|
dir: dir,
|
||||||
|
alpha: 0,
|
||||||
|
phase: 0
|
||||||
|
});
|
||||||
|
point1.copy(point2);
|
||||||
|
point2.copy(point3);
|
||||||
|
delay += 4;
|
||||||
|
color += this._options.colorCycleSpeed
|
||||||
|
}
|
||||||
|
this._ribbons.push(ribbon)
|
||||||
|
},
|
||||||
|
_drawRibbonSection: function (section) {
|
||||||
|
if (section) {
|
||||||
|
if (section.phase >= 1 && section.alpha <= 0) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (section.delay <= 0) {
|
||||||
|
section.phase += 0.02;
|
||||||
|
section.alpha = Math.sin(section.phase) * 1;
|
||||||
|
section.alpha = section.alpha <= 0 ? 0 : section.alpha;
|
||||||
|
section.alpha = section.alpha >= 1 ? 1 : section.alpha;
|
||||||
|
if (this._options.animateSections) {
|
||||||
|
var mod = Math.sin(1 + section.phase * Math.PI / 2) * 0.1;
|
||||||
|
if (section.dir === "right") {
|
||||||
|
section.point1.add(mod, 0);
|
||||||
|
section.point2.add(mod, 0);
|
||||||
|
section.point3.add(mod, 0)
|
||||||
|
} else {
|
||||||
|
section.point1.subtract(mod, 0);
|
||||||
|
section.point2.subtract(mod, 0);
|
||||||
|
section.point3.subtract(mod, 0)
|
||||||
|
}
|
||||||
|
section.point1.add(0, mod);
|
||||||
|
section.point2.add(0, mod);
|
||||||
|
section.point3.add(0, mod)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
section.delay -= 0.5
|
||||||
|
}
|
||||||
|
var s = this._options.colorSaturation,
|
||||||
|
l = this._options.colorBrightness,
|
||||||
|
c = "hsla(" + section.color + ", " + s + ", " + l + ", " + section.alpha + " )";
|
||||||
|
this._context.save();
|
||||||
|
if (this._options.parallaxAmount !== 0) {
|
||||||
|
this._context.translate(0, this._scroll * this._options.parallaxAmount)
|
||||||
|
}
|
||||||
|
this._context.beginPath();
|
||||||
|
this._context.moveTo(section.point1.x, section.point1.y);
|
||||||
|
this._context.lineTo(section.point2.x, section.point2.y);
|
||||||
|
this._context.lineTo(section.point3.x, section.point3.y);
|
||||||
|
this._context.fillStyle = c;
|
||||||
|
this._context.fill();
|
||||||
|
if (this._options.strokeSize > 0) {
|
||||||
|
this._context.lineWidth = this._options.strokeSize;
|
||||||
|
this._context.strokeStyle = c;
|
||||||
|
this._context.lineCap = "round";
|
||||||
|
this._context.stroke()
|
||||||
|
}
|
||||||
|
this._context.restore()
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
_onDraw: function () {
|
||||||
|
for (var i = 0, t = this._ribbons.length; i < t; ++i) {
|
||||||
|
if (!this._ribbons[i]) {
|
||||||
|
this._ribbons.splice(i, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._context.clearRect(0, 0, this._width, this._height);
|
||||||
|
for (var a = 0; a < this._ribbons.length; ++a) {
|
||||||
|
var ribbon = this._ribbons[a],
|
||||||
|
numSections = ribbon.length,
|
||||||
|
numDone = 0;
|
||||||
|
for (var b = 0; b < numSections; ++b) {
|
||||||
|
if (this._drawRibbonSection(ribbon[b])) {
|
||||||
|
numDone++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (numDone >= numSections) {
|
||||||
|
this._ribbons[a] = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this._ribbons.length < this._options.ribbonCount) {
|
||||||
|
this.addRibbon()
|
||||||
|
}
|
||||||
|
requestAnimationFrame(this._onDraw)
|
||||||
|
},
|
||||||
|
_onResize: function (e) {
|
||||||
|
var screen = screenInfo(e);
|
||||||
|
this._width = screen.width;
|
||||||
|
this._height = screen.height;
|
||||||
|
if (this._canvas) {
|
||||||
|
this._canvas.width = this._width;
|
||||||
|
this._canvas.height = this._height;
|
||||||
|
if (this._context) {
|
||||||
|
this._context.globalAlpha = this._options.colorAlpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_onScroll: function (e) {
|
||||||
|
var screen = screenInfo(e);
|
||||||
|
this._scroll = screen.scrolly
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
_onScroll: function(e) {
|
return Factory
|
||||||
var screen = screenInfo(e);
|
});
|
||||||
this._scroll = screen.scrolly
|
|
||||||
}
|
var cn = document.getElementById('ribbon_piao');
|
||||||
};
|
var mb = cn.getAttribute("mobile");
|
||||||
return Factory
|
|
||||||
});
|
if ( mb == 'false' && (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent))) {
|
||||||
new Ribbons({
|
|
||||||
colorSaturation: "60%",
|
} else {
|
||||||
colorBrightness: "50%",
|
new Ribbons({
|
||||||
colorAlpha: 0.5,
|
colorSaturation: "60%",
|
||||||
colorCycleSpeed: 5,
|
colorBrightness: "50%",
|
||||||
verticalPosition: "random",
|
colorAlpha: 0.5,
|
||||||
horizontalSpeed: 200,
|
colorCycleSpeed: 5,
|
||||||
ribbonCount: 3,
|
verticalPosition: "random",
|
||||||
strokeSize: 0,
|
horizontalSpeed: 200,
|
||||||
parallaxAmount: -0.2,
|
ribbonCount: 3,
|
||||||
animateSections: true
|
strokeSize: 0,
|
||||||
});
|
parallaxAmount: -0.2,
|
||||||
|
animateSections: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user