article.ejs 2.2 KB

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