X-Git-Url: http://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/8047c9c84ae645321839dd5fbeb59fd785c3ea5b..da4a13ce4868f32787813c76898cc9b39dec1bcc:/layouts/default.xml?ds=sidebyside
diff --git a/layouts/default.xml b/layouts/default.xml
index 47470e0..b432c54 100644
--- a/layouts/default.xml
+++ b/layouts/default.xml
@@ -17,10 +17,41 @@
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
+ lic = find_license(@item[:license])
+%>
+ <%= File::basename(lic.identifier.without_ext) %>
+ <%= lic[:title] %>
+ <%= item_uri(lic) %>
+ <%=
+ lic[:"modification-allowed"] == true ? "yes" : "no"
+ %>
+
+<% end
+%>
+
+<% if !doc_header then
+%>