blog.ejs 1.3 KB

12345678910111213141516171819202122232425262728
  1. <div class="container bottom-spacer">
  2. <div class="row up-spacer bottom-spacer">
  3. <div class="col-12 text-center">
  4. <h1 class="display-3" style="margin-bottom: 0px;">
  5. <b>J1X</b> <span class="font-weight-lighter">BLOG</span>
  6. </h1>
  7. <h4><small class="text-muted">Technical writings by James Peret</small></h4>
  8. </div>
  9. </div>
  10. <div class="row blog-posts">
  11. <% var i = 0 %>
  12. <% order_posts(site.posts).forEach(function(page) { %>
  13. <% i += 1 %>
  14. <% if(i == 1) { %>
  15. <% var data = { post: page, size: 12, image: `/images/hero/blog/${page.image.feature}` }%>
  16. <%- partial('_partial/content-card', data) %>
  17. <% } else if (i == 2 || i == 3) { %>
  18. <% var data = { post: page, size: 6, image: `/images/thumbnails/blog/${page.image.feature}` }%>
  19. <%- partial('_partial/content-card', data) %>
  20. <% } else { %>
  21. <% var data = {post: page, size: 4, image: `/images/thumbnails/blog/${page.image.feature}` }%>
  22. <%- partial('_partial/content-card', data) %>
  23. <% } %>
  24. <% }) %>
  25. </div>
  26. </div>
  27. <%- partial('_partial/about-author') %>
  28. <%- partial('_partial/contact-form') %>