Display zero values in grey
This commit is contained in:
parent
8c9c78a789
commit
5f4c5d9d51
@ -19,3 +19,8 @@ func (n Numeric) GetPositive() bool {
|
||||
float := n.GetFloat64()
|
||||
return float >= 0
|
||||
}
|
||||
|
||||
func (n Numeric) IsZero() bool {
|
||||
float := n.GetFloat64()
|
||||
return float == 0
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{{define "amount"}}
|
||||
<span class="right {{if .GetPositive}}{{else}}negative{{end}}">
|
||||
<span class="right {{if .IsZero}}zero{{else if not .GetPositive}}negative{{end}}">
|
||||
{{printf "%.2f" .GetFloat64}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
{{define "amount-cell"}}
|
||||
<td class="right {{if .GetPositive}}{{else}}negative{{end}}">
|
||||
<td class="right {{if .IsZero}}zero{{else if not .GetPositive}}negative{{end}}">
|
||||
{{printf "%.2f" .GetFloat64}}
|
||||
</td>
|
||||
{{end}}
|
@ -1,3 +1,7 @@
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#head {
|
||||
height:160px;
|
||||
line-height: 160px;
|
||||
@ -63,4 +67,7 @@ body {
|
||||
|
||||
.negative {
|
||||
color: #d50000;
|
||||
}
|
||||
.zero {
|
||||
color: #888888;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user