mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-26 05:13:24 +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)
|
module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template)
|
||||||
|
|
||||||
import Browser.Navigation
|
|
||||||
import DataSource
|
import DataSource
|
||||||
import Effect exposing (Effect)
|
import Effect exposing (Effect)
|
||||||
import Html exposing (Html)
|
import Html exposing (Html)
|
||||||
@ -90,11 +89,12 @@ view :
|
|||||||
-> Model
|
-> Model
|
||||||
-> (Msg -> msg)
|
-> (Msg -> msg)
|
||||||
-> View msg
|
-> View msg
|
||||||
-> { body : Html msg, title : String }
|
-> { body : List (Html msg), title : String }
|
||||||
view stars page model toMsg pageView =
|
view stars page model toMsg pageView =
|
||||||
{ body =
|
{ body =
|
||||||
Html.Styled.div []
|
[ Html.Styled.div []
|
||||||
pageView.body
|
pageView.body
|
||||||
|> Html.Styled.toUnstyled
|
|> Html.Styled.toUnstyled
|
||||||
|
]
|
||||||
, title = pageView.title
|
, title = pageView.title
|
||||||
}
|
}
|
||||||
|
@ -89,11 +89,12 @@ view :
|
|||||||
-> Model
|
-> Model
|
||||||
-> (Msg -> msg)
|
-> (Msg -> msg)
|
||||||
-> View msg
|
-> View msg
|
||||||
-> { body : Html msg, title : String }
|
-> { body : List (Html msg), title : String }
|
||||||
view stars page model toMsg pageView =
|
view stars page model toMsg pageView =
|
||||||
{ body =
|
{ body =
|
||||||
Html.Styled.div []
|
[ Html.Styled.div []
|
||||||
pageView.body
|
pageView.body
|
||||||
|> Html.Styled.toUnstyled
|
|> Html.Styled.toUnstyled
|
||||||
|
]
|
||||||
, title = pageView.title
|
, title = pageView.title
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template)
|
module Shared exposing (Data, Model, Msg(..), SharedMsg(..), template)
|
||||||
|
|
||||||
import Browser.Navigation
|
|
||||||
import DataSource
|
import DataSource
|
||||||
import Effect exposing (Effect)
|
import Effect exposing (Effect)
|
||||||
import Html exposing (Html)
|
import Html exposing (Html)
|
||||||
@ -90,11 +89,12 @@ view :
|
|||||||
-> Model
|
-> Model
|
||||||
-> (Msg -> msg)
|
-> (Msg -> msg)
|
||||||
-> View msg
|
-> View msg
|
||||||
-> { body : Html msg, title : String }
|
-> { body : List (Html msg), title : String }
|
||||||
view stars page model toMsg pageView =
|
view stars page model toMsg pageView =
|
||||||
{ body =
|
{ body =
|
||||||
Html.Styled.div []
|
[ Html.Styled.div []
|
||||||
pageView.body
|
pageView.body
|
||||||
|> Html.Styled.toUnstyled
|
|> Html.Styled.toUnstyled
|
||||||
|
]
|
||||||
, title = pageView.title
|
, title = pageView.title
|
||||||
}
|
}
|
||||||
|
@ -96,11 +96,12 @@ view :
|
|||||||
-> Model
|
-> Model
|
||||||
-> (Msg -> msg)
|
-> (Msg -> msg)
|
||||||
-> View msg
|
-> View msg
|
||||||
-> { body : Html msg, title : String }
|
-> { body : List (Html msg), title : String }
|
||||||
view stars page model toMsg pageView =
|
view stars page model toMsg pageView =
|
||||||
{ body =
|
{ body =
|
||||||
Html.Styled.div []
|
[ Html.Styled.div []
|
||||||
pageView.body
|
pageView.body
|
||||||
|> Html.Styled.toUnstyled
|
|> Html.Styled.toUnstyled
|
||||||
|
]
|
||||||
, title = pageView.title
|
, title = pageView.title
|
||||||
}
|
}
|
||||||
|
@ -537,7 +537,7 @@ config apiRoutes pages =
|
|||||||
in
|
in
|
||||||
case thing of
|
case thing of
|
||||||
Just _ ->
|
Just _ ->
|
||||||
{ view = \_ -> { title = "Title", body = Html.text "" }, head = [] }
|
{ view = \_ -> { title = "Title", body = [ Html.text "" ] }, head = [] }
|
||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
Debug.todo <| "Couldn't find page: " ++ Debug.toString page ++ "\npages: " ++ Debug.toString pages
|
Debug.todo <| "Couldn't find page: " ++ Debug.toString page ++ "\npages: " ++ Debug.toString pages
|
||||||
|
Loading…
Reference in New Issue
Block a user