dres.html 4.0 KB

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