Kaynağa Gözat

:recycle: minor css tweaks | not loading all posts of type on single page

tags/0.9.0
J 4 yıl önce
ebeveyn
işleme
3f7a1de8f1

+ 0
- 2
vue-theme/src/pages/index.vue Dosyayı Görüntüle

159
                         &:nth-of-type(5)
159
                         &:nth-of-type(5)
160
                             grid-column-start: 3
160
                             grid-column-start: 3
161
                 &.max
161
                 &.max
162
-                    /* Need some extra gap on wide pages */
163
-                    padding: $ms--2 0
164
                     li .featured-or-hero-image img
162
                     li .featured-or-hero-image img
165
                         max-height: $max-card-img-height
163
                         max-height: $max-card-img-height
166
                 &.stickies
164
                 &.stickies

+ 3
- 4
vue-theme/src/pages/list.vue Dosyayı Görüntüle

115
         async getPosts() {
115
         async getPosts() {
116
             // Edge case for episodes
116
             // Edge case for episodes
117
             await this._getAll('episode', this.$store)
117
             await this._getAll('episode', this.$store)
118
+            const ignore = [`getMoreEpisodes`, 'getMorePages']
118
 
119
 
119
             const dispatchAction = `getMore${this.pType}`
120
             const dispatchAction = `getMore${this.pType}`
120
-            const ignore = [`getMoreEpisodes`, 'getMorePages']
121
             let res = null
121
             let res = null
122
             if(this.pType && !ignore.includes(dispatchAction)) {
122
             if(this.pType && !ignore.includes(dispatchAction)) {
123
                 res = await this.$store.dispatch(
123
                 res = await this.$store.dispatch(
145
             // with how to render based on hero.url
145
             // with how to render based on hero.url
146
             if(!this.allPages) return console.warn('no pages in state', this)
146
             if(!this.allPages) return console.warn('no pages in state', this)
147
             const page = this.allPages.filter(
147
             const page = this.allPages.filter(
148
-                page => page.slug == type + 's',
148
+                page => page.slug == `${type}s`,
149
             )[0]
149
             )[0]
150
             if(!page) return console.warn(`no page for ${type} found`)
150
             if(!page) return console.warn(`no page for ${type} found`)
151
 
151
 
203
             // Check if we changed sort method
203
             // Check if we changed sort method
204
             // from no sort to sorted
204
             // from no sort to sorted
205
             // or sorted to no sort
205
             // or sorted to no sort
206
-            // or sort to a different sort(?))
206
+            // or sort to a different sort(?)
207
             if(
207
             if(
208
                 from.fullPath.includes(this.sortBy) ||
208
                 from.fullPath.includes(this.sortBy) ||
209
                 (!to.fullPath.includes(this.sortBy) && !from.fullPath.includes(this.sortBy))
209
                 (!to.fullPath.includes(this.sortBy) && !from.fullPath.includes(this.sortBy))
210
             ) {
210
             ) {
211
-                // !: BUG: this causes event and exhibit posts to double(?)
212
                 const ignore = ['event', 'exhibition', 'post', 'artist']
211
                 const ignore = ['event', 'exhibition', 'post', 'artist']
213
                 if(ignore.includes(this.type)) return
212
                 if(ignore.includes(this.type)) return
214
                 this.clearAndInitPostList()
213
                 this.clearAndInitPostList()

+ 10
- 9
vue-theme/src/pages/single.vue Dosyayı Görüntüle

200
             )[0]
200
             )[0]
201
 
201
 
202
             // Look if it exists before you try and load everything!
202
             // Look if it exists before you try and load everything!
203
-            if(!singlePostData) {
204
-                const res = await this.$store.dispatch(`getAll${convertTitleCase(this.type)}s`, { sortType: null, params: null})
205
-                allPostsOfType = res
206
-                singlePostData = allPostsOfType.filter(
207
-                    post => post.slug == this.$route.params.slug,
208
-                )[0]
209
-            }
203
+            // if(!singlePostData) {
204
+            //     const res = await this.$store.dispatch(`getAll${convertTitleCase(this.type)}s`, { sortType: null, params: null})
205
+            //     allPostsOfType = res
206
+            //     singlePostData = allPostsOfType.filter(
207
+            //         post => post.slug == this.$route.params.slug,
208
+            //     )[0]
209
+            // }
210
 
210
 
211
             if (!singlePostData) return console.error('could not get single post data...')
211
             if (!singlePostData) return console.error('could not get single post data...')
212
             
212
             
313
             ul li
313
             ul li
314
                 margin: 0 0 $ms-0 0
314
                 margin: 0 0 $ms-0 0
315
                 .card
315
                 .card
316
-                    padding: 0
316
+                    padding: 0 0 $ms--2
317
+                    min-height: auto
317
 
318
 
318
         breadcrumb
319
         breadcrumb
319
             h5
320
             h5
332
         
333
         
333
 @media (min-width: $medium)
334
 @media (min-width: $medium)
334
     .page--single
335
     .page--single
335
-        article
336
+        > article
336
             margin: 0 0.65em 0 0
337
             margin: 0 0.65em 0 0
337
         &.f-col
338
         &.f-col
338
             flex-direction: row
339
             flex-direction: row

Loading…
İptal
Kaydet