From 806f7850bf44e6266050cae465037429f27ee4d3 Mon Sep 17 00:00:00 2001 From: Rebecacalvoquintero Date: Fri, 8 Dec 2017 16:25:16 +0000 Subject: [PATCH] #36 styled previousVisitsOverview --- src/css/_custom.css | 4 +++ src/elm/Model.elm | 11 +++++--- src/elm/Routes/PreviousVisitsOverviewPage.elm | 25 +++++++++++++------ 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/css/_custom.css b/src/css/_custom.css index 8b6df15..37e0e15 100644 --- a/src/css/_custom.css +++ b/src/css/_custom.css @@ -96,6 +96,10 @@ button { background-color: #F7F9F9; } +.w2 { + width: 3rem; +} + /*MAVIS' Changes*/ .flash { -webkit-animation: flash 1.5s infinite; diff --git a/src/elm/Model.elm b/src/elm/Model.elm index f085e3b..bb4eb99 100644 --- a/src/elm/Model.elm +++ b/src/elm/Model.elm @@ -8,7 +8,7 @@ import Navigation initModel : Model initModel = - { route = HomeRoute + { route = PreviousVisitsOverviewRoute , timerLength = 0 , previousFeedback = listOfFeedbacks , feedback = Feedback "" 4 Nothing Nothing 0 @@ -22,9 +22,12 @@ initModel = listOfFeedbacks : List Feedback listOfFeedbacks = - [ Feedback "Milner, #546783920" 1 (Just "Good visit") Nothing 3 - , Feedback "Smith, #976783920" 2 (Just "The dad was not there") Nothing 3 - , Feedback "Campbell, #897783920" 3 (Just "They offered me a cup of tea") Nothing 5 + [ Feedback "Milner, #5467839" 1 (Just "Good visit") Nothing 3 + , Feedback "Smith, #9767839" 2 (Just "The dad was not there") Nothing 3 + , Feedback "Campbell, #897839" 3 (Just "They offered me a cup of tea") Nothing 5 + , Feedback "Ford, #9768599" 7 (Just "I had a very good time") Nothing 3 + , Feedback "Harris, #8977839" 8 (Just "The grandmother was here") Nothing 5 + , Feedback "Peng, #897839" 9 (Just "I didn't have a nice time") Nothing 5 ] diff --git a/src/elm/Routes/PreviousVisitsOverviewPage.elm b/src/elm/Routes/PreviousVisitsOverviewPage.elm index b41a885..6e98144 100644 --- a/src/elm/Routes/PreviousVisitsOverviewPage.elm +++ b/src/elm/Routes/PreviousVisitsOverviewPage.elm @@ -8,19 +8,28 @@ import Model exposing (..) previousVisitsOverviewPage : Model -> Html Msg previousVisitsOverviewPage model = - div [ class "center listOfVisits vh-100" ] - [ div [ class "tc center" ] - ([ p [ class "tc f4" ] [ text "Your visits" ] ] ++ visitContent model) + div [ class "center ma0 pa0" ] + [ div [ class "h4 bb b--black-10 listOfVisits pt4 v-mid bw2" ] + [ p [ class "ma0 tc f3 b brand" ] [ text "Your visits" ] + ] + , div + [] + (visitContent + model + ) ] visitItem : Feedback -> Html Msg visitItem feedback = - button [ onClick <| SelectVisitItem feedback ] - [ li [ class "db ma3" ] - [ p [ class "" ] [ text "#6574532" ] - , img [ src "./assets/mic.svg" ] [] - , img [ src "./assets/write.svg" ] [] + button [ class "w-100", onClick <| SelectVisitItem feedback ] + [ div [ class "" ] + [ li [ class "db flex bb bw2 b--black-10" ] + [ p [ class "" ] [ text "Today" ] + , p [ class "center f4 pt2" ] [ text feedback.familyId ] + , img [ src "./assets/mic.svg", class "w2" ] [] + , img [ src "./assets/write.svg", class "w2" ] [] + ] ] ]