diff options
Diffstat (limited to 'templates/page.jinja')
-rw-r--r-- | templates/page.jinja | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/page.jinja b/templates/page.jinja new file mode 100644 index 0000000..e1f8af7 --- /dev/null +++ b/templates/page.jinja @@ -0,0 +1,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 %} |