diff --git a/README.md b/README.md
index 0a73fa8..7eca56d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# hexo-theme-butterfly
-
+
diff --git a/README_CN.md b/README_CN.md
index e3e4b7e..9777fed 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -1,6 +1,6 @@
# hexo-theme-butterfly
-
+
diff --git a/_config.yml b/_config.yml
index 367dc25..090224b 100644
--- a/_config.yml
+++ b/_config.yml
@@ -33,10 +33,10 @@ favicon: /img/favicon.ico
# Highlight theme
# ---------------
-highlight_theme: light # default, light, darker, pale night, ocean
-highlight_copy: false #代碼複製按鈕
+highlight_theme: light # default / darker / pale night / light / ocean
+highlight_copy: true #代碼複製按鈕
highlight_lang: true #代碼語言顯示
-highlight_shrink: false #代碼框不展開,需點擊 '>' 打開
+highlight_shrink: false # true 全部代碼框不展開,需點擊 '>' 打開 / false 代碼框展開,有'>'點擊按鈕 | none 代碼框展開,不顯示 '>' 按鈕
code_word_wrap: false
@@ -83,56 +83,49 @@ local_search:
# ---------------
mathjax:
enable: false
+ # true 表示每一頁都加載mathjax.js
+ # false 需要時加載,須在使用的Markdown Front-matter 加上 mathjax: true
+ per_page: false
# KaTeX
# ---------------
katex:
enable: false
+ # true 表示每一頁都加載katex.js
+ # false 需要時加載,須在使用的Markdown Front-matter 加上 katex: true
+ per_page: false
hide_scrollbar: true
-#### Analysis ####
-# ---------------
-# baidu_analytics:
-
-#Google Analytics
-google_analytics:
-
-
# Post info settings
# ---------------
-# avatar: /img/avatar.png
-avatar: https://cdn.jsdelivr.net/gh/jerryc127/CDN@latest/Photo/avatar.png
+avatar: /img/avatar.png
# the banner image of index
-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
+index_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/index.jpg
# if the banner of page not setting,it will show the top_img
-default_top_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/top_img_index.jpg
+default_top_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/index.jpg
# 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/butterfly_cdn@2.1.0/top_img/default.png
# 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/butterfly_cdn@2.1.0/top_img/archive.jpg
# the banner image of tag page
-tag_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/tag-bg.png
+tag_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/tag.png
# the banner image of category page
-category_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/category-bg
+category_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/category.jpg
# 如果你有使用hexo-douban去生成movie界面,可配置這個
-movies_img: https://cdn.jsdelivr.net/gh/jerryc127/CDN/Photo/movie.jpg
+movies_img: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/top_img/movie.jpg
# if the photo link cannot connect,it will show that
lodding_bg:
- flink: /img/friend_404.gif
- post_page: /img/404.jpg
+ flink: /img/friend_404.gif #404后圖片
+ post_page: /img/404.jpg #404后圖片
+# post: /img/loading.gif ##加載動畫
post_meta:
date_type: both # or created or updated 文章日期是创建日或者更新日或都显示
@@ -188,22 +181,21 @@ addtoany:
disqus:
enable: false
shortname:
+ count: false # top_img顯示評論數
-# laibili:
-# enable: false
-# uid:
+laibili:
+ enable: false
+ uid:
-# gitalk:
-# enable: false
-# client_id:
-# client_secret:
-# repo:
-# owner:
-# admin:
-# language: # en , zh-CN , zh-TW
-#### Using this js for redirect to gitalk container after login
-#### See https://github.com/gitalk/gitalk/issues/125
-# js: https://cdn.jsdelivr.net/gh/upupming/gitalk@36368e5dffd049e956cdbbd751ff96c28d8255cf/dist/gitalk.min.js
+gitalk:
+ enable: false
+ client_id:
+ client_secret:
+ repo:
+ owner:
+ admin:
+ language: # en , zh-CN , zh-TW
+ count: false # top_img顯示評論數
# valine comment system. https://valine.js.org
valine:
@@ -218,10 +210,11 @@ valine:
placeholder: Please leave your footprints # valine comment input placeholder(like: Please leave your footprints )
guest_info: nick,mail,link #valine comment header info
bg: /img/comment_bg.png # valine background
+ count: false # top_img顯示評論數
##### Footer Settings ####
# ------------------------------------
-since: 2018
+since: 2019
footer_custom_text:
@@ -234,6 +227,25 @@ ICP:
text:
icon: /img/icp.png
+#### Analysis ####
+# ---------------
+baidu_analytics:
+
+# Google Analytics
+google_analytics:
+
+# Tencent_analytics ID
+tencent_analytics:
+
+# Ads
+# ---------------
+# Google Adsense
+google_adsense:
+ enable: false
+ js: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
+ client:
+ enable_page_level_ads: true
+
#### 站長驗證 ####
# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
@@ -276,6 +288,7 @@ reward:
related_post:
enable: true
limit: 6 # 顯示推薦文章數目
+ date_type: created # or created or updated 文章日期顯示创建日或者更新日
#### 美化/效果 ####
#--------------------------------
@@ -298,9 +311,13 @@ related_post:
# 主頁設置
# 默認top_img全屏,site_info在中間
# 使用默認, 都無需填寫(建議默認)
-index_site_info_top: #主頁標題距離頂部距離 例如 300px/300em/300rem/10%
index_top_img_height: #主頁top_img高度 例如 300px/300em/300rem 不能使用百分比
+# 主頁文章COVER顯示位置
+# 三個值可配置 left , right , both
+# left(全部圖片顯示在左邊),right(全部圖片顯示在右邊),both(左右左右順序顯示)
+index_post_cover: both
+
# category和tag頁的UI設置
# index 值代表 UI將與首頁的UI一樣
# 默認跟archives頁面UI一樣
@@ -338,7 +355,7 @@ canvas_ribbon_piao:
# 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.)
+ 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.
@@ -347,6 +364,8 @@ canvas_nest:
# 打字效果
activate_power_mode:
enable: false
+ colorful: true # 冒光特效
+ shake: true # 抖動特效
# 鼠標點擊效果
# 避免卡頓,建議只開啓一個
@@ -361,7 +380,7 @@ click_heart:
# 點擊出現文字,文字可自行修改
ClickShowText:
enable: false
- text:
+ text:
- 富强
- 民主
- 文明
@@ -410,10 +429,10 @@ hr:
# 主頁subtitle
# 打字效果
-subtitle:
+subtitle:
enable: true
# source調用第三方服務
- # source: false 關閉調用
+ # source: false 關閉調用
# source: 1 調用金山詞霸的每日一句(簡體)
# source: 2 調用一言网的一句話(簡體) #https://hitokoto.cn/
# source: 3 調用一句网(簡體) http://yijuzhan.com/
@@ -425,7 +444,6 @@ subtitle:
- 今日事,今日畢
- Never put off till tomorrow what you can do today
-
#### 側邊欄 ####
#-------------------------------------
# 手機頁面( 顯示寬度 < 768px )是否顯示aside内容
@@ -496,11 +514,17 @@ autoChangeMode: false
#------------------------------------------------
# 圖片大圖查看模式
-# 默認為 fancybox http://fancyapps.com/fancybox/3/
-# 可以選擇改爲 medium_zoom https://github.com/francoischalifour/medium-zoom
+# 可選 medium_zoom 或者 fancybox
+# 只選一個 或者 兩個都不選
+#--------------------------------------------
+# medium_zoom https://github.com/francoischalifour/medium-zoom
medium_zoom:
enable: false
+# fancybox http://fancyapps.com/fancybox/3/
+fancybox:
+ enable: true
+
# Snackbar 彈窗
# https://github.com/polonel/SnackBar
# position 彈窗位置
@@ -508,8 +532,8 @@ medium_zoom:
snackbar:
enable: false
position: bottom-left
- bg_light: '#49b1f5' #light mode時彈窗背景
- bg_dark: '#2d3035' #dark mode時彈窗背景
+ bg_light: "#49b1f5" #light mode時彈窗背景
+ bg_dark: "#2d3035" #dark mode時彈窗背景
#百度推送
baidu_push:
@@ -554,7 +578,6 @@ twitter_meta: true
# https://i.loli.net/2019/09/08/2wbFJEKloisRvhj.png
Open_Graph_meta: true
-
# CDN
# 網站必須
# 可根據需要自行添加js/css
@@ -562,14 +585,13 @@ 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
+ # - https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css #fontawesomeV5_css
js:
- - https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js #/js/third-party/jquery.min.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:
@@ -581,14 +603,12 @@ CDN:
# 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
+ sharejs: https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js
+ sharejs_css: https://cdn.jsdelivr.net/npm/social-share.js/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
+ algolia_search: https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.js
+ algolia_search_css: https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.css
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
@@ -599,9 +619,9 @@ CDN:
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
+ canvas_ribbon: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/canvas-ribbon.js
+ canvas_ribbon_piao: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/piao.js
+ canvas_nest: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/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
@@ -610,19 +630,17 @@ CDN:
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
+ fancybox: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/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
+ snackbar_css: https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css
+ snackbar: https://cdn.jsdelivr.net/npm/node-snackbar/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
+ anime: https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js
+ activate_power_mode: https://cdn.jsdelivr.net/npm/activate-power-mode/dist/activate-power-mode.min.js
+ fireworks: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/fireworks.js
+ click_heart: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/click_heart.js
+ ClickShowText: https://cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/ClickShowText.js
translate: /js/tw_cn.js
- runtimeshow: js/runtimeshow.js
-
diff --git a/languages/default.yml b/languages/default.yml
index 6275ed5..d74e13b 100644
--- a/languages/default.yml
+++ b/languages/default.yml
@@ -27,6 +27,7 @@ post:
wordcount: Word count
min2read: "Reading time: %s min"
page_pv: Post View
+ comments: comments
copyright:
author: Author
link: Link
diff --git a/languages/en.yml b/languages/en.yml
index 5b24d1c..bf92b31 100644
--- a/languages/en.yml
+++ b/languages/en.yml
@@ -27,6 +27,7 @@ post:
wordcount: Word count
min2read: "Reading time: %s min"
page_pv: Post View
+ comments: comments
copyright:
author: Author
link: Link
diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml
index 855fa1a..e804c47 100644
--- a/languages/zh-CN.yml
+++ b/languages/zh-CN.yml
@@ -27,6 +27,7 @@ post:
wordcount: 字数总计
min2read: "阅读时长: %s 分钟"
page_pv: 阅读量
+ comments: 评论数
copyright:
author: 文章作者
link: 文章链接
diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml
index 7bbfcf0..0bd13d5 100644
--- a/languages/zh-TW.yml
+++ b/languages/zh-TW.yml
@@ -27,6 +27,7 @@ post:
wordcount: 字數總計
min2read: "閲讀時長: %s 分鐘"
page_pv: 閲讀量
+ comments: 評論數
copyright:
author: 文章作者
link: 文章鏈接
diff --git a/layout/archive.pug b/layout/archive.pug
index af66ee7..84d7cd7 100644
--- a/layout/archive.pug
+++ b/layout/archive.pug
@@ -8,4 +8,4 @@ block content
+articleSort(page.posts)
include includes/pagination.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
diff --git a/layout/category.pug b/layout/category.pug
index 457592d..aadf5b0 100644
--- a/layout/category.pug
+++ b/layout/category.pug
@@ -7,7 +7,7 @@ block content
+UI_NEW(page.posts)
include includes/pagination.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
else
include ./includes/mixins/article-sort.pug
#category
@@ -15,5 +15,5 @@ block content
+articleSort(page.posts)
include includes/pagination.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
\ No newline at end of file
diff --git a/layout/flink.pug b/layout/flink.pug
index 1002441..b88ac37 100644
--- a/layout/flink.pug
+++ b/layout/flink.pug
@@ -7,16 +7,15 @@
li.md-links-item
a(href=item.link title=item.name target="_blank")
if theme.lazyload.enable
- img.lazyload(data-src=item.avatar onerror=`onerror=null;src='${theme.lodding_bg.flink}'` height="72px")
+ img.lazyload(data-src=item.avatar onerror=`this.onerror=null;this.src='` + url_for(theme.lodding_bg.flink) + `'` alt=item.name )
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-des")=item.descr
+ img(src=item.avatar onerror=`this.onerror=null;this.src='` + url_for(theme.lodding_bg.flink) + `'` alt=item.name )
+ .md-links-title= item.name
+ .md-links-des= item.descr
hr
div
- p(style="font-size:15px;font-weight:bold")= theme.Flink.info_headline
+ h2= theme.Flink.info_headline
ul
li= theme.Flink.name
li= theme.Flink.address
diff --git a/layout/includes/additional-js.pug b/layout/includes/additional-js.pug
index e111f95..3b3c522 100644
--- a/layout/includes/additional-js.pug
+++ b/layout/includes/additional-js.pug
@@ -1,18 +1,10 @@
if (theme.medium_zoom && theme.medium_zoom.enable)
script(src=url_for(theme.CDN.medium_zoom))
-else
+
+if (theme.fancybox && theme.fancybox.enable)
script(src=url_for(theme.CDN.fancybox))
-if (theme.algolia_search.enable)
- script(async src=url_for(theme.CDN.algolia_js))
-if (theme.mathjax && theme.mathjax.enable)
- if(!is_tag() && !is_category() && !is_archive() && !is_home())
- include ./third-party/mathjax.pug
-if (theme.katex && theme.katex.enable)
- if(!is_tag() && !is_category() && !is_archive() && !is_home())
- include ./third-party/katex.pug
-if (theme.local_search && theme.local_search.enable)
- script(async src=url_for(theme.CDN.local_search))
+include ./math/index.pug
if theme.fireworks && theme.fireworks.enable
script(src=url_for(theme.CDN.anime))
@@ -30,20 +22,17 @@ if (theme.canvas_ribbon_piao && theme.canvas_ribbon_piao.enable)
if (theme.canvas_nest && theme.canvas_nest.enable)
include ./third-party/canvas-nest.pug
-if theme.baidu_push && theme.baidu_push.enable
- script(src=url_for('js/baidupush.js'))
-
if theme.activate_power_mode.enable
+ - var colorful = theme.activate_power_mode.colorful == false ? false : true
+ - var shake = theme.activate_power_mode.shake == false ? false : true
script(src=url_for(theme.CDN.activate_power_mode))
script.
- POWERMODE.colorful = true; // make power mode colorful
- POWERMODE.shake = true; // turn off shake
+ POWERMODE.colorful = !{colorful};
+ POWERMODE.shake = !{shake};
document.body.addEventListener('input', POWERMODE);
if theme.translate && theme.translate.enable
script(src=url_for(theme.CDN.translate))
- script.
- translateInitilization()
if is_home()
include index-js.pug
diff --git a/layout/includes/aside.pug b/layout/includes/aside.pug
deleted file mode 100644
index de74df3..0000000
--- a/layout/includes/aside.pug
+++ /dev/null
@@ -1,21 +0,0 @@
-if theme.aside.card_author
- include widget/card_author.pug
-
-if theme.aside.card_announcement
- include widget/card_announcement.pug
-
-if theme.aside.card_recent_post
- include widget/card_recent_post.pug
-
-if theme.aside.card_categories
- include widget/card_categories.pug
-
-if theme.aside.card_tags
- include widget/card_tags.pug
-
-if theme.aside.card_archives
- include widget/card_archives.pug
-
-if theme.aside.card_webinfo
- include widget/card_webinfo.pug
-
\ No newline at end of file
diff --git a/layout/includes/comments/gitalk.pug b/layout/includes/comments/gitalk.pug
index 1474168..c2f27a6 100644
--- a/layout/includes/comments/gitalk.pug
+++ b/layout/includes/comments/gitalk.pug
@@ -8,6 +8,13 @@ if theme.gitalk && theme.gitalk.enable
owner: '!{theme.gitalk.owner}',
admin: '!{theme.gitalk.admin}',
id: md5(decodeURI(location.pathname)),
- language: '!{theme.gitalk.language}'
+ language: '!{theme.gitalk.language}',
+ updateCountCallback: commentCount
})
- gitalk.render('gitalk-container')
\ No newline at end of file
+ gitalk.render('gitalk-container')
+
+ function commentCount(n){
+ document.getElementsByClassName('gitalk-comment-count')[0].innerHTML= n
+ }
+
+
diff --git a/layout/includes/config.pug b/layout/includes/config.pug
index e28d150..3bd7bb7 100644
--- a/layout/includes/config.pug
+++ b/layout/includes/config.pug
@@ -49,8 +49,6 @@
})
}
- var copy_copyright_js = theme.copy.enable && theme.copy.copyright;
-
var ClickShowText = 'undefined';
if (theme.ClickShowText && theme.ClickShowText.enable) {
ClickShowText = JSON.stringify({
@@ -78,15 +76,20 @@
})
}
+ var runtime = theme.runtimeshow.enable
+ var fancybox = theme.fancybox.enable
+ var medium_zoom = theme.medium_zoom.enable
+ var baiduPush = theme.baidu_push && theme.baidu_push.enable
+ var isHome = is_home() ? true : false
+ var isPost = is_post() ? true : false
+
+
script.
var GLOBAL_CONFIG = {
root: '!{config.root}',
algolia: !{algolia},
localSearch: !{localSearch},
translate: !{translate},
- highlight_copy: '!{theme.highlight_copy}',
- highlight_lang: '!{theme.highlight_lang}',
- highlight_shrink: '!{theme.highlight_shrink}',
copy: {
success: '!{_p("copy.success")}',
error: '!{_p("copy.error")}',
@@ -98,11 +101,15 @@ script.
message_next: '!{_p("Snackbar.bookmark.message_next")}'
},
runtime_unit: '!{_p("runtime_unit")}',
+ runtime: !{runtime},
copyright: !{copyright},
- copy_copyright_js: !{copy_copyright_js},
ClickShowText: !{ClickShowText},
- medium_zoom: '!{theme.medium_zoom.enable}',
- Snackbar: !{Snackbar}
+ medium_zoom: !{medium_zoom},
+ fancybox: !{fancybox},
+ Snackbar: !{Snackbar},
+ baiduPush: !{baiduPush},
+ isHome: !{isHome},
+ isPost: !{isPost}
}
diff --git a/layout/includes/head.pug b/layout/includes/head.pug
index 436835b..5cb6c38 100644
--- a/layout/includes/head.pug
+++ b/layout/includes/head.pug
@@ -13,71 +13,36 @@ else if !is_post()
- var without_index = url.replace('index.html', '')
- var without_html = without_index.replace('.html', '')
-- var photo_check = is_post() ? page.cover || theme.avatar : theme.avatar
-- var photo_link = url_check (photo_check) ? photo_check : config.url + photo_check
//- 預解析
-link(rel="preconnect" href="//cdn.jsdelivr.net")
+include ./head/dns_prefetch.pug
//- PWA
if (theme.pwa && theme.pwa.enable)
- link(rel="manifest" href=theme.pwa.manifest)
- if(theme.pwa.theme_color)
- meta(name="theme-color" content=theme.pwa.theme_color)
- if(theme.pwa.theme_color)
- meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
- if(theme.pwa.apple_touch_icon)
- link(rel="apple-touch-icon" sizes="180x180" href=theme.pwa.apple_touch_icon)
- if(theme.pwa.favicon_32_32)
- link(rel="icon" type="image/png" sizes="32x32" href=theme.pwa.favicon_32_32)
- if(theme.pwa.favicon_16_16)
- link(rel="icon" type="image/png" sizes="16x16" href=theme.pwa.favicon_16_16)
- if(theme.pwa.mask_icon)
- link(rel="mask-icon" href=theme.pwa.mask_icon color="#5bbad5")
+ include ./head/pwa.pug
//- 網站驗證
-if theme.google_site_verification
- meta(name="google-site-verification" content=theme.google_site_verification)
-
-if theme.bing_site_verification
- meta(name="msvalidate.01" content=theme.bing_site_verification)
-
-if theme.baidu_site_verification
- meta(name="baidu-site-verification" content=theme.baidu_site_verification)
-
-if 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)
+include ./head/site_verification.pug
//- Open_Graph
-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)
+include ./head/Open_Graph.pug
if theme.disable_baidu_transformation
meta(http-equiv="Cache-Control" content="no-transform")
meta(http-equiv="Cache-Control" content="no-siteapp")
+if page.hide == true
+ meta(name="robots" content="noindex")
+
script(src=url_for(theme.CDN.js_cookies))
if (theme.darkmode && theme.darkmode.enable) || theme.autoChangeMode !== false
- include ./darkmode
+ include ./head/darkmode.pug
each item in theme.CDN_USE.css
link(rel='stylesheet', href=url_for(item))
-if (theme.medium_zoom && !theme.medium_zoom.enable)
+if (theme.fancybox && theme.fancybox.enable)
link(rel='stylesheet', href=url_for(theme.CDN.fancybox_css))
if (theme.snackbar && theme.snackbar.enable)
@@ -98,30 +63,14 @@ if theme.algolia_search.enable
if (theme.gitalk && theme.gitalk.enable)
link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.gitalk_css))
- script(src=url_for(theme.CDN.gitalk))
- script(src=url_for(theme.CDN.blueimp_md5))
+ script(src=url_for(theme.CDN.gitalk) defer)
+ script(src=url_for(theme.CDN.blueimp_md5) defer)
-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);
- })();
+//- google_adsense
+include ./head/google_adsense.pug
-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');
+//- analytics
+include ./head/analytics.pug
if !is_post()
link(rel="preload" href=url_for(top_img) as="image" )
diff --git a/layout/includes/head/Open_Graph.pug b/layout/includes/head/Open_Graph.pug
new file mode 100644
index 0000000..54cecee
--- /dev/null
+++ b/layout/includes/head/Open_Graph.pug
@@ -0,0 +1,19 @@
+- 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 contentType = is_post() ? 'article' : 'website'
+
+//- twitter meta
+if theme.twitter_meta
+ meta(name="twitter:card" content="summary")
+ meta(name="twitter:title" content=pageTitle_no_include_blog_name)
+ meta(name="twitter:description" content=pageDescription)
+ meta(name="twitter:image" content=photo_link)
+
+//- Open_Graph
+if theme.Open_Graph_meta
+ 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)
diff --git a/layout/includes/head/analytics.pug b/layout/includes/head/analytics.pug
new file mode 100644
index 0000000..f3fe4d3
--- /dev/null
+++ b/layout/includes/head/analytics.pug
@@ -0,0 +1,22 @@
+if theme.baidu_analytics
+ 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
+ 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.tencent_analytics
+ script(src=`http://tajs.qq.com/stats?sId=` + theme.tencent_analytics charset="UTF-8")
diff --git a/layout/includes/darkmode.pug b/layout/includes/head/darkmode.pug
similarity index 100%
rename from layout/includes/darkmode.pug
rename to layout/includes/head/darkmode.pug
diff --git a/layout/includes/head/dns_prefetch.pug b/layout/includes/head/dns_prefetch.pug
new file mode 100644
index 0000000..1bfccf7
--- /dev/null
+++ b/layout/includes/head/dns_prefetch.pug
@@ -0,0 +1,16 @@
+link(rel="preconnect" href="//cdn.jsdelivr.net")
+
+if theme.google_analytics
+ link(rel="preconnect" href="https://www.google-analytics.com" crossorigin)
+
+if theme.baidu_analytics
+ link(rel="preconnect" href="https://hm.baidu.com")
+
+if theme.tencent_analytics
+ link(rel="preconnect" href="http://ta.qq.com")
+
+if theme.blog_title_font.font_link
+ link(rel="preconnect" href="https://fonts.googleapis.com" crossorigin)
+
+if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
+ link(rel="preconnect" href="//busuanzi.ibruce.info")
diff --git a/layout/includes/head/google_adsense.pug b/layout/includes/head/google_adsense.pug
new file mode 100644
index 0000000..b3210ef
--- /dev/null
+++ b/layout/includes/head/google_adsense.pug
@@ -0,0 +1,7 @@
+if (theme.google_adsense && theme.google_adsense.enable)
+ script(async src=theme.google_adsense.js)
+ script.
+ (adsbygoogle = window.adsbygoogle || []).push({
+ google_ad_client: '!{theme.google_adsense.client}',
+ enable_page_level_ads: '!{theme.google_adsense.enable_page_level_ads}'
+ });
\ No newline at end of file
diff --git a/layout/includes/head/pwa.pug b/layout/includes/head/pwa.pug
new file mode 100644
index 0000000..ca927dc
--- /dev/null
+++ b/layout/includes/head/pwa.pug
@@ -0,0 +1,13 @@
+link(rel="manifest" href=theme.pwa.manifest)
+if(theme.pwa.theme_color)
+ meta(name="theme-color" content=theme.pwa.theme_color)
+if(theme.pwa.theme_color)
+ meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
+if(theme.pwa.apple_touch_icon)
+ link(rel="apple-touch-icon" sizes="180x180" href=theme.pwa.apple_touch_icon)
+if(theme.pwa.favicon_32_32)
+ link(rel="icon" type="image/png" sizes="32x32" href=theme.pwa.favicon_32_32)
+if(theme.pwa.favicon_16_16)
+ link(rel="icon" type="image/png" sizes="16x16" href=theme.pwa.favicon_16_16)
+if(theme.pwa.mask_icon)
+ link(rel="mask-icon" href=theme.pwa.mask_icon color="#5bbad5")
diff --git a/layout/includes/head/site_verification.pug b/layout/includes/head/site_verification.pug
new file mode 100644
index 0000000..969883b
--- /dev/null
+++ b/layout/includes/head/site_verification.pug
@@ -0,0 +1,11 @@
+if theme.google_site_verification
+ meta(name="google-site-verification" content=theme.google_site_verification)
+
+if theme.bing_site_verification
+ meta(name="msvalidate.01" content=theme.bing_site_verification)
+
+if theme.baidu_site_verification
+ meta(name="baidu-site-verification" content=theme.baidu_site_verification)
+
+if theme.qihu_site_verification
+ meta(name="360-site-verification" content=theme.qihu_site_verification)
diff --git a/layout/includes/header.pug b/layout/includes/header.pug
index 42d540f..28458d4 100644
--- a/layout/includes/header.pug
+++ b/layout/includes/header.pug
@@ -1,13 +1,16 @@
-#header
+header
#page-header
span#blog_name.pull_left
a#site-name.blog_title(href=url_for('/')) #[=config.title]
- i.fa.fa-bars.fa-fw.toggle-menu.pull_right.close(aria-hidden="true")
+ span.toggle-menu.pull_right.close
+ a.site-page
+ i.fa.fa-bars.fa-fw(aria-hidden="true")
span.pull_right.menus
.menus_items
include menu_item.pug
- span#search_button.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')
+
+ if (theme.algolia_search.enable || theme.local_search && theme.local_search.enable)
+ span#search_button.pull_right
+ a.site-page.social-icon.search
+ i.fa.fa-search.fa-fw
+ span=' '+_p('search')
diff --git a/layout/includes/index-js.pug b/layout/includes/index-js.pug
index b3aec2f..9c75317 100644
--- a/layout/includes/index-js.pug
+++ b/layout/includes/index-js.pug
@@ -1,9 +1,3 @@
-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
@@ -67,7 +61,7 @@ if theme.subtitle.enable
backSpeed: 50
});
else if source == '4'
- script(type="text/javascript" src="https://sdk.jinrishici.com/v2/browser/jinrishici.js")
+ script(type="text/javascript" src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8")
script.
jinrishici.load(function(result) {
var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(",");
@@ -92,22 +86,5 @@ if theme.subtitle.enable
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()
- })
-
diff --git a/layout/includes/layout.pug b/layout/includes/layout.pug
index b9f7e98..5c8cb3f 100644
--- a/layout/includes/layout.pug
+++ b/layout/includes/layout.pug
@@ -18,7 +18,7 @@
- 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 = 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(',')
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
@@ -29,10 +29,11 @@ html(lang=config.language data-theme=theme.display_mode)
head
meta(charset='UTF-8')
meta(http-equiv="X-UA-Compatible" content="IE=edge")
- meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1")
+ meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5")
title= pageTitle
meta(name="description" content=pageDescription)
- meta(name="keywords" content=pageKeywords)
+ if pageKeywords
+ meta(name="keywords" content=pageKeywords)
meta(name="author" content=pageAuthor)
meta(name="copyright" content=pageCopyright)
meta(name ="format-detection" content="telephone=no")
@@ -42,6 +43,7 @@ html(lang=config.language data-theme=theme.display_mode)
body
if theme.fireworks && theme.fireworks.enable
canvas.fireworks
+ //- !=partial('includes/header.pug', {}, {cache: true})
include ./header.pug
include ./mobile-sidebar.pug
#body-wrap
@@ -54,7 +56,7 @@ html(lang=config.language data-theme=theme.display_mode)
include ./sidebar.pug
if (!is_post())
include ./nav.pug
- #content-outer
+ main#content-outer
block top_img
if (!is_post())
#content-inner.layout_page
diff --git a/layout/includes/math/index.pug b/layout/includes/math/index.pug
new file mode 100644
index 0000000..68b3416
--- /dev/null
+++ b/layout/includes/math/index.pug
@@ -0,0 +1,15 @@
+if theme.mathjax && theme.mathjax.enable
+ if theme.mathjax.per_page
+ if(!is_tag() && !is_category() && !is_archive() && !is_home())
+ include ./mathjax.pug
+ else
+ if page.mathjax
+ include ./mathjax.pug
+
+if theme.katex && theme.katex.enable
+ if theme.katex.per_page
+ if(!is_tag() && !is_category() && !is_archive() && !is_home())
+ include ./katex.pug
+ else
+ if page.katex
+ include ./katex.pug
diff --git a/layout/includes/third-party/katex.pug b/layout/includes/math/katex.pug
similarity index 100%
rename from layout/includes/third-party/katex.pug
rename to layout/includes/math/katex.pug
diff --git a/layout/includes/third-party/mathjax.pug b/layout/includes/math/mathjax.pug
similarity index 100%
rename from layout/includes/third-party/mathjax.pug
rename to layout/includes/math/mathjax.pug
diff --git a/layout/includes/menu_item.pug b/layout/includes/menu_item.pug
index 8da44f7..cb7c719 100644
--- a/layout/includes/menu_item.pug
+++ b/layout/includes/menu_item.pug
@@ -1,7 +1,7 @@
each value, label in theme.menu
if !Array.isArray(value)
.menus_item
- a.site-page(href=trim(value.split('||')[0]))
+ a.site-page(href=url_for(trim(value.split('||')[0])))
i.fa-fw(class=trim(value.split('||')[1]))
span=' '+label
else
@@ -13,6 +13,6 @@ each value, label in theme.menu
ul.menus_item_child
each i in value
li
- a.site-page(href=trim(i.split('||')[1]))
+ a.site-page(href=url_for(trim(i.split('||')[1])))
i.fa-fw(class=trim(i.split('||')[2]))
span=' '+trim(i.split('||')[0])
\ No newline at end of file
diff --git a/layout/includes/mixins/UI.pug b/layout/includes/mixins/UI.pug
index af3e700..9b71751 100644
--- a/layout/includes/mixins/UI.pug
+++ b/layout/includes/mixins/UI.pug
@@ -3,7 +3,7 @@ mixin UI_NEW(posts)
.recent-post-item.article-container
- var link = article.link || article.path
if index%2 == 0
- .post_cover.pull_left.left_radius
+ .post_cover.left_radius
a(href=url_for(link) title=article.title || _p('no_title'))
- var post_cover = article.cover
if theme.lazyload.enable
@@ -11,7 +11,7 @@ mixin UI_NEW(posts)
else
img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
else
- .post_cover.pull_right.right_radius
+ .post_cover.right_radius
a(href=url_for(link) title=article.title || _p('no_title'))
- var post_cover = article.cover
if theme.lazyload.enable
diff --git a/layout/includes/mixins/article-sort.pug b/layout/includes/mixins/article-sort.pug
index 02f88ca..9b534b3 100644
--- a/layout/includes/mixins/article-sort.pug
+++ b/layout/includes/mixins/article-sort.pug
@@ -9,7 +9,7 @@ mixin articleSort(posts)
.article-sort-item
.article-sort-img
a.article-sort-item__img(href=url_for(article.path))
- img(src=article.cover)
+ img(src=article.cover alt=article.title || 'No Title')
.article-sort-post
a.article-sort-item__post(href=url_for(article.path))
i.fa.fa-clock-o(aria-hidden="true")
diff --git a/layout/includes/mobile-sidebar.pug b/layout/includes/mobile-sidebar.pug
index 8fa2316..5900134 100644
--- a/layout/includes/mobile-sidebar.pug
+++ b/layout/includes/mobile-sidebar.pug
@@ -2,24 +2,24 @@
#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}'`)
+ img.avatar-img(src=url_for(theme.avatar) onerror=`onerror=null;src='${theme.lodding_bg.flink}'` alt="avatar")
.mobile_post_data
if site.posts.length
- .mobile_data_item.is_center
+ .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_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_item.is-center
.mobile_data_link
a(href=url_for(config.category_dir) + '/')
.headline= _p('aside.categories')
@@ -41,6 +41,6 @@
#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})
+ .sidebar-toc__content.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})
+ .sidebar-toc__content!=toc(page.content,{"class":"toc_mobile_items",list_number:tocNumber})
diff --git a/layout/includes/nav.pug b/layout/includes/nav.pug
index 5814edc..c720584 100644
--- a/layout/includes/nav.pug
+++ b/layout/includes/nav.pug
@@ -3,8 +3,7 @@
if is_home()
- nav#nav.full_page
- .nav_bg(style=bg_img)
+ nav#nav.full_page(style=bg_img)
#site-info
#site-title
span.blogtitle= page.title || page.tag || page.category || config.title
@@ -15,14 +14,13 @@ if is_home()
#site-social-icons
each url, icon in theme.social
a.social-icon(href=url target="_blank")
- i(class=icon)
+ i(class=icon aria-hidden="true")
.scroll-down
i.fa.fa-angle-down.scroll-down-effects
else
- nav#nav.not_index_bg
- .nav_bg(style=bg_img)
+ nav#nav.not_index_bg(style=bg_img)
#page_site-info
#site-title
if (is_archive())
diff --git a/layout/includes/pagination.pug b/layout/includes/pagination.pug
index 17d64a8..faaf001 100644
--- a/layout/includes/pagination.pug
+++ b/layout/includes/pagination.pug
@@ -1,7 +1,7 @@
-
var options = {
- prev_text: ' ',
- next_text: ' ',
+ prev_text: ' ',
+ next_text: ' ',
mid_size: 1,
escape: false
}
diff --git a/layout/includes/recent-posts.pug b/layout/includes/recent-posts.pug
index f0d8b10..a5534a3 100644
--- a/layout/includes/recent-posts.pug
+++ b/layout/includes/recent-posts.pug
@@ -1,24 +1,25 @@
each article , index in page.posts.data
.recent-post-item.article-container
- var link = article.link || article.path
+ - var title = article.title || _p('no_title')
if index%2 == 0
- .post_cover.pull_left.left_radius
- a(href=url_for(link) title=article.title || _p('no_title'))
+ .post_cover.left_radius
+ a(href=url_for(link) title=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}'`)
+ img.post_bg.lazyload(data-src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` alt=title)
else
- img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
+ img.post_bg(src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` alt=title)
else
- .post_cover.pull_right.right_radius
- a(href=url_for(link) title=article.title || _p('no_title'))
+ .post_cover.right_radius
+ a(href=url_for(link) title=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}'`)
+ img.post_bg.lazyload(data-src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` alt=title)
else
- img.post_bg(src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
+ img.post_bg(src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` alt=title)
.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=title)= title
if (article.top)
span.article-meta
i.fa.fa-thumb-tack.article-meta__icon.sticky
diff --git a/layout/includes/reward.pug b/layout/includes/reward.pug
index 225f4f3..8aefea4 100644
--- a/layout/includes/reward.pug
+++ b/layout/includes/reward.pug
@@ -1,11 +1,11 @@
.post-reward
- a.reward-button
+ a.reward-button.button--primary.button--animated
i.fa.fa-qrcode
= ' ' + _p('donate')
.reward-main
ul.reward-all
each item in theme.reward.QR_code
li.reward-item
- img.lazyload.post-qr-code__img(src=(item.itemlist||item).img)
+ img.lazyload.post-qr-code__img(src=url_for((item.itemlist||item).img) alt=(item.itemlist||item).text)
.post-qr-code__desc=(item.itemlist||item).text
diff --git a/layout/includes/rightside.pug b/layout/includes/rightside.pug
index c4eba2e..d7d5fa5 100644
--- a/layout/includes/rightside.pug
+++ b/layout/includes/rightside.pug
@@ -2,8 +2,9 @@ section#rightside.rightside
#rightside-config-hide
if theme.readmode.enable && is_post()
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
- i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
- i#font_minus.fa.fa-minus(title=_p('rightside.font_minus_title'))
+ if is_post()
+ i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
+ i#font_minus.fa.fa-minus(title=_p('rightside.font_minus_title'))
if theme.translate && theme.translate.enable
a#translateLink.translate_chn_to_cht(href="javascript:translatePage();" title=_p('rightside.translate_title') target="_self")= theme.translate.default
if theme.darkmode && theme.darkmode.enable
diff --git a/layout/includes/widget/card_announcement.pug b/layout/includes/widget/card_announcement.pug
index a276b0e..edcecd5 100644
--- a/layout/includes/widget/card_announcement.pug
+++ b/layout/includes/widget/card_announcement.pug
@@ -1,6 +1,6 @@
-.card_widget.card-announcement
+.card-widget.card-announcement
.card-content
- .item_headline
+ .item-headline
i.fa.fa-bullhorn.card-announcement-animation(aria-hidden="true")
span= _p('aside.card_announcement')
.announcement_content= theme.announcement.content
\ No newline at end of file
diff --git a/layout/includes/widget/card_archives.pug b/layout/includes/widget/card_archives.pug
index 563a807..20f79d6 100644
--- a/layout/includes/widget/card_archives.pug
+++ b/layout/includes/widget/card_archives.pug
@@ -1,6 +1,6 @@
-.card_widget.card-archives
+.card-widget.card-archives
.card-content
- .item_headline
+ .item-headline
i.fa.fa-archive(aria-hidden="true")
span= _p('aside.card_archives')
- div.archives_item!= list_archives({type:'monthly',format: 'YYYY年MM月'})
+ != list_archives({type:'monthly',format: 'YYYY年MM月'})
diff --git a/layout/includes/widget/card_author.pug b/layout/includes/widget/card_author.pug
index 0d07ab6..f009bc8 100644
--- a/layout/includes/widget/card_author.pug
+++ b/layout/includes/widget/card_author.pug
@@ -1,43 +1,36 @@
-.card_widget.card-author
+.card-widget.card-info
.card-content
- .post_data
- .data-item.is_center
- img.lazyload.avatar_img(src=url_for(theme.avatar) onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
- p.author-info__name.is_center= config.author
- p.author-info__description.is_center= config.description
+ .card-info-avatar.is-center
+ img.avatar-img(src=url_for(theme.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.lodding_bg.flink) + `'` alt="avatar")
+ .author-info__name= config.author
+ .author-info__description= config.description
- .post_data.data_config
+ .card-info-data
if site.posts.length
- .data-item.is_center
- .data_link
- a(href=url_for(config.archive_dir) + '/')
- p.headline= _p('aside.articles')
- p.length_num= site.posts.length
+ .card-info-data-item.is-center
+ a(href=url_for(config.archive_dir) + '/')
+ .headline= _p('aside.articles')
+ .length_num= site.posts.length
if site.tags.length
- .data-item.is_center
- .data_link
- a(href=url_for(config.tag_dir) + '/' )
- p.headline= _p('aside.tags')
- p.length_num= site.tags.length
+ .card-info-data-item.is-center
+ a(href=url_for(config.tag_dir) + '/' )
+ .headline= _p('aside.tags')
+ .length_num= site.tags.length
if site.categories.length
- .data-item.is_center
- .data_link
- a(href=url_for(config.category_dir) + '/')
- p.headline= _p('aside.categories')
- p.length_num= site.categories.length
+ .card-info-data-item.is-center
+ a(href=url_for(config.category_dir) + '/')
+ .headline= _p('aside.categories')
+ .length_num= site.categories.length
- .post_data.is_center
- a#bookmark-it.data-item.bookmark.bookmarke--primary.bookmark--animated(href="javascript:;" title= _p('aside.card_bookmark') target="_self")
+ .card-info-bookmark.is-center
+ a#bookmark-it.bookmark.button--primary.button--animated(href="javascript:;" title= _p('aside.card_bookmark') target="_self")
i.fa.fa-bookmark(aria-hidden="true")
span= _p('aside.card_bookmark') || 'Follow Me'
-
-
if(theme.social)
- .post_data.data_config
- #aside-social-icons
+ .card-info-social-icons.is-center
each url, icon in theme.social
- a.social-icon.data-item(href=url target="_blank")
- i(class=icon)
+ a.social-icon(href=url target="_blank")
+ i(class=icon aria-hidden="true")
diff --git a/layout/includes/widget/card_categories.pug b/layout/includes/widget/card_categories.pug
index 2bfffbb..9470821 100644
--- a/layout/includes/widget/card_categories.pug
+++ b/layout/includes/widget/card_categories.pug
@@ -1,20 +1,20 @@
if site.categories.length
- .card_widget.card-categories
+ .card-widget.card-categories
.card-content
- .item_headline
+ .item-headline
i.fa.fa-folder-open(aria-hidden="true")
span= _p('aside.card_categories')
- ul.aside_category_item
+ ul.aside-category-item
mixin displayCategories(parent = undefined)
- site.categories.find({ parent }).sort("name").each(function(category) {
- var childCount = site.categories.find({ parent: category._id }).count();
- li.aside_category_list
- a.aside_category_list_link(href=url_for(category.path))
- span.aside_category_list_name= category.name
- span.aside_category_list_length= category.length
+ li.aside-category-list
+ a.aside-category-list_link(href=url_for(category.path))
+ span.aside-category-list_name= category.name
+ span.aside-category-list_length= category.length
if childCount > 0
- ul.aside_category_item.child
+ ul.aside-category-item.child
+displayCategories(category._id)
- })
diff --git a/layout/includes/widget/card_recent_post.pug b/layout/includes/widget/card_recent_post.pug
index e954153..036837b 100644
--- a/layout/includes/widget/card_recent_post.pug
+++ b/layout/includes/widget/card_recent_post.pug
@@ -1,23 +1,24 @@
-.card_widget.card-recent-post
+.card-widget.card-recent-post
.card-content
- .item_headline
+ .item-headline
i.fa.fa-history(aria-hidden="true")
span= _p('aside.card_recent_post')
- .aside_recent_item
+ .aside-recent-item
- site.posts.sort('date', -1).limit(5).each(function(article){
- .aside_recent_post
+ .aside-recent-post
- var link = article.link || article.path
+ - var title = article.title || _p('no_title')
a(href=url_for(link))
- var post_cover = article.cover
- .aside_post_cover
+ .aside-post-cover
if theme.lazyload.enable
- img.aside_post_bg.lazyload(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=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` title=title alt=title)
else
- 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
- .aside_post_title(href=url_for(link) title=article.title || _p('no_title'))= article.title || _p('no_title')
+ img.aside-post-bg(src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` title=title alt=title)
+ .aside-post-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)
- var date_type = theme.post_meta.date_type == 'updated' ? 'updated' : 'date'
- time.aside_post_meta.post-meta__date #[=date(article[date_type], config.date_format)]
+ time.aside-post_meta.post-meta__date #[=date(article[date_type], config.date_format)]
- })
diff --git a/layout/includes/widget/card_tags.pug b/layout/includes/widget/card_tags.pug
index ba09088..cd4806a 100644
--- a/layout/includes/widget/card_tags.pug
+++ b/layout/includes/widget/card_tags.pug
@@ -1,7 +1,7 @@
if site.tags.length
- .card_widget.card-tags
+ .card-widget.card-tags
.card-content
- .item_headline
+ .item-headline
i.fa.fa-tags(aria-hidden="true")
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'})
+ .card-tag-cloud!= tagcloud({min_font: 16, max_font: 24, amount: 200, color: true, start_color: '#999', end_color: '#99a9bf'})
diff --git a/layout/includes/widget/card_webinfo.pug b/layout/includes/widget/card_webinfo.pug
index b06c8ce..a72f5da 100644
--- a/layout/includes/widget/card_webinfo.pug
+++ b/layout/includes/widget/card_webinfo.pug
@@ -1,24 +1,22 @@
-.card_widget.card-webinfo
+.card-widget.card-webinfo
.card-content
- .item_headline
+ .item-headline
i.fa.fa-line-chart(aria-hidden="true")
span= _p('aside.card_webinfo.headline')
.webinfo
- .webinfo_item
- .webinfo_article_name= _p('aside.card_webinfo.article_name') + " :"
- .webinfo_article_count= site.posts.length
+ .webinfo-item
+ .webinfo-article-name= _p('aside.card_webinfo.article_name') + " :"
+ .webinfo-article-count= site.posts.length
if theme.runtimeshow.enable
- .webinfo_item
- .webinfo_runtime_name= _p('aside.card_webinfo.runtime_name') + " :"
- #webinfo_runtime_count.webinfo_runtime_count
- script#runtionshow(src=url_for(theme.CDN.runtimeshow) start_date=theme.runtimeshow.start_date)
-
+ .webinfo-item
+ .webinfo-runtime-name= _p('aside.card_webinfo.runtime_name') + " :"
+ #webinfo-runtime-count.webinfo-runtime-count(start_date=theme.runtimeshow.start_date)
if theme.busuanzi.site_uv
- .webinfo_item
- .webinfo_site_uv_name= _p('aside.card_webinfo.site_uv_name') + " :"
- .webinfo_site_uv_count#busuanzi_value_site_uv
+ .webinfo-item
+ .webinfo-site-uv-name= _p('aside.card_webinfo.site_uv_name') + " :"
+ .webinfo-site-uv-count#busuanzi_value_site_uv
if theme.busuanzi.site_pv
- .webinfo_item
- .webinfo_site_name= _p('aside.card_webinfo.site_pv_name') + " :"
- .webinfo_site_pv_count#busuanzi_value_site_pv
+ .webinfo-item
+ .webinfo-site-name= _p('aside.card_webinfo.site_pv_name') + " :"
+ .webinfo-site-pv-count#busuanzi_value_site_pv
diff --git a/layout/includes/widget/index.pug b/layout/includes/widget/index.pug
new file mode 100644
index 0000000..ecceb98
--- /dev/null
+++ b/layout/includes/widget/index.pug
@@ -0,0 +1,21 @@
+if theme.aside.card_author
+ include ./card_author.pug
+
+if theme.aside.card_announcement
+ include ./card_announcement.pug
+
+if theme.aside.card_recent_post
+ include ./card_recent_post.pug
+
+if theme.aside.card_categories
+ include ./card_categories.pug
+
+if theme.aside.card_tags
+ include ./card_tags.pug
+
+if theme.aside.card_archives
+ include ./card_archives.pug
+
+if theme.aside.card_webinfo
+ include ./card_webinfo.pug
+
\ No newline at end of file
diff --git a/layout/index.pug b/layout/index.pug
index b24f234..094c7d4 100644
--- a/layout/index.pug
+++ b/layout/index.pug
@@ -5,4 +5,4 @@ block content
include includes/recent-posts.pug
include includes/pagination.pug
#aside_content.aside_content
- include includes/aside.pug
\ No newline at end of file
+ include includes/widget/index.pug
\ No newline at end of file
diff --git a/layout/page.pug b/layout/page.pug
index 210144b..a59ecf1 100644
--- a/layout/page.pug
+++ b/layout/page.pug
@@ -11,14 +11,14 @@ block content
if page.comments !== false
include includes/comments/index.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
else if page.type === 'link'
include flink.pug
if page.comments !== false
include includes/comments/index.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
else if page.type === 'categories'
#post-content.category-content
.category-lists
@@ -29,7 +29,7 @@ block content
if page.comments !== false
include includes/comments/index.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
else
article#page
h1= page.title
@@ -38,4 +38,4 @@ block content
if page.comments !== false
include includes/comments/index.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
diff --git a/layout/post.pug b/layout/post.pug
index bc94478..d82aa36 100644
--- a/layout/post.pug
+++ b/layout/post.pug
@@ -11,38 +11,61 @@ block top_img
if (theme.post_meta.date_type)
if (theme.post_meta.date_type === 'both')
time.post-meta__date
- i.fa.fa-calendar(aria-hidden="true")
+ i.fa.fa-calendar.fa-fw(aria-hidden="true")
=' '+_p('post.created')+' '+date(page.date, config.date_format)
span.post-meta__separator |
- i.fa.fa-history(aria-hidden="true")
+ i.fa.fa-history.fa-fw(aria-hidden="true")
=' '+_p('post.updated')+' '+date(page.updated, config.date_format)
else
- var date_type = theme.post_meta.date_type === 'updated' ? 'updated' : 'date'
- time.post-meta__date #[i.fa.fa-calendar(aria-hidden="true")] #[=date(page[date_type], config.date_format)]
+ time.post-meta__date #[i.fa.fa-calendar.fa-fw(aria-hidden="true")] #[=date(page[date_type], config.date_format)]
if (theme.post_meta.categories && page.categories.data.length > 0)
if (theme.post_meta.date_type)
- span.post-meta__separator.mobile_hidden |
- span.mobile_hidden
+ span.post-meta__separator |
+ span
each item, index in page.categories.data
- i.fa.fa-inbox.post-meta__icon(aria-hidden="true")
+ i.fa.fa-inbox.post-meta__icon.fa-fw(aria-hidden="true")
a(href=url_for(item.path)).post-meta__categories #[=item.name]
if (index < page.categories.data.length - 1)
- i.fa.fa-angle-right(aria-hidden="true")
+ i.fa.fa-angle-right.fa-fw(aria-hidden="true")
.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') + ': '
+ i.fa.fa-file-word-o.post-meta__icon.fa-fw(aria-hidden="true")
+ span= _p('post.wordcount') + ':'
span.word-count= wordcount(page.content)
span.post-meta__separator |
- i.fa.fa-clock-o.post-meta__icon(aria-hidden="true")
+ i.fa.fa-clock-o.post-meta__icon.fa-fw(aria-hidden="true")
span= _p('post.min2read', min2read(page.content, {cn: 350, en: 160}))
- if (theme.wordcount && theme.wordcount.enable && theme.busuanzi.page_pv)
- span.post-meta__separator |
- if theme.busuanzi.page_pv
- i.fa.fa-eye.post-meta__icon(aria-hidden="true")
- span= _p('post.page_pv') + ': '
- span#busuanzi_value_page_pv
+ .post-meta-pv-cv
+ if (theme.wordcount && theme.wordcount.enable && theme.busuanzi.page_pv)
+ span.post-meta__separator |
+ if theme.busuanzi.page_pv
+ span
+ i.fa.fa-eye.post-meta__icon.fa-fw(aria-hidden="true")
+ =_p('post.page_pv') + ':'
+ span#busuanzi_value_page_pv
+ if (theme.disqus && theme.disqus.enable && theme.disqus.count && page.comments !== false)
+ if (theme.busuanzi && theme.busuanzi.page_pv)
+ span.post-meta__separator |
+ i.fa.fa-comment-o.post-meta__icon.fa-fw(aria-hidden="true")
+ span= _p('post.comments') + ':'
+ a(href=url_for(page.path) + '#post-comment')
+ span.disqus-comment-count(data-disqus-url=page.permalink)
+ if (theme.valine && theme.valine.enable && theme.valine.count && page.comments !== false)
+ if (theme.busuanzi && theme.busuanzi.page_pv)
+ span.post-meta__separator |
+ i.fa.fa-comments-o.post-meta__icon.fa-fw(aria-hidden="true")
+ span= _p('post.comments') + ':'
+ a(href=url_for(page.path) + '#post-comment' itemprop="discussionUrl")
+ span.valine-comment-count.comment-count(data-xid=url_for(page.path) itemprop="commentCount")
+ if (theme.gitalk && theme.gitalk.enable && theme.gitalk.count && page.comments !== false)
+ if (theme.busuanzi && theme.busuanzi.page_pv)
+ span.post-meta__separator |
+ i.fa.fa-comments-o.post-meta__icon.fa-fw(aria-hidden="true")
+ span= _p('post.comments') + ':'
+ a(href=url_for(page.path) + '#post-comment')
+ span.gitalk-comment-count.comment-count
block content
diff --git a/layout/tag.pug b/layout/tag.pug
index 0acedd7..b90868f 100644
--- a/layout/tag.pug
+++ b/layout/tag.pug
@@ -7,7 +7,7 @@ block content
+UI_NEW(page.posts)
include includes/pagination.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
else
include ./includes/mixins/article-sort.pug
#tag
@@ -15,4 +15,4 @@ block content
+articleSort(page.posts)
include includes/pagination.pug
#aside_content.aside_content
- include includes/aside.pug
+ include includes/widget/index.pug
diff --git a/package.json b/package.json
index 7bb1914..c0dd41d 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "hexo-theme-melody",
- "version": "2.0.0",
+ "name": "hexo-theme-butterfly",
+ "version": "2.1.0",
"description": "A Hexo Theme: Butterfly"
}
\ No newline at end of file
diff --git a/scripts/hide_post.js b/scripts/hide_post.js
new file mode 100644
index 0000000..7ce8f84
--- /dev/null
+++ b/scripts/hide_post.js
@@ -0,0 +1,63 @@
+/**
+ * global hexo
+ * from printempw/hexo-hide-posts
+ * modify by Jerry
+ */
+
+'use strict';
+
+var public_generators = [];
+
+hexo.extend.filter.register('before_generate', function () {
+ this._bindLocals();
+
+ const all_posts = this.locals.get('posts');
+ const hidden_posts = all_posts.find({
+ 'hide': true
+ });
+ const normal_posts = all_posts.filter(post => !post['hide']);
+
+ this.locals.set('all_posts', all_posts);
+ this.locals.set('hidden_posts', hidden_posts);
+ this.locals.set('posts', normal_posts);
+});
+
+hexo.extend.filter.register('after_init', function () {
+
+ const original = {};
+ for (const name in hexo.extend.generator.list()) {
+ original[name] = hexo.extend.generator.get(name);
+ }
+
+ hexo.extend.generator.register('post', async function (locals) {
+ const fg = original.post.bind(this);
+
+ const generated_public = await fg(locals);
+ const generated_hidden = await fg(Object.assign({}, locals, {
+ posts: locals.hidden_posts
+ }));
+
+ // Remove post.prev and post.next for hidden posts
+ generated_hidden.forEach(ele => {
+ ele.data.prev = ele.data.next = null;
+ });
+
+ return generated_public.concat(generated_hidden);
+ });
+
+ // Then we hack into other generators if necessary
+ public_generators.filter(
+ name => Object.keys(original).includes(name)
+ ).forEach(name => {
+ // Overwrite original generator
+ hexo.extend.generator.register(name, function (locals) {
+ const fg = original[name].bind(this);
+
+ return fg(Object.assign({}, locals, {
+ posts: new locals.posts.constructor(
+ locals.posts.data.concat(locals.hidden_posts.data)
+ )
+ }));
+ });
+ });
+});
\ No newline at end of file
diff --git a/scripts/highlight.js b/scripts/highlight.js
new file mode 100644
index 0000000..c185bfb
--- /dev/null
+++ b/scripts/highlight.js
@@ -0,0 +1,57 @@
+'use strict';
+hexo.extend.filter.register('after_post_render', data => {
+
+ const cheerio = require('cheerio');
+
+ const $ = cheerio.load(data.content, {
+ decodeEntities: false
+ });
+ var theme = hexo.theme.config;
+
+ if (theme.highlight_shrink === 'none' && !theme.highlight_lang && !theme.highlight_copy) {
+ return;
+ }
+
+ $('figure.highlight').wrap('
')
+ var $highlight_layout = $('
')
+
+ $('figure').before($highlight_layout)
+
+ if (theme.highlight_shrink == true) {
+ var $code_expand = $(' ')
+ $('.highlight-tools').append($code_expand)
+ } else if (theme.highlight_shrink === false) {
+ var $code_expand = $(' ')
+ $('.highlight-tools').append($code_expand)
+ }
+
+ if (theme.highlight_lang) {
+ var $highlight_lang = $('
')
+ $('.highlight-tools').append($highlight_lang)
+ var lang_name_index;
+ var lang_name;
+ $('figure').each(function () {
+ lang_name_index = lang_name = $(this).attr('class').split(' ')[1];
+ if (lang_name_index == 'js')
+ lang_name = 'Javascript'
+ if (lang_name_index == 'md')
+ lang_name = 'Markdown'
+ if (lang_name_index == 'plain')
+ lang_name = 'Code'
+ if (lang_name_index == 'py')
+ lang_name = 'Python'
+
+ $(this).prev().find(".code_lang").text(lang_name)
+
+ })
+ }
+
+ if (theme.highlight_copy) {
+ var $copyIcon = $(' ')
+ var $notice = $('
')
+ $('.highlight-tools').append($notice)
+ $('.highlight-tools').append($copyIcon)
+ }
+
+ data.content = $.html();
+}, 100);
\ No newline at end of file
diff --git a/scripts/list_archives.js b/scripts/list_archives.js
index f54be8d..10738bc 100644
--- a/scripts/list_archives.js
+++ b/scripts/list_archives.js
@@ -1,43 +1,34 @@
-'use strict';
+"use strict";
-hexo.extend.helper.register('list_archives', function (options = {}) {
-
- const {
- config
- } = this;
+hexo.extend.helper.register("list_archives", function(options = {}) {
+ const { config } = this;
const archiveDir = config.archive_dir;
- const {
- timezone
- } = config;
+ 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';
+ 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 order = options.order || -1;
const limit = 8;
- let result = '';
+ let result = "";
- var more_button
- if (lang === 'zh-CN') {
- more_button = '查看更多';
- } else if (lang === 'zh-TW') {
- more_button = '查看更多';
+ var more_button;
+ if (lang === "zh-CN") {
+ more_button = "查看更多";
+ } else if (lang === "zh-TW") {
+ more_button = "查看更多";
} else {
- more_button = 'More';
+ more_button = "More";
}
-
if (!format) {
- format = type === 'monthly' ? 'MMMM YYYY' : 'YYYY';
+ format = type === "monthly" ? "MMMM YYYY" : "YYYY";
}
- const posts = this.site.posts.sort('date', order);
+ const posts = this.site.posts.sort("date", order);
if (!posts.length) return result;
const data = [];
@@ -70,64 +61,43 @@ hexo.extend.helper.register('list_archives', function (options = {}) {
const link = item => {
let url = `${archiveDir}/${item.year}/`;
- if (type === 'monthly') {
- if (item.month < 10) url += '0';
+ if (type === "monthly") {
+ if (item.month < 10) url += "0";
url += `${item.month}/`;
}
return this.url_for(url);
};
- if (style === 'list') {
- result += `";
return result;
-})
\ No newline at end of file
+});
diff --git a/scripts/photo.js b/scripts/photo.js
new file mode 100644
index 0000000..55bee14
--- /dev/null
+++ b/scripts/photo.js
@@ -0,0 +1,53 @@
+'use strict'
+hexo.extend.filter.register('after_post_render', data => {
+ const theme = hexo.theme.config;
+
+ const cheerio = require('cheerio');
+
+ const $ = cheerio.load(data.content, { decodeEntities: false });
+
+ const images = $('img').not($('a>img'));
+
+ if (theme.fancybox.enable) {
+ images.each((i, o) => {
+ var lazyload_src = $(o).attr('src') ? $(o).attr('src') : $(o).attr("data-src")
+ var alt = $(o).attr('alt')
+ if (alt !== undefined) {
+ $(o).attr('title', alt)
+ }
+ var $a = $(
+ ' '
+ )
+ $(o).wrap($a)
+ });
+
+ }
+ if (theme.medium_zoom.enable) {
+ images.each((i, o) => {
+ $(o).addClass('mediumZoom')
+ })
+
+ var imgList = $(".justified-gallery img")
+ if (imgList.length) {
+ imgList.each((i, o) => {
+ var $a = $('
')
+ $(o).wrap($a)
+ })
+ }
+ }
+
+ if (!theme.medium_zoom.enable && !theme.fancybox.enable) {
+ var imgList = $(".justified-gallery > p >img")
+ if (imgList.length) {
+ imgList.each((i, o) => {
+ $(o).wrap('
')
+ })
+ }
+ }
+
+ data.content = $.html();
+}, 100);
\ No newline at end of file
diff --git a/scripts/post-lazyload.js b/scripts/post-lazyload.js
index 30b638b..3ea43fc 100644
--- a/scripts/post-lazyload.js
+++ b/scripts/post-lazyload.js
@@ -1,17 +1,23 @@
'use strict';
+const url_for = require('hexo-util').url_for.bind(hexo);
+
hexo.extend.filter.register('after_post_render', data => {
var theme = hexo.theme.config;
+ var bg = theme.lodding_bg.post;
if (!theme.lazyload.enable) return;
const cheerio = require('cheerio');
const $ = cheerio.load(data.content, {decodeEntities: false});
- const images = $('img');
+ const images = $('img').not($('.justified-gallery img'));
if (!images.length) return;
images.each((i, o) => {
let src = $(o).attr('src');
$(o).attr('data-src', src).removeAttr('src');
+ if (bg){
+ $(o).attr('src',url_for(bg))
+ }
$(o).addClass('lazyload');
});
diff --git a/scripts/related_post.js b/scripts/related_post.js
index 9f9615a..ed4f04d 100644
--- a/scripts/related_post.js
+++ b/scripts/related_post.js
@@ -1,3 +1,10 @@
+const moment = require('moment-timezone');
+const {
+ isMoment
+} = moment;
+
+
+
hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
var relatedPosts = [];
currentPost.tags.forEach(function (tag) {
@@ -7,7 +14,9 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
title: post.title,
path: post.path,
cover: post.cover,
- weight: 1
+ weight: 1,
+ updated: post.updated,
+ created: post.created
};
var index = findItem(relatedPosts, 'path', post.path);
if (index != -1) {
@@ -20,67 +29,93 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
};
});
});
- if (relatedPosts.length == 0) { return '' };
+ if (relatedPosts.length == 0) {
+ return ''
+ };
var result = "";
- var limit_num = hexo.theme.config.related_post.limit || 6
- var lang = hexo.theme.config.rootConfig.language;
+ const hexoConfig = hexo.theme.config.rootConfig;
+ const config = hexo.theme.config;
+
+ var limit_num = config.related_post.limit || 6
+ var lang = hexoConfig.language;
+ var date_type = config.related_post.date_type || 'created'
var headline_lang;
if (lang === 'zh-CN') {
headline_lang = '相关推荐';
- } else if ( lang === 'zh-TW') {
+ } else if (lang === 'zh-TW') {
headline_lang = '相關推薦';
} else {
headline_lang = 'Recommend';
}
-
+
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 = ''
+ var lazy_src = config.lazyload.enable ? lazy_src = 'data-src' : lazy_src = 'src'
+ var lazy_class = config.lazyload.enable ? lazy_class = 'lazyload' : lazy_class = ''
if (relatedPosts.length > 0) {
result += ''
result += '
' + ' ' + headline_lang + '
'
result += '
'
-
- for (var i = 0; i < Math.min(relatedPosts.length, limit_num); i++) {
-
- var cover = relatedPosts[i].cover
- result += '
'
+ for (var i = 0; i < Math.min(relatedPosts.length, limit_num); i++) {
+
+ var cover = relatedPosts[i].cover
+
+ result += '
'
- return result;
-}
+ result += '
'
+ return result;
+
+ }
});
-hexo.extend.helper.register('echo', function(path){
-return path;
+hexo.extend.helper.register('echo', function (path) {
+ return path;
});
-function isTagRelated (tagName, TBDtags) {
+
+function isTagRelated(tagName, TBDtags) {
var result = false;
TBDtags.forEach(function (tag) {
- if (tagName == tag.name) {
- result = true;
- };
+ if (tagName == tag.name) {
+ result = true;
+ };
})
return result;
}
-function findItem (arrayToSearch, attr, val) {
+
+function findItem(arrayToSearch, attr, val) {
for (var i = 0; i < arrayToSearch.length; i++) {
- if (arrayToSearch[i][attr] == val) {
- return i
- };
+ if (arrayToSearch[i][attr] == val) {
+ return i
+ };
};
return -1;
}
-function compare (attr) {
+
+function compare(attr) {
return function (a, b) {
- var val1 = a[attr];
- var val2 = b[attr];
- return val2 - val1;
+ var val1 = a[attr];
+ var val2 = b[attr];
+ return val2 - val1;
}
}
+
+function dateHelper(date) {
+ const moment = getMoment(date, hexo.theme.config.rootConfig.language);
+ return moment.format(hexo.theme.config.rootConfig.date_format);
+}
+
+function getMoment(date, lang) {
+ if (date == null) date = moment();
+ if (!isMoment(date)) date = moment(isDate(date) ? date : new Date(date));
+ if (lang) date = date.locale(lang);
+ return date;
+}
\ No newline at end of file
diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl
index b018618..f3327a7 100644
--- a/source/css/_global/index.styl
+++ b/source/css/_global/index.styl
@@ -4,10 +4,8 @@ html
body
position: relative
- display: flex
- flex-direction: column
min-height: 100%
- background: #fff
+ background: $white
color: $font-black
font-size: $font-size
font-family: $font-family
@@ -20,11 +18,11 @@ body
-ms-user-select: none
#body-wrap
- position relative
- flex: 1 auto
+ position: relative
display: flex
+ flex: 1 auto
flex-direction: column
- transition: all .3s
+ transition: all .5s
*::-webkit-scrollbar
width: 8px
@@ -36,18 +34,16 @@ body
*::-webkit-scrollbar-track
background-color: transparent
-
#web_bg
- background: $web-bg
- height: 100%
- width: 100%
- background-size: cover
position: fixed
z-index: -999
+ width: 100%
+ height: 100%
+ background: $web-bg
background-attachment: local
- background-repeat: no-repeat
background-position: center
-
+ background-size: cover
+ background-repeat: no-repeat
h1,
h2,
@@ -56,11 +52,11 @@ h4,
h5,
h6
position: relative
- margin: 0.2rem 0
+ margin: 1rem 0 .7rem
color: lighten($font-color, 15%)
font-weight: bold
- code
+ code
font-size: inherit !important
#content-outer
@@ -69,20 +65,15 @@ h6
*
box-sizing: border-box
-#content-inner
- .img-alt
- text-decoration: none
- color: $a-link-color
-
#toggle-sidebar
position: fixed
bottom: $sidebar-icon-top
left: $sidebar-icon-left
z-index: 100
font-size: $sidebar-icon-size
- cursor: pointer
- transition: all 0.2s
opacity: 0
+ cursor: pointer
+ transition: all .2s
hr
position: relative
@@ -106,9 +97,12 @@ hr
font-size: 20px
transition: all 1s ease-in-out
+iframe
+ margin: 0 0 1rem
+
// collapse/expand beautify
details
- padding: 0.3rem
+ padding: .3rem
border: 2px solid darken($light-grey, 10%)
summary
@@ -117,13 +111,14 @@ details
// set of to center-align
// use class="not-code" to avoid conflicts because code also use tag
.not-code
- margin: 0.5em
- padding: 0.5em
+ margin: .5em
+ padding: .5em
border: thin silver solid
text-align: center
table
overflow: auto
+ margin: 0 0 1rem
width: 100%
border-spacing: 0
border-collapse: collapse
@@ -133,7 +128,7 @@ table
th,
td
- padding: 0.3rem 0.6rem
+ padding: .3rem .6rem
border: 1px solid darken($light-grey, 10%)
vertical-align: top
@@ -141,21 +136,21 @@ table
background: $selection
color: $pale-grey
-
-.full_page #site-title,
-.full_page #site-sub-title,
+// 字體
+.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
+ text-align: right
.is_left
text-align: left
-.is_center
+.is-center
text-align: center
.is_visible
@@ -173,50 +168,61 @@ table
.pull_right
float: right
+// button hover
+.button--primary
+ color: $ruby
+
+.button--animated
+ transition-duration: 1s
+ transition-property: color
+
+ &:before
+ position: absolute
+ top: 0
+ right: 0
+ bottom: 0
+ left: 0
+ z-index: -1
+ background: $ruby
+ content: ''
+ transition-timing-function: ease-out
+ transition-duration: .5s
+ transition-property: transform
+ transform: scaleX(0)
+ transform-origin: 0 50%
+
+ &:hover
+ &:before
+ transition-timing-function: cubic-bezier(.45, 1.64, .47, .66)
+ transform: scaleX(1)
+
+// third-party
.fireworks
position: fixed
z-index: -1
+ z-index: 99999
pointer-events: none
-
-.fireworks
- z-index: 99999
-
-@media screen and (max-width: $bg)
- i#toggle-sidebar,
- #sidebar
- display: none
-
- body
- padding-left: 0 !important
-
-
-// 懶加載
-.lazyload,
-.lazyloading
- opacity: 0
-
-.lazyloaded
- opacity: 1
- transition: opacity 0.3s
-
-img[src=""],img:not([src])
+img[src=''],
+img:not([src])
opacity: 0
.justified-gallery
margin: 1rem 0
-
- img
- opacity 0
- .fancybox
+
+ img
+ opacity: 0
+
+ .fancybox
width: auto
- text-align: inherit
+ text-align: inherit
+
.img-alt
display: none
.medium-zoom-image--opened
- margin: 0 !important
z-index: 99999 !important
+ margin: 0 !important
.medium-zoom-overlay
z-index: 99999 !important
@@ -224,19 +230,18 @@ img[src=""],img:not([src])
// hexo tag video
.video-container
position: relative
+ overflow: hidden
+ margin-bottom: .8rem
padding-top: 56.25%
height: 0
- overflow: hidden
- margin-bottom: 0.8rem
iframe
position: absolute
top: 0
left: 0
+ margin-top: 0
width: 100%
height: 100%
- margin-top: 0
-
.layout_page,
.layout_post,
@@ -255,60 +260,63 @@ canvas,
animation: to_show 4s
.card-announcement-animation
- animation: announ_animation .8s linear infinite
color: #FF0000
+ animation: announ_animation .8s linear infinite
.scroll-down-effects
animation: scroll-down-effect 1.5s infinite
-if hexo-config("avatar_effect") == true
- .avatar_img
+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
+ opacity: .4
+
50%
- opacity: 1
top: -16px
+ opacity: 1
+
100%
- opacity: 0.4
top: 0
-
-@keyframes header
- 0%
+ opacity: .4
+
+@keyframes header
+ 0%
opacity: 0
transform: translateY(-50px)
- 100%
+
+ 100%
opacity: 1
transform: translateY(0)
@keyframes headerNoOpacity
- 0%
+ 0%
transform: translateY(-50px)
- 100%
+
+ 100%
transform: translateY(0)
@keyframes main
- 0%
+ 0%
opacity: 0
transform: translateY(50px)
- 100%
+
+ 100%
opacity: 1
transform: translateY(0)
@keyframes titlescale
0%
opacity: 0
- transform: scale(0.7)
- 100%
+ transform: scale(.7)
+
+ 100%
opacity: 1
transform: scale(1)
@@ -316,19 +324,22 @@ if hexo-config("avatar_effect") == true
0%
opacity: 1
transform: scale(1)
- 100%
+
+ 100%
opacity: 0
- transform: scale(0.7)
+ transform: scale(.7)
@keyframes to_show
0%
opacity: 0
+
100%
opacity: 1
-
+
@keyframes avatar_turn_around
from
- transform: rotate(0deg)
+ transform: rotate(0)
+
to
transform: rotate(360deg)
@@ -336,6 +347,7 @@ if hexo-config("avatar_effect") == true
0%
opacity: 0
transform: translateY(10px)
+
100%
opacity: 1
transform: translateY(0)
@@ -344,31 +356,23 @@ if hexo-config("avatar_effect") == true
0%
opacity: 0
transform: translateY(-20px)
+
100%
opacity: 1
transform: translateY(0)
@keyframes announ_animation
- 0%,to
+ 0%,
+ to
transform: scale(1)
+
50%
transform: scale(1.2)
-@keyframes rightside_in_animate
- 0%
- transform: translateX(28px)
- 100%
- transform: translateX(0)
+@media screen and (max-width: $bg)
+ i#toggle-sidebar,
+ #sidebar
+ display: none
-@keyframes rightside_out_animate
- 0%
- transform: translateX(0)
- 100%
- transform: translateX(28px)
-
-@keyframes right_to_left
- 0%
- transform: translateX(100px)
- 100%
- transform: translateX(0)
-
+ body
+ padding-left: 0 !important
diff --git a/source/css/_highlight/highlight.styl b/source/css/_highlight/highlight.styl
index a2ec144..58a77e0 100644
--- a/source/css/_highlight/highlight.styl
+++ b/source/css/_highlight/highlight.styl
@@ -1,14 +1,13 @@
// https://github.com/equinusocio/vsc-material-theme
-@require "theme"
-@require "diff"
+@require 'theme'
+@require 'diff'
-wordWrap = !hexo-config("rootConfig.highlight.line_number") && hexo-config("code_word_wrap")
+wordWrap = !hexo-config('rootConfig.highlight.line_number') && hexo-config('code_word_wrap')
$code-block
overflow: auto
- margin: 1rem 0
+ margin: 0 0 1rem
padding: 0
- padding-top: 1.4rem
background: $highlight-background
color: $highlight-foreground
font-size: $code-font-size
@@ -18,26 +17,34 @@ $code-block
counter-reset: line
white-space: pre-wrap
+.code-area-wrap
+ position: relative
+ margin: 0 0 1rem
+
figure.highlight
position: relative
blockquote
- margin: 0
- padding: 0.1rem 0.8rem
- border-left: 0.2rem solid $blockquote-padding-color
+ margin: 0 0 1rem
+ padding: .1rem .8rem
+ border-left: .2rem solid $blockquote-padding-color
+ background-color: lighten($blockquote-padding-color, 33)
color: $blockquote-color
- background-color: lighten($blockquote-padding-color,33)
+
+ a
+ word-break: break-all
p
margin: 0 !important
- padding: 0.5rem 0
+ padding: .5rem 0
footer
- padding: 0 0 0.5rem 0
- cite
+ padding: 0 0 .5rem
+
+ cite
&:before
- content: "—"
padding: 0 .3em
+ content: '—'
.article-container
pre,
@@ -45,7 +52,7 @@ blockquote
font-family: $code-font !important
code
- padding: 0.1rem 0.2rem
+ padding: .1rem .2rem
background: $code-background
color: $code-foreground
word-wrap: break-word
@@ -53,6 +60,7 @@ blockquote
pre
@extend $code-block
+ padding: 10px 20px
code
padding: 0
@@ -60,21 +68,14 @@ blockquote
color: $highlight-foreground
text-shadow: none
- figure.highlight
- &:after
- position: absolute
- top: 0
- z-index: 0
- min-width: 100%
- height: 1.4rem
- background: darken($highlight-background, 5)
- content: ""
-
.highlight
@extend $code-block
position: relative
border-radius: 1px
+ if hexo-config('highlight_shrink') == true
+ display: none
+
pre
margin: 0
padding: 8px 0
@@ -88,31 +89,22 @@ blockquote
if wordWrap
&:before
display: inline-block
- padding: 0 0.3rem 0 0
+ padding: 0 .3rem 0 0
min-width: 1.6rem
color: $highlight-gutter.color
content: counter(line)
counter-increment: line
text-align: left
+ &.marked
+ background-color: $highlight-selection
+
table
position: relative
margin: 0
width: auto
border: none
- if hexo-config('highlight_shrink') == true
- display: none
-
- &:after
- position: absolute
- top: -1.4rem
- z-index: 0
- width: 100%
- height: 1.4rem
- background: darken($highlight-background, 5)
- content: ""
-
td
padding: 0
border: none
@@ -122,7 +114,7 @@ blockquote
position: absolute
z-index: 1
margin-bottom: 1em
- padding: 0.2em 0 0.2em 0.7rem
+ padding: .2rem 0 .2rem .7rem
width: 100%
height: 1.4em
color: $highlight-foreground
@@ -145,7 +137,7 @@ blockquote
border-bottom-color: $highlight-foreground
&+table
- margin-top: 1em
+ margin-top: 1.1rem
&:before
margin-top: -2.1rem
@@ -154,15 +146,15 @@ blockquote
top: -2.1rem
.gutter pre
- padding-right: 0.5rem
- padding-left: 0.5rem
+ padding-right: .5rem
+ padding-left: .5rem
background-color: $highlight-gutter.bg-color
color: $highlight-gutter.color
text-align: right
.code pre
- padding-right: 0.5rem
- padding-left: 0.5rem
+ padding-right: .5rem
+ padding-left: .5rem
width: 100%
background-color: $highlight-background
@@ -289,4 +281,18 @@ blockquote
&::selection
background: $highlight-selection
- color: $highlight-foreground
\ No newline at end of file
+ color: $highlight-foreground
+
+.highlight-tools
+ position: relative
+ width: 100%
+ height: 1.4rem
+ background: darken($highlight-background, 5)
+ color: $highlight-foreground
+ font-size: 14px
+
+ & + figure
+ margin: 0 !important
+
+.highlight-close
+ height: 0 !important
\ No newline at end of file
diff --git a/source/css/_highlight/theme.styl b/source/css/_highlight/theme.styl
index c6e1447..c956ce1 100644
--- a/source/css/_highlight/theme.styl
+++ b/source/css/_highlight/theme.styl
@@ -1,6 +1,6 @@
-$highlight_theme = hexo-config("highlight_theme")
+$highlight_theme = hexo-config('highlight_theme')
-if $highlight_theme == "default"
+if $highlight_theme == 'default'
$highlight-background = #263238
$highlight-current-line = #efefef
$highlight-selection = #80CBC420
@@ -18,7 +18,7 @@ if $highlight_theme == "default"
bg-color: $highlight-background
}
-if $highlight_theme == "darker"
+if $highlight_theme == 'darker'
$highlight-background = #212121
$highlight-current-line = #282a2e
$highlight-selection = #61616150
@@ -36,7 +36,7 @@ if $highlight_theme == "darker"
bg-color: $highlight-background
}
-if $highlight_theme == "pale night"
+if $highlight_theme == 'pale night'
$highlight-background = #292D3E
$highlight-current-line = #393939
$highlight-selection = #717CB450
@@ -54,7 +54,7 @@ if $highlight_theme == "pale night"
bg-color: $highlight-background
}
-if $highlight_theme == "ocean"
+if $highlight_theme == 'ocean'
$highlight-background = #0F111A
$highlight-current-line = #000000
$highlight-selection = #717CB450
@@ -72,7 +72,7 @@ if $highlight_theme == "ocean"
bg-color: $highlight-background
}
-if $highlight_theme == "light"
+if $highlight_theme == 'light'
$highlight-background = #F6F8FA
$highlight-current-line = #00346e
$highlight-selection = #80CBC440
diff --git a/source/css/_layout/aside.styl b/source/css/_layout/aside.styl
index 03e9963..79f6af5 100644
--- a/source/css/_layout/aside.styl
+++ b/source/css/_layout/aside.styl
@@ -1,26 +1,25 @@
#aside_content
width: 25%
- .card_widget
- -webkit-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
- transition: all .3s
- background: #fff
- margin-top: 20px
+ .card-widget
overflow: hidden
+ margin-top: 20px
+ border-radius: 8px
+ background: $white
+ box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
+ transition: all .3s
&:hover
- box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
+ box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
- .card-author
+ .card-info
img
- height: 120px
- width: 120px
- padding: 0
display: inline-block
- vertical-align: top
+ padding: 5px
+ width: 120px
+ height: 120px
border-radius: 70px
+ vertical-align: top
transition: all .3s
&:hover
@@ -28,254 +27,199 @@
.author-info
&__name
- font-size: 1.1rem
- display: block
- margin: -0.1rem auto
font-weight: 500
+ font-size: 1.1rem
&__description
- display: block
- margin: -0.1rem auto
+ margin-top: -.3rem
- .data_link
- a
- text-decoration: none
+ .card-info-data
+ display: flex
+ padding: .7rem 0
- .length_num
- font-size: 1rem
- color: #000
+ & > .card-info-data-item
+ flex: 1 1
+ min-width: 0
- .headline
- display: block
- font-size: 0.7rem
- margin-bottom: -21px
- text-transform: uppercase
- color:$font-black
+ a
+ text-decoration: none
- #aside-social-icons
- margin: 0.5rem auto -0.7rem
- width: 15rem
- text-align: center
+ .headline
+ display: block
+ overflow: hidden
+ color: $font-black
+ text-transform: uppercase
+ text-overflow: ellipsis
+ white-space: nowrap
+ font-size: .7rem
- .social-icon
- margin: 0 0.5rem
+ .length_num
+ color: $dark-black
+ font-size: 1rem
+
+ .card-info-social-icons
+ margin: .3rem 0 -.3rem
+
+ .social-icon
+ margin: 0 .5rem
color: $font-black
font-size: 1rem
cursor: pointer
-
+
i
- transition: all 0.3s
-
+ transition: all .3s
+
&:hover
transform: rotate(540deg)
#bookmark-it
- margin-top: .2rem
- height: 1.6rem
- background-color: $light-blue
- color: #fff
- text-decoration: none
- line-height: 1.6rem
position: relative
- text-transform: uppercase
z-index: 1
+ display: block
+ background-color: $light-blue
+ color: $white
+ text-decoration: none
+ text-transform: uppercase
+ line-height: 1.6rem
span
- padding-left: 10px
+ padding-left: .5rem
- .bookmark--primary
- color: $ruby
-
- .bookmark--animated
- transition-property: color
- transition-duration: 1s
-
- &: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)
-
- .card-content
+ .card-content
padding: 1rem 1.2rem
-
- .post_data
- display: flex
- .data-item
- flex-grow: 1
- align-items: center
- flex-basis: auto
- justify-content: center
+ .item-headline
+ font-size: .8rem
- .item_headline
- font-size: 0.8rem
-
- span
- margin-left: 10px
+ span
+ margin-left: .5rem
- .card-tag-cloud
+ .card-tag-cloud
a
text-decoration: none
- position: relative
- padding-bottom: 0.3rem
word-break: keep-all
&:hover
color: $light-blue !important
- // &::after
- // width: 100%
+ .card-recent-post
+ .aside-recent-item
+ margin: 10px 0 -15px
- .aside_recent_item
- margin: 10px 0 -15px 0
-
- .aside_recent_post
- a
- text-decoration: none
- color: $font-black
+ & > .aside-recent-post
+ margin-bottom: 10px
- .aside_recent_post
- margin-bottom: 10px
- width: 100%
+ & > a
+ color: $font-black
+ text-decoration: none
- .aside_post_cover
- height: 66px
- width: 66px
- float: left
- overflow: hidden
+ .aside-post-cover
+ float: left
+ overflow: hidden
+ width: 66px
+ height: 66px
- .aside_post_bg
- object-fit: cover
- width: 100%
- height: 100%
- max-width: 100%
- padding: 0
- transition: all .6s
+ .aside-post-bg
+ padding: 0
+ max-width: 100%
+ width: 100%
+ height: 100%
+ transition: all .6s
+ object-fit: cover
- &:hover
- box-shadow: none
- transform: scale(1.1)
-
- #aside_title
- .aside_post_meta
- font-size: 0.6rem
- padding-left: 10px
- color: #99a9bf
+ &:hover
+ box-shadow: none
+ transform: scale(1.1)
- .aside_post_title
- line-height: 1rem
- display: -webkit-box
- -webkit-line-clamp: 2
- -webkit-box-orient: vertical
- overflow: hidden
- height: 40px
- padding-left: 10px
+ .aside-post-title
+ .aside-post_meta
+ padding-left: 10px
+ color: $theme-link-color
+ font-size: .6rem
- &:hover
- color: $light-blue !important
+ .aside-post_title
+ display: -webkit-box
+ overflow: hidden
+ padding-left: 10px
+ height: 40px
+ line-height: 1rem
+ -webkit-line-clamp: 2
+ -webkit-box-orient: vertical
- .aside_category_item,.archive-list
+ &:hover
+ color: $light-blue !important
+
+ .card-archives ul.archive-list,
+ .card-categories ul.aside-category-item
+ margin: 0
+ padding: .2rem 0 0
list-style: none
- margin-bottom: -3px
- margin-block-start: 0.2rem
-
- .aside_category_item.child
- margin-bottom: -3px
- margin-block-start: 0rem
- .aside_category_list
- margin-left: -50px
-
- .aside_category_list,.archive-list-item
- margin-left: -40px
+ .card-archives ul.archive-list > .archive-list-item,
+ .card-categories ul.aside-category-item > .aside-category-list
+ padding: .2rem 1rem
+ cursor: pointer
+ transition: all .3s
&:hover
+ padding: .2rem .85rem
background-color: $light-blue
color: #363636
+
a
- text-decoration: none
+ display: flex
color: $font-black
- padding: 0.2rem 1rem
- transition: .2s
+ text-decoration: none
- &:hover
- padding: 0.2rem 0.85rem
-
- .aside_category_list_name,.archive-list-link
- white-space: nowrap
- overflow: hidden
- text-overflow: ellipsis
- flex: auto
+ span
+ &:first-child
+ flex: auto
+ overflow: hidden
+ text-overflow: ellipsis
+ white-space: nowrap
+
+ .card-categories
+ .aside-category-item
+ &.child
+ padding: 0 0 0 1.2rem
- .aside_category_list_link,.archive-list-item
- display: flex
-
- .aside_category_list_length,.archive-list-count
- float: right
-
.card-archives
- margin-bottom: 20px
-
+ .archive-list-link-more
+ justify-content: center
+
.card-webinfo
.webinfo
- padding: 0.2rem 1rem
+ padding: .2rem 1rem
- .webinfo_item
+ .webinfo-item
display: block
padding: 4px 0 0
- .webinfo_article_name,
- .webinfo_runtime_name,
- .webinfo_site_uv_name,
- .webinfo_site_name
- display: inline-block
-
- .webinfo_article_count,
- .webinfo_runtime_count,
- .webinfo_site_uv_count,
- .webinfo_site_pv_count
- float: right
- display: inline-block
+ div
+ &:first-child
+ display: inline-block
-@media screen and (max-width: 900px)
+ &:last-child
+ display: inline-block
+ float: right
+
+@media screen and (max-width: 900px)
.layout_page
flex-direction: column
-
- #recent-posts,#aside_content
+
+ #recent-posts,
+ #aside_content
width: 100% !important
-
- .card_widget
- 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
+@media screen and (min-width: 900px)
+ #aside_content
+ .card-widget
+ if hexo-config('aside.position') == 'right'
+ margin-left: 15px
+ else
+ margin-right: 15px
if hexo-config('aside_mobile') == false
@media screen and (max-width: $sm)
#aside_content
- display: none
-
+ display: none
diff --git a/source/css/_layout/category.styl b/source/css/_layout/category.styl
index 4b046bd..0287d0b 100644
--- a/source/css/_layout/category.styl
+++ b/source/css/_layout/category.styl
@@ -1,8 +1,8 @@
.category-content
ol,
ul
- margin-top: 0.4rem
- padding: 0 0 0 0.8rem
+ margin-top: .4rem
+ padding: 0 0 0 .8rem
list-style: none
counter-reset: li
@@ -11,12 +11,12 @@
ol,
ul
- padding-left: 0.5rem
+ padding-left: .5rem
li
position: relative
- margin: 0.3rem 0
- padding: 0.1rem 0.5rem 0.1rem 1.5rem !important
+ margin: .3rem 0
+ padding: .1rem .5rem .1rem 1.5rem !important
&:hover
&:before
@@ -29,19 +29,19 @@
background: $light-blue
color: $white
cursor: pointer
- transition: all 0.3s ease-out
+ transition: all .3s ease-out
ol
li
&:before
- margin-top: 0.2rem
+ margin-top: .2rem
width: w = 1.2rem
height: h = w
- border-radius: 0.5 * w
+ border-radius: .5 * w
content: counter(li)
counter-increment: li
text-align: center
- font-size: 0.6rem
+ font-size: .6rem
line-height: h
ul
@@ -51,13 +51,13 @@
border-color: $ruby
&:before
- $w = 0.3rem
+ $w = .3rem
top: 10px
- margin-left: 0.45rem
+ margin-left: .45rem
width: w = $w
height: h = w
- border: 0.5 * w solid $light-blue
+ border: .5 * w solid $light-blue
border-radius: w
background: $white
- content: ""
+ content: ''
line-height: h
diff --git a/source/css/_layout/comments.styl b/source/css/_layout/comments.styl
index 3fee14e..00759a8 100644
--- a/source/css/_layout/comments.styl
+++ b/source/css/_layout/comments.styl
@@ -2,65 +2,67 @@
margin-top: 1rem
.comment_headling
- font-size: 20px
- font-weight: 700
margin-bottom: 10px
+ font-weight: 700
+ font-size: 20px
-// valine
+// valine
#vcomment
font-size: inherit
-
- input
- font-size: 0.65rem
- button
- font-size: .7rem
+ input
+ font-size: .65rem
+
+ button
padding: .3rem 1rem
+ border-color: #fff
background-color: $light-blue
color: #fff
- border-color: #fff
+ font-size: .7rem
&: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
+ textarea
+ font-size: .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
+ .vcount
+ font-size: .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: 1px solid $cyan
border-radius: 5px
+ color: $cyan
+ font-size: .7125rem
&:hover
- background-color: alpha($cyan,0.5)
-
- code, pre
- font-size: 98%
+ background-color: alpha($cyan, .5)
+ code,
+ pre
+ font-size: 98%
diff --git a/source/css/_layout/flink.styl b/source/css/_layout/flink.styl
index 2ad2164..2f6b90b 100644
--- a/source/css/_layout/flink.styl
+++ b/source/css/_layout/flink.styl
@@ -1,122 +1,91 @@
.flink
- .md-links
- min-height: calc(100% - 120px - 5pc - 6em)
- text-align: center
- overflow: auto
- padding: 0
- margin: 0 auto
+ .post-cards
+ margin: -10px 10px 0
- a
- color: #333
- text-decoration: none
-
- li
- width: calc(100%/3 - 14px)
- float: left
- list-style: none
-
- .md-links-item
- height: 90px
- line-height: 17px
- margin: 20px 7px
- padding: 0px 0px
- transition: box-shadow 0.25s
- text-overflow: ellipsis
- overflow: hidden
- border-radius: 8px
- transform: perspective(1px) translateZ(0)
- box-shadow: 0 0 1px rgba(0, 0, 0, 0)
- position: relative
- transition-property: color
- transition-duration: 0.3s
-
- img
- float: left
- border-radius: 35px
- margin: 11px 10px
- width: 70px
- height: 70px
- border: 0px solid #eaeefb
- transition: all .3s
-
- &:hover
- img
- filter: unqoute("progid:DXImageTransform.Microsoft.BasicImage(rotation=3)")
- transform: rotate(540deg)
-
- &:before
- content: ""
- position: absolute
- z-index: -1
- top: 0
- left: 0
- right: 0
- bottom: 0
- background: $light-blue !important
- transform: scale(0)
- transition-property: transform
- transition-duration: 0.3s
- transition-timing-function: ease-out
+ .md-links
+ overflow: auto
+ margin: 0 auto
+ padding: 0
+ text-align: center
- .md-links-item:hover,
- .md-links-item:focus,
- .md-links-item:active
- color: white
+ & > .md-links-item
+ position: relative
+ float: left
+ overflow: hidden
+ margin: 20px 7px
+ padding: 0
+ width: calc(100% / 3 - 14px)
+ height: 90px
+ border-radius: 8px
+ list-style: none
+ line-height: 17px
+ transform: perspective(1px) translateZ(0)
- .md-links-item:hover:before,
- .md-links-item:focus:before,
- .md-links-item:active:before
- -webkit-transform: scale(1)
- transform: scale(1)
-
- .md-links-item a:hover
- cursor: pointer
-
- .md-links-title
- padding-top: 16px
- padding-right: 10px
- font-size: 20px
- font-weight: bold
- height:40px
- overflow: hidden
- white-space: nowrap
- text-overflow: ellipsis
+ &:hover
+ img
+ transform: rotate(540deg)
+
+ &:before
+ position: absolute
+ top: 0
+ right: 0
+ bottom: 0
+ left: 0
+ z-index: -1
+ background: $light-blue
+ content: ''
+ transition-timing-function: ease-out
+ transition-duration: .3s
+ transition-property: transform
+ transform: scale(0)
+
+ &:hover:before,
+ &:focus:before,
+ &:active:before
+ transform: scale(1)
+
+ a
+ color: #333
+ text-decoration: none
+
+ img
+ float: left
+ margin: 11px 10px
+ padding: 4px
+ width: 70px
+ height: 70px
+ border-radius: 35px
+ transition: all .3s
+
+ .md-links-title
+ overflow: hidden
+ padding: 16px 10px 0 0
+ height: 40px
+ text-overflow: ellipsis
+ white-space: nowrap
+ font-weight: bold
+ font-size: 20px
+
+ .md-links-des
+ overflow: hidden
+ padding: 16px 10px
+ height: 50px
+ text-overflow: ellipsis
+ white-space: nowrap
+ font-size: 13px
- .post-cards
- margin-top: 5px
- min-height: 100px
- padding: 0 15px
- border-radius: 15px
-
.comment-word
- font-weight:bold
- font-size:1.7em
-
- .md-links-des
- padding: 16px 10px
- font-size:13px
- overflow: hidden
- height:50px
- white-space: nowrap
- text-overflow: ellipsis
+ font-weight: bold
+ font-size: 1.7em
-@media screen and (max-width:1100px)
+@media screen and (max-width: 1100px)
.flink
- .post-cards
- position: relative
- margin: -20px -16px 0
- border-radius: 18px
- padding: 16px
-
- .md-links
- li
- width: calc(100%/2 - 14px)
+ .md-links
+ .md-links-item
+ width: calc(50% - 14px) !important
-@media screen and (max-width:600px)
+@media screen and (max-width: 600px)
.flink
- .md-links
- li
- width: calc(100%/1 - 14px)
-
-
-
+ .md-links
+ .md-links-item
+ width: calc(100% - 14px) !important
diff --git a/source/css/_layout/footer.styl b/source/css/_layout/footer.styl
index 5d63fd5..0a224d6 100644
--- a/source/css/_layout/footer.styl
+++ b/source/css/_layout/footer.styl
@@ -1,28 +1,26 @@
#footer
+ position: relative
margin-top: 1rem
background: $light-blue
background-attachment: local
background-position: bottom
background-size: cover
- position: relative
if hexo-config('footer_bg') != false
&:before
position: absolute
+ top: 0
+ right: 0
bottom: 0
left: 0
- display: block
+ background-color: alpha($dark-black, .5)
content: ''
- width: 100%
- height: 100%
- background-color: alpha($dark-black,0.5)
-
#footer-wrap
+ position: relative
padding: 2rem 1rem
color: $light-grey
text-align: center
- position: relative
a
color: $light-grey
@@ -33,9 +31,8 @@
color: $white
.footer-separator
- margin: 0 0.2rem
+ margin: 0 .2rem
.icp-icon
padding: 0 4px
vertical-align: text-bottom
-
diff --git a/source/css/_layout/head.styl b/source/css/_layout/head.styl
index 1a02c62..bf1e701 100644
--- a/source/css/_layout/head.styl
+++ b/source/css/_layout/head.styl
@@ -1,31 +1,30 @@
#nav
position: relative
margin-bottom: 1rem
+ width: 100%
+ background-color: $light-blue
+ background-attachment: local
+ background-position: center
+ background-size: cover
&.full_page
+ display: flex
+ align-items: center
height: $index_top_img_height
-
- .nav_bg
- width: 100%
- height: 100%
- background-color: $light-blue
- background-position: center
- background-size: cover
- background-attachment: local
&.not_index_bg
height: 20rem
#site-social-icons
+ display: none
margin: 0 auto
width: 15rem
text-align: center
- display: none
.social-icon
- margin: 0 0.5rem
+ margin: 0 .5rem
color: $light-grey
- text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
+ text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
font-size: .9rem
cursor: pointer
@@ -35,13 +34,12 @@
#site-info
position: absolute
width: 100%
- top: $index_site_info_top
#site-title,
#site-sub-title
color: $light-grey
text-align: center
- text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
+ text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
line-height: 1.5
#site-title
@@ -49,7 +47,7 @@
font-size: 1.3rem
#site-sub-title
- font-size: 0.8rem
+ font-size: .8rem
#page_site-info
position: absolute
@@ -60,16 +58,16 @@
position: absolute
bottom: 0
width: 100%
- cursor: pointer
height: 42px
- font-size: 30px
text-align: center
+ font-size: 30px
+ cursor: pointer
.scroll-down-effects
position: absolute
color: $white
-#header
+header
position: relative
#page-header
@@ -78,20 +76,23 @@
z-index: 99
padding: 10px 36px
width: 100%
+ height: 58px
border: none
font-size: 18px
- transition: all .3s
opacity: 0
+ transition: all .5s
.toggle-menu
display: none
- padding-top: 0.6rem
- color: $light-grey
- cursor: pointer
+ padding: .1rem 0 0 .3rem
&:hover
color: $white
-
+
+ &.is_visible
+ .site-page
+ font-size: inherit
+
a
color: $light-grey
text-decoration: none
@@ -103,9 +104,9 @@
position: fixed
top: -60px
z-index: 101
- background: alpha($white, 0.8)
- box-shadow: 0 5px 6px -5px alpha($grey, 0.6)
- transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out
+ background: alpha($white, .8)
+ box-shadow: 0 5px 6px -5px alpha($grey, .6)
+ transition: transform .2s ease-in-out, opacity .2s ease-in-out
&.open-sidebar
.site-page
@@ -118,118 +119,106 @@
text-shadow: none
&:hover
- color: $light-blue
+ color: $light-blue
&.visible
+ transition: all .5s
transform: translate3d(0, 100%, 0)
- transition: all .3s
.menus_item_child
background-color: $white !important
- &:before
- border-color: transparent transparent $white !important
-
#site-name
- text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
+ text-shadow: .1rem .1rem .2rem rgba(0, 0, 0, .15)
font-weight: bold
cursor: pointer
.menus_item
+ position: relative
display: inline-block
- padding: 0 0 0 0.7rem
+ padding: 0 0 0 .7rem
- &:hover,&:focus
+ &:hover
.menus_item_child
display: block
-
+
.menus-expand
transform: rotate(180deg) !important
-
+
.menus-expand
- padding: 4px
- transform: rotate(0deg)
+ padding: 4px
transition: all .3s
+ transform: rotate(0)
+
+ & > a
+ &:after
+ position: absolute
+ bottom: 0
+ left: 0
+ z-index: -1
+ width: 0
+ height: 3px
+ background-color: lighten($theme-color, 30%)
+ content: ''
+ transition: all .3s ease-in-out
+
+ &:hover
+ &::after
+ width: 100%
.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)
+ right: 0
display: none
- opacity: 1
- animation: sub_menus .3s .1s ease both
+ margin-top: 8px
padding: 0
- margin-top: 10px
+ width: max-content
+ background-color: alpha($white, .8)
+ box-shadow: 0 5px 20px -4px rgba(0, 0, 0, .5)
+ animation: sub_menus .3s .1s ease both
&:before
- content: ""
position: absolute
- top: -20px
- left: 50%
- margin-left: -10px
- border-width: 10px
- border-style: solid
- border-color: transparent transparent alpha($white, 0.8)
+ top: -8px
+ left: 0
+ width: 100%
+ height: 20px
+ content: ''
li
+ padding: 1px 10px
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
-
+ background: $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
+ #search_button
+ padding: 0 0 0 .7rem
-#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
+ .site-page
+ position: relative
+ padding-bottom: .3rem
+ text-shadow: .05rem .05rem .1rem rgba(0, 0, 0, .3)
+ font-size: .7rem
+ cursor: pointer
- &:hover
- &::after
- width: 100%
-
-
-@media screen and (min-width: $sm)
+@media screen and (min-width: $sm)
#site-title
font-size: 2rem
#site-sub-title
font-size: 1.2rem
-
@media screen and (max-width: $sm)
#page-header
- padding: 10px 0.8rem
-
- #nav
+ padding: 10px .8rem
+
+ #nav
#site-social-icons
display: block
@@ -238,19 +227,7 @@
#page_site-info
top: 7rem
-
- #top-container
- height: 14rem
- #post-info
- bottom: 1rem
- padding: 0 5%
-
- .mobile_hidden
- display: none
-
-
-
@media screen and (max-width: $bg)
#page-header
&.fixed
diff --git a/source/css/_layout/mobile-sidebar.styl b/source/css/_layout/mobile-sidebar.styl
index ac26c28..438fe51 100644
--- a/source/css/_layout/mobile-sidebar.styl
+++ b/source/css/_layout/mobile-sidebar.styl
@@ -2,43 +2,39 @@
#menu_mask
position: fixed
top: 0
- bottom: 0
- width: 100%
- height: 110vh
- left: 0
right: 0
- background: alpha($black,0.7)
+ bottom: 0
+ left: 0
z-index: 102
display: none
+ background: alpha($dark-black, .7)
- #mobile-sidebar-menus,#mobile-sidebar-toc
+ #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
+ overflow-y: scroll
+ width: 250px
+ height: 100%
+ background: $white
+ box-shadow: 0 0 4px alpha($dark-black, .27)
+ transition: all .5s
#mobile-sidebar-menus
- .mobile_author_icon
+ & > .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
+ padding: 0
+ width: 120px
+ height: 120px
border-radius: 70px
+ vertical-align: top
transition: all .3s
.mobile_post_data
@@ -49,126 +45,86 @@
.mobile_data_item
flex: 1
- .mobile_data_link
+ .mobile_data_link
a
text-decoration: none
- .length_num
- font-size: .9rem
+ .length_num
color: $dark-black
+ font-size: .9rem
- .headline
+ .headline
display: block
- font-size: 0.7rem
+ color: $font-black
text-transform: uppercase
- color:$font-black
-
- hr
+ font-size: .7rem
+
+ hr
margin: 1rem auto
.menus_items
- padding: 0 .5rem
margin-bottom: 5rem
+ padding: 0 .5rem
- a
- display: block !important
- opacity: 1 !important
+ .site-page
+ position: relative
+ z-index: 0
+ display: block
+ overflow: hidden
margin: 0
padding: .3rem 1.5rem
color: $font-black
- text-shadow: none
- font-size: 0.8rem
- z-index: 0
+ text-decoration: none
text-overflow: ellipsis
- overflow: hidden
- white-space: nowrap
-
+ text-shadow: none
+ white-space: nowrap
+ font-size: .8rem
+ cursor: pointer
+
i
width: 30%
- text-align: left
+ text-align: left
span
- width 70%
+ width: 70%
&:hover
color: $light-blue
.menus-expand
position: absolute
+ right: 0
+ padding: 6px
width: 30px !important
height: 30px
- right: 0
- padding: 6px
- transform: rotate(0deg)
transition: all .3s
-
+ transform: rotate(0)
+
&.menus-closed
- transform: rotate(180deg) !important
transition: all .3s
-
+ transform: rotate(180deg) !important
+
.menus_item_child
- list-style: none
margin: 0
-
- #mobile-sidebar-toc
- padding: 1rem 0.5rem 5rem 0.3rem
+ list-style: none
- ol,li
- list-style: none
- padding: 0 0 0 8px
+ #mobile-sidebar-toc
+ padding: 1rem .5rem 5rem .3rem
+
+ ol,
+ li
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
+ padding: 0 0 0 8px
+ list-style: none
+ .toc_mobile_headline
+ text-align: center
+ font-weight: bold
+ font-size: 18px
+ .toc_mobile_items-link
+ color: $font-color
+ text-decoration: none
+ &:hover
+ color: $light-blue
diff --git a/source/css/_layout/note.styl b/source/css/_layout/note.styl
index 5baebdf..d026127 100644
--- a/source/css/_layout/note.styl
+++ b/source/css/_layout/note.styl
@@ -1,256 +1,282 @@
-.note
+.note
$note-icons = hexo-config('note.icons')
$note-style = hexo-config('note.style')
- margin: 10px 0
- padding: 15px
position: relative
+ margin: 0 0 1rem
+ padding: 15px
- if ($note-style == 'simple')
+ if ($note-style == 'simple')
border: 1px solid $light-grey
border-left-width: 5px
-
- if ($note-style == 'modern')
- background-color: $whitesmoke
+ if ($note-style == 'modern')
border: 1px solid transparent
-
+ background-color: $whitesmoke
- if ($note-style == 'flat')
- background-color: lighten($light-grey, 65%)
+ if ($note-style == 'flat')
border: initial
border-left: 5px solid $light-grey
-
+ background-color: lighten($light-grey, 65%)
- if (hexo-config('note.border_radius') is a 'unit')
+ 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)
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
+ if $note-icons
margin-top: 3px
- else
+ else
margin-top: 0
-
- border-bottom: initial
margin-bottom: 0
padding-top: 0 !important
-
+ border-bottom: initial
- p, ul, ol, table, pre, blockquote, img
- &:first-child
+ p,
+ ul,
+ ol,
+ table,
+ pre,
+ blockquote,
+ img
+ &:first-child
margin-top: 0 !important
- &:last-child
+ &:last-child
margin-bottom: 0 !important
-
- if ($note-icons)
- &:not(.no-icon)
+ if $note-icons
+ &:not(.no-icon)
padding-left: 45px
- &::before
- font-family: 'FontAwesome'
- font-size: larger
- left: 15px
+ &::before
position: absolute
top: 13px
-
- &.default
- if ($note-style == 'flat')
- background-color: $note-default-bg
-
+ left: 15px
+ font-size: larger
+ font-family: 'FontAwesome'
- if ($note-style == 'modern')
- background-color: $note-modern-default-bg
+ &.default
+ if ($note-style == 'flat')
+ background-color: $note-default-bg
+
+ if ($note-style == 'modern')
border-color: $note-modern-default-border
+ background-color: $note-modern-default-bg
color: $note-modern-default-text
- a, span.exturl
- &:not(.btn)
+ a,
+ span.exturl
+ &:not(.btn)
border-bottom: 1px solid $note-modern-default-text
color: $note-modern-default-text
- &:hover
+ &:hover
border-bottom: 1px solid $note-modern-default-hover
color: $note-modern-default-hover
-
- if ($note-style != 'modern')
+
+ if ($note-style != 'modern')
border-left-color: $note-default-border
- h2, h3, h4, h5, h6
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
color: $note-default-text
-
- if ($note-icons)
- &:not(.no-icon)
- &::before
+
+ if $note-icons
+ &:not(.no-icon)
+ &::before
content: $note-default-icon
- if ($note-style != 'modern')
+ if ($note-style != 'modern')
color: $note-default-text
- &.primary
- if ($note-style == 'flat')
+ &.primary
+ if ($note-style == 'flat')
background-color: $note-primary-bg
-
- if ($note-style == 'modern')
- background-color: $note-modern-primary-bg
+ if ($note-style == 'modern')
border-color: $note-modern-primary-border
+ background-color: $note-modern-primary-bg
color: $note-modern-primary-text
- a, span.exturl
- &:not(.btn)
+ a,
+ span.exturl
+ &:not(.btn)
border-bottom: 1px solid $note-modern-primary-text
color: $note-modern-primary-text
- &:hover
+ &:hover
border-bottom: 1px solid $note-modern-primary-hover
color: $note-modern-primary-hover
-
- if ($note-style != 'modern')
+
+ if ($note-style != 'modern')
border-left-color: $note-primary-border
- h2, h3, h4, h5, h6
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
color: $note-primary-text
-
- if ($note-icons)
- &:not(.no-icon)
- &::before
+
+ if $note-icons
+ &:not(.no-icon)
+ &::before
content: $note-primary-icon
- if ($note-style != 'modern')
+ 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
+ &.info
+ if ($note-style == 'flat')
+ background-color: $note-info-bg
+
+ if ($note-style == 'modern')
border-color: $note-modern-info-border
+ background-color: $note-modern-info-bg
color: $note-modern-info-text
- a, span.exturl
- &:not(.btn)
+ a,
+ span.exturl
+ &:not(.btn)
border-bottom: 1px solid $note-modern-info-text
color: $note-modern-info-text
- &:hover
+ &:hover
border-bottom: 1px solid $note-modern-info-hover
color: $note-modern-info-hover
-
- if ($note-style != 'modern')
+
+ if ($note-style != 'modern')
border-left-color: $note-info-border
- h2, h3, h4, h5, h6
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
color: $note-info-text
-
- if ($note-icons)
- &:not(.no-icon)
- &::before
+
+ if $note-icons
+ &:not(.no-icon)
+ &::before
content: $note-info-icon
- if ($note-style != 'modern')
+ 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
+ &.success
+ if ($note-style == 'flat')
+ background-color: $note-success-bg
+
+ if ($note-style == 'modern')
border-color: $note-modern-success-border
+ background-color: $note-modern-success-bg
color: $note-modern-success-text
- a, span.exturl
- &:not(.btn)
+ a,
+ span.exturl
+ &:not(.btn)
border-bottom: 1px solid $note-modern-success-text
color: $note-modern-success-text
- &:hover
+ &:hover
border-bottom: 1px solid $note-modern-success-hover
color: $note-modern-success-hover
-
- if ($note-style != 'modern')
+
+ if ($note-style != 'modern')
border-left-color: $note-success-border
- h2, h3, h4, h5, h6
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
color: $note-success-text
-
- if ($note-icons)
- &:not(.no-icon)
- &::before
+
+ if $note-icons
+ &:not(.no-icon)
+ &::before
content: $note-success-icon
- if ($note-style != 'modern')
+ 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
+ &.warning
+ if ($note-style == 'flat')
+ background-color: $note-warning-bg
+
+ if ($note-style == 'modern')
border-color: $note-modern-warning-border
+ background-color: $note-modern-warning-bg
color: $note-modern-warning-text
- a, span.exturl
- &:not(.btn)
+ a,
+ span.exturl
+ &:not(.btn)
border-bottom: 1px solid $note-modern-warning-text
color: $note-modern-warning-text
- &:hover
+ &:hover
border-bottom: 1px solid $note-modern-warning-hover
color: $note-modern-warning-hover
-
- if ($note-style != 'modern')
+
+ if ($note-style != 'modern')
border-left-color: $note-warning-border
- h2, h3, h4, h5, h6
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
color: $note-warning-text
-
- if ($note-icons)
- &:not(.no-icon)
- &::before
+
+ if $note-icons
+ &:not(.no-icon)
+ &::before
content: $note-warning-icon
- if ($note-style != 'modern')
+ 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
+ &.danger
+ if ($note-style == 'flat')
+ background-color: $note-danger-bg
+
+ if ($note-style == 'modern')
border-color: $note-modern-danger-border
+ background-color: $note-modern-danger-bg
color: $note-modern-danger-text
- a, span.exturl
- &:not(.btn)
+ a,
+ span.exturl
+ &:not(.btn)
border-bottom: 1px solid $note-modern-danger-text
color: $note-modern-danger-text
- &:hover
+ &:hover
border-bottom: 1px solid $note-modern-danger-hover
color: $note-modern-danger-hover
-
- if ($note-style != 'modern')
+ if ($note-style != 'modern')
border-left-color: $note-danger-border
- h2, h3, h4, h5, h6
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
color: $note-danger-text
- if ($note-icons)
- &:not(.no-icon)
- &::before
+ if $note-icons
+ &:not(.no-icon)
+ &::before
content: $note-danger-icon
- if ($note-style != 'modern')
+ if ($note-style != 'modern')
color: $note-danger-text
diff --git a/source/css/_layout/page.styl b/source/css/_layout/page.styl
index 81da60d..877da46 100644
--- a/source/css/_layout/page.styl
+++ b/source/css/_layout/page.styl
@@ -1,122 +1,134 @@
.layout_page
- display: flex
- margin: 0 auto
- max-width: 1200px
+ display: flex
align-items: flex-start
+ margin: 0 auto
padding: 0 15px
+ max-width: 1200px
-//index
+// index
#recent-posts
width: 75%
- .recent-post-item
- padding: 0
- box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
- border-radius: 8px
- transition: all 0.3s
- background: #fff
+ & > .recent-post-item
+ display: flex
+ flex-direction: row
+ align-items: center
margin-top: 20px
+ padding: 0
height: 280px
+ border-radius: 8px
+ background: #fff
+ box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
+ transition: all .3s
- &: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)
+ &:hover
+ box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
img.post_bg
- transform:scale(1.1)
-
- .left_radius
- border-top-left-radius: 8px
- border-bottom-left-radius: 8px
+ transform: scale(1.1)
- .right_radius
- border-top-right-radius: 8px
- border-bottom-right-radius: 8px
+ if hexo-config('index_post_cover') == 'both'
+ .left_radius
+ border-radius: 8px 0 0 8px
- .post_cover
- width: 45%
- height: 280px
- overflow: hidden
+ .right_radius
+ order: 2
+ border-radius: 0 8px 8px 0
+ else if hexo-config('index_post_cover') == 'left'
+ .left_radius
+ border-radius: 8px 0 0 8px
- .post_bg
- border: 0
- transition: all .6s
- display: block
- width: 100%
- height: 100%
- padding: 0
- margin: 0
- object-fit: cover
+ .right_radius
+ border-radius: 8px 0 0 8px
+ else if hexo-config('index_post_cover') == 'right'
+ .left_radius
+ order: 2
+ border-radius: 0 8px 8px 0
- &:hover
- transform:scale(1.1)
-
- .recent-post-info
- padding: 50px 40px
- display: inline-block
- width: 55%
- overflow hidden
+ .right_radius
+ order: 2
+ border-radius: 0 8px 8px 0
+ .post_cover
+ overflow: hidden
+ width: 45%
+ height: 280px
- a.article-meta__categories
- text-decoration: none
- color: #858585
+ img.post_bg
+ display: block
+ margin: 0
+ padding: 0
+ width: 100%
+ height: 100%
+ border: 0
+ transition: all .6s
+ object-fit: cover
- &:hover
- color: #49b1f5 !important
+ &:hover
+ transform: scale(1.1)
- .content
- display: -webkit-box
- -webkit-line-clamp: 3
- -webkit-box-orient: vertical
- overflow: hidden
- height: 90px
- margin-top: 0.5rem
- word-break: break-word
+ & >.recent-post-info
+ display: inline-block
+ overflow: hidden
+ padding: 0 40px
+ width: 55%
- .article-meta
- color: $grey
+ & > .article-title
+ display: -webkit-box
+ overflow: hidden
+ margin-bottom: .3rem
+ color: $black
+ text-decoration: none
+ text-overflow: ellipsis
+ word-wrap: break-word
+ font-size: 1.2rem
+ line-height: 1.4
+ transition: all .2s ease-in-out
+ -webkit-box-orient: vertical
+ -webkit-line-clamp: 2
- .sticky
- color: $theme-button-hover-color
+ &:hover
+ color: $light-blue !important
- i
- margin: 0 0.2rem 0 0.3rem
+ & > time
+ color: $grey
- &__separator
- margin-left: 0.3rem
+ & > .article-meta
+ color: $grey
- .fa-angle-right,
- &__link
- margin: 0 0 0 0.3rem
+ .sticky
+ color: $theme-button-hover-color
- time
- color: $grey
+ i
+ margin: 0 .2rem 0 .3rem
- .article-title
- margin-bottom: 0.3rem
- color: $black
- text-decoration: none
- font-size: 1.2rem
- cursor: pointer
- transition: all 0.2s ease-in-out
- line-height: 1.4
- text-overflow: ellipsis
- display: -webkit-box
- -webkit-box-orient: vertical
- -webkit-line-clamp: 2
- overflow: hidden
- word-wrap: break-word
+ .article-meta__separator
+ margin-left: .3rem
- &:hover
- color: $light-blue !important
+ .fa-angle-right
+ margin: 0 0 0 .3rem
+ a.article-meta__categories
+ color: #858585
+ text-decoration: none
+
+ &:hover
+ color: #49b1f5 !important
+
+ & > .content
+ display: -webkit-box
+ overflow: hidden
+ margin-top: .5rem
+ height: 90px
+ word-break: break-word
+ -webkit-line-clamp: 3
+ -webkit-box-orient: vertical
+
+// tags page
.tag-cloud
- padding: 40px 44px 44px
-
a
display: inline-block
- margin: 0 0.4rem
+ padding: 0 .4rem
text-decoration: none
cursor: pointer
transition: all .3s
@@ -126,8 +138,8 @@
transform: scale(1.1)
&__title
- font-size: 1.8rem
text-align: center
+ font-size: 1.8rem
&-tags
text-align: center
@@ -135,14 +147,14 @@
#tag,
#category,
#archive
- padding: 3rem 3rem 3rem
+ padding: 3rem
+.tag-cloud,
#page,
.category-content,
.flink
padding: 40px 44px 44px
-
#page,
.category-content,
#archive,
@@ -150,16 +162,15 @@
.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%
+ border-radius: 8px
+ background: $white
+ box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
+ transition: all .3s
&:hover
- box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
-
+ box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
.article-sort
padding-left: 1rem
@@ -178,50 +189,50 @@
&:before
position: absolute
- top: 0.25rem
- left: calc(-0.5rem + 1px)
+ top: .25rem
+ left: calc(-.5rem + 1px)
z-index: 1
- width: w = 0.5rem
+ width: w = .5rem
height: h = w
- border: 0.5 * w solid $light-blue
+ border: .5 * w solid $light-blue
border-radius: w
background: $white
- content: ""
+ content: ''
line-height: h
- transition: all 0.2s ease-in-out
+ transition: all .2s ease-in-out
&:after
position: absolute
bottom: 0
left: 0
z-index: 0
- width: 0.1rem
+ width: .1rem
height: 1.3rem
background: $pale-blue
- content: ""
+ content: ''
&-item
position: relative
- margin: 0 0 1rem 0.5rem
- transition: all 0.2s ease-in-out
+ margin: 0 0 1rem .5rem
+ transition: all .2s ease-in-out
&:hover
&:before
border-color: $ruby
&:before
- $w = 0.3rem
+ $w = .3rem
position: absolute
top: 1.8rem
left: calc(-1rem - 17px)
width: w = $w
height: h = w
- border: 0.5 * w solid $light-blue
+ border: .5 * w solid $light-blue
border-radius: w
background: $white
- content: ""
+ content: ''
line-height: h
- transition: all 0.2s ease-in-out
+ transition: all .2s ease-in-out
&.year
font-size: 1rem
@@ -231,36 +242,36 @@
border-color: $light-blue
&:before
- top: 0.7rem
+ top: .7rem
border-color: $ruby
-
+
&__time
+ padding-left: .4rem
color: $a-link-color
- font-size: 0.7rem
- padding-left: 0.4rem
+ font-size: .7rem
&__title
- color: $font-black
- font-size: 0.75rem
- height: 60px
- overflow: hidden
display: -webkit-box
+ overflow: hidden
+ height: 60px
+ color: $font-black
+ font-size: .75rem
+ transition: all .3s
-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
+ width: 100%
+ height: 100%
transition: all .6s
-
+ object-fit: cover
+
&:hover
transform: scale(1.1)
@@ -272,17 +283,16 @@
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
+ width: 80px
+ height: 80px
+ &-post
+ position: absolute
+ top: 0
+ display: inline-block
+ margin-left: 1rem
.category-lists
padding: 1rem 0 1.5rem
@@ -298,19 +308,19 @@
cursor: pointer
.category-list-count
- margin-left: 0.4rem
+ margin-left: .4rem
color: $a-link-color
&:before
- content: "("
+ content: '('
&:after
- content: ")"
+ content: ')'
@media screen and (max-width: $sm)
.layout_page
padding: 0 5px !important
-
+
#page,
.category-content,
#archive,
@@ -318,39 +328,55 @@
.flink,
#tag,
#category
- padding: 1.8rem 1.3rem
margin: 0
-
+ padding: 1.8rem 1.3rem
+
.category-lists
padding: 0
-
- #recent-posts
+
+ #recent-posts
.recent-post-item
+ flex-direction: column
height: auto !important
- .post_cover
- width: 100%
- height: 230px
+ .post_cover
+ order: 1 !important
+ width: 100%
+ height: 230px
border-radius: 8px 8px 0 0
- .recent-post-info
- padding: 30px 25px 18px!important
+ .recent-post-info
+ order: 2 !important
+ padding: 30px 25px 18px !important
width: 100%
-
+
.article-title
font-size: 1rem
-
+
.article-meta.tags
display: none
&:first-child
margin: 0
-@media screen and (min-width: 900px)
- if hexo-config("aside.position") == "left"
- #recent-posts,#page,.category-content,#archive,.tag-cloud,.flink,#tag,#category
+@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
\ No newline at end of file
+@media screen and (max-width: 900px)
+ #page,
+ .category-content,
+ #archive,
+ .tag-cloud,
+ .flink,
+ #tag,
+ #category
+ width: 100% !important
\ No newline at end of file
diff --git a/source/css/_layout/pagination.styl b/source/css/_layout/pagination.styl
index fb20f71..0a4188c 100644
--- a/source/css/_layout/pagination.styl
+++ b/source/css/_layout/pagination.styl
@@ -5,12 +5,13 @@
.pagination
text-align: center
+
.space
color: $a-link-color
.page-number
display: inline-block
- margin: 0 0.2rem
+ margin: 0 .2rem
min-width: w = 1.2rem
height: w
text-align: center
@@ -25,90 +26,76 @@
img.prev_cover,
img.next_cover
position: absolute
- padding: 0
top: 0
left: 0
+ padding: 0
width: 100%
height: 100%
- opacity: .4
background-size: cover
- transition: all 0.6s;
- object-fit: cover
+ opacity: .4
+ transition: all .6s
pointer-events: none
+ object-fit: cover
- .prev_info
- position: absolute
- z-index: 100
- font-weight: 400
- width: 70%
- color: #fff
- overflow: hidden
- white-space: nowrap
- -o-text-overflow: ellipsis
- text-overflow: ellipsis
- display: block
- bottom: 50px
-
+ .prev_info,
.next_info
position: absolute
- z-index: 100
- font-weight: 400
- width: 70%
- color: #fff
- overflow: hidden
- white-space: nowrap
- -o-text-overflow: ellipsis
- text-overflow: ellipsis
- display: block
- right: 40px
bottom: 50px
+ z-index: 100
+ display: block
+ overflow: hidden
+ width: 70%
+ color: $white
+ text-overflow: ellipsis
+ white-space: nowrap
+ font-weight: 400
+
+ .next_info
+ right: 40px
text-align: right
.pull-full
width: 100% !important
- .prev-post .label
- position: absolute
- top: 50px
- z-index: 100
- font-size: 13px
- display: block
- text-transform: uppercase
- color: rgba(255,255,255,.7)
-
+ .prev-post .label,
.next-post .label
position: absolute
top: 50px
- right: 40px
z-index: 100
display: block
+ color: alpha($white, .9)
text-transform: uppercase
- color: rgba(255,255,255,.7)
+ font-size: 90%
- .prev-post, .next-post
- width: 50%
+ .next-post .label
+ right: 40px
+
+ .prev-post,
+ .next-post
float: left
+ width: 50%
a
- width: 100%
- height: 150px
- padding: 55px 40px
- text-align: left
position: relative
display: block
float: left
overflow: hidden
+ padding: 55px 40px
+ width: 100%
+ height: 150px
+ text-align: left
&:hover
- img.prev_cover, img.next_cover
+ img.prev_cover,
+ img.next_cover
opacity: .8
- transform:scale(1.1)
+ transform: scale(1.1)
-
-@media screen and (max-width:768px)
- .prev-post, .next-post
- width: 100% !important
-
-.pagination_post
+ &.pagination_post
margin: 2rem 0 !important
- background: #000
\ No newline at end of file
+ background: $dark-black
+
+@media screen and (max-width: 768px)
+ .prev-post,
+ .next-post
+ width: 100% !important
diff --git a/source/css/_layout/post.styl b/source/css/_layout/post.styl
index 30f912f..215bf7b 100644
--- a/source/css/_layout/post.styl
+++ b/source/css/_layout/post.styl
@@ -1,119 +1,81 @@
-if hexo-config("post_beautify.enable")
+if hexo-config('post_beautify.enable')
headStyle(fontsize)
- padding-left: unit(fontsize + 0.3, "rem")
-
- code
- font-size: unit(fontsize, "rem")
+ padding-left: unit(fontsize + .3, 'rem')
+
+ code
+ font-size: unit(fontsize, 'rem')
&:before
- top: calc(50% - unit(fontsize / 2 - 0.05, "rem"))
- font-size: unit(fontsize, "rem")
+ top: calc(50% - unit(fontsize / 2 - .05, 'rem'))
+ font-size: unit(fontsize, 'rem')
&:hover
- padding-left: unit(fontsize + 0.2, "rem")
-
-
-#post-title
- font-size: 1.4rem
-
-#post
- overflow: hidden
-
- &-meta
- text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
-
- #post-meta
- color: $grey
-
- a
- text-decoration: none
-
- i.fa.fa-comment-o
- margin-right: 0.2rem
+ padding-left: unit(fontsize + .2, 'rem')
#top-container
position: relative
margin-bottom: 1rem
+ height: 19rem
background-color: $light-blue
background-attachment: local
background-position: center
background-size: cover
- height: 19rem
&:before
position: absolute
top: 0
left: 0
display: block
- content: ''
width: 100%
height: 100%
- background-color: alpha($dark-black,0.5)
+ background-color: alpha($dark-black, .5)
+ content: ''
a
color: $light-grey
text-decoration: none
- transition: all 0.3s ease-out
+ transition: all .3s ease-out
&:hover
- color: $white
+ text-decoration: underline
- #top-img
- padding: 0
- border: none
-
- #site-name
- font-weight: bold
- cursor: pointer
-
- #post-info
+ & > #post-info
+ position: absolute
+ bottom: 1.5rem
+ padding: 0 8%
width: 100%
color: $light-grey
text-align: left
- padding: 0 8%
- position: absolute
- bottom: 1.5rem
- #post-title
- text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
- font-size: 1.5rem
- margin-bottom: 0.4rem
+ #post-title
+ margin-bottom: .4rem
+ font-size: 1.5rem
- .posttitle
- line-height: 1.5
+ .posttitle
+ display: -webkit-box
+ overflow: hidden
+ line-height: 1.5
+ -webkit-line-clamp: 3
+ -webkit-box-orient: vertical
- i.fa.fa-angle-right
- margin: 0 0.3rem 0 0.2rem
+ #post-meta
+ .word-count,
+ #busuanzi_value_page_pv,
+ .comment-count
+ padding-left: .2rem
-.post-meta
- &__separator
- margin: 0 0.3rem
+ .post-meta
+ &__separator
+ margin: 0 .3rem
- &__icon
- margin-right: 0.2rem
-
- &__tags
- display: inline-block
- width: fit-content
- margin: 0.4rem 0.4rem 0.4rem 0
- padding: 0rem 0.6rem
- border: 1px solid $light-blue
- border-radius: 0.6rem
- background: $white
- color: $light-blue
- text-decoration: none
- font-size: 12px
- cursor: pointer
- transition: all 0.2s ease-in-out
-
- &:hover
- background: $light-blue
- color: $white
+ &__icon
+ margin-right: .2rem
+ &-pv-cv
+ display: inline-block
#post-content
-
- if hexo-config("post_beautify.enable")
+ if hexo-config('post_beautify.enable')
h1,
h2,
h3,
@@ -121,17 +83,17 @@ if hexo-config("post_beautify.enable")
h5,
h6
cursor: pointer
- transition: all 0.2s ease-out
+ transition: all .2s ease-out
&:before
position: absolute
- top: calc(50% - 0.35rem)
+ top: calc(50% - .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
+ font-size: .8rem
+ transition: all .2s ease-out
&:hover
padding-left: 1.1rem
@@ -143,38 +105,38 @@ if hexo-config("post_beautify.enable")
headStyle(1)
h2
- headStyle(0.9)
+ headStyle(.9)
h3
- headStyle(0.8)
+ headStyle(.8)
h4
- headStyle(0.7)
+ headStyle(.7)
h5
- headStyle(0.6)
+ headStyle(.6)
h6
- headStyle(0.6)
+ headStyle(.6)
ol,
ul
- margin-top: 0.4rem
- padding: 0 0 0 0.8rem
+ margin-top: .4rem
+ padding: 0 0 0 .8rem
list-style: none
counter-reset: li
p
- margin: 0
+ margin: 0 0 .5rem
ol,
ul
- padding-left: 0.5rem
+ padding-left: .5rem
li
position: relative
- margin: 0.2rem 0
- padding: 0.1rem 0.5rem 0.1rem 1.5rem
+ margin: .2rem 0
+ padding: .1rem .5rem .1rem 1.5rem
&:hover
&:before
@@ -187,19 +149,19 @@ if hexo-config("post_beautify.enable")
background: $light-blue
color: $white
cursor: pointer
- transition: all 0.3s ease-out
+ transition: all .3s ease-out
ol
> li
&:before
- margin-top: 0.2rem
+ margin-top: .2rem
width: w = 1.2rem
height: h = w
- border-radius: 0.5 * w
+ border-radius: .5 * w
content: counter(li)
counter-increment: li
text-align: center
- font-size: 0.6rem
+ font-size: .6rem
line-height: h
ul
@@ -209,38 +171,37 @@ if hexo-config("post_beautify.enable")
border-color: $ruby
&:before
- $w = 0.3rem
+ $w = .3rem
top: 10px
- margin-left: 0.45rem
+ margin-left: .45rem
width: w = $w
height: h = w
- border: 0.5 * w solid $light-blue
+ border: .5 * w solid $light-blue
border-radius: w
background: $white
- content: ""
+ content: ''
line-height: h
-
else
ol,
ul
- margin-top: 0.4rem
+ margin-top: .4rem
counter-reset: li
p
- margin: 0
+ margin: 0 0 .5rem
ol,
ul
- padding-left: 0.5rem
+ padding-left: .5rem
li
position: relative
- margin: 0.3rem 0
- padding-left: 0.3rem
+ margin: .3rem 0
+ padding-left: .3rem
a
color: $a-link-color
- transition: all 0.2s
+ transition: all .2s
&:hover
color: $light-blue
@@ -260,206 +221,209 @@ a.fancybox
text-align: center
text-decoration: none
+p
+ margin: 0 0 .8rem
+
img
- padding: $img-border-padding
max-width: 100%
- transition: all 0.2s
+ transition: all .2s
- &:hover
- box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5)
-
-.code-area-wrap
- position: relative
-
-.fa-clipboard
- position: absolute
- top: 0.4rem
- right: 10px
- z-index: 1
- color: $highlight-aqua
- cursor: pointer
- transition: color 0.2s
-
- &:hover
- 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
- position: absolute
- top: 0
- right: 0
- z-index: 1
- background: darken($highlight-background, 5)
- color: $highlight-aqua
- opacity: 0
-
-.post-copyright
- position: relative
- margin: 1rem 0 0.5rem 0
- padding: 0.5rem 0.8rem
- border: 1px solid $light-grey
- transition: box-shadow 0.3s ease-in-out
-
- &:before
+// highlight
+.highlight-tools
+ .code-expand
position: absolute
- top: t = 0.5rem
- right: t
- width: w = 0.8rem
- height: w
- border-radius: w
- background: $light-blue
- content: ""
+ top: 0
+ z-index: 1
+ padding: 7px 10px
+ color: $highlight-foreground
+ cursor: pointer
+ transition: all .3s
+ transform: rotate(0)
- &:after
+ & + .code_lang
+ left: 30px
+
+ &.code-closed
+ transition: all .3s
+ transform: rotate(-90deg) !important
+
+ .code_lang
position: absolute
- top: t = 0.7rem
- right: t
- width: w = 0.4rem
- height: w
- border-radius: w
- background: $white
- content: ""
-
- &:hover
- box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5)
-
- &-meta
- color: $light-blue
+ left: 15px
+ z-index: 1
+ color: $highlight-foreground
+ text-transform: capitalize
font-weight: bold
+ font-size: .8rem
+ line-height: 1.4rem
+ cursor: pointer
- &-info
- a
- word-break: break-word
+ .copy-notice
+ position: absolute
+ top: 0
+ right: 0
+ z-index: 1
+ background: darken($highlight-background, 5)
+ color: $highlight-aqua
+ opacity: 0
+ .fa-clipboard
+ position: absolute
+ top: .4rem
+ right: 10px
+ z-index: 1
+ color: $highlight-aqua
+ cursor: pointer
+ transition: color .2s
-@media screen and (max-width: $sm)
- #top-container
- #post-title
- font-size: 1rem
-
- #post-title
- font-size: 1.1rem
-
+ &:hover
+ color: darken($highlight-aqua, 20%)
@media screen and (min-width: $md)
.layout_post
width: $content-large-width
-
+
.katex-wrap
overflow: auto
- if hexo-config("katex") && hexo-config("katex.hide_scrollbar")
+
+ if hexo-config('katex') && hexo-config('katex.hide_scrollbar')
&::-webkit-scrollbar
display: none
-
-// 文章字體
-#post-content p
- font-size: 1.1em
-
-
-#post-content ol,
-#post-content ul
- font-size: 1em
-
-
-
-.layout_post
- padding: 50px
- box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06)
- border-radius: 8px
- transition: all 0.3s
- background: #fff
+.layout_post
margin: 40px auto
+ padding: 50px
max-width: 1000px
+ border-radius: 8px
+ background: #fff
+ box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
+ transition: all .3s
+
+ &:hover
+ box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
- &:hover
- box-shadow: 0 4px 12px 12px rgba(7,17,27,0.15)
-
img
- display:block
-
- .tag_share
display: block
- .post-meta__tag-list
- display: inline-block
+ & >.tag_share
+ .post-meta
+ &__tag-list
+ display: inline-block
+
+ &__tags
+ display: inline-block
+ margin: .4rem .4rem .4rem 0
+ padding: 0 .6rem
+ width: fit-content
+ border: 1px solid $light-blue
+ border-radius: .6rem
+ background: $white
+ color: $light-blue
+ text-decoration: none
+ font-size: 12px
+ cursor: pointer
+ transition: all .2s ease-in-out
+
+ &:hover
+ background: $light-blue
+ color: $white
.post_share
- width: fit-content;
- display: inline-block;
- float: right;
- margin: 0.4rem 0
+ display: inline-block
+ float: right
+ margin: .4rem 0
+ width: fit-content
.social-share
font-size: 12px
- .social-share .social-share-icon
- width: 26px;
- height: 26px;
- font-size: 15px;
- line-height: 25px;
+ .social-share-icon
+ margin: 0 4px
+ width: 26px
+ height: 26px
+ font-size: 15px
+ line-height: 25px
- .social-share a
- margin: 0 4px;
-
+ & > .post-copyright
+ position: relative
+ margin: 2rem 0 .5rem
+ padding: .5rem .8rem
+ border: 1px solid $light-grey
+ transition: box-shadow .3s ease-in-out
+
+ &:before
+ position: absolute
+ top: t = .5rem
+ right: t
+ width: w = .8rem
+ height: w
+ border-radius: w
+ background: $light-blue
+ content: ''
+
+ &:after
+ position: absolute
+ top: t = .7rem
+ right: t
+ width: w = .4rem
+ height: w
+ border-radius: w
+ background: $white
+ content: ''
+
+ &:hover
+ box-shadow: 0 0 8px 0 rgba(232, 237, 250, .6), 0 2px 4px 0 rgba(232, 237, 250, .5)
+
+ .post-copyright
+ &-meta
+ color: $light-blue
+ font-weight: bold
+
+ &-info
+ padding-left: .3rem
+
+ a
+ word-break: break-word
#post
a
- text-decoration: none
color: $light-blue
-
- h1,
- h2,
- h3,
- h4,
- h5,
- h6
- margin: 1rem 0 0.8rem 0
-
+ text-decoration: none
+
+ &:hover
+ text-decoration: underline
+
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
+ margin: .8rem auto
@media screen and (max-width: 1024px)
.layout_post
margin: 0 15px
width: auto
-@media screen and (max-width:768px)
+@media screen and (max-width: $sm)
.layout_post
+ margin: 0 5px
padding: 1.8rem 1rem
- margin: 0px 5px
+
+ #top-container
+ height: 18rem
+
+ & > #post-info
+ bottom: 1rem
+ padding: 0 5%
+
+ & > #post-title
+ font-size: 1.2rem
+
+ & > #post-meta
+ font-size: 90%
+
+ & > span
+ display: none
+
+ .post-meta-pv-cv
+ display: block
+
+ .post-meta__separator:first-child
+ display: none
diff --git a/source/css/_layout/readmode.styl b/source/css/_layout/readmode.styl
index 1fb2bb7..6bb584c 100644
--- a/source/css/_layout/readmode.styl
+++ b/source/css/_layout/readmode.styl
@@ -1,117 +1,93 @@
-if hexo-config("readmode") && hexo-config("readmode.enable")
+if hexo-config('readmode') && hexo-config('readmode.enable')
.read-mode
- background: $pale-yellow
padding: 0 !important
-
- #sidebar,
- #toggle-sidebar
- display: none
+ background: $pale-yellow
#page-header
#site-name,
- .site-page,
- .toggle-menu
- text-shadow: none
+ .site-page
color: $font-black
-
- .menus_item_child
- background-color: darken($pale-yellow,5) !important
+ text-shadow: none
- &:before
- border-color: transparent transparent darken($pale-yellow,5) !important
+ .menus_item_child
+ background-color: darken($pale-yellow, 3) !important
+
+ & > li
+ &:hover
+ background-color: darken($pale-yellow, 10) !important
#top-container
- background-image: none !important
height: 14rem
background-color: $pale-yellow
+ background-image: none !important
a
color: $font-black
&:before
opacity: 0
-
- #post-info
- text-align: center
+
+ & > #post-info
padding: 0
color: $font-black
-
- #post-title,
- #post-meta
- text-shadow: none
-
+ text-align: center
+
#page-header
&.fixed
- background: alpha(darken($pale-yellow,5),0.5)
+ background: alpha(darken($pale-yellow, 5), .5)
box-shadow: none
&.open-sidebar
.site-page
- display: inline-block
- opacity: 1
-
+ visibility: visible
.layout_post
- box-shadow: none
background: $pale-yellow
+ box-shadow: none
&:hover
box-shadow: none
-
- .article-container
+
+ .article-container
pre,
- .highlight
- background: darken($pale-yellow,5);
-
- .highlight
- &:after
- background: darken($pale-yellow,10);
- table
- &:after
- background: darken($pale-yellow,10);
-
-
+ .highlight:not(.js-file-line-container)
+ background: darken($pale-yellow, 5)
+
+ .highlight
+ display: block !important
+
blockquote
- border-left: 0.2rem solid #d6dbdf
- background-color: rgba(102,128,153,.05)
-
+ border-left: .2rem solid #d6dbdf
+ background-color: rgba(102, 128, 153, .05)
+
#rightside
#darkmode
display: none
-
- canvas
+
+ & > canvas
display: none !important
-
+
+ .code-area-wrap > .highlight-tools,
+ #sidebar,
+ #toggle-sidebar,
#footer,
- #post-comment,
- hr,
- .relatedPosts,
- #pagination,
- .post-reward,
- .tag_share,
- .post-copyright
+ .layout_post > div,
+ .layout_post > hr,
+ .layout_post > nav
display: none
-
+
+ hr
+ border: 2px dashed #d6dbdf
+ background: transparent
+
+ &:before
+ color: darken(#d6dbdf, 10)
+
&::-webkit-scrollbar-thumb
- background: darken($pale-yellow,15)
+ background: darken($pale-yellow, 10)
*::-webkit-scrollbar-thumb
- background: darken($pale-yellow,15)
-
- .copy-notice
- background: darken($pale-yellow,10)
+ background: darken($pale-yellow, 10)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+ #web_bg
+ background: none
diff --git a/source/css/_layout/relatedposts.styl b/source/css/_layout/relatedposts.styl
index 3ac59c4..bd8ac42 100644
--- a/source/css/_layout/relatedposts.styl
+++ b/source/css/_layout/relatedposts.styl
@@ -1,75 +1,74 @@
.relatedPosts
- margin: 0 auto
- padding: 0
- margin-top: 1rem
- width: 100%
+ margin: 0 auto
+ margin-top: 1rem
+ padding: 0
+ width: 100%
- .relatedPosts_item
- width: calc(100%/3 - 10px)
- height: 200px
- overflow: hidden
- float: left
- position: relative
- margin: 5px
- background: #000
+.relatedPosts_item
+ position: relative
+ float: left
+ overflow: hidden
+ margin: 5px
+ width: calc(100% / 3 - 10px)
+ height: 200px
+ background: $dark-black
- &:hover
- .relatedPosts_cover
- opacity: .8
- transform:scale(1.1)
+ &:hover
+ .relatedPosts_cover
+ opacity: .8
+ transform: scale(1.1)
+ a
+ text-decoration: none
- .relatedPosts_cover
- border: 0
- transition: all 0.6s
+.relatedPosts_cover
+ position: absolute
+ display: block
+ margin: 0
+ padding: 0
+ width: 100%
+ height: 100%
+ border: 0
+ opacity: .4
+ transition: all .6s
+ object-fit: cover
+
+.relatedPosts_main
+ position: relative
+ display: flex
+ flex-direction: column
+ justify-content: center
+ margin: 0
+ padding: 0 1rem
+ height: 100%
+ color: $white
+
+ .relatedPosts_date
display: block
- width: 100%
- height: 100%
- padding: 0
- opacity: 0.4
- margin: 0
- object-fit: cover
+ color: alpha($white, .9)
+ font-size: 90%
.relatedPosts_title
- color: #fff
- position: absolute
- left: 0
- right: 0
- top: 45%
- height: 60px
- padding: 0 30px
display: -webkit-box
+ overflow: hidden
+ max-height: 60px
-webkit-line-clamp: 2
-webkit-box-orient: vertical
- overflow: hidden
- max-width: 100%
- width: 100%
- margin: 0 auto
- text-align: center
- .relatedPosts_headline
- font-size: 20px
- font-weight: 700
- margin-bottom: 5px
+.relatedPosts_headline
+ margin-bottom: 5px
+ font-weight: 700
+ font-size: 20px
- .clear_both
- clear: both
+.clear_both
+ clear: both
-
-@media screen and (max-width:768px)
+@media screen and (max-width: 768px)
.relatedPosts_item
- width: calc(100%/2 - 4px)
- height: 150px
margin: 2px
-
- .relatedPosts_title
- top: 40%
+ width: calc(100% / 2 - 4px)
+ height: 150px
-@media screen and (max-width:480px)
+@media screen and (max-width: 480px)
.relatedPosts_item
width: calc(100% - 4px)
- height: 150px
- margin: 2px
-
- .relatedPosts_title
- top: 40%
\ No newline at end of file
diff --git a/source/css/_layout/reward.styl b/source/css/_layout/reward.styl
index 6f6ac30..44244d1 100644
--- a/source/css/_layout/reward.styl
+++ b/source/css/_layout/reward.styl
@@ -1,72 +1,74 @@
.post-reward
- position: relative
- width: 100%
margin: 75px auto 0
+ width: 100%
text-align: center
- display: block
.reward-button
- text-align: center
+ position: relative
+ z-index: 1
display: inline-block
- cursor: pointer
- color: #fff
- line-height: 36px
+ width: 100px
background: $light-blue
- width: 80px
-
+ color: $white
+ text-align: center
+ line-height: 36px
+ cursor: pointer
+
&:hover
- background: darken($light-blue,30)
-
.reward-main
display: block
-
.reward-main
position: absolute
bottom: 40px
+ left: 0
+ display: none
margin: 0
padding: 0 0 15px
width: 100%
- left: 0
- transition: all 0.6s
- display: none
- opacity: 1
-
+ transition: all .6s
+
.reward-all
- margin: 0 auto
- padding: 20px 10px 8px
- background: #f5f5f5
display: inline-block
+ margin: 0 0 0 -110px
+ padding: 20px 10px 8px
+ width: 320px
border-radius: 4px
- cursor: auto
+ background: #f5f5f5
+
+ &:before
+ position: absolute
+ bottom: -10px
+ left: 0
+ width: 100%
+ height: 20px
+ content: ''
&:after
- content: ""
- width: 0
- height: 0
- border-left: 13px solid transparent
- border-right: 13px solid transparent
- border-top: 13px solid #f5f5f5
position: absolute
+ right: 0
bottom: 2px
left: 0
- right: 0
margin: 0 auto
+ width: 0
+ height: 0
+ border-top: 13px solid #f5f5f5
+ border-right: 13px solid transparent
+ border-left: 13px solid transparent
+ content: ''
.reward-item
- list-style-type: none
- padding: 0 8px
display: inline-block
+ padding: 0 8px
+ list-style-type: none
img
- width: 130px
- max-width: 130px
- border-radius: 3px
position: relative
+ max-width: 130px
+ width: 130px
+ border-radius: 3px
.post-qr-code__desc
- text-align: center
- margin: -10px 0
+ margin: -5px 0
color: #858585
-
-
+ text-align: center
diff --git a/source/css/_layout/rightside.styl b/source/css/_layout/rightside.styl
index 504de41..f75903c 100644
--- a/source/css/_layout/rightside.styl
+++ b/source/css/_layout/rightside.styl
@@ -1,63 +1,61 @@
-#rightside
- right: -38px
+#rightside
position: fixed
+ right: -38px
bottom: 40px
- transition: all .3s
- opacity 0
+ opacity: 0
+ transition: all .5s
#rightside-config-hide
- display none
+ transform: translate(35px, 0)
- #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
+ .rightside-in
+ transform: translate(0, 0) !important
+ animation: rightsideIn .3s
+
+ .rightside-out
+ animation: rightsideOut .3s
+
+ & > div
+ & > i,
+ & > a,
+ & > div
+ display: block
+ margin-bottom: 2px
+ width: 30px
+ height: 30px
+ background-color: $light-blue
+ color: $white
+ text-align: center
+ text-decoration: none
+ font-size: 16px
+ line-height: 29px
+ cursor: pointer
+
+ &:hover
+ background-color: $ruby
- &: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
+ #rightside
#mobile-toc-button
display: block
-
+@keyframes rightsideIn
+ 0%
+ transform: translate(30px, 0)
+
+ 100%
+ transform: translate(0, 0)
+
+@keyframes rightsideOut
+ 0%
+ transform: translate(0, 0)
+
+ 100%
+ transform: translate(30px, 0)
diff --git a/source/css/_layout/sidebar.styl b/source/css/_layout/sidebar.styl
index 16e17f6..45b73db 100644
--- a/source/css/_layout/sidebar.styl
+++ b/source/css/_layout/sidebar.styl
@@ -4,35 +4,34 @@
left: -300px
z-index: 10
overflow-y: auto
- padding: 1rem 0 2rem 0.5rem
+ padding: 1rem 0 2rem .5rem
width: $sidebar-width
height: 100%
background: $sidebar-background
- box-shadow: -0.25rem 0 0.25rem rgba(232, 237, 250, 0.6) inset
- opacity: 0.9
- will-change: transform
- transition: ease-in-out .2s
-
+ box-shadow: -.25rem 0 .25rem rgba(232, 237, 250, .6) inset
+ opacity: .9
+ transition: ease-in-out .4s
+
.sidebar-toc
ol,
li
list-style: none
ol
- margin-top: 0.2rem
- padding-left: 0.4rem
+ margin-top: .2rem
+ padding-left: .4rem
&__title
- padding-right: 0.5rem
+ padding-right: .5rem
text-align: center
- font-size: unit(0.9 * $rem, "px")
+ font-size: unit(.9 * $rem, 'px')
.toc-link
display: block
- padding-left: 0.2rem
+ padding-left: .2rem
border-right: 3px solid transparent
text-decoration: none
- transition: all 0.2s ease-in-out
+ transition: all .2s ease-in-out
&.active
border-right-color: darken($cyan, 20%)
@@ -41,21 +40,18 @@
&__progress
position: relative
- margin-top: -0.3rem
- padding-left: 0.6rem
+ margin-top: -.3rem
+ padding-left: .6rem
color: $cyan
.progress-notice
- margin-right: 0.4rem
+ margin-right: .4rem
.progress-num
display: inline-block
- min-width: 0.9rem
+ min-width: .9rem
&-bar
width: 0
height: 1px
background: $cyan
-
-
-
diff --git a/source/css/_layout/z-darkmode.styl b/source/css/_layout/z-darkmode.styl
index 9bbd62c..3411bb3 100644
--- a/source/css/_layout/z-darkmode.styl
+++ b/source/css/_layout/z-darkmode.styl
@@ -1,303 +1,356 @@
-[data-theme="dark"]
- body
- color: #99a9bf
- background-color: #2d3032
+if hexo-config('darkmode.enable') || hexo-config('autoChangeMode') == '1' || hexo-config('autoChangeMode') == '2'
+ [data-theme='dark']
+ body
+ background-color: darken(#121212, 2)
+ color: alpha(#FFFFFF, .6)
- &::-webkit-scrollbar-thumb
- background: lighten(#2d3035,5)
+ ::-webkit-scrollbar-thumb
+ background: lighten(#121212, 5)
- #sidebar
- background: #2d3035
- box-shadow: -0.25rem 0 0.25rem #2d3035
+ // 網站背景,footer背景
+ #web_bg[data-type=color],
+ #footer[data-type=color]
+ background: darken(#121212, 2)
- &::-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
- background: #2d3035
-
- #nav,
- #top-container
- &::before
- content: ""
+ #web_bg[data-type=photo]:before,
+ #footer[data-type=photo]:before
position: absolute
- top: 0
- bottom: 0
- left: 0
- right: 0
- background-color: alpha($dark-black,0.7)
+ width: 100%
+ height: 100%
+ background-color: alpha($dark-black, .7)
+ content: ''
- #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)
+ #archive,
+ .tag-cloud,
+ #tag,
+ .category-content,
+ #category,
+ #page,
+ .flink,
+ .layout_post
+ background: #121212
- .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
+ #sidebar
+ background: #121212
+ box-shadow: -.25rem 0 .25rem #121212
- .article-sort-item__title
- color: #99a9bf
- &:hover
- color: #49b1f5
+ .article-container code
+ background: #2c2c2c
- //打賞 分享
- .post-reward
- .reward-all:after
- border-top: 13px solid lighten(#2d3035,10) !important
-
+ .recent-posts
+ .recent-post-item
+ background: #121212 !important
- #web_bg[data-type=color],
- #footer[data-type=color]
- background: #2d3032
+ .article-title
+ color: alpha(#FFFFFF, .8) !important
- #web_bg[data-type=photo]:before,
- #footer[data-type=photo]:before
- background-color: alpha($dark-black,0.7)
+ #page-header
+ &.fixed
+ background: #121212
+ box-shadow: 0 5px 6px -5px rgba(133, 133, 133, 0)
- #hexo-blog-encrypt
- label,input
- color: #99a9bf !important
- input
- background-color: #2d3035
+ .toggle-menu,
+ #site-name,
+ a
+ color: alpha(#FFFFFF, .8)
+ .menus_item_child
+ background-color: lighten(#121212, 5) !important
- #mobile-sidebar
- #mobile-sidebar-menus
- background: #2d3035
+ li
+ &:hover
+ background: lighten(#121212, 20)
- .headline
- color: #99a9bf !important
-
- .length_num
- color: darken(#99a9bf,10) !important
- a
- color: #99a9bf !important
+ a
+ color: alpha(#FFFFFF, .6)
- #mobile-sidebar-toc
- background: #2d3035
- a
- color: #99a9bf !important
+ // 代碼框
+ .article-container pre,
+ .article-container pre code
+ background-color: lighten(#121212, 2)
- #page-header
- .menus_item_child
- background-color: #2d3035 !important
+ .highlight-tools
+ background: lighten(#121212, 3)
+
+ .article-container .highlight:not(.js-file-line-container)
+ background-color: lighten(#121212, 2)
+
+ .code pre,
+ .gutter pre
+ background-color: lighten(#121212, 2)
+
+ table
+ .copy-notice
+ background: lighten(#121212, 3)
+
+ .copy-notice
+ background: lighten(#121212, 3)
+
+ blockquote
+ background-color: lighten(#121212, 10)
+ color: alpha(#FFFFFF, .6)
+
+ hr
+ border: 2px dashed alpha(#FFFFFF, .3)
+ background: 0
&:before
- border-color: transparent transparent #2d3035 !important
+ color: alpha(#FFFFFF, .6)
+
+ .layout_post >.tag_share .post-meta__tags
+ border: 1px solid alpha(#FFFFFF, .6)
+ background: 0
+ color: alpha(#FFFFFF, .6)
+
+ &:hover
+ background: darken(#FFFFFF, 60)
+
+ // 文章版權
+ .post-copyright
+ border: 1px solid alpha(#FFFFFF, .6)
+
+ .post-copyright-meta
+ color: alpha(#FFFFFF, .8)
+
+ .post-copyright-info
+ color: alpha(#FFFFFF, .6)
+
+ // 音樂播放器
+ .aplayer
+ filter: brightness(.7)
+ color: #000000
+
+ // 右下角按鈕
+ #rightside
+ & > div
+ & > i,
+ & > a,
+ & > div
+ background-color: lighten(#121212, 5) !important
+ color: alpha(#FFFFFF, .6) !important
+
+ &:hover
+ background: lighten(#121212, 20) !important
+
+ // 打賞按鈕
+ .post-reward
+ .reward-button
+ background-color: lighten(#121212, 10) !important
+
+ .reward-all
+ background-color: lighten(#121212, 10) !important
+
+ &:after
+ border-top: 13px solid lighten(#121212, 10) !important
+
+ .md-links-item:before,
+ .aside-category-list:hover,
+ .archive-list-item:hover,
+ #bookmark-it
+ background-color: lighten(#121212, 10) !important
+
+ img,
+ iframe,
+ .gist
+ filter: brightness(.7)
+
+ // 側邊欄
+ #aside_content
+ .card-widget
+ background: #121212 !important
+
+ .headline,
+ .length_num,
+ .aside-post_title,
+ .aside-category-list_link,
+ .archive-list-link,
+ .social-icon
+ color: alpha(#FFFFFF, .6) !important
+
+ .button--animated:before
+ background: lighten(#121212, 20) !important
+
+ // 頭部
+ #nav,
+ #top-container
+ &::before
+ position: absolute
+ top: 0
+ right: 0
+ bottom: 0
+ left: 0
+ background-color: alpha($dark-black, .7)
+ content: ''
+
+ #nav span,
+ #nav i,
+ #page-header a,
+ #page-header .toggle-menu,
+ #top-container #post-meta,
+ #top-container a,
+ #footer-wrap,
+ #footer-wrap a
+ color: alpha(#FFFFFF, .6)
+
+ .posttitle,
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
+ color: alpha(#FFFFFF, .8)
+
+ .recent-posts .post-meta__date,
+ .recent-posts .article-meta,
+ .recent-posts .article-meta__categories,
+ .post-reward .reward-button,
+ .fa-clipboard,
+ .gutter pre,
+ #bookmark-it,
+ .copy-notice,
+ .md-links-item a,
+ .category-list-link,
+ .relatedPosts_date,
+ .prev-post .label,
+ .next-post .label
+ color: alpha(#FFFFFF, .6) !important
+
+ .prev_info,
+ .next_info,
+ .relatedPosts_title
+ color: alpha(#FFFFFF, .8) !important
+
+ // 時間軸界面
+ .article-sort-item__title
+ color: alpha(#FFFFFF, .6)
+
+ &:hover
+ color: #49b1f5
+
+ // 手機 MENU,TOC
+ #mobile-sidebar
+ #mobile-sidebar-menus
+ background: #121212
+
+ .headline
+ color: alpha(#FFFFFF, .6) !important
+
+ .length_num
+ color: alpha(#FFFFFF, .8) !important
- li
a
- color: #99a9bf
-
- .bookmark--animated:before
- background: lighten(#2d3035,20) !important
-
- if hexo-config('gitalk') && hexo-config('gitalk.enable')
- #gitalk-container
- .gt-header-textarea
- background-color: #2d3035 !important
- color: #99a9bf
- border: 1px solid #99a9bf
- .gt-comment-content
- filter: brightness(0.7)
+ color: alpha(#FFFFFF, .6) !important
-
+ #mobile-sidebar-toc
+ background: #121212
+ a
+ color: alpha(#FFFFFF, .6) !important
+ // note
+ if hexo-config('note.style') == 'modern'
+ .note
+ filter: brightness(.7)
+ if hexo-config('note.style') == 'flat'
+ .note
+ filter: brightness(.7)
+ color: #4c4948
+ // 第三方
+ // 插件 hexo-blog-encrypt
+ #hexo-blog-encrypt
+ label,
+ input
+ color: alpha(#FFFFFF, .6) !important
-
+ input
+ background-color: #121212
+ if hexo-config('gitalk') && hexo-config('gitalk.enable')
+ #gitalk-container
+ .gt-header-textarea,
+ .gt-header-preview,
+ .gt-comment-content,
+ button,
+ .gt-popup
+ filter: brightness(.7)
+ svg
+ fill: alpha(#FFFFFF, .6) !important
+ 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: alpha(#FFFFFF, .6) !important
+ .vsys
+ background: rgb(97, 106, 107) !important
+ .vbtn
+ border: 1px solid alpha(#FFFFFF, .6)
+ background: rgb(45, 48, 53) !important
+ color: alpha(#FFFFFF, .6) !important
+ .vwrap
+ border: 1px solid alpha(#FFFFFF, .6)
+ input
+ border-bottom: 1px dashed #616a6b
+
+ .vh
+ border-bottom: 1px dashed #616a6b
+
+ pre
+ border: 1px solid alpha(#FFFFFF, .6)
+ background-color: #121212
+
+ code
+ background: transparent
+
+ code
+ background-color: #2c2c2c
+ color: alpha(#FFFFFF, .6)
+
+ .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)
+
+ if hexo-config('local_search') && hexo-config('local_search.enable')
+ #local-search
+ background: #121212
+
+ .local-search-box--input
+ background: #121212
+ color: alpha(#FFFFFF, .6)
+
+ .search-result-title
+ color: alpha(#FFFFFF, .6)
+
+ if hexo-config('algolia_search.enable')
+ #algolia-search
+ background: #121212
+
+ .ais-search-box--input
+ background: #121212
+ color: alpha(#FFFFFF, .6)
+
+ #algolia-search-results
+ .algolia-hit-item-link
+ color: alpha(#FFFFFF, .6)
diff --git a/source/css/_search/algolia.styl b/source/css/_search/algolia.styl
index e05d099..c76793a 100644
--- a/source/css/_search/algolia.styl
+++ b/source/css/_search/algolia.styl
@@ -1,5 +1,5 @@
#algolia-search
- animation: titlescale 0.5s
+ animation: titlescale .5s
.ais-search-box
margin: 0 auto
@@ -7,7 +7,7 @@
width: 100%
input
- padding: 0.25rem 0.7rem
+ padding: .25rem .7rem
outline: none
border: 2px solid $light-blue
border-radius: 2rem
@@ -22,18 +22,18 @@
border-color: $ruby
&:before
- $w = 0.3rem
+ $w = .3rem
position: absolute
- top: 0.4rem
+ top: .4rem
left: 0
width: w = $w
height: h = w
- border: 0.5 * w solid $light-blue
+ border: .5 * w solid $light-blue
border-radius: w
background: $white
- content: ""
+ content: ''
line-height: h
- transition: all 0.2s ease-in-out
+ transition: all .2s ease-in-out
a
display: block
@@ -46,12 +46,12 @@
color: $light-blue
.ais-pagination.pagination
- margin: 0.8rem 0 0 0
+ margin: .8rem 0 0
padding: 0
text-align: center
.ais-pagination--item
- margin: 0 0.2rem
+ margin: 0 .2rem
padding: 0
a
diff --git a/source/css/_search/index.styl b/source/css/_search/index.styl
index cb68b82..0d03253 100644
--- a/source/css/_search/index.styl
+++ b/source/css/_search/index.styl
@@ -14,18 +14,18 @@
span.search-close-button
position: absolute
- top: 0.5rem
- right: 0.5rem
+ top: .5rem
+ right: .5rem
color: $grey
line-height: 1
cursor: pointer
- transition: color 0.2s ease-in-out
+ transition: color .2s ease-in-out
&:hover
color: $light-blue
&__title
- padding: 0 0 0.7rem
+ padding: 0 0 .7rem
color: $light-blue
font-size: 1rem
line-height: 1
@@ -38,7 +38,7 @@
left: 0
z-index: 1000
display: none
- background: rgba(0, 0, 0, 0.6)
+ background: rgba(0, 0, 0, .6)
@media screen and (max-width: $sm)
.search-dialog
diff --git a/source/css/_search/local-search.styl b/source/css/_search/local-search.styl
index 4d77295..94c8168 100644
--- a/source/css/_search/local-search.styl
+++ b/source/css/_search/local-search.styl
@@ -1,5 +1,5 @@
#local-search
- animation: titlescale 0.5s
+ animation: titlescale .5s
.local-search-box
margin: 0 auto
@@ -7,7 +7,7 @@
width: 100%
input
- padding: 0.25rem 0.7rem
+ padding: .25rem .7rem
width: 100%
outline: none
border: 2px solid $light-blue
@@ -23,18 +23,18 @@
border-color: $ruby
&:before
- $w = 0.3rem
+ $w = .3rem
position: absolute
- top: 0.4rem
+ top: .4rem
left: 0
width: w = $w
height: h = w
- border: 0.5 * w solid $light-blue
+ border: .5 * w solid $light-blue
border-radius: w
background: $white
- content: ""
+ content: ''
line-height: h
- transition: all 0.2s ease-in-out
+ transition: all .2s ease-in-out
a
display: block
diff --git a/source/css/_third-party/normalize.min.css b/source/css/_third-party/normalize.min.css
index 31a4a66..1854c29 100644
--- a/source/css/_third-party/normalize.min.css
+++ b/source/css/_third-party/normalize.min.css
@@ -1 +1 @@
-/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}/*# sourceMappingURL=normalize.min.css.map */
\ No newline at end of file
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
\ No newline at end of file
diff --git a/source/css/index.styl b/source/css/index.styl
index a931f8d..732de73 100644
--- a/source/css/index.styl
+++ b/source/css/index.styl
@@ -1,18 +1,16 @@
-@import "nib"
-@import "_third-party/normalize.min.css"
+@import 'nib'
+@import '_third-party/normalize.min.css'
// project
-@import "var"
-@import "_global"
-@import "_highlight/highlight"
-@import "_layout/*"
-
+@import 'var'
+@import '_global'
+@import '_highlight/highlight'
+@import '_layout/*'
+
// search
-if hexo-config("algolia_search.enable")
- @import "_search/index"
- @import "_search/algolia"
-
-if hexo-config("local_search") && hexo-config("local_search.enable")
- @import "_search/index"
- @import "_search/local-search"
-
+if hexo-config('algolia_search.enable')
+ @import '_search/index'
+ @import '_search/algolia'
+if hexo-config('local_search') && hexo-config('local_search.enable')
+ @import '_search/index'
+ @import '_search/local-search'
diff --git a/source/css/var.styl b/source/css/var.styl
index 496949b..3476956 100644
--- a/source/css/var.styl
+++ b/source/css/var.styl
@@ -62,7 +62,6 @@ $sidebar-icon-left = $sidebar-icon-top - 4px
$sidebar-icon-size = 16px
$web-bg = convert(hexo-config("background"))
$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
$pale-blue = $theme-hr-color
$light-blue = $theme-color
@@ -109,7 +108,6 @@ $content-large-width = 1000px
$a-link-color = $theme-link-color
$a-hover-color = #82AAFF
$img-border-color = #eaeefb
-$img-border-padding = 4px
// sidebar
$sidebar-width = 300px
$sidebar-background = #f6f8fa
diff --git a/source/img/404.jpg b/source/img/404.jpg
index 29add2f..eee9ac3 100644
Binary files a/source/img/404.jpg and b/source/img/404.jpg differ
diff --git a/source/img/avatar.png b/source/img/avatar.png
index a4b90f5..90fb856 100644
Binary files a/source/img/avatar.png and b/source/img/avatar.png differ
diff --git a/source/img/comment_bg.png b/source/img/comment_bg.png
index 8c90d6a..1ce3938 100644
Binary files a/source/img/comment_bg.png and b/source/img/comment_bg.png differ
diff --git a/source/img/icp.png b/source/img/icp.png
index 9f76394..3b5539d 100644
Binary files a/source/img/icp.png and b/source/img/icp.png differ
diff --git a/source/img/loading.gif b/source/img/loading.gif
new file mode 100644
index 0000000..46df25a
Binary files /dev/null and b/source/img/loading.gif differ
diff --git a/source/js/baidupush.js b/source/js/baidupush.js
deleted file mode 100644
index 6d478ad..0000000
--- a/source/js/baidupush.js
+++ /dev/null
@@ -1,12 +0,0 @@
-(function(){
- var bp = document.createElement('script');
- var curProtocol = window.location.protocol.split(':')[0];
- if (curProtocol === 'https') {
- bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
- }
- else {
- bp.src = 'http://push.zhanzhang.baidu.com/push.js';
- }
- var s = document.getElementsByTagName("script")[0];
- s.parentNode.insertBefore(bp, s);
-})();
diff --git a/source/js/main.js b/source/js/main.js
index 124fb3f..8e96fc5 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -1,421 +1,356 @@
$(function () {
-
- const is_Snackbar = GLOBAL_CONFIG.Snackbar !== undefined ? true : false
-
+ const isSnackbar = GLOBAL_CONFIG.Snackbar !== undefined
+ const isTocContent = $('#sidebar .sidebar-toc__content').children().length > 0
/**
* 當menu過多時,自動適配,避免UI錯亂
*/
- const ph_width = $("#page-header").width()
- const search_width = $('#search_button').outerWidth()
- const blogName_width = $('#blog_name').width()
- var mw = 0;
+ const searchWidth = $('#search_button').outerWidth() !== undefined ? $('#search_button').outerWidth() : 0
+ const blogNameWidth = $('#blog_name').width()
+
+ var mw = 0
for (var i = 0; i < $('#page-header .menus_item').length; i++) {
mw = mw + $('#page-header .menus_item').eq(i).outerWidth()
}
- $('#page-header').height() > 45 ? header_adjust() : ''
-
- function header_adjust() {
- $("#page-header .toggle-menu").addClass("is_visible")
- $("#page-header .menus,.search span").addClass("is_invisible")
- }
-
- function header_adjust_back() {
- $("#page-header .toggle-menu").removeClass("is_visible")
- $("#page-header .menus,.search span").removeClass("is_invisible")
- }
-
/**
* 傳入 1 sidebar打開時
* 傳入 2 正常狀態下
* 傳入 3 resize時使用
*/
- function is_adjust(n) {
- var t;
- if (n == '1') {
- t = blogName_width + search_width + mw > $("#page-header").width() - 300 ? true : false
- } else if (n == '2') {
- t = blogName_width + search_width + mw > $("#page-header").width() ? true : false
- } else if (n == "3") {
- t = blogName_width + search_width + mw > $("#page-header").width() ? true : false
+ function isAdjust (n) {
+ var t
+ if (n === 1) {
+ t = blogNameWidth + searchWidth + mw > $('#page-header').width() - 300
+ } else if (n === 2) {
+ t = blogNameWidth + searchWidth + mw > $('#page-header').width()
}
+
if (t) {
- header_adjust()
+ headerAdjust()
} else {
- header_adjust_back()
+ headerAdjustBack()
}
}
- $(window).bind("resize", function () {
+ // 初始化header
+ isAdjust(2)
+ $('#page-header').css({ opacity: '1', animation: 'headerNoOpacity 1s' })
+
+ function headerAdjust () {
+ $('#page-header .toggle-menu').addClass('is_visible')
+ $('#page-header .menus,.search span').addClass('is_invisible')
+ }
+
+ function headerAdjustBack () {
+ $('#page-header .toggle-menu').removeClass('is_visible')
+ $('#page-header .menus,.search span').removeClass('is_invisible')
+ }
+
+ $(window).bind('resize', function () {
if (window.innerWidth > 768) {
- is_adjust(3)
+ isAdjust(2)
} else {
- header_adjust()
+ headerAdjust()
}
})
- $('#page-header').css({'opacity':'1', 'animation':'headerNoOpacity .7s'})
-
-
/**
- * 進入post頁sidebar自動打開
+ * pc時 設置主頁top_img 為 fixed
*/
- if ($('#sidebar').hasClass('auto_open')) {
- if ($(".sidebar-toc__content").children().length > 0) {
- $('#toggle-sidebar').addClass('on')
- $(".layout_post").animate({}, function () {
- {
- setTimeout(function () {
- $("#toggle-sidebar").addClass('on');
- open_sidebar()
- }, 300);
-
- is_adjust(1)
- }
- })
-
- } else
- $("#toggle-sidebar").css("display", "none")
- } else {
- $('#toggle-sidebar').css('opacity', '1')
+ if (GLOBAL_CONFIG.isHome) {
+ if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {} else {
+ $('.full_page').css('background-attachment', 'fixed')
+ }
}
+ /**
+ * 進入post頁sidebar處理
+ */
+ if (GLOBAL_CONFIG.isPost) {
+ // sidebar 自動打開
+ if ($('#sidebar').hasClass('auto_open') && isTocContent) {
+ $('#toggle-sidebar').addClass('on')
+ setTimeout(function () {
+ $('#toggle-sidebar').addClass('on')
+ openSidebar()
+ }, 400)
+ isAdjust(1)
+ }
+
+ // pc隱藏
+ if (isTocContent) {
+ $('#toggle-sidebar').css('opacity', '1')
+ } else {
+ $('#sidebar,#toggle-sidebar').css('display', 'none')
+ }
+ // mobile隱藏
+ if ($('#mobile-sidebar-toc .sidebar-toc__content').children().length === 0) {
+ $('#mobile-sidebar-toc,#mobile-toc-button').css('display', 'none')
+ }
+ }
/**
* 點擊左下角箭頭,顯示sidebar
*/
- function close_sidebar() {
+ function closeSidebar () {
$('#page-header').removeClass('open-sidebar')
$('body').animate({
paddingLeft: 0
- }, 200)
-
- $('#sidebar').animate({}, function () {
- $('#sidebar').css('transform', 'translateX(0px)')
+ }, 400)
+ $('#sidebar').css('transform', 'translateX(0px)')
+ $('#toggle-sidebar').css({
+ transform: 'rotateZ(0deg)',
+ color: '#1F2D3D',
+ opacity: '1'
})
-
- $('#toggle-sidebar').animate({}, function () {
- $('#toggle-sidebar').css({
- 'transform': 'rotateZ(0deg)',
- 'color': '#1F2D3D',
- 'opacity': "1"
-
- })
- })
-
}
- function open_sidebar() {
+ function openSidebar () {
$('#page-header').addClass('open-sidebar')
$('body').animate({
paddingLeft: 300
- }, 200)
-
- $('#sidebar').animate({}, function () {
- $('#sidebar').css('transform', 'translateX(300px)')
+ }, 400)
+ $('#sidebar').css('transform', 'translateX(300px)')
+ $('#toggle-sidebar').css({
+ transform: 'rotateZ(180deg)',
+ color: '#99a9bf',
+ opacity: '1'
})
-
-
- $('#toggle-sidebar').animate({}, function () {
- $('#toggle-sidebar').css({
- 'transform': 'rotateZ(180deg)',
- 'color': '#99a9bf',
- 'opacity': "1"
- })
- })
-
}
- $('#toggle-sidebar').on('click', function () {
+ $('#toggle-sidebar').on('click', function () {
if (!isMobile() && $('#sidebar').is(':visible')) {
var isOpen = $(this).hasClass('on')
isOpen ? $(this).removeClass('on') : $(this).addClass('on')
if (isOpen) {
- close_sidebar()
+ closeSidebar()
setTimeout(function () {
- is_adjust(2)
- }, 300)
+ isAdjust(2)
+ }, 500)
} else {
- is_adjust(1)
- open_sidebar()
+ isAdjust(1)
+ openSidebar()
}
}
})
-
/**
* 首頁top_img底下的箭頭
*/
- $(".scroll-down").on("click", function () {
+ $('.scroll-down').on('click', function () {
scrollTo('#content-outer')
- });
-
+ })
/**
* BOOKMARK 書簽
*/
- $('#bookmark-it').on("click", function () {
+ $('#bookmark-it').on('click', function () {
if (window.sidebar && window.sidebar.addPanel) { // Mozilla Firefox Bookmark
- window.sidebar.addPanel(document.title, window.location.href, '');
+ window.sidebar.addPanel(document.title, window.location.href, '')
} else if (window.external && ('AddFavorite' in window.external)) { // IE Favorite
- window.external.AddFavorite(location.href, document.title);
+ window.external.AddFavorite(location.href, document.title)
} else if (window.opera && window.print) { // Opera Hotlist
- this.title = document.title;
- return true;
- } else { // webkit - safari/chrome
- if (is_Snackbar) {
- var bookmarkText = GLOBAL_CONFIG.Snackbar.bookmark.message_prev + ' ' + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL') + '+ D ' + GLOBAL_CONFIG.Snackbar.bookmark.message_next + '.';
+ this.title = document.title
+ return true
+ } else { // webkit - safari/chrome
+ if (isSnackbar) {
+ var bookmarkText = GLOBAL_CONFIG.Snackbar.bookmark.message_prev + ' ' + (navigator.userAgent.toLowerCase().indexOf('mac') !== -1 ? 'Command/Cmd' : 'CTRL') + '+ D ' + GLOBAL_CONFIG.Snackbar.bookmark.message_next + '.'
snackbarShow(bookmarkText)
} else {
- alert(GLOBAL_CONFIG.bookmark.message_prev + ' ' + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL') + '+ D ' + GLOBAL_CONFIG.bookmark.message_next + '.');
+ alert(GLOBAL_CONFIG.bookmark.message_prev + ' ' + (navigator.userAgent.toLowerCase().indexOf('mac') !== -1 ? 'Command/Cmd' : 'CTRL') + '+ D ' + GLOBAL_CONFIG.bookmark.message_next + '.')
}
}
- });
-
- /**
- * 代碼copy
- * Add copy icon
- */
- $('figure.highlight').wrap('
')
-
- var highlight_copy = GLOBAL_CONFIG.highlight_copy
- if (highlight_copy == 'true') {
- var $copyIcon = $(' ')
- var $notice = $('
')
- $('.code-area-wrap').prepend($copyIcon)
- $('.code-area-wrap').prepend($notice)
- // copy function
- function copy(text, ctx) {
- if (document.queryCommandSupported && document.queryCommandSupported('copy')) {
- try {
- document.execCommand('copy') // Security exception may be thrown by some browsers.
- if (is_Snackbar) {
- snackbarShow(GLOBAL_CONFIG.copy.success)
- } else {
- $(ctx).prev('.copy-notice')
- .text(GLOBAL_CONFIG.copy.success)
- .animate({
- opacity: 1,
- right: 30
- }, 450, function () {
- setTimeout(function () {
- $(ctx).prev('.copy-notice').animate({
- opacity: 0,
- right: 0
- }, 650)
- }, 400)
- })
- }
- } catch (ex) {
- if (is_Snackbar) {
- snackbarShow(GLOBAL_CONFIG.copy.success)
- } else {
- $(ctx).prev('.copy-notice')
- .text(GLOBAL_CONFIG.copy.error)
- .animate({
- opacity: 1,
- right: 30
- }, 650, function () {
- setTimeout(function () {
- $(ctx).prev('.copy-notice').animate({
- opacity: 0,
- right: 0
- }, 650)
- }, 400)
- })
- return false
- }
- }
- } else {
- if (is_Snackbar) {
- snackbarShow(GLOBAL_CONFIG.copy.noSupport)
- } else {
- $(ctx).prev('.copy-notice').text(GLOBAL_CONFIG.copy.noSupport)
- }
- }
- }
- // click events
- $('.code-area-wrap .fa-clipboard').on('click', function () {
- var selection = window.getSelection()
- var range = document.createRange()
- range.selectNodeContents($(this).siblings('figure').find('.code pre')[0])
- selection.removeAllRanges()
- selection.addRange(range)
- var text = selection.toString()
- copy(text, this)
- selection.removeAllRanges()
- })
- }
-
- /**
- * 代碼框語言識別
- */
- var highlight_lang = GLOBAL_CONFIG.highlight_lang
- if (highlight_lang == 'true') {
- var $highlight_lang = $('
')
- $('figure').before($highlight_lang)
- var lang_name_index
- var lang_name
- $('figure').each(function () {
- lang_name_index = lang_name = $(this).attr('class').split(' ')[1];
- if (lang_name_index == 'js')
- lang_name = 'javascript'
- if (lang_name_index == 'md')
- lang_name = 'markdown'
- if (lang_name_index == 'plain')
- lang_name = 'code'
- if (lang_name_index == 'py')
- lang_name = 'python'
-
- $(this).siblings(".code_lang").text(lang_name)
-
- })
- }
- /**
- * 代碼收縮
- */
- var highlight_shrink = GLOBAL_CONFIG.highlight_shrink
- if (highlight_shrink == 'true') {
- var $code_expand = $(' ')
- } else {
- var $code_expand = $(' ')
- }
- $('.code-area-wrap').prepend($code_expand)
- $('.code-area-wrap .code-expand').on('click', function () {
- if ($(this).hasClass('code-closed')) {
- $(this).siblings('figure').find('figcaption').show();
- $(this).siblings('figure').find('table').show();
- $(this).removeClass('code-closed');
- } else {
- $(this).siblings('figure').find('figcaption').hide();
- $(this).siblings('figure').find('table').hide();
- $(this).addClass('code-closed');
- }
})
/**
- * fancybox和 medium_zoom
+ * 代碼copy
+ * copy function
*/
- var medium_zoom = GLOBAL_CONFIG.medium_zoom;
- if (medium_zoom == 'false') {
- var imgList = $("#post-content img").not('.no-fancybox');
- if (imgList.length === 0) {
- imgList = $(".justified-gallery img").not('.no-fancybox');
- }
-
- for (var i = 0; i < imgList.length; i++) {
- var lazyload_src = imgList[i].src ? imgList[i].src : imgList.eq(i).attr("data-src")
-
- var $a = $(
- ' '
- )
-
- var $wrap = $(imgList[i]).wrap($a)
-
- var alt = imgList[i].alt
- if (alt) {
- $wrap.after('' + alt + '
')
+ function copy (text, ctx) {
+ if (document.queryCommandSupported && document.queryCommandSupported('copy')) {
+ try {
+ document.execCommand('copy') // Security exception may be thrown by some browsers.
+ if (isSnackbar) {
+ snackbarShow(GLOBAL_CONFIG.copy.success)
+ } else {
+ $(ctx).prev('.copy-notice')
+ .text(GLOBAL_CONFIG.copy.success)
+ .animate({
+ opacity: 1,
+ right: 30
+ }, 450, function () {
+ setTimeout(function () {
+ $(ctx).prev('.copy-notice').animate({
+ opacity: 0,
+ right: 0
+ }, 650)
+ }, 400)
+ })
+ }
+ } catch (ex) {
+ if (isSnackbar) {
+ snackbarShow(GLOBAL_CONFIG.copy.success)
+ } else {
+ $(ctx).prev('.copy-notice')
+ .text(GLOBAL_CONFIG.copy.error)
+ .animate({
+ opacity: 1,
+ right: 30
+ }, 650, function () {
+ setTimeout(function () {
+ $(ctx).prev('.copy-notice').animate({
+ opacity: 0,
+ right: 0
+ }, 650)
+ }, 400)
+ })
+ return false
+ }
+ }
+ } else {
+ if (isSnackbar) {
+ snackbarShow(GLOBAL_CONFIG.copy.noSupport)
+ } else {
+ $(ctx).prev('.copy-notice').text(GLOBAL_CONFIG.copy.noSupport)
}
}
+ }
+ // click events
+ $(document).on('click', '.code-area-wrap .fa-clipboard', function () {
+ var selection = window.getSelection()
+ var range = document.createRange()
+ range.selectNodeContents($(this).parent().siblings('figure').find('.code pre')[0])
+ selection.removeAllRanges()
+ selection.addRange(range)
+ var text = selection.toString()
+ copy(text, this)
+ selection.removeAllRanges()
+ })
+ /**
+ * 代碼收縮
+ */
+ $(document).on('click', '.code-area-wrap .code-expand', function () {
+ var $figure = $(this).parent().next()
+ if ($(this).hasClass('code-closed')) {
+ $figure.slideDown(300)
+ $(this).removeClass('code-closed')
+ } else {
+ $figure.slideUp(300)
+ $(this).addClass('code-closed')
+ }
+ })
+
+ /**
+ * fancybox和 mediumZoom
+ */
+
+ var mediumZoom = GLOBAL_CONFIG.mediumZoom
+ var fancybox = GLOBAL_CONFIG.fancybox
+ if (fancybox) {
$().fancybox({
- selector: "[data-fancybox]",
+ selector: '[data-fancybox]',
loop: true,
- transitionEffect: "slide",
+ transitionEffect: 'slide',
protect: true,
// wheel: false,
- buttons: ["slideShow", "fullScreen", "thumbs", "close"]
- });
- } else {
- var imgList = $(".justified-gallery img");
- if (imgList.length) {
- for (var i = 0; i < imgList.length; i++) {
- var $a = $('
')
- var $wrap = $(imgList[i]).wrap($a)
- }
- }
-
- const zoom = mediumZoom(document.querySelectorAll('#post img,.justified-gallery img'))
- zoom.on('open', event => {
- let photoBg = $(document.documentElement).attr('data-theme') == 'dark' ? '#2d3032' : '#fff'
- zoom.update({ background: photoBg })
+ buttons: ['slideShow', 'fullScreen', 'thumbs', 'close']
+ })
+ }
+ if (mediumZoom) {
+ const zoom = mediumZoom(document.querySelectorAll('.mediumZoom'))
+ zoom.on('open', event => {
+ const photoBg = $(document.documentElement).attr('data-theme') === 'dark' ? '#121212' : '#fff'
+ zoom.update({
+ background: photoBg
+ })
})
}
-
/**
* 手機menu和toc按鈕點擊
* 顯示menu和toc的sidebar
*/
- function mobile_menu_close() {
- if ($(".toggle-menu").hasClass("open")) {
- $(".toggle-menu").removeClass("open").addClass("close");
- $('body').removeClass("open-mobile-menus");
- $('#menu_mask').fadeOut()
+ function openMobileSidebar (name) {
+ $('body').css('overflow', 'hidden')
+ $('#body-wrap').css('transform', 'translateX(-250px)')
+ $('#page-header').css('transform', 'translateX(-250px)')
+ $('#page-header.fixed.visible').css('transform', 'translate3d(-250px, 100%, 0)')
+ $('#rightside').css('transform', 'translateX(-288px)')
+ $('#menu_mask').fadeIn()
+
+ if (name === 'menu') {
+ $('.toggle-menu').removeClass('close').addClass('open')
+ $('#mobile-sidebar-menus').css({ transform: 'translateX(-254px)' })
}
+ if (name === 'toc') {
+ $('#mobile-toc-button').removeClass('close').addClass('open')
+ $('#mobile-sidebar-toc').css('transform', 'translateX(-254px)')
+ }
}
- function mobile_toc_close() {
- if ($("#mobile-toc-button").hasClass("open")) {
- $("#mobile-toc-button").removeClass("open").addClass("close");
- $('body').removeClass("open-mobile-toc");
- $('#menu_mask').fadeOut();
+ function closeMobileSidebar (name) {
+ $('body').css('overflow', '')
+ $('#body-wrap').css('transform', '')
+ $('#page-header').css('transform', '')
+ $('#page-header.fixed.visible').css('transform', '')
+ $('#rightside').css('transform', 'translateX(-38px)')
+ $('#menu_mask').fadeOut()
+
+ if (name === 'menu') {
+ $('.toggle-menu').removeClass('open').addClass('close')
+ $('#mobile-sidebar-menus').css({ transform: 'translateX(0)' })
}
+ if (name === 'toc') {
+ $('#mobile-toc-button').removeClass('open').addClass('close')
+ $('#mobile-sidebar-toc').css('transform', '')
+ }
}
+
$('.toggle-menu').on('click', function () {
- if ($(".toggle-menu").hasClass("close")) {
- $(".toggle-menu").removeClass("close").addClass("open");
- $('body').addClass("open-mobile-menus");
- $('#menu_mask').fadeIn();
+ if ($('.toggle-menu').hasClass('close')) {
+ openMobileSidebar('menu')
if ($('#toggle-sidebar').hasClass('on')) {
- close_sidebar()
+ $('body').css('padding-left', '0')
+ $('#sidebar').css('transform', '')
}
}
-
})
$('#mobile-toc-button').on('click', function () {
- if ($("#mobile-toc-button").hasClass("close")) {
- $("#mobile-toc-button").removeClass("close").addClass("open");
- $('body').addClass("open-mobile-toc");
- $('#menu_mask').fadeIn();
- }
-
+ if ($('#mobile-toc-button').hasClass('close')) openMobileSidebar('toc')
})
$('#menu_mask').on('click touchstart', function (e) {
- mobile_menu_close()
- mobile_toc_close()
-
- if ($('#toggle-sidebar').hasClass('on')) {
- setTimeout(function () {
- open_sidebar()
- }, 300)
+ if ($('.toggle-menu').hasClass('open')) {
+ closeMobileSidebar('menu')
+ if ($('#toggle-sidebar').hasClass('on')) {
+ setTimeout(function () {
+ openSidebar()
+ }, 600)
+ }
+ }
+ if ($('#mobile-toc-button').hasClass('open')) {
+ closeMobileSidebar('toc')
}
-
})
$(window).on('resize', function (e) {
if (!$('.toggle-menu').is(':visible')) {
- mobile_menu_close()
+ if ($('.toggle-menu').hasClass('open')) closeMobileSidebar('menu')
}
if (!$('#mobile-toc-button').is(':visible')) {
- mobile_toc_close()
+ if ($('#mobile-toc-button').hasClass('open')) closeMobileSidebar('toc')
}
-
})
- //點擊toc,收起sidebar
- $("#mobile-sidebar-toc a").on('click', function () {
- mobile_toc_close()
+ // 點擊toc,收起sidebar
+ $('#mobile-sidebar-toc a').on('click', function () {
+ closeMobileSidebar('toc')
})
/**
@@ -427,29 +362,28 @@ $(function () {
// main of scroll
$(window).scroll(throttle(function (event) {
var currentTop = $(this).scrollTop()
- if (!isMobile()) {
+ if (!isMobile() && isTocContent) {
// percentage inspired by hexo-theme-next
scrollPercent(currentTop)
// head position
findHeadPosition(currentTop)
- auto_scroll_toc(currentTop)
+ autoScrollToc(currentTop)
}
var isUp = scrollDirection(currentTop)
if (currentTop > 56) {
if (isUp) {
- $('#page-header').hasClass('visible') ? $('#page-header').removeClass('visible') : ''
-
+ if ($('#page-header').hasClass('visible')) $('#page-header').removeClass('visible')
} else {
- $('#page-header').hasClass('visible') ? '' : $('#page-header').addClass('visible')
+ if (!$('#page-header').hasClass('visible')) $('#page-header').addClass('visible')
}
$('#page-header').addClass('fixed')
if ($('#rightside').css('opacity') === '0') {
$('#rightside').animate({}, function () {
$(this).css({
- 'opacity': '1',
- 'transform': 'translateX(-38px)'
+ opacity: '1',
+ transform: 'translateX(-38px)'
})
})
}
@@ -460,13 +394,11 @@ $(function () {
$('#rightside').animate({}, function () {
$('#rightside').css({
- 'opacity': '',
- 'transform': ''
+ opacity: '',
+ transform: ''
})
})
-
}
-
}, 300))
// go up smooth scroll
@@ -486,26 +418,26 @@ $(function () {
})
// find the scroll direction
- function scrollDirection(currentTop) {
+ function scrollDirection (currentTop) {
var result = currentTop > initTop // true is down & false is up
initTop = currentTop
return result
}
// scroll to a head(anchor)
- function scrollToHead(anchor) {
- scrollTo(anchor);
+ function scrollToHead (anchor) {
+ scrollTo(anchor)
}
// expand toc-item
- function expandToc($item) {
+ function expandToc ($item) {
if ($item.is(':visible')) {
return
}
$item.fadeIn(400)
}
- function scrollPercent(currentTop) {
+ function scrollPercent (currentTop) {
var docHeight = $('#content-outer').height()
var winHeight = $(window).height()
var contentMath = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight)
@@ -518,7 +450,7 @@ $(function () {
}, 100)
}
- function updateAnchor(anchor) {
+ function updateAnchor (anchor) {
if (window.history.replaceState && anchor !== window.location.hash) {
window.history.replaceState(undefined, undefined, anchor)
}
@@ -528,7 +460,7 @@ $(function () {
// DOM Hierarchy:
// ol.toc > (li.toc-item, ...)
// li.toc-item > (a.toc-link, ol.toc-child > (li.toc-item, ...))
- function findHeadPosition(top) {
+ function findHeadPosition (top) {
// assume that we are not in the post page if no TOC link be found,
// thus no need to update the status
if ($('.toc-link').length === 0) {
@@ -570,17 +502,16 @@ $(function () {
// Hide their respective list of subsections
.find('.toc-child').hide()
}
-
}
- function auto_scroll_toc(currentTop) {
+ function autoScrollToc (currentTop) {
if ($('.toc-link').hasClass('active')) {
- var active_position = $(".active").offset().top;
- var sidebar_scrolltop = $("#sidebar").scrollTop();
- if (active_position > (currentTop + $(window).height() - 50)) {
- $("#sidebar").scrollTop(sidebar_scrolltop + 100);
- } else if (active_position < currentTop + 50) {
- $("#sidebar").scrollTop(sidebar_scrolltop - 100);
+ var activePosition = $('.active').offset().top
+ var sidebarScrolltop = $('#sidebar').scrollTop()
+ if (activePosition > (currentTop + $(window).height() - 50)) {
+ $('#sidebar').scrollTop(sidebarScrolltop + 100)
+ } else if (activePosition < currentTop + 50) {
+ $('#sidebar').scrollTop(sidebarScrolltop - 100)
}
}
}
@@ -588,60 +519,52 @@ $(function () {
/**
* 閲讀模式
*/
- $("#readmode").click(function () {
- if (Cookies.get("theme") == "dark") {
- $(document.documentElement).attr('data-theme') == 'dark' ? $(document.documentElement).attr('data-theme','') : $(document.documentElement).attr('data-theme','dark')
- $('body').toggleClass('read-mode');
- $('#to_comment').toggleClass('is_invisible');
- } else {
- $('body').toggleClass('read-mode');
- $('#to_comment').toggleClass('is_invisible');
- }
- });
+ $('#readmode').click(function () {
+ var isDark = $(document.documentElement).attr('data-theme') === 'dark'
+ var isNull = $(document.documentElement).attr('data-theme') === ''
+ $('body').toggleClass('read-mode')
+ $('#to_comment').toggleClass('is_invisible')
+ if (isNull) $(document.documentElement).attr('data-theme', 'dark')
+ if (isDark) $(document.documentElement).attr('data-theme', '')
+ })
/**
* 字體調整
*/
- $("#font_plus").click(function () {
- var font_size_record = parseFloat($('body').css('font-size'))
- var pre_size_record = parseFloat($('pre').css('font-size'))
- var code_size_record = parseFloat($('code').css('font-size'))
- $('body').css('font-size', font_size_record + 1)
- $('pre').css('font-size', pre_size_record + 1)
- $('code').css('font-size', code_size_record + 1)
- });
- $("#font_minus").click(function () {
- var font_size_record = parseFloat($('body').css('font-size'))
- var pre_size_record = parseFloat($('pre').css('font-size'))
- var code_size_record = parseFloat($('code').css('font-size'))
- $('body').css('font-size', font_size_record - 1)
- $('pre').css('font-size', pre_size_record - 1)
- $('code').css('font-size', code_size_record - 1)
- });
-
- /**
- * sub-menus 位置調整
- */
-
- if ($(window).width() > 768) {
- $('.menus_item_child').each(function () {
- var a_width = $(this).siblings('a').outerWidth(true);
- var child_width = $(this).outerWidth(true);
- $(this).css("margin-left", -(child_width / 2 - a_width / 2))
- })
+ function fontAdjust (name) {
+ var fontSizeRecord = parseFloat($('body').css('font-size'))
+ var preSizeRecord = parseFloat($('pre').css('font-size'))
+ var codeSizeRecord = parseFloat($('code').css('font-size'))
+ if (name === 'plus') {
+ $('body').css('font-size', fontSizeRecord + 1)
+ $('pre').css('font-size', preSizeRecord + 1)
+ $('code').css('font-size', codeSizeRecord + 1)
+ } else {
+ $('body').css('font-size', fontSizeRecord - 1)
+ $('pre').css('font-size', preSizeRecord - 1)
+ $('code').css('font-size', codeSizeRecord - 1)
+ }
}
+ $('#font_plus').click(function () {
+ fontAdjust('plus')
+ })
+
+ $('#font_minus').click(function () {
+ fontAdjust('minus')
+ })
+
/**
* 手機端sub-menu 展開/收縮
*/
$('.menus-expand').on('click', function () {
if ($(this).hasClass('menus-closed')) {
- $(this).parents('.menus_item').find('.menus_item_child').slideDown();
- $(this).removeClass('menus-closed');
+ $(this).parents('.menus_item').find('.menus_item_child').slideDown()
+ $(this).removeClass('menus-closed')
} else {
- $(this).parents('.menus_item').find('.menus_item_child').slideUp();
- $(this).addClass('menus-closed');
+ $(this).parents('.menus_item').find('.menus_item_child').slideUp()
+ $(this).addClass('menus-closed')
}
})
@@ -649,74 +572,35 @@ $(function () {
* rightside 點擊設置 按鈕 展開
*/
$('#rightside_config').on('click', function () {
- if ($('#rightside-config-hide').hasClass("rightside-in")) {
- $('#rightside-config-hide').css("animation", "rightside_out_animate .3s");
- $('#rightside-config-hide').removeClass("rightside-in")
- $("#rightside-config-hide").animate({}, function () {
- setTimeout(function () {
- $('#rightside-config-hide').css({
- "animation": "",
- "display": ""
- })
- }, 300)
- })
+ if ($('#rightside-config-hide').hasClass('rightside-in')) {
+ $('#rightside-config-hide').removeClass('rightside-in').addClass('rightside-out')
} else {
- $('#rightside-config-hide').addClass("rightside-in")
- $("#rightside-config-hide").animate({}, function () {
- $('#rightside-config-hide').css("display", "block")
- })
-
- }
- })
-
- /**
- * 調正recent_post 上下間距
- */
- 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
- })
- })
- }
-
- //recent-post-item垂直置中
- if ($(window).width() > 768) {
- recent_post_padding();
- }
-
- $(window).bind("resize", function () {
- if ($(window).width() > 768) {
- recent_post_padding();
+ $('#rightside-config-hide').removeClass('rightside-out').addClass('rightside-in')
}
})
/**
* 複製時加上版權信息
*/
- var copy_copyright_js = GLOBAL_CONFIG.copy_copyright_js
var copyright = GLOBAL_CONFIG.copyright
- if (copyright) {
+ if (copyright !== undefined) {
document.body.oncopy = event => {
- event.preventDefault();
- let textFont, copyFont = window.getSelection(0).toString();
+ event.preventDefault()
+ let textFont; const copyFont = window.getSelection(0).toString()
if (copyFont.length > 45) {
textFont = copyFont + '\n' + '\n' + '\n' +
copyright.languages.author + '\n' +
copyright.languages.link + '\n' +
copyright.languages.source + '\n' +
- copyright.languages.info;
+ copyright.languages.info
} else {
- textFont = copyFont;
+ textFont = copyFont
}
if (event.clipboardData) {
- return event.clipboardData.setData('text', textFont);
+ return event.clipboardData.setData('text', textFont)
} else {
// 兼容IE
- return window.clipboardData.setData("text", textFont);
+ return window.clipboardData.setData('text', textFont)
}
}
}
@@ -726,18 +610,14 @@ $(function () {
*/
if ($('.justified-gallery').length) {
- $('.justified-gallery img').each((i, o) => {
- let src = $(o).attr('data-src');
- $(o).attr('src', src)
- })
- $('.justified-gallery > p > .fancybox,.justified-gallery > p > div').unwrap();
- $('head').append(' ');
- loadScript("https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js", function () {
+ $('.justified-gallery > p > .fancybox').unwrap()
+ $('head').append(' ')
+ loadScript('https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js', function () {
if (typeof ($.fn.justifiedGallery) === 'function') {
$('.justified-gallery').justifiedGallery({
rowHeight: 220,
- margins: 4,
- });
+ margins: 4
+ })
}
})
}
@@ -746,62 +626,302 @@ $(function () {
* Darkmode
*/
- if (typeof autoChangeMode !== "undefined") {
-
-
- // if (autoChangeMode == '1') {
- // window.matchMedia("(prefers-color-scheme: dark)").addListener(function (e) {
- // if (e.matches) {
- // activateDarkMode()
- // change_light_icon()
- // Cookies.remove('theme')
- // } else {
- // activateLightMode()
- // change_dark_icon()
- // Cookies.remove('theme')
- // }
-
- // })
- // }
-
- if (autoChangeMode == '1' || autoChangeMode == '2') {
- if (Cookies.get("theme") == "dark") {
- change_light_icon()
+ if (typeof autoChangeMode !== 'undefined') {
+ if (autoChangeMode === '1' || autoChangeMode === '2') {
+ if (Cookies.get('theme') === 'dark') {
+ changeLightIcon()
} else {
- change_dark_icon()
+ changeDarkIcon()
}
}
}
- function change_light_icon() {
- $("#darkmode").removeClass("fa-moon-o").addClass("fa-sun-o");
+ function changeLightIcon () {
+ $('#darkmode').removeClass('fa-moon-o').addClass('fa-sun-o')
}
- function change_dark_icon() {
- $("#darkmode").removeClass("fa-sun-o").addClass("fa-moon-o");
-
+ function changeDarkIcon () {
+ $('#darkmode').removeClass('fa-sun-o').addClass('fa-moon-o')
}
- function switchReadMode() {
-
+ function switchReadMode () {
var nowMode = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
-
- if ( nowMode == 'light') {
- change_light_icon()
+ if (nowMode === 'light') {
+ changeLightIcon()
activateDarkMode()
- Cookies.set('theme','dark', { expires: 2 })
- if (is_Snackbar) snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)
- }else{
- change_dark_icon()
+ Cookies.set('theme', 'dark', {
+ expires: 2
+ })
+ if (isSnackbar) snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)
+ } else {
+ changeDarkIcon()
activateLightMode()
- Cookies.set('theme','light', { expires: 2 })
- if (is_Snackbar) snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)
+ Cookies.set('theme', 'light', {
+ expires: 2
+ })
+ if (isSnackbar) snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)
}
}
- $("#darkmode").click(function () {
- switchReadMode();
- });
+ $('#darkmode').click(function () {
+ switchReadMode()
+ })
+ /**
+ * 網頁運行時間
+ */
+ if (GLOBAL_CONFIG.runtime) {
+ // get user config
+ var startDate = $('#webinfo-runtime-count').attr('start_date')
+ var showDateTime = function () {
+ var BirthDay = new Date(startDate)
+ var today = new Date()
+ var timeold = (today.getTime() - BirthDay.getTime())
+ var msPerDay = 24 * 60 * 60 * 1000
+ var eDaysold = timeold / msPerDay
+ var daysold = Math.floor(eDaysold)
+ $('.webinfo-runtime-count').text(daysold + ' ' + GLOBAL_CONFIG.runtime_unit)
+ }
-});
\ No newline at end of file
+ var interval
+ showDateTime()
+ clearInterval(interval)
+ interval = setInterval(showDateTime, 10000)
+ }
+
+ /**
+ * 搜索
+ */
+
+ if (GLOBAL_CONFIG.localSearch === undefined && GLOBAL_CONFIG.algolia !== undefined) {
+ $('a.social-icon.search').on('click', function () {
+ openSearch()
+ $('.ais-search-box--input').focus()
+ })
+ $('.search-mask, .search-close-button').on('click', closeSearch)
+
+ var algolia = GLOBAL_CONFIG.algolia
+ var isAlgoliaValid = algolia.appId && algolia.apiKey && algolia.indexName
+ if (!isAlgoliaValid) {
+ return console.error('Algolia setting is invalid!')
+ }
+ var search = instantsearch({
+ appId: algolia.appId,
+ apiKey: algolia.apiKey,
+ indexName: algolia.indexName,
+ searchParameters: {
+ hitsPerPage: algolia.hits.per_page || 10
+ },
+ searchFunction: function (helper) {
+ var searchInput = $('#algolia-search-input').find('input')
+
+ if (searchInput.val()) {
+ helper.search()
+ }
+ }
+ })
+
+ search.addWidget(
+ instantsearch.widgets.searchBox({
+ container: '#algolia-search-input',
+ reset: false,
+ magnifier: false,
+ placeholder: GLOBAL_CONFIG.algolia.languages.input_placeholder
+ })
+ )
+ search.addWidget(
+ instantsearch.widgets.hits({
+ container: '#algolia-hits',
+ templates: {
+ item: function (data) {
+ var link = data.permalink ? data.permalink : (GLOBAL_CONFIG.root + data.path)
+ return (
+ '' +
+ data._highlightResult.title.value +
+ ' '
+ )
+ },
+ empty: function (data) {
+ return (
+ '' +
+ GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/, data.query) +
+ '
'
+ )
+ }
+ },
+ cssClasses: {
+ item: 'algolia-hit-item'
+ }
+ })
+ )
+
+ search.addWidget(
+ instantsearch.widgets.stats({
+ container: '#algolia-stats',
+ templates: {
+ body: function (data) {
+ var stats = GLOBAL_CONFIG.algolia.languages.hits_stats
+ .replace(/\$\{hits}/, data.nbHits)
+ .replace(/\$\{time}/, data.processingTimeMS)
+ return (
+ ' ' +
+ stats +
+ '' +
+ ' ' +
+ ' '
+ )
+ }
+ }
+ })
+ )
+
+ search.addWidget(
+ instantsearch.widgets.pagination({
+ container: '#algolia-pagination',
+ scrollTo: false,
+ showFirstLast: false,
+ labels: {
+ first: ' ',
+ last: ' ',
+ previous: ' ',
+ next: ' '
+ },
+ cssClasses: {
+ root: 'pagination',
+ item: 'pagination-item',
+ link: 'page-number',
+ active: 'current',
+ disabled: 'disabled-item'
+ }
+ })
+ )
+ search.start()
+ }
+ if (GLOBAL_CONFIG.localSearch !== undefined && GLOBAL_CONFIG.algolia === undefined) {
+ $('a.social-icon.search').on('click', function () {
+ var loadFlag = false
+ openSearch()
+ $('#local-search-input input').focus()
+ if (!loadFlag) {
+ localSearch(GLOBAL_CONFIG.localSearch.path)
+ loadFlag = true
+ }
+ })
+
+ $('.search-mask, .search-close-button').on('click', closeSearch)
+
+ var localSearch = function (path) {
+ $.ajax({
+ url: GLOBAL_CONFIG.root + path,
+ dataType: 'xml',
+ success: function (xmlResponse) {
+ // get the contents from search data
+ var datas = $('entry', xmlResponse).map(function () {
+ return {
+ title: $('title', this).text(),
+ content: $('content', this).text(),
+ url: $('url', this).text()
+ }
+ }).get()
+ var $input = $('#local-search-input input')[0]
+ var $resultContent = $('#local-hits')[0]
+ $input.addEventListener('input', function () {
+ var str = ''
+ var keywords = this.value.trim().toLowerCase().split(/[\s]+/)
+ $resultContent.innerHTML = ''
+ if (this.value.trim().length <= 0) {
+ $('.local-search-stats__hr').hide()
+ return
+ }
+ var count = 0
+ // perform local searching
+ datas.forEach(function (data) {
+ var isMatch = true
+ var dataTitle = data.title.trim().toLowerCase()
+ var dataContent = data.content.trim().replace(/<[^>]+>/g, '').toLowerCase()
+ var dataUrl = data.url
+ var indexTitle = -1
+ var indexContent = -1
+ // only match artiles with not empty titles and contents
+ if (dataTitle !== '' && dataContent !== '') {
+ keywords.forEach(function (keyword, i) {
+ indexTitle = dataTitle.indexOf(keyword)
+ indexContent = dataContent.indexOf(keyword)
+ if (indexTitle < 0 && indexContent < 0) {
+ isMatch = false
+ } else {
+ if (indexContent < 0) {
+ indexContent = 0
+ }
+ }
+ })
+ }
+ // show search results
+ if (isMatch) {
+ str += '
'
+ count += 1
+ $('.local-search-stats__hr').show()
+ }
+ })
+ if (count === 0) {
+ str += '
' + GLOBAL_CONFIG.localSearch.languages.hits_empty.replace(/\$\{query}/, this.value.trim()) +
+ '
'
+ }
+ $resultContent.innerHTML = str
+ })
+ }
+ })
+ }
+ }
+
+ function openSearch () {
+ $('body').css('width', '100%')
+ $('body').css('overflow', 'hidden')
+
+ $('.search-dialog').css({
+ display: 'block'
+ })
+
+ $('.search-mask').fadeIn()
+
+ // shortcut: ESC
+ document.addEventListener('keydown', function f (event) {
+ if (event.code === 'Escape') {
+ closeSearch()
+ document.removeEventListener('keydown', f)
+ }
+ })
+ }
+
+ function closeSearch () {
+ $('body').css('width', '')
+ $('body').css('overflow', '')
+ $('.search-dialog').css({
+ animation: 'search_close .5s'
+ })
+ $('.search-dialog').animate({}, function () {
+ setTimeout(function () {
+ $('.search-dialog').css({
+ animation: '',
+ display: 'none'
+ })
+ }, 500)
+ })
+
+ $('.search-mask').fadeOut()
+ }
+
+ if (GLOBAL_CONFIG.baiduPush) {
+ (function () {
+ var bp = document.createElement('script')
+ var curProtocol = window.location.protocol.split(':')[0]
+ if (curProtocol === 'https') {
+ bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'
+ } else {
+ bp.src = 'http://push.zhanzhang.baidu.com/push.js'
+ }
+ var s = document.getElementsByTagName('script')[0]
+ s.parentNode.insertBefore(bp, s)
+ })()
+ }
+})
diff --git a/source/js/runtimeshow.js b/source/js/runtimeshow.js
deleted file mode 100644
index 7395c8f..0000000
--- a/source/js/runtimeshow.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// get user config
-var start_date = document.getElementById("runtionshow").getAttribute("start_date")
-
-function show_date_time() {
- BirthDay=new Date(start_date);
- today=new Date();
- timeold=(today.getTime()-BirthDay.getTime());
- msPerDay=24*60*60*1000
- e_daysold=timeold/msPerDay
- daysold=Math.floor(e_daysold);
- webinfo_runtime_count.innerHTML= daysold + " " + GLOBAL_CONFIG.runtime_unit
-}
-
-var interval;
-show_date_time();
-clearInterval(interval);
-interval = setInterval(show_date_time, 10000);
-
-
diff --git a/source/js/search/algolia.js b/source/js/search/algolia.js
deleted file mode 100644
index faf6560..0000000
--- a/source/js/search/algolia.js
+++ /dev/null
@@ -1,143 +0,0 @@
-$(function () {
- $('a.social-icon.search').on('click', function () {
- $('body').css('width', '100%')
- $('body').css('overflow', 'hidden')
-
- $('.search-dialog').animate({}, function () {
- $('.search-dialog').css({
- 'display': 'block'
- }),300
- })
-
- $('.ais-search-box--input').focus()
- $('.search-mask').fadeIn();
- // shortcut: ESC
- document.addEventListener('keydown', function f(event) {
- if (event.code == "Escape") {
- closeSearch();
- document.removeEventListener('keydown', f);
- }
- })
- })
-
- var closeSearch = function () {
- $('body').css('width', '')
- $('body').css('overflow', '')
- $('.search-dialog').css({
- 'animation': 'search_close .5s'
- })
-
- $('.search-dialog').animate({}, function () {
-
- setTimeout(function () {
- $('.search-dialog').css({
- 'animation': '',
- 'display': 'none'
- })
- },500)
- })
-
- $('.search-mask').fadeOut();
- }
- $('.search-mask, .search-close-button').on('click', closeSearch)
-
-
- var algolia = GLOBAL_CONFIG.algolia
- var isAlgoliaValid = algolia.appId && algolia.apiKey && algolia.indexName
- if (!isAlgoliaValid) {
- return console.error('Algolia setting is invalid!')
- }
-
- var search = instantsearch({
- appId: algolia.appId,
- apiKey: algolia.apiKey,
- indexName: algolia.indexName,
- searchParameters: {
- hitsPerPage: algolia.hits.per_page || 10
- },
- searchFunction: function (helper) {
- var searchInput = $('#algolia-search-input').find('input')
-
- if (searchInput.val()) {
- helper.search()
- }
- }
- })
-
- search.addWidget(
- instantsearch.widgets.searchBox({
- container: '#algolia-search-input',
- reset: false,
- magnifier: false,
- placeholder: GLOBAL_CONFIG.algolia.languages.input_placeholder
- })
- )
- search.addWidget(
- instantsearch.widgets.hits({
- container: '#algolia-hits',
- templates: {
- item: function (data) {
- var link = data.permalink ? data.permalink : (GLOBAL_CONFIG.root + data.path)
- return (
- '
' +
- data._highlightResult.title.value +
- ' '
- )
- },
- empty: function (data) {
- return (
- '
' +
- GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/, data.query) +
- '
'
- )
- }
- },
- cssClasses: {
- item: 'algolia-hit-item'
- }
- })
- )
-
- search.addWidget(
- instantsearch.widgets.stats({
- container: '#algolia-stats',
- templates: {
- body: function (data) {
- var stats = GLOBAL_CONFIG.algolia.languages.hits_stats
- .replace(/\$\{hits}/, data.nbHits)
- .replace(/\$\{time}/, data.processingTimeMS)
- return (
- '
' +
- stats +
- '
' +
- ' ' +
- ' '
- )
- }
- }
- })
- )
-
- search.addWidget(
- instantsearch.widgets.pagination({
- container: '#algolia-pagination',
- scrollTo: false,
- showFirstLast: false,
- labels: {
- first: '
',
- last: '
',
- previous: '
',
- next: '
'
- },
- cssClasses: {
- root: 'pagination',
- item: 'pagination-item',
- link: 'page-number',
- active: 'current',
- disabled: 'disabled-item'
- }
- })
- )
-
- search.start()
-})
\ No newline at end of file
diff --git a/source/js/search/local-search.js b/source/js/search/local-search.js
deleted file mode 100644
index 97a231c..0000000
--- a/source/js/search/local-search.js
+++ /dev/null
@@ -1,111 +0,0 @@
-$(function () {
- var loadFlag = false
- $('a.social-icon.search').on('click', function () {
- $('body').css('width', '100%')
- $('body').css('overflow', 'hidden')
- $('.search-dialog').animate({}, function () {
- $('.search-dialog').css({
- 'display': 'block'
- }),300
- })
- $('#local-search-input input').focus()
-
- $('.search-mask').fadeIn();
- if (!loadFlag) {
- search(GLOBAL_CONFIG.localSearch.path)
- loadFlag = true
- }
-
- // shortcut: ESC
- document.addEventListener('keydown', function f(event) {
- if (event.code === 'Escape') {
- closeSearch()
- document.removeEventListener('keydown', f)
- }
- })
- })
-
- var closeSearch = function () {
- $('body').css('width', '')
- $('body').css('overflow', '')
- $('.search-dialog').css({
- 'animation': 'search_close .5s'
- })
-
- $('.search-dialog').animate({}, function () {
-
- setTimeout(function () {
- $('.search-dialog').css({
- 'animation': '',
- 'display': 'none'
- })
- },500)
- })
-
- $('.search-mask').fadeOut();
- }
- $('.search-mask, .search-close-button').on('click', closeSearch)
-
- function search(path) {
- $.ajax({
- url: GLOBAL_CONFIG.root + path,
- dataType: 'xml',
- success: function (xmlResponse) {
- // get the contents from search data
- var datas = $('entry', xmlResponse).map(function () {
- return {
- title: $('title', this).text(),
- content: $('content', this).text(),
- url: $('url', this).text()
- }
- }).get()
- var $input = $('#local-search-input input')[0]
- var $resultContent = $('#local-hits')[0]
- $input.addEventListener('input', function () {
- var str = '
'
- var keywords = this.value.trim().toLowerCase().split(/[\s]+/)
- $resultContent.innerHTML = ''
- if (this.value.trim().length <= 0) {
- $('.local-search-stats__hr').hide()
- return
- }
- var count = 0
- // perform local searching
- datas.forEach(function (data) {
- var isMatch = true
- var dataTitle = data.title.trim().toLowerCase()
- var dataContent = data.content.trim().replace(/<[^>]+>/g, '').toLowerCase()
- var dataUrl = data.url
- var indexTitle = -1
- var indexContent = -1
- // only match artiles with not empty titles and contents
- if (dataTitle !== '' && dataContent !== '') {
- keywords.forEach(function (keyword, i) {
- indexTitle = dataTitle.indexOf(keyword)
- indexContent = dataContent.indexOf(keyword)
- if (indexTitle < 0 && indexContent < 0) {
- isMatch = false
- } else {
- if (indexContent < 0) {
- indexContent = 0
- }
- }
- })
- }
- // show search results
- if (isMatch) {
- str += '
'
- count += 1
- $('.local-search-stats__hr').show()
- }
- })
- if (count === 0) {
- str += '
' + GLOBAL_CONFIG.localSearch.languages.hits_empty.replace(/\$\{query}/, this.value.trim()) +
- '
'
- }
- $resultContent.innerHTML = str
- })
- }
- })
- }
-})
\ No newline at end of file
diff --git a/source/js/third-party/ClickShowText.js b/source/js/third-party/ClickShowText.js
deleted file mode 100644
index 3098485..0000000
--- a/source/js/third-party/ClickShowText.js
+++ /dev/null
@@ -1,42 +0,0 @@
- 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 = $("
").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();
- });
- });
- });
\ No newline at end of file
diff --git a/source/js/third-party/activate-power-mode.js b/source/js/third-party/activate-power-mode.js
deleted file mode 100644
index f5163d7..0000000
--- a/source/js/third-party/activate-power-mode.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.POWERMODE=e():t.POWERMODE=e()}(this,function(){return function(o){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={exports:{},id:t,loaded:!1};return o[t].call(e.exports,e,e.exports,r),e.loaded=!0,e.exports}return r.m=o,r.c=n,r.p="",r(0)}([function(t,e,l){"use strict";var r=document.createElement("canvas");r.width=window.innerWidth,r.height=window.innerHeight,r.style.cssText="position:fixed;top:0;left:0;pointer-events:none;z-index:999999",window.addEventListener("resize",function(){r.width=window.innerWidth,r.height=window.innerHeight}),document.body.appendChild(r);var i=r.getContext("2d"),c=[],u=0,p=!1;function o(t,e){return Math.random()*(e-t)+t}function f(t){if(h.colorful){var e=o(0,360);return"hsla("+o(e-10,e+10)+", 100%, "+o(50,80)+"%, 1)"}return window.getComputedStyle(t).color}function h(){for(var t=function(){var t,e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName&&"text"===e.getAttribute("type")){var o=l(1)(e,e.selectionEnd);return t=e.getBoundingClientRect(),{x:o.left+t.left,y:o.top+t.top,color:f(e)}}var n=window.getSelection();if(n.rangeCount){var r=n.getRangeAt(0),i=r.startContainer;return i.nodeType===document.TEXT_NODE&&(i=i.parentNode),{x:(t=r.getBoundingClientRect()).left,y:t.top,color:f(i)}}return{x:0,y:0,color:"transparent"}}(),e=5+Math.round(10*Math.random());e--;)c[u]=(o=t.x,n=t.y,r=t.color,{x:o,y:n,alpha:1,color:r,velocity:{x:2*Math.random()-1,y:2*Math.random()-3.5}}),u=(u+1)%500;var o,n,r;if(h.shake){var i=1+2*Math.random(),a=i*(.5
parseInt(d.height)&&(a.overflowY="scroll"):a.overflow="hidden",i.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(i.textContent=i.textContent.replace(/\s/g," "));var l=document.createElement("span");l.textContent=t.value.substring(e)||".",i.appendChild(l);var c={top:l.offsetTop+parseInt(d.borderTopWidth),left:l.offsetLeft+parseInt(d.borderLeftWidth)};return n?l.style.backgroundColor="#aaa":document.body.removeChild(i),c}void 0!==e&&void 0!==e.exports?e.exports=t:window.getCaretCoordinates=t}()}])});
\ No newline at end of file
diff --git a/source/js/third-party/anime.min.js b/source/js/third-party/anime.min.js
deleted file mode 100644
index ac408dd..0000000
--- a/source/js/third-party/anime.min.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- 2017 Julian Garnier
- Released under the MIT license
-*/
-var $jscomp$this=this;
-(function(v,p){"function"===typeof define&&define.amd?define([],p):"object"===typeof module&&module.exports?module.exports=p():v.anime=p()})(this,function(){function v(a){if(!g.col(a))try{return document.querySelectorAll(a)}catch(b){}}function p(a){return a.reduce(function(a,d){return a.concat(g.arr(d)?p(d):d)},[])}function w(a){if(g.arr(a))return a;g.str(a)&&(a=v(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]}function F(a,b){return a.some(function(a){return a===b})}
-function A(a){var b={},d;for(d in a)b[d]=a[d];return b}function G(a,b){var d=A(a),c;for(c in a)d[c]=b.hasOwnProperty(c)?b[c]:a[c];return d}function B(a,b){var d=A(a),c;for(c in b)d[c]=g.und(a[c])?b[c]:a[c];return d}function S(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,d,h){return b+b+d+d+h+h});var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);a=parseInt(b[1],16);var d=parseInt(b[2],16),b=parseInt(b[3],16);return"rgb("+a+","+d+","+b+")"}function T(a){function b(a,b,c){0>
-c&&(c+=1);1c?b:c<2/3?a+(b-a)*(2/3-c)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a);a=parseInt(d[1])/360;var c=parseInt(d[2])/100,d=parseInt(d[3])/100;if(0==c)c=d=a=d;else{var e=.5>d?d*(1+c):d+c-d*c,l=2*d-e,c=b(l,e,a+1/3),d=b(l,e,a);a=b(l,e,a-1/3)}return"rgb("+255*c+","+255*d+","+255*a+")"}function x(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg|rad|turn)?/.exec(a))return a[2]}function U(a){if(-1=f.currentTime)for(var u=0;ul&&r=n&&(f.began=!0,e("begin")),e("run")):(r<=l&&0!==P&&(c(0),q&&g()),r>=h&&P!==h&&(c(h),q||g()));a>=h&&(f.remaining?(t=m,"alternate"===f.direction&&(f.reversed=!f.reversed)):(f.pause(),"Promise"in window&&(Q(),R=b()),f.completed||(f.completed=!0,e("complete"))),
-k=0);e("update")}a=void 0===a?{}:a;var m,t,k=0,Q=null,R=b(),f=fa(a);f.reset=function(){var a=f.direction,b=f.loop;f.currentTime=0;f.progress=0;f.paused=!0;f.began=!1;f.completed=!1;f.reversed="reverse"===a;f.remaining="alternate"===a&&1===b?2:b;for(a=f.children.length;a--;)b=f.children[a],b.seek(b.offset),b.reset()};f.tick=function(a){m=a;t||(t=m);h((k+m-t)*n.speed)};f.seek=function(a){h(d(a))};f.pause=function(){var a=q.indexOf(f);-1=b&&0<=c&&1>=c){var g=new Float32Array(11);if(b!==d||c!==e)for(var h=0;11>h;++h)g[h]=a(.1*h,b,c);return function(h){if(b===d&&c===e)return h;if(0===h)return 0;if(1===h)return 1;for(var m=0,k=1;10!==k&&g[k]<=h;++k)m+=.1;--k;var k=m+(h-g[k])/(g[k+1]-g[k])*.1,l=3*(1-3*c+3*b)*k*k+2*(3*c-6*b)*k+3*b;if(.001<=l){for(m=0;4>m;++m){l=3*(1-3*c+3*b)*k*k+2*(3*c-6*b)*k+3*b;if(0===l)break;
-var n=a(k,b,c)-h,k=k-n/l}h=k}else if(0===l)h=k;else{var k=m,m=m+.1,f=0;do n=k+(m-k)/2,l=a(n,b,c)-h,0++f);h=n}return a(h,d,e)}}}}(),N=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var b="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,
-.335],[.6,-.28,.735,.045],a],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},c={linear:y(.25,.25,.75,.75)},e={},l;for(l in d)e.type=l,d[e.type].forEach(function(a){return function(d,
-e){c["ease"+a.type+b[e]]=g.fnc(d)?d:y.apply($jscomp$this,d)}}(e)),e={type:e.type};return c}(),ia={css:function(a,b,d){return a.style[b]=d},attribute:function(a,b,d){return a.setAttribute(b,d)},object:function(a,b,d){return a[b]=d},transform:function(a,b,d,c,e){c[e]||(c[e]=[]);c[e].push(b+"("+d+")")}},q=[],z=0,ja=function(){function a(){z=requestAnimationFrame(b)}function b(b){var c=q.length;if(c){for(var d=0;dc&&(b.duration=a.duration);a.began=!0;b.children.push(a)});b.reset();b.seek(0);b.autoplay&&b.restart();return b};return b};n.random=function(a,b){return Math.floor(Math.random()*(b-a+1))+a};return n});
\ No newline at end of file
diff --git a/source/js/third-party/canvas-nest.js b/source/js/third-party/canvas-nest.js
deleted file mode 100644
index 50d3e87..0000000
--- a/source/js/third-party/canvas-nest.js
+++ /dev/null
@@ -1,88 +0,0 @@
-! 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)
-}();
\ No newline at end of file
diff --git a/source/js/third-party/canvas-ribbon.js b/source/js/third-party/canvas-ribbon.js
deleted file mode 100644
index 74bce99..0000000
--- a/source/js/third-party/canvas-ribbon.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2016 hustcc
- * License: MIT
- * Version: v1.0.1
- * GitHub: https://github.com/hustcc/ribbon.js
- **/
-
-!(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) {
- if (default_value === true) {
- return node.getAttribute(attr) || default_value
- }
- return Number(node.getAttribute(attr)) || default_value
- }
-
- var canvas = document.createElement('canvas'),
- g2d = canvas.getContext('2d'),
- pr = window.devicePixelRatio || 1,
- width = window.innerWidth,
- height = window.innerHeight,
- f = config.s,
- q,
- t,
- m = Math,
- r = 0,
- pi = m.PI * 2,
- cos = m.cos,
- random = m.random
- canvas.width = width * pr
- canvas.height = height * pr
- g2d.scale(pr, pr)
- g2d.globalAlpha = config.a
- canvas.style.cssText =
- 'opacity: ' +
- config.a +
- ';position:fixed;top:0;left:0;z-index: ' +
- config.z +
- ';width:100%;height:100%;pointer-events:none;'
- // create canvas
- document.getElementsByTagName('body')[0].appendChild(canvas)
-
- function redraw () {
- g2d.clearRect(0, 0, width, height)
- q = [{ x: 0, y: height * 0.7 + f }, { x: 0, y: height * 0.7 - f }]
- while (q[1].x < width + f) draw(q[0], q[1])
- }
- function draw (i, j) {
- g2d.beginPath()
- g2d.moveTo(i.x, i.y)
- g2d.lineTo(j.x, j.y)
- var k = j.x + (random() * 2 - 0.25) * f,
- n = line(j.y)
- g2d.lineTo(k, n)
- g2d.closePath()
- r -= pi / -50
- g2d.fillStyle =
- '#' +
- (
- ((cos(r) * 127 + 128) << 16) |
- ((cos(r + pi / 3) * 127 + 128) << 8) |
- (cos(r + (pi / 3) * 2) * 127 + 128)
- ).toString(16)
- g2d.fill()
- q[0] = q[1]
- q[1] = { x: k, y: n }
- }
- function line (p) {
- t = p + (random() * 2 - 1.1) * f
- return t > height || t < 0 ? line(p) : t
- }
- if (config.c !== 'false') {
- document.onclick = redraw
- document.ontouchstart = redraw
- }
- redraw()
-})()
\ No newline at end of file
diff --git a/source/js/third-party/click_heart.js b/source/js/third-party/click_heart.js
deleted file mode 100644
index e38e169..0000000
--- a/source/js/third-party/click_heart.js
+++ /dev/null
@@ -1 +0,0 @@
-!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',preload:!0,css:{},attr:{scrolling:"auto"}},animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'',spinnerTpl:'
',errorTpl:'',btnTpl:{slideShow:' ',fullScreen:' ',thumbs:' ',close:' ',smallBtn:' '},parentEl:"body",autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:4e3},thumbs:{autoStart:!1,hideOnClose:!0},onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},u=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),d=function(){var t,n=e.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(n.style[t]!==o)return i[t]}(),f=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,o,i){var s=this;s.opts=n.extend(!0,{index:i},a,o||{}),o&&n.isArray(o.buttons)&&(s.opts.buttons=o.buttons),s.id=s.opts.id||++c,s.group=[],s.currIndex=parseInt(s.opts.index,10)||0,s.prevIndex=null,s.prevPos=null,s.currPos=0,s.firstRun=null,s.createGroup(t),s.group.length&&(s.$lastFocus=n(e.activeElement).blur(),s.slides={},s.init(t))};n.extend(h.prototype,{init:function(){var t,e,o,i=this,a=i.group[i.currIndex].opts;i.scrollTop=r.scrollTop(),i.scrollLeft=r.scrollLeft(),n.fancybox.getInstance()||n.fancybox.isMobile||"hidden"===n("body").css("overflow")||(t=n("body").width(),n("html").addClass("fancybox-enabled"),t=n("body").width()-t,t>1&&n("head").append('")),o="",n.each(a.buttons,function(t,e){o+=a.btnTpl[e]||""}),e=n(i.translate(i,a.baseTpl.replace("{{BUTTONS}}",o))).addClass("fancybox-is-hidden").attr("id","fancybox-container-"+i.id).addClass(a.baseClass).data("FancyBox",i).prependTo(a.parentEl),i.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption"].forEach(function(t){i.$refs[t]=e.find(".fancybox-"+t)}),(!a.arrows||i.group.length<2)&&e.find(".fancybox-navigation").remove(),a.infobar||i.$refs.infobar.remove(),a.toolbar||i.$refs.toolbar.remove(),i.trigger("onInit"),i.activate(),i.jumpTo(i.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang];return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var i=n[e];return i===o?t:i})},createGroup:function(t){var e=this,i=n.makeArray(t);n.each(i,function(t,i){var a,s,r,c,l={},u={},d=[];n.isPlainObject(i)?(l=i,u=i.opts||i):"object"===n.type(i)&&n(i).length?(a=n(i),d=a.data(),u="options"in d?d.options:{},u="object"===n.type(u)?u:{},l.src="src"in d?d.src:u.src||a.attr("href"),["width","height","thumb","type","filter"].forEach(function(t){t in d&&(u[t]=d[t])}),"srcset"in d&&(u.image={srcset:d.srcset}),u.$orig=a,l.type||l.src||(l.type="inline",l.src=i)):l={type:"html",src:i+""},l.opts=n.extend(!0,{},e.opts,u),n.fancybox.isMobile&&(l.opts=n.extend(!0,{},l.opts,l.opts.mobile)),s=l.type||l.opts.type,r=l.src||"",!s&&r&&(r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":r.match(/\.(pdf)((\?|#).*)?$/i)?s="pdf":"#"===r.charAt(0)&&(s="inline")),l.type=s,l.index=e.group.length,l.opts.$orig&&!l.opts.$orig.length&&delete l.opts.$orig,!l.opts.$thumb&&l.opts.$orig&&(l.opts.$thumb=l.opts.$orig.find("img:first")),l.opts.$thumb&&!l.opts.$thumb.length&&delete l.opts.$thumb,"function"===n.type(l.opts.caption)?l.opts.caption=l.opts.caption.apply(i,[e,l]):"caption"in d&&(l.opts.caption=d.caption),l.opts.caption=l.opts.caption===o?"":l.opts.caption+"","ajax"===s&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),"auto"==l.opts.smallBtn&&(n.inArray(s,["html","inline","ajax"])>-1?(l.opts.toolbar=!1,l.opts.smallBtn=!0):l.opts.smallBtn=!1),"pdf"===s&&(l.type="iframe",l.opts.iframe.preload=!1),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),e.group.push(l)})},addEvents:function(){var o=this;o.removeEvents(),o.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),o.close(t)}).on("click.fb-prev touchend.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),o.previous()}).on("click.fb-next touchend.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),o.next()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?u(function(){o.update()}):(o.$refs.stage.hide(),setTimeout(function(){o.$refs.stage.show(),o.update()},500))}),r.on("focusin.fb",function(t){var i=n.fancybox?n.fancybox.getInstance():null;i.isClosing||!i.current||!i.current.opts.trapFocus||n(t.target).hasClass("fancybox-container")||n(t.target).is(e)||i&&"fixed"!==n(t.target).css("position")&&!i.$refs.container.has(t.target).length&&(t.stopPropagation(),i.focus(),s.scrollTop(o.scrollTop).scrollLeft(o.scrollLeft))}),r.on("keydown.fb",function(t){var e=o.current,i=t.keyCode||t.which;if(e&&e.opts.keyboard&&!n(t.target).is("input")&&!n(t.target).is("textarea"))return 8===i||27===i?(t.preventDefault(),void o.close(t)):37===i||38===i?(t.preventDefault(),void o.previous()):39===i||40===i?(t.preventDefault(),void o.next()):void o.trigger("afterKeydown",t,i)}),o.group[o.currIndex].opts.idleTime&&(o.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseenter.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(){o.idleSecondsCounter=0,o.isIdle&&o.showControls(),o.isIdle=!1}),o.idleInterval=t.setInterval(function(){o.idleSecondsCounter++,o.idleSecondsCounter>=o.group[o.currIndex].opts.idleTime&&(o.isIdle=!0,o.idleSecondsCounter=0,o.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("focusin.fb keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e,i){var a,s,r,c,l,u,d,h=this,p=h.group.length;if(!(h.isSliding||h.isClosing||h.isAnimating&&h.firstRun)){if(t=parseInt(t,10),s=h.current?h.current.opts.loop:h.opts.loop,!s&&(t<0||t>=p))return!1;if(a=h.firstRun=null===h.firstRun,!(p<2&&!a&&h.isSliding)){if(c=h.current,h.prevIndex=h.currIndex,h.prevPos=h.currPos,r=h.createSlide(t),p>1&&((s||r.index>0)&&h.createSlide(t-1),(s||r.indexr.pos?"next":"previous"),c.$slide.removeClass("fancybox-slide--complete fancybox-slide--current fancybox-slide--next fancybox-slide--previous"),c.isComplete=!1,e&&(r.isMoved||r.opts.transitionEffect)&&(r.isMoved?c.$slide.addClass(d):(d="fancybox-animated "+d+" fancybox-fx-"+r.opts.transitionEffect,n.fancybox.animate(c.$slide,d,e,function(){c.$slide.removeClass(d).removeAttr("style")}))))}}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('
').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,i){var a,s,r,c,l,u=this,d=u.current,f=d.$content,h=parseInt(d.$slide.width(),10),p=parseInt(d.$slide.height(),10),g=d.width,b=d.height;"image"!=d.type||d.hasError||!f||u.isAnimating||(n.fancybox.stop(f),u.isAnimating=!0,t=t===o?.5*h:t,e=e===o?.5*p:e,a=n.fancybox.getTranslate(f),c=g/a.width,l=b/a.height,s=.5*h-.5*g,r=.5*p-.5*b,g>h&&(s=a.left*c-(t*c-t),s>0&&(s=0),sp&&(r=a.top*l-(e*l-e),r>0&&(r=0),rt.width||o.height>t.height))},isScaledDown:function(){var t=this,e=t.current,o=e.$content,i=!1;return o&&(i=n.fancybox.getTranslate(o),i=i.width1||Math.abs(n.height()-o.height)>1),o},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){switch(t.isLoading=!0,a.trigger("beforeLoad",t),e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass("fancybox-slide--"+(e||"unknown")).addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(e){var o,i,a,s,r=this,c=e.opts.image.srcset;if(c){a=t.devicePixelRatio||1,s=t.innerWidth*a,i=c.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&&(e.value=o,e.postfix=t[t.length-1]))}),e}),i.sort(function(t,e){return t.value-e.value});for(var l=0;l=s||"x"===u.postfix&&u.value>=a){o=u;break}}!o&&i.length&&(o=i[i.length-1]),o&&(e.src=o.url,e.width&&e.height&&"w"==o.postfix&&(e.height=e.width/e.height*o.value,e.width=o.value))}e.$content=n('
').addClass("fancybox-is-hidden").appendTo(e.$slide),e.opts.preload!==!1&&e.opts.width&&e.opts.height&&(e.opts.thumb||e.opts.$thumb)?(e.width=e.opts.width,e.height=e.opts.height,e.$ghost=n(" ").one("error",function(){n(this).remove(),e.$ghost=null,r.setBigImage(e)}).one("load",function(){r.afterLoad(e),r.setBigImage(e)}).addClass("fancybox-image").appendTo(e.$content).attr("src",e.opts.thumb||e.opts.$thumb.attr("src"))):r.setBigImage(e)},setBigImage:function(t){var e=this,o=n(" ");t.$image=o.one("error",function(){e.setError(t)}).one("load",function(){clearTimeout(t.timouts),t.timouts=null,e.isClosing||(t.width=this.naturalWidth,t.height=this.naturalHeight,t.opts.image.srcset&&o.attr("sizes","100vw").attr("srcset",t.opts.image.srcset),e.hideLoading(t),t.$ghost?t.timouts=setTimeout(function(){t.timouts=null,t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))):e.afterLoad(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),o[0].complete?o.trigger("load"):o[0].error?o.trigger("error"):t.timouts=setTimeout(function(){o[0].complete||t.hasError||e.showLoading(t)},100)},setIframe:function(t){var e,i=this,a=t.opts.iframe,s=t.$slide;t.$content=n('
').css(a.css).appendTo(s),e=n(a.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(a.attr).appendTo(t.$content),a.preload?(i.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),i.afterLoad(t)}),s.on("refresh.fb",function(){var n,i,s,r,c,l=t.$content;if(1===e[0].isReady){try{n=e.contents(),i=n.find("body")}catch(t){}i&&i.length&&(a.css.width===o||a.css.height===o)&&(s=e[0].contentWindow.document.documentElement.scrollWidth,r=Math.ceil(i.outerWidth(!0)+(l.width()-s)),c=Math.ceil(i.outerHeight(!0)),l.css({width:a.css.width===o?r+(l.outerWidth()-l.innerWidth()):a.css.width,height:a.css.height===o?c+(l.outerHeight()-l.innerHeight()):a.css.height})),l.removeClass("fancybox-is-hidden")}})):this.afterLoad(t),e.attr("src",t.src),t.opts.smallBtn===!0&&t.$content.prepend(i.translate(t,t.opts.btnTpl.smallBtn)),s.one("onReset",function(){try{n(this).find("iframe").hide().attr("src","//about:blank")}catch(t){}n(this).empty(),t.isLoaded=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$slide.empty(),l(e)&&e.parent().length?(e.parent(".fancybox-slide--inline").trigger("onReset"),t.$placeholder=n("
").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("").append(n.trim(e)).contents(),3===e[0].nodeType&&(e=n("
").html(e))),t.opts.filter&&(e=n("
").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){t.$placeholder&&(t.$placeholder.after(e.hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1)}),t.$content=n(e).appendTo(t.$slide),t.opts.smallBtn&&!t.$smallBtn&&(t.$smallBtn=n(o.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.removeClass("fancybox-slide--"+t.type),this.setContent(t,this.translate(t,t.opts.errorTpl))},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.opts.spinnerTpl).appendTo(t.$slide))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('
').appendTo(t.$content)),e.revealContent(t))},revealContent:function(t){var e,i,a,s,r,c=this,l=t.$slide,u=!1;return e=t.opts[c.firstRun?"animationEffect":"transitionEffect"],a=t.opts[c.firstRun?"animationDuration":"transitionDuration"],a=parseInt(t.forcedDuration===o?a:t.forcedDuration,10),!t.isMoved&&t.pos===c.currPos&&a||(e=!1),"zoom"!==e||t.pos===c.currPos&&a&&"image"===t.type&&!t.hasError&&(u=c.getThumbPos(t))||(e="fade"),"zoom"===e?(r=c.getFitPos(t),r.scaleX=Math.round(r.width/u.width*100)/100,r.scaleY=Math.round(r.height/u.height*100)/100,delete r.width,delete r.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-u.width/u.height)>.1),s&&(u.opacity=.1,r.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),u),f(t.$content),void n.fancybox.animate(t.$content,r,a,function(){c.complete()})):(c.updateSlide(t),e?(n.fancybox.stop(l),i="fancybox-animated fancybox-slide--"+(t.pos>c.prevPos?"next":"previous")+" fancybox-fx-"+e,l.removeAttr("style").removeClass("fancybox-slide--current fancybox-slide--next fancybox-slide--previous").addClass(i),t.$content.removeClass("fancybox-is-hidden"),f(l),void n.fancybox.animate(l,"fancybox-slide--current",a,function(e){l.removeClass(i).removeAttr("style"),t.pos===c.currPos&&c.complete()},!0)):(f(l),t.$content.removeClass("fancybox-is-hidden"),void(t.pos===c.currPos&&c.complete())))},getThumbPos:function(o){var i,a=this,s=!1,r=function(e){for(var o,i=e[0],a=i.getBoundingClientRect(),s=[];null!==i.parentElement;)"hidden"!==n(i.parentElement).css("overflow")&&"auto"!==n(i.parentElement).css("overflow")||s.push(i.parentElement.getBoundingClientRect()),i=i.parentElement;return o=s.every(function(t){var e=Math.min(a.right,t.right)-Math.max(a.left,t.left),n=Math.min(a.bottom,t.bottom)-Math.max(a.top,t.top);return e>0&&n>0}),o&&a.bottom>0&&a.right>0&&a.left
=t.currPos-1&&o.pos<=t.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.unbind().remove())}),t.slides=i,t.updateCursor(),t.trigger("afterShow"),(n(e.activeElement).is("[disabled]")||o.opts.autoFocus&&"image"!=o.type&&"iframe"!==o.type)&&t.focus())},preload:function(){var t,e,n=this;n.group.length<2||(t=n.slides[n.currPos+1],e=n.slides[n.currPos-1],t&&"image"===t.type&&n.loadSlide(t),e&&"image"===e.type&&n.loadSlide(e))},focus:function(){var t,e=this.current;this.isClosing||(t=e&&e.isComplete?e.$slide.find("button,:input,[tabindex],a").filter(":not([disabled]):visible:first"):null,t=t&&t.length?t:this.$refs.container,t.focus())},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.uid!==t.uid&&!e.isClosing&&e.trigger("onDeactivate")}),t.current&&(t.$refs.container.index()>0&&t.$refs.container.prependTo(e.body),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l=this,f=l.current,h=function(){l.cleanUp(t)};return!l.isClosing&&(l.isClosing=!0,l.trigger("beforeClose",t)===!1?(l.isClosing=!1,u(function(){l.update()}),!1):(l.removeEvents(),f.timouts&&clearTimeout(f.timouts),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.off(d).removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),f.$slide.siblings().trigger("onReset").remove(),i&&l.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing"),l.hideLoading(f),l.hideControls(),l.updateCursor(),"zoom"!==o||t!==!0&&a&&i&&"image"===f.type&&!f.hasError&&(c=l.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),r=n.fancybox.getTranslate(a),r.width=r.width*r.scaleX,r.height=r.height*r.scaleY,s=f.opts.zoomOpacity,"auto"==s&&(s=Math.abs(f.width/f.height-c.width/c.height)>.1),s&&(c.opacity=0),r.scaleX=r.width/c.width,r.scaleY=r.height/c.height,r.width=c.width,r.height=c.height,n.fancybox.setTranslate(f.$content,r),n.fancybox.animate(f.$content,c,i,h),!0):(o&&i?t===!0?setTimeout(h,i):n.fancybox.animate(f.$slide.removeClass("fancybox-slide--current"),"fancybox-animated fancybox-slide--previous fancybox-fx-"+o,i,h):h(),!0)))},cleanUp:function(t){var e,o=this;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.$lastFocus&&!o.current.focusBack&&o.$lastFocus.focus(),o.current=null,e=n.fancybox.getInstance(),e?e.activate():(s.scrollTop(o.scrollTop).scrollLeft(o.scrollLeft),n("html").removeClass("fancybox-enabled"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;return s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),o===!1?o:void("afterClose"===t?r.trigger(t+".fb",i):a.$refs.container.trigger(t+".fb",i))},updateControls:function(t){var e=this,o=e.current,i=o.index,a=o.opts,s=a.caption,r=e.$refs.caption;o.$slide.trigger("refresh"),e.$caption=s&&s.length?r.html(s):null,e.isHiddenControls||e.showControls(),n("[data-fancybox-count]").html(e.group.length),n("[data-fancybox-index]").html(i+1),n("[data-fancybox-prev]").prop("disabled",!a.loop&&i<=0),n("[data-fancybox-next]").prop("disabled",!a.loop&&i>=e.group.length-1)},hideControls:function(){this.isHiddenControls=!0,this.$refs.container.removeClass("fancybox-show-infobar fancybox-show-toolbar fancybox-show-caption fancybox-show-nav")},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.isHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal),t.$caption?n.addClass("fancybox-show-caption "):n.removeClass("fancybox-show-caption")},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.1.20",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):first').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof h&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new h(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close())},destroy:function(){this.close(!0),r.off("click.fb-start")},isMobile:e.createTouch!==o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;if(!t||!t.length)return!1;if(e=t.eq(0).css("transform"),e&&e.indexOf("matrix")!==-1?(e=e.split("(")[1],e=e.split(")")[0],e=e.split(",")):e=[],e.length)e=e.length>10?[e[13],e[12],e[0],e[5]]:[e[5],e[4],e[0],e[3]],e=e.map(parseFloat);else{e=[0,0,1,1];var n=/\.*translate\((.*)px,(.*)px\)/i,o=n.exec(t.eq(0).attr("style"));o&&(e[0]=parseFloat(o[2]),e[1]=parseFloat(o[1]))}return{top:e[0],left:e[1],scaleX:e[2],scaleY:e[3],opacity:parseFloat(t.css("opacity")),width:t.width(),height:t.height()}},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){var r=d||"transitionend";n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),t.on(r,function(i){(!i||!i.originalEvent||t.is(i.originalEvent.target)&&"z-index"!=i.originalEvent.propertyName)&&(t.off(r),n.isPlainObject(e)?e.scaleX!==o&&e.scaleY!==o&&(t.css("transition-duration","0ms"),e.width=t.width()*e.scaleX,e.height=t.height()*e.scaleY,e.scaleX=1,e.scaleY=1,n.fancybox.setTranslate(t,e)):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(i))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?n.fancybox.setTranslate(t,e):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger("transitionend")},i+16))},stop:function(t){clearTimeout(t.data("timer")),t.off(d)}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{items:n(e),options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i)}}(window,document,window.jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:"iframe",url:"//www.metacafe.com/embed/$1/?ap=1"},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"iframe",url:"//www.dailymotion.com/embed/video/$1"},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:"iframe",url:"//vine.co/v/$1/embed/simple"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},google_maps:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12])+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}}};t(document).on("onInit.fb",function(o,i){t.each(i.group,function(o,i){var a,s,r,c,l,u,d,f=i.src||"",h=!1;i.type||(a=t.extend(!0,{},n,i.opts.media),t.each(a,function(n,o){if(r=f.match(o.matcher),u={},d=n,r){if(h=o.type,o.paramPlace&&r[o.paramPlace]){l=r[o.paramPlace],"?"==l[0]&&(l=l.substring(1)),l=l.split("&");for(var a=0;ae.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},u=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};u.prototype.destroy=function(){this.$container.off(".fb.touch")},u.prototype.ontouchstart=function(o){var i=this,c=n(o.target),u=i.instance,d=u.current,f=d.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),!d||i.instance.isAnimating||i.instance.isClosing)return o.stopPropagation(),void o.preventDefault();if((!o.originalEvent||2!=o.originalEvent.button)&&c.length&&!r(c)&&!r(c.parent())&&!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left)&&(i.startPoints=a(o),i.startPoints&&!(i.startPoints.length>1&&u.isSliding))){if(i.$target=c,i.$content=f,i.canTap=!0,n(e).off(".fb.touch"),n(e).on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")),n(e).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),o.stopPropagation(),!u.current.opts.touch&&!u.canPan()||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is("img")&&o.preventDefault());n.fancybox.isMobile&&(l(i.$target)||l(i.$target.parent()))||o.preventDefault(),i.canvasWidth=Math.round(d.$slide[0].clientWidth),i.canvasHeight=Math.round(d.$slide[0].clientHeight),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.sliderStartPos=i.sliderLastPos||{top:0,left:0},i.contentStartPos=n.fancybox.getTranslate(i.$content),i.contentLastPos=null,1!==i.startPoints.length||i.isZooming||(i.canTap=!u.isSliding,"image"===d.type&&(i.contentStartPos.width>i.canvasWidth+1||i.contentStartPos.height>i.canvasHeight+1)?(n.fancybox.stop(i.$content),i.$content.css("transition-duration","0ms"),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-controls--isGrabbing")),2!==i.startPoints.length||u.isAnimating||d.hasError||"image"!==d.type||!d.isLoaded&&!d.$ghost||(i.isZooming=!0,i.isSwiping=!1,i.isPanning=!1,n.fancybox.stop(i.$content),i.$content.css("transition-duration","0ms"),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))}},u.prototype.ontouchmove=function(t){var e=this;if(e.newPoints=a(t),n.fancybox.isMobile&&(l(e.$target)||l(e.$target.parent())))return t.stopPropagation(),void(e.canTap=!1);if((e.instance.current.opts.touch||e.instance.canPan())&&e.newPoints&&e.newPoints.length&&(e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0)){if(!e.$target.is(e.$stage)&&!e.$stage.find(e.$target).length)return;t.stopPropagation(),t.preventDefault(),e.isSwiping?e.onSwipe():e.isPanning?e.onPan():e.isZooming&&e.onZoom()}},u.prototype.onSwipe=function(){var e,a=this,s=a.isSwiping,r=a.sliderStartPos.left||0;s===!0?Math.abs(a.distance)>10&&(a.canTap=!1,a.instance.group.length<2&&a.instance.opts.touch.vertical?a.isSwiping="y":a.instance.isSliding||a.instance.opts.touch.vertical===!1||"auto"===a.instance.opts.touch.vertical&&n(t).width()>800?a.isSwiping="x":(e=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=e>45&&e<135?"y":"x"),a.instance.isSliding=a.isSwiping,a.startPoints=a.newPoints,n.each(a.instance.slides,function(t,e){n.fancybox.stop(e.$slide),e.$slide.css("transition-duration","0ms"),e.inTransition=!1,e.pos===a.instance.current.pos&&(a.sliderStartPos.left=n.fancybox.getTranslate(e.$slide).left)}),a.instance.SlideShow&&a.instance.SlideShow.isActive&&a.instance.SlideShow.stop()):("x"==s&&(a.distanceX>0&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?r+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?r-=Math.pow(-a.distanceX,.8):r+=a.distanceX),a.sliderLastPos={top:"x"==s?0:a.sliderStartPos.top+a.distanceY,left:r},a.requestId&&(i(a.requestId),a.requestId=null),a.requestId=o(function(){a.sliderLastPos&&(n.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("fancybox-is-sliding"))}))},u.prototype.onPan=function(){var t,e,a,s=this;s.canTap=!1,t=s.contentStartPos.width>s.canvasWidth?s.contentStartPos.left+s.distanceX:s.contentStartPos.left,e=s.contentStartPos.top+s.distanceY,a=s.limitMovement(t,e,s.contentStartPos.width,s.contentStartPos.height),a.scaleX=s.contentStartPos.scaleX,a.scaleY=s.contentStartPos.scaleY,s.contentLastPos=a,s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){n.fancybox.setTranslate(s.$content,s.contentLastPos)})},u.prototype.limitMovement=function(t,e,n,o){var i,a,s,r,c=this,l=c.canvasWidth,u=c.canvasHeight,d=c.contentStartPos.left,f=c.contentStartPos.top,h=c.distanceX,p=c.distanceY;return i=Math.max(0,.5*l-.5*n),a=Math.max(0,.5*u-.5*o),s=Math.min(l-n,.5*l-.5*n),r=Math.min(u-o,.5*u-.5*o),n>l&&(h>0&&t>i&&(t=i-1+Math.pow(-i+d+h,.8)||0),h<0&&tu&&(p>0&&e>a&&(e=a-1+Math.pow(-a+f+p,.8)||0),p<0&&ea?(t=t>0?0:t,t=ts?(e=e>0?0:e,e=e50?(n.fancybox.animate(e.instance.current.$slide,{top:e.sliderStartPos.top+e.distanceY+150*e.velocityY,opacity:0},150),o=e.instance.close(!0,300)):"x"==t&&e.distanceX>50&&e.instance.group.length>1?o=e.instance.previous(e.speedX):"x"==t&&e.distanceX<-50&&e.instance.group.length>1&&(o=e.instance.next(e.speedX)),o!==!1||"x"!=t&&"y"!=t||e.instance.jumpTo(e.instance.current.index,150),e.$container.removeClass("fancybox-is-sliding")},u.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.instance.current.opts.touch.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,330))},u.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),rs.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.setTranslate(a.content,n.fancybox.getTranslate(a.$content)),n.fancybox.animate(a.$content,o,150)))},u.prototype.onTap=function(t){var e,o=this,i=n(t.target),s=o.instance,r=s.current,c=t&&a(t)||o.startPoints,l=c[0]?c[0].x-o.$stage.offset().left:0,u=c[0]?c[0].y-o.$stage.offset().top:0,d=function(e){var i=r.opts[e];if(n.isFunction(i)&&(i=i.apply(s,[r,t])),i)switch(i){case"close":s.close(o.startEvent);break;case"toggleControls":s.toggleControls(!0);break;case"next":s.next();break;case"nextOrClose":s.group.length>1?s.next():s.close(o.startEvent);break;case"zoom":"image"==r.type&&(r.isLoaded||r.$ghost)&&(s.canPan()?s.scaleToFit():s.isScaledDown()?s.scaleToActual(l,u):s.group.length<2&&s.close(o.startEvent))}};if(!(t.originalEvent&&2==t.originalEvent.button||s.isSliding||l>i[0].clientWidth+i.offset().left)){if(i.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))e="Outside";else if(i.is(".fancybox-slide"))e="Slide";else{if(!s.current.$content||!s.current.$content.has(t.target).length)return;e="Content"}if(o.tapped){if(clearTimeout(o.tapped),o.tapped=null,Math.abs(l-o.tapX)>50||Math.abs(u-o.tapY)>50||s.isSliding)return this;d("dblclick"+e)}else o.tapX=l,o.tapY=u,r.opts["dblclick"+e]&&r.opts["dblclick"+e]!==r.opts["click"+e]?o.tapped=setTimeout(function(){o.tapped=null,d("click"+e)},300):d("click"+e);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new u(e))}),n(e).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,window.jQuery),function(t,e){"use strict";var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,speed:3e3,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(){var t=this;t.instance&&t.instance.current&&(t.instance.current.opts.loop||t.instance.currIndex1&&t.instance.group[t.instance.currIndex].opts.thumbs&&("image"==e.type||e.opts.thumb||e.opts.$thumb)&&("image"==n.type||n.opts.thumb||n.opts.$thumb)?(t.$button.on("click",function(){t.toggle()}),t.isActive=!0):(t.$button.hide(),t.isActive=!1)},create:function(){var t,n,o=this.instance;this.$grid=e('
').appendTo(o.$refs.container),t="",e.each(o.group,function(e,o){n=o.opts.thumb||(o.opts.$thumb?o.opts.$thumb.attr("src"):null),n||"image"!==o.type||(n=o.src),n&&n.length&&(t+=' ')}),t+=" ",this.$list=e(t).appendTo(this.$grid).on("click","li",function(){o.jumpTo(e(this).data("index"))}),this.$list.find("img").hide().one("load",function(){var t,n,o,i,a=e(this).parent().removeClass("fancybox-thumbs-loading"),s=a.outerWidth(),r=a.outerHeight();t=this.naturalWidth||this.width,n=this.naturalHeight||this.height,o=t/s,i=n/r,o>=1&&i>=1&&(o>i?(t/=i,n=r):(t=s,n/=o)),e(this).css({width:Math.floor(t),height:Math.floor(n),"margin-top":Math.min(0,Math.floor(.3*r-.3*n)),"margin-left":Math.min(0,Math.floor(.5*s-.5*t))}).show()}).each(function(){this.src=e(this).data("src")})},focus:function(){this.instance.current&&this.$list.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+this.instance.current.index+'"]').addClass("fancybox-thumbs-active").focus()},close:function(){this.$grid.hide()},update:function(){this.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus()):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.Thumbs&&(e.Thumbs=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;if(i&&i.isActive){if(n.modal)return i.$button.hide(),void i.hide();o&&e.opts.thumbs.autoStart===!0&&i.show(),i.isVisible&&i.focus()}},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&e.opts.thumbs.hideOnClose!==!1&&n.close()}})}(document,window.jQuery),function(t,e,n){"use strict";function o(){var t=e.location.hash.substr(1),n=t.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return o<1&&(o=1),{hash:t,index:o,gallery:i}}function i(t){var e;""!==t.gallery&&(e=n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1),e.length?e.trigger("click"):n("#"+n.escapeSelector(t.gallery)).trigger("click"))}function a(t){var e;return!!t&&(e=t.current?t.current.opts:t.opts,e.$orig?e.$orig.data("fancybox"):e.hash||"")}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)});var s=null,r=null;n(function(){setTimeout(function(){n.fancybox.defaults.hash!==!1&&(n(t).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,c){var l;i.opts.hash!==!1&&(l=a(o),l&&""!==l&&(e.location.hash.indexOf(l)<0&&(o.opts.origHash=e.location.hash),s=l+(o.group.length>1?"-"+(i.index+1):""),"replaceState"in e.history?(r&&clearTimeout(r),r=setTimeout(function(){e.history[c?"pushState":"replaceState"]({},t.title,e.location.pathname+e.location.search+"#"+s),r=null},300)):e.location.hash=s))},"beforeClose.fb":function(o,i,c){var l,u;r&&clearTimeout(r),c.opts.hash!==!1&&(l=a(i),u=i&&i.opts.origHash?i.opts.origHash:"",l&&""!==l&&("replaceState"in history?e.history.replaceState({},t.title,e.location.pathname+e.location.search+u):(e.location.hash=u,n(e).scrollTop(i.scrollTop).scrollLeft(i.scrollLeft))),s=null)}}),n(e).on("hashchange.fb",function(){var t=o();n.fancybox.getInstance()?!s||s===t.gallery+"-"+t.index||1===t.index&&s==t.gallery||(s=null,n.fancybox.close()):""!==t.gallery&&i(t)}),n(e).one("unload.fb popstate.fb",function(){n.fancybox.getInstance("close",!0,0)}),i(o()))},50)})}(document,window,window.jQuery);
\ No newline at end of file
diff --git a/source/js/third-party/jquery.min.js b/source/js/third-party/jquery.min.js
deleted file mode 100644
index 644d35e..0000000
--- a/source/js/third-party/jquery.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
-!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML=" ",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML=" ";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML=" ","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML=" ",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
-a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""," "],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/