@asd20/ui 3.2.377 → 3.2.380
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
target="_blank"
|
|
20
20
|
>
|
|
21
21
|
<img :src="image.thumbnailUrl" :alt="image.alt" />
|
|
22
|
+
<p v-if="image.credits" class="grid-overlay">
|
|
23
|
+
{{ truncatedDescription(image.credits) }}
|
|
24
|
+
</p>
|
|
22
25
|
</a>
|
|
23
26
|
</asd20-grid>
|
|
24
27
|
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
:key="index"
|
|
39
42
|
>
|
|
40
43
|
<img :src="image.url" :alt="image.alt" />
|
|
44
|
+
<p v-if="image.credits" class="text-overlay">{{ image.credits }}</p>
|
|
41
45
|
</asd20-swipe-item>
|
|
42
46
|
</asd20-swipe>
|
|
43
47
|
</transition>
|
|
@@ -50,6 +54,8 @@ import Asd20Swipe from '../../../components/molecules/Asd20Swipe'
|
|
|
50
54
|
import Asd20SwipeItem from '../../../components/atoms/Asd20SwipeItem'
|
|
51
55
|
import Asd20Icon from '../../../components/atoms/Asd20Icon'
|
|
52
56
|
|
|
57
|
+
import truncate from 'lodash-es/truncate'
|
|
58
|
+
|
|
53
59
|
export default {
|
|
54
60
|
name: 'Asd20ImageGallery',
|
|
55
61
|
|
|
@@ -82,6 +88,7 @@ export default {
|
|
|
82
88
|
).url,
|
|
83
89
|
url: (i.files.find(f => f.name === 'full') || i.files[0]).url,
|
|
84
90
|
alt: i.metadata.alt,
|
|
91
|
+
credits: i.metadata.credits,
|
|
85
92
|
// isCover: i.isCover,
|
|
86
93
|
}))
|
|
87
94
|
)
|
|
@@ -93,6 +100,9 @@ export default {
|
|
|
93
100
|
this.selectedIndex = index + 1
|
|
94
101
|
this.showSlideshow = true
|
|
95
102
|
},
|
|
103
|
+
truncatedDescription(description) {
|
|
104
|
+
return truncate(description, { length: 50, separator: /,? +/ })
|
|
105
|
+
},
|
|
96
106
|
},
|
|
97
107
|
}
|
|
98
108
|
</script>
|
|
@@ -156,6 +166,15 @@ export default {
|
|
|
156
166
|
object-fit: cover;
|
|
157
167
|
object-position: center;
|
|
158
168
|
}
|
|
169
|
+
.grid-overlay {
|
|
170
|
+
position: absolute;
|
|
171
|
+
color: #fff;
|
|
172
|
+
background: rgba(50, 50, 50, 0.5);
|
|
173
|
+
bottom: 0;
|
|
174
|
+
padding: space(0.25);
|
|
175
|
+
font-size: 12px !important;
|
|
176
|
+
width: 100%;
|
|
177
|
+
}
|
|
159
178
|
}
|
|
160
179
|
.image-slideshow {
|
|
161
180
|
position: fixed;
|
|
@@ -181,10 +200,26 @@ export default {
|
|
|
181
200
|
opacity: 0;
|
|
182
201
|
transform: scale(0);
|
|
183
202
|
}
|
|
203
|
+
.asd20-swipe-item {
|
|
204
|
+
.text-overlay {
|
|
205
|
+
position: absolute;
|
|
206
|
+
display: block;
|
|
207
|
+
bottom: space(2);
|
|
208
|
+
color: #fff;
|
|
209
|
+
background: rgba(50, 50, 50, 0.7);
|
|
210
|
+
padding: space(0.5);
|
|
211
|
+
max-width: 80vw;
|
|
212
|
+
text-align: center;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
184
215
|
|
|
185
216
|
@media (min-width: 1024px) {
|
|
186
217
|
.asd20-image-gallery {
|
|
187
|
-
|
|
218
|
+
.image-grid {
|
|
219
|
+
.grid-overlay {
|
|
220
|
+
font-size: 14px !important;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
188
223
|
}
|
|
189
224
|
}
|
|
190
225
|
</style>
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
}
|
|
59
59
|
],
|
|
60
60
|
"metadata": {
|
|
61
|
-
"alt": "This is ALT text."
|
|
61
|
+
"alt": "This is ALT text.",
|
|
62
|
+
"credits": "John Smith competes in the 100m backstroke. He's really a great swimmer. No, really. And this picture demonstrates just what a great swimmer he is."
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
{
|
|
@@ -74,7 +75,8 @@
|
|
|
74
75
|
}
|
|
75
76
|
],
|
|
76
77
|
"metadata": {
|
|
77
|
-
"alt": "This is ALT text."
|
|
78
|
+
"alt": "This is ALT text.",
|
|
79
|
+
"credits": "Jane Doe competes in the 100m freestyle."
|
|
78
80
|
}
|
|
79
81
|
},
|
|
80
82
|
{
|