1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 |
|
3 <%def name="menu()"> |
|
4 <ul> |
|
5 <li><a href="${urls.index.build(req)}">Home</a></li> |
|
6 <li><a href="${urls.preferences.build(req)}">Preferences</a></li> |
|
7 |
|
8 <li> |
|
9 <span>Channel:</span> |
|
10 </li><li class="join-left"> |
|
11 <form action="${urls.channel_select.build(req)}" method="GET"> |
|
12 <select name="channel"> |
|
13 ${h.select_options(((ch.id, ch.title) for ch in channel_list), channel.id if channel else None)} |
|
14 </select><input type="submit" value="Go »" /> |
|
15 </form> |
|
16 </li> |
|
17 </ul> |
|
18 </%def> |
|
19 |
|
20 <%def name="footer_right()"> |
|
21 |
|
22 </%def> |
|
23 |
|
24 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
|
25 <head> |
|
26 <title>irclogs.qmsk.net${(' :: ' + channel.title) if channel else ''}</title> |
|
27 <link rel="Stylesheet" type="text/css" href="${req.site_root}/static/irclogs.css" /> |
|
28 ## timezone-autodetect |
|
29 % if prefs and prefs.is_default('timezone') : |
|
30 <script language="Javascript" type="text/javascript"> |
|
31 /* |
|
32 * Set a preference cookie |
|
33 */ |
|
34 function set_pref (name, value) { |
|
35 // XXX: expire? |
|
36 document.cookie = (name + "=" + value + "; path=/"); |
|
37 } |
|
38 |
|
39 /* |
|
40 * Set the timezone_offset cookie to the current Date's timezone offset |
|
41 */ |
|
42 function autodetect_tz_offset () { |
|
43 // current datetime |
|
44 var now = new Date(); |
|
45 |
|
46 // timezone offset from UTC in minutes |
|
47 var timezone_offset = -now.getTimezoneOffset() |
|
48 |
|
49 // store cookie with offset in minutes |
|
50 set_pref('timezone_offset', timezone_offset); |
|
51 } |
|
52 |
|
53 /* |
|
54 * Autodetect at load |
|
55 */ |
|
56 window.onload = autodetect_tz_offset; |
|
57 </script> |
|
58 % endif |
|
59 </head> |
|
60 <body> |
|
61 <div id="menu"> |
|
62 ${next.menu()} |
|
63 </div> |
|
64 |
|
65 <div id="content"> |
|
66 ${next.body()} |
|
67 </div> |
|
68 |
|
69 <div id="footer"> |
|
70 <div id="footer-right"> |
|
71 ${next.footer_right()} |
|
72 </div> |
|
73 |
|
74 <div id="footer-left"> |
|
75 <a href="http://projects.qmsk.net/irclogs2">irclogs2</a> version ${h.version_link()} |
|
76 </div> |
|
77 |
|
78 <div id="footer-center"> |
|
79 ${h.validation_notice(req.site_host)} |
|
80 </div> |
|
81 </div> |
|
82 </body> |
|
83 </html> |
|
84 |
|