Update part2

This commit is contained in:
Richard Feldman
2018-02-22 17:40:41 -05:00
parent 5477ccd20a
commit 8feb86d57f

View File

@@ -4,13 +4,13 @@ import Html exposing (..)
import Html.Attributes exposing (..) import Html.Attributes exposing (..)
model = searchResults =
{ result = [ "TheSeamau5/elm-checkerboardgrid-tutorial"
{ id = 1 , "grzegorzbalcerek/elm-by-example"
, name = "TheSeamau5/elm-checkerboardgrid-tutorial" , "sporto/elm-tutorial-app"
, stars = 66 , "jvoigtlaender/Elm-Tutorium"
} , "sporto/elm-tutorial-assets"
} ]
main = main =
@@ -24,16 +24,21 @@ main =
div [ class "content" ] div [ class "content" ]
[ text "TODO put the contents of elmHubHeader here instead of this text!" [ text "TODO put the contents of elmHubHeader here instead of this text!"
, ul [ class "results" ] , ul [ class "results" ]
[ li [] -- TODO replace this [] with a `List.map` to turn `searchResults` into some Html!
[ span [ class "star-count" ]
[-- TODO display the number of stars here.
-- --
-- HINT: You'll need some parentheses to do this! -- HINT: You'll need some parentheses to do this!
[]
] ]
-- TODO use the model to put a link here that points to
viewSearchResult searchResult =
li []
[-- TODO use `searchResult` to put a link here that points to
-- something like this:
--
-- https://github.com/TheSeamau5/elm-checkerboardgrid-tutorial -- https://github.com/TheSeamau5/elm-checkerboardgrid-tutorial
-- by prepending the "https://github.com/" part. --
] -- by prepending "https://github.com/" to the searchResult string
] --
-- HINT: This will also involve using parentheses!
] ]