|
|
@@ -6,7 +6,7 @@
|
|
6
|
6
|
span(v-if="sortBy")
|
|
7
|
7
|
h1 sorted by {{ sortBy.replace('-', ' ') }}
|
|
8
|
8
|
|
|
9
|
|
- .posts(:class="{ 'is-grid': isGrid }")
|
|
|
9
|
+ .posts(:class="{ 'is-grid': grid }")
|
|
10
|
10
|
section(v-for="post in posts" :key="post.slug").shadow.post
|
|
11
|
11
|
router-link(:to="`/${type}/${post.slug}`")
|
|
12
|
12
|
h4 {{ post.title }}
|
|
|
@@ -34,13 +34,11 @@ export default {
|
|
34
|
34
|
components: { sidebar },
|
|
35
|
35
|
props: {
|
|
36
|
36
|
sidebar: { type: Boolean },
|
|
|
37
|
+ grid: { type: Boolean },
|
|
37
|
38
|
sortBy: { type: String }
|
|
38
|
39
|
},
|
|
39
|
40
|
mixins: [postTypeGetters],
|
|
40
|
41
|
computed: {
|
|
41
|
|
- isGrid() {
|
|
42
|
|
- return this.$route.query.grid === 'true'
|
|
43
|
|
- },
|
|
44
|
42
|
type() { // Checks for type and fixes Episodes route edge case
|
|
45
|
43
|
return typeFromRoute(this.$route)
|
|
46
|
44
|
},
|