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()
|
float := n.GetFloat64()
|
||||||
return float >= 0
|
return float >= 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n Numeric) IsZero() bool {
|
||||||
|
float := n.GetFloat64()
|
||||||
|
return float == 0
|
||||||
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{{define "amount"}}
|
{{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}}
|
{{printf "%.2f" .GetFloat64}}
|
||||||
</span>
|
</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "amount-cell"}}
|
{{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}}
|
{{printf "%.2f" .GetFloat64}}
|
||||||
</td>
|
</td>
|
||||||
{{end}}
|
{{end}}
|
@ -1,3 +1,7 @@
|
|||||||
|
html {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
#head {
|
#head {
|
||||||
height:160px;
|
height:160px;
|
||||||
line-height: 160px;
|
line-height: 160px;
|
||||||
@ -64,3 +68,6 @@ body {
|
|||||||
.negative {
|
.negative {
|
||||||
color: #d50000;
|
color: #d50000;
|
||||||
}
|
}
|
||||||
|
.zero {
|
||||||
|
color: #888888;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user