Przeglądaj źródła

Merge branch '164-blog' of craft-in-america/vue-wp into dev

tags/1.0.0^2
maeda 3 lat temu
rodzic
commit
65beab52a2

+ 1
- 1
plugins/cia-post-types/includes/custom-taxonomies.php Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 <?php
2 2
     function create_materials_taxonomy() {
3 3
         $post_types_that_show_materials = [
4
-            'artist', 'guide', 'short',
4
+            'artist', 'exhibition', 'event', 'guide', 'short',
5 5
             'object', 'publication', 'technique'
6 6
         ];
7 7
         register_taxonomy('material', $post_types_that_show_materials, ['label' => 'Materials']);

+ 1
- 1
plugins/cia-post-types/includes/p2p-mappings.php Wyświetl plik

@@ -25,7 +25,7 @@ function register_all_one_offs() {
25 25
     register_connections_for('short', ['short', 'exhibition', 'event', 'object', 'guide', 'post', 'technique', 'publication']);
26 26
     register_connections_for('technique', ['technique', 'post', 'publication']);
27 27
     register_connections_for('guide', ['technique', 'exhibition', 'post', 'publication']);
28
-    register_connections_for('exhibition', ['technique', 'publication']);
28
+    register_connections_for('exhibition', ['exhibition','technique', 'publication']);
29 29
     register_connections_for('event', ['event', 'object', 'post', 'guide', 'technique', 'publication']);
30 30
     register_connections_for('episode', ['episode', 'object', 'guide', 'technique', 'publication']);
31 31
     register_connections_for('post', ['post']);

+ 20
- 4
vue-theme/editor-style.css Wyświetl plik

@@ -41,7 +41,7 @@ a {
41 41
     /* leave underline to show links when editing */
42 42
     /* text-decoration: none; */
43 43
 }
44
-a &:hover {
44
+a:hover {
45 45
     cursor: pointer;
46 46
     color: black;
47 47
 }
@@ -97,17 +97,33 @@ ol {
97 97
 }
98 98
 
99 99
 /* separator types */
100
+.editor-styles-wrapper, .wp-block-separator {
101
+    border: none;
102
+    /* height: 0.8em; */
103
+    text-align: center
104
+}
105
+
100 106
 hr .wp-block-separator, .is-style-default {
101
-    height: 1px;
102 107
     width: 15vw;
108
+    border-top: 3px solid !important;
109
+    border-bottom: 0 !important;
103 110
 }
104 111
 
112
+
105 113
 hr .wp-block-separator, .is-style-wide {
106
-    height: 3px;
107 114
     width: 50vw;
115
+    border-top: 3px solid;
116
+    border-bottom: 0;
108 117
 }
109 118
 
110 119
 hr .wp-block-separator, .is-style-dots:before {
111 120
     letter-spacing: 4em;
112 121
     padding-left: 4em;
113
-}
122
+}
123
+    
124
+.wp-block-image figcaption {
125
+    position: inherit !important;
126
+    background: none !important;
127
+    color: black !important;
128
+}
129
+

+ 29
- 3
vue-theme/functions.php Wyświetl plik

@@ -220,8 +220,8 @@ add_filter( 'manage_artist_posts_columns', 'set_custom_edit_artist_columns' );
220 220
 function set_custom_edit_artist_columns($columns) {
221 221
     $date = $columns['date'];
222 222
     unset( $columns['date'] );
223
-    $columns['artist_type'] = __('Artist Type', 'my-text-domain' );
224
-    $columns['material'] = __('Material', 'my-text-xx' );
223
+    $columns['artist_type'] = __('Artist Type' );
224
+    $columns['material'] = __('Material' );
225 225
     $columns['date'] = $date;
226 226
     return $columns;
227 227
 }
@@ -247,7 +247,8 @@ add_filter( 'manage_event_posts_columns', 'set_custom_edit_event_columns' );
247 247
 function set_custom_edit_event_columns($columns) {
248 248
     $date = $columns['date'];
249 249
     unset( $columns['date'] );
250
-    $columns['event_type'] = __('Event Type');
250
+    $columns['event_type'] = __('Event Type' );
251
+    $columns['material'] = __('Material' );
251 252
     $columns['date'] = $date;
252 253
     return $columns;
253 254
 }
@@ -259,6 +260,31 @@ function custom_event_column( $column, $post_id ) {
259 260
             $terms = get_the_term_list( $post_id , 'event_type' , '' , ', ' , '' );
260 261
             echo is_string( $terms ) ? $terms : '—';
261 262
             break;
263
+            // display a list of material terms assigned to the post 
264
+        case 'material' :
265
+            $terms = get_the_term_list( $post_id , 'material' , '' , ', ' , '' );
266
+            echo is_string( $terms ) ? $terms : '—';
267
+            break;
268
+    }
269
+}
270
+
271
+// Add the custom columns for EXHIBITION:
272
+add_filter( 'manage_exhibition_posts_columns', 'set_custom_edit_exhibition_columns' );
273
+function set_custom_edit_exhibition_columns($columns) {
274
+    $date = $columns['date'];
275
+    unset( $columns['date'] );
276
+    $columns['material'] = __('Material');
277
+    $columns['date'] = $date;
278
+    return $columns;
279
+}
280
+// Add the data to the custom columns for EXHIBITION:
281
+add_action( 'manage_exhibition_posts_custom_column' , 'custom_exhibition_column', 10, 2 );
282
+function custom_exhibition_column( $column, $post_id ) {
283
+    switch ( $column ) {
284
+        case 'material' :
285
+            $terms = get_the_term_list( $post_id , 'material' , '' , ', ' , '' );
286
+            echo is_string( $terms ) ? $terms : '—';
287
+            break;
262 288
     }
263 289
 }
264 290
 

+ 1
- 1
vue-theme/src/components/card.vue Wyświetl plik

@@ -81,7 +81,7 @@ export default {
81 81
         padding: $ms--3
82 82
         margin: 0
83 83
     h1
84
-        font-size: $ms-0
84
+        font-size: $ms-1
85 85
         padding: 0
86 86
         line-height: initial
87 87
         display: -webkit-box

+ 34
- 26
vue-theme/src/components/footer.vue Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 <template lang="pug">
2 2
 .footer-wrapper.t-up.t-sans
3 3
     footer.main.w-max.f-row.between
4
-        ul.f-col.start
4
+        ul.f-col
5 5
             //- address contact   
6 6
             li
7 7
                 h4 Craft in America
@@ -50,10 +50,10 @@
50 50
                     a(href="https://visitor.r20.constantcontact.com/d.jsp?llr=fyb4y9cab&p=oi&m=fyb4y9cab&sit=olvymhdeb&f=ee3616e1-10de-4a59-b451-1a882111b1f5", target="_blank") Join email list
51 51
                             
52 52
         //- menu links
53
-        ul.f-col.start
53
+        ul.f-col
54 54
             li
55 55
                 h5 
56
-                router-link(to="/episode") PBS Series
56
+                    router-link(to="/episode") PBS Series
57 57
                 ul.f-col.start 
58 58
                     li 
59 59
                         router-link(to="/episode") &nbsp; Episodes
@@ -64,16 +64,16 @@
64 64
             li 
65 65
                 h5
66 66
                     router-link(to="/artist") Artists
67
-                    ul.f-col.start
68
-                        li
69
-                            router-link(to="/artist/sorted/by-alpha") &nbsp; A-Z
70
-                        li
71
-                            router-link(to="/artist/sorted/by-material") &nbsp; by Material
67
+                ul.f-col
68
+                    li
69
+                        router-link(to="/artist/sorted/by-alpha") &nbsp; A-Z
70
+                    li
71
+                        router-link(to="/artist/sorted/by-material") &nbsp; by Material
72 72
 
73 73
             li
74 74
                 h5 
75
-                router-link(to="/exhibition") Exhibitions
76
-                ul.f-col.start
75
+                    router-link(to="/exhibition") Exhibitions
76
+                ul.f-col
77 77
                     li
78 78
                         router-link(to="/exhibition/sorted/by-current-and-upcoming") &nbsp; Current/Upcoming
79 79
                     li
@@ -81,34 +81,38 @@
81 81
 
82 82
             li
83 83
                 h5
84
-                router-link(to="/event") Center 
85
-                ul.f-col.start
84
+                    router-link(to="/page/center") Center 
85
+                ul.f-col
86
+                    li
87
+                        router-link(to="/page/center") &nbsp; Info
86 88
                     li
87 89
                         router-link(to="/exhibition") &nbsp; Exhibitions
88 90
                     li 
89 91
                         router-link(to="/event/sorted/by-current-and-upcoming") &nbsp; Events 
90 92
                     li
91
-                        router-link(to="/event/sorted/by-type&talks") &nbsp; Talks &amp; Interviews
93
+                        router-link(to="/event?type=talks") &nbsp; Talks &amp; Interviews
92 94
             li
93 95
                 h5
94
-                router-link(to="") Education 
95
-                ul.f-col.start
96
+                    router-link(to="") Education 
97
+                ul.f-col
96 98
                     li
97 99
                         router-link(to="/guide") &nbsp; Guides 
98 100
                     li 
99 101
                         router-link(to="/publication") &nbsp; Publications 
102
+                    li 
103
+                        router-link(to="/page/library") &nbsp; Library 
100 104
 
101 105
 
102 106
             li
103 107
                 h5
104
-                router-link(to="") News
105
-                ul.f-col.start
108
+                    router-link(to="") News
109
+                ul.f-col
106 110
                     li
107 111
                         router-link(to="/blog") &nbsp; Blog Posts  
108 112
                     li 
109
-                        router-link(to="/blog/sorted/by-type&releases") &nbsp; Press Releases 
113
+                        router-link(to="/posts?type=releases") &nbsp; Press Releases 
110 114
                     li 
111
-                        router-link(to="/blog/sorted/by-type&articles") &nbsp; In the News 
115
+                        router-link(to="/posts?type=articles") &nbsp; In the News 
112 116
 
113 117
     .sub-footer.f-col.start
114 118
         h6 Craft in America &copy; 2010&ndash;{{ today }} 
@@ -138,6 +142,8 @@ export default {
138 142
     footer.main
139 143
         display: flex
140 144
         flex-wrap: wrap
145
+        align-items: flex-start 
146
+
141 147
         min-width: $min-width
142 148
         /* background-color: $cia_red */
143 149
         // ALL <ul> tags
@@ -148,15 +154,17 @@ export default {
148 154
                 width: 100%
149 155
         // OUTER <ul> tags
150 156
         > ul
151
-            padding: 0 $ms-0
157
+            padding: $ms-0
152 158
             &:nth-child(n+2)
153
-                padding: 0 $ms-0 $ms-3 $ms-0
159
+                /* padding: 0 $ms-0 $ms-3 $ms-0 */
154 160
             > li
155 161
                 color: $cia_white
156
-                padding: $ms-0 0 0
157
-                h5
158
-                    color: $cia_white
159
-                    margin: $ms-0 0 $ms--1
162
+                padding: 0 0 $ms--6
163
+                h4
164
+                    margin: $ms-0 0 $ms--3
165
+                h5 
166
+                    /* margin: $ms-0 0 $ms--1 */
167
+                    margin: $ms-0 0 0
160 168
                 a, a:link, a:visited
161 169
                     color: $cia_white
162 170
                     text-decoration: none
@@ -208,7 +216,7 @@ export default {
208 216
             /* background-color: rebeccapurple */
209 217
             background-color: $cia_red
210 218
             &:nth-child(n+2)
211
-                margin: 0 0 $ms-2 0
219
+                /* margin: 0 0 $ms-2 0 */
212 220
                 > li
213 221
                     width: 43%
214 222
     /* 1200px */

+ 1
- 1
vue-theme/src/components/navigation/navigation.vue Wyświetl plik

@@ -51,7 +51,7 @@ nav.main.w-max
51 51
                     li
52 52
                         router-link(to="/event/sorted/by-current-and-upcoming") Events Current/Upcoming
53 53
                     li
54
-                        router-link(to="/event/sorted/by-type") Talks & Interviews
54
+                        router-link(to="/event?type=talks") Talks & Interviews
55 55
                     li
56 56
                         router-link(to="/page/library") Library
57 57
             li.f-grow

+ 57
- 19
vue-theme/src/components/sidebars/sidebar.vue Wyświetl plik

@@ -5,15 +5,28 @@ aside.sidebar
5 5
         .shadow(v-if="shouldShowListSort.includes(type) && layout !== 'single'")
6 6
             h3.t-up sort {{ type }}
7 7
             ul.t-up
8
+                li 
9
+                    //- ?type=articles //
10
+                    router-link(v-if="type === 'post' " :to="`/${type}?type=articles`")
11
+                        p in the news
12
+                li 
13
+                    //- ?type=releases //
14
+                    router-link(v-if="type === 'post' " :to="`/${type}?type=releases`")
15
+                        p press releases 
16
+                li 
17
+                    //- ?type=talks //
18
+                    router-link(v-if="type === 'event' " :to="`/${type}?type=talks`")
19
+                        p talks 
20
+                    //- by type //
8 21
                 li(v-for="option in sortOptions")
9 22
                     router-link(:to="`/${type}/sorted/${sortTypes[option]}`")
10 23
                         p {{ option }}
11 24
                 li
12
-                    router-link(:to="`/${type}`")
13
-                        p by all
14
-                li
15
-                    router-link(v-if="shouldShowDateSort.includes(type) && layout !== 'single'" :to="`/${type}/sorted/by-current-and-upcoming`")
25
+                    router-link(v-if="shouldShowDateSort.includes(type) " :to="`/${type}/sorted/by-current-and-upcoming`")
16 26
                         p by current and upcoming
27
+                li
28
+                    router-link(:to="`/${type}/sorted/by-date`")
29
+                        p by all
17 30
         
18 31
         //- if {{type}} has sorted by-material show material options
19 32
         .shadow(v-if="shouldShowMaterialSort.includes(type) && layout !== 'single'")
@@ -28,10 +41,10 @@ aside.sidebar
28 41
         .shadow(v-if="['artist'].includes(type) && layout !== 'single'")
29 42
             h3.t-up {{ type }} alpha 
30 43
             ul.t-up
31
-                li
44
+                li.f-row.start.wrap
32 45
                     template(v-for="charaSet in charaSets") 
33 46
                         router-link(:to="`/${type}/sorted/by-alpha#${charaSet[0]}`")
34
-                            p {{ charaSet }}
47
+                            p.alpha {{ charaSet }}
35 48
 
36 49
         //- p2p types and related posts
37 50
         .shadow(v-if="layout === 'single' && Object.keys(related).length" v-for="p2pPostType in Object.keys(related)")
@@ -85,15 +98,20 @@ export default {
85 98
     data() {
86 99
         return {
87 100
             sortTypes: {
88
-                alphabetized: `${sortTypes.alpha}`,       //:0
89
-                'by material': `${sortTypes.material}`,   //:1
90
-                'by artist': `${sortTypes.artist}`,       //:2
91
-                'by episode': `${sortTypes.episode}`,     //:3
101
+                alphabetized: `${sortTypes.alpha}`,     //:0
102
+                'by material': `${sortTypes.material}`, //:1
103
+                'by artist': `${sortTypes.artist}`,     //:2
104
+                'by episode': `${sortTypes.episode}`,   //:3
105
+                'by type': `${sortTypes.subtype}`,      //:4
106
+                // 'by articles': `articles`,              //:5
107
+                subtype: 'by-type',
92 108
             },
93 109
             charaSets: [
94
-                '0 a b', 'c d e', 'f g h',
95
-                'i j k', 'l m n', 'o p q',
96
-                'r s t', 'u v w', 'x y z'
110
+                // '0 a b', 'c d e', 'f g h',
111
+                // 'i j k', 'l m n', 'o p q',
112
+                // 'r s t', 'u v w', 'x y z'
113
+                '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 
114
+                'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
97 115
             ],
98 116
             materials: materials,
99 117
             shouldShowListSort: [
@@ -102,7 +120,7 @@ export default {
102 120
                 'publication', 'technique', 'post'
103 121
             ],
104 122
             shouldShowMaterialSort: [
105
-                'artist', 
123
+                'artist', 'exhibition', 'event',
106 124
                 'short', 'guide', 'object',
107 125
                 'technique',
108 126
             ],
@@ -114,7 +132,7 @@ export default {
114 132
             ],
115 133
             shouldShowTypeSort: [
116 134
                 'short', 'guide', 'object',
117
-                'publication', 'technique', 'post'
135
+                'publication', 'technique', 'post', 'event'
118 136
             ]
119 137
         }
120 138
     },
@@ -127,12 +145,28 @@ export default {
127 145
                         Object.keys(this.sortTypes)[0],
128 146
                         Object.keys(this.sortTypes)[3],
129 147
                         Object.keys(this.sortTypes)[1],
130
-                        `by ${this.type} type`,
148
+                        Object.keys(this.sortTypes)[4],
149
+                        // `by ${this.type} type`,
150
+                    ]
151
+                    break
152
+                case 'exhibition':
153
+                    opts = [
154
+                        // Object.keys(this.sortTypes)[4],
155
+                        // Object.keys(this.sortTypes)[1],
156
+                    ]
157
+                    break
158
+                case 'event':
159
+                    opts = [
160
+                        // Object.keys(this.sortTypes)[4],
161
+                        // Object.keys(this.sortTypes)[1],
131 162
                     ]
132 163
                     break
133 164
                 case 'post':
134 165
                     opts = [
135
-                        `by ${this.type} type`,
166
+                        Object.keys(this.sortTypes)[4],
167
+                        // `by ${this.type} type`,
168
+                        // Object.keys(this.sortTypes)[5],
169
+                        // `by articles`
136 170
                     ]
137 171
                     break
138 172
                 case 'short':
@@ -176,7 +210,7 @@ export default {
176 210
 @import '../../sss/theme.sss'
177 211
 aside.sidebar
178 212
     /* need to solve for mobile as the sticky creates scroll issues */
179
-    /* position: sticky */
213
+    position: sticky
180 214
     top: 40px
181 215
     width: 100%
182 216
     p, h3
@@ -196,9 +230,13 @@ aside.sidebar
196 230
         flex-direction: column
197 231
         flex-wrap: wrap 
198 232
         li
199
-            padding: 0 0 $ms-0 0
233
+            /* padding: 0 0 $ms-0 0 */
200 234
             img
201 235
                 display: none
236
+                padding: $ms-0 0 $ms--4 0
237
+            p.alpha 
238
+                padding: 0 $ms--4
239
+
202 240
     .shadow
203 241
         background-color: white
204 242
 

+ 11
- 3
vue-theme/src/pages/single.vue Wyświetl plik

@@ -248,7 +248,7 @@ export default {
248 248
         background-color: white
249 249
         padding: $ms-0
250 250
         h1
251
-            color: $cia_black
251
+            /* color: $cia_black */
252 252
             margin: 0 0 $ms--3 0
253 253
         > ul
254 254
             /* grid-gap: $ms-0 */
@@ -270,6 +270,16 @@ export default {
270 270
                 position: absolute
271 271
                 top: 100%
272 272
 
273
+        .wp-block-gallery
274
+            margin: 0 0 0.5em 0
275
+            grid-gap: $ms--5
276
+            
277
+            > .wp-block-image     
278
+                figcaption
279
+                    position: inherit
280
+                    background: none
281
+                    color: $cia_black
282
+
273 283
         /* iframe container 16:9 */
274 284
         [class^="iframe-container"]
275 285
             position: relative
@@ -291,10 +301,8 @@ export default {
291 301
             margin: $ms-2 auto
292 302
             &.is-style
293 303
                 &-default
294
-                    height: 1px
295 304
                     width: 15vw
296 305
                 &-wide
297
-                    height: 3px
298 306
                     width: 50vw
299 307
                 &-dots::before
300 308
                     outline-style: none

+ 2
- 2
vue-theme/src/sss/_typography.sss Wyświetl plik

@@ -27,11 +27,11 @@
27 27
         font-family: $mono
28 28
 
29 29
 a
30
-    /* text-decoration: none,  leave for now to show links underlined */
30
+    text-decoration: none  // comment out to show underline
31 31
     &:hover
32 32
         cursor: pointer
33 33
 
34
-h1, h2, h3, h4, h5, h6 /* common */
34
+h1, h2, h3, h4, h5, h6 //common attributes
35 35
     /* font-weight: 400 */
36 36
     display: block
37 37
     margin-left: 0

+ 20
- 21
vue-theme/src/sss/variables.sss Wyświetl plik

@@ -15,27 +15,26 @@ $base: 0.95em
15 15
 $max-card-img-height: 420px
16 16
 $card-line-clamp: 3
17 17
 
18
-$ratio: $minor-third
19
-/* $ratio = 1.2 from _ratios.sss */
20
-
21
-$ms-0: calc($base)
22
-$ms--1: calc($ms-0 / $ratio)
23
-$ms--2: calc($ms--1 / $ratio)
24
-$ms--3: calc($ms--2 / $ratio)
25
-$ms--4: calc($ms--3 / $ratio)
26
-$ms--5: calc($ms--4 / $ratio)
27
-$ms--6: calc($ms--5 / $ratio)
28
-$ms--7: calc($ms--6 / $ratio)
29
-
30
-$ms-1: calc($ms-0 * $ratio)
31
-$ms-2: calc($ms-1 * $ratio)
32
-$ms-3: calc($ms-2 * $ratio)
33
-$ms-4: calc($ms-3 * $ratio)
34
-$ms-5: calc($ms-4 * $ratio)
35
-$ms-6: calc($ms-5 * $ratio)
36
-$ms-7: calc($ms-6 * $ratio)
37
-$ms-8: calc($ms-7 * $ratio)
38
-$ms-9: calc($ms-8 * $ratio)
18
+$ratio: $minor-third // $ratio = 1.2 from _ratios.sss
19
+
20
+$ms-0: calc($base) // 0.95em
21
+$ms--1: calc($ms-0 / $ratio) // 0.79
22
+$ms--2: calc($ms--1 / $ratio) // 0.66
23
+$ms--3: calc($ms--2 / $ratio) // 0.55
24
+$ms--4: calc($ms--3 / $ratio) // 0.45
25
+$ms--5: calc($ms--4 / $ratio) // 0.38
26
+$ms--6: calc($ms--5 / $ratio) // 0.31
27
+$ms--7: calc($ms--6 / $ratio) // 0.27
28
+
29
+$ms-1: calc($ms-0 * $ratio) // 1.14
30
+$ms-2: calc($ms-1 * $ratio) // 1.368
31
+$ms-3: calc($ms-2 * $ratio) // 1.6416
32
+$ms-4: calc($ms-3 * $ratio) // 1.9699
33
+$ms-5: calc($ms-4 * $ratio) // 2.3639
34
+$ms-6: calc($ms-5 * $ratio) // 2.8366
35
+$ms-7: calc($ms-6 * $ratio) // 3.4040
36
+$ms-8: calc($ms-7 * $ratio) // 4.0848
37
+$ms-9: calc($ms-8 * $ratio) // 4.9018
39 38
 
40 39
 /* Fonts */
41 40
 $sans: 'Questrial', sans-serif

+ 1
- 1
vue-theme/src/utils/helpers.js Wyświetl plik

@@ -7,7 +7,7 @@ const materials = ['clay', 'fiber', 'glass', 'metal', 'paper', 'wood']
7 7
 
8 8
 const sortTypes = {
9 9
     alpha: 'by-alpha',
10
-u    material: 'by-material',
10
+    material: 'by-material',
11 11
     artist: 'by-artist',
12 12
     episode: 'by-episode',
13 13
     upcoming: 'by-upcoming',

Ładowanie…
Anuluj
Zapisz