article.ejs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  2. <div class="article-meta">
  3. <%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
  4. <%- partial('post/category') %>
  5. </div>
  6. <div class="article-inner">
  7. <%- partial('post/gallery') %>
  8. <% if (post.link || post.title){ %>
  9. <header class="article-header">
  10. <%- partial('post/title', {class_name: 'p-name article-title'}) %>
  11. </header>
  12. <% } %>
  13. <div class="e-content 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 %>" data-title="<%= post.title %>" class="article-share-link"><%= __('share') %></a>
  27. <% if (post.comments && config.disqus_shortname){ %>
  28. <a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>
  29. <% } %>
  30. <% if (post.comments && theme.valine.enable && theme.valine.appId && theme.valine.appKey ){ %>
  31. <a href="<%- url_for(post.path) %>#comments" class="article-comment-link">
  32. <span class="post-comments-count valine-comment-count" data-xid="<%- url_for(post.path) %>" itemprop="commentCount"></span>
  33. <%= __('comment') %>
  34. </a>
  35. <% } %>
  36. <%- partial('post/tag') %>
  37. </footer>
  38. </div>
  39. <% if (!index){ %>
  40. <%- partial('post/nav') %>
  41. <% } %>
  42. </article>
  43. <% if (!index && post.comments && config.disqus_shortname){ %>
  44. <section id="comments">
  45. <div id="disqus_thread">
  46. <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  47. </div>
  48. </section>
  49. <% } %>
  50. <% if (!index && post.comments && theme.valine.enable && theme.valine.appId && theme.valine.appKey){ %>
  51. <section id="comments" class="vcomment">
  52. </section>
  53. <% } %>