ores.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <%- head_tpl({site_title = site_title, title = fname}) %>
  5. </head>
  6. <body>
  7. <%- header_tpl({site_title = site_title}) %>
  8. <main>
  9. <h1>
  10. <img class="title_icon" src="<%= icon_url %>" />
  11. <%= breadcrumbs[#breadcrumbs][2] -%>:&ensp;<%= fname %>
  12. </h1>
  13. <% if pres then %>
  14. <section id="res_pres">
  15. <% if mconf.gen.presentation_type == "image" then %>
  16. <img src="<%= pres -%>" />
  17. <%else %>
  18. <a href="<%= pres -%>" download="<%= fname -%>">
  19. Download file
  20. </a>
  21. <% end %>
  22. </section>
  23. <% end %>
  24. <section id="res_lineage">
  25. <h2>Classification</h2>
  26. <p>
  27. <% for i, bc in ipairs(breadcrumbs) do %>
  28. <% cls, label = table.unpack(bc) %>
  29. <% if i ~= 1 then %>
  30. <span class="breadcrump_sep">&ensp;&#x27B3;&ensp;</span>
  31. <% end %>
  32. <a
  33. class="breadcrumb<%if i == #breadcrumbs then %> current<% end %>"
  34. href="../class/<%= cls -%>">
  35. <%= label -%>
  36. </a>
  37. <% end %>
  38. </p>
  39. </section>
  40. <section class="res_md" id="res_techmd">
  41. <h2>Metadata</h2>
  42. <p><a href="<%= rdf_href %>">Download RDF document</a></p>
  43. <dl>
  44. <% for p, ol in pairs(techmd) do %>
  45. <dt>
  46. <% if ol.label then %><%= ol.label %>
  47. <% else %><code><%= ol.uri %></code><% end %>
  48. <% if ol.description then %><span
  49. title="<%= ol.description -%>"
  50. >&nbsp;&#x1F6C8;</span>
  51. <% end %>
  52. </dt>
  53. <% for _, o in ipairs(ol) do %>
  54. <dd><%= o %></dd>
  55. <% end %>
  56. <% end %>
  57. </dl>
  58. </section>
  59. <% if next(rel) then %>
  60. <section class="res_md" id="res_rel">
  61. <h2>Relationships</h2>
  62. <dl>
  63. <% for p, ol in pairs(rel) do %>
  64. <dt>
  65. <% if ol.label then %><%= ol.label %>
  66. <% else %><code><%= ol.uri %></code><% end %>
  67. </dt>
  68. <% for _, o in ipairs(ol) do %>
  69. <dd><a href="/res/<%= o.href %>"><%= o.label %></a></dd>
  70. <% end %>
  71. <% end %>
  72. </dl>
  73. </section>
  74. <% end %>
  75. </main>
  76. <footer></footer>
  77. </body>
  78. </html>