mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 13:07:06 +08:00
1. fix Traditional Chinese and Simplified Chinese Conversion
2. Add the option to hidden the aside items #2 3. Add the option to change subtitle 4. Add the option to change the font 5. fix read-mode and night-mode 6. fix the bugs of the cover #2
This commit is contained in:
@@ -19,6 +19,8 @@ git clone https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly
|
||||
theme: Butterfly
|
||||
```
|
||||
|
||||
>如果你没有pug以及stylus的渲染器,请下载安装: npm install hexo-renderer-jade hexo-renderer-stylus --save or yarn add hexo-renderer-jade hexo-renderer-stylus
|
||||
|
||||
## 文档
|
||||
可查看[这里](https://molunerfinn.com/hexo-theme-melody-doc/zh-Hans/#%E7%89%B9%E6%80%A7)
|
||||
|
||||
@@ -36,6 +38,7 @@ comments:
|
||||
reward:
|
||||
description:
|
||||
top_img:
|
||||
cover: (封面)
|
||||
---
|
||||
```
|
||||
|
||||
|
||||
75
_config.yml
75
_config.yml
@@ -27,7 +27,7 @@ menu:
|
||||
# Favicon
|
||||
# use my-favicon.ico to avoid duplicate favicon of melody theme
|
||||
# ---------------
|
||||
favicon: /img/favicon.png
|
||||
favicon: /img/favicon.ico
|
||||
|
||||
# PWA
|
||||
# See https://github.com/JLHwung/hexo-offline
|
||||
@@ -46,6 +46,7 @@ favicon: /img/favicon.png
|
||||
# Highlight theme
|
||||
# ---------------
|
||||
highlight_theme: light
|
||||
highlight_copy: true
|
||||
|
||||
code_word_wrap: false
|
||||
|
||||
@@ -74,7 +75,7 @@ algolia_search:
|
||||
# Please see doc for more details: https://molunerfinn.com/hexo-theme-melody-doc/#/third-party-support?id=local-search
|
||||
# ---------------
|
||||
local_search:
|
||||
enable: true
|
||||
enable: false
|
||||
labels:
|
||||
input_placeholder: Search for Posts
|
||||
hits_empty: "We didn't find any results for the search: ${query}" # if there are no result
|
||||
@@ -234,7 +235,7 @@ disqus:
|
||||
|
||||
# valine comment system. https://valine.js.org
|
||||
valine:
|
||||
enable: false # if you want use valine,please set this value is ture
|
||||
enable: false # if you want use valine,please set this value is true
|
||||
appId: # leancloud application app id
|
||||
appKey: # leancloud application app key
|
||||
notify: false # valine mail notify (true/false) https://github.com/xCss/Valine/wiki
|
||||
@@ -305,22 +306,17 @@ Flink:
|
||||
|
||||
flinks:
|
||||
[
|
||||
{'name': '夢魘小棧',
|
||||
'link': 'https://blog.ihoey.com',
|
||||
'avatar': 'https://cdn.dode.top/avatar.png',
|
||||
'descr': '心,若沒有棲息的地方,到哪裏都是流浪......'},
|
||||
{'name': '冰峯博客',
|
||||
'link':'https://www.ad-s.cn/',
|
||||
'avatar': 'https://secure.gravatar.com/avatar/4074cd3e035c6e5796f6c263ef8ef0b8?s=56&d=wavatar&r=g',
|
||||
'descr': '男人就應該保持冷靜,沸騰的水只會被蒸發掉。'}
|
||||
{'name': 'JerryC',
|
||||
'link': 'https://jerryc.me/',
|
||||
'avatar': 'https://jerryc.me/img/avatar.png',
|
||||
'descr': '今日事,今日畢'},
|
||||
{'name': 'molunerfinn',
|
||||
'link':'https://molunerfinn.com',
|
||||
'avatar': 'https://blog-1251750343.cos.ap-beijing.myqcloud.com/blog/avatar.jpeg',
|
||||
'descr': 'For MElody'}
|
||||
]
|
||||
|
||||
|
||||
## chinese traditional to Simplified
|
||||
translate:
|
||||
enable: true
|
||||
|
||||
|
||||
runtimeshow:
|
||||
enable: true
|
||||
start_date: 6/7/2018 00:00:00
|
||||
@@ -366,15 +362,54 @@ canvas_ribbon_piao:
|
||||
enable: true
|
||||
|
||||
|
||||
# 避免重复网址分散seo
|
||||
# 避免重複網址分散seo
|
||||
canonical: true
|
||||
|
||||
# 禁止百度转码
|
||||
# 禁止百度轉碼
|
||||
disable_baidu_transformation: true
|
||||
|
||||
twitter_meta: true
|
||||
Open_Graph_meta: true
|
||||
|
||||
|
||||
#閲讀模式
|
||||
readmode:
|
||||
enable: true
|
||||
enable: true
|
||||
|
||||
font:
|
||||
enable: false
|
||||
font-family: Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB,"Microsoft JhengHei", "MicrMicrosoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||
code-font: consolas, Menlo, "PingFang SC", "Microsoft JhengHei","Microsoft YaHei", monospace, Helvetica Neue For Number
|
||||
|
||||
# 主頁subtitle
|
||||
subtitle:
|
||||
enable: true
|
||||
sub1: 今日事,今日畢
|
||||
sub2: Never put off till tomorrow what you can do today
|
||||
|
||||
#側邊欄顯示設置
|
||||
aside:
|
||||
card_author: true
|
||||
card_announcement: true
|
||||
card_recent_post: true
|
||||
card_categories: true
|
||||
card_tags: true
|
||||
card_archives: true
|
||||
card_webinfo: true
|
||||
|
||||
|
||||
## chinese traditional to Simplified
|
||||
translate:
|
||||
enable: true
|
||||
# 默認按鈕顯示文字
|
||||
default: 簡
|
||||
#网站默认语言,1: 繁體中文, 2: 简体中文
|
||||
defaultEncoding: 1
|
||||
#延迟时间,若不在前, 要设定延迟翻译时间, 如100表示100ms,默认为0
|
||||
translateDelay: 0
|
||||
#博客网址
|
||||
cookieDomain: "https://jerryc.me/"
|
||||
#當文字是簡體時,按鈕顯示的文字
|
||||
msgToTraditionalChinese: "繁"
|
||||
#當文字是繁體時,按鈕顯示的文字
|
||||
msgToSimplifiedChinese: "简"
|
||||
|
||||
@@ -25,7 +25,7 @@ post:
|
||||
created: Created
|
||||
updated: Updated
|
||||
wordcount: Word count
|
||||
min2read: 'Reading time: %s min'
|
||||
min2read: "Reading time: %s min"
|
||||
page_pv: Post View
|
||||
copyright:
|
||||
author: Author
|
||||
@@ -33,7 +33,6 @@ post:
|
||||
copyright_notice: Copyright Notice
|
||||
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
|
||||
|
||||
|
||||
search: Search
|
||||
algolia_search:
|
||||
input_placeholder: Search for Posts
|
||||
@@ -57,7 +56,7 @@ aside:
|
||||
tags: Tags
|
||||
categories: Categories
|
||||
card_announcement: Announcement
|
||||
card_categories: Categories
|
||||
card_categories: Categories
|
||||
card_tags: Tags
|
||||
card_archives: Archives
|
||||
card_recent_post: Recent Post
|
||||
@@ -70,4 +69,16 @@ aside:
|
||||
site_pv_name: PV
|
||||
|
||||
donate: Donate
|
||||
share: Share
|
||||
share: Share
|
||||
|
||||
bookmark:
|
||||
title: Bookmark
|
||||
message_prev: Press
|
||||
message_next: to bookmark this page
|
||||
|
||||
rightside:
|
||||
readmode_title: Read Mode
|
||||
font_plus_title: Increase font size
|
||||
font_minus_title: Decrease font size
|
||||
translate_title: Traditional Chinese and Simplified Chinese Conversion
|
||||
night_mode_title: Dark Mode
|
||||
|
||||
@@ -25,7 +25,7 @@ post:
|
||||
created: Created
|
||||
updated: Updated
|
||||
wordcount: Word count
|
||||
min2read: 'Reading time: %s min'
|
||||
min2read: "Reading time: %s min"
|
||||
page_pv: Post View
|
||||
copyright:
|
||||
author: Author
|
||||
@@ -33,7 +33,6 @@ post:
|
||||
copyright_notice: Copyright Notice
|
||||
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
|
||||
|
||||
|
||||
search: Search
|
||||
algolia_search:
|
||||
input_placeholder: Search for Posts
|
||||
@@ -57,7 +56,7 @@ aside:
|
||||
tags: Tags
|
||||
categories: Categories
|
||||
card_announcement: Announcement
|
||||
card_categories: Categories
|
||||
card_categories: Categories
|
||||
card_tags: Tags
|
||||
card_archives: Archives
|
||||
card_recent_post: Recent Post
|
||||
@@ -69,6 +68,16 @@ aside:
|
||||
site_uv_name: UV
|
||||
site_pv_name: PV
|
||||
|
||||
|
||||
donate: Donate
|
||||
share: Share
|
||||
share: Share
|
||||
bookmark:
|
||||
title: Bookmark
|
||||
message_prev: Press
|
||||
message_next: to bookmark this page
|
||||
|
||||
rightside:
|
||||
readmode_title: Read Mode
|
||||
font_plus_title: Increase font size
|
||||
font_minus_title: Decrease font size
|
||||
translate_title: Traditional Chinese and Simplified Chinese Conversion
|
||||
night_mode_title: Dark Mode
|
||||
@@ -25,7 +25,7 @@ post:
|
||||
created: 发表于
|
||||
updated: 更新于
|
||||
wordcount: 字数总计
|
||||
min2read: '阅读时长: %s 分钟'
|
||||
min2read: "阅读时长: %s 分钟"
|
||||
page_pv: 阅读量
|
||||
copyright:
|
||||
author: 文章作者
|
||||
@@ -69,6 +69,16 @@ aside:
|
||||
site_uv_name: 本站访客数
|
||||
site_pv_name: 本站总访问量
|
||||
|
||||
|
||||
donate: 打赏
|
||||
share: 分享
|
||||
share: 分享
|
||||
bookmark:
|
||||
title: 添加书签
|
||||
message_prev: 按
|
||||
message_next: 键将本页加入书签
|
||||
|
||||
rightside:
|
||||
readmode_title: 阅读模式
|
||||
font_plus_title: 放大字体
|
||||
font_minus_title: 缩小字体
|
||||
translate_title: 简繁转换
|
||||
night_mode_title: 夜间模式
|
||||
|
||||
@@ -29,7 +29,7 @@ post:
|
||||
updated: 更新於
|
||||
wordcount: 字數總計
|
||||
commentcount: 評論數
|
||||
min2read: '閲讀時長: %s 分鐘'
|
||||
min2read: "閲讀時長: %s 分鐘"
|
||||
page_pv: 閲讀量
|
||||
copyright:
|
||||
author: 文章作者
|
||||
@@ -74,6 +74,16 @@ aside:
|
||||
site_uv_name: 本站訪客數
|
||||
site_pv_name: 本站總訪問量
|
||||
|
||||
|
||||
donate: 打賞
|
||||
share: 分享
|
||||
share: 分享
|
||||
bookmark:
|
||||
title: 添加書籤
|
||||
message_prev: 按
|
||||
message_next: 鍵將本頁加入書籤
|
||||
|
||||
rightside:
|
||||
readmode_title: 閲讀模式
|
||||
font_plus_title: 放大字體
|
||||
font_minus_title: 縮小字體
|
||||
translate_title: 簡繁轉換
|
||||
night_mode_title: 夜間模式
|
||||
@@ -10,40 +10,6 @@ if (theme.local_search && theme.local_search.enable)
|
||||
script(async src=url_for('/js/search/local-search.js'))
|
||||
|
||||
|
||||
if theme.translate && theme.translate.enable
|
||||
script(src=url_for('/js/tw_cn.js'))
|
||||
script.
|
||||
$(document).ready(function() {
|
||||
initializeChineseConversion();
|
||||
});
|
||||
function simplifyTextInPage(simplified) {
|
||||
if (simplified) {
|
||||
$(document.body).t2s();
|
||||
$('#translateLink').addClass('simplified');
|
||||
$('#translateLink').text('繁');
|
||||
} else {
|
||||
$(document.body).s2t();
|
||||
$('#translateLink').removeClass('simplified');
|
||||
$('#translateLink').text('簡');
|
||||
}
|
||||
}
|
||||
function initializeChineseConversion() {
|
||||
var simplified = +Cookies.get('simplified');
|
||||
// ?lang=zh-Hans, ?lang=zh-Hant
|
||||
var scriptCode = /[?&;]lang=[^&;]*(Han[st])/i.exec(window.location.search);
|
||||
if (scriptCode) {
|
||||
simplified = +(scriptCode[1].match(/Hans/i) != null);
|
||||
Cookies.set('simplified', simplified, {expires: 7, path: '/'});
|
||||
}
|
||||
simplifyTextInPage(simplified);
|
||||
$('#translateLink').click(function() {
|
||||
simplified = +!simplified;
|
||||
Cookies.set('simplified', simplified, {expires: 7, path: '/'});
|
||||
simplifyTextInPage(simplified);
|
||||
$(this).blur();
|
||||
});
|
||||
}
|
||||
|
||||
if theme.nightshift.enable
|
||||
script(src=url_for('js/nightshift.js'))
|
||||
|
||||
@@ -60,39 +26,24 @@ if theme.activate_power_mode.enable
|
||||
POWERMODE.shake = true; // turn off shake
|
||||
document.body.addEventListener('input', POWERMODE);
|
||||
|
||||
if theme.translate && theme.translate.enable
|
||||
script(src=url_for('/js/tw_cn.js'))
|
||||
script.
|
||||
translateInitilization()
|
||||
|
||||
|
||||
|
||||
|
||||
//- script(src="https://unpkg.com/aos@next/dist/aos.js")
|
||||
//- script.
|
||||
//- $(".recent-post-item,.card_widget,#archive,.tag-cloud,#tag,.category-content,#category,#page,.flink").attr("data-aos","slide-up");
|
||||
//- AOS.init();
|
||||
|
||||
|
||||
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")
|
||||
|
||||
//- if is_post()
|
||||
//- script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
|
||||
//- script.
|
||||
//- var typed = new Typed("#typed", {
|
||||
//- stringsElement: '#post-title-effects',
|
||||
//- typeSpeed: 150,
|
||||
//- loop: true,
|
||||
//- backSpeed: 100
|
||||
//- });
|
||||
|
||||
if is_home()
|
||||
script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
|
||||
if is_home() && theme.subtitle.enable
|
||||
script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
|
||||
script.
|
||||
var typed = new Typed(".subtitle", {
|
||||
strings: ["今日事,今日畢", "Never put off till tomorrow what you can do today"],
|
||||
strings: ['!{theme.subtitle.sub1}','!{theme.subtitle.sub2}'],
|
||||
startDelay: 300,
|
||||
typeSpeed: 100,
|
||||
loop: true,
|
||||
backSpeed: 50
|
||||
});
|
||||
|
||||
|
||||
if is_home()
|
||||
script.
|
||||
//首頁fullpage
|
||||
function alignContent() {
|
||||
@@ -130,3 +81,4 @@ if is_home()
|
||||
|
||||
|
||||
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")
|
||||
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")
|
||||
|
||||
@@ -1,125 +1,132 @@
|
||||
.card_widget.card-author
|
||||
.card-content
|
||||
.post_data
|
||||
.data-item.text-center
|
||||
img.lozad(data-src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||
p.author-info__name.text-center= config.author
|
||||
p.author-info__description.text-center= config.description
|
||||
|
||||
.post_data.data_config
|
||||
if site.posts.length
|
||||
if theme.aside.card_author
|
||||
.card_widget.card-author
|
||||
.card-content
|
||||
.post_data
|
||||
.data-item.text-center
|
||||
.data_link
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
p.headline= _p('aside.articles')
|
||||
p.length_num= site.posts.length
|
||||
img.lozad(data-src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||
p.author-info__name.text-center= config.author
|
||||
p.author-info__description.text-center= config.description
|
||||
|
||||
if site.tags.length
|
||||
.data-item.text-center
|
||||
.data_link
|
||||
a(href=url_for(config.tag_dir) + '/' )
|
||||
p.headline= _p('aside.tags')
|
||||
p.length_num= site.tags.length
|
||||
|
||||
if site.categories.length
|
||||
.data-item.text-center
|
||||
.data_link
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
p.headline= _p('aside.categories')
|
||||
p.length_num= site.categories.length
|
||||
|
||||
.post_data.text-center
|
||||
a#bookmark-it.data-item.bookmark.bookmarke--primary.bookmark--animated(href="javascript:;" title= _p('aside.card_bookmark') )= _p('aside.card_bookmark') || 'Follow Me'
|
||||
|
||||
|
||||
|
||||
if(theme.social)
|
||||
.post_data.data_config
|
||||
#aside-social-icons
|
||||
each url, icon in theme.social
|
||||
a.social-icon.data-item(href=url target="_blank")
|
||||
i(class=icon)
|
||||
if site.posts.length
|
||||
.data-item.text-center
|
||||
.data_link
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
p.headline= _p('aside.articles')
|
||||
p.length_num= site.posts.length
|
||||
|
||||
.card_widget.card-announcement
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-bullhorn.card-announcement-animation(aria-hidden="true")
|
||||
span= _p('aside.card_announcement')
|
||||
.announcement_content= theme.announcement.content
|
||||
if site.tags.length
|
||||
.data-item.text-center
|
||||
.data_link
|
||||
a(href=url_for(config.tag_dir) + '/' )
|
||||
p.headline= _p('aside.tags')
|
||||
p.length_num= site.tags.length
|
||||
|
||||
.card_widget.card-recent-post
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-history(aria-hidden="true")
|
||||
span= _p('aside.card_recent_post')
|
||||
.aside_recent_item
|
||||
- site.posts.sort('date', -1).limit(5).each(function(article){
|
||||
.aside_recent_post
|
||||
- var link = article.link || article.path
|
||||
a(href=url_for(link))
|
||||
- var post_cover = article.cover
|
||||
- var default_post_cover = theme.default_cover
|
||||
.aside_post_cover
|
||||
if (post_cover)
|
||||
img.aside_post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
else
|
||||
img.aside_post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
div#aside_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)]
|
||||
if site.categories.length
|
||||
.data-item.text-center
|
||||
.data_link
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
p.headline= _p('aside.categories')
|
||||
p.length_num= site.categories.length
|
||||
|
||||
.post_data.text-center
|
||||
a#bookmark-it.data-item.bookmark.bookmarke--primary.bookmark--animated(href="javascript:;" title= _p('aside.card_bookmark') )= _p('aside.card_bookmark') || 'Follow Me'
|
||||
|
||||
|
||||
- })
|
||||
|
||||
if(theme.social)
|
||||
.post_data.data_config
|
||||
#aside-social-icons
|
||||
each url, icon in theme.social
|
||||
a.social-icon.data-item(href=url target="_blank")
|
||||
i(class=icon)
|
||||
|
||||
if theme.aside.card_announcement
|
||||
.card_widget.card-announcement
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-bullhorn.card-announcement-animation(aria-hidden="true")
|
||||
span= _p('aside.card_announcement')
|
||||
.announcement_content= theme.announcement.content
|
||||
|
||||
if theme.aside.card_recent_post
|
||||
.card_widget.card-recent-post
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-history(aria-hidden="true")
|
||||
span= _p('aside.card_recent_post')
|
||||
.aside_recent_item
|
||||
- site.posts.sort('date', -1).limit(5).each(function(article){
|
||||
.aside_recent_post
|
||||
- var link = article.link || article.path
|
||||
a(href=url_for(link))
|
||||
- var post_cover = article.cover
|
||||
- var default_post_cover = theme.default_cover
|
||||
.aside_post_cover
|
||||
if (post_cover)
|
||||
img.aside_post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
else
|
||||
img.aside_post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
div#aside_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)]
|
||||
|
||||
.card_widget.card-categories
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-folder-open(aria-hidden="true")
|
||||
span= _p('aside.card_categories')
|
||||
ul.aside_category_item
|
||||
- site.categories.sort('name').each(function(category){
|
||||
li.aside_category_list
|
||||
a.aside_category_list_link(href='/' + `${category.path}`)
|
||||
span.aside_category_list_name= category.name
|
||||
span.aside_category_list_length= category.length
|
||||
- })
|
||||
- })
|
||||
|
||||
.card_widget.card-tags
|
||||
.card-content
|
||||
.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'})
|
||||
if theme.aside.card_categories
|
||||
.card_widget.card-categories
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-folder-open(aria-hidden="true")
|
||||
span= _p('aside.card_categories')
|
||||
ul.aside_category_item
|
||||
- site.categories.sort('name').each(function(category){
|
||||
li.aside_category_list
|
||||
a.aside_category_list_link(href='/' + `${category.path}`)
|
||||
span.aside_category_list_name= category.name
|
||||
span.aside_category_list_length= category.length
|
||||
- })
|
||||
|
||||
.card_widget.card-archives
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-archive(aria-hidden="true")
|
||||
span= _p('aside.card_archives')
|
||||
div.archives_item!= list_archives({type:'monthly',format: 'YYYY年MM月'})
|
||||
if theme.aside.card_tags
|
||||
.card_widget.card-tags
|
||||
.card-content
|
||||
.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_widget.card-webinfo
|
||||
.card-content
|
||||
.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
|
||||
if theme.runtimeshow.enable
|
||||
if theme.aside.card_archives
|
||||
.card_widget.card-archives
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-archive(aria-hidden="true")
|
||||
span= _p('aside.card_archives')
|
||||
div.archives_item!= list_archives({type:'monthly',format: 'YYYY年MM月'})
|
||||
|
||||
if theme.aside.card_webinfo
|
||||
.card_widget.card-webinfo
|
||||
.card-content
|
||||
.item_headline
|
||||
i.fa.fa-line-chart(aria-hidden="true")
|
||||
span= _p('aside.card_webinfo.headline')
|
||||
.webinfo
|
||||
.webinfo_item
|
||||
.webinfo_runtime_name= _p('aside.card_webinfo.runtime_name') + " :"
|
||||
#webinfo_runtime_count.webinfo_runtime_count
|
||||
script#runtionshow(src=url_for('js/runtimeshow.js') 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
|
||||
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_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('js/runtimeshow.js') 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
|
||||
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
|
||||
|
||||
|
||||
@@ -26,14 +26,39 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (theme.translate && theme.translate.enable){
|
||||
var defaultEncoding;
|
||||
translate = JSON.stringify({
|
||||
defaultEncoding: theme.translate.defaultEncoding,
|
||||
translateDelay: theme.translate.translateDelay,
|
||||
cookieDomain: theme.translate.cookieDomain,
|
||||
msgToTraditionalChinese: theme.translate.msgToTraditionalChinese,
|
||||
msgToSimplifiedChinese: theme.translate.msgToSimplifiedChinese
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
script.
|
||||
var GLOBAL_CONFIG = {
|
||||
root: '!{config.root}',
|
||||
algolia: !{algolia},
|
||||
localSearch: !{localSearch},
|
||||
translate: !{translate},
|
||||
highlight_copy: '!{theme.highlight_copy}',
|
||||
copy: {
|
||||
success: '!{_p("copy.success")}',
|
||||
error: '!{_p("copy.error")}',
|
||||
noSupport: '!{_p("copy.noSupport")}'
|
||||
},
|
||||
bookmark: {
|
||||
title: '!{_p("bookmark.title")}',
|
||||
message_prev: '!{_p("bookmark.message_prev")}',
|
||||
message_next: '!{_p("bookmark.message_next")}'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -52,8 +52,7 @@ if (theme.gitalk && theme.gitalk.enable)
|
||||
script(src="https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js")
|
||||
script(src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js")
|
||||
|
||||
//- if (theme.pwa && theme.pwa.enable)
|
||||
//- link(rel="manifest" href=theme.pwa.manifest)
|
||||
|
||||
|
||||
if (theme.pwa && theme.pwa.enable)
|
||||
link(rel="manifest" href=theme.pwa.manifest)
|
||||
@@ -69,8 +68,6 @@ if (theme.pwa && theme.pwa.enable)
|
||||
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")
|
||||
if(theme.pwa.shortcut_icon)
|
||||
link(rel="shortcut icon", href=theme.pwa.shortcut_icon)
|
||||
|
||||
|
||||
if theme.baidu_analytics
|
||||
|
||||
@@ -32,7 +32,7 @@ html(lang=config.language)
|
||||
meta(name="author" content=pageAuthor)
|
||||
meta(name="copyright" content=pageCopyright)
|
||||
meta(name ="format-detection" content="telephone=no")
|
||||
//- !=favicon_tag(config.favicon || theme.favicon || '/favicon.ico')
|
||||
!=favicon_tag(config.favicon || theme.favicon || '/favicon.ico')
|
||||
if theme.stylesheets !== undefined && theme.stylesheets.length > 0
|
||||
each url in theme.stylesheets
|
||||
link(rel='stylesheet', href=url_for(url))
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
section#rightside.rightside
|
||||
if theme.readmode.enable && is_post()
|
||||
i#readmode.fa.fa-book
|
||||
i#font_plus.fa.fa-plus
|
||||
i#font_minus.fa.fa-minus
|
||||
if page.comments !== false && !is_home() && !is_archive()
|
||||
i#to_comment.fa.fa-comments-o
|
||||
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 theme.translate && theme.translate.enable
|
||||
a#translateLink.translate_chn_to_cht=theme.translate.show
|
||||
a#translateLink.translate_chn_to_cht(href="javascript:translatePage();" title=_p('rightside.translate_title'))= theme.translate.default
|
||||
if theme.nightshift.enable
|
||||
i#nightshift.fa.fa-moon-o.nightshift
|
||||
i#nightshift.fa.fa-moon-o.nightshift(title=_p('rightside.night_mode_title'))
|
||||
|
||||
@@ -24,8 +24,10 @@ hexo.extend.helper.register('related_posts', function(currentPost, allPosts){
|
||||
var result = '<div class="relatedPosts_headling"><i class="fa fa-thumbs-up" aria-hidden="true"></i><span> 相關文章</span></div><div class="relatedPosts_list">';
|
||||
relatedPosts = relatedPosts.sort(compare('weight'));
|
||||
for (var i = 0; i < Math.min(relatedPosts.length, 6); i++) {
|
||||
|
||||
var cover = relatedPosts[i].cover || hexo.theme.config.default_cover || data.melody.default_cover
|
||||
result += '<div class="relatedPosts_item"><a href="/' + relatedPosts[i].path + '">';
|
||||
result += '<img class="relatedPosts_cover lozad" data-src="' + relatedPosts[i].cover + '">';
|
||||
result += '<img class="relatedPosts_cover lozad" data-src="' + cover + '">';
|
||||
result += '<div class="relatedPosts_title">' + relatedPosts[i].title + '</div>';
|
||||
result += '</a></div>'
|
||||
};
|
||||
|
||||
@@ -260,18 +260,7 @@ table
|
||||
margin-bottom: 2px
|
||||
cursor: pointer
|
||||
padding-top: 6px
|
||||
|
||||
#to_comment
|
||||
width: 30px
|
||||
height: 30px
|
||||
background-color: #49b1f5
|
||||
color: #e3e8ee
|
||||
text-align: center
|
||||
font-size: 17px
|
||||
display: block
|
||||
margin-bottom: 2px
|
||||
cursor: pointer
|
||||
padding-top: 6px
|
||||
|
||||
|
||||
a
|
||||
&:hover
|
||||
|
||||
236
source/css/_layout/nightshift.styl
Normal file
236
source/css/_layout/nightshift.styl
Normal file
@@ -0,0 +1,236 @@
|
||||
if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
||||
.night-mode
|
||||
footer
|
||||
background: #2d3035
|
||||
|
||||
#sidebar
|
||||
background: #2d3035 !important
|
||||
box-shadow: -0.25rem 0 0.25rem #2d3035 !important
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: lighten(#2d3035,5)
|
||||
|
||||
if hexo-config("local_search") && hexo-config("local_search.enable")
|
||||
#local-search
|
||||
background: #2d3035
|
||||
.local-search-box--input
|
||||
background: #2d3035
|
||||
color: #99a9bf
|
||||
|
||||
.search-result-title
|
||||
color: #99a9bf
|
||||
if hexo-config("algolia_search.enable")
|
||||
#algolia-search
|
||||
background: #2d3035
|
||||
.ais-search-box--input
|
||||
background: #2d3035
|
||||
color: #99a9bf
|
||||
|
||||
#algolia-search-results
|
||||
.algolia-hit-item-link
|
||||
color: #99a9bf !important
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
color: #99a9bf
|
||||
|
||||
.article-container code
|
||||
background: #616a6b
|
||||
color: #99a9bf
|
||||
|
||||
// 評論
|
||||
#vcomment
|
||||
*
|
||||
color: #99a9bf !important
|
||||
|
||||
.vsys
|
||||
background: rgb(97, 106, 107) !important
|
||||
|
||||
.vbtn
|
||||
background: rgb(45, 48, 53) !important
|
||||
color: #99a9bf !important
|
||||
|
||||
.recent-post-item .article-title
|
||||
color: #99a9bf
|
||||
|
||||
#page-header
|
||||
&.fixed
|
||||
background: #2d3035
|
||||
box-shadow: 0 5px 6px -5px rgba(133,133,133,0)
|
||||
|
||||
a,
|
||||
.toggle-menu,
|
||||
#site-name
|
||||
color: #99a9bf
|
||||
|
||||
blockquote
|
||||
border-left: 0.2rem solid #7A5353
|
||||
color: #99a9bf
|
||||
|
||||
hr
|
||||
background: 0
|
||||
border: 2px dashed #616A6B
|
||||
&:before
|
||||
color: #99a9bf
|
||||
|
||||
.post-meta__tags
|
||||
background: 0
|
||||
border: 1px solid #99a9bf
|
||||
color: #99a9bf
|
||||
|
||||
|
||||
.post-copyright
|
||||
border: 1px solid #99a9bf
|
||||
|
||||
*
|
||||
color: #99a9bf
|
||||
|
||||
.article-container .highlight
|
||||
background-color: #1B2631
|
||||
.code pre
|
||||
background-color: #1B2631
|
||||
|
||||
.gutter pre
|
||||
background: #1C2833
|
||||
|
||||
|
||||
&:after
|
||||
background: rgb(27, 38, 59)
|
||||
|
||||
table
|
||||
&:after,.copy-notice
|
||||
background: rgb(27, 38, 59)
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: lighten(#1B2631,10)
|
||||
|
||||
.copy-notice
|
||||
background: rgb(27, 38, 59)
|
||||
|
||||
.post-cards,.md-links-item
|
||||
// background: #2d3035
|
||||
a
|
||||
color: #99a9bf
|
||||
|
||||
.aplayer
|
||||
color: #000000
|
||||
filter: brightness(0.6)
|
||||
|
||||
.article-sort-item__title
|
||||
color: #99a9bf
|
||||
|
||||
.category-list
|
||||
a
|
||||
color: #99a9bf
|
||||
|
||||
|
||||
|
||||
.translate_chn_to_cht,
|
||||
.nightshift,
|
||||
#readmode
|
||||
background-color: #2d3035 !important
|
||||
|
||||
img
|
||||
filter: brightness(0.6)
|
||||
|
||||
.layout_post
|
||||
background:#2d3035
|
||||
|
||||
canvas
|
||||
display: none !important
|
||||
|
||||
#aside_content
|
||||
.card_widget
|
||||
background:#2d3035 !important
|
||||
.headline,
|
||||
.length_num,
|
||||
.aside_post_title,
|
||||
.aside_category_list_link,
|
||||
.archive-list-link,
|
||||
.social-icon
|
||||
color: #99a9bf !important
|
||||
|
||||
#bookmark-it
|
||||
background: #616a6b !important
|
||||
|
||||
#archive,
|
||||
.tag-cloud,
|
||||
#tag,
|
||||
.category-content,
|
||||
#category,
|
||||
#page,
|
||||
.flink
|
||||
background:#2d3035
|
||||
|
||||
#nav,
|
||||
#top-container
|
||||
&::before
|
||||
content: ""
|
||||
position: absolute
|
||||
top: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
right: 0
|
||||
background-color: rgba(0,0,0,.6)
|
||||
|
||||
.layout_page
|
||||
.post-meta__date,
|
||||
.article-meta__separator,
|
||||
.article-meta__categories,
|
||||
i
|
||||
color: #99a9bf
|
||||
|
||||
#site-info .blogtitle,
|
||||
span.subtitle,
|
||||
#post-info .posttitle,
|
||||
#post-info #post-meta,
|
||||
#site-social-icons i,
|
||||
#top-container a
|
||||
color: rgba(238,238,238,.6)
|
||||
|
||||
//打賞 分享
|
||||
.post-reward
|
||||
.reward-buttom
|
||||
background-color: #616a6b
|
||||
.post_share
|
||||
filter: brightness(0.6)
|
||||
img
|
||||
filter: brightness(1)
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: lighten(#2d3035,5)
|
||||
|
||||
@media screen and (max-width: 768px)
|
||||
.night-mode
|
||||
color: #99a9bf
|
||||
background-color: rgb(45, 48, 53)
|
||||
|
||||
#page-header
|
||||
.menus
|
||||
a
|
||||
color: #99a9bf
|
||||
background: #2d3035
|
||||
&.fixed
|
||||
.menu-icon-first,
|
||||
.menu-icon-second,
|
||||
.menu-icon-third
|
||||
background-color: #99a9bf;
|
||||
|
||||
|
||||
@media screen and (min-width: 768px)
|
||||
.night-mode
|
||||
color: #99a9bf
|
||||
background-color: #2d3032
|
||||
|
||||
.recent-post-item
|
||||
background: #2d3035 !important
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#post
|
||||
overflow: hidden
|
||||
text-align: justify
|
||||
|
||||
&-meta
|
||||
text-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.15)
|
||||
|
||||
@@ -1,100 +1,104 @@
|
||||
.read-mode
|
||||
background: $pale-yellow
|
||||
padding: 0 !important
|
||||
|
||||
#sidebar,
|
||||
#toggle-sidebar
|
||||
display: none
|
||||
|
||||
#top-container
|
||||
background-image: none !important
|
||||
height: 14rem
|
||||
background-color: $pale-yellow
|
||||
|
||||
a
|
||||
color: #4c4948
|
||||
|
||||
|
||||
&:before
|
||||
opacity: 0
|
||||
|
||||
#site-name,
|
||||
.site-page
|
||||
text-shadow: none
|
||||
color: #4c4948
|
||||
|
||||
#post-info
|
||||
text-align: center
|
||||
padding: 0
|
||||
color: #4c4948
|
||||
|
||||
#post-title,
|
||||
#post-meta
|
||||
text-shadow: none
|
||||
|
||||
#page-header
|
||||
&.fixed
|
||||
background: none
|
||||
box-shadow: none
|
||||
|
||||
&.open-sidebar
|
||||
.site-page
|
||||
display: inline-block
|
||||
opacity: 1
|
||||
|
||||
.toggle-menu
|
||||
.menu-icon-first,
|
||||
.menu-icon-second,
|
||||
.menu-icon-third
|
||||
background-color: #4c4948
|
||||
|
||||
.layout_post
|
||||
box-shadow: none
|
||||
if hexo-config("readmode") && hexo-config("readmode.enable")
|
||||
.read-mode
|
||||
background: $pale-yellow
|
||||
padding: 0 !important
|
||||
|
||||
&:hover
|
||||
box-shadow: none
|
||||
|
||||
.article-container
|
||||
pre,
|
||||
.highlight
|
||||
background: darken($pale-yellow,5);
|
||||
#sidebar,
|
||||
#toggle-sidebar
|
||||
display: none
|
||||
|
||||
#top-container
|
||||
background-image: none !important
|
||||
height: 14rem
|
||||
background-color: $pale-yellow
|
||||
|
||||
a
|
||||
color: #4c4948
|
||||
|
||||
|
||||
&:before
|
||||
opacity: 0
|
||||
|
||||
.highlight
|
||||
&:after
|
||||
background: darken($pale-yellow,10);
|
||||
table
|
||||
#site-name,
|
||||
.site-page
|
||||
text-shadow: none
|
||||
color: #4c4948
|
||||
|
||||
#post-info
|
||||
text-align: center
|
||||
padding: 0
|
||||
color: #4c4948
|
||||
|
||||
#post-title,
|
||||
#post-meta
|
||||
text-shadow: none
|
||||
|
||||
#page-header
|
||||
&.fixed
|
||||
background: none
|
||||
box-shadow: none
|
||||
|
||||
&.open-sidebar
|
||||
.site-page
|
||||
display: inline-block
|
||||
opacity: 1
|
||||
|
||||
.toggle-menu
|
||||
.menu-icon-first,
|
||||
.menu-icon-second,
|
||||
.menu-icon-third
|
||||
background-color: #4c4948
|
||||
|
||||
.layout_post
|
||||
box-shadow: none
|
||||
background: $pale-yellow
|
||||
|
||||
&:hover
|
||||
box-shadow: none
|
||||
|
||||
.article-container
|
||||
pre,
|
||||
.highlight
|
||||
background: darken($pale-yellow,5);
|
||||
|
||||
.highlight
|
||||
&:after
|
||||
background: darken($pale-yellow,10);
|
||||
|
||||
|
||||
blockquote
|
||||
border-left: 0.2rem solid #d6dbdf
|
||||
background-color: rgba(102,128,153,.05)
|
||||
|
||||
#rightside
|
||||
#to_comment,#nightshift
|
||||
table
|
||||
&:after
|
||||
background: darken($pale-yellow,10);
|
||||
|
||||
|
||||
blockquote
|
||||
border-left: 0.2rem solid #d6dbdf
|
||||
background-color: rgba(102,128,153,.05)
|
||||
|
||||
#rightside
|
||||
#nightshift
|
||||
display: none
|
||||
|
||||
canvas
|
||||
display: none !important
|
||||
|
||||
footer,
|
||||
#post-comment,
|
||||
hr,
|
||||
.relatedPosts,
|
||||
#pagination,
|
||||
.post-reward,
|
||||
.tag_share,
|
||||
.post-copyright
|
||||
display: none
|
||||
|
||||
canvas
|
||||
display: none !important
|
||||
|
||||
footer,
|
||||
#post-comment,
|
||||
hr,
|
||||
.relatedPosts,
|
||||
#pagination,
|
||||
.post-reward,
|
||||
.tag_share,
|
||||
.post-copyright
|
||||
display: none
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: darken($pale-yellow,15)
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: darken($pale-yellow,15)
|
||||
|
||||
*::-webkit-scrollbar-thumb
|
||||
background: darken($pale-yellow,15)
|
||||
|
||||
*::-webkit-scrollbar-thumb
|
||||
background: darken($pale-yellow,15)
|
||||
|
||||
.copy-notice
|
||||
background: darken($pale-yellow,10)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -106,8 +110,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
@import "_global"
|
||||
@import "_highlight/highlight"
|
||||
@import "_layout/*"
|
||||
@import "other"
|
||||
if hexo-config("nightshift.enable")
|
||||
@import "nightshift"
|
||||
|
||||
|
||||
// search
|
||||
if hexo-config("algolia_search.enable")
|
||||
@import "_search/index"
|
||||
|
||||
@@ -1,236 +0,0 @@
|
||||
.night-mode
|
||||
footer
|
||||
background: #2d3035
|
||||
|
||||
#sidebar
|
||||
background: #2d3035 !important
|
||||
box-shadow: -0.25rem 0 0.25rem #2d3035 !important
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: lighten(#2d3035,5)
|
||||
|
||||
if hexo-config("local_search") && hexo-config("local_search.enable")
|
||||
#local-search
|
||||
background: #2d3035
|
||||
.local-search-box--input
|
||||
background: #2d3035
|
||||
color: #99a9bf
|
||||
|
||||
.search-result-title
|
||||
color: #99a9bf
|
||||
if hexo-config("algolia_search.enable")
|
||||
#algolia-search
|
||||
background: #2d3035
|
||||
.ais-search-box--input
|
||||
background: #2d3035
|
||||
color: #99a9bf
|
||||
|
||||
#algolia-search-results
|
||||
.algolia-hit-item-link
|
||||
color: #99a9bf !important
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
color: #99a9bf
|
||||
|
||||
.article-container code
|
||||
background: #616a6b
|
||||
color: #99a9bf
|
||||
|
||||
// 評論
|
||||
#vcomment
|
||||
*
|
||||
color: #99a9bf !important
|
||||
|
||||
.vsys
|
||||
background: rgb(97, 106, 107) !important
|
||||
|
||||
.vbtn
|
||||
background: rgb(45, 48, 53) !important
|
||||
color: #99a9bf !important
|
||||
|
||||
.recent-post-item .article-title
|
||||
color: #99a9bf
|
||||
|
||||
#page-header
|
||||
&.fixed
|
||||
background: #2d3035
|
||||
box-shadow: 0 5px 6px -5px rgba(133,133,133,0)
|
||||
|
||||
a,
|
||||
.toggle-menu,
|
||||
#site-name
|
||||
color: #99a9bf
|
||||
|
||||
blockquote
|
||||
border-left: 0.2rem solid #7A5353
|
||||
color: #99a9bf
|
||||
|
||||
hr
|
||||
background: 0
|
||||
border: 2px dashed #616A6B
|
||||
&:before
|
||||
color: #99a9bf
|
||||
|
||||
.post-meta__tags
|
||||
background: 0
|
||||
border: 1px solid #99a9bf
|
||||
color: #99a9bf
|
||||
|
||||
|
||||
.post-copyright
|
||||
border: 1px solid #99a9bf
|
||||
|
||||
*
|
||||
color: #99a9bf
|
||||
|
||||
.article-container .highlight
|
||||
background-color: #1B2631
|
||||
.code pre
|
||||
background-color: #1B2631
|
||||
|
||||
.gutter pre
|
||||
background: #1C2833
|
||||
|
||||
|
||||
&:after
|
||||
background: rgb(27, 38, 59)
|
||||
|
||||
table
|
||||
&:after,.copy-notice
|
||||
background: rgb(27, 38, 59)
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: lighten(#1B2631,10)
|
||||
|
||||
.copy-notice
|
||||
background: rgb(27, 38, 59)
|
||||
|
||||
.post-cards,.md-links-item
|
||||
// background: #2d3035
|
||||
a
|
||||
color: #99a9bf
|
||||
|
||||
.aplayer
|
||||
color: #000000
|
||||
filter: brightness(0.6)
|
||||
|
||||
.article-sort-item__title
|
||||
color: #99a9bf
|
||||
|
||||
.category-list
|
||||
a
|
||||
color: #99a9bf
|
||||
|
||||
|
||||
|
||||
.translate_chn_to_cht,
|
||||
.nightshift,
|
||||
#to_comment,
|
||||
#readmode
|
||||
background-color: #2d3035 !important
|
||||
|
||||
img
|
||||
filter: brightness(0.6)
|
||||
|
||||
.layout_post
|
||||
background:#2d3035
|
||||
|
||||
canvas
|
||||
display: none !important
|
||||
|
||||
#aside_content
|
||||
.card_widget
|
||||
background:#2d3035 !important
|
||||
.headline,
|
||||
.length_num,
|
||||
.aside_post_title,
|
||||
.aside_category_list_link,
|
||||
.archive-list-link,
|
||||
.social-icon
|
||||
color: #99a9bf !important
|
||||
|
||||
#bookmark-it
|
||||
background: #616a6b !important
|
||||
|
||||
#archive,
|
||||
.tag-cloud,
|
||||
#tag,
|
||||
.category-content,
|
||||
#category,
|
||||
#page,
|
||||
.flink
|
||||
background:#2d3035
|
||||
|
||||
#nav,
|
||||
#top-container
|
||||
&::before
|
||||
content: ""
|
||||
position: absolute
|
||||
top: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
right: 0
|
||||
background-color: rgba(0,0,0,.6)
|
||||
|
||||
.layout_page
|
||||
.post-meta__date,
|
||||
.article-meta__separator,
|
||||
.article-meta__categories,
|
||||
i
|
||||
color: #99a9bf
|
||||
|
||||
#site-info .blogtitle,
|
||||
span.subtitle,
|
||||
#post-info .posttitle,
|
||||
#post-info #post-meta,
|
||||
#site-social-icons i,
|
||||
#top-container a
|
||||
color: rgba(238,238,238,.6)
|
||||
|
||||
//打賞 分享
|
||||
.post-reward
|
||||
.reward-buttom
|
||||
background-color: #616a6b
|
||||
.post_share
|
||||
filter: brightness(0.6)
|
||||
img
|
||||
filter: brightness(1)
|
||||
|
||||
&::-webkit-scrollbar-thumb
|
||||
background: lighten(#2d3035,5)
|
||||
|
||||
@media screen and (max-width: 768px)
|
||||
.night-mode
|
||||
color: #99a9bf
|
||||
background-color: rgb(45, 48, 53)
|
||||
|
||||
#page-header
|
||||
.menus
|
||||
a
|
||||
color: #99a9bf
|
||||
background: #2d3035
|
||||
&.fixed
|
||||
.menu-icon-first,
|
||||
.menu-icon-second,
|
||||
.menu-icon-third
|
||||
background-color: #99a9bf;
|
||||
|
||||
|
||||
@media screen and (min-width: 768px)
|
||||
.night-mode
|
||||
color: #99a9bf
|
||||
background-color: #2d3032
|
||||
|
||||
.recent-post-item
|
||||
background: #2d3035 !important
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ $theme-meta-color = #858585
|
||||
$theme-link-color = #99a9bf
|
||||
$theme-hr-color = #A4D8FA
|
||||
$theme-read-mode-bg-color = #FAF9DE
|
||||
$font-family= Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||
$code-font = consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number
|
||||
|
||||
|
||||
if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
||||
$theme-color = convert(hexo-config("theme_color.main")) || #49B1F5
|
||||
@@ -18,12 +21,16 @@ if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
||||
$theme-hr-color = convert(hexo-config("theme_color.hr_color")) || #A4D8FA
|
||||
$theme-read-mode-bg-color = convert(hexo-config("theme_color.read-mode-bg_color")) || #FAF9DE
|
||||
|
||||
if hexo-config("font") && hexo-config("font.enable")
|
||||
$font-family = convert(hexo-config("font.font-family")) || 'Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif'
|
||||
$code-font = convert(hexo-config("font.code-font")) || 'consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace, Helvetica Neue For Number'
|
||||
|
||||
// Global Variables
|
||||
$font-size = 14px
|
||||
$font-color = #1F2D3D
|
||||
$rem = 20px
|
||||
$font-family = Lato, Helvetica Neue For Number, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, "Microsoft JhengHei","Microsoft YaHei", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||
$code-font = consolas, Menlo, "PingFang SC", "Microsoft JhengHei","Microsoft YaHei", monospace, Helvetica Neue For Number
|
||||
$font-family = $font-family
|
||||
$code-font = $code-font
|
||||
$text-line-height = 2
|
||||
$sm = 768px
|
||||
$bg = 1024px
|
||||
|
||||
@@ -86,13 +86,7 @@ $(function () {
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
//側邊欄comment
|
||||
$("#to_comment").on("click", function () {
|
||||
|
||||
scrollTo('#post-comment')
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(".scroll-down").on("click", function () {
|
||||
|
||||
scrollTo('#content-outer')
|
||||
@@ -177,8 +171,8 @@ $(function () {
|
||||
} else { // webkit - safari/chrome
|
||||
// alert('按 ' + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL') + ' + D 鍵將本頁加入書籤.');
|
||||
$.fancyConfirm({
|
||||
title: "添加書籤?",
|
||||
message: '按 ' + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL') + ' + D 鍵將本頁加入書籤.',
|
||||
title: GLOBAL_CONFIG.bookmark.title + '?',
|
||||
message: GLOBAL_CONFIG.bookmark.message_prev + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Command/Cmd' : 'CTRL') + '+ D ' + GLOBAL_CONFIG.bookmark.message_next + '.',
|
||||
okButton: "OK",
|
||||
});
|
||||
|
||||
@@ -188,55 +182,64 @@ $(function () {
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//代码copy
|
||||
// Add copy icon
|
||||
// $('figure.highlight').wrap('<div class="code-area-wrap"></div>')
|
||||
// var $copyIcon = $('<i class="fa fa-clipboard" aria-hidden="true"></i>')
|
||||
// var $notice = $('<div class="copy-notice"></div>')
|
||||
// $('.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.
|
||||
// $(ctx).prev('.copy-notice')
|
||||
// .text(GLOBAL_CONFIG.copy.success)
|
||||
// .velocity({
|
||||
// translateX: -30,
|
||||
// opacity: 1
|
||||
// }, {
|
||||
// loop: 1,
|
||||
// duration: 750,
|
||||
// easing: 'easeOutQuint'
|
||||
// })
|
||||
// } catch (ex) {
|
||||
// $(ctx).prev('.copy-notice')
|
||||
// .text(GLOBAL_CONFIG.copy.error)
|
||||
// .velocity({
|
||||
// translateX: -30,
|
||||
// opacity: 1
|
||||
// }, {
|
||||
// loop: 1,
|
||||
// duration: 750,
|
||||
// easing: 'easeOutQuint'
|
||||
// })
|
||||
// return false
|
||||
// }
|
||||
// } 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_copy = GLOBAL_CONFIG.highlight_copy
|
||||
if (highlight_copy == 'true') {
|
||||
$('figure.highlight').wrap('<div class="code-area-wrap"></div>')
|
||||
var $copyIcon = $('<i class="fa fa-clipboard" aria-hidden="true"></i>')
|
||||
var $notice = $('<div class="copy-notice"></div>')
|
||||
$('.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.
|
||||
$(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) {
|
||||
$(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 {
|
||||
$(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()
|
||||
})
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
//fancybox
|
||||
var imgList = $(".recent-post-info img");
|
||||
@@ -517,25 +520,22 @@ $(function () {
|
||||
$('body').toggleClass('read-mode');
|
||||
$('#font_plus,#font_minus').toggleClass('is_visible');
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$('body').toggleClass('read-mode');
|
||||
$('#font_plus,#font_minus').toggleClass('is_visible');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
//閲讀模式下字體調整
|
||||
|
||||
//閲讀模式下字體調整
|
||||
$("#font_plus").click(function () {
|
||||
var font_size_record = parseFloat($('body').css('font-size'))
|
||||
$('body').css('font-size',font_size_record + 1)
|
||||
}
|
||||
);
|
||||
var font_size_record = parseFloat($('body').css('font-size'))
|
||||
$('body').css('font-size', font_size_record + 1)
|
||||
});
|
||||
|
||||
$("#font_minus").click(function () {
|
||||
var font_size_record = parseFloat($('body').css('font-size'))
|
||||
$('body').css('font-size',font_size_record - 1)
|
||||
}
|
||||
);
|
||||
var font_size_record = parseFloat($('body').css('font-size'))
|
||||
$('body').css('font-size', font_size_record - 1)
|
||||
});
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user