summaryrefslogtreecommitdiff
path: root/templates/page.mako
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/page.mako12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/page.mako b/templates/page.mako
index e08207c..bc52c7f 100644
--- a/templates/page.mako
+++ b/templates/page.mako
@@ -23,3 +23,15 @@ ${next.body()}
</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>