scratch/content/html/en/blog.erb
Yann Esposito (Yogsototh) d4eff46a7b Fixed some blog error
2011-05-30 14:12:24 +02:00

89 lines
2.2 KiB
Text

-----
kind: blog
title: Blog
menupriority: 2
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)]
def dArr
return %{<span class="nicer">&dArr;</span>}
end
%>
<ul>
<li> <a href="#last-articles"><%= number_of_articles %> latest articles <%=dArr%></a> </li>
<li> <a href="#tagcloud">Tag Cloud <%=dArr%></a></li>
<li> <a href="#archives">Achives <%=dArr%></a></li>
<li> <a href="#two-words-about-the-content">Two words about the content <%=dArr%></a></li>
</ul>
<h2 id="last-articles">
Last <%= number_of_articles %> Articles
</h2>
</div>
<% last_articles.each do |a| %>
<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} ) ) %>
<div class="flush"></div>
<div>
<p>
<%= link_to(%{Read more <span class="nicer">»</span>}, a) %>
</p>
</div>
</div>
<% end %>
<div class="corps">
<div>
<%= tagCloud %>
</div>
</div>
<h2 id="archives">Archives</h2>
<%= generateBlogSubMenu(language) %>
<h2 id="two-words-about-the-content">
Two words about the content
</h2>
<div class="corps">
<p>
Here you'll can find mostly technical articles.
Some are just reminder of technical tips.
But some are long and technically detailled articles.
</p>
<hr/>
<p>
I do my best to traduce each page in french and in english.
It not always easy. English is not my natural language.
I make many errors, orthographic, grammatical, typographical&hellip;
</p>
<p>
<strong> Thanks not to judge me based on these errors! And don't forget content is more important than presentation! </strong>
</p><p>
The first impression I'll let you if we meet in real life should be different from the one I let you based on my website.
</p><p>
I wish you to find something useful or interesting on this website.
</p>