underscore-archive.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <script type="text/html" id="content-template">
  2. <article id="post-<%= post.ID %>" class="post">
  3. <header class="entry-header">
  4. <h1 class="entry-title"><a href="<%= post.link %>" rel="bookmark"><%= post.title %></a></h1>
  5. <% if ( 'post' === post.type ) { %>
  6. <div class="entry-meta">
  7. <% postDate = new Date( post.date ); %>
  8. <span class="posted-on">
  9. <?php esc_html_e( 'Posted on', '_s_backbone' ); ?>
  10. <time class="entry-date published">
  11. <% print( ( postDate.getMonth() + 1 ) + '/' + postDate.getDate() + '/' + postDate.getFullYear() ); %>
  12. </time>
  13. </span>
  14. <span class="byline">
  15. <?php esc_html_e( 'by', '_s_backbone' ); ?>
  16. <span class="author vcard">
  17. <a class="url fn n" href="<%= settings.pathInfo['author_permastruct'].replace( '%author%', post.author.get( 'username' ) ) %>">
  18. <%= post.author.get( 'nickname' ) %>
  19. </a>
  20. </span>
  21. </span>
  22. </div><!-- .entry-meta -->
  23. <% } %>
  24. </header><!-- .entry-header -->
  25. <div class="entry-content">
  26. <%= post.content %>
  27. </div><!-- .entry-content -->
  28. <footer class="entry-footer">
  29. <% if ( 'post' === post.type ) { %>
  30. <% if ( post.terms.category ) { %>
  31. <span class="cat-links">
  32. <?php esc_html_e( 'Posted in', '_s_backbone' ); ?>
  33. <% _.each( post.terms.category, function( category ) { %>
  34. <a href="<%= category.link %>"><%= category.name %></a>
  35. <% } ); %>
  36. </span>
  37. <% } %>
  38. <% if ( post.terms.tag ) { %>
  39. <span class="tags-links">
  40. <% _.each( post.terms.tag, function( tag ) { %>
  41. <a href="<%= tag.link %>"><%= tag.name %></a>
  42. <% } ); %>
  43. </span>
  44. <% } %>
  45. <% } %>
  46. </footer><!-- .entry-footer -->
  47. </article><!-- #post-<%= post.ID %> -->
  48. </script>
  49. <script type="text/html" id="more-button-template">
  50. <div class="more-posts">
  51. <a class="more-button button btn-lg btn btn-danger" href="#"><?php esc_html_e( 'More', '_s_backbone' ); ?></a>
  52. </div>
  53. </script>