Skip to content

Commit cf94d9b

Browse files
author
Andrew Boyd
committed
Merge branch 'master' of github.com:wearebraid/be.camp
2 parents 05a68d8 + 5f15aa8 commit cf94d9b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ $ npm start
2727
$ npm run generate:local
2828
```
2929

30+
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).
31+
32+
3033
## 3rd-Party APIs
3134
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).
3235

components/becampSchedule.vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class="event"
1414
v-for="event in events"
1515
:key="event['Location']"
16-
:data-location="getLocationName(event['Location'])"
16+
:data-location="getLocationID(event['Location'])"
1717
>
1818
<div class="event-data">
1919
<h4 class="topic">{{ event['Topic'] }}</h4>
@@ -32,7 +32,7 @@
3232
{{ event['Type'] }}
3333
</span>
3434
<div class="event-location">
35-
<span class="location">{{ getLocationName(event['Location']) }}</span>
35+
<span class="location">{{ getLocationID(event['Location']) }}</span>
3636
</div>
3737
</div>
3838
</div>
@@ -53,19 +53,16 @@ export default {
5353
methods: {
5454
getLocationName(location) {
5555
if (location) {
56-
let roomColor = location.substring(0, location.indexOf(' Room ['))
57-
return roomColor ? roomColor : location
56+
return location
5857
}
59-
return false
58+
return ""
6059
},
6160
getLocationID(location) {
6261
if (location) {
63-
let id = location.match(/\[(.*?)\]/)
64-
if (id && id[0]) {
65-
return id[0].substring(1, 2)
66-
}
62+
let roomColor = location.substring(0, location.indexOf(' Room'))
63+
return roomColor ? roomColor : location
6764
}
68-
return false
65+
return ""
6966
}
7067
}
7168
}

0 commit comments

Comments
 (0)