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