article.ejs 1.7 KB

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