archive.ejs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <% if (is_tag()) { %>
  2. <script>
  3. window.subData= { title:'Tag : <%= page.tag %>'}
  4. </script>
  5. <% } else if (is_archive()) { %>
  6. <script>
  7. window.subData= { title:'Year : <%= page.year %><%= page.month ? '.' + page.month : '' %>'}
  8. </script>
  9. <% } else if (is_category()) { %>
  10. <script>
  11. window.subData= { title:'Category : <%= page.category %>'}
  12. </script>
  13. <% } %>
  14. <section class="post-list">
  15. <% page.posts.each(function(post){ %>
  16. <div class='post-wrapper'>
  17. <%- partial('post', {post: post}) %>
  18. </div>
  19. <% }) %>
  20. </section>
  21. <% if (page.total > 1) { %>
  22. <nav id="page-nav">
  23. <% if (page.prev != 0) { %>
  24. <a class="prev" rel="prev" href="<%= url_for(page.prev_link) %>">
  25. <span class="icon icon-chevron-left"></span>
  26. <span class="text">Previous</span>
  27. </a>
  28. <% } %>
  29. <% if (page.next != 0) { %>
  30. <a class="next" rel="next" href="<%= url_for(page.next_link) %>">
  31. <span class="text">Next</span>
  32. <span class="icon icon-chevron-right"></span>
  33. </a>
  34. <% } %>
  35. </nav>
  36. <% } %>