Skip to content

Commit

Permalink
1.4.0
Browse files Browse the repository at this point in the history
merge pull request #328 from viosey/canary
  • Loading branch information
iblh committed Jun 1, 2017
2 parents a538599 + 5b13fbd commit 1ac6f1b
Show file tree
Hide file tree
Showing 86 changed files with 4,682 additions and 3,525 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@

## General 概括

[![Version](https://img.shields.io/badge/version-1.3.4-green.svg?style=flat-square)]()
[![Version](https://img.shields.io/badge/version-1.4.0-green.svg?style=flat-square)]()
[![Author](https://img.shields.io/badge/author-Viosey-blue.svg?style=flat-square)](https://viosey.com)

[![Hexo](https://img.shields.io/badge/hexo-3.0+-green.svg?style=flat-square)](https://hexo.io)
[![node.js](https://img.shields.io/badge/node.js-6.0%2B-green.svg?style=flat-square)](https://nodejs.org/)

[![Build Status](https://img.shields.io/travis/viosey/hexo-theme-material.svg?style=flat-square)](https://travis-ci.org/viosey/hexo-theme-material)
[![npm](https://img.shields.io/npm/dt/hexo-material.svg?style=flat-square)](https://www.npmjs.com/package/hexo-material)

[![Author](https://img.shields.io/badge/author-Viosey-blue.svg?style=flat-square)](https://viosey.com)
[![QQ Group](https://img.shields.io/badge/QQ%20%E7%BE%A4-566308505-blue.svg?style=flat-square)](http://jq.qq.com/?_wv=1027&k=40Vdy24)

## Demo 演示

[Viosey's Blog](https://blog.viosey.com)
Expand Down
55 changes: 44 additions & 11 deletions _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ head:
high_res_favicon: "/img/favicon.png"
apple_touch_icon: "/img/favicon.png"
keywords:
site_verification:
google:
baidu:

# Enable generate structured-data as JSON+LD for SEO or not.
# Set as 'false' if it cause some wrong when `hexo g`.
structured_data: true

# Jump Links Settings
url:
Expand Down Expand Up @@ -67,24 +74,50 @@ img:
avatar: "/img/avatar.png"
daily_pic: "/img/daily_pic.png"
sidebar_header: "/img/sidebar_header.png"
footerico: "/img/footer/footer_ico-"
random_thumbnail: "/img/random/material-"
footer_image:
#upyun_logo:
#link: "https://www.upyun.com/"
#src: "/img/upyun_logo.svg"

# Custom Fonts
fonts: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif
# family: the font-family which will be used in the theme
# host: uri of fonts host.
# Available value of "host": google | baomitu | ustc | custom
fonts:
family: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif
use: google
custom_font_host:

# Card Elevation Level
card_elevation: 2

# Copyright
# Specify the date when the site was setup.
# For example, if you set it as 2015, then footer will show '© 2015 - 2017'
copyright_since:

# Qrcode for redirect at other device
# use: choose which method to generate the qrcode for each posts.
# Available value of "use": plugin | online
# - When use "plugin", you need to install the hexo-helper-qrcode.
# - When use "online", the qrcode will be generated by 'pan.baidu.com' in China.
qrcode:
enable: false
use: plugin


# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------

# TOC Button

toc:
# use: choose whether the line_number of toc will show or not.
# Available value of "linenumber": true | false
linenumber: true

# SNS Menu
sns:
email: youremail@email.com
Expand Down Expand Up @@ -143,8 +176,6 @@ sidebar:
feedback: false
material: false

# Qrcode for redirect at other device
qrcode: false

# ---------------------------------------------------------------
# Integrated Services
Expand All @@ -159,15 +190,15 @@ materialcdn:

# Comment Systems
# Available value of "use":
# duoshuo | disqus | disqus_click | changyan
# disqus | disqus_click | changyan | 163gentie
comment:
use:
shortname:
duoshuo_thread_key_type: path
duoshuo_embed_js_url: "https://static.duoshuo.com/embed.js"
shortname: # duoshuo or disqus shortname
changyan_appid:
changyan_conf:
changyan_thread_key_type: path
gentie_productKey:

# Search Systems
# Available value:
# swiftype | google | local
Expand All @@ -176,9 +207,11 @@ search:
swiftype_key:

# Analytics Systems
# Available value:
# baidu | google | cnzz
analytics:
baidu_id:
google_id:
use:
site_id:

# Leancloud Views
leancloud:
Expand All @@ -192,4 +225,4 @@ busuanzi:
enable: false
all_site_uv: false
post_pv: false
busuanzi_pure_mini_js: "https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"
busuanzi_pure_mini_js: "https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"
1 change: 0 additions & 1 deletion languages/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "واصل القراءة"
older: "أقدم"
newer: "أحدث"
private: "منشور خاص, مخفي مؤقتا"
qrcode: "اقرأ هذا المقال على جهاز آخر"
comments_load_button: "قراءة تعليقات 「تأكد !disq.us & disquscdn.com & disqus.com يمكن تحميل」"
share:
Expand Down
1 change: 0 additions & 1 deletion languages/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "Weiterlesen"
older: "Älteren"
newer: "Neuren"
private: "Private Beiträge sind temporär verborgen"
qrcode: "Lesen Sie diesen Artikel auf anderem Gerät"
comments_load_button: "Lesen Sie Kommentare 「Stellen Sie sicher, dass 'disq.us & disquscdn.com & disqus.com' geladen werden kann 」"
share:
Expand Down
7 changes: 3 additions & 4 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ sidebar:
post:
visitor: "Visitors"
views: "Views"
continue: "Continue Reading"
continue: "Read more"
older: "Older"
newer: "Newer"
private: "Private post, temporarily hidden"
qrcode: "Read this article on other device"
comments_load_button: "Read Comments (Be sure disq.us, disquscdn.com and disqus.com can load properly)"
qrcode: "Read this article on other devices"
comments_load_button: "Read Comments (Make sure disq.us, disquscdn.com and disqus.com can load properly)"
share:
article_rss: "Article RSS"
comment_rss: "Comment RSS"
Expand Down
1 change: 0 additions & 1 deletion languages/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "Sigue leyendo"
older: "Mayor"
newer: "Más nuevo"
private: "Mensajes privados, ocultar temporalmente"
qrcode: "Lea este artículo en otro dispositivo"
comments_load_button: "Leer comentarios 「Asegúrese de que 'disq.us & disquscdn.com & disqus.com' se puede cargar」"
share:
Expand Down
1 change: 0 additions & 1 deletion languages/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "Continuer la lecture"
older: "Ancien"
newer: "Récent"
private: "Article privé, caché temporairement"
qrcode: "Lire cet article depuis un autre appareil"
comments_load_button: "Lire les commentaires (Assurez-vous que disq.us, disquscdn.com et disqus.com peuvent être chargés)"
share:
Expand Down
1 change: 0 additions & 1 deletion languages/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "読み続けて"
older: "古い"
newer: "新しい"
private: "プライベート記事、一時的に非表示にします"
qrcode: "他のデバイスでこの記事を読む"
comments_load_button: "論評を読む「 あなたは disqus & disquscdn.com & disqus.com をロードできることを確認します」"
share:
Expand Down
1 change: 0 additions & 1 deletion languages/ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "Teruskan Membaca"
older: "Lama"
newer: "Baru"
private: "Siaran peribadi, disembunyikan buat sementara"
qrcode: "Baca artikel ini pada peranti lain"
comments_load_button: "Read comments 「Pastikan 'disq.us & disquscdn.com & disqus.com' boleh dimuatkan」"
share:
Expand Down
1 change: 0 additions & 1 deletion languages/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "Continue lendo"
older: "Anteriores"
newer: "Recentes"
private: "Artigo privado, aguarde."
qrcode: "Veja este artigo em outro dispositivo"
share:
article_rss: "Artigos RSS"
Expand Down
5 changes: 3 additions & 2 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ post:
continue: "阅读全文"
older: "旧篇"
newer: "新篇"
private: "私有文章,暂不公开"
qrcode: "在其它设备中阅读本文章"
comments_load_button: "阅读评论 「请确保 disq.us & disquscdn.com & disqus.com 可以正常加载」"
comments_load_button: "阅读评论(请确保 disqus 可以正常加载)"
comments_fully_load_button: "加载完整评论(请确保 disqus 可以正常加载)"
comments_proxy_load_button: "加载评论基本模式"
share:
article_rss: "文章 RSS"
comment_rss: "评论 RSS"
Expand Down
1 change: 0 additions & 1 deletion languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ post:
continue: "繼續閱讀"
older: "舊篇"
newer: "新篇"
private: "私有文章,暫不公開"
qrcode: "在其他設備中閱讀本文章"
comments_load_button: "閱讀評論 「請確認 disq.us & disquscdn.com & disqus.com 可正常載入」"
share:
Expand Down
13 changes: 2 additions & 11 deletions layout/_partial/Paradox-post-info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,8 @@
-->

<!-- Qrcode -->
<% if(theme.qrcode === true) { %>
<button id="article-functions-qrcode-button" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
<i class="material-icons" role="presentation">devices other</i>
<span class="visuallyhidden">devices other</span>
</button>
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="article-functions-qrcode-button">
<li class="mdl-menu__item"><%= __('post.qrcode') %></li>
<img src="<%- qrcode(url, {
margin: 2
}) %>">
</ul>
<% if(theme.qrcode.enable === true) { %>
<%- partial('_widget/qrcode') %>
<% } %>

<!-- Tags (bookmark) -->
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/Paradox-post-thumbnail.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script>
<script type="text/ls-javascript" id="post-thumbnail-script">
var randomNum = Math.floor(Math.random() * <%= theme.thumbnail.random_amount %> + 1);
$('.post_thumbnail-random').attr('data-original', '<%= theme.img.random_thumbnail %>' + randomNum + '.png');
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/Paradox-post_entry-thumbnail.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script>
<script type="text/ls-javascript" id="thumbnail-script">
var randomNum;
var locatePost = $('.locate-thumbnail-symbol').next();
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/blog_info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- LOGO -->
<div class="something-else-logo mdl-color--white mdl-color-text--grey-600">
<a href="<%= theme.url.logo || '#' %>">
<a href="<%= theme.url.logo || '#' %>" target="_blank">
<img src="<%= theme.img.logo %>" alt="logo" />
</a>
</div>
Expand Down Expand Up @@ -76,7 +76,7 @@
<% } %>

<% if(theme.sns_share.facebook === true) { %>
<a class="index_share-link" href="https://www.facebook.com/sharer/sharer.php?u=<%= config.url + config.root + url_for(path) %>" target="_blank">
<a class="index_share-link" href="https://www.facebook.com/sharer/sharer.php?u=<%= config.url + url_for(path) %>" target="_blank">
<li class="mdl-menu__item mdl-js-ripple-effect">
<%= __('share.toFacebook') %>
</li>
Expand Down
46 changes: 3 additions & 43 deletions layout/_partial/comment.ejs
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
<% if(theme.comment.use === 'duoshuo') { %>
<!-- 使用多说评论 -->
<%- partial('_widget/duoshuo') %>
<% } %>

<% if(theme.comment.use === 'changyan') { %>
<!-- 使用 changyan -->
<div id="changyan-comment">
<%- partial('_widget/changyan') %>
</div>
<style>
#changyan-comment{
background-color: #eee;
padding: 2pc;
}
</style>
<% } %>

<% if(theme.comment.use === 'disqus') { %>
<!-- 使用 DISQUS -->
<div id="disqus-comment">
<%- partial('_widget/disqus') %>
</div>
<style>
#disqus-comment{
background-color: #eee;
padding: 2pc;
}
</style>
<% } %>

<% if(theme.comment.use === 'disqus_click') { %>
<!-- 使用 DISQUS_CLICK -->
<div id="disqus-comment">
<%- partial('_widget/disqus_click') %>
</div>
<style>
#disqus-comment{
background-color: #eee;
padding: 2pc;
}
</style>
<% } %>
<% if(theme.comment.use) { %>
<%- partial('_widget/comment/' + theme.comment.use + '/enter') %>
<% } %>
6 changes: 4 additions & 2 deletions layout/_partial/config_css.ejs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<!-- Config CSS -->


<!-- Other Styles -->
<style>
body, html {
font-family: <%- theme.fonts %>;
font-family: <%- theme.fonts.family %>;
}
a {
Expand Down Expand Up @@ -117,3 +116,6 @@
}
</style>
<% } %>

<!-- Import Font -->
<%- partial('_partial/config_font') %>
44 changes: 44 additions & 0 deletions layout/_partial/config_font.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<% if(theme.fonts.use === "google") { %>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">
<% } else if(theme.fonts.use === "ustc") { %>
<link href="https://fonts.proxy.ustclug.org/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="https://fonts.proxy.ustclug.org/icon?family=Material+Icons"rel="stylesheet">
<% } else if(theme.fonts.use === "custom") { %>
<link href="<%= theme.fonts.custom_font_host %>/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="<%= theme.fonts.custom_font_host %>/icon?family=Material+Icons"rel="stylesheet">
<% } else if(theme.fonts.use === "baomitu") { %>
<style>
@font-face {
font-family: Roboto;
font-style: normal;
font-weight: 300;
src: url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-300.eot);
src: local('Roboto'),local('Roboto-Normal'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-300.eot?#iefix) format('embedded-opentype'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-300.woff2) format('woff2'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-300.woff) format('woff'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-300.ttf) format('truetype'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-300.svg#Roboto) format('svg')
}
@font-face {
font-family: Roboto;
font-style: normal;
font-weight: regular;
src: url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-regular.eot);
src: local('Roboto'),local('Roboto-Normal'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-regular.eot?#iefix) format('embedded-opentype'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-regular.woff2) format('woff2'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-regular.woff) format('woff'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-regular.ttf) format('truetype'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-regular.svg#Roboto) format('svg')
}
@font-face {
font-family: Roboto;
font-style: normal;
font-weight: 500;
src: url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-500.eot);
src: local('Roboto'),local('Roboto-Normal'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-500.eot?#iefix) format('embedded-opentype'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-500.woff2) format('woff2'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-500.woff) format('woff'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-500.ttf) format('truetype'),url(https://lib.baomitu.com/fonts/roboto/roboto-v15-latin-500.svg#Roboto) format('svg')
}
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://lib.baomitu.com/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.eot);
src: url(https://lib.baomitu.com/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.woff2) format('woff2'),url(https://lib.baomitu.com/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.woff) format('woff'),url(https://lib.baomitu.com/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.ttf) format('truetype')
}
</style>
<% } %>

0 comments on commit 1ac6f1b

Please sign in to comment.