scratch/content/html/en/index.erb
Yann Esposito (Yogsototh) c993a0982e Better intro
2010-09-10 10:07:55 +02:00

45 lines
1.4 KiB
Text

-----
title: Homepage
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 the begining<sup><a href="#footnote1">&dagger;</a></sup> of my <%= number_of_articles %> last blog posts.</p>
<p> You can also search the entries with <a href="#tagcloud">tag cloud</a></p>
You can subscribe to my RSS feed. You'll never miss a post. <a href="/Scratch/en/rss">Click here</a> if you don't know what RSS feeds are.
<hr/>
<p class="small"><span id="footnote1">&dagger;</span> 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>
<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.