dres.html 3.9 KB

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