2009-10-09 12:27:31 +00:00
|
|
|
-----
|
|
|
|
|
2009-10-12 09:22:31 +00:00
|
|
|
# # les representations (une par langue + une multi)
|
|
|
|
# reps:
|
|
|
|
# default: {}
|
|
|
|
# en: {}
|
|
|
|
# fr: {}
|
2009-10-09 12:27:31 +00:00
|
|
|
|
|
|
|
-----
|
|
|
|
<%
|
2009-10-12 09:22:31 +00:00
|
|
|
# -- init variables --
|
|
|
|
|
|
|
|
class LocalConf
|
|
|
|
attr_accessor :multi, :blog, :article, :languages, :language, :indent
|
2009-10-09 12:27:31 +00:00
|
|
|
end
|
2009-10-12 09:22:31 +00:00
|
|
|
|
|
|
|
conf=LocalConf.new
|
|
|
|
|
|
|
|
# the current rep is the multi one
|
|
|
|
multi= ( @item_rep.name == :default )
|
|
|
|
conf.multi=multi
|
|
|
|
# the current item is an article
|
|
|
|
article= ( ( not @item[:kind].nil? ) && @item[:kind] == 'article' )
|
|
|
|
conf.article=article
|
|
|
|
# the current rep language (if not multi)
|
|
|
|
language= ( @item_rep.name )
|
|
|
|
conf.language=language
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
|
|
puts "YYY"
|
|
|
|
puts %{multi= #{conf.multi}}
|
|
|
|
puts %{article= #{conf.article}}
|
|
|
|
puts %{language= #{conf.language}}
|
|
|
|
puts %{blog= #{conf.blog}}
|
|
|
|
puts %{languages= [#{conf.languages.join(", ")}]}
|
|
|
|
puts "YYY"
|
|
|
|
|
|
|
|
%><?xml version="1.0" encoding="utf-8"?>
|
2009-10-09 12:27:31 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="/Scratch/img/favicon.ico" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/Scratch/css/twilight.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/Scratch/assets/css/layout.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/Scratch/assets/css/gen.css" />
|
2009-10-12 09:22:31 +00:00
|
|
|
<%= conf.indent=' '; feeds(conf) %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<% if multi %>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/Scratch/css/js.css" />
|
2009-10-12 09:22:31 +00:00
|
|
|
<% alternate(conf) %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<script type="text/javascript" src="/Scratch/js/jquery-1.3.1.min.js"></script>
|
|
|
|
<script type="text/javascript" src="/Scratch/js/jquery.cookie.js"></script>
|
|
|
|
<script type="text/javascript" src="/Scratch/js/jquery.ga.js"></script>
|
|
|
|
<script type="text/javascript" src="/Scratch/js/index.js"></script>
|
|
|
|
<title>Yann Esposito</title>
|
|
|
|
<% else %>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/Scratch/css/nojs.css" />
|
2009-10-09 14:32:50 +00:00
|
|
|
<title>Yogsototh's Blog - <%= puts %{multiPageTitle} %></title>
|
2009-10-09 12:27:31 +00:00
|
|
|
<% end %>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<% if multi %>
|
|
|
|
<noscript>
|
|
|
|
<div id="blackpage"></div>
|
|
|
|
<div id="nojsredirect">
|
|
|
|
<% languages.each do |lang| %>
|
|
|
|
<div class="nojsbutton">
|
2009-10-09 14:32:50 +00:00
|
|
|
<a href="<%= puts %{@item_rep.path.sub(/multi/,lang)} %>">
|
|
|
|
<%= puts %{tradOfKeywordIn(:nojsclickme,lang)} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</noscript>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
<div id="entete">
|
|
|
|
<div id="titre">
|
|
|
|
<h1>
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= puts %{multiTitleFor(@page)} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<% if article or blog %>
|
|
|
|
<div id="rss">
|
|
|
|
<% if multi %>
|
|
|
|
<% languages.each do |lang| %>
|
|
|
|
<span class="<%=lang%>"><a href="http://feeds.feedburner.com/yannespositocom<%=lang%>">RSS</a></span>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<span class="<%=@item_rep.name%>"><a href="http://feeds.feedburner.com/yannespositocom<%= language %>">RSS</a></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2009-10-09 14:12:44 +00:00
|
|
|
<% unless @item[:multiSubTitle].nil? %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<div class="flush"></div>
|
|
|
|
<h2>
|
|
|
|
<%= multiSubTitleFor(@page) %>
|
|
|
|
</h2>
|
|
|
|
<% end %>
|
|
|
|
<div id="choix">
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= puts %{tradOf(:langue)} %>
|
|
|
|
<%= puts %{generateLanguageChoice} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
</div>
|
|
|
|
<div class="flush"></div>
|
|
|
|
<div id="liens">
|
|
|
|
<% if article %>
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= puts %{generateMultiMenuForBlog} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<% else %>
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= puts %{generateMultiMenu} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="ombre"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flush"></div>
|
|
|
|
|
|
|
|
<% if article and depthOf(@page) == 2 %>
|
|
|
|
<% if hasPrevious(@page) %>
|
|
|
|
<%= previousArticleFor(@page) %>
|
|
|
|
<% end %>
|
|
|
|
<% if hasNext(@page) %>
|
|
|
|
<%= nextArticleFor(@page) %>
|
|
|
|
<% end %>
|
|
|
|
<div class="flush"></div>
|
|
|
|
<% end %>
|
|
|
|
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= puts %{generateMultiSubMenuFor(@page)} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
|
|
|
|
<div class="flush"></div>
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= puts %{generateLanguageOnlyTag} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<div id="afterheader">
|
|
|
|
|
|
|
|
<div class="corps">
|
2009-10-09 14:32:50 +00:00
|
|
|
<%= yield %>
|
2009-10-09 12:27:31 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if article %>
|
|
|
|
<% if depthOf(@page) == 3 %>
|
|
|
|
<div class="navigation">
|
|
|
|
<%= previousFor(@page) %>
|
|
|
|
<%= nextFor(@page) %>
|
|
|
|
</div>
|
|
|
|
<div class="flush"></div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if article %>
|
|
|
|
<%= generateAddThisButton %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="corps" id="comment">
|
|
|
|
<h2><%= tradOf(:comment) %></h2>
|
|
|
|
<%= generateDisqusThread %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div id="bottom">
|
|
|
|
<div>
|
|
|
|
en:Entirely done with::
|
|
|
|
fr:Site entièrement réalisé avec::
|
|
|
|
<a href="http://www.vim.org">Vim</a>
|
|
|
|
fr:et::en:and::
|
|
|
|
<a href="http://nanoc.stoneship.org">nanoc</a>
|
|
|
|
</div>
|
|
|
|
<div>
|
2009-10-09 14:32:50 +00:00
|
|
|
<% puts %{validationPage = @items.each{ |p| p.path == '/Scratch/multi/validation/' } } %>
|
|
|
|
<%= puts %{span_multi_link_to_unless_current( {:en => "Validation: ", :fr => "Validation : "}, validationPage)} %>
|
2009-10-09 12:27:31 +00:00
|
|
|
<a href="http://validator.w3.org/check?uri=referer"> [xhtml] </a>
|
|
|
|
.
|
|
|
|
<a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"> [css] </a>
|
|
|
|
.
|
|
|
|
<a href="http://validator.w3.org/feed/check.cgi?url=http%3A//yannesposito.com/Scratch/en/blog/feed/feed.xml" class="en">[rss]</a>
|
|
|
|
<a href="http://validator.w3.org/feed/check.cgi?url=http%3A//yannesposito.com/Scratch/fr/blog/feed/feed.xml" class="fr">[rss]</a>
|
|
|
|
</div>
|
|
|
|
<div id="lastmod">
|
2009-10-09 14:32:50 +00:00
|
|
|
<en>Last modified: <%= @item.mtime.strftime("%m/%d/%Y") %> </en>
|
|
|
|
<fr>dernière modification: <%= @item.mtime.strftime("%d/%m/%Y") %> </fr>
|
2009-10-09 12:27:31 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|