ores.html 3.0 KB

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