mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
81 lines
2.4 KiB
Elm
81 lines
2.4 KiB
Elm
![]() |
module Headers.Helpers exposing (..)
|
||
|
|
||
|
import Config.CardFormat exposing (..)
|
||
|
import Config.Colour exposing (..)
|
||
|
import Config.Format exposing (..)
|
||
|
import Config.StrengthBar exposing (..)
|
||
|
import Config.ToolTip exposing (..)
|
||
|
import Effect exposing (Effect)
|
||
|
import Element as E exposing (..)
|
||
|
import Element.Background as B exposing (..)
|
||
|
import Element.Border as D
|
||
|
import Element.Font as F
|
||
|
import Headers.Types exposing (..)
|
||
|
import Html.Attributes as H exposing (style)
|
||
|
import Interviews.Types exposing (..)
|
||
|
import Layouts
|
||
|
import Page exposing (Page)
|
||
|
import Route exposing (Route)
|
||
|
import Shared
|
||
|
import View exposing (View)
|
||
|
|
||
|
|
||
|
headerMaker : Header -> Element msg
|
||
|
headerMaker header =
|
||
|
row
|
||
|
topLevelBox
|
||
|
[ column
|
||
|
[ E.width <| px 785
|
||
|
, D.width 5
|
||
|
, D.color colourTheme.backgroundDarkGrey
|
||
|
, D.roundEach
|
||
|
{ topLeft = 32
|
||
|
, topRight = 32
|
||
|
, bottomRight = 32
|
||
|
, bottomLeft = 32
|
||
|
}
|
||
|
]
|
||
|
[ paragraph
|
||
|
(nonHighlightedTitleFormat
|
||
|
++ [ F.size 20
|
||
|
, 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
|
||
|
(paragraphFormat
|
||
|
++ [ F.size 18
|
||
|
, F.center
|
||
|
]
|
||
|
)
|
||
|
[ text header.headerBody ]
|
||
|
]
|
||
|
]
|
||
|
]
|
||
|
]
|
||
|
]
|
||
|
|
||
|
|
||
|
headerTitle : Header -> String
|
||
|
headerTitle header =
|
||
|
header.headerTitle
|