Quellcode durchsuchen

:recycle: tweaking col span on list | assign sortword only if exists

tags/0.9.0
J vor 4 Jahren
Ursprung
Commit
7a47cdb08c
2 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen
  1. 7
    4
      vue-theme/src/pages/list.vue
  2. 1
    1
      vue-theme/src/store/modules/artist.js

+ 7
- 4
vue-theme/src/pages/list.vue Datei anzeigen

@@ -15,11 +15,12 @@
15 15
             )
16 16
 
17 17
         ul.posts.f-col(v-if="posts && loaded" :class="{ 'is-grid': grid }")
18
-            li(v-for="(post, i) in posts" :key="post.slug").post.shadow
19
-                card(v-if="!post.inbetween" :content="post" :type="type" :wide="isWide")
20
-                .f-row.w-max(v-else-if="post.inbetween")
18
+            template(v-for="(post, i) in posts" :key="post.slug")
19
+                li.post.shadow(v-if="!post.inbetween" )
20
+                    card(:content="post" :type="type" :wide="isWide")
21
+                li.post.inbetween.f-row.w-max(v-else-if="post.inbetween")
21 22
                     p {{ post.slug }}
22
-        
23
+            
23 24
         //- Important: Do NOT remove this! Required for intersection observer
24 25
         footer
25 26
             p(v-if="loadingFetched") loading more {{ type }}...
@@ -223,6 +224,8 @@ export default {
223 224
         grid-gap: $ms--2
224 225
         .post
225 226
             width: 100%
227
+        &.inbetween
228
+            grid-column: span 3
226 229
 
227 230
     /* posts in grid list */
228 231
     .posts.is-grid

+ 1
- 1
vue-theme/src/store/modules/artist.js Datei anzeigen

@@ -41,7 +41,7 @@ const _arrangeByAlpha = artistsList => {
41 41
     artistsList.forEach((artist, i) => {
42 42
         const lastWord = artist.slug.split('-').filter(c => c).pop()
43 43
         const firstCharaOfLastWord = lastWord[0]
44
-        const firstCharaOfSortWord = artist.sortname[0]
44
+        const firstCharaOfSortWord = artist.sortname ? artist.sortname[0] : 'z'
45 45
         
46 46
         console.log(firstCharaOfLastWord, firstCharaOfSortWord)
47 47
 

Laden…
Abbrechen
Speichern