summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/page.mako12
-rw-r--r--templates/pages/show.mako8
2 files changed, 17 insertions, 3 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>
diff --git a/templates/pages/show.mako b/templates/pages/show.mako
index ed487cb..565a518 100644
--- a/templates/pages/show.mako
+++ b/templates/pages/show.mako
@@ -14,7 +14,7 @@
<a href=${"/const/%s" % exp.id | url}>${exp.monthly} -- ${exp.description}</a>
</%self:detail>
- <%self:detail name="In Summa" sum="${e.sum}" set="${e.all}" args="exp">
+ <%self:detail name="In Summa" sum="${e.sum}" set="${e.all}" args="exp" color="#ff2d2d">
<a href=${"/edit/%s" % exp.id | url}>${exp.day}.${exp.month}. -- ${exp.description}: ${exp.expense}</a>
</%self:detail>
<br/>
@@ -55,10 +55,12 @@ ${self.left_arrow(date, date)}
<script type="text/javascript" src=${"/static/js/show.js" | url}></script>
</%def>
-<%def name="detail(name, sum, set)">
+<%def name="detail(name, sum, set, color=None)">
<div class="detail">
<img class="mark" src=${"/static/images/closed.png" | url} />
- <span class="heading">${name}:</span> <span class="sum">${sum}</span><br/>
+ <%self:colorize fgcolor="${color}">
+ <span class="heading">${name}:</span> <span class="sum">${sum}</span><br/>
+ </%self:colorize>
<div class="details">
<ul>
% for exp in set:
Remko Tronçon1-1/+4 2009-06-11use cgit_httpscheme() for atom feedDiego Ongaro2-3/+6 2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro2-0/+12 2009-06-07Return http statuscode 404 on unknown branchLars Hjemli3-0/+6 2009-06-07Add head-include configuration option.Mark Lodato3-1/+6 2009-03-15CGIT 0.8.2.1v0.8.2.1Lars Hjemli1-1/+1 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli2-1/+6 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli1-6/+17 2009-03-15fix segfault when displaying empty blobsEric Wong1-5/+8 2009-02-19Add support for HEAD requestsLars Hjemli2-0/+7 2009-02-19Add support for ETag in 'plain' viewLars Hjemli4-0/+5 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli1-4/+9 2009-02-12Makefile: add doc-related targetsLars Hjemli1-2/+17 s='deletions'>-1/+1 2020-05-06Improve templateRené 'Necoro' Neumann3-20/+28 2020-05-05Fix pipelineRené 'Necoro' Neumann1-2/+5 2020-05-05Make changelog a part of the release pipeline (untested)René 'Necoro' Neumann2-0/+12