Ver código fonte

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

tags/0.9.0
J 4 anos atrás
pai
commit
3f7a1de8f1

+ 0
- 2
vue-theme/src/pages/index.vue Ver arquivo

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

+ 3
- 4
vue-theme/src/pages/list.vue Ver arquivo

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

+ 10
- 9
vue-theme/src/pages/single.vue Ver arquivo

@@ -200,13 +200,13 @@ export default {
200 200
             )[0]
201 201
 
202 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 211
             if (!singlePostData) return console.error('could not get single post data...')
212 212
             
@@ -313,7 +313,8 @@ export default {
313 313
             ul li
314 314
                 margin: 0 0 $ms-0 0
315 315
                 .card
316
-                    padding: 0
316
+                    padding: 0 0 $ms--2
317
+                    min-height: auto
317 318
 
318 319
         breadcrumb
319 320
             h5
@@ -332,7 +333,7 @@ export default {
332 333
         
333 334
 @media (min-width: $medium)
334 335
     .page--single
335
-        article
336
+        > article
336 337
             margin: 0 0.65em 0 0
337 338
         &.f-col
338 339
             flex-direction: row

Carregando…
Cancelar
Salvar