|
|
@@ -141,11 +141,13 @@ export default {
|
|
141
|
141
|
const page = this.allPages.filter(
|
|
142
|
142
|
page => page.slug == type + 's',
|
|
143
|
143
|
)[0]
|
|
|
144
|
+
|
|
144
|
145
|
let hero = { url: null, heroType: null }
|
|
145
|
|
-
|
|
|
146
|
+
|
|
146
|
147
|
// Clear the hero and bail
|
|
147
|
148
|
if(!page) return this.$store.commit('SET_HERO', hero)
|
|
148
|
149
|
|
|
|
150
|
+ console.log('setting hero:', page)
|
|
149
|
151
|
hero.url = page.featured
|
|
150
|
152
|
hero.heroType = 'image'
|
|
151
|
153
|
if (
|
|
|
@@ -181,11 +183,9 @@ export default {
|
|
181
|
183
|
}
|
|
182
|
184
|
},
|
|
183
|
185
|
watch: {
|
|
184
|
|
- posts() {
|
|
185
|
|
- this.checkAndSetHero(this.type)
|
|
186
|
|
- },
|
|
187
|
186
|
$route(to, from) {
|
|
188
|
|
- let type = convertTitleCase(this.type) +'s'
|
|
|
187
|
+ this.checkAndSetHero(this.type)
|
|
|
188
|
+
|
|
189
|
189
|
let sort = to.path
|
|
190
|
190
|
.split('/')
|
|
191
|
191
|
.filter(p => p)
|