website/frontend/src/Config/Helpers/Response.elm

59 lines
1.2 KiB
Elm
Raw Normal View History

2024-12-11 03:48:49 -06:00
module Config.Helpers.Response exposing (..)
2024-12-09 19:53:09 -06:00
2024-12-27 01:30:21 -06:00
import Config.Style.Colour.Helpers exposing (colourTheme)
2024-12-09 19:53:09 -06:00
import Element as E exposing (..)
2024-12-16 00:12:23 -06:00
import Element.Background as B exposing (color)
import Html.Attributes exposing (style)
2024-12-09 19:53:09 -06:00
topLevelContainer : Element msg -> Element msg
topLevelContainer =
el
[ width fill
, height fill
2024-12-16 00:12:23 -06:00
, B.color colourTheme.backgroundLightGrey
2024-12-09 19:53:09 -06:00
]
2024-12-22 19:42:23 -06:00
pageListCenter : Device -> List (Attribute msg)
pageListCenter device =
2024-12-16 00:12:23 -06:00
[ centerY
2024-12-09 20:30:04 -06:00
]
2024-12-22 19:42:23 -06:00
++ pageListFormat device
2024-12-09 20:30:04 -06:00
2024-12-22 19:42:23 -06:00
pageList : Device -> List (Attribute msg)
pageList device =
2024-12-16 00:12:23 -06:00
[ alignTop
2024-12-09 20:30:04 -06:00
]
2024-12-22 19:42:23 -06:00
++ pageListFormat device
2024-12-09 20:30:04 -06:00
2024-12-22 19:42:23 -06:00
pageListFormat : Device -> List (Attribute msg)
pageListFormat device =
[ case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
spacing 0
( Tablet, Portrait ) ->
spacing 0
_ ->
spacing 20
2024-12-09 19:53:09 -06:00
, centerX
2024-12-16 00:12:23 -06:00
, padding 30
, width fill
, height fill
2024-12-09 19:53:09 -06:00
, scrollbarY
]
2024-12-22 04:36:03 -06:00
contentContainer : Element msg -> Element msg
contentContainer =
el
[ width (fill |> minimum 100)
, width (fill |> maximum 875)
, padding 10
, centerX
]