scratch/content/html/en/index.erb

46 lines
1.4 KiB
Text
Raw Normal View History

-----
2010-06-25 22:56:41 +00:00
title: Homepage
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-05-28 06:59:04 +00:00
2010-04-16 14:31:56 +00:00
<p>Welcome on my personnal website.</p>
2010-05-28 06:59:04 +00:00
<p>Here are my <%= number_of_articles %> last posts begining<sup><a href="#footnote1">&dagger;</a></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
2010-06-25 22:56:41 +00:00
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.
2010-04-16 14:31:56 +00:00
<hr/>
2010-05-28 06:59:04 +00:00
<p class="small"><span id="footnote1">&dagger;</span> approximatively the <%= number_of_char_for_resume %> first characters.</p>
2010-04-16 14:31:56 +00:00
<% last_articles.each do |a| %>
</div>
2010-05-07 06:51:02 +00:00
<h1>
2010-05-28 06:59:04 +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-05-28 06:59:04 +00:00
<%= link_to("Read more &rarr;", a) %>
2010-04-16 15:05:20 +00:00
</p>
<% end %>
</div>
<div class="corps">
2010-05-28 06:59:04 +00:00
<h2>tag cloud (2 or more posts only)</h2>
2010-04-29 09:11:41 +00:00
<%= 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.