Bläddra i källkod

Merge branch 'master' of ssh://gitea.yvvas.com:4022/craft-in-america/vue-wp

tags/0.9.0
J 4 år sedan
förälder
incheckning
e4eb0ec8f2

+ 1
- 1
vue-theme/src/components/breadcrumb.vue Visa fil

@@ -1,7 +1,7 @@
1 1
 <template lang="pug">
2 2
 //- breadcrumb links at top of page, needs link routing
3 3
 nav.breadcrumb.f-row.start.t-up
4
-    router-link(v-if="['event','exhibition'].includes(type)" :to="`/${type}/sorted/by-date`")
4
+    router-link(v-if="['event','exhibition'].includes(type)" :to="`/${type}/sorted/by-current-and-upcoming`")
5 5
         h5.t-up {{ type }}
6 6
     router-link(v-else :to="`/${type}`")
7 7
         h5.t-up {{ type }}

+ 3
- 3
vue-theme/src/components/card.vue Visa fil

@@ -1,10 +1,10 @@
1 1
 <template lang="pug">
2 2
 .card(v-if="content")
3 3
     header
4
-        router-link(v-if="!hideType && ['event','exhibition'].includes(type)" :to="`/${type}/by-current-and-upcoming`")
5
-            p.t-up {{type}}
4
+        router-link(v-if="!hideType && ['event','exhibition'].includes(type)" :to="`/${type}/sorted/by-current-and-upcoming`")
5
+            h4.t-up {{type}}
6 6
         router-link(v-else-if="!hideType" :to="`/${type}`")
7
-            p.t-up {{type}}
7
+            h4.t-up {{type}}
8 8
 
9 9
     article.card--info(:class="{ 'wide': wide }")
10 10
         router-link(:to="`/${type}/${content.slug}`")

+ 12
- 5
vue-theme/src/components/hero.vue Visa fil

@@ -55,14 +55,14 @@ export default {
55 55
     },
56 56
     methods: {
57 57
         onResize() {
58
-            this.heroHeight = this.$el.offsetWidth / 2.1
58
+            this.heroHeight = this.$el.offsetWidth / 1.8
59 59
         },
60 60
         getThumbnailFromYt(url) {
61 61
             return ytThumbnail(url, 'max')
62 62
         },
63 63
     },
64 64
     mounted() {
65
-        this.heroHeight = this.$el.offsetWidth / 2.1
65
+        this.heroHeight = this.$el.offsetWidth / 1.8
66 66
         this.$nextTick(() => {
67 67
             window.addEventListener('resize', this.onResize)
68 68
         })
@@ -92,7 +92,8 @@ export default {
92 92
 
93 93
 .hero
94 94
     /* background-color: rebeccapurple */
95
-    min-height: 25vh
95
+    /* min-height: 25vh */
96
+    min-height: 54vw
96 97
     position: relative
97 98
     overflow: hidden
98 99
     justify-content: flex-start !important
@@ -124,12 +125,17 @@ export default {
124 125
                 color: $cia_white
125 126
                 text-shadow: 1px 1px $cia_black
126 127
                 max-width: 70vw
128
+            a 
129
+                color: inherit 
130
+                text-decoration: none
131
+
127 132
     &--video
128 133
         width: 100vw
129 134
         height: 100%
130 135
 
131 136
     .embedded
132
-        min-height: 25vh
137
+        /* min-height: 25vh */
138
+        min-height: 54vw
133 139
         height: 100%
134 140
         position: relative
135 141
         z-index: 10002
@@ -171,7 +177,8 @@ export default {
171 177
     .hero
172 178
         /* min-height: 50vh */
173 179
         .embedded
174
-            min-height: 50vh
180
+            /* min-height: 50vh */
181
+            min-height: 54vw
175 182
         &--image
176 183
             &--overlay
177 184
                 h2

+ 1
- 1
vue-theme/src/components/sidebars/sidebar.vue Visa fil

@@ -166,7 +166,7 @@ aside.sidebar
166 166
         flex-direction: column
167 167
         flex-wrap: wrap 
168 168
         li
169
-            padding: 0 $ms-0 0 0
169
+            padding: 0 0 $ms-0 0
170 170
             img
171 171
                 width: 100%
172 172
     .shadow

+ 15
- 3
vue-theme/src/pages/index.vue Visa fil

@@ -43,9 +43,9 @@ export default {
43 43
     components: { card },
44 44
     data() {
45 45
         return {
46
-            firstRow: ['episode', 'exhibition', 'event', 'artist', 'post'],
46
+            firstRow: ['episode', 'exhibition', 'event', 'short', 'post'],
47 47
             secondRow: 'artist', // This is only ONE post
48
-            thirdRow: ['episode', 'exhibition', 'event', 'artist', 'post'],
48
+            thirdRow: ['object', 'short', 'publication', 'post', 'guide'],
49 49
         }
50 50
     },
51 51
     async created() {
@@ -83,7 +83,7 @@ export default {
83 83
             await this.$store.dispatch('getAllPages', { sortType: null, params: null })
84 84
         }
85 85
         await this.checkAndSetHero('welcome')
86
-        await this.$store.dispatch('getRandomPosts', ['episode', 'exhibition', 'event', 'artist', 'post'])
86
+        await this.$store.dispatch('getRandomPosts', ['artist', 'guide', 'object', 'short', 'publication', 'post'])
87 87
     },
88 88
     methods: {
89 89
         firstPostOfType(type) {
@@ -173,6 +173,18 @@ export default {
173 173
                             grid-row-start: 2
174 174
                         &:nth-of-type(5)
175 175
                             grid-column-start: 3
176
+                    &.flipped
177
+                        grid-template-columns: 
178
+                            24.25% 24.25% 49.5% 
179
+                        li
180
+                            &:nth-of-type(1)
181
+                                grid-row-end: 2
182
+                            &:nth-of-type(3)
183
+                                grid-column-start: 1
184
+                                grid-row-start: 2
185
+                            &:nth-of-type(5)
186
+                                grid-row-start: 1
187
+                                grid-row-end: 3
176 188
                 &.max
177 189
                     li .featured-or-hero-image img
178 190
                         max-height: $max-card-img-height

+ 13
- 4
vue-theme/src/pages/list.vue Visa fil

@@ -4,9 +4,9 @@
4 4
 
5 5
         header.center.t-up
6 6
             .title.f-row
7
-                h3 {{ type }} list
7
+                h3 {{ type }}s&nbsp;
8 8
                 span(v-if="sortBy")
9
-                    h3 &nbsp;sorted {{ sortBy.replace('-', ' ') }}
9
+                    h3 {{ sortBy.replace('-', ' ') }}
10 10
 
11 11
             h3(v-if="!loaded") loading...
12 12
             .content(
@@ -37,8 +37,8 @@ import { postTypes, sortTypes, convertTitleCase } from '@/utils/helpers'
37 37
 
38 38
 const TIMEOUT = 1
39 39
 const INTERSECT_SELECTOR = '.page--list > article footer'
40
-const wideTypes = ['event', 'exhibition']
41
-const gridTypes = ['episode', 'artist']
40
+const wideTypes = ['event', 'exhibition', 'guide', 'post', 'publication']
41
+const gridTypes = ['episode', 'artist', 'object', 'short']
42 42
 const sansSidebarTypes = ['episode']
43 43
 
44 44
 export default {
@@ -223,6 +223,10 @@ export default {
223 223
             > .content
224 224
                 padding: 0
225 225
                 width: 100%
226
+            .title.f-row
227
+                /* flex-direction: column  */
228
+                justify-content: flex-start
229
+
226 230
         > footer
227 231
             padding: $ms-0
228 232
 
@@ -260,6 +264,11 @@ export default {
260 264
             flex-direction: row !important
261 265
         > article
262 266
             margin: 0 $ms--2 0 0
267
+            header 
268
+                .title.f-row
269
+                    flex-direction: row 
270
+                    justify-content: center
271
+
263 272
             .posts.is-grid
264 273
                 grid-template-columns: repeat(3, 1fr)
265 274
                 .post.inbetween

+ 2
- 1
vue-theme/src/pages/single.vue Visa fil

@@ -258,7 +258,8 @@ export default {
258 258
         .wp-block-embed, .is-type-video
259 259
             position: relative
260 260
             width: 100% 
261
-            padding-bottom: 56.25% 
261
+            padding-bottom: 56.25%
262
+            margin-bottom: $ms-7 
262 263
             &__wrapper
263 264
                 display: contents
264 265
             /* TBD if kept- edit ot test */

+ 1
- 1
vue-theme/src/sss/_typography.sss Visa fil

@@ -57,7 +57,7 @@ h3
57 57
 h4
58 58
     font-size: $ms-1
59 59
     /* margin-top: 1.33em */
60
-    margin-bottom: $ms-1
60
+    margin-bottom: $ms--3
61 61
 h5
62 62
     font-size: $ms-0
63 63
     /* margin-top: 1.6em */

Laddar…
Avbryt
Spara