From abfc1005db0f256ca60823f61b8a904304eb9a4c Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Fri, 12 Apr 2013 01:32:37 +0200 Subject: In Flask/Jinja: Show / Categories --- templates/page.jinja | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'templates/page.jinja') diff --git a/templates/page.jinja b/templates/page.jinja index e1f8af7..671f3b2 100644 --- a/templates/page.jinja +++ b/templates/page.jinja @@ -1,27 +1,27 @@ {% extends "root.jinja" %} {# functions #} -{% macro left_arrow(target,label) -%} - +{% macro left_arrow(target,label) %} + {{label}} -{%- endmacro %} +{% endmacro %} -{% macro right_arrow(target,label) -%} - +{% macro right_arrow(target,label) %} + {{label}} -{%- endmacro %} +{% 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 %} + {% if fgcolor: %}{% set style = style ~ " color: " ~ fgcolor %}{% endif %} + {% if bgcolor: %}{% set style = style ~ " background: " ~ bgcolor %}{% endif %} <{{tag}} style="{{style}}">{{caller()}} {% endif %} {% endmacro %} -- cgit v1.2.3-54-g00ecf