mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
90 lines
2.5 KiB
Elm
90 lines
2.5 KiB
Elm
![]() |
module Config.Pages.Headers.Helpers exposing (..)
|
||
|
|
||
|
import Config.Format.CardFormat exposing (..)
|
||
|
import Config.Format.Format
|
||
|
exposing
|
||
|
( paragraphFontSize
|
||
|
, paragraphSpacing
|
||
|
)
|
||
|
import Config.Helpers.StrengthBar
|
||
|
exposing
|
||
|
( barMaker
|
||
|
, barPadding
|
||
|
)
|
||
|
import Config.Helpers.ToolTip exposing (tooltip)
|
||
|
import Config.Pages.Headers.Types exposing (..)
|
||
|
import Config.Pages.Interviews.Types exposing (..)
|
||
|
import Config.Style.Colour exposing (colourTheme)
|
||
|
import Config.Style.Glow exposing (glowDeepDarkGrey)
|
||
|
import Element as E exposing (..)
|
||
|
import Element.Background as B
|
||
|
import Element.Border as D
|
||
|
import Element.Font as F
|
||
|
import Html.Attributes as H
|
||
|
|
||
|
|
||
|
headerMaker : Header -> Element msg
|
||
|
headerMaker header =
|
||
|
row
|
||
|
topLevelBox
|
||
|
[ column
|
||
|
[ E.width fill
|
||
|
|
||
|
-- E.width <| px 785
|
||
|
, D.width 5
|
||
|
, D.color colourTheme.backgroundDarkGrey
|
||
|
, D.roundEach
|
||
|
{ topLeft = 32
|
||
|
, topRight = 32
|
||
|
, bottomRight = 32
|
||
|
, bottomLeft = 32
|
||
|
}
|
||
|
, glowDeepDarkGrey
|
||
|
]
|
||
|
[ paragraph
|
||
|
[ F.size 20
|
||
|
, F.bold
|
||
|
, F.color colourTheme.textLightGrey
|
||
|
, B.color colourTheme.textDarkOrange
|
||
|
, paddingEach
|
||
|
{ top = 6
|
||
|
, bottom = 3
|
||
|
, left = 25
|
||
|
, right = 15
|
||
|
}
|
||
|
, alignBottom
|
||
|
, width fill
|
||
|
, F.center
|
||
|
, D.roundEach
|
||
|
{ topLeft = 26
|
||
|
, topRight = 26
|
||
|
, bottomRight = 0
|
||
|
, bottomLeft = 0
|
||
|
}
|
||
|
]
|
||
|
[ text header.headerTitle ]
|
||
|
, cardFormatter
|
||
|
[ cardContentSpacing
|
||
|
[ column
|
||
|
fieldSpacer
|
||
|
[ paragraph
|
||
|
([ F.color colourTheme.textLightGrey
|
||
|
, paragraphSpacing
|
||
|
, paragraphFontSize
|
||
|
]
|
||
|
++ [ F.size 18
|
||
|
, F.center
|
||
|
]
|
||
|
)
|
||
|
[ text header.headerBody ]
|
||
|
]
|
||
|
]
|
||
|
]
|
||
|
]
|
||
|
]
|
||
|
|
||
|
|
||
|
headerTitle : Header -> String
|
||
|
headerTitle header =
|
||
|
header.headerTitle
|