Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.3.2 #256

Merged
merged 24 commits into from
Apr 2, 2017
Merged

1.3.2 #256

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0e1abac
refactor(permission): remove execution permission
pidupuis Feb 23, 2017
d041a85
refactor(thumbnail): use tinypng to compress the material thumbnail
neoFelhz Feb 25, 2017
cb222b7
refactor(gallery): merge multiple JavaScript into gallery.js
neoFelhz Mar 2, 2017
9e41f8f
Merge pull request #218 from viosey/refactor/thumbnail
neoFelhz Mar 4, 2017
e9730e5
Merge pull request #214 from viosey/refactor/permission
neoFelhz Mar 4, 2017
24ee9cd
feat(footer_sns): add svg support (#231)
pandecheng36 Mar 5, 2017
20cd61d
chore(issue_template): update
neoFelhz Mar 9, 2017
cbe78cf
chore(pr_template): update
neoFelhz Mar 9, 2017
160c16b
Merge pull request #227 from viosey/refactor/gallery/js
neoFelhz Mar 17, 2017
232bc57
feature(footer_sns): Remove the png format icon and update svg icon f…
pandecheng36 Mar 23, 2017
eb4de6a
feat(materialcdn): config.template update
neoFelhz Mar 25, 2017
0644e57
feat(materialcdn): add cdn support for files in head.ejs and import_j…
neoFelhz Mar 25, 2017
03169c5
feat(materialcdn): add cdn support for gallery and nprogress
neoFelhz Mar 26, 2017
404055c
fix(materialcdn): fix some very very stupid bugs
neoFelhz Mar 26, 2017
2eecf8b
fix(materialcdn): the last stupid bug
neoFelhz Mar 26, 2017
3763cae
feat(comment):add changyan comment system
lslvxy Mar 27, 2017
56c1fee
Merge pull request #252 from viosey/feat/materialcdn
neoFelhz Mar 28, 2017
af252cc
fix(disqus):load comment bug
cubesky Mar 28, 2017
c331da9
feat(timeline): add timeline layout
ghouzenyan Mar 31, 2017
39dc915
revert(config): revert the configuration of timeline page
neoFelhz Mar 31, 2017
2bfc7f7
chore(issue_template): update for Chinese
neoFelhz Mar 31, 2017
c66a67b
refactor(version): update 1.3.0 to 1.3.2
neoFelhz Apr 2, 2017
a2b5185
refactor(version): package.json
neoFelhz Apr 2, 2017
dd17592
fix(config): add missed changyan back
neoFelhz Apr 2, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
<!--
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING

IF YOU DON'T READ THE DOCS AND CONFIGURE YOUR CONFIG CAREFULLY WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING

ATTENTION: THE DOCS MIGHT UPDATE ANYTIME, AND BEFORE YOU OPEN A NEW ISSUE, CHECK THE DOCS AGAIN.

如果你不填充下面的内容,我们可能会直接关闭你的 issue。

如果你没有仔细阅读下述文档,或者合理地配置你的配置文件,我们可能会直接关闭你的 issue。

注意:文档可能随时都会更新。在提交一个 issue 前,请重新查看相关文档。
-->

**I certify that I have first consulted** (check all with "x")

- [ ] [Hexo documentation](https://hexo.io/docs/)
- [ ] [Material theme documentation](https://material.viosey.com/)
- [ ] [Material theme issues](https://github.com/viosey/hexo-theme-material/issues?utf8=%E2%9C%93&q=is%3Aissue)
**我确认我已经查看了** (使用 "x" 选择)

- [ ] [Hexo documentation | Hexo 文档](https://hexo.io/docs/)
- [ ] [Material theme documentation | Material 主题文档](https://material.viosey.com/)
- [ ] [Material theme issues | Material 主题的其它 issue](https://github.com/viosey/hexo-theme-material/issues?utf8=%E2%9C%93&q=is%3Aissue)

----

**I'm submitting a** (check one with "x")

- [ ] bug report
- [ ] feature request
- [ ] support request
**我正在申请** (使用 "x" 选择)

- [ ] bug report | 反馈一个 bug
- [ ] feature request | 申请添加新的特性或功能
- [ ] support request | 请求技术支持


<!-- ----------- -->
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR PULL REQUEST
- Remove the `Contributing rules` part from this description
- Fill out the other parts from this description

> If you don't do so, we might change your pull request's title and using `squash` to merge your changed.

<!-- ----------- -->

Expand Down
Empty file modified .travis.yml
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

[![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)
[![Version](https://img.shields.io/badge/version-1.3.0-green.svg?style=flat-square)]()
[![Version](https://img.shields.io/badge/version-1.3.2-green.svg?style=flat-square)]()
[![Hexo](https://img.shields.io/badge/hexo-3.0+-green.svg?style=flat-square)](https://hexo.io)
[![Build Status](https://img.shields.io/travis/viosey/hexo-theme-material.svg?style=flat-square)](https://travis-ci.org/viosey/hexo-theme-material)

Expand Down
16 changes: 13 additions & 3 deletions _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ img:
footer_image:
#upyun_logo:
#link: "https://www.upyun.com/"
#src: "/img/upyun_logo.png"
#src: "/img/upyun_logo.svg"

# Custom Fonts
fonts: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif
Expand Down Expand Up @@ -153,15 +153,25 @@ topPost: false
# Integrated Services
# ---------------------------------------------------------------

# MaterialCDN
# When you set 'use' as true, the needed css, js, font file will have a new src.
# The new src will have the base domain you configured in 'base'.

materialcdn:
use:
base:

# Comment Systems
# Available value of "use":
# duoshuo | disqus | disqus_click
# duoshuo | disqus | disqus_click | changyan
comment:
use:
shortname:
duoshuo_thread_key_type: path
duoshuo_embed_js_url: "https://static.duoshuo.com/embed.js"

changyan_appid:
changyan_conf:
changyan_thread_key_type: path
# Search Systems
# Available value:
# swiftype | google | local
Expand Down
Empty file modified languages/en.yml
100755 → 100644
Empty file.
Empty file modified languages/es.yml
100755 → 100644
Empty file.
Empty file modified languages/fr.yml
100755 → 100644
Empty file.
Empty file modified languages/ja.yml
100755 → 100644
Empty file.
Empty file modified languages/zh-CN.yml
100755 → 100644
Empty file.
Empty file modified languages/zh-TW.yml
100755 → 100644
Empty file.
6 changes: 6 additions & 0 deletions layout/_partial/Isolation-post_entry.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
<!-- Comment Number -->
<span class="ds-thread-count" data-thread-key="<% theme.comment.duoshuo_thread_key_type === 'id' ? page.id : page.path %>" data-count-type="comments"></span>
<% } %>
<% if(theme.comment.use === 'changyan') { %>
<!-- Comment Number -->
<span class="post_entry-comment" >
<span id = "sourceId::<%= theme.comment.changyan_thread_key_type === 'id' ? page.id : page.path %>" class = "cy_cmt_count" ></span>条评论
</span>
<% } %>
</div>
</div>
</div>
Expand Down
Empty file modified layout/_partial/Paradox-post-info.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/Paradox-post-thumbnail.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/Paradox-post_entry-thumbnail.ejs
100755 → 100644
Empty file.
8 changes: 8 additions & 0 deletions layout/_partial/Paradox-post_entry.ejs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
</span>
<% } %>

<% if(theme.comment.use === 'changyan') { %>
<!-- Comment Number -->
&nbsp;|&nbsp;
<span class="post_entry-comment" >
<span id = "sourceId::<%= theme.comment.changyan_thread_key_type === 'id' ? post.id : post.path %>" class = "cy_cmt_count" ></span>条评论
</span>
<% } %>

<!-- Post Views -->
<span class="post_entry-views">
</span>
Expand Down
Empty file modified layout/_partial/blog_info.ejs
100755 → 100644
Empty file.
17 changes: 15 additions & 2 deletions layout/_partial/comment.ejs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
<%- 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">
Expand All @@ -18,7 +31,7 @@

<% if(theme.comment.use === 'disqus_click') { %>
<!-- 使用 DISQUS_CLICK -->
<div id="disqus-comment">
<div id="disqus-comment">
<%- partial('_widget/disqus_click') %>
</div>
<style>
Expand All @@ -27,4 +40,4 @@
padding: 2pc;
}
</style>
<% } %>
<% } %>
Empty file modified layout/_partial/daily_pic.ejs
100755 → 100644
Empty file.
22 changes: 11 additions & 11 deletions layout/_partial/footer-left.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Twitter -->
<% if(theme.sns.twitter) { %>
<a href="<%= theme.sns.twitter %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>twitter.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>twitter.svg);">
<span class="visuallyhidden">Twitter</span>
</button><!--
--></a>
Expand All @@ -11,7 +11,7 @@
<!-- Facebook -->
<% if(theme.sns.facebook) { %>
<a href="<%= theme.sns.facebook %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>facebook.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>facebook.svg);">
<span class="visuallyhidden">Facebook</span>
</button><!--
--></a>
Expand All @@ -20,7 +20,7 @@
<!-- Google + -->
<% if(theme.sns.googleplus) { %>
<a href="<%= theme.sns.googleplus %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>gplus.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>gplus.svg);">
<span class="visuallyhidden">Google Plus</span>
</button><!--
--></a>
Expand All @@ -29,7 +29,7 @@
<!-- Weibo -->
<% if(theme.sns.weibo) { %>
<a href="<%= theme.sns.weibo %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>weibo.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>weibo.svg);">
<span class="visuallyhidden">Weibo</span>
</button><!--
--></a>
Expand All @@ -38,7 +38,7 @@
<!-- Instagram -->
<% if(theme.sns.instagram) { %>
<a href="<%= theme.sns.instagram %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>instagram.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>instagram.svg);">
<span class="visuallyhidden">Instagram</span>
</button><!--
--></a>
Expand All @@ -47,7 +47,7 @@
<!-- Tumblr -->
<% if(theme.sns.tumblr) { %>
<a href="<%= theme.sns.tumblr %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>tumblr.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>tumblr.svg);">
<span class="visuallyhidden">Tumblr</span>
</button><!--
--></a>
Expand All @@ -56,7 +56,7 @@
<!-- Github -->
<% if(theme.sns.github) { %>
<a href="<%= theme.sns.github %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>github.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>github.svg);">
<span class="visuallyhidden">Github</span>
</button><!--
--></a>
Expand All @@ -65,7 +65,7 @@
<!-- LinkedIn -->
<% if(theme.sns.linkedin) { %>
<a href="<%= theme.sns.linkedin %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>linkedin.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>linkedin.svg);">
<span class="visuallyhidden">LinkedIn</span>
</button><!--
--></a>
Expand All @@ -74,7 +74,7 @@
<!-- Zhihu -->
<% if(theme.sns.zhihu) { %>
<a href="<%= theme.sns.zhihu %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>zhihu.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>zhihu.svg);">
<span class="visuallyhidden">Zhihu</span>
</button><!--
--></a>
Expand All @@ -83,7 +83,7 @@
<!-- Bilibili -->
<% if(theme.sns.bilibili) { %>
<a href="<%= theme.sns.bilibili %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>bilibili.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>bilibili.svg);">
<span class="visuallyhidden">Bilibili</span>
</button><!--
--></a>
Expand All @@ -92,7 +92,7 @@
<!-- Telegram -->
<% if(theme.sns.telegram) { %>
<a href="<%= theme.sns.telegram %>" target="_blank">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>telegram.png);">
<button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>telegram.svg);">
<span class="visuallyhidden">Telegram</span>
</button><!--
--></a>
Expand Down
6 changes: 6 additions & 0 deletions layout/_partial/footer-option.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
</script>
<!-- 多说公共 js 代码 end -->
<% } %>
<% if(theme.comment.use == "changyan"){ %>
<!-- 畅言公共 js 代码 start -->
<script id="cy_cmt_num" src="https://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId=<%=theme.comment.changyan_appid%>">
</script>
<!-- 畅言公共 js 代码 end -->
<% } %>

<% if(theme.comment.use === 'disqus') { %>
<!-- 使用 DISQUS js 代码 -->
Expand Down
Empty file modified layout/_partial/footer.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/footer_top.ejs
100755 → 100644
Empty file.
23 changes: 15 additions & 8 deletions layout/_partial/head.ejs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
© Material Theme
https://github.com/viosey/hexo-theme-material
Version: 1.3.0 -->
Version: 1.3.2 -->

<!-- Title -->
<%
Expand Down Expand Up @@ -79,13 +79,20 @@
<% } %>
<![endif]-->

<!-- Import CSS -->
<%- css('css/material.min') %>
<%- css('css/style.min') %>
<%- partial('_partial/config_css') %>

<%- js('js/jquery.min') %>
<%- js('js/queue') %>
<!-- Import CSS & jQuery -->
<% if(theme.materialcdn.use === true) { %>
<link rel="stylesheet" href="<%= theme.materialcdn.base %>/css/material.min.css">
<link rel="stylesheet" href="<%= theme.materialcdn.base %>/css/style.min.css">
<%- partial('_partial/config_css') %>
<script src="<%= theme.materialcdn.base %>/js/jquery.min.js"></script>
<script src="<%= theme.materialcdn.base %>/js/queue.js"></script>
<%}else{%>
<%- css('css/material.min') %>
<%- css('css/style.min') %>
<%- partial('_partial/config_css') %>
<%- js('js/jquery.min') %>
<%- js('js/queue') %>
<%}%>

<!-- UC Browser Compatible -->
<script>
Expand Down
16 changes: 13 additions & 3 deletions layout/_partial/import_js.ejs
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<!-- Import File -->
<%- js('js/lazyload.min') %>
<%- js('js/js.min') %>
<% if(theme.materialcdn.use === true) { %>
<script src="<%= theme.materialcdn.base %>/js/lazyload.min.js"></script>
<script src="<%= theme.materialcdn.base %>/js/js.min.js"></script>
<%}else{%>
<%- js('js/lazyload.min') %>
<%- js('js/js.min') %>
<%}%>

<%- partial('_widget/nprogress') %>

<% if( theme.js_effect.smoothscroll === true ) { %>
<%- js('js/smoothscroll') %>
<% if(theme.materialcdn.use === true) { %>
<script src="<%= theme.materialcdn.base %>/js/smoothscroll.js"></script>
<%}else{%>
<%- js('js/smoothscroll') %>
<%}%>
<% } %>

<%- partial('_partial/footer-option') %>
Expand Down
Empty file modified layout/_partial/post-content.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/post-header.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/post-info-share.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/sidebar-footer.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/sidebar-header.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/sidebar-navigation.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/sidebar.ejs
100755 → 100644
Empty file.
Empty file modified layout/_partial/toc_button.ejs
100755 → 100644
Empty file.
9 changes: 9 additions & 0 deletions layout/_widget/changyan.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--PC和WAP自适应版-->
<div id="SOHUCS" sid="<% if(theme.comment.changyan_thread_key_type == "id"){ %><%= page.id %><% } else { %><%= page.path %><% } %>" ></div>
<script type="text/javascript">
(function(){
var appid = '<%= theme.comment.changyan_appid %>';
var conf = '<%= theme.comment.changyan_conf %>';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
9 changes: 4 additions & 5 deletions layout/_widget/disqus.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '<%= page.permalink %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = '<%= page.permalink %>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
queue.offer(function() {
var disqus_config = function () {
this.page.url = '<%- config.url + url_for(path) %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};

(function() { // DON'T EDIT BELOW THIS LINE
var d = document;
var s = d.createElement('script');
Expand Down
8 changes: 4 additions & 4 deletions layout/_widget/disqus_click.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
</script>

<script>
var disqus_config = function () {
this.page.url = '<%= page.permalink %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = '<%= page.permalink %>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
$('.btn_click_load').click(function() { //click to load comments
var disqus_config = function () {
this.page.url = '<%- config.url + url_for(path) %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document;
var s = d.createElement('script');
Expand Down
6 changes: 5 additions & 1 deletion layout/_widget/nprogress.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<%- js('js/nprogress') %>
<% if(theme.materialcdn.use === true) { %>
<script src="<%= theme.materialcdn.base %>/js/nprogress.js"></script>
<%}else{%>
<%- js('js/nprogress') %>
<%}%>

<script type="text/javascript">
NProgress.configure({
Expand Down
Loading