From b17f6730d882054816093238bf3f73f6b979ba79 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 29 Sep 2024 22:12:57 -1000 Subject: [PATCH] imp: areg: html output uses a hledger.css file if any, like balcmds --- hledger/Hledger/Cli/Commands/Aregister.hs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Aregister.hs b/hledger/Hledger/Cli/Commands/Aregister.hs index 62f543ceb..b097c5839 100644 --- a/hledger/Hledger/Cli/Commands/Aregister.hs +++ b/hledger/Hledger/Cli/Commands/Aregister.hs @@ -134,12 +134,16 @@ accountTransactionsReportItemAsCsvRecord -- | Render a register report as a HTML snippet. accountTransactionsReportAsHTML :: CliOpts -> Query -> Query -> AccountTransactionsReport -> TL.Text accountTransactionsReportAsHTML copts reportq thisacctq items = - L.renderText $ L.table_ (do L.thead_ (L.tr_ (do L.th_ "date" - L.th_ "description" - L.th_ "otheraccounts" - L.th_ "change" - L.th_ "balance")) - L.tbody_ (mconcat (map (htmlRow copts reportq thisacctq) items))) + L.renderText $ do + L.link_ [L.rel_ "stylesheet", href_ "hledger.css"] + L.table_ $ do + L.thead_ $ L.tr_ $ do + L.th_ "date" + L.th_ "description" + L.th_ "otheraccounts" + L.th_ "change" + L.th_ "balance" + L.tbody_ $ mconcat $ map (htmlRow copts reportq thisacctq) items -- | Render one account register report line item as a HTML table row snippet. htmlRow :: CliOpts -> Query -> Query -> AccountTransactionsReportItem -> L.Html ()