Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Commit

Permalink
checks for weather before populating card. Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBernert committed Aug 13, 2017
1 parent e4a6fe0 commit f716a8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/partials/_recent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

.card {
transition: all ease 0.12s;
padding: 12px 16px;
padding: 6px 16px 12px 16px;
border: 1px solid #F1F2F3;
border-radius: 4px;
margin: 20px 0px 0px 0px;
Expand Down
9 changes: 5 additions & 4 deletions views/snapshot.pug
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ block content
.col-sm-6.col-sm-offset-3.text-center
h2 #[span.highlighted #{h.moment(snapshot[0].date).format('h:mm A')}]
h2 #[span.highlighted #{h.moment(snapshot[0].date).format('dddd, MMMM Do YYYY')}]
h2 #[span.highlighted #{snapshot[0].location.placemark.locality},#{snapshot[0].location.placemark.administrativeArea}]
h2 #[span.highlighted #{snapshot[0].location.placemark.locality},#{snapshot[0].location.placemark.administrativeArea}]

.light-gray-background
.container
.row
.col-sm-4
+stepsCard(snapshot[0].steps, snapshot[0].altitude)
.col-sm-4
+weather(snapshot[0].weather)
if snapshot[0].weather
.col-sm-4
+weather(snapshot[0].weather)
.col-sm-4
- const question = snapshot[0].responses.find(x => x.questionPrompt === 'Where are you?')
+location(snapshot[0].location, question, snapshot[0].altitude)
Expand All @@ -36,4 +37,4 @@ block content
.col-sm-8
+photosCard(snapshot[0].photoSet.photos)

pre= h.dump(snapshot[0])
//- pre= h.dump(snapshot[0])

0 comments on commit f716a8a

Please sign in to comment.