-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
171 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
<div class="mask" id="mask"></div> | ||
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a> | ||
<script> | ||
var BLOG = { ROOT: '<%= config.root %>', SHARE: <%- theme.share %>, REWARD: <%- Boolean(page.reward) %> }</script> | ||
<% if(theme.share){ %> | ||
<script>var BLOG = { ROOT: '<%= config.root %>' }; | ||
BLOG.SHARE = { | ||
title: "<%-(page.title || config.title) %>", | ||
summary: document.getElementsByName('summary')[0].content, | ||
url: "<%=url.replace(/index\.html$/, '') %>" } | ||
</script> | ||
<%- partial('post/share', {className: 'global-share'}) %> | ||
<%- partial('post/share', {scope: 'global'}) %> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<% if(page.reward){ %> | ||
<div class="post-reward"> | ||
<a id="rewardBtn" href="javascript:;" class="post-reward-btn waves-effect waves-circle waves-light">赏</a> | ||
<div class="page-reward"> | ||
<a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a> | ||
</div> | ||
<% } %> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,52 @@ | ||
<div class="<%=className %>" id="<%=className %>"> | ||
<% | ||
// 使用 sns 直接分享接口 | ||
// 微信使用 http://s.jiathis.com/qrcode.php?url=xxx | ||
var sUrl = url.replace(/index\.html$/, '') | ||
var sTitle = page.title ? '《'+ page.title +'》 — ' + config.title : config.title | ||
var sDesc = truncate(strip_html(page.excerpt || config.description), { length: 80}) | ||
var sPic = page.photos && page.photos.length ? page.photos[0] : url_for(config.avatar) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
%> | ||
|
||
<div class="<%- scope %>-share" id="<%- scope %>Share"> | ||
<div class="tit">分享到:</div> | ||
<ul class="reset share-icons"> | ||
<li> | ||
<a class="weibo share-sns" href="javascript:;" data-title="微博" data-service="tsina"> | ||
<a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>" data-title="微博"> | ||
<i class="icon icon-weibo"></i> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="weixin share-sns" href="javascript:;" data-title="微信" data-service="weixin"> | ||
<a class="weixin share-sns wxFab" href="javascript:;" data-title="微信"> | ||
<i class="icon icon-weixin"></i> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="qq share-sns" href="javascript:;" data-title=" QQ" data-service="cqq"> | ||
<a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>" data-title=" QQ"> | ||
<i class="icon icon-qq"></i> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="facebook share-sns" href="javascript:;" data-title=" Facebook" data-service="fb"> | ||
<a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>" data-title=" Facebook"> | ||
<i class="icon icon-facebook"></i> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="twitter share-sns" href="javascript:;" data-title=" Twitter" data-service="twitter"> | ||
<a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>&via=<%-config.url%>" data-title=" Twitter"> | ||
<i class="icon icon-twitter"></i> | ||
</a> | ||
</li> | ||
<li> | ||
<a class="douban share-sns" href="javascript:;" data-title="豆瓣" data-service="douban"> | ||
豆 | ||
<a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=<%-sUrl%>" data-title=" Google+"> | ||
<i class="icon icon-google-plus"></i> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<% if(scope === 'global') { %> | ||
<div class="page-modal wx-share" id="wxShare"> | ||
<a class="close" href="javascript:;"><i class="icon icon-close"></i></a> | ||
<p>扫一扫,分享到微信</p> | ||
<img src="http://s.jiathis.com/qrcode.php?url=<%-sUrl%>" alt="微信分享二维码"/> | ||
</div> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "hexo-theme-material-indigo", | ||
"version": "1.1.12", | ||
"version": "1.2.0", | ||
"private": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,7 +146,7 @@ | |
} | ||
|
||
&:after { | ||
left: -4px; | ||
left: -3px; | ||
border-left-color: rgba(0, 0, 0, .8); | ||
} | ||
} | ||
|
Oops, something went wrong.
url_for(config.avatar)
的值是/
。改为
url_for(theme.avatar)
后得到的是我在配置文件里填入的相对路径/assets/avatar/avatar.jpg
而不是完整的 url 。