aboutsummaryrefslogtreecommitdiff
path: root/server/src/Design/View/Table.hs
blob: 1c4e806890c3aacbb9708be53803b10c913fed08 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module Design.View.Table
  ( design
  ) where

import           Data.Monoid  ((<>))

import           Clay

import           Design.Color as Color
import qualified Design.Media as Media

design :: Css
design = do
  ".emptyTableMsg" ? do
    margin (em 2) (em 2) (em 2) (em 2)
    textAlign (alignSide sideCenter)

  ".lines" ? do
    Media.tabletDesktop $ display displayTable
    width (pct 100)
    textAlign (alignSide (sideCenter))

    ".header" <> ".row" ? do
      Media.tabletDesktop $ display tableRow

    ".header" ? do
      Media.desktop $ do
        fontSize (px 18)
        height (px 70)

      Media.tabletDesktop $ do
        backgroundColor Color.gothic
        color Color.white

      Media.tablet $ do
        fontSize (px 16)
        height (px 60)

      Media.mobile $ do
        display none

    ".row" ? do
      nthChild "even" & backgroundColor Color.wildSand

      Media.desktop $ do
        fontSize (px 18)
        height (px 60)

      Media.tablet $ do
        height (px 50)

      Media.mobile $ do
        lineHeight (px 25)
        paddingTop (px 10)
        paddingBottom (px 10)

    ".cell" ? do
      Media.tabletDesktop $ display tableCell
      position relative
      verticalAlign middle

      firstChild & do
        Media.mobile $ do
          fontSize (px 20)
          lineHeight (px 30)
          color Color.gothic

      ".refund" & color Color.mossGreen

      ".cell.button" & do
        position relative
        textAlign (alignSide sideCenter)
        button ? do
          padding (px 10) (px 10) (px 10) (px 10)
          svg ? do
            "path" ? ("fill" -: Color.toString Color.chestnutRose)
            width (px 18)
          hover & "svg path" ? do
            "fill" -: "rgb(237, 122, 116)"

        Media.tabletDesktop $ width (pct 3)

        Media.mobile $ do
          display inlineBlock
          button ? display flex