2024-11-11 03:57:54 -06:00
|
|
|
module Pages.Dodgers exposing (Model, Msg, page)
|
2024-11-11 00:43:03 -06:00
|
|
|
|
|
|
|
import Config.Identity as ID exposing (..)
|
|
|
|
import Config.Theme as T exposing (..)
|
2024-11-11 03:57:54 -06:00
|
|
|
import Effect exposing (Effect)
|
2024-11-11 00:43:03 -06:00
|
|
|
import Element exposing (..)
|
|
|
|
import Element.Font as F
|
2024-11-11 03:57:54 -06:00
|
|
|
import Html.Attributes as H exposing (style)
|
|
|
|
import Layouts
|
|
|
|
import Page exposing (Page)
|
|
|
|
import Route exposing (Route)
|
|
|
|
import Shared
|
2024-11-11 00:43:03 -06:00
|
|
|
import View exposing (View)
|
|
|
|
|
|
|
|
|
2024-11-11 03:57:54 -06:00
|
|
|
page : Shared.Model -> Route () -> Page Model Msg
|
|
|
|
page shared route =
|
|
|
|
Page.new
|
|
|
|
{ init = init
|
|
|
|
, update = update
|
|
|
|
, subscriptions = subscriptions
|
|
|
|
, view = view
|
|
|
|
}
|
|
|
|
|> Page.withLayout toLayout
|
|
|
|
|
|
|
|
|
|
|
|
toLayout : Model -> Layouts.Layout Msg
|
|
|
|
toLayout model =
|
|
|
|
Layouts.Navbar {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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
|
|
|
|
|
|
|
|
|
|
|
|
view : Model -> View Msg
|
|
|
|
view model =
|
|
|
|
{ title = dodgersName
|
|
|
|
, attributes = []
|
2024-11-11 00:43:03 -06:00
|
|
|
, element = dodgersContainer
|
|
|
|
}
|
|
|
|
|
2024-11-11 03:57:54 -06:00
|
|
|
|
2024-11-11 00:43:03 -06:00
|
|
|
dodgersContainer : Element msg
|
2024-11-11 03:57:54 -06:00
|
|
|
dodgersContainer =
|
|
|
|
topLevelContainer dodgersList
|
|
|
|
|
2024-11-11 00:43:03 -06:00
|
|
|
|
|
|
|
dodgersList : Element msg
|
|
|
|
dodgersList =
|
|
|
|
column
|
2024-11-11 03:57:54 -06:00
|
|
|
[ spacing 40
|
2024-11-11 00:43:03 -06:00
|
|
|
, centerX
|
|
|
|
, centerY
|
|
|
|
]
|
|
|
|
dodgers
|
|
|
|
|
2024-11-11 03:57:54 -06:00
|
|
|
|
|
|
|
dodgers =
|
|
|
|
[]
|