scratch/content/html/fr/index.erb
Yann Esposito (Yogsototh) 38397fdd9e Better message in homepage
2010-04-19 08:44:03 +02:00

30 lines
1 KiB
Text

-----
title: Bienvenue
noSubMenu: true
-----
<%
number_of_articles=5
number_of_char_for_resume=800
language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'')
last_articles = articles.select do |a|
a.reps[0].path =~ /\/#{language}\//
end
last_articles=last_articles.sort { |x,y| y[:created_at] <=> x[:created_at] }[0..(number_of_articles-1)]
%>
<p>Bonjour et bienvenue sur mon site personnel.</p>
<p>Voici un aperçu<sup>&dagger;</sup> de mes <%= number_of_articles %> derniers articles.</p>
<hr/>
<p class="small">&dagger; approximativement les <%= number_of_char_for_resume %> premiers caractères.</p>
<% last_articles.each do |a| %>
</div>
<h1><span class="date"><%= a[:created_at].strftime( @config[:dateFormat][language.intern] ) %></span> <%= link_to(a[:title], a) %></h1>
<div class="corps">
<%= repair_html ( excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume} ) ) %>
<p>
<%= link_to("en lire plus &rarr;", a) %>
</p>
<% end %>