-- | Common page components and rendering helpers. -- For global page layout, see Application.hs. module Handler.Common where import Import import Data.List import Data.Maybe import Data.Text(pack) import Data.Time.Calendar import System.FilePath (takeFileName) #if BLAZE_HTML_0_4 import Text.Blaze (preEscapedString) #else import Text.Blaze.Internal (preEscapedString) #endif import Text.Printf import Hledger.Utils import Hledger.Data import Hledger.Query import Hledger.Reports import Hledger.Cli.Options import Hledger.Web.Options import Handler.Utils ------------------------------------------------------------------------------- -- Page components -- | Global toolbar/heading area. topbar :: ViewData -> HtmlUrl AppRoute topbar VD{..} = [hamlet|