From c07ff4680f84dd9d4479e30c8a790be10542b8a2 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 7 Sep 2016 04:39:12 -0500 Subject: [PATCH] Use a let-expression in part2 --- part2/Main.elm | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/part2/Main.elm b/part2/Main.elm index 9644e43..0aa618f 100644 --- a/part2/Main.elm +++ b/part2/Main.elm @@ -13,29 +13,29 @@ initialModel = } -elmHubHeader = - header [] - [ h1 [] [ text "ElmHub" ] - , span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ] - ] - - view model = - div [ class "content" ] - [ text "TODO put the contents of elmHubHeader here instead of this text!" - , ul [ class "results" ] - [ li [] - [ span [ class "star-count" ] - [-- TODO display the number of stars here. - -- - -- HINT: You'll need some parentheses to do this! + let + elmHubHeader = + header [] + [ h1 [] [ text "ElmHub" ] + , span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ] + ] + in + div [ class "content" ] + [ text "TODO put the contents of elmHubHeader here instead of this text!" + , ul [ class "results" ] + [ li [] + [ span [ class "star-count" ] + [-- TODO display the number of stars here. + -- + -- HINT: You'll need some parentheses to do this! + ] + -- TODO use the model to put a link here that points to + -- https://github.com/TheSeamau5/elm-checkerboardgrid-tutorial + -- by prepending the "https://github.com/" part. ] - -- TODO use the model to put a link here that points to - -- https://github.com/TheSeamau5/elm-checkerboardgrid-tutorial - -- by prepending the "https://github.com/" part. ] ] - ] main =