dres.html 3.8 KB

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