From 213cf7ede058b781fc957de2cd9f6a5988c08004 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 12 Nov 2017 22:58:23 +0100 Subject: Add mocked pages --- server/server.cabal | 57 ++++++++++++++++++++++++++++++++- server/src/Design/Color.hs | 5 +++ server/src/Design/View/Payment/Pages.hs | 6 ++-- server/src/Design/View/Payment/Table.hs | 2 +- 4 files changed, 66 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/server.cabal b/server/server.cabal index 8bbe5f2..41b2fd6 100644 --- a/server/server.cabal +++ b/server/server.cabal @@ -32,8 +32,8 @@ executable server , mtl , parsec , process - , resourcet , random + , resourcet , scotty , sqlite-simple , text @@ -46,3 +46,58 @@ executable server , wai-middleware-static hs-source-dirs: src default-language: Haskell2010 + other-modules: Conf + , Controller.Category + , Controller.Income + , Controller.Index + , Controller.Payment + , Controller.SignIn + , Cookie + , Design.Color + , Design.Constants + , Design.Dialog + , Design.Errors + , Design.Form + , Design.Global + , Design.Helper + , Design.Media + , Design.Tooltip + , Design.View.Header + , Design.View.Payment + , Design.View.Payment.Header + , Design.View.Payment.Pages + , Design.View.Payment.Table + , Design.View.SignIn + , Design.View.Stat + , Design.View.Table + , Design.Views + , Job.Daemon + , Job.Frequency + , Job.Kind + , Job.Model + , Job.MonthlyPayment + , Job.WeeklyReport + , Json + , LoginSession + , Main + , MimeMail + , Model.Category + , Model.Frequency + , Model.Income + , Model.Init + , Model.Mail + , Model.Payer + , Model.Payment + , Model.PaymentCategory + , Model.Query + , Model.SignIn + , Model.UUID + , Model.User + , Resource + , Secure + , SendMail + , Utils.Time + , Validation + , View.Mail.SignIn + , View.Mail.WeeklyReport + , View.Page diff --git a/server/src/Design/Color.hs b/server/src/Design/Color.hs index 06c468e..9a5797f 100644 --- a/server/src/Design/Color.hs +++ b/server/src/Design/Color.hs @@ -1,6 +1,8 @@ module Design.Color where +import Clay import qualified Clay.Color as C +import Data.Text (Text) -- http://chir.ag/projects/name-that-color/#969696 @@ -33,3 +35,6 @@ silver = C.rgb 200 200 200 dustyGray :: C.Color dustyGray = C.rgb 150 150 150 + +toString :: C.Color -> Text +toString = plain . unValue . value diff --git a/server/src/Design/View/Payment/Pages.hs b/server/src/Design/View/Payment/Pages.hs index ade81a8..5fc13f0 100644 --- a/server/src/Design/View/Payment/Pages.hs +++ b/server/src/Design/View/Payment/Pages.hs @@ -13,8 +13,8 @@ import qualified Design.Media as Media design :: Css design = do - textAlign (alignSide sideCenter) - Helper.clearFix + display flex + justifyContent center Media.desktop $ do padding (px 40) (px 30) (px 30) (px 30) @@ -26,6 +26,8 @@ design = do padding (px 20) (px 0) (px 20) (px 0) lineHeight (px 40) + svg ? "path" ? ("fill" -: Color.toString Color.dustyGray) + ".page" ? do display inlineBlock fontWeight bold diff --git a/server/src/Design/View/Payment/Table.hs b/server/src/Design/View/Payment/Table.hs index a866b40..f8326e4 100644 --- a/server/src/Design/View/Payment/Table.hs +++ b/server/src/Design/View/Payment/Table.hs @@ -38,5 +38,5 @@ design = do marginBottom (em 0.5) ".button" & svg ? do - "path" ? ("fill" -: (plain . unValue . value $ Color.chestnutRose)) + "path" ? ("fill" -: Color.toString Color.chestnutRose) width (px 18) -- cgit v1.2.3