dres.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. <a href="<%= rdf_href %>">RDF document</a>
  27. </section>
  28. <section id="res_dmd">
  29. <h2>Metadata</h2>
  30. <dl class="res_md">
  31. <% for _, ol in ipairs(dmd) do %>
  32. <dt>
  33. <% if ol.label then %><%= ol.label %>
  34. <% else %><code><%= ol.uri %></code><% end %>
  35. </dt>
  36. <% for _, o in ipairs(ol) do %>
  37. <dd><%= o %></dd>
  38. <% end %>
  39. <% end %>
  40. </dl>
  41. </section>
  42. <% if #rel > 0 then %>
  43. <section id="res_rel">
  44. <h2>Relationships</h2>
  45. <dl class="res_md">
  46. <% for p, ol in pairs(rel) do %>
  47. <dt>
  48. <% if ol.label then %><%= ol.label %>
  49. <% else %><code><%= ol.uri %></code><% end %>
  50. </dt>
  51. <% for _, o in ipairs(ol) do %>
  52. <dd><a href="/res/<%= o.data %>.html"><%= o.data %></a></dd>
  53. <% end %>
  54. <% end %>
  55. </dl>
  56. </section>
  57. <% end %>
  58. <% if #children > 0 then %>
  59. <section id="res_children">
  60. <h2>Contains</h2>
  61. <ul>
  62. <% for _, ll in ipairs(children) do %>
  63. <li>Sequence (<%= #ll %> items):<ol>
  64. <% for i, el in ipairs(ll) do %>
  65. <li><a href="<%= el.href %>">
  66. <% if el.tn then %>
  67. <img src="<%= el.tn %>" alt="<%= el.label %>" />
  68. <% else %>
  69. <%= el.label %>
  70. <% end %>
  71. </a></li>
  72. <%end %>
  73. </ol></li>
  74. <% end %>
  75. </ul>
  76. </section>
  77. <% end %>
  78. </main>
  79. <footer></footer>
  80. </body>
  81. </html>