2024-12-11 02:38:42 -06:00
|
|
|
module Pages.Services.Elm exposing (Model, Msg, page)
|
|
|
|
|
2024-12-12 01:36:31 -06:00
|
|
|
import Config.Helpers.ArticleFormat exposing (..)
|
|
|
|
import Config.Helpers.CardFormat exposing (..)
|
|
|
|
import Config.Helpers.Format exposing (..)
|
|
|
|
import Config.Helpers.Response
|
|
|
|
exposing
|
|
|
|
( pageList
|
|
|
|
, topLevelContainer
|
|
|
|
)
|
|
|
|
import Config.Helpers.ToolTip exposing (..)
|
|
|
|
import Config.Pages.Headers.Types exposing (..)
|
|
|
|
import Config.Pages.Services.Services.ElmBuilds exposing (servicesElmBuilds)
|
|
|
|
import Config.Style.Colour exposing (colourTheme)
|
|
|
|
import Config.Style.Transitions
|
|
|
|
exposing
|
|
|
|
( hoverFontDarkOrange
|
|
|
|
, transitionStyleFast
|
|
|
|
, transitionStyleSlow
|
|
|
|
)
|
2024-12-11 02:38:42 -06:00
|
|
|
import Effect exposing (Effect)
|
2024-12-12 01:36:31 -06:00
|
|
|
import Element as E exposing (..)
|
|
|
|
import Element.Background as B
|
|
|
|
import Element.Border as D
|
|
|
|
import Element.Font as F
|
2024-12-11 02:38:42 -06:00
|
|
|
import Html
|
2024-12-12 01:36:31 -06:00
|
|
|
import Html.Attributes as H exposing (style)
|
|
|
|
import Layouts
|
2024-12-11 02:38:42 -06:00
|
|
|
import Page exposing (Page)
|
2024-12-12 01:36:31 -06:00
|
|
|
import Route exposing (Route)
|
|
|
|
import Route.Path as Path
|
2024-12-11 02:38:42 -06:00
|
|
|
import Shared
|
|
|
|
import View exposing (View)
|
|
|
|
|
|
|
|
|
|
|
|
page : Shared.Model -> Route () -> Page Model Msg
|
|
|
|
page shared route =
|
|
|
|
Page.new
|
|
|
|
{ init = init
|
|
|
|
, update = update
|
|
|
|
, subscriptions = subscriptions
|
2024-12-12 01:36:31 -06:00
|
|
|
, view = view shared
|
2024-12-11 02:38:42 -06:00
|
|
|
}
|
2024-12-12 01:36:31 -06:00
|
|
|
|> Page.withLayout toLayout
|
|
|
|
|
|
|
|
|
|
|
|
toLayout : Model -> Layouts.Layout Msg
|
|
|
|
toLayout model =
|
|
|
|
Layouts.Navbar {}
|
2024-12-11 02:38:42 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- INIT
|
|
|
|
|
|
|
|
|
|
|
|
type alias Model =
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
init : () -> ( Model, Effect Msg )
|
|
|
|
init () =
|
|
|
|
( {}
|
|
|
|
, Effect.none
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- UPDATE
|
|
|
|
|
|
|
|
|
|
|
|
type Msg
|
|
|
|
= NoOp
|
|
|
|
|
|
|
|
|
|
|
|
update : Msg -> Model -> ( Model, Effect Msg )
|
|
|
|
update msg model =
|
|
|
|
case msg of
|
|
|
|
NoOp ->
|
|
|
|
( model
|
|
|
|
, Effect.none
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- SUBSCRIPTIONS
|
|
|
|
|
|
|
|
|
|
|
|
subscriptions : Model -> Sub Msg
|
|
|
|
subscriptions model =
|
|
|
|
Sub.none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- VIEW
|
|
|
|
|
|
|
|
|
2024-12-12 01:36:31 -06:00
|
|
|
view : Shared.Model -> Model -> View Msg
|
|
|
|
view shared model =
|
|
|
|
{ title = "services (elmBuilds)"
|
|
|
|
, attributes = []
|
|
|
|
, element = elmBuildsContainer shared.device
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
elmBuildsContainer : Device -> Element msg
|
|
|
|
elmBuildsContainer device =
|
|
|
|
topLevelContainer (elmBuildsList device)
|
|
|
|
|
|
|
|
|
|
|
|
elmBuildsList : Device -> Element msg
|
|
|
|
elmBuildsList device =
|
|
|
|
column pageList <|
|
|
|
|
List.concat
|
|
|
|
(case ( device.class, device.orientation ) of
|
|
|
|
_ ->
|
|
|
|
[ [ serviceMaker ] ]
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
serviceMaker : Element msg
|
|
|
|
serviceMaker =
|
|
|
|
row
|
|
|
|
topLevelBox
|
|
|
|
[ cardMaker
|
|
|
|
[ cardTitleMaker (String.toUpper servicesElmBuilds.serviceName)
|
|
|
|
, cardFormatter
|
|
|
|
[ cardContentSpacing
|
|
|
|
[ column
|
|
|
|
fieldSpacer
|
|
|
|
[ cardSubTitleMaker
|
|
|
|
[ column
|
|
|
|
bodyFormat
|
|
|
|
[-- chunkMaker
|
|
|
|
-- , titleMaker
|
|
|
|
-- , highlightedBlockMaker
|
|
|
|
-- , bulletPointMaker
|
|
|
|
-- , numberMaker
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|