web: more tweaks, style negative amounts
This commit is contained in:
parent
66b1ee9f11
commit
02f77415f0
@ -415,7 +415,9 @@ getLedgerPage = do
|
|||||||
let args = appArgs app
|
let args = appArgs app
|
||||||
fspec' = optsToFilterSpec opts args t
|
fspec' = optsToFilterSpec opts args t
|
||||||
br = balanceReportAsHtml opts td $ balanceReport opts fspec' j
|
br = balanceReportAsHtml opts td $ balanceReport opts fspec' j
|
||||||
rr = registerReportAsHtml opts td $ registerReport opts fspec j
|
rr = if null a && null p
|
||||||
|
then nulltemplate
|
||||||
|
else registerReportAsHtml opts td $ registerReport opts fspec j
|
||||||
td = mktd{here=here, title="hledger", msg=msg, a=a, p=p}
|
td = mktd{here=here, title="hledger", msg=msg, a=a, p=p}
|
||||||
hamletToRepHtml $ pageLayout td [$hamlet|
|
hamletToRepHtml $ pageLayout td [$hamlet|
|
||||||
%div.ledger
|
%div.ledger
|
||||||
@ -499,7 +501,10 @@ registerReportAsHtml _ td items = [$hamlet|
|
|||||||
p' = if null p then "" else printf "&p=%s" p
|
p' = if null p then "" else printf "&p=%s" p
|
||||||
|
|
||||||
--mixedAmountAsHtml = intercalate ", " . lines . show
|
--mixedAmountAsHtml = intercalate ", " . lines . show
|
||||||
mixedAmountAsHtml = preEscapedString . intercalate "<br>" . lines . show
|
mixedAmountAsHtml b = preEscapedString $ addclass $ intercalate "<br>" $ lines $ show b
|
||||||
|
where addclass = printf "<span class=\"%s\">%s</span>" c
|
||||||
|
c = case isNegativeMixedAmount b of Just True -> "negative amount"
|
||||||
|
_ -> "positive amount"
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ body { margin:0; }
|
|||||||
.navlinkcurrent { font-weight:bold; }
|
.navlinkcurrent { font-weight:bold; }
|
||||||
.nav2 { font-size:small; }
|
.nav2 { font-size:small; }
|
||||||
#filterform { font-size:small; display:inline; margin-left:1em; }
|
#filterform { font-size:small; display:inline; margin-left:1em; }
|
||||||
.filtering { background-color:#eee; font-weight:bold; }
|
.filtering { background-color:#ddd; font-weight:bold; }
|
||||||
#stopfilterlink { font-size:small; }
|
#stopfilterlink { font-size:small; }
|
||||||
.toprightlink { font-size:small; margin-left:1em; float:right; }
|
.toprightlink { font-size:small; margin-left:1em; float:right; }
|
||||||
#messages { color:red; background-color:#ffeeee; margin:0.5em;}
|
#messages { color:red; background-color:#ffeeee; margin:0.5em;}
|
||||||
@ -33,14 +33,15 @@ body { margin:0; }
|
|||||||
/* for -fweb610 */
|
/* for -fweb610 */
|
||||||
/* #hledgerorglink, #helplink { float:right; margin-left:1em; } */
|
/* #hledgerorglink, #helplink { float:right; margin-left:1em; } */
|
||||||
|
|
||||||
.current { font-weight:bold; background-color:#eee; }
|
.current { font-weight:bold; background-color:#ddd; }
|
||||||
.description { padding-left:1em; }
|
.description { padding-left:1em; }
|
||||||
.account { white-space:nowrap; padding-left:1em; }
|
.account { white-space:nowrap; padding-left:1em; }
|
||||||
.amount { white-space:nowrap; padding-left:1em; }
|
.amount { white-space:nowrap; padding-left:1em; }
|
||||||
.balance { white-space:nowrap; padding-left:1em; }
|
.balance { white-space:nowrap; padding-left:1em; }
|
||||||
/* don't let fields get too small in emptyish reports */
|
/* don't let fields get too small in emptyish reports */
|
||||||
.description { width:4em; }
|
|
||||||
.account, .amount, .balance { width:2em; }
|
.account, .amount, .balance { width:2em; }
|
||||||
|
.positive { }
|
||||||
|
.negative { color:red; }
|
||||||
/* .odd { background-color:#e8e8e8; } */
|
/* .odd { background-color:#e8e8e8; } */
|
||||||
/* .even { background-color:#e8f8e8; } */
|
/* .even { background-color:#e8f8e8; } */
|
||||||
/* .even { background-color:#f0fff0; } */
|
/* .even { background-color:#f0fff0; } */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user