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

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

tags/1.0.3
Alej 3 лет назад
Родитель
Сommit
c8a83b1f0c
3 измененных файлов: 79 добавлений и 87 удалений
  1. 29
    6
      .drone.yml
  2. 2
    2
      plugins/cia-endpoints/includes/reformat-blocks.php
  3. 48
    79
      vue-theme/src/sss/_lightbox.sss

+ 29
- 6
.drone.yml Просмотреть файл

5
 
5
 
6
 # push_deploy_key: id_rsa from DRONE host machine
6
 # push_deploy_key: id_rsa from DRONE host machine
7
 
7
 
8
-################
9
-# Build & Test #
10
-################
11
-
8
+##############
9
+# Test Theme #
10
+##############
12
 kind: pipeline
11
 kind: pipeline
13
 name: run_tests
12
 name: run_tests
14
 
13
 
26
           - name: node_cache
25
           - name: node_cache
27
             path: /drone/src/vue-theme/node_modules
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
     - name: build
53
     - name: build
30
       image: node
54
       image: node
31
       commands:
55
       commands:
54
 ########################
78
 ########################
55
 # Deploy to Production #
79
 # Deploy to Production #
56
 ########################
80
 ########################
57
-
58
 kind: pipeline
81
 kind: pipeline
59
 name: deploy
82
 name: deploy
60
 depends_on:
83
 depends_on:
61
     # Must run after the first pipeline
84
     # Must run after the first pipeline
62
-    - run_tests
85
+    - run_build
63
 trigger:
86
 trigger:
64
     status:
87
     status:
65
         # Only runs if the first pipeline was fully successful
88
         # Only runs if the first pipeline was fully successful

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

40
                 $id = end($class_pieces);
40
                 $id = end($class_pieces);
41
             }
41
             }
42
             // Format for lightbox wants an object
42
             // Format for lightbox wants an object
43
+            $title = get_the_title($id) . "\n \n" . get_post($id)->post_content;
43
             $parse_images[$id] = [
44
             $parse_images[$id] = [
44
                 'src' => $image->getAttribute('src'),
45
                 'src' => $image->getAttribute('src'),
45
                 'alt' => $image->getAttribute('alt'),
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
         return $parse_images;
50
         return $parse_images;

+ 48
- 79
vue-theme/src/sss/_lightbox.sss Просмотреть файл

1
 @import './variables.sss'
1
 @import './variables.sss'
2
 @import './theme.sss'
2
 @import './theme.sss'
3
 
3
 
4
-.vel-fade
4
+/* .vel-fade
5
     &-enter-active, &-active
5
     &-enter-active, &-active
6
         transition: all 0.3s ease
6
         transition: all 0.3s ease
7
     &-enter-from, &-leave-to
7
     &-enter-from, &-leave-to
8
-        opacity: 1
8
+        opacity: 1 */
9
 
9
 
10
 .vel-img
10
 .vel-img
11
     &-swiper
11
     &-swiper
17
         position: absolute
17
         position: absolute
18
         top: 50%
18
         top: 50%
19
         transform: translate(-50% -50%)
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
     box-shadow: 0.5px 0.5px 0.5px 0px rgb(0 0 0 / 30%)
20
     box-shadow: 0.5px 0.5px 0.5px 0px rgb(0 0 0 / 30%)
24
     display: block
21
     display: block
25
     max-height: 80vh
22
     max-height: 80vh
26
-    max-width: 80vw
23
+    max-width: 90vw
27
     position: relative
24
     position: relative
28
     transition: transform 0.3s ease-in-out
25
     transition: transform 0.3s ease-in-out
29
 
26
 
36
     right: 0
33
     right: 0
37
     top: 0
34
     top: 0
38
     z-index: 10003
35
     z-index: 10003
39
-    img
36
+    /* img
40
         transition: none
37
         transition: none
41
         &:hover
38
         &:hover
42
-            filter: grayscale(0%) brightness(100%)
39
+            filter: grayscale(0%) brightness(100%) */
43
 
40
 
44
 .vel-img, .vel-img-wrapper
41
 .vel-img, .vel-img-wrapper
45
     user-select: none
42
     user-select: none
46
 
43
 
47
 .vel-btns-wrapper
44
 .vel-btns-wrapper
45
+    display: flex 
46
+    justify-content: center 
48
     .btn__close, .btn__next, .btn__prev
47
     .btn__close, .btn__next, .btn__prev
49
         color: $cia_black 
48
         color: $cia_black 
50
         cursor: pointer
49
         cursor: pointer
51
-        font-size: 32px
52
-        opacity: 0.6
53
         outline: none
50
         outline: none
54
         position: absolute
51
         position: absolute
55
-        top: 50%
52
+        top: 3%
56
         transform: translateY(-50%)
53
         transform: translateY(-50%)
57
-        transition: 0.15s linear
54
+        /* transition: 0.15s linear
58
         user-select: none
55
         user-select: none
59
         &:hover
56
         &:hover
60
             opacity: 1
57
             opacity: 1
61
         &.disable, &.disable:hover
58
         &.disable, &.disable:hover
62
-            cursor: default
63
-            opacity: 0.2
59
+            cursor: default */
64
     .btn__next
60
     .btn__next
65
-        right: 12px
61
+        right: $ms-7
66
     .btn__prev
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
 .vel-modal.is-rtl
65
 .vel-modal.is-rtl
94
     .vel-btns-wrapper
66
     .vel-btns-wrapper
109
     top: 50%
81
     top: 50%
110
     -webkit-transform: translate(-50%, -50%)
82
     -webkit-transform: translate(-50%, -50%)
111
     transform: translate(-50%, -50%)
83
     transform: translate(-50%, -50%)
112
-    .ring
84
+    /* .ring
113
         display: inline-block
85
         display: inline-block
114
         height: 64px
86
         height: 64px
115
         width: 64px
87
         width: 64px
123
             display: block
95
             display: block
124
             height: 46px
96
             height: 46px
125
             margin: 1px
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
 .vel-on-error
100
 .vel-on-error
142
     left: 50%
101
     left: 50%
148
         font-size: 80px
107
         font-size: 80px
149
 
108
 
150
 .vel-img-title
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
     position: absolute
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
 .vel-icon
116
 .vel-icon
170
     fill: currentColor
117
     fill: currentColor
171
-    height: 1em
118
+    height: 1.5rem
119
+    width: 1.5rem
172
     overflow: hidden
120
     overflow: hidden
173
     vertical-align: -0.15em
121
     vertical-align: -0.15em
174
-    width: 1em
175
 
122
 
176
 .vel-toolbar
123
 .vel-toolbar
177
     display: none
124
     display: none
184
     padding: 0
131
     padding: 0
185
     position: absolute
132
     position: absolute
186
     transform: translate(-50%)
133
     transform: translate(-50%)
134
+
135
+    /* figure out way to stop  toolbar form loading */
187
     .toolbar-btn
136
     .toolbar-btn
188
         display: none
137
         display: none
189
-        color: #fff
138
+        /* color: #fff
190
         cursor: pointer
139
         cursor: pointer
191
         flex-shrink: 0
140
         flex-shrink: 0
192
         font-size: 20px
141
         font-size: 20px
193
         outline: none
142
         outline: none
194
         padding: 6px 10px
143
         padding: 6px 10px
195
         &:active, &:hover
144
         &:active, &:hover
196
-            background-color: #3d3d3d
145
+            background-color: #3d3d3d */
197
 
146
 
198
 .vel-toolbar, .vel-toolbar .toolbar-btn
147
 .vel-toolbar, .vel-toolbar .toolbar-btn
199
     background-color: #2d2d2d
148
     background-color: #2d2d2d
200
     user-select: none
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

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