@asd20/ui 3.2.378 → 3.2.379

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
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.378",
8
+ "version": "3.2.379",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -19,6 +19,7 @@
19
19
  target="_blank"
20
20
  >
21
21
  <img :src="image.thumbnailUrl" :alt="image.alt" />
22
+ <p class="grid-overlay">{{ truncatedDescription(image.credits) }}</p>
22
23
  </a>
23
24
  </asd20-grid>
24
25
 
@@ -38,6 +39,7 @@
38
39
  :key="index"
39
40
  >
40
41
  <img :src="image.url" :alt="image.alt" />
42
+ <p class="text-overlay">{{ image.credits }}</p>
41
43
  </asd20-swipe-item>
42
44
  </asd20-swipe>
43
45
  </transition>
@@ -50,6 +52,8 @@ import Asd20Swipe from '../../../components/molecules/Asd20Swipe'
50
52
  import Asd20SwipeItem from '../../../components/atoms/Asd20SwipeItem'
51
53
  import Asd20Icon from '../../../components/atoms/Asd20Icon'
52
54
 
55
+ import truncate from 'lodash-es/truncate'
56
+
53
57
  export default {
54
58
  name: 'Asd20ImageGallery',
55
59
 
@@ -82,6 +86,7 @@ export default {
82
86
  ).url,
83
87
  url: (i.files.find(f => f.name === 'full') || i.files[0]).url,
84
88
  alt: i.metadata.alt,
89
+ credits: i.metadata.credits,
85
90
  // isCover: i.isCover,
86
91
  }))
87
92
  )
@@ -93,6 +98,9 @@ export default {
93
98
  this.selectedIndex = index + 1
94
99
  this.showSlideshow = true
95
100
  },
101
+ truncatedDescription(description) {
102
+ return truncate(description, { length: 50, separator: /,? +/ })
103
+ },
96
104
  },
97
105
  }
98
106
  </script>
@@ -156,6 +164,15 @@ export default {
156
164
  object-fit: cover;
157
165
  object-position: center;
158
166
  }
167
+ .grid-overlay {
168
+ position: absolute;
169
+ color: #fff;
170
+ background: rgba(50, 50, 50, 0.5);
171
+ bottom: 0;
172
+ padding: space(0.25);
173
+ font-size: 12px !important;
174
+ width: 100%;
175
+ }
159
176
  }
160
177
  .image-slideshow {
161
178
  position: fixed;
@@ -181,10 +198,26 @@ export default {
181
198
  opacity: 0;
182
199
  transform: scale(0);
183
200
  }
201
+ .asd20-swipe-item {
202
+ .text-overlay {
203
+ position: absolute;
204
+ display: block;
205
+ bottom: space(2);
206
+ color: #fff;
207
+ background: rgba(50, 50, 50, 0.7);
208
+ padding: space(0.5);
209
+ max-width: 80vw;
210
+ text-align: center;
211
+ }
212
+ }
184
213
 
185
214
  @media (min-width: 1024px) {
186
215
  .asd20-image-gallery {
187
- // padding: space(0) space(3) space(1) space(3);
216
+ .image-grid {
217
+ .grid-overlay {
218
+ font-size: 14px !important;
219
+ }
220
+ }
188
221
  }
189
222
  }
190
223
  </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
  {
@@ -90,7 +92,8 @@
90
92
  }
91
93
  ],
92
94
  "metadata": {
93
- "alt": "This is ALT text."
95
+ "alt": "This is ALT text.",
96
+ "credits": "The Discovery Canyon Campus swimming pool."
94
97
  }
95
98
  }
96
99
  ],