Просмотр исходного кода

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

tags/0.9.0
J 4 лет назад
Родитель
Сommit
c1d9e7c422

+ 1
- 1
plugins/cia-endpoints/includes/formats.php Просмотреть файл

@@ -43,7 +43,7 @@ function default_post_format( $item, $include_content ) {
43 43
     $filtered[hero] = get_post_meta( $item->ID, 'hero_header', true );
44 44
 
45 45
     // Materials + type endpoints
46
-    $posts_with_type = ['artist', 'exhibition', 'event'];
46
+    $posts_with_type = ['artist', 'exhibition', 'event', 'short', 'guide', 'object', 'publication', 'technique' ];
47 47
     if( in_array($item->post_type, $posts_with_type) ) {
48 48
         $filtered[materials] = make_taxonomy_endpoint_for(get_the_terms( $item, 'material'));
49 49
         $filtered[subtypes] = make_taxonomy_endpoint_for(get_the_terms( $item, $item->post_type . '_type' ));

+ 2
- 2
vue-theme/src/components/card.vue Просмотреть файл

@@ -22,8 +22,8 @@
22 22
                 h1.t-up.t-cntr.t-b {{ content.title }}
23 23
 
24 24
             p(v-if="content.end && type == 'event'" class="datetime") {{ dateFrom(content.start, type=='event') }} – {{ dateFrom(content.end, type=='event').split(',')[1] }}
25
-            p(v-if="content.date && type == 'post'" class="datetime") {{ dateFrom((new Date(content.date).getTime()/1000), type=='post') }}
26
-            p(v-else-if="content.end" class="datetime") {{ dateFrom(content.start, type=='event') }} – {{ dateFrom(content.end, type=='event') }}
25
+            p(v-if="content.date && type == 'post'" class="datetime") {{ dateFrom((new Date(content.date).getTime()/1000), type=='post').split(',')[0] }}
26
+            p(v-else-if="content.end && type == 'exhibition'" class="datetime") {{ dateFrom(content.start) }} – {{ dateFrom(content.end) }}
27 27
             p(v-html="content.excerpt").excerpt
28 28
 
29 29
             router-link(v-if="type == 'post'" :to="`/blog/${content.slug}`")

+ 71
- 37
vue-theme/src/components/footer.vue Просмотреть файл

@@ -1,8 +1,8 @@
1 1
 <template lang="pug">
2 2
 .footer-wrapper.t-up.t-sans
3 3
     footer.main.w-max
4
-        //- address contact
5 4
         ul.f-col.start
5
+            //- address contact   
6 6
             li
7 7
                 h4 Craft in America
8 8
                 ul
@@ -13,29 +13,38 @@
13 13
                     li (323) 951-0610 center
14 14
                     li
15 15
                         router-link(to="mailto:info@craftinamerica.org") info@craftinamerica.org
16
+            //- social media   
16 17
             li
17 18
                 h4 Connect with Us
18 19
                 ul.f-row
19 20
                     li
20
-                        h3.t-cntr
21
-                            a(href="https://www.facebook.com/CraftinAmerica") FB<br>
22
-                                img(src="../star.svg")
21
+                        h3 
22
+                            a(href="https://www.facebook.com/CraftinAmerica")
23
+                                //- img(src="../assets/facebook-brands.svg")
23 24
                                 //- replace with respective icon 
25
+                                svg(aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512")
26
+                                    path(fill="currentColor" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z")
24 27
                     li
25
-                        h3.t-cntr
26
-                            a(href="http://www.youtube.com/user/craftinamerica") YT<br>
27
-                                img(src="../star.svg")
28
+                        h3 
29
+                            a(href="http://www.youtube.com/user/craftinamerica")
30
+                                //- img(src="../star.svg")
28 31
                                 //- replace with respective icon 
32
+                                svg(aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512")
33
+                                    path(fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z")
29 34
                     li
30
-                        h3.t-cntr
31
-                            a(href="http://www.instagram.com/craftinamerica") IG<br>
32
-                                img(src="../star.svg")
35
+                        h3 
36
+                            a(href="http://www.instagram.com/craftinamerica")
37
+                                //- img(src="../star.svg")
33 38
                                 //- replace with respective icon 
39
+                                svg(aria-hidden="true" focusable="false" data-prefix="fab" data-icon="instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512")
40
+                                    path(fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z")
34 41
                     li
35
-                        h3.t-cntr
36
-                            a(href="https://twitter.com/CraftinAmerica") TT<br>
37
-                                img(src="../star.svg")
42
+                        h3 
43
+                            a(href="https://twitter.com/CraftinAmerica")
44
+                                //- img(src="../star.svg")
38 45
                                 //- replace with respective icon                 
46
+                                svg(aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400")
47
+                                    path(fill="currentColor" d="M400,200c0,110.5-89.5,200-200,200S0,310.5,0,200S89.5,0,200,0S400,89.5,400,200z M163.4,305.5 c88.7,0,137.2-73.5,137.2-137.2c0-2.1,0-4.2-0.1-6.2c9.4-6.8,17.6-15.3,24.1-25c-8.6,3.8-17.9,6.4-27.7,7.6 c10-6,17.6-15.4,21.2-26.7c-9.3,5.5-19.6,9.5-30.6,11.7c-8.8-9.4-21.3-15.2-35.2-15.2c-26.6,0-48.2,21.6-48.2,48.2 c0,3.8,0.4,7.5,1.3,11c-40.1-2-75.6-21.2-99.4-50.4c-4.1,7.1-6.5,15.4-6.5,24.2c0,16.7,8.5,31.5,21.5,40.1c-7.9-0.2-15.3-2.4-21.8-6 c0,0.2,0,0.4,0,0.6c0,23.4,16.6,42.8,38.7,47.3c-4,1.1-8.3,1.7-12.7,1.7c-3.1,0-6.1-0.3-9.1-0.9c6.1,19.2,23.9,33.1,45,33.5 c-16.5,12.9-37.3,20.6-59.9,20.6c-3.9,0-7.7-0.2-11.5-0.7C110.8,297.5,136.2,305.5,163.4,305.5")
39 48
             li
40 49
                 h5
41 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
@@ -43,28 +52,63 @@
43 52
         //- menu links
44 53
         ul.f-col.start
45 54
             li
55
+                h5 
56
+                    router-link(to="/episode") PBS Series
57
+                    ul.f-col.start 
58
+                        li 
59
+                            router-link(to="/episode") &nbsp; Episodes
60
+                        li 
61
+                            router-link(to="/short") &nbsp; Shorts
62
+                        li 
63
+                            router-link(to="/technique") &nbsp; Techniques
64
+            li 
46 65
                 h5
47
-                    router-link(to="/episodes") PBS Series
48
-                ul.f-col.start
49
-                    li Episodes
50
-
51
-                h5
52
-                    router-link(to="/artists") Artists
53
-                ul.f-col.start
54
-                    li
55
-                        router-link(to="/artists/by-alpha") A-Z
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
56 72
 
57 73
             li
58 74
                 h5 
59
-                    router-link(to="/exhibitions") Exhibitions
75
+                    router-link(to="/exhibition") Exhibitions
76
+                    ul.f-col.start
77
+                        li
78
+                            router-link(to="/exhibition/sorted/by-current-and-upcoming") &nbsp; Current/Upcoming
79
+                        li
80
+                            router-link(to="/object/") &nbsp; Objects
60 81
 
61 82
             li
62 83
                 h5
63
-                    router-link(to="/events") Events
84
+                    router-link(to="/event") Center 
85
+                    ul.f-col.start
86
+                        li
87
+                            router-link(to="/exhibition") &nbsp; Exhibitions
88
+                        li 
89
+                            router-link(to="/event/sorted/by-current-and-upcoming") &nbsp; Events 
90
+                        li
91
+                            router-link(to="/event/sorted/by-type&talks") &nbsp; Talks &amp; Interviews
92
+            li
93
+                h5
94
+                    router-link(to="") Education 
95
+                    ul.f-col.start
96
+                        li
97
+                            router-link(to="/guide") &nbsp; Guides 
98
+                        li 
99
+                            router-link(to="/publication") &nbsp; Publications 
100
+
64 101
 
65 102
             li
66 103
                 h5
67
-                    router-link(to="/posts") News
104
+                    router-link(to="") News
105
+                    ul.f-col.start
106
+                        li
107
+                            router-link(to="/blog") &nbsp; Blog Posts  
108
+                        li 
109
+                            router-link(to="/blog/sorted/by-type&releases") &nbsp; Press Releases 
110
+                        li 
111
+                            router-link(to="/blog/sorted/by-type&articles") &nbsp; In the News 
68 112
 
69 113
     .sub-footer.f-col.start
70 114
         h6 Craft in America &copy; 2010&ndash;{{ today }} 
@@ -128,18 +172,8 @@ export default {
128 172
                     align-items: flex-start
129 173
                     > li
130 174
                         padding: 0 0 $ms--5
131
-                img
132
-                    width: $ms-0
133
-                    height: $ms-0
134
-                    padding: 0
135
-                        &.social-icons
136
-                        flex-direction: row
137
-                        justify-content: space-around
138
-                        > li
139
-                            padding: 0.2em 0.3em 0 0
140
-                            svg
141
-                                color: $cia_white
142
-                                font-size: 2em
175
+                svg 
176
+                    height: 1.5em
143 177
 
144 178
 
145 179
     .sub-footer

+ 2
- 2
vue-theme/src/components/navigation/navigation.vue Просмотреть файл

@@ -53,7 +53,7 @@ export default {
53 53
                 // 'resources',
54 54
                 // 'support',
55 55
                 // 'about',
56
-                // '🔍'
56
+                '🔍'
57 57
             ]
58 58
             const ignore = [
59 59
                 'page',
@@ -92,6 +92,7 @@ nav.main
92 92
     .menu, .mobile-menu
93 93
         /* padding: $ms-0 0 */
94 94
         a
95
+            text-decoration: none
95 96
             color: $cia_black
96 97
             &:hover
97 98
                 color: $cia_darker
@@ -127,7 +128,6 @@ nav.main
127 128
     
128 129
     .mobile-menu
129 130
         a
130
-            text-decoration: none
131 131
         /* cia logotype for smaller screens */
132 132
         img 
133 133
             margin: $ms--7 $ms--6 0 $ms-0

+ 23
- 2
vue-theme/src/components/sidebars/sidebar.vue Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 aside.sidebar
3 3
     section
4 4
         //- if not single layout with sorting
5
-        .shadow(v-if="['artist', 'exhibition', 'event', 'post'].includes(type) && layout !== 'single'")
5
+        .shadow(v-if="['artist', 'exhibition', 'event', 'short', 'guide', 'object', 'publication', 'technique', 'post'].includes(type) && layout !== 'single'")
6 6
             h3.t-up sort {{ type }} by
7 7
             ul.t-up
8 8
                 li(v-for="option in sortOptions")
@@ -11,11 +11,15 @@ aside.sidebar
11 11
                 //- temporary reminder
12 12
                 template(v-if="['exhibition', 'event'].includes(type) && layout === 'list'")
13 13
                     p 
14
-                        router-link(:to="`/${type}/sorted/by-date`")
14
+                        router-link(:to="`/${type}/`")
15 15
                             p by all
16 16
                     p 
17 17
                         router-link(:to="`/${type}/sorted/by-current-and-upcoming`")
18 18
                             p by current and upcoming
19
+                template(v-if="['short', 'guide', 'publication', 'technique', 'post'].includes(type) && layout === 'list'")
20
+                    p 
21
+                        router-link(:to="`/${type}`")
22
+                            p by all
19 23
 
20 24
         //- p2p types and related posts
21 25
         .shadow(v-if="layout === 'single' && Object.keys(related).length" v-for="p2pPostType in Object.keys(related)")
@@ -103,6 +107,7 @@ export default {
103 107
                 case 'short':
104 108
                     opts = [
105 109
                         Object.keys(this.sortTypes)[2],
110
+                        Object.keys(this.sortTypes)[1],
106 111
                         Object.keys(this.sortTypes)[3],
107 112
                     ]
108 113
                     break
@@ -112,6 +117,22 @@ export default {
112 117
                         Object.keys(this.sortTypes)[1],
113 118
                     ]
114 119
                     break
120
+                case 'object':
121
+                    opts = [
122
+                        Object.keys(this.sortTypes)[1],
123
+                    ]
124
+                    break
125
+                case 'publication':
126
+                    opts = [
127
+                        Object.keys(this.sortTypes)[1],
128
+                    ]
129
+                    break
130
+                case 'technique':
131
+                    opts = [
132
+                        Object.keys(this.sortTypes)[1],
133
+                        Object.keys(this.sortTypes)[3],
134
+                    ]
135
+                    break
115 136
             }
116 137
             return opts
117 138
         },

+ 5
- 5
vue-theme/src/pages/index.vue Просмотреть файл

@@ -12,19 +12,19 @@
12 12
                 li.post.shadow(v-for="sticky in allSticky")
13 13
                     card(:content="sticky" :type="`${sticky.type}`")
14 14
         
15
-        //- firstRow: ['episodes', 'exhibitions', 'events', 'shorts', 'posts'], exceprt on episodes only.
15
+        //- firstRow: ['episode', 'exhibition', 'event', 'short', 'post'], exceprt on episode only.
16 16
         section
17 17
             ul
18 18
                 li.post.shadow(v-for="type in firstRow")
19 19
                     card(:content="firstPostOfType(type)" :type="type")
20 20
         
21
-        //- secondRow: 'artists', // This is only ONE post, excerpt on artist
21
+        //- secondRow: 'artist', // This is only ONE post, excerpt on artist
22 22
         section.max
23 23
             ul.w-max
24 24
                 li.post.shadow(v-for="post in randomPosts.filter(p => p.type == secondRow)")
25 25
                     card(v-if="post" :content="post" :type="`${post.type}`" :wide="true")
26 26
         
27
-        //- (thirdRow) firstRow.flipped: ['guides', 'objects', 'techniques', 'talks', 'center'], exceprt on guides only
27
+        //- (thirdRow) firstRow.flipped: ['object', 'technique', 'publication', 'center', 'guide'], exceprt on guide only
28 28
         section
29 29
             ul.flipped
30 30
                 li.post.shadow(v-for="type in thirdRow")
@@ -45,7 +45,7 @@ export default {
45 45
         return {
46 46
             firstRow: ['episode', 'exhibition', 'event', 'short', 'post'],
47 47
             secondRow: 'artist', // This is only ONE post
48
-            thirdRow: ['object', 'short', 'publication', 'post', 'guide'],
48
+            thirdRow: ['object', 'technique', 'publication', 'center', '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', ['artist', 'guide', 'object', 'short', 'publication', 'post'])
86
+        await this.$store.dispatch('getRandomPosts', ['artist', 'guide', 'object', 'technique', 'publication', 'post'])
87 87
     },
88 88
     methods: {
89 89
         firstPostOfType(type) {

Загрузка…
Отмена
Сохранить