dres.html 3.4 KB

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