Article layout, dummy articles
This commit is contained in:
parent
e391272275
commit
d4feb90226
3 changed files with 59 additions and 0 deletions
10
content/articles/0001-first-post/index.md
Normal file
10
content/articles/0001-first-post/index.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
kind: article
|
||||
created_at: 2013-08-18
|
||||
title: First post!
|
||||
subtitle: Irgendwas muß ich ja schreiben
|
||||
---
|
||||
Dies ist der erste Dummyartikel für das Blog.
|
||||
<!--break-->
|
||||
Mehr Details. Blah.
|
||||
|
||||
10
content/articles/0002-project-latitude-gestartet/index.md
Normal file
10
content/articles/0002-project-latitude-gestartet/index.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
kind: article
|
||||
created_at: 2013-08-19
|
||||
title: Project Latitude gestartet
|
||||
refers_to: projects/project-latitude
|
||||
---
|
||||
Jawoll, es geht langsam los!
|
||||
<!--break-->
|
||||
Mehr Details. Blah.
|
||||
|
||||
39
layouts/article_body.html
Normal file
39
layouts/article_body.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<%
|
||||
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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue