dres.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <%- header_tpl({site_title = site_title, title = title}) %>
  5. </head>
  6. <body>
  7. <header>
  8. <h1><%= breadcrumbs[#breadcrumbs][2] %>:&ensp;<%= title %></h1>
  9. </header>
  10. <main>
  11. <section id="res_lineage">
  12. <h2>Classification</h2>
  13. <p>
  14. <% for i, bc in ipairs(breadcrumbs) do %>
  15. <% cls, label = table.unpack(bc) %>
  16. <% if i ~= 1 then %>
  17. <span class="breadcrump_sep">&ensp;&#x27B3;&ensp;</span>
  18. <% end %>
  19. <a
  20. class="breadcrumb<%if i == #breadcrumbs then %> current<% end %>"
  21. href="../class/<%= cls -%>">
  22. <%= label -%>
  23. </a>
  24. <% end %>
  25. </p>
  26. </section>
  27. <section id="res_dmd">
  28. <h2>Metadata</h2>
  29. <dl class="res_md">
  30. <% for _, ol in ipairs(dmd) do %>
  31. <dt>
  32. <% if ol.label then %><%= ol.label %>
  33. <% else %><code><%= ol.uri %></code><% end %>
  34. </dt>
  35. <% for _, o in ipairs(ol) do %>
  36. <dd><%= o %></dd>
  37. <% end %>
  38. <% end %>
  39. </dl>
  40. </section>
  41. <% if #rel > 0 then %>
  42. <section id="res_rel">
  43. <h2>Relationships</h2>
  44. <dl class="res_md">
  45. <% for p, ol in pairs(rel) do %>
  46. <dt>
  47. <% if ol.label then %><%= ol.label %>
  48. <% else %><code><%= ol.uri %></code><% end %>
  49. </dt>
  50. <% for _, o in ipairs(ol) do %>
  51. <dd><a href="/res/<%= o.data %>.html"><%= o.data %></a></dd>
  52. <% end %>
  53. <% end %>
  54. </dl>
  55. </section>
  56. <% end %>
  57. <% if #children > 0 then %>
  58. <section id="res_children">
  59. <h2>Contains</h2>
  60. <ul>
  61. <% for _, ll in ipairs(children) do %>
  62. <li>Sequence (<%= #ll %> items):<ol>
  63. <% for i, el in ipairs(ll) do %>
  64. <li><a href="<%= el.href %>"><%= el.label %></a></li>
  65. <%end %>
  66. </ol></li>
  67. <% end %>
  68. </ul>
  69. </section>
  70. <% end %>
  71. </main>
  72. <footer></footer>
  73. </body>
  74. </html>