]> git.sur5r.net Git - i3/i3.github.io/blob - _templates/i3.mako
specify language in <html>, remove border="0"
[i3/i3.github.io] / _templates / i3.mako
1 <%!
2     require_jquery = False
3     javascript = None
4     js_callback = ''
5 %><!DOCTYPE html>
6 <html lang="en">
7     <head>
8         <meta http-equiv="content-type" content="text/html; charset=utf-8">
9         <title>i3 - improved tiling wm</title>
10         <link rel="icon" type="image/png" href="/favicon.png">
11         <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen">
12         <meta name="description" content="i3 is a dynamic tiling window manager with clean, readable and documented code, featuring extended Xinerama support, usage of libxcb instead of xlib and several improvements over wmii">
13         <meta name="keywords" content="i3, window, manager, tiling, keyboard, wmii, x11, xcb, xinerama, utf8">
14         <meta name="author" content="i3 developers">
15 % if self.attr.javascript:
16         <script type="text/javascript">
17 function loadjs() {
18 % if not self.attr.require_jquery:
19     var element = document.createElement("script");
20     element.src = "/js/${self.attr.javascript}";
21     document.body.appendChild(element);
22 % else:
23     var jquery_done = false,
24         script_done = false;
25     var head = document.getElementsByTagName('head')[0];
26
27     var element = document.createElement("script");
28     element.src = "/js/jquery.1.6.2.min.js";
29     element.onload = element.onreadystatechange = function() {
30         if (!jquery_done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {
31             jquery_done = true;
32             if (script_done) {
33                 ${self.attr.js_callback}
34             }
35             element.onload = element.onreadystatechange = null;
36         }
37     };
38     document.body.appendChild(element);
39
40     var script = document.createElement("script");
41     script.src = "/js/${self.attr.javascript}";
42     script.onload = script.onreadystatechange = function() {
43         if (!script_done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {
44             script_done = true;
45             if (jquery_done) {
46                 ${self.attr.js_callback}
47             }
48             script.onload = script.onreadystatechange = null;
49         }
50     };
51     document.body.appendChild(script);
52
53 % endif
54 }
55
56 if (window.addEventListener)
57     window.addEventListener("load", loadjs, false);
58 else if (window.attachEvent)
59     window.attachEvent("onload", loadjs);
60 else window.onload = loadjs;
61         </script>
62 %endif
63     </head>
64     <body>
65         <div id="main">
66             <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>
67                         <ul id="nav">
68 <%
69         menu = [
70                 [ "/docs", "Docs" ],
71                 [ "/screenshots", "Screens" ],
72                 [ "/contact", "Contact" ],
73                 [ "http://bugs.i3wm.org/", "Bugs" ]
74         ]
75 %>
76 % for link, title in menu:
77                                 <li><a
78 % if self.attr.section == title.lower():
79                                 style="border-bottom: 2px solid #fff"
80 % endif
81                                 href="${link}">${title}</a></li>
82 % endfor
83                         </ul>
84         <br style="clear: both">
85             ${next.body()}
86         </div>
87
88         <div id="footer" lang="de">
89         © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>
90         </div>
91     </body>
92 </html>