author Tero Marttila <terom@fixme.fi>
Mon, 16 Feb 2009 00:54:25 +0200
changeset 132 0e857c4a67de
parent 131 67f5d2fdca1d
permissions -rw-r--r--
cache version across calls to version_mercurial, so as to avoid opening the repo every time
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%def name="menu()">
    <li><a href="${urls.index.build(req)}">Home</a></li>
    <li><a href="${urls.preferences.build(req)}">Preferences</a></li>
    </li><li class="join-left">
        <form action="${urls.channel_select.build(req)}" method="GET">
            <select name="channel">
            ${h.select_options(((ch.id, ch.title) for ch in channel_list), channel.id if channel else None)}
            </select><input type="submit" value="Go &raquo;" />

<%def name="footer_right()">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <title>irclogs.qmsk.net${(' :: ' + channel.title) if channel else ''}</title>
        <link rel="Stylesheet" type="text/css" href="${req.site_root}/static/irclogs.css" />
    ## timezone-autodetect
    % if prefs and prefs.is_default('timezone') :
        <script language="Javascript" type="text/javascript">
 * Set a preference cookie
function set_pref (name, value) {
    // XXX: expire?
    document.cookie = (name + "=" + value + "; path=/");

 * Set the timezone_offset cookie to the current Date's timezone offset
function autodetect_tz_offset () {
    // current datetime
    var now = new Date();

    // timezone offset from UTC in minutes
    var timezone_offset = -now.getTimezoneOffset()
    // store cookie with offset in minutes
    set_pref('timezone_offset', timezone_offset);

 * Autodetect at load
window.onload = autodetect_tz_offset;
    % endif
        <div id="menu">

        <div id="content">

        <div id="footer">
            <div id="footer-right">

            <div id="footer-left">
                <a href="http://projects.qmsk.net/irclogs2">irclogs2</a> version ${h.version_link()}

            <div id="footer-center">