Skip to content

Commit

Permalink
#36 styled previousVisitsOverview
Browse files Browse the repository at this point in the history
  • Loading branch information
rebecacalvoquintero committed Dec 8, 2017
1 parent cbc8448 commit 806f785
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/css/_custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ button {
background-color: #F7F9F9;
}

.w2 {
width: 3rem;
}

/*MAVIS' Changes*/
.flash {
-webkit-animation: flash 1.5s infinite;
Expand Down
11 changes: 7 additions & 4 deletions src/elm/Model.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Navigation

initModel : Model
initModel =
{ route = HomeRoute
{ route = PreviousVisitsOverviewRoute
, timerLength = 0
, previousFeedback = listOfFeedbacks
, feedback = Feedback "" 4 Nothing Nothing 0
Expand All @@ -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
]


Expand Down
25 changes: 17 additions & 8 deletions src/elm/Routes/PreviousVisitsOverviewPage.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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" ] []
]
]
]

Expand Down

0 comments on commit 806f785

Please sign in to comment.