web: more consistent fonts, stylesheet cleanups
This commit is contained in:
parent
02f77415f0
commit
41c175ecc8
@ -158,6 +158,102 @@ journalReportAsHtml _ td items = [$hamlet|
|
|||||||
evenodd = if even n then "even" else "odd"
|
evenodd = if even n then "even" else "odd"
|
||||||
txn = trimnl $ showTransaction t where trimnl = reverse . dropWhile (=='\n') . reverse
|
txn = trimnl $ showTransaction t where trimnl = reverse . dropWhile (=='\n') . reverse
|
||||||
|
|
||||||
|
addform :: Hamlet HledgerWebAppRoute
|
||||||
|
addform = [$hamlet|
|
||||||
|
%form#addform!method=POST!style=display:none;
|
||||||
|
%table.form
|
||||||
|
%tr
|
||||||
|
%td!colspan=4
|
||||||
|
%table
|
||||||
|
%tr#descriptionrow
|
||||||
|
%td
|
||||||
|
Date:
|
||||||
|
%td
|
||||||
|
%input.textinput!size=15!name=date!value=$date$
|
||||||
|
%td!style=padding-left:1em;
|
||||||
|
Description:
|
||||||
|
%td
|
||||||
|
%input.textinput!size=35!name=description!value=$desc$
|
||||||
|
%tr.helprow
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
.help $datehelp$ ^datehelplink^ $
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
.help $deschelp$
|
||||||
|
^transactionfields1^
|
||||||
|
^transactionfields2^
|
||||||
|
%tr#addbuttonrow
|
||||||
|
%td!colspan=4
|
||||||
|
%input!type=hidden!name=add!value=1
|
||||||
|
%input!type=submit!name=submit!value="add transaction"
|
||||||
|
|]
|
||||||
|
where
|
||||||
|
datehelplink = helplink "dates" "..."
|
||||||
|
datehelp = "eg: 7/20, 2010/1/1, "
|
||||||
|
deschelp = "eg: supermarket (optional)"
|
||||||
|
date = "today"
|
||||||
|
desc = ""
|
||||||
|
transactionfields1 = transactionfields 1
|
||||||
|
transactionfields2 = transactionfields 2
|
||||||
|
|
||||||
|
transactionfields :: Int -> Hamlet HledgerWebAppRoute
|
||||||
|
transactionfields n = [$hamlet|
|
||||||
|
%tr#postingrow
|
||||||
|
%td!align=right
|
||||||
|
$label$:
|
||||||
|
%td
|
||||||
|
%input.textinput!size=35!name=$acctvar$!value=$acct$
|
||||||
|
^amtfield^
|
||||||
|
%tr.helprow
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
.help $accthelp$
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
.help $amthelp$
|
||||||
|
|]
|
||||||
|
where
|
||||||
|
label | n == 1 = "To account"
|
||||||
|
| otherwise = "From account"
|
||||||
|
accthelp | n == 1 = "eg: expenses:food"
|
||||||
|
| otherwise = "eg: assets:bank:checking"
|
||||||
|
amtfield | n == 1 = [$hamlet|
|
||||||
|
%td!style=padding-left:1em;
|
||||||
|
Amount:
|
||||||
|
%td
|
||||||
|
%input.textinput!size=15!name=$amtvar$!value=$amt$
|
||||||
|
|]
|
||||||
|
| otherwise = nulltemplate
|
||||||
|
amthelp | n == 1 = "eg: 5, $6, €7.01"
|
||||||
|
| otherwise = ""
|
||||||
|
acct = ""
|
||||||
|
amt = ""
|
||||||
|
numbered = (++ show n)
|
||||||
|
acctvar = numbered "accountname"
|
||||||
|
amtvar = numbered "amount"
|
||||||
|
|
||||||
|
editform :: TemplateData -> String -> Hamlet HledgerWebAppRoute
|
||||||
|
editform _ content = [$hamlet|
|
||||||
|
%form#editform!method=POST!style=display:none;
|
||||||
|
%table.form#editform
|
||||||
|
%tr
|
||||||
|
%td!colspan=2
|
||||||
|
%textarea!name=text!rows=30!cols=80
|
||||||
|
$content$
|
||||||
|
%tr#addbuttonrow
|
||||||
|
%td
|
||||||
|
%span.help ^formathelp^
|
||||||
|
%td!align=right
|
||||||
|
%span.help Are you sure ? This will overwrite the journal. $
|
||||||
|
%input!type=hidden!name=edit!value=1
|
||||||
|
%input!type=submit!name=submit!value="save journal"
|
||||||
|
\ or $
|
||||||
|
%a!href!onclick="return editformToggle()" cancel
|
||||||
|
|]
|
||||||
|
where
|
||||||
|
formathelp = helplink "file-format" "file format help"
|
||||||
|
|
||||||
journalScripts = [$hamlet|
|
journalScripts = [$hamlet|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@ -307,102 +403,6 @@ postEditForm = do
|
|||||||
redirect RedirectTemporary JournalPage)
|
redirect RedirectTemporary JournalPage)
|
||||||
jE
|
jE
|
||||||
|
|
||||||
addform :: Hamlet HledgerWebAppRoute
|
|
||||||
addform = [$hamlet|
|
|
||||||
%form#addform!method=POST!style=display:none;
|
|
||||||
%table.form!cellpadding=0!cellspacing=0!border=0
|
|
||||||
%tr
|
|
||||||
%td!colspan=4
|
|
||||||
%table!cellpadding=0!cellspacing=0!border=0
|
|
||||||
%tr#descriptionrow
|
|
||||||
%td
|
|
||||||
Date:
|
|
||||||
%td
|
|
||||||
%input!size=15!name=date!value=$date$
|
|
||||||
%td
|
|
||||||
Description:
|
|
||||||
%td
|
|
||||||
%input!size=35!name=description!value=$desc$
|
|
||||||
%tr.helprow
|
|
||||||
%td
|
|
||||||
%td
|
|
||||||
.help $datehelp$ ^datehelplink^ $
|
|
||||||
%td
|
|
||||||
%td
|
|
||||||
.help $deschelp$
|
|
||||||
^transactionfields1^
|
|
||||||
^transactionfields2^
|
|
||||||
%tr#addbuttonrow
|
|
||||||
%td!colspan=4
|
|
||||||
%input!type=hidden!name=add!value=1
|
|
||||||
%input!type=submit!name=submit!value="add transaction"
|
|
||||||
|]
|
|
||||||
where
|
|
||||||
datehelplink = helplink "dates" "..."
|
|
||||||
datehelp = "eg: 7/20, 2010/1/1, "
|
|
||||||
deschelp = "eg: supermarket (optional)"
|
|
||||||
date = "today"
|
|
||||||
desc = ""
|
|
||||||
transactionfields1 = transactionfields 1
|
|
||||||
transactionfields2 = transactionfields 2
|
|
||||||
|
|
||||||
transactionfields :: Int -> Hamlet HledgerWebAppRoute
|
|
||||||
transactionfields n = [$hamlet|
|
|
||||||
%tr#postingrow
|
|
||||||
%td!align=right
|
|
||||||
$label$:
|
|
||||||
%td
|
|
||||||
%input!size=35!name=$acctvar$!value=$acct$
|
|
||||||
^amtfield^
|
|
||||||
%tr.helprow
|
|
||||||
%td
|
|
||||||
%td
|
|
||||||
.help $accthelp$
|
|
||||||
%td
|
|
||||||
%td
|
|
||||||
.help $amthelp$
|
|
||||||
|]
|
|
||||||
where
|
|
||||||
label | n == 1 = "To account"
|
|
||||||
| otherwise = "From account"
|
|
||||||
accthelp | n == 1 = "eg: expenses:food"
|
|
||||||
| otherwise = "eg: assets:bank:checking"
|
|
||||||
amtfield | n == 1 = [$hamlet|
|
|
||||||
%td
|
|
||||||
Amount:
|
|
||||||
%td
|
|
||||||
%input!size=15!name=$amtvar$!value=$amt$
|
|
||||||
|]
|
|
||||||
| otherwise = nulltemplate
|
|
||||||
amthelp | n == 1 = "eg: 5, $6, €7.01"
|
|
||||||
| otherwise = ""
|
|
||||||
acct = ""
|
|
||||||
amt = ""
|
|
||||||
numbered = (++ show n)
|
|
||||||
acctvar = numbered "accountname"
|
|
||||||
amtvar = numbered "amount"
|
|
||||||
|
|
||||||
editform :: TemplateData -> String -> Hamlet HledgerWebAppRoute
|
|
||||||
editform _ content = [$hamlet|
|
|
||||||
%form#editform!method=POST!style=display:none;
|
|
||||||
%table.form#editform!cellpadding=0!cellspacing=0!border=0
|
|
||||||
%tr
|
|
||||||
%td!colspan=2
|
|
||||||
%textarea!name=text!rows=30!cols=80
|
|
||||||
$content$
|
|
||||||
%tr#addbuttonrow
|
|
||||||
%td
|
|
||||||
%span.help ^formathelp^
|
|
||||||
%td!align=right
|
|
||||||
%span.help Are you sure ? This will overwrite the journal. $
|
|
||||||
%input!type=hidden!name=edit!value=1
|
|
||||||
%input!type=submit!name=submit!value="save journal"
|
|
||||||
\ or $
|
|
||||||
%a!href!onclick="return editformToggle()" cancel
|
|
||||||
|]
|
|
||||||
where
|
|
||||||
formathelp = helplink "file-format" "file format help"
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
-- | A combined accounts and postings view, like hledger balance + hledger register.
|
-- | A combined accounts and postings view, like hledger balance + hledger register.
|
||||||
@ -415,7 +415,7 @@ 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 = if null a && null p
|
rr = if null a && null p && not showpostingsbydefault
|
||||||
then nulltemplate
|
then nulltemplate
|
||||||
else registerReportAsHtml opts td $ registerReport opts fspec j
|
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}
|
||||||
@ -424,6 +424,7 @@ getLedgerPage = do
|
|||||||
%div.accounts!style=float:left; ^br^
|
%div.accounts!style=float:left; ^br^
|
||||||
%div.register ^rr^
|
%div.register ^rr^
|
||||||
|]
|
|]
|
||||||
|
showpostingsbydefault = False
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
@ -586,7 +587,7 @@ navbar td = [$hamlet|
|
|||||||
#navbar
|
#navbar
|
||||||
%a.toprightlink!href=$hledgerurl$ hledger $version$
|
%a.toprightlink!href=$hledgerurl$ hledger $version$
|
||||||
\ $
|
\ $
|
||||||
%a.toprightlink!href=$manualurl$ manual
|
%a.toprightlink!href=$manualurl$!target=hledgerhelp manual
|
||||||
\ $
|
\ $
|
||||||
^navlinks.td^
|
^navlinks.td^
|
||||||
^filterform.td^
|
^filterform.td^
|
||||||
|
|||||||
@ -1,73 +1,68 @@
|
|||||||
/* hledger web ui stylesheet */
|
/* hledger web ui styles */
|
||||||
|
|
||||||
/* font families */
|
/* font families & sizes */
|
||||||
body { font-family:helvetica,arial,"sans serif"; }
|
/* overspecified for cross-browser robustness */
|
||||||
/* pre { font-family:monospace,courier,"courier new"; } */
|
body { font-family:helvetica,arial,"sans serif"; }
|
||||||
#editform textarea { font-family:courier,"courier new",monospace; }
|
pre { font-family:courier,"courier new",monospace; }
|
||||||
|
#addform input.textinput { font-family:courier,"courier new",monospace; font-size:small; }
|
||||||
|
#editform textarea { font-family:courier,"courier new",monospace; font-size:small; }
|
||||||
|
.nav2 { font-size:small; }
|
||||||
|
#filterform { font-size:small; }
|
||||||
|
.toprightlink { font-size:small; }
|
||||||
|
.help { font-size:smaller; }
|
||||||
|
.form { font-size:small; }
|
||||||
|
.journalreport { font-size:small; }
|
||||||
|
.balancereport { font-size:small; }
|
||||||
|
.registerreport { font-size:small; }
|
||||||
|
|
||||||
body { margin:0; }
|
body { margin:0; }
|
||||||
#navbar { /* background-color:#eeeeee; */ /* border-bottom:2px solid #dddddd; */ padding:4px 4px 6px 4px; }
|
#navbar { padding:0px 6px; }
|
||||||
#navlinks { display:inline; }
|
/* #navbar { padding:4px; background-color:#eeeeee; border-bottom:2px solid #dddddd; } */
|
||||||
.navlink { }
|
#navlinks { display:inline; }
|
||||||
.navlinkcurrent { font-weight:bold; }
|
.navlink { }
|
||||||
.nav2 { font-size:small; }
|
.navlinkcurrent { font-weight:bold; }
|
||||||
#filterform { font-size:small; display:inline; margin-left:1em; }
|
#filterform { display:inline; margin-left:1em; padding:4px; }
|
||||||
.filtering { background-color:#ddd; font-weight:bold; }
|
.filtering { background-color:#ddd; font-weight:bold; }
|
||||||
#stopfilterlink { font-size:small; }
|
.form { margin:1em; }
|
||||||
.toprightlink { font-size:small; margin-left:1em; float:right; }
|
.toprightlink { margin-left:1em; float:right; }
|
||||||
#messages { color:red; background-color:#ffeeee; margin:0.5em;}
|
#messages { color:red; background-color:#ffeeee; margin:0.5em;}
|
||||||
.form { margin:1em; font-size:small; }
|
.help { font-style: italic; }
|
||||||
#addform { background-color:#eeeeee; border:2px solid #dddddd; cell-padding:0; cell-spacing:0; }
|
.helprow td { padding-bottom:8px; }
|
||||||
#addform { /* float:right; */ }
|
#content { margin:1em; }
|
||||||
#addform #descriptionrow { }
|
|
||||||
#addform #postingrow { }
|
|
||||||
#addform #addbuttonrow { text-align:right; }
|
|
||||||
#editform { width:95%; }
|
|
||||||
#editform textarea { /* background-color:#eeeeee; */ width:100%; }
|
|
||||||
#content { margin:1em; }
|
|
||||||
.formheading td { padding-bottom:8px; }
|
|
||||||
#formheading { font-size:medium; font-weight:bold; }
|
|
||||||
.helprow td { padding-bottom:8px; }
|
|
||||||
.help {font-style: italic; font-size:smaller; }
|
|
||||||
|
|
||||||
/* for -fweb610 */
|
.current { font-weight:bold; background-color:#ddd; }
|
||||||
/* #hledgerorglink, #helplink { float:right; margin-left:1em; } */
|
.description { padding-left:1em; }
|
||||||
|
.account { white-space:nowrap; padding-left:1em; }
|
||||||
|
.amount { white-space:nowrap; padding-left:1em; }
|
||||||
|
.balance { white-space:nowrap; padding-left:1em; }
|
||||||
|
.account, .amount, .balance { width:2em; } /* minimum width */
|
||||||
|
.positive { }
|
||||||
|
.negative { color:#800; }
|
||||||
|
/* .odd { background-color:#e8e8e8; } */
|
||||||
|
/* .even { background-color:#e8f8e8; } */
|
||||||
|
/* .even { background-color:#f0fff0; } */
|
||||||
|
|
||||||
.current { font-weight:bold; background-color:#ddd; }
|
table.journalreport { margin-top:1em; }
|
||||||
.description { padding-left:1em; }
|
.journalreport td { border-top:thin solid #ddd; }
|
||||||
.account { white-space:nowrap; padding-left:1em; }
|
.journalreport pre { margin-top:0; }
|
||||||
.amount { white-space:nowrap; padding-left:1em; }
|
|
||||||
.balance { white-space:nowrap; padding-left:1em; }
|
|
||||||
/* don't let fields get too small in emptyish reports */
|
|
||||||
.account, .amount, .balance { width:2em; }
|
|
||||||
.positive { }
|
|
||||||
.negative { color:red; }
|
|
||||||
/* .odd { background-color:#e8e8e8; } */
|
|
||||||
/* .even { background-color:#e8f8e8; } */
|
|
||||||
/* .even { background-color:#f0fff0; } */
|
|
||||||
|
|
||||||
.journalreport { font-size:small; }
|
.ledger .accounts {padding-right:1em; margin-right:1em; border-right:thin solid #ddd;}
|
||||||
table.journalreport { margin-top:1em; }
|
.ledger .register { }
|
||||||
.journalreport td { border-top:thin solid #ddd; }
|
|
||||||
.journalreport pre { margin-top:0; }
|
|
||||||
|
|
||||||
.ledger .accounts {padding-right:1em; margin-right:1em; border-right:thin solid #ddd;}
|
.balancereport tr { vertical-align:top; }
|
||||||
.ledger .register {}
|
table.balancereport { border-spacing:0; }
|
||||||
|
.ledger .balancereport td { padding:0; }
|
||||||
|
.totalrule td { border-top:thin solid black; }
|
||||||
|
|
||||||
.balancereport { font-size:small; }
|
table.registerreport { border-spacing:0; }
|
||||||
.balancereport tr { vertical-align:top; }
|
.registerreport tr { vertical-align:top; }
|
||||||
table.balancereport { border-spacing:0; }
|
.registerreport td { padding-bottom:0.2em; }
|
||||||
.ledger .balancereport td { padding:0; }
|
.registerreport .date { white-space:nowrap; }
|
||||||
/* .itemrule td { border-top:thin solid #ddd; } */
|
.firstposting td { }
|
||||||
.totalrule td { border-top:thin solid black; }
|
.registerreport .even { background-color:#f0f0f0; }
|
||||||
|
|
||||||
table.registerreport { border-spacing:0; }
|
|
||||||
.registerreport { font-size:small; }
|
|
||||||
.registerreport tr { vertical-align:top; }
|
|
||||||
.registerreport td { padding-bottom:0.2em; }
|
|
||||||
/* .registerreport td { margin-left:0em; margin-right:0; } */
|
|
||||||
.registerreport .date { white-space:nowrap; }
|
|
||||||
/* .registerreport .description { font-size:small; } */
|
|
||||||
/* .firstposting { background-color:#eee; } */
|
|
||||||
.registerreport .even { background-color:#f0f0f0; }
|
|
||||||
|
|
||||||
|
#addform input.textinput { background-color:#eee; padding:4px; }
|
||||||
|
#addform table { }
|
||||||
|
#addform #addbuttonrow { text-align:right; }
|
||||||
|
#editform { width:95%; }
|
||||||
|
#editform textarea { width:100%; background-color:#eee; padding:4px; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user