@asd20/ui 3.2.378 → 3.2.381

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.381",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -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
- // padding: space(0) space(3) space(1) space(3);
218
+ .image-grid {
219
+ .grid-overlay {
220
+ font-size: 14px !important;
221
+ }
222
+ }
188
223
  }
189
224
  }
190
225
  </style>
@@ -172,12 +172,16 @@
172
172
  <asd20-list
173
173
  v-if="organization.awardsHonors.length > 0"
174
174
  :items="
175
- organization.awardsHonors.map(a => ({
176
- label: a,
177
- alignTop: true,
178
- checked: true,
179
- condensed: true,
180
- }))
175
+ organization.awardsHonors
176
+ .map(a => ({
177
+ label: a,
178
+ alignTop: true,
179
+ checked: true,
180
+ condensed: true,
181
+ }))
182
+ .sort((a, b) =>
183
+ a.label > b.label ? 1 : b.label > a.label ? -1 : 0
184
+ )
181
185
  "
182
186
  class="asd20-school-details__awards-honors"
183
187
  icon="award"
@@ -187,12 +191,16 @@
187
191
  <asd20-list
188
192
  v-if="organization.uniqueOfferings.length > 0"
189
193
  :items="
190
- organization.uniqueOfferings.map(u => ({
191
- label: u,
192
- alignTop: true,
193
- checked: true,
194
- condensed: true,
195
- }))
194
+ organization.uniqueOfferings
195
+ .map(u => ({
196
+ label: u,
197
+ alignTop: true,
198
+ checked: true,
199
+ condensed: true,
200
+ }))
201
+ .sort((a, b) =>
202
+ a.label > b.label ? 1 : b.label > a.label ? -1 : 0
203
+ )
196
204
  "
197
205
  class="asd20-school-details__unique-offerings"
198
206
  headline="Unique Offerings"
@@ -374,7 +382,6 @@ export default {
374
382
  .map(oc => oc.category.title)
375
383
  .includes('Academics')
376
384
  )
377
-
378
385
  .map(a => ({
379
386
  label: a.offering.title,
380
387
  description: a.offering.description,
@@ -383,13 +390,13 @@ export default {
383
390
  condensed: true,
384
391
  checked: true,
385
392
  }))
393
+ .sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0))
386
394
  },
387
395
  artsListItems() {
388
396
  return this.organization.offerings
389
397
  .filter(o =>
390
398
  o.offering.categories.map(oc => oc.category.title).includes('Arts')
391
399
  )
392
-
393
400
  .map(a => ({
394
401
  label: a.offering.title,
395
402
  alignTop: true,
@@ -397,6 +404,7 @@ export default {
397
404
  condensed: true,
398
405
  checked: true,
399
406
  }))
407
+ .sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0))
400
408
  },
401
409
  athleticsListItems() {
402
410
  return this.organization.offerings
@@ -412,6 +420,7 @@ export default {
412
420
  condensed: true,
413
421
  checked: true,
414
422
  }))
423
+ .sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0))
415
424
  },
416
425
  },
417
426
  }
@@ -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
  {