----- ----- <% # -- init variables -- class LocalConf attr_accessor :blog, :article, :languages, :language, :indent def to_s instance_variables.map{ |x| if instance_variable_get(x).class == Array %{#{x.intern}= [#{instance_variable_get(x).join(', ')}]} else %{#{x.intern}= #{instance_variable_get(x)}} end } end end conf=LocalConf.new language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'') conf.language=language # the current item is an article article=( ( not @item[:kind].nil? ) && @item[:kind] == 'article' ) conf.article=article # the current item is a blog entry page blog=( ( not @item[:kind].nil? ) && @item[:kind] == 'blog' ) conf.blog=blog # all supported languages languages=@config[:languages] conf.languages=languages self.instance_variable_set(:@conf, conf) # puts '--- conf ---' # puts conf.to_s %> <% t=tags %> <% if t.length > 0 %> <% end %> <% if article %> <% end %> <% languages.each do |lang| item_for_lang=item_of_language(lang) if not item_for_lang.nil? %> <% end end %> <%= @item[:title] %>
<%= tradOf(:langue) %>
    <% languages.each do |l| %> <% dest=@item_rep.path.sub(/^\/Scratch\/..\//, %{/Scratch/#{l}/}) %> <% if @item_rep.path != dest %>
  • <%= l %>
  • <% end %> <% end %>
<% if article %>
<% end %>
<%= generateMenu %>

<%= @item[:title] %>

<% unless @item[:subtitle].nil? %>

<%= @item[:subtitle] %>

<% end %>
<% if @item[:content_for_summary] %>
<% @item[:content_for_summary] %>
<% end %> <%= generateSubMenu %>
<%= yield %>
<% if article %> <% depth = depthOf(@item) %> <% if depth > 2 or ( depth == 2 and @item.children.length > 0 ) %>
<% end %>

<%= tradOf(:comment) %>

<%= generateIntenseDebateThread %>
<% end %>
<%= tradOf(:entirely_done_with) %> Vim <%= tradOf(:and) %> nanoc
Validation [xhtml] . [css] . [rss]
<%=tradOf(:copyright) %>
<%=tradOf(:last_modified)%>: <%= @item.mtime.strftime(@config[:dateFormat][language.intern]) %>
<%= genAnalytics %>