]> git.sur5r.net Git - i3/i3.github.io/blob - _templates/i3.mako
a61c2345194b14f4489fa4b735a39e6b11070c55
[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         <link rel="publisher" href="https://plus.google.com/113555191861605339299">
13         <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">
14         <meta name="keywords" content="i3, window, manager, tiling, keyboard, wmii, x11, xcb, xinerama, utf8">
15         <meta name="author" content="i3 developers">
16 % if self.attr.javascript:
17         <script type="text/javascript">
18 function loadjs() {
19 % if not self.attr.require_jquery:
20     var element = document.createElement("script");
21     element.src = "/js/${self.attr.javascript}";
22     document.body.appendChild(element);
23 % else:
24     var jquery_done = false,
25         script_done = false;
26     var head = document.getElementsByTagName('head')[0];
27
28     var element = document.createElement("script");
29     element.src = "/js/jquery.1.6.2.min.js";
30     element.onload = element.onreadystatechange = function() {
31         if (!jquery_done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {
32             jquery_done = true;
33             if (script_done) {
34                 ${self.attr.js_callback}
35             }
36             element.onload = element.onreadystatechange = null;
37         }
38     };
39     document.body.appendChild(element);
40
41     var script = document.createElement("script");
42     script.src = "/js/${self.attr.javascript}";
43     script.onload = script.onreadystatechange = function() {
44         if (!script_done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) {
45             script_done = true;
46             if (jquery_done) {
47                 ${self.attr.js_callback}
48             }
49             script.onload = script.onreadystatechange = null;
50         }
51     };
52     document.body.appendChild(script);
53
54 % endif
55 }
56
57 if (window.addEventListener)
58     window.addEventListener("load", loadjs, false);
59 else if (window.attachEvent)
60     window.attachEvent("onload", loadjs);
61 else window.onload = loadjs;
62         </script>
63 %endif
64     </head>
65     <body>
66         <div id="main">
67             <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>
68                         <ul id="nav">
69 <%
70         menu = [
71                 [ "/docs", "Docs" ],
72                 [ "/screenshots", "Screens" ],
73                 [ "http://faq.i3wm.org/", "FAQ" ],
74                 [ "/contact", "Contact" ],
75                 [ "http://bugs.i3wm.org/", "Bugs" ]
76         ]
77 %>
78 % for link, title in menu:
79                                 <li><a
80 % if self.attr.section == title.lower():
81                                 style="border-bottom: 2px solid #fff"
82 % endif
83                                 href="${link}">${title}</a></li>
84 % endfor
85                         </ul>
86         <br style="clear: both">
87             ${next.body()}
88         </div>
89
90         <div id="footer" lang="de">
91         © 2009-2014 Michael Stapelberg, <a href="/impress.html">Impressum</a>
92         </div>
93     </body>
94 </html>