Skip to content

Commit

Permalink
2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardforcel committed Feb 12, 2016
1 parent 82eb9af commit 8c2fd2d
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 55 deletions.
16 changes: 1 addition & 15 deletions layout/_partial/after-footer.ejs
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
<% if (config.disqus_shortname){ %>
<script>
var disqus_shortname = '<%= config.disqus_shortname %>';
<% if (page.permalink){ %>
var disqus_url = '<%= page.permalink %>';
<% } %>
(function(){
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<% } %>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

<script src="/js/jquery-2.0.3.min.js"></script>

Expand Down
42 changes: 23 additions & 19 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<article id="<%= post.layout %>-<%= post.slug %>" class="<%= post.layout %>-<%= post.slug %> post type-post status-publish format-standard hentry">
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
</div>
<div class="article-inner">
<%- partial('post/gallery') %>
<% if (post.link || post.title){ %>
<header class="article-header">
<!--<%- partial('post/gallery') %>-->

<header class="entry-header">
<% if (post.link || post.title){ %>
<%- partial('post/title', {class_name: 'article-title'}) %>
</header>
<% } %>
<div class="article-entry" itemprop="articleBody">
<% } %>
<div class="comments-link">
<% if (post.comments && config.duoshuo_shortname){ %>
<a href="<%- url_for(post.path) %>#comments" class="leave-reply">发表回复</a>
<% } %>
<a href="javascript:void(0);" data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="leave-reply bdsharebuttonbox" data-cmd="more">分享</a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->

<div class="entry-content">
<% if (post.excerpt && index){ %>
<%- post.excerpt %>
<% if (theme.excerpt_link){ %>
<p class="article-more-link">
<a href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %></a>
<a href="<%- url_for(post.path) %>#more" class="more-link"><%= theme.excerpt_link %> <span class="meta-nav"></span></a>
</p>
<% } %>
<% } else { %>
<%- post.content %>
<% } %>
</div>
<footer class="article-footer">
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link bdsharebuttonbox" data-cmd="more">分享</a> <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
<% if (post.comments && config.duoshuo_shortname){ %>
<a href="<%- url_for(post.path) %>#comments" class="article-comment-link">留言</a>
<% } %>
<%- partial('post/tag') %>
</div><!-- .entry-content -->

<footer class="entry-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
<%- partial('post/tag') %>
</footer>
</div>

<% if (!index){ %>
<%- partial('post/nav') %>
<% } %>
Expand Down
15 changes: 4 additions & 11 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<footer id="footer">
<% if (theme.sidebar === 'bottom'){ %>
<%- partial('_partial/sidebar') %>
<% } %>
<div class="outer">
<div id="footer-info" class="inner">
<p>&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %>
All rights reserved.</p>
<p>Powered by <a href="http://hexo.io/" target="_blank">Hexo</a></p>
</div>
</div>
<footer id="colophon" role="contentinfo">
<p>&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %>
All rights reserved.</p>
<p>Powered by <a href="http://hexo.io/" target="_blank">Hexo</a></p>
</footer>
7 changes: 3 additions & 4 deletions layout/_partial/post/category.ejs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<% if (post.categories && post.categories.length){ %>
<div class="article-category">
<%- list_categories(post.categories, {
-
<%- list_categories(post.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: ''
separator: ', '
}) %>
</div>
<% } %>
6 changes: 4 additions & 2 deletions layout/_partial/post/date.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
<a href="<%- url_for(post.path) %>">
<time datetime="<%= date_xml(post.date) %>" class="entry-date">
<%= date(post.date, date_format) %>
</time>
</a>
6 changes: 3 additions & 3 deletions layout/_partial/post/title.ejs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<% if (post.link){ %>
<h1 itemprop="name">
<h1 class="entry-title">
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
</h1>
<% } else if (post.title){ %>
<% if (index){ %>
<h1 itemprop="name">
<h1 class="entry-title">
<a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
</h1>
<% } else { %>
<h1 class="<%= class_name %>" itemprop="name">
<h1 class="entry-title <%= class_name %>">
<%= post.title %>
</h1>
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div id="page" class="hfeed site">
<%- partial('_partial/header', null, {cache: !config.relative_link}) %>
<div id="main" class="wrapper">
<div id="primary"><%- body %></div>
<div id="primary" class="site-content"><div id="content" role="main"><%- body %></div></div>
<% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>
<%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
<% } %>
Expand Down

0 comments on commit 8c2fd2d

Please sign in to comment.