dres.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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_thumbnail">
  21. <% if pref_rep then %>
  22. <a href="<%= pref_rep %>">
  23. <img src="<%= tn_url %>" alt="Link to image file"/>
  24. </a>
  25. <% end %>
  26. </section>
  27. <section id="res_lineage">
  28. <h2>Classification</h2>
  29. <p>
  30. <% for i, bc in ipairs(breadcrumbs) do %>
  31. <% cls, label = table.unpack(bc) %>
  32. <% if i ~= 1 then %>
  33. <span class="breadcrumb_sep">&#x27B3;</span>
  34. <% end %>
  35. <a
  36. class="breadcrumb<%if i == #breadcrumbs then %> current<% end %>"
  37. href="../class/<%= cls -%>">
  38. <%= label -%>
  39. </a>
  40. <% end %>
  41. </p>
  42. </section>
  43. <section id="res_dmd">
  44. <h2>Metadata</h2>
  45. <dl class="res_md">
  46. <% for _, ol in ipairs(dmd) do %>
  47. <dt>
  48. <% if ol.label then %><%= ol.label %>
  49. <% else %><code><%= ol.uri %></code><% end %>
  50. <% if ol.description then %><span
  51. title="<%= ol.description -%>"
  52. >&nbsp;&#x1F6C8;</span>
  53. <% end %>
  54. </dt>
  55. <% for _, o in ipairs(ol) do %>
  56. <dd><%= o %></dd>
  57. <% end %>
  58. <% end %>
  59. </dl>
  60. </section>
  61. <% if next(rel) then %>
  62. <section id="res_rel">
  63. <h2>Relationships</h2>
  64. <dl class="res_md">
  65. <% for p, ol in pairs(rel) do %>
  66. <dt>
  67. <% if ol.label then %><%= ol.label %>
  68. <% else %><code><%= ol.uri %></code><% end %>
  69. </dt>
  70. <% for _, o in ipairs(ol) do %>
  71. <dd><a href="<%= o.href %>"><%= o.label %></a></dd>
  72. <% end %>
  73. <% end %>
  74. </dl>
  75. </section>
  76. <% end %>
  77. <% if #children > 0 then %>
  78. <section id="res_children">
  79. <h2>Members</h2>
  80. <ul>
  81. <% for _, ll in ipairs(children) do %>
  82. <li><%= ll[1].label %> (<%= #ll %> items)<ol>
  83. <% for i, el in ipairs(ll) do %>
  84. <li><a href="<%= el.href %>">
  85. <% if el.tn then %>
  86. <img src="<%= el.tn %>" alt="<%= el.label %>" />
  87. <% else %>
  88. <%= el.label %>
  89. <% end %>
  90. </a></li>
  91. <%end %>
  92. </ol></li>
  93. <% end %>
  94. </ul>
  95. </section>
  96. <% end %>
  97. </main>
  98. <footer></footer>
  99. </body>
  100. </html>