aboutsummaryrefslogtreecommitdiff
path: root/src/server/Design/Header.hs
blob: 3b4f35c96e00fb8731a7cf9958948b4e7da5dc36 (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
{-# LANGUAGE OverloadedStrings #-}

module Design.Header
  ( headerDesign
  ) where

import Data.Monoid ((<>))

import Clay

import Design.Color as C
import Design.Constants

headerDesign :: Css
headerDesign =

  header ? do
    let headerHeight = px 80
    let headerPadding = px 20
    let darkenedRed = C.red +. 10
    lineHeight headerHeight
    height headerHeight
    marginBottom blockMarginBottom
    position relative
    backgroundColor C.red
    color C.white

    ".item" ? do
      float floatLeft
      paddingLeft headerPadding
      paddingRight headerPadding
      hover & backgroundColor darkenedRed
      focus & backgroundColor darkenedRed

    ".title" ? do
      height (pct 100)
      fontSize (px 35)
      textAlign (alignSide sideLeft)
      paddingLeft headerPadding
      paddingRight headerPadding

    (".name" <> ".signOut") ? float floatRight

    ".name" ? do
      paddingLeft headerPadding
      paddingRight headerPadding

    ".signOut" ? do
      height (pct 100)
      fontSize iconFontSize
      color C.white