Generic article teaser. Treat h1/h2 problem

This commit is contained in:
Stefan Schlott 2013-08-23 20:03:07 +02:00
parent 0e6b0d7e43
commit 27f48271e2
4 changed files with 24 additions and 25 deletions

15
layouts/article_intro.erb Normal file
View file

@ -0,0 +1,15 @@
<article>
<header><% if !@h then @h='h1' end %>
<<%= @h %>><a href="<%= @article.path() %>"><%= @article[:title]%></a>
<% if @article.attributes.has_key?(:subtitle) then %>
<br/><small><%= @article[:subtitle] %></small>
<% end %></<%= @h %>>
<div class="clearfix"></div>
</header>
<section>
<% if @extended then %>
<%= article_summary(@article) %>
<% end %>
</section>
</article>