|
|
@@ -1,7 +1,7 @@
|
|
1
|
1
|
<template lang="pug">
|
|
2
|
2
|
.page--list.f-row.between
|
|
3
|
3
|
article.f-grow
|
|
4
|
|
- header.f-row.center
|
|
|
4
|
+ header.f-row.center.t-up
|
|
5
|
5
|
h1 {{ type }} list
|
|
6
|
6
|
span(v-if="sortBy")
|
|
7
|
7
|
h1 sorted by {{ sortBy.replace('-', ' ') }}
|
|
|
@@ -10,14 +10,18 @@
|
|
10
|
10
|
section(v-for="post in posts" :key="post.slug").shadow.post
|
|
11
|
11
|
router-link(:to="`/${type}/${post.slug}`")
|
|
12
|
12
|
p {{post.featured}}
|
|
13
|
|
- img(v-if="post.featured" :src="post.featured" alt="post thumbnail")
|
|
14
|
|
- img(v-else-if="post.hero && 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 }}
|
|
16
|
|
- p(v-else) ERROR: no thumbnail
|
|
17
|
|
-
|
|
18
|
|
- h4 {{ post.title }}
|
|
19
|
|
- p(style="font-size: 9px;") {{ post.date }}
|
|
|
13
|
+ ul.f-row
|
|
|
14
|
+ img(v-if="post.featured" :src="post.featured" alt="post thumbnail")
|
|
|
15
|
+ img(v-else-if="post.hero && JSON.parse(post.hero).url" :src="getThumbnailFromYt(JSON.parse(post.hero).url)" alt="post thumbnail from YouTube")
|
|
|
16
|
+ p(v-else-if="post.hero") ERROR: {{ post.hero }}
|
|
|
17
|
+ p(v-else) ERROR: no thumbnail
|
|
|
18
|
+ li.f-col.between
|
|
|
19
|
+ h2.t-up {{ post.title }}
|
|
|
20
|
+ h4 {{ post.date }}
|
|
|
21
|
+ p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu elit in ex pharetra volutpat ac at magna. Duis libero est, imperdiet non sollicitudin vel, eleifend at ante...
|
|
20
|
22
|
|
|
|
23
|
+ //- posts not grid
|
|
|
24
|
+
|
|
21
|
25
|
footer
|
|
22
|
26
|
p {{ `${type} count: ${Object.values(posts).length}` }}
|
|
23
|
27
|
p {{ `show sidebar: ${sidebar}` }}
|
|
|
@@ -117,10 +121,22 @@ export default {
|
|
117
|
121
|
<style lang="postcss">
|
|
118
|
122
|
.page--list
|
|
119
|
123
|
article
|
|
|
124
|
+ /* posts not grid list */
|
|
|
125
|
+ ul
|
|
|
126
|
+ img
|
|
|
127
|
+ max-width: 50%
|
|
|
128
|
+ li
|
|
|
129
|
+
|
|
120
|
130
|
.is-grid
|
|
121
|
131
|
display: flex
|
|
122
|
132
|
flex-direction: row
|
|
123
|
133
|
flex-wrap: wrap
|
|
124
|
134
|
section
|
|
125
|
135
|
width: 33%
|
|
|
136
|
+ ul
|
|
|
137
|
+ flex-wrap: wrap
|
|
|
138
|
+ list-style: none
|
|
|
139
|
+ img
|
|
|
140
|
+ max-width: 100%
|
|
|
141
|
+
|
|
126
|
142
|
</style>
|