article.ejs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
  2. <div class="article-inner">
  3. <% if (post.banner){ %>
  4. <%- partial('post/banner') %>
  5. <% } %>
  6. <%- partial('post/gallery') %>
  7. <% if (post.link || post.title){ %>
  8. <header class="article-header">
  9. <%- partial('post/title', {class_name: 'article-title'}) %>
  10. <div class="article-meta">
  11. <%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
  12. <%- partial('post/category') %>
  13. </div>
  14. </header>
  15. <% } %>
  16. <div class="article-entry" itemprop="articleBody">
  17. <% if (post.excerpt && index){ %>
  18. <%- post.excerpt %>
  19. <% if (theme.excerpt_link){ %>
  20. <p class="article-more-link">
  21. <a href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %></a>
  22. </p>
  23. <% } %>
  24. <% } else { %>
  25. <%- post.content %>
  26. <% } %>
  27. </div>
  28. <footer class="article-footer">
  29. <a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('article.share') %></a>
  30. <% if (post.comments && config.disqus_shortname){ %>
  31. <a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('article.comments') %></a>
  32. <% } else if (post.comments && config.duoshuo_shortname){ %>
  33. <a href="<%- post.permalink %>#ds-thread" class="article-comment-link"><%= __('article.comments') %></a>
  34. <% } %>
  35. <%- partial('post/tag') %>
  36. </footer>
  37. </div>
  38. <% if (!index){ %>
  39. <%- partial('post/nav') %>
  40. <% } %>
  41. </article>
  42. <% if (!index && post.comments && config.disqus_shortname){ %>
  43. <section id="comments">
  44. <div id="disqus_thread">
  45. <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  46. </div>
  47. </section>
  48. <% } else if (!index && post.comments && config.duoshuo_shortname){ %>
  49. <section id="comments">
  50. <div id="ds-thread" class="ds-thread" data-thread-key="<%- post.permalink %>" data-title="<%- post.title %>" data-url="<%- post.permalink %>">
  51. <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by DuoShuo.</a></noscript>
  52. </div>
  53. </section>
  54. <% } %>