Don't make elmHubHeader top-level
This commit is contained in:
@@ -32,14 +32,14 @@ initialModel =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
elmHubHeader =
|
view model =
|
||||||
|
let
|
||||||
|
elmHubHeader =
|
||||||
header []
|
header []
|
||||||
[ h1 [] [ text "ElmHub" ]
|
[ h1 [] [ text "ElmHub" ]
|
||||||
, span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ]
|
, span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ]
|
||||||
]
|
]
|
||||||
|
in
|
||||||
|
|
||||||
view model =
|
|
||||||
div [ class "content" ]
|
div [ class "content" ]
|
||||||
[ elmHubHeader
|
[ elmHubHeader
|
||||||
, ul [ class "results" ] (List.map viewSearchResult model.results)
|
, ul [ class "results" ] (List.map viewSearchResult model.results)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ type alias Msg =
|
|||||||
{-| TODO add a type annotation to this value
|
{-| TODO add a type annotation to this value
|
||||||
|
|
||||||
HINT: The type aliases above may come in handy for these exercises!
|
HINT: The type aliases above may come in handy for these exercises!
|
||||||
|
|
||||||
-}
|
-}
|
||||||
initialModel =
|
initialModel =
|
||||||
{ query = "tutorial"
|
{ query = "tutorial"
|
||||||
@@ -55,18 +56,16 @@ initialModel =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{-| TODO add a type annotation to this value
|
{-| TODO add a type annotation to this function
|
||||||
-}
|
-}
|
||||||
elmHubHeader =
|
view model =
|
||||||
|
let
|
||||||
|
elmHubHeader =
|
||||||
header []
|
header []
|
||||||
[ h1 [] [ text "ElmHub" ]
|
[ h1 [] [ text "ElmHub" ]
|
||||||
, span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ]
|
, span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ]
|
||||||
]
|
]
|
||||||
|
in
|
||||||
|
|
||||||
{-| TODO add a type annotation to this function
|
|
||||||
-}
|
|
||||||
view model =
|
|
||||||
div [ class "content" ]
|
div [ class "content" ]
|
||||||
[ elmHubHeader
|
[ elmHubHeader
|
||||||
, ul [ class "results" ] (List.map viewSearchResult model.results)
|
, ul [ class "results" ] (List.map viewSearchResult model.results)
|
||||||
|
|||||||
Reference in New Issue
Block a user