summaryrefslogtreecommitdiff
path: root/templates/root.mako
blob: 25ea062ec5b9e63fac787ddf8633908502f011a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <link rel="shortcut icon" href=${"/favicon.ico" | url} type="image/icon" />
        <title>${self.title()}</title>
        ${self.style()}
    </head>

    <body>
        <div id="wrapper">
            <div id="logo">
                <img src=${"/static/images/portato.png" | url} alt="logo" />
                <h1><a href=${"/" | url}>Portato</a></h1>
                <h2>»   A Portage GUI</h2>
            </div>

            <div id="header">
                <div id="menu">
                    ${self.menu()}
                </div>
            </div>
        </div>

        <div id="page">
            <div class="content">
                ${next.body()}
            </div>
            <div style="clear: both;"> </div>
        </div>
        <div id="footer">
            <p id="legal">
                ${self.footer()}
            </p>
        </div>
    </body>
</html>

## functions

<%def name="hl(lang)">
    <pre class="box">${_hl.highlight(capture(caller.body), lang)}</pre>
</%def>

<%def name="title()">
    Portato
</%def>

<%def name="style()">
    <link href=${"/static/css/style.css" | url} rel="stylesheet" type="text/css" />
    ${_hl.get_css()}
</%def>

<%def name="footer()">
    powered by <a href="http://www.highslide.com/">highslide</a>, <a href="http://www.makotemplates.org">mako</a> &amp; <a href="http://www.webpy.org">web.py</a> | 
    © 2010 - 2011. All Rights Reserved. René Neumann | 
    with the help of <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.
</%def>

<%def name="menu()">
    <%namespace file="menu.mako" name="m" />
    <ul>
    % for uri, page in m.attr.menu:
        <li><a href=${uri | url}>${page}</a></li>
    % endfor
    </ul>
</%def>