scratch/content/html/en/index.erb

44 lines
1.3 KiB
Text
Raw Normal View History

-----
title: Welcome
noSubMenu: true
-----
<%
number_of_articles=5
2010-04-16 14:31:56 +00:00
number_of_char_for_resume=800
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 14:31:56 +00:00
<p>Welcome on my personnal website.</p>
<p>Here are my <%= number_of_articles %> last posts begining<sup>&dagger;</sup>.</p>
<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">&dagger; approximatively the <%= number_of_char_for_resume %> first characters.</p>
<% last_articles.each do |a| %>
</div>
2010-05-07 06:51:02 +00:00
<h1>
2010-05-07 14:42:45 +00:00
<%= calendar_for(a[:created_at], language) %>
2010-05-07 06:51:02 +00:00
<%= link_to(a[:title], a) %>
</h1>
<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 &rarr;", a) %>
2010-04-16 15:05:20 +00:00
</p>
<% end %>
</div>
<a href="#titre">&uarr; back to top &uarr;</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.