dres.html 3.2 KB

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