index.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <%- head_tpl({site_title = site_title, title = "Index"}) %>
  5. <!-- JS client-side search. -->
  6. <script src="/js/fuse.min.js"></script>
  7. <script src="/js/fuse_init.js"></script>
  8. <script>window.webroot = "<%= webroot -%>";</script>
  9. <script src="/js/search.js" defer></script>
  10. </head>
  11. <body>
  12. <%- header_tpl({title = title}) %>
  13. <main>
  14. <h1><%= title %></h1>
  15. <section id="search">
  16. <h2>Search</h2>
  17. <form action="/" method="GET">
  18. <fieldset>
  19. <label class="v_hidden" for="q">Search query</label>
  20. <div class="float-left">
  21. <input
  22. type="text" class="float-left"
  23. placeholder="Search by title, type, etc."
  24. name="q" id="qry_f">
  25. </div>
  26. <input class="button-primary" type="submit" value="Search">
  27. </fieldset>
  28. </form>
  29. </section>
  30. <section id="search_results" class="hidden">
  31. <h2>Search results</h2>
  32. <ul id="result_list"></ul>
  33. </section>
  34. <section id="obj_list">
  35. <h2>Recent artifacts</h2>
  36. <ul>
  37. <% for _, obj in ipairs(obj_idx) do %>
  38. <li class="obj_link">
  39. <a href="<%= obj.href %>">
  40. <%if obj.tn then %>
  41. <img src="<%= obj.tn %>" alt="<%= obj.title.data %>" />
  42. <% end %>
  43. <%= obj.title.data %>
  44. <%if obj.title.lang then %>
  45. <span class="langtag"><%= obj.title.lang %></span>
  46. <% end %>
  47. </a>
  48. </li>
  49. <% end %>
  50. </ul>
  51. </section>
  52. </main>
  53. <footer></footer>
  54. </body>
  55. </html>