MOD avancement dans la Grande Restructuration
[euphorik.git] / index.yaws
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
5 <head>
6    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7    <title>euphorik.ch</title>
8    <erl>
9       % prédéfinit la feuille de style
10       out(A) -> 
11          CSS = case euphorik_bd:css_from_user_cookie(yaws_api:find_cookie_val("cookie", A)) of
12             undefined -> "styles/1/euphorik.css";
13             C -> C
14          end,
15          {ehtml, {link ,
16             [
17                {id, "cssPrincipale" },
18                {rel, "stylesheet"},
19                {href, CSS},
20                {type, "text/css"},
21                {media, "screen"}
22             ], []}
23          }.
24    </erl>
25    <link rel="stylesheet" href="css/jquery.lightbox.css" type="text/css" media="screen" ></link>
26 <script type="text/javascript" src="js/euphorik.js" ></script>
27 </head>
28    <body>
29       <div id="container">
30          <erl>
31             % permet de prédéfinir la "class" du logo pour un ekMaster...
32             out(A) -> 
33                Est_ek_master = euphorik_bd:is_ek_master_from_cookie(yaws_api:find_cookie_val("cookie", A)),
34                {ehtml, {'div', [{id, "logo"}] ++ if Est_ek_master -> [{class, "ekMaster"}]; true -> [] end}}.
35                    
36          </erl>
37          <div id="info" style="display:none" ><div id="icone"></div><div class="fermer" ></div><div class="message" ></div><div class="boutons"></div></div>
38          <ul id="menu">
39             <li class="minichat">chat</li><li class="admin" style="display:none">admin</li><li class="profile"></li><li class="register">register</li><li class="logout">logout</li><li class="about">about</li>
40          </ul>
41          <form action="" id="formMenuCss">
42             <p>
43                <select id="menuCss">
44                   <erl>
45                      % parse les styles disponible
46                      out(A) ->
47                         Stlyes_dir = A#arg.docroot ++ "/styles",
48                         {ok, Liste_dir} = file:list_dir(Stlyes_dir),
49                         {ehtml, 
50                            lists:foldr(
51                               fun(Dir, Acc) ->
52                                  case file:consult(Stlyes_dir ++ "/" ++ Dir ++ "/infos.txt") of
53                                     {ok, [{nom, Nom}]} ->
54                                        [{option, [{value, Dir}], Nom} | Acc];
55                                     _ -> 
56                                        Acc
57                                  end
58                               end,
59                               [],
60                               Liste_dir
61                            )
62                         }.
63                   </erl>
64                   <!-- option value="1" selected="selected">Retro</option>
65                   <option value="2">Dark</option -->
66                </select>
67             </p>
68          </form> 
69          <div id="page"></div>
70          <div id="footer"><span class="copyright">copyright 2008 euphorik.ch</span><span class="conditions lien">conditions d'utilisation</span><a href="http://yaws.hyber.org"><img src="img/powered-by-yaws.gif" alt="powered by Yaws" /></a></div>
71       </div>
72    </body>
73 </html>