From b45519d0a0451dccdd6e8f7c9078cdd4bb548e7f Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 7 Sep 2016 01:05:13 -0500 Subject: [PATCH] Fix part11 --- part11/ElmHub.elm | 13 +++++++++---- part11/style.css | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/part11/ElmHub.elm b/part11/ElmHub.elm index 34c3fef..5c19ae0 100644 --- a/part11/ElmHub.elm +++ b/part11/ElmHub.elm @@ -200,11 +200,16 @@ viewErrorMessage errorMessage = text "" -viewSearchResult : SearchResult -> Html Msg +viewStars : SearchResult -> Table.HtmlDetails Msg +viewStars result = + Table.HtmlDetails [] + [ span [ class "star-count" ] [ text (toString result.stars) ] ] + + +viewSearchResult : SearchResult -> Table.HtmlDetails Msg viewSearchResult result = - li [] - [ span [ class "star-count" ] [ text (toString result.stars) ] - , a [ href ("https://github.com/" ++ result.name), target "_blank" ] + Table.HtmlDetails [] + [ a [ href ("https://github.com/" ++ result.name), target "_blank" ] [ text result.name ] , button [ class "hide-result", onClick (DeleteById result.id) ] [ text "X" ] diff --git a/part11/style.css b/part11/style.css index 26acacd..bfbfd02 100644 --- a/part11/style.css +++ b/part11/style.css @@ -137,3 +137,17 @@ button:focus, input:focus { display: block; color: #555; } + +th { + text-align: left; + cursor: pointer; +} + +th:hover { + color: rgb(96, 181, 204); +} + +th, td { + font-size: 18px; + padding-right: 20px; +}