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

refactor(duoshuo): change duoshuo_thread_key to duoshuo_thread_key_type #105

Merged
merged 5 commits into from
Jan 7, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
## General 概括

[![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.2.5-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)
[![QQ Group](https://img.shields.io/badge/QQ%20%E7%BE%A4-566308505-brightgreen.svg?style=flat-square)](http://jq.qq.com/?_wv=1027&k=40Vdy24)

## Demo 演示

Expand Down Expand Up @@ -65,4 +65,4 @@ Open sourced under the GPL v3.0 license.

![](https://qiniu.viosey.com/img/Material-Phone-Render.png)

![](https://qiniu.viosey.com/img/Materia-themel-overview-tiny.png)
![](https://qiniu.viosey.com/img/Materia-overview-tiny.png)
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ qrcode: false
# ---------------------------------------------------------------

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

# Search Systems
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/Isolation-post_entry.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<div class="post_entry-footer-comment">
<% if(theme.comment.use == "duoshuo"){ %>
<!-- Comment Number -->
<span class="ds-thread-count" data-thread-key="<% if(theme.comment.duoshuo_thread_key == "id"){ %><%= post.id %><% } else { %><%= post.path %><% } %>" data-count-type="comments"></span>
<span class="ds-thread-count" data-thread-key="<% if(theme.comment.duoshuo_thread_key_type == "id"){ %><%= post.id %><% } else { %><%= post.path %><% } %>" data-count-type="comments"></span>
<% } %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/Paradox-post_entry.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<!-- Comment Number -->
&nbsp;|&nbsp;
<span class="post_entry-comment" >
<span class="ds-thread-count" data-thread-key="<% if(theme.comment.duoshuo_thread_key == "id"){ %><%= post.id %><% } else { %><%= post.path %><% } %>" data-count-type="comments"></span>
<span class="ds-thread-count" data-thread-key="<% if(theme.comment.duoshuo_thread_key_type == "id"){ %><%= post.id %><% } else { %><%= post.path %><% } %>" data-count-type="comments"></span>
</span>
<% } %>

Expand Down
18 changes: 9 additions & 9 deletions layout/_partial/footer-left.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,71 @@
<!-- Twitter -->
<% if(theme.sns.twitter == undefined){ %>
<% } else{ %>
<a href="<%= theme.sns.twitter %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>twitter.png);">
<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);">
<span class="visuallyhidden">Twitter</span>
</button></a>
<% } %>

<!-- Facebook -->
<% if(theme.sns.facebook == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.facebook %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>facebook.png);">
<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);">
<span class="visuallyhidden">Facebook</span>
</button></a>
<% } %>

<!-- Google + -->
<% if(theme.sns.googleplus == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.googleplus %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>gplus.png);">
<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);">
<span class="visuallyhidden">Google Plus</span>
</button></a>
<% } %>

<!-- Weibo -->
<% if(theme.sns.weibo == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.weibo %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>weibo.png);">
<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);">
<span class="visuallyhidden">Weibo</span>
</button></a>
<% } %>

<!-- Instagram -->
<% if(theme.sns.instagram == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.instagram %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>instagram.png);">
<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);">
<span class="visuallyhidden">Instagram</span>
</button></a>
<% } %>

<!-- Tumblr -->
<% if(theme.sns.tumblr == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.tumblr %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>tumblr.png);">
<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);">
<span class="visuallyhidden">Tumblr</span>
</button></a>
<% } %>

<!-- Github -->
<% if(theme.sns.github == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.github %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>github.png);">
<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);">
<span class="visuallyhidden">Github</span>
</button></a>
<% } %>

<!-- LinkedIn -->
<% if(theme.sns.linkedin == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.linkedin %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>linkedin.png);">
<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);">
<span class="visuallyhidden">LinkedIn</span>
</button></a>
<% } %>

<!-- Zhihu -->
<% if(theme.sns.zhihu == undefined){ %>
<% }else{ %>
<a href="<%= theme.sns.zhihu %>" target="view_window"><button class="mdl-mini-footer--social-btn social-btn" style="background-image: url(<%= theme.img.footerico %>zhihu.png);">
<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);">
<span class="visuallyhidden">Zhihu</span>
</button></a>
<% } %>
Expand Down
1 change: 0 additions & 1 deletion layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
© Material Theme
https://github.com/viosey/hexo-theme-material
Version: 1.2.5
Powered by Hexo
-->

<!-- Title -->
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/duoshuo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div id="comments">
<!-- 多说评论框 start -->
<div class="ds-thread"
data-thread-key="<% if(theme.comment.duoshuo_thread_key == "id"){ %><%= page.id %><% } else { %><%= page.path %><% } %>"
data-thread-key="<% if(theme.comment.duoshuo_thread_key_type == "id"){ %><%= page.id %><% } else { %><%= page.path %><% } %>"
data-url="<%- config.url+ config.root + page.path %>"
data-title="<%= page.title %>"></div>
<!-- 多说评论框 end -->
Expand Down