index.html 3.2 KB

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