Skip to content

Commit

Permalink
Merge pull request #14 from jiazibaike/master
Browse files Browse the repository at this point in the history
添加了卜算子统计,和email,删除了一些错误
  • Loading branch information
iTimeTraveler authored Apr 5, 2017
2 parents f3ccd41 + 65185f8 commit 0e87309
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ social:
Instagram:
Pinterest:
Flickr:
email:


# Search
Expand All @@ -78,7 +79,6 @@ search:
duoshuo_shortname:
disqus_shortname:
livere_shortname: MTAyMC8yODAyOS80NjA2

uyan_uid:
wumii:

Expand Down Expand Up @@ -112,6 +112,7 @@ google_analytics:
gauges_analytics:
baidu_analytics:
tencent_analytics:
busuanzi_analytics: true
twitter:
google_plus:
fb_admins:
Expand Down
9 changes: 5 additions & 4 deletions layout/_partial/after-footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
})();
</script>
<% } %>
<div style="display: none;">
<script src="https://s11.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
</div>

<%- partial('post/mathjax.ejs') %>

Expand All @@ -29,4 +26,8 @@
<%- js('js/main') %>

<%- partial('google-analytics') %>
<%- partial('gauges-analytics') %>
<%- partial('gauges-analytics') %>
<%- partial('cnzz-analytics') %>
<%- partial('busuanzi-analytics') %>
<%- partial('baidu-analytics') %>
<%- partial('tencent-analytics') %>
1 change: 1 addition & 0 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<% } %>
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/busuanzi-analytics',{index: index}) %>
</div>
<div class="article-entry" itemprop="articleBody">
<% if (post.excerpt && index){ %>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/baidu-analytics.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?{{ theme.baidu_analytics }}";
hm.src = "//hm.baidu.com/hm.js?<%= theme.baidu_analytics %>";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
Expand Down
4 changes: 4 additions & 0 deletions layout/_partial/busuanzi-analytics.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<% if (theme.busuanzi_analytics){ %>
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
<% }%>
6 changes: 6 additions & 0 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<div class="clearfix container">
<div class="site-info">
&copy; <%= date(new Date(), 'YYYY') %> <%= config.title || config.author %> All Rights Reserved.
<% if (theme.busuanzi_analytics){ %>
<span id="busuanzi_container_site_uv">
本站访客数<span id="busuanzi_value_site_uv"></span>人次
本站总访问量<span id="busuanzi_value_site_pv"></span>
</span>
<% } %>
</div>
<div class="site-credit">
<%= __('theme_by') %> <a href="https://github.com/iTimeTraveler/hexo-theme-hiero" target="_blank">hiero</a>
Expand Down
5 changes: 5 additions & 0 deletions layout/_partial/post/busuanzi-analytics.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% if (!index && theme.busuanzi_analytics){ %>
<span id="busuanzi_container_page_pv">
本文总阅读量<span id="busuanzi_value_page_pv"></span>
</span>
<% } %>
7 changes: 5 additions & 2 deletions layout/_widget/social.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
<ul class="clearfix widget-social-icons">
<% Object.keys(theme.social).forEach(function(key) { %>
<li><a href="<%= theme.social[key] %>" title="<%=key.trim()%>"><i class="fa fa-<%= key.toLowerCase() %>" aria-hidden="true"></i></a></li>
<% if (key == 'email'){ %>
<li><a href="mailto:<%= theme.social[key] %>?subject=请联系我&body=我能帮你什么" title="<%=key.trim()%>"><i class="fa fa-envelope" aria-hidden="true"></i></a></li>
<% } else {%>
<li><a href="<%= theme.social[key] %>" title="<%=key.trim()%>"><i class="fa fa-<%= key.toLowerCase() %>" aria-hidden="true"></i></a></li>
<% }%>
<% }) %>
</ul>
Expand Down
1 change: 0 additions & 1 deletion layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@

<a id="rocket" href="#top" class=""></a>
<script type="text/javascript" src="/js/totop.js" async=""></script>
<%- partial('_partial/cnzz-analytics') %>
</body>
</html>

0 comments on commit 0e87309

Please sign in to comment.