mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-15 20:15:12 -05:00
58 lines
1.2 KiB
Elm
Executable file
58 lines
1.2 KiB
Elm
Executable file
module Config.Helpers.Response exposing (..)
|
|
|
|
import Config.Style.Colour.Helpers exposing (colourTheme)
|
|
import Element as E exposing (..)
|
|
import Element.Background as B exposing (color)
|
|
import Html.Attributes exposing (style)
|
|
|
|
|
|
topLevelContainer : Element msg -> Element msg
|
|
topLevelContainer =
|
|
el
|
|
[ width fill
|
|
, height fill
|
|
, B.color colourTheme.backgroundLightGrey
|
|
]
|
|
|
|
|
|
pageListCenter : Device -> List (Attribute msg)
|
|
pageListCenter device =
|
|
[ centerY
|
|
]
|
|
++ pageListFormat device
|
|
|
|
|
|
pageList : Device -> List (Attribute msg)
|
|
pageList device =
|
|
[ alignTop
|
|
]
|
|
++ pageListFormat device
|
|
|
|
|
|
pageListFormat : Device -> List (Attribute msg)
|
|
pageListFormat device =
|
|
[ case ( device.class, device.orientation ) of
|
|
( Phone, Portrait ) ->
|
|
spacing 0
|
|
|
|
( Tablet, Portrait ) ->
|
|
spacing 0
|
|
|
|
_ ->
|
|
spacing 20
|
|
, centerX
|
|
, padding 30
|
|
, width fill
|
|
, height fill
|
|
, scrollbarY
|
|
]
|
|
|
|
|
|
contentContainer : Element msg -> Element msg
|
|
contentContainer =
|
|
el
|
|
[ width (fill |> minimum 100)
|
|
, width (fill |> maximum 875)
|
|
, padding 10
|
|
, centerX
|
|
]
|