Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wearebraid/be.camp
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Boyd committed Feb 20, 2020
2 parents 05a68d8 + 5f15aa8 commit cf94d9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ $ npm start
$ npm run generate:local
```

Note that `npm run dev` hosts on 0.0.0.0. Edit `HOST` in package.json to adjust this behavior (e.g. to 127.0.0.1).


## 3rd-Party APIs
This iteration of the beCamp website pulls data from [ButterCMS](https://buttercms.com) and [Airtable](https://airtable.com) to populate site content. For API access, you can message `@andrew` in the `#becamp` channel on [Cville Slack](http://bit.ly/slack-cville).

Expand Down
17 changes: 7 additions & 10 deletions components/becampSchedule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class="event"
v-for="event in events"
:key="event['Location']"
:data-location="getLocationName(event['Location'])"
:data-location="getLocationID(event['Location'])"
>
<div class="event-data">
<h4 class="topic">{{ event['Topic'] }}</h4>
Expand All @@ -32,7 +32,7 @@
{{ event['Type'] }}
</span>
<div class="event-location">
<span class="location">{{ getLocationName(event['Location']) }}</span>
<span class="location">{{ getLocationID(event['Location']) }}</span>
</div>
</div>
</div>
Expand All @@ -53,19 +53,16 @@ export default {
methods: {
getLocationName(location) {
if (location) {
let roomColor = location.substring(0, location.indexOf(' Room ['))
return roomColor ? roomColor : location
return location
}
return false
return ""
},
getLocationID(location) {
if (location) {
let id = location.match(/\[(.*?)\]/)
if (id && id[0]) {
return id[0].substring(1, 2)
}
let roomColor = location.substring(0, location.indexOf(' Room'))
return roomColor ? roomColor : location
}
return false
return ""
}
}
}
Expand Down

0 comments on commit cf94d9b

Please sign in to comment.