aboutsummaryrefslogtreecommitdiff
path: root/src/server/Design/Header.hs
blob: e44bce78f21352bf3767a7f9d7eddbacf3575435 (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
{-# 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

    (".title" <> ".user" <> ".icon") ? do
      color C.white
      backgroundColor C.red
      hover & backgroundColor darkenedRed
      focus & backgroundColor darkenedRed

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

    ".signedPanel" ? do
      float floatRight
      height (pct 100)
      display flex
      position absolute
      top (px 0)
      right (px 0)

      ".user" <> ".icon" ? do
        paddingLeft headerPadding
        paddingRight headerPadding
        borderLeft solid (px 1) darkenedRed

      ".icon" ? do
        fontSize iconFontSize
        borderRight solid (px 1) darkenedRed