Merge pull request #29 from quxiaofeng/master

Added a `hidedate` option to article.ejs
pull/30/head
ppoffice 2015-07-12 18:02:51 +08:00
commit eaadad789b
2 changed files with 9 additions and 7 deletions

View File

@ -52,4 +52,4 @@
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by DuoShuo.</a></noscript> <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by DuoShuo.</a></noscript>
</div> </div>
</section> </section>
<% } %> <% } %>

View File

@ -1,6 +1,8 @@
<div class="<%= class_name %>"> <% if (post.date && !post.hidedate){ %>
<i class="fa fa-calendar"></i> <div class="<%= class_name %>">
<a href="<%- url_for(post.path) %>"> <i class="fa fa-calendar"></i>
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time> <a href="<%- url_for(post.path) %>">
</a> <time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
</div> </a>
</div>
<% } %>