Generic article teaser. Treat h1/h2 problem
This commit is contained in:
parent
0e6b0d7e43
commit
27f48271e2
4 changed files with 24 additions and 25 deletions
15
layouts/article_intro.erb
Normal file
15
layouts/article_intro.erb
Normal 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>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue