Преглед на файлове

layout updates, posts section styling behaviour in grid and non-grid layout

tags/0.9.0
Alej преди 5 години
родител
ревизия
272d8b1852
променени са 1 файла, в които са добавени 24 реда и са изтрити 8 реда
  1. 24
    8
      vue-theme/src/pages/list.vue

+ 24
- 8
vue-theme/src/pages/list.vue Целия файл

1
 <template lang="pug">
1
 <template lang="pug">
2
 .page--list.f-row.between
2
 .page--list.f-row.between
3
     article.f-grow
3
     article.f-grow
4
-        header.f-row.center
4
+        header.f-row.center.t-up
5
             h1 {{ type }} list
5
             h1 {{ type }} list
6
             span(v-if="sortBy")
6
             span(v-if="sortBy")
7
                 h1 &nbsp;sorted by {{ sortBy.replace('-', ' ') }}
7
                 h1 &nbsp;sorted by {{ sortBy.replace('-', ' ') }}
10
             section(v-for="post in posts" :key="post.slug").shadow.post
10
             section(v-for="post in posts" :key="post.slug").shadow.post
11
                 router-link(:to="`/${type}/${post.slug}`")
11
                 router-link(:to="`/${type}/${post.slug}`")
12
                     p {{post.featured}}
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
         footer
25
         footer
22
             p {{ `${type} count: ${Object.values(posts).length}` }}
26
             p {{ `${type} count: ${Object.values(posts).length}` }}
23
             p {{ `show sidebar: ${sidebar}` }}
27
             p {{ `show sidebar: ${sidebar}` }}
117
 <style lang="postcss">
121
 <style lang="postcss">
118
 .page--list
122
 .page--list
119
     article
123
     article
124
+        /* posts not grid list */
125
+        ul
126
+            img
127
+                max-width: 50%
128
+            li
129
+                
120
         .is-grid
130
         .is-grid
121
             display: flex
131
             display: flex
122
             flex-direction: row
132
             flex-direction: row
123
             flex-wrap: wrap
133
             flex-wrap: wrap
124
             section
134
             section
125
                 width: 33%
135
                 width: 33%
136
+            ul
137
+                flex-wrap: wrap
138
+                list-style: none
139
+                img
140
+                    max-width: 100%
141
+                
126
 </style>
142
 </style>

Loading…
Отказ
Запис