timeline.ejs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <%
  2. switch (type) {
  3. case 'category':
  4. title = page.category;
  5. icon = 'folder';
  6. break;
  7. case 'tag':
  8. title = '#' + page.tag;
  9. icon = 'tag';
  10. break;
  11. }
  12. %>
  13. <div class="timeline timeline-wrap">
  14. <div class="timeline-row timeline-row-major">
  15. <span class="node"><i class="fa fa-<%= icon %>"></i></span>
  16. <h1 class="title"><%= title %></h1>
  17. </div>
  18. <% page.posts.each(function (post, i) { %>
  19. <div class="timeline-row">
  20. <span class="node"></span>
  21. <div class="content">
  22. <%- partial('post/title', { post: post, index: true, class_name: 'timeline-article-title' }) %>
  23. <div class="article-meta">
  24. <%- partial('post/date', { post: post, class_name: 'article-date', date_format: null }) %>
  25. <%- partial('post/category', { post: post }) %>
  26. <%- partial('post/tag', { post: post }) %>
  27. </div>
  28. </div>
  29. </div>
  30. <% }); %>
  31. </div>
  32. <% if (page.total > 1) { %>
  33. <nav id="page-nav">
  34. <%- paginator({
  35. prev_text: '&laquo; ' + __('nav.prev'),
  36. next_text: __('nav.next') + ' &raquo;'
  37. }) %>
  38. </nav>
  39. <% } %>