Przeglądaj źródła

:sparkles: blocking seen letters

tags/0.9.0
J 4 lat temu
rodzic
commit
de5b8665b4

+ 5
- 0
vue-theme/src/pages/list.vue Wyświetl plik

@@ -226,6 +226,11 @@ export default {
226 226
             width: 100%
227 227
             &.inbetween
228 228
                 grid-column: span 3
229
+                background: white
230
+                padding: 0.3em 0
231
+                font-size: 1.3em
232
+                > p
233
+                    margin: 0
229 234
 
230 235
     /* posts in grid list */
231 236
     .posts.is-grid

+ 7
- 2
vue-theme/src/store/modules/artist.js Wyświetl plik

@@ -35,6 +35,7 @@ const _arrangeByMaterial = artistsList => {
35 35
 }
36 36
 
37 37
 let seen = 0
38
+let hasTitle = []
38 39
 const _arrangeByAlpha = artistsList => {
39 40
     const alphabet = [...'9abcdefghijklmnopqrstuvwxyz']
40 41
     const flatPacked = []
@@ -49,13 +50,17 @@ const _arrangeByAlpha = artistsList => {
49 50
         if(i == 0) {
50 51
             seen = charaIndex
51 52
             flatPacked.push({ slug: alphabet[seen], title: alphabet[seen], inbetween: true })
53
+            hasTitle.push(alphabet[seen])
52 54
         }
53 55
 
54 56
         if (charaIndex == seen + 1) {
55 57
             seen++
56 58
             if(seen > alphabet.length) { seen = 0 }
57
-
58
-            flatPacked.push({ slug: alphabet[seen], title: alphabet[seen], inbetween: true })
59
+            
60
+            if(!hasTitle.includes(alphabet[seen])) {
61
+                flatPacked.push({ slug: alphabet[seen], title: alphabet[seen], inbetween: true })
62
+                hasTitle.push(alphabet[seen])
63
+            }
59 64
         }
60 65
         flatPacked.push(artist)
61 66
     })

Ładowanie…
Anuluj
Zapisz