39 lines
1.5 KiB
HTML
39 lines
1.5 KiB
HTML
<%
|
|
def sanitize_path(path)
|
|
result = path
|
|
if (!path.start_with?('/'))
|
|
result = '/' + result
|
|
end
|
|
if (!path.end_with?('/'))
|
|
result = result + '/'
|
|
end
|
|
result
|
|
end
|
|
%>
|
|
<div class="row">
|
|
<div class="span8">
|
|
<article itemscope itemtype="http://schema.org/BlogPosting">
|
|
<header>
|
|
<h1 itemprop="name"><%= item[:title]%>
|
|
<% if item.attributes.has_key?(:subtitle) then %>
|
|
<br/><small><%= item[:subtitle] %></small>
|
|
<% end %></h1>
|
|
<ul class="unstyled">
|
|
<li><i class="icon-calendar"></i> <time itemprop="dateCreated" datetime="<%= @item[:created_at].strftime("%Y-%m-%d") %>"><%= @item[:created_at].strftime("%d.%m.%Y") %></time></li>
|
|
<% if @item[:author] %><li><i class="icon-pencil"></i> @item[:author]</li><% end %>
|
|
<% if @item[:refers_to] %><li><i class="icon-cogs"></i> <a href="<%= @items[sanitize_path(@item[:refers_to])].path() %>"><%= @items[sanitize_path(@item[:refers_to])][:title] %></a></li><% end %>
|
|
<li><i class="icon-bookmark"></i> <a itemprop="url" href="<%= item.path() %>">Permalink</a></li>
|
|
</ul>
|
|
</header>
|
|
<div class="clearfix"></div>
|
|
<p>
|
|
<section>
|
|
<%= yield %>
|
|
</section>
|
|
</article>
|
|
</div>
|
|
<div class="span4">
|
|
<div id="sidebar"></div>
|
|
<script type="text/javascript">$("#sidebar").load("/sidebar/index.html");</script>
|
|
</div>
|
|
</div>
|