Pārlūkot izejas kodu

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

tags/1.0.3
Alej 3 gadus atpakaļ
vecāks
revīzija
c8a83b1f0c

+ 29
- 6
.drone.yml Parādīt failu

@@ -5,10 +5,9 @@
5 5
 
6 6
 # push_deploy_key: id_rsa from DRONE host machine
7 7
 
8
-################
9
-# Build & Test #
10
-################
11
-
8
+##############
9
+# Test Theme #
10
+##############
12 11
 kind: pipeline
13 12
 name: run_tests
14 13
 
@@ -26,6 +25,31 @@ steps:
26 25
           - name: node_cache
27 26
             path: /drone/src/vue-theme/node_modules
28 27
 
28
+volumes:
29
+    - name: node_cache
30
+      host:
31
+          path: /tmp/cache/drone/node_modules
32
+    - name: build
33
+      host:
34
+          path: /tmp/cache/drone/build
35
+---
36
+#############
37
+# Run Build #
38
+#############
39
+kind: pipeline
40
+name: run_build
41
+depends_on:
42
+    # Must run after the first pipeline
43
+    - run_tests
44
+trigger:
45
+    status:
46
+        # Only runs if the first pipeline was fully successful
47
+        - success
48
+        # Only runs on the master branch
49
+    branch:
50
+        - dev
51
+
52
+steps:
29 53
     - name: build
30 54
       image: node
31 55
       commands:
@@ -54,12 +78,11 @@ volumes:
54 78
 ########################
55 79
 # Deploy to Production #
56 80
 ########################
57
-
58 81
 kind: pipeline
59 82
 name: deploy
60 83
 depends_on:
61 84
     # Must run after the first pipeline
62
-    - run_tests
85
+    - run_build
63 86
 trigger:
64 87
     status:
65 88
         # Only runs if the first pipeline was fully successful

+ 2
- 2
plugins/cia-endpoints/includes/reformat-blocks.php Parādīt failu

@@ -40,11 +40,11 @@
40 40
                 $id = end($class_pieces);
41 41
             }
42 42
             // Format for lightbox wants an object
43
+            $title = get_the_title($id) . "\n \n" . get_post($id)->post_content;
43 44
             $parse_images[$id] = [
44 45
                 'src' => $image->getAttribute('src'),
45 46
                 'alt' => $image->getAttribute('alt'),
46
-                'title' => wp_get_attachment_caption($id),
47
-                'description' => get_the_excerpt($id)
47
+                'title' => $title
48 48
             ];
49 49
         }
50 50
         return $parse_images;

+ 48
- 79
vue-theme/src/sss/_lightbox.sss Parādīt failu

@@ -1,11 +1,11 @@
1 1
 @import './variables.sss'
2 2
 @import './theme.sss'
3 3
 
4
-.vel-fade
4
+/* .vel-fade
5 5
     &-enter-active, &-active
6 6
         transition: all 0.3s ease
7 7
     &-enter-from, &-leave-to
8
-        opacity: 1
8
+        opacity: 1 */
9 9
 
10 10
 .vel-img
11 11
     &-swiper
@@ -17,13 +17,10 @@
17 17
         position: absolute
18 18
         top: 50%
19 19
         transform: translate(-50% -50%)
20
-        /* transition: 0.3s linear */
21
-        /* will-change: transform opacity */
22
-    /* background-color: rgba(0, 0, 0, 0.7) */
23 20
     box-shadow: 0.5px 0.5px 0.5px 0px rgb(0 0 0 / 30%)
24 21
     display: block
25 22
     max-height: 80vh
26
-    max-width: 80vw
23
+    max-width: 90vw
27 24
     position: relative
28 25
     transition: transform 0.3s ease-in-out
29 26
 
@@ -36,59 +33,34 @@
36 33
     right: 0
37 34
     top: 0
38 35
     z-index: 10003
39
-    img
36
+    /* img
40 37
         transition: none
41 38
         &:hover
42
-            filter: grayscale(0%) brightness(100%)
39
+            filter: grayscale(0%) brightness(100%) */
43 40
 
44 41
 .vel-img, .vel-img-wrapper
45 42
     user-select: none
46 43
 
47 44
 .vel-btns-wrapper
45
+    display: flex 
46
+    justify-content: center 
48 47
     .btn__close, .btn__next, .btn__prev
49 48
         color: $cia_black 
50 49
         cursor: pointer
51
-        font-size: 32px
52
-        opacity: 0.6
53 50
         outline: none
54 51
         position: absolute
55
-        top: 50%
52
+        top: 3%
56 53
         transform: translateY(-50%)
57
-        transition: 0.15s linear
54
+        /* transition: 0.15s linear
58 55
         user-select: none
59 56
         &:hover
60 57
             opacity: 1
61 58
         &.disable, &.disable:hover
62
-            cursor: default
63
-            opacity: 0.2
59
+            cursor: default */
64 60
     .btn__next
65
-        right: 12px
61
+        right: $ms-7
66 62
     .btn__prev
67
-        left: 12px
68
-    .btn__close
69
-        right: 10px
70
-        top: 24px
71
-
72
-@media (max-width: 750px)
73
-    .vel-img
74
-        max-height: 95vh
75
-        max-width: 85vw
76
-    .vel-btns-wrapper
77
-        .btn__next, .btn__prev
78
-            font-size: 20px
79
-        .btn__close
80
-            font-size: 24px
81
-        .btn__next
82
-            right: 4px
83
-        .btn__prev
84
-            left: 4px
85
-    .vel-modal.is-rtl .vel-btns-wrapper
86
-        .btn__next
87
-            left: 4px
88
-            right: auto
89
-        .btn__prev
90
-            left: auto
91
-            right: 4px
63
+        left: $ms-7
92 64
 
93 65
 .vel-modal.is-rtl
94 66
     .vel-btns-wrapper
@@ -109,7 +81,7 @@
109 81
     top: 50%
110 82
     -webkit-transform: translate(-50%, -50%)
111 83
     transform: translate(-50%, -50%)
112
-    .ring
84
+    /* .ring
113 85
         display: inline-block
114 86
         height: 64px
115 87
         width: 64px
@@ -123,20 +95,7 @@
123 95
             display: block
124 96
             height: 46px
125 97
             margin: 1px
126
-            width: 46px
127
-
128
-@-webkit-keyframes ring
129
-    0%
130
-        transform: rotate(0deg)
131
-    to
132
-        transform: rotate(1turn)
133
-
134
-@keyframes ring
135
-    0%
136
-        transform: rotate(0deg)
137
-    to
138
-        transform: rotate(1turn)
139
-    
98
+            width: 46px     */
140 99
 
141 100
 .vel-on-error
142 101
     left: 50%
@@ -148,30 +107,18 @@
148 107
         font-size: 80px
149 108
 
150 109
 .vel-img-title
151
-    bottom: 60px
152
-    color: #ccc
153
-    cursor: default
154
-    font-size: 12px
155
-    left: 50%
156
-    line-height: 1
157
-    max-width: 80%
158
-    opacity: 0.8
159
-    overflow: hidden
110
+    bottom: 3%
111
+    font-size: $ms-0
112
+    max-width: 90%
160 113
     position: absolute
161
-    text-align: center
162
-    text-overflow: ellipsis
163
-    transform: translate(-50%)
164
-    transition: opacity 0.15s
165
-    white-space: nowrap
166
-    &:hover
167
-        opacity: 1
114
+    white-space: pre-line
168 115
 
169 116
 .vel-icon
170 117
     fill: currentColor
171
-    height: 1em
118
+    height: 1.5rem
119
+    width: 1.5rem
172 120
     overflow: hidden
173 121
     vertical-align: -0.15em
174
-    width: 1em
175 122
 
176 123
 .vel-toolbar
177 124
     display: none
@@ -184,22 +131,44 @@
184 131
     padding: 0
185 132
     position: absolute
186 133
     transform: translate(-50%)
134
+
135
+    /* figure out way to stop  toolbar form loading */
187 136
     .toolbar-btn
188 137
         display: none
189
-        color: #fff
138
+        /* color: #fff
190 139
         cursor: pointer
191 140
         flex-shrink: 0
192 141
         font-size: 20px
193 142
         outline: none
194 143
         padding: 6px 10px
195 144
         &:active, &:hover
196
-            background-color: #3d3d3d
145
+            background-color: #3d3d3d */
197 146
 
198 147
 .vel-toolbar, .vel-toolbar .toolbar-btn
199 148
     background-color: #2d2d2d
200 149
     user-select: none
201 150
 
202
-figcaption
203
-    position: inherit
204
-    background: none
205
-    color: $cia_black
151
+@media (min-width: $medium)
152
+    .vel-img-title
153
+        /* bottom: 3% */
154
+        margin: 0 10vw 
155
+
156
+    .vel-icon
157
+        height: 2rem
158
+        width: 2rem
159
+
160
+    .vel-btns-wrapper
161
+        .btn__next, .btn__prev
162
+            top: 50%
163
+        .btn__next
164
+            right: $ms--3
165
+        .btn__prev
166
+            left: $ms--3
167
+
168
+    .vel-modal.is-rtl .vel-btns-wrapper
169
+        .btn__next
170
+            left: $ms--3
171
+            right: auto
172
+        .btn__prev
173
+            left: auto
174
+            right: $ms--3

Notiek ielāde…
Atcelt
Saglabāt