Browse Source

:sparkles: using card component in episode pages

tags/0.9.0
j 4 years ago
parent
commit
05674c8bdf
2 changed files with 5 additions and 7 deletions
  1. 2
    2
      vue-theme/src/components/card.vue
  2. 3
    5
      vue-theme/src/pages/single.vue

+ 2
- 2
vue-theme/src/components/card.vue View File

@@ -1,7 +1,7 @@
1 1
 <template lang="pug">
2 2
 .card(v-if="content")
3 3
     header
4
-        router-link(:to="`/${type}`")
4
+        router-link(v-if="!hideType" :to="`/${type}`")
5 5
             p.t-up {{type}}
6 6
     article.card--info(:class="{ 'wide': wide }")
7 7
         router-link(:to="`/${type}/${content.slug}`")
@@ -16,7 +16,7 @@
16 16
 import featuredImage from '@/components/featured-image'
17 17
 export default {
18 18
     components: { featuredImage },
19
-    props: ['type', 'content', 'wide']
19
+    props: ['type', 'content', 'wide', 'hide-type']
20 20
 }
21 21
 </script>
22 22
 

+ 3
- 5
vue-theme/src/pages/single.vue View File

@@ -28,10 +28,7 @@
28 28
             h2.t-up featured in this episode
29 29
             ul
30 30
                 li.f-row.between(v-for="artist in p2pPostsByType['artist']")
31
-                    img.feature(src="https://i1.wp.com/www.craftinamerica.org/wp-content/uploads/2020/09/20200210_133120-e1599254267307.jpg")
32
-                    .f-col
33
-                        h2.t-up {{ artist.title }}
34
-                        p {{ artist.excerpt }}
31
+                    card(:content="artist" type="artists" :wide="true" :hide-type="true")
35 32
             
36 33
         credits(v-if="type === 'episodes' && post" :post="post")
37 34
 
@@ -39,6 +36,7 @@
39 36
 </template>
40 37
 
41 38
 <script>
39
+import card from '@/components/card.vue'
42 40
 import sidebar from '@/components/sidebars/sidebar'
43 41
 import gallery from '@/components/gallery/'
44 42
 import block from '@/components/content-block/block'
@@ -49,7 +47,7 @@ import { postTypeGetters, scrollTop } from './mixin-post-types'
49 47
 import { convertTitleCase, dePluralize, typeFromRoute } from '@/utils/helpers'
50 48
  
51 49
 export default {
52
-    components: { sidebar, gallery, block, credits },
50
+    components: { sidebar, gallery, block, credits, card },
53 51
     props: {
54 52
         sidebar: { type: Boolean },
55 53
         id: { type: Number }

Loading…
Cancel
Save