scratch/content/html/en/index.erb

46 lines
1.5 KiB
Text
Raw Normal View History

2010-10-05 15:18:17 +00:00
-----
title: Homepage
noSubMenu: true
-----
<%
number_of_articles=5
number_of_char_for_resume=800
language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'')
last_articles = @items.select do |a|
a.reps[0].path =~ /\/#{language}\// && a[:kind] == 'article'
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]+%{ <span class="nicer">»</span>}, a) %>
</h1>
<div class="corps">
<%= repair_html ( excerptize( a.reps[0].compiled_content, {:length => number_of_char_for_resume} ) ) %>
<p>
<%= link_to(%{Read more <span class="nicer">»</span>}, 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.