From 5d677fc17438c04d2bd3ab52b9f5d7c7c72eb95a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=BC=C3=9F?= Date: Sat, 22 Oct 2016 11:13:35 +0200 Subject: [PATCH] Persistent sidebar state --- hledger-web/Handler/Common.hs | 9 +++++++-- hledger-web/static/hledger.js | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hledger-web/Handler/Common.hs b/hledger-web/Handler/Common.hs index 72eedfff0..f9bb99c8b 100644 --- a/hledger-web/Handler/Common.hs +++ b/hledger-web/Handler/Common.hs @@ -36,10 +36,13 @@ hledgerLayout vd title content = do toWidget [hamlet| ^{topbar vd} ^{sidebar vd} -
+
^{searchform vd} ^{content} |] + where + showmd = if showsidebar vd then "col-md-8" else "col-md-12" :: String + showsm = if showsidebar vd then "col-sm-8" else "col-sm-12" :: String -- | Global toolbar/heading area. topbar :: ViewData -> HtmlUrl AppRoute @@ -59,7 +62,7 @@ topbar VD{..} = [hamlet| sidebar :: ViewData -> HtmlUrl AppRoute sidebar vd@VD{..} = [hamlet| -
+