summaryrefslogtreecommitdiff
path: root/templates/page.mako
blob: 77d24a2c34bf941e9fed96bce1df2882022b648d (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
<%inherit file="/root.mako" />

## content

<h1 class="title">
    <%block name="heading"></%block>
</h1>
${next.body()}

## functions
<%def name="left_arrow(target,label)">
    <a id="left" href=${"/%s" % target | url}>
        <img src=${"/static/images/arrow_left.png" | url} />
        <span class="navdate">${label}</span>
    </a>
</%def>

<%def name="right_arrow(target,label)">
    <a id="right" href=${"/%s" % target | url}>
        <img src=${"/static/images/arrow_right.png" | url} />
        <span class="navdate">${label}</span>
    </a>
</%def>

<%def name="colorize(fgcolor=None, bgcolor=None, tag='span')">
    % if fgcolor is None and bgcolor is None:
        ${caller.body()}
    % else:
        <%  
            style = ""
            if fgcolor is not None: style += " color: " + fgcolor
            if bgcolor is not None: style += " background: "+ bgcolor
        %>
        <${tag} style="${style}">${caller.body()}</${tag}>
    % endif
</%def>