X-Git-Url: http://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/8047c9c84ae645321839dd5fbeb59fd785c3ea5b..78e7de848f072d19e6c99865f793dbec482c7858:/layouts/default.xml
diff --git a/layouts/default.xml b/layouts/default.xml
index 47470e0..74c454a 100644
--- a/layouts/default.xml
+++ b/layouts/default.xml
@@ -17,10 +17,55 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see
-->
-
- <%= @item[:title] %>
-
-
<%= @item.fetch(:header, @item[:title]) %>
- <%= yield() %>
-
+<%
+ doc_str = yield()
+ doc = Nokogiri::XML(sprintf("%s",
+ Xmlns['xhtml'], doc_str))
+
+ doc_header = nil
+ if !doc.xpath("//xhtml:h1", Xmlns).empty? then
+ doc_header = doc.xpath("string(//xhtml:h1)", Xmlns)
+ end
+%>
+ <%= @item.fetch(:title, doc_header) %>
+<% [@item.fetch(:copyright, [])].flatten.each do |copyright|
+%> <%= copyright %>
+<% end
+ if @item[:license] then
+ licref = @item[:license].split
+ lic = find_license(licref[0])
+%>
+ <%= File::basename(lic.identifier.without_ext) %>
+ <%= [lic[:title], licref[1..-1]].compact.join(" ").strip %>
+ <%= item_uri(lic) %>
+ <%=
+ lic[:"modification-allowed"] == true ? "yes" : "no"
+ %>
+
+<% end
+%>
+ <% breadcrumbs_trail().compact.each do |i|
+ if i == @item then next end %>
+
+ <%=
+ if i == @items["/index.*"] then
+ "Entrance"
+ else
+ i[:title]
+ end
+ %>
+ <%= item_uri(i) %>
+ <% end %>
+
+
+<% if !doc_header then
+%>