{-# LANGUAGE OverloadedStrings #-} module Design.Global ( globalDesign ) where import qualified Prelude import Prelude import Clay import Data.Text.Lazy (Text) import qualified Clay.Display as D import Design.Color as C globalDesign :: Text globalDesign = renderWith compact [] global iconFontSize :: Integer iconFontSize = 32 global :: Css global = do header ? do let headerHeight = 150 h1 ? do fontSize (px 40) textAlign (alignSide sideCenter) color C.brown lineHeight (px headerHeight) button # ".signOut" ? do let iconHeight = 50 let sideMargin = ((headerHeight - iconHeight) `Prelude.div` 2) position absolute top (px 0) right (px 10) marginTop (px sideMargin) marginRight (px sideMargin) height (px iconHeight) lineHeight (px iconHeight) backgroundColor C.white color C.brown borderWidth (px 0) fontSize (px iconFontSize) hover & transform (scale 1.2 1.2) ".payments" ? do form # ".add" ? do let inputHeight = 40 width (pct 90) marginLeft auto marginRight auto marginBottom (px 45) clearFix ".name" ? do width (pct 50) float floatLeft label ? do width (pct 25) paddingRight (pct 5) input ? do defaultInput inputHeight width (pct 70) ".cost" ? do width (pct 50) float floatRight label ? do width (pct 25) paddingRight (pct 5) input ? do defaultInput inputHeight width (pct 45) marginRight (pct 5) button ? do defaultButton width (pct 20) height (px inputHeight) table ? do width (pct 100) textAlign (alignSide (sideCenter)) "border-spacing" -: "10 px" th ? do backgroundColor C.brown color C.white fontSize (px iconFontSize) lineHeight (px 70) tr ? do fontSize (px 20) lineHeight (px 60) nthChild "odd" & backgroundColor C.lightGrey ".signIn" ? do form ? do let inputHeight = 50 width (px 500) marginTop (px 50) marginLeft auto marginRight auto input ? do defaultInput inputHeight display block width (pct 100) marginBottom (px 10) button ? do defaultButton display block width (pct 100) height (px inputHeight) ".result" ? do marginTop (px 40) textAlign (alignSide sideCenter) ".success" ? color C.green ".error" ? color C.red clearFix :: Css clearFix = after & do content (stringContent "") display D.table clear both defaultButton :: Css defaultButton = do backgroundColor C.brown color C.white borderWidth (px 0) borderRadius (px 3) (px 3) (px 3) (px 3) defaultInput :: Integer -> Css defaultInput inputHeight = do height (px inputHeight) padding (px 10) (px 10) (px 10) (px 10) borderRadius (px 0) (px 0) (px 0) (px 0) border solid (px 1) C.grey focus & borderColor C.green