Sfoglia il codice sorgente

Attribute to set wide card for first posts in list

tags/0.9.0
Alej 4 anni fa
parent
commit
b1bc87d944
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 1
    1
      vue-theme/src/components/card.vue
  2. 4
    4
      vue-theme/src/pages/list.vue

+ 1
- 1
vue-theme/src/components/card.vue Vedi File

@@ -7,7 +7,7 @@
7 7
         router-link(:to="`/${type}/${content.slug}`")
8 8
             //- set image to thumbnail setting
9 9
             featured-image(:post="content")
10
-        .f-col.w-max
10
+        .f-col
11 11
             router-link(:to="`/${type}/${content.slug}`")
12 12
                 h1.t-up.t-cntr.t-b {{ content.title }}
13 13
             p {{ content.excerpt }}

+ 4
- 4
vue-theme/src/pages/list.vue Vedi File

@@ -12,8 +12,8 @@
12 12
             .content(v-else-if="allPagesLoaded && type && allPages[type]" v-html="allPages[type].content")
13 13
 
14 14
         .posts(v-if="posts && loaded" :class="{ 'is-grid': grid }")
15
-            section(v-for="post in posts" :key="post.slug").shadow.post
16
-                card(:content="post" :type="type")
15
+            section(v-for="(post, i) in posts" :key="post.slug").shadow.post
16
+                card(:content="post" :type="type" :wide="type == 'exhibitions' && i > 2 || 'events'")
17 17
 
18 18
         footer
19 19
             p {{ `${type} count: ${Object.values(posts).length}` }}
@@ -59,7 +59,7 @@ export default {
59 59
             /**
60 60
              * We override the API to sort by date
61 61
              * because items are returned by ID so
62
-             * we need to resort it by date
62
+             * we need to re-sort it by date
63 63
              */
64 64
             let unsortedOfType = Object.values(this[`all${type}`])
65 65
             let sortedByRecent = unsortedOfType.sort((postA, postB) => new Date(postB.date) - new Date(postA.date))
@@ -158,7 +158,7 @@ export default {
158 158
             /* background-color: white */
159 159
             section
160 160
                 width: 32.5%
161
-                /* 4 column grid */
161
+                /* 4 column grid see how dense this becomes */
162 162
                 /* width: 24% */
163 163
             ul
164 164
                 flex-wrap: wrap

Loading…
Annulla
Salva