aboutsummaryrefslogtreecommitdiff
path: root/src/server/Design/LoggedIn/Expandables.hs
blob: 8ef42cdd53a7ee6f4d8f6610b29dc558f59e6b7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{-# LANGUAGE OverloadedStrings #-}

module Design.LoggedIn.Expandables
  ( expandablesDesign
  ) where

import Data.Monoid ((<>))

import Clay

import Design.Color as C
import Design.Helper
import Design.Constants

expandablesDesign :: Css
expandablesDesign =

  ".expandables" ? do

    ".expand" ? do
      position absolute
      right blockPadding
      bottom (px 2)

    ".monthlyPayments" ? do
      expandBlock C.blue C.white (px inputHeight)

    ".account" ? do
      expandBlock C.green C.white (px inputHeight)

      ".header" |> ".exceedingPayer" ? do
        lineHeight (px inputHeight)
        ".userName" ? marginRight (px 10)

      ".income" ? do
        backgroundColor C.lightGrey
        padding (px 0) (px 20) (px 0) (px 20)
        position relative
        lineHeight (px rowHeightPx)

        input ? do
          defaultInput inputHeight
          marginLeft (px 20)
          marginTop (px (-5))
          width (px 100)

        button ? do
          marginLeft (px 20)
          paddingLeft (px 15)
          paddingRight (px 15)
          marginTop (px (-5))

        ".validateIncomeEdition" <> ".editIncomeEdition" ?
          defaultButton C.red C.white (px inputHeight) focusLighten

        ".undoIncomeEdition" ?
          defaultButton C.blue C.white (px inputHeight) focusLighten

        ".error" ? do
          color C.redError
          lineHeight (px 30)

    ".detail" |> ".header" ? borderRadius radius radius 0 0