summaryrefslogtreecommitdiff
path: root/templates/page.jinja
blob: 671f3b20ad24e3dc35c9cace1dc39f1546fc67ee (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
{% extends "root.jinja" %}

{# functions #}
{% macro left_arrow(target,label) %}
    <a id="left" href="{{target}}">
        <img src="{{ "images/arrow_left.png" | static_url }}">
        <span class="navdate">{{label}}</span>
    </a>
{% endmacro %}

{% macro right_arrow(target,label) %}
    <a id="right" href="{{target}}">
        <img src="{{ "images/arrow_right.png" | static_url }}">
        <span class="navdate">{{label}}</span>
    </a>
{% endmacro %}

{% macro colorize(fgcolor=None, bgcolor=None, tag='span') -%}
    {% if not fgcolor and not bgcolor %}
        {{ caller() }}
    {% else %}
        {%  set style = "" %}
        {%  if fgcolor: %}{% set style = style ~ " color: " ~ fgcolor %}{% endif %}
        {%  if bgcolor: %}{% set style = style ~ " background: " ~ bgcolor %}{% endif %}
        <{{tag}} style="{{style}}">{{caller()}}</{{tag}}>
    {% endif %}
{% endmacro %}