scratch/content/html/en/index.erb
Yann Esposito (Yogsototh) 73baf14612 Better calendar generation
2010-05-07 16:42:45 +02:00

43 lines
1.3 KiB
Text

-----
title: Welcome
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>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>
<hr/>
<p class="small">&dagger; approximatively the <%= number_of_char_for_resume %> first characters.</p>
<% last_articles.each do |a| %>
</div>
<h1>
<%= calendar_for(a[:created_at], language) %>
<%= 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("Read more &rarr;", a) %>
</p>
<% end %>
</div>
<a href="#titre">&uarr; back to top &uarr;</a>
<div class="corps">
<h2>tag cloud (2 or more posts only)</h2>
<%= tagCloud(2) %>
</div>
newcorps
This left bottom button get you on the top of page and open the menu.