瀏覽代碼

:sparkles: inserting featured thumbs in list

tags/0.9.0
J 5 年之前
父節點
當前提交
b9057426d6
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4
    3
      vue-theme/src/pages/list.vue

+ 4
- 3
vue-theme/src/pages/list.vue 查看文件

@@ -9,9 +9,10 @@
9 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
-                    p(v-if="post.featured") {{ post.featured }}
13
-                    img(v-else-if="JSON.parse(post.hero).url" :src="getThumbnailFromYt(JSON.parse(post.hero).url)" alt="YouTube")
14
-                    p(v-else-if="post.hero") {{ post.hero }}
12
+                    p {{post.featured}}
13
+                    img(v-if="post.featured" :src="post.featured" alt="post thumbnail")
14
+                    img(v-else-if="JSON.parse(post.hero).url" :src="getThumbnailFromYt(JSON.parse(post.hero).url)" alt="post thumbnail from YouTube")
15
+                    p(v-else-if="post.hero") ERROR: {{ post.hero }}
15 16
                     p(v-else) ERROR: no thumbnail
16 17
 
17 18
                     h4 {{ post.title }} 

Loading…
取消
儲存