article.ejs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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/pv') %>
  13. <!--
  14. <%- partial('post/author') %>
  15. -->
  16. </div>
  17. </header>
  18. <% } %>
  19. <div class="article-entry" itemprop="articleBody">
  20. <% if (index && post.excerpt) { %>
  21. <p><%- post.excerpt %></p>
  22. <p class="article-more-link">
  23. <a href="<%- url_for(post.path) %>#more"><%= __('article.more') %></a>
  24. </p>
  25. <% } else { %>
  26. <% if (!index && post.toc) { %>
  27. <div id="toc" class="toc-article">
  28. <strong class="toc-title"><%= __('article.catalogue') %></strong>
  29. <%- toc(post.content) %>
  30. </div>
  31. <% } %>
  32. <%- post.content %>
  33. <% } %>
  34. </div>
  35. <div class="article-meta-extra">
  36. <%- partial('post/category') %>
  37. <%- partial('post/tag') %>
  38. </div>
  39. <% if (is_post()) {%>
  40. <footer class="article-footer">
  41. <%- partial('share/index', { post: post }) %>
  42. <%- partial('comment/counter', { post: post }) %>
  43. </footer>
  44. <% } %>
  45. </div>
  46. <% if (!index) { %>
  47. <%- partial('post/nav') %>
  48. <% } %>
  49. </article>
  50. <% if (!index) { %>
  51. <%- partial('comment/index') %>
  52. <% } %>