aboutsummaryrefslogtreecommitdiff
path: root/src/server/Design/LoggedIn/Add.hs
diff options
context:
space:
mode:
authorJoris2015-09-13 11:23:04 +0200
committerJoris2015-09-13 11:23:04 +0200
commita94813019b146d75f7556d10e8d0dfd50586f54d (patch)
treecf1ca605b72e0d2a4045f7aa54369e06d64aa872 /src/server/Design/LoggedIn/Add.hs
parente56aaedad92f8585a70277edce8ed8ad065d681c (diff)
downloadbudget-a94813019b146d75f7556d10e8d0dfd50586f54d.tar.gz
budget-a94813019b146d75f7556d10e8d0dfd50586f54d.tar.bz2
budget-a94813019b146d75f7556d10e8d0dfd50586f54d.zip
Splitting Global design file into a hierarchy of files
Diffstat (limited to 'src/server/Design/LoggedIn/Add.hs')
-rw-r--r--src/server/Design/LoggedIn/Add.hs78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/server/Design/LoggedIn/Add.hs b/src/server/Design/LoggedIn/Add.hs
new file mode 100644
index 0000000..6d4de69
--- /dev/null
+++ b/src/server/Design/LoggedIn/Add.hs
@@ -0,0 +1,78 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Design.LoggedIn.Add
+ ( addDesign
+ ) where
+
+import Data.Monoid ((<>))
+
+import Clay
+
+import Design.Color as C
+import Design.Helper
+import Design.Constants
+
+addDesign :: Css
+addDesign =
+
+ form ? do
+ centeredWithMargin
+ marginBottom blockMarginBottom
+ display flex
+ "justify-content" -: "center"
+
+ ".name" <> ".cost" ? do
+ position relative
+ display flex
+ marginRight (pct blockPercentMargin)
+ label ? do
+ fontWeight bold
+ display inlineBlock
+ width (px 40)
+ textAlign (alignSide sideCenter)
+ backgroundColor C.darkGrey
+ color C.white
+ height (px inputHeight)
+ lineHeight (px inputHeight)
+ fontSize (px 22)
+ verticalAlign middle
+ cursor cursorText
+ borderRadius (px 0) radius radius (px 0)
+ input ? do
+ defaultInput inputHeight
+ borderRadius radius (px 0) (px 0) radius
+ "width" -: "calc(100% - 40px)"
+ "input:focus + label" ? backgroundColor C.grey
+
+ ".name" ? minWidth (px 150)
+
+ button # ".frequency" ? do
+ fontSize (pct 90)
+ marginRight (pct blockPercentMargin)
+
+ (".punctual" <> ".monthly") ? do
+ defaultButton C.lightGrey C.darkGrey (px $ inputHeight `Prelude.div` 2)
+ paddingLeft (px 15)
+ paddingRight (px 15)
+ ".selected" & do
+ backgroundColor C.blue
+ color C.white
+
+ ".punctual" ? borderRadius radius radius 0 0
+ ".monthly" ? borderRadius 0 0 radius radius
+
+ button # ".add" ? do
+ defaultButton C.red C.white (px inputHeight)
+ paddingLeft (px 15)
+ paddingRight (px 15)
+
+ ".name.error" <> ".cost.error" ? do
+ input ? borderColor C.redError
+ label ? backgroundColor C.redError
+ "input:focus + label" ? backgroundColor C.redError
+
+ ".errorMessage" ? do
+ position absolute
+ color C.redError
+ top (px (inputHeight + 10))
+ left (px 0)