diff --git a/brmbar3/brmbar-web.py b/brmbar3/brmbar-web.py index dd54a5e..11e496c 100755 --- a/brmbar3/brmbar-web.py +++ b/brmbar3/brmbar-web.py @@ -16,7 +16,13 @@ def stock(): # FIXME: XSS protection. response = '' for a in shop.account_list("inventory"): - response += '' % (a.id, a.name, a.balance()) + style = '' + balance = a.balance() + if balance == 0: + style = 'color: grey; font-style: italic' + elif balance < 0: + style = 'color: red' + response += '' % (style, a.id, a.name, balance) response += '
IdItem NameBal.
%d%s%d
%d%s%d
' return response