summaryrefslogtreecommitdiff
path: root/templates/page.jinja
blob: e1f8af71c3023d5cae7fc30eab35a847852ebf3e (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="{{ url_for(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="{{ url_for(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 %}