2010-04-16 11:56:24 +00:00
|
|
|
-----
|
|
|
|
title: Welcome
|
|
|
|
noSubMenu: true
|
|
|
|
-----
|
|
|
|
<%
|
|
|
|
number_of_articles=5
|
2010-04-16 14:31:56 +00:00
|
|
|
number_of_char_for_resume=800
|
2010-04-16 11:56:24 +00:00
|
|
|
language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'')
|
|
|
|
last_articles = articles.select do |a|
|
|
|
|
a.reps[0].path =~ /\/#{language}\//
|
2010-04-16 14:31:56 +00:00
|
|
|
end
|
|
|
|
last_articles=last_articles.sort { |x,y| y[:created_at] <=> x[:created_at] }[0..(number_of_articles-1)]
|
2010-04-16 11:56:24 +00:00
|
|
|
%>
|
2010-04-16 14:31:56 +00:00
|
|
|
<p>Welcome on my personnal website.</p>
|
|
|
|
|
|
|
|
<p>Here are my <%= number_of_articles %> last posts begining<sup>†</sup>.</p>
|
2010-04-16 16:57:27 +00:00
|
|
|
<p> You can also search the entries with <a href="#tagcloud">tag cloud</a></p>
|
2010-04-16 14:31:56 +00:00
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<p class="small">† approximatively the <%= number_of_char_for_resume %> first characters.</p>
|
|
|
|
|
2010-05-07 06:51:02 +00:00
|
|
|
<%
|
|
|
|
if language == "fr"
|
|
|
|
monthnames=[nil]+%w(Jan Fév Mar Avr Mai Jui Jul Aoû Sep Oct Nov Déc)
|
|
|
|
else
|
|
|
|
monthnames=[nil]+%w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
|
|
|
|
end
|
|
|
|
%>
|
2010-04-16 11:56:24 +00:00
|
|
|
<% last_articles.each do |a| %>
|
|
|
|
</div>
|
2010-05-07 06:51:02 +00:00
|
|
|
<h1>
|
|
|
|
<div class="date">
|
|
|
|
<div class="day"><%= a[:created_at].day %></div>
|
|
|
|
<div class="month"><%= monthnames[ a[:created_at].mon ] %></div>
|
|
|
|
<div class="year"><%= a[:created_at].year %></div>
|
|
|
|
</div>
|
|
|
|
<%= link_to(a[:title], a) %>
|
|
|
|
</h1>
|
2010-04-16 11:56:24 +00:00
|
|
|
<div class="corps">
|
2010-04-16 14:31:56 +00:00
|
|
|
<%= repair_html ( excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume} ) ) %>
|
2010-04-16 15:05:20 +00:00
|
|
|
<p>
|
2010-04-19 06:44:03 +00:00
|
|
|
<%= link_to("Read more →", a) %>
|
2010-04-16 15:05:20 +00:00
|
|
|
</p>
|
2010-04-16 11:56:24 +00:00
|
|
|
<% end %>
|
2010-04-16 16:57:27 +00:00
|
|
|
</div>
|
|
|
|
<a href="#titre">↑ back to top ↑</a>
|
|
|
|
<div class="corps">
|
2010-04-29 09:11:41 +00:00
|
|
|
<h2>tag cloud (2 or more posts only)</h2>
|
|
|
|
<%= tagCloud(2) %>
|
2010-04-27 23:00:16 +00:00
|
|
|
</div>
|
2010-05-05 18:53:54 +00:00
|
|
|
|
|
|
|
newcorps
|
|
|
|
|
|
|
|
This left bottom button get you on the top of page and open the menu.
|