X-Git-Url: http://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/1dc021529f88ca4f1ebfed76ffe6378272a23032..da4a13ce4868f32787813c76898cc9b39dec1bcc:/layouts/default.xml diff --git a/layouts/default.xml b/layouts/default.xml index 901b0c3..b432c54 100644 --- a/layouts/default.xml +++ b/layouts/default.xml @@ -17,17 +17,41 @@ You should have received a copy of the GNU General Public License along with this program. If not, see --> - - <%= @item[:title] %> - +<% + 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 +%> <%= item_source(@item) %> <%= item.fetch(:gitrev) %> <%= Time.now.gmtime.strftime "%Y-%m-%d %H:%M UTC" %> - -

<%= @item.fetch(:header, @item[:title]) %>

- <%= yield() %> - + +<% if !doc_header then +%>

<%= @item.fetch(:header, @item[:title]) %>

+<% end %><%= doc_str +%>