{-# LANGUAGE OverloadedStrings #-} module Design.Helper ( clearFix , defaultButton , defaultInput , centeredWithMargin , expandBlock ) where import Clay import Design.Constants import Design.Color as C import qualified Clay.Display as D clearFix :: Css clearFix = after & do content (stringContent "") display D.table clear both defaultButton :: Color -> Color -> Size Abs -> Css defaultButton backgroundCol textCol height = do backgroundColor backgroundCol color textCol borderRadius radius radius radius radius verticalAlign middle cursor pointer lineHeight height textAlign (alignSide sideCenter) defaultInput :: Integer -> Css defaultInput inputHeight = do height (px inputHeight) padding (px 10) (px 10) (px 10) (px 10) borderRadius radius radius radius radius border solid (px 1) C.darkGrey focus & borderColor C.grey verticalAlign middle centeredWithMargin :: Css centeredWithMargin = do width (pct blockPercentWidth) marginLeft auto marginRight auto expandBlock :: Color -> Color -> Size Abs -> Css expandBlock headerBackground headerColor headerHeight = do marginBottom blockMarginBottom marginLeft (pct blockPercentMargin) marginRight (pct blockPercentMargin) ".header" ? do defaultButton headerBackground headerColor headerHeight width (pct 100) fontSize (px 18) borderRadius radius radius radius radius textAlign (alignSide sideLeft) position relative paddingLeft blockPadding paddingRight (px 55)