aboutsummaryrefslogtreecommitdiff
path: root/src/server/Design/Helper.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Design/Helper.hs')
-rw-r--r--src/server/Design/Helper.hs23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/server/Design/Helper.hs b/src/server/Design/Helper.hs
index 6e2fde3..bd11766 100644
--- a/src/server/Design/Helper.hs
+++ b/src/server/Design/Helper.hs
@@ -3,14 +3,19 @@
module Design.Helper
( clearFix
, defaultButton
+ , iconButton
, defaultInput
, centeredWithMargin
, expandBlock
, verticalCentering
) where
+import Prelude hiding (span)
+
import Clay
+import Data.Monoid ((<>))
+
import Design.Constants
import Design.Color as C
import qualified Clay.Display as D
@@ -23,15 +28,29 @@ clearFix =
clear both
defaultButton :: Color -> Color -> Size Abs -> Css
-defaultButton backgroundCol textCol height = do
+defaultButton backgroundCol textCol h = do
backgroundColor backgroundCol
color textCol
borderRadius radius radius radius radius
verticalAlign middle
cursor pointer
- lineHeight height
+ lineHeight h
textAlign (alignSide sideCenter)
+iconButton :: Color -> Color -> Size Abs -> Css
+iconButton backgroundCol textCol h = do
+ defaultButton backgroundCol textCol h
+ i <> span ? do
+ height h
+ lineHeight h
+ span ? do
+ display inlineBlock
+ marginLeft (px 20)
+ i ? do
+ marginLeft (px 20)
+ marginRight (px 20)
+ hover & i ? transform (scale 1.2 1.2)
+
defaultInput :: Integer -> Css
defaultInput inputHeight = do
height (px inputHeight)