|
|
@@ -5,6 +5,10 @@
|
|
5
|
5
|
h1 {{ type }}:{{ $route.params.slug }} {{ post.title }}
|
|
6
|
6
|
p(v-if="post.categories") categories: {{ post.categories }}
|
|
7
|
7
|
p(v-if="post.type") type: {{ post.type }}
|
|
|
8
|
+ .date-info(v-if="type === 'events' || post.type === 'exhibitions'")
|
|
|
9
|
+ p start: {{ dateFrom(post.start) }}
|
|
|
10
|
+ p end: {{ dateFrom(post.end) }}
|
|
|
11
|
+
|
|
8
|
12
|
|
|
9
|
13
|
.post-single.block-wrapper(v-for="(block, i) in post.blocks" :key="`block-${i}`")
|
|
10
|
14
|
//- ?: are objects are always gallery blocks
|
|
|
@@ -56,7 +60,6 @@ export default {
|
|
56
|
60
|
type() { // Checks for type and fixes Episodes route edge case
|
|
57
|
61
|
return typeFromRoute(this.$route)
|
|
58
|
62
|
},
|
|
59
|
|
-
|
|
60
|
63
|
/**
|
|
61
|
64
|
* We get the actual post data using the slug
|
|
62
|
65
|
*/
|
|
|
@@ -127,7 +130,14 @@ export default {
|
|
127
|
130
|
|
|
128
|
131
|
const json = JSON.parse(post.hero)
|
|
129
|
132
|
this.$store.commit('SET_HERO', json)
|
|
130
|
|
- }
|
|
|
133
|
+ },
|
|
|
134
|
+
|
|
|
135
|
+ /**
|
|
|
136
|
+ * Date Object from unix strings from db
|
|
|
137
|
+ */
|
|
|
138
|
+ dateFrom(unix) {
|
|
|
139
|
+ return new Date( parseInt(unix) * 1000 )
|
|
|
140
|
+ },
|
|
131
|
141
|
},
|
|
132
|
142
|
watch: {
|
|
133
|
143
|
posts(newVal, oldVal) {
|