Daily Stormer Search
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

  1. <%- include('_header') -%>
  2. <!-- Primary Page Layout
  3. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  4. <%- include('_search') %>
  5. <%
  6. // break a list into 3 even lists
  7. function thirds(list) {
  8. if (list.length <= 50) {
  9. return [list, [], []]
  10. }
  11. const boundary = Math.round(list.length / 3)
  12. a = boundary
  13. b = boundary * 2
  14. c = boundary * 3
  15. return [list.slice(0, a), list.slice(a, b), list.slice(b, c)]
  16. }
  17. %>
  18. <section id="tag-index" class="clean" style="margin-top: 5%" >
  19. <div class="container">
  20. <div class="row">
  21. <% const parts = thirds(tags) %>
  22. <% parts.forEach((ts) => { %>
  23. <div class="four columns" >
  24. <% ts.forEach((t) => { %>
  25. <h6><a href="/tag/<%- t.name.replace(/\s+/g, '-') %>"><%- t.name %></a> (<span class="count"><%- t.c %></span>)</h6>
  26. <% }) %>
  27. </div>
  28. <% }) %>
  29. </div>
  30. </div>
  31. </section>
  32. <%- include('_pagination') %>
  33. <%- include('_footer') -%>