mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 12:52:27 +03:00
Update examples to use List Html for body.
This commit is contained in:
parent
8ff1f21754
commit
0303636813
@ -1,6 +1,5 @@
|
||||
module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
||||
import Effect exposing (Effect)
|
||||
import Html exposing (Html)
|
||||
@ -90,11 +89,12 @@ view :
|
||||
-> Model
|
||||
-> (Msg -> msg)
|
||||
-> View msg
|
||||
-> { body : Html msg, title : String }
|
||||
-> { body : List (Html msg), title : String }
|
||||
view stars page model toMsg pageView =
|
||||
{ body =
|
||||
Html.Styled.div []
|
||||
[ Html.Styled.div []
|
||||
pageView.body
|
||||
|> Html.Styled.toUnstyled
|
||||
]
|
||||
, title = pageView.title
|
||||
}
|
||||
|
@ -89,11 +89,12 @@ view :
|
||||
-> Model
|
||||
-> (Msg -> msg)
|
||||
-> View msg
|
||||
-> { body : Html msg, title : String }
|
||||
-> { body : List (Html msg), title : String }
|
||||
view stars page model toMsg pageView =
|
||||
{ body =
|
||||
Html.Styled.div []
|
||||
[ Html.Styled.div []
|
||||
pageView.body
|
||||
|> Html.Styled.toUnstyled
|
||||
]
|
||||
, title = pageView.title
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
||||
import Effect exposing (Effect)
|
||||
import Html exposing (Html)
|
||||
@ -90,11 +89,12 @@ view :
|
||||
-> Model
|
||||
-> (Msg -> msg)
|
||||
-> View msg
|
||||
-> { body : Html msg, title : String }
|
||||
-> { body : List (Html msg), title : String }
|
||||
view stars page model toMsg pageView =
|
||||
{ body =
|
||||
Html.Styled.div []
|
||||
[ Html.Styled.div []
|
||||
pageView.body
|
||||
|> Html.Styled.toUnstyled
|
||||
]
|
||||
, title = pageView.title
|
||||
}
|
||||
|
@ -96,11 +96,12 @@ view :
|
||||
-> Model
|
||||
-> (Msg -> msg)
|
||||
-> View msg
|
||||
-> { body : Html msg, title : String }
|
||||
-> { body : List (Html msg), title : String }
|
||||
view stars page model toMsg pageView =
|
||||
{ body =
|
||||
Html.Styled.div []
|
||||
[ Html.Styled.div []
|
||||
pageView.body
|
||||
|> Html.Styled.toUnstyled
|
||||
]
|
||||
, title = pageView.title
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ config apiRoutes pages =
|
||||
in
|
||||
case thing of
|
||||
Just _ ->
|
||||
{ view = \_ -> { title = "Title", body = Html.text "" }, head = [] }
|
||||
{ view = \_ -> { title = "Title", body = [ Html.text "" ] }, head = [] }
|
||||
|
||||
Nothing ->
|
||||
Debug.todo <| "Couldn't find page: " ++ Debug.toString page ++ "\npages: " ++ Debug.toString pages
|
||||
|
Loading…
Reference in New Issue
Block a user