@asd20/ui 3.2.694 → 3.2.696

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.694",
8
+ "version": "3.2.696",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -85,10 +85,24 @@
85
85
  </a>
86
86
  </div>
87
87
  </div>
88
+ <span
89
+ v-if="imageCredits"
90
+ class="image-credits-full"
91
+ aria-label="additional image info"
92
+ >
93
+ {{ truncatedDescription(imageCredits) }}
94
+ </span>
88
95
  </div>
89
96
 
90
97
  <div v-if="imageUrl && !$slots.aside" class="asd20-page-header__image">
91
98
  <img :src="imageUrl" :alt="imageCaption" />
99
+ <span
100
+ v-if="imageCredits"
101
+ class="image-credits"
102
+ aria-label="additional image info"
103
+ >
104
+ {{ truncatedDescription(imageCredits) }}
105
+ </span>
92
106
  </div>
93
107
  </div>
94
108
 
@@ -148,6 +162,8 @@ import Asd20Share from '../../molecules/Asd20Share'
148
162
  import Asd20FormattedDate from '../../atoms/Asd20FormattedDate'
149
163
  import Asd20TagGroup from '../../organisms/Asd20TagGroup'
150
164
 
165
+ import truncate from 'lodash-es/truncate'
166
+
151
167
  export default {
152
168
  name: 'Asd20ImageHeader',
153
169
  components: {
@@ -168,6 +184,7 @@ export default {
168
184
  imageUrl: { type: String, default: '' },
169
185
  headerImageUrl: { type: String, default: '' },
170
186
  imageCaption: { type: String, default: '' },
187
+ imageCredits: { type: String, default: '' },
171
188
  fullscreen: { type: Boolean, default: false },
172
189
  detailLink: { type: String, default: '' },
173
190
  detailLinkLabel: { type: String, default: '' },
@@ -223,6 +240,9 @@ export default {
223
240
  return document.referrer
224
241
  // window.history.back()
225
242
  },
243
+ truncatedDescription(description) {
244
+ return truncate(description, { length: 60, separator: /,? +/ })
245
+ },
226
246
  },
227
247
  }
228
248
  </script>
@@ -362,6 +382,9 @@ export default {
362
382
  &__title-content {
363
383
  // max-width: 100%;
364
384
  }
385
+ .image-credits-full {
386
+ display: none;
387
+ }
365
388
 
366
389
  .add-fade {
367
390
  &::before {
@@ -462,11 +485,23 @@ export default {
462
485
  }
463
486
 
464
487
  &__image {
488
+ position: relative;
465
489
  img {
466
490
  width: 100%;
467
491
  // max-height: 600px;
468
492
  border-top: 10px solid var(--color__accent);
469
493
  }
494
+ .image-credits {
495
+ position: absolute;
496
+ text-align: right;
497
+ color: #fff;
498
+ background: rgba(50, 50, 50, 0.5);
499
+ top: 0.625rem;
500
+ bottom: inherit;
501
+ right: 0;
502
+ padding: space(0.25);
503
+ font-size: 0.8rem !important;
504
+ }
470
505
  }
471
506
  &--has-cta {
472
507
  .asd20-page-header__content {
@@ -481,10 +516,22 @@ export default {
481
516
  position: relative;
482
517
  min-height: 300px;
483
518
  }
519
+ .image-credits-full {
520
+ display: block;
521
+ position: absolute;
522
+ bottom: 0;
523
+ right: 0;
524
+ padding: space(0.25);
525
+ color: white;
526
+ background: rgba(50, 50, 50, 0.5);
527
+ font-family: var(--website-typography__font-family-headlines);
528
+ font-size: 0.8rem !important;
529
+ }
484
530
  .new-header {
485
531
  background: var(--website-header__background-color) var(--imageBackground)
486
532
  center / cover no-repeat;
487
533
  }
534
+
488
535
  &__content {
489
536
  position: relative;
490
537
  padding: space(1) space(2) space(1) space(2);
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <footer id="page-footer">
2
+ <footer id="page-footer" role="complementary">
3
3
  <div class="logoContainer">
4
4
  <asd20-logo
5
5
  v-if="organization.title !== 'Academy District 20'"
@@ -93,6 +93,9 @@
93
93
 
94
94
  <div v-if="imageUrl && !$slots.aside" class="asd20-page-header__image">
95
95
  <img :src="imageUrl" :alt="imageCaption" />
96
+ <span v-if="imageCredits" class="image-credits">
97
+ {{ truncatedDescription(imageCredits) }}
98
+ </span>
96
99
  </div>
97
100
  </div>
98
101
 
@@ -152,6 +155,8 @@ import Asd20Share from '../../molecules/Asd20Share'
152
155
  import Asd20FormattedDate from '../../atoms/Asd20FormattedDate'
153
156
  import Asd20TagGroup from '../../organisms/Asd20TagGroup'
154
157
 
158
+ import truncate from 'lodash-es/truncate'
159
+
155
160
  export default {
156
161
  name: 'Asd20PageHeader',
157
162
  components: {
@@ -172,6 +177,7 @@ export default {
172
177
  imageUrl: { type: String, default: '' },
173
178
  headerImageUrl: { type: String, default: '' },
174
179
  imageCaption: { type: String, default: '' },
180
+ imageCredits: { type: String, default: '' },
175
181
  fullscreen: { type: Boolean, default: false },
176
182
  detailLink: { type: String, default: '' },
177
183
  detailLinkLabel: { type: String, default: '' },
@@ -254,6 +260,9 @@ export default {
254
260
  // const url = window.location.href
255
261
  // return url.slice(0, url.lastIndexOf('/'))
256
262
  },
263
+ truncatedDescription(description) {
264
+ return truncate(description, { length: 60, separator: /,? +/ })
265
+ },
257
266
  },
258
267
  }
259
268
  </script>
@@ -511,12 +520,24 @@ export default {
511
520
  }
512
521
 
513
522
  &__image {
523
+ position: relative;
514
524
  img {
515
525
  width: 100%;
516
526
  // max-width: 100%;
517
527
  // max-height: 600px;
518
528
  border-top: 10px solid var(--color__accent);
519
529
  }
530
+ .image-credits {
531
+ position: absolute;
532
+ text-align: right;
533
+ color: #fff;
534
+ background: rgba(50, 50, 50, 0.5);
535
+ top: 0.625rem;
536
+ right: 0;
537
+ padding: space(0.25);
538
+ font-family: var(--website-typography__font-family-headlines);
539
+ font-size: 0.8rem !important;
540
+ }
520
541
  }
521
542
  &--has-cta {
522
543
  .asd20-page-header__content {
@@ -524,6 +545,16 @@ export default {
524
545
  }
525
546
  }
526
547
  }
548
+ @media (min-width: 667px) {
549
+ .asd20-page-header {
550
+ &__image {
551
+ .image-credits {
552
+ top: inherit;
553
+ bottom: 0;
554
+ }
555
+ }
556
+ }
557
+ }
527
558
 
528
559
  @media (min-width: 1024px) {
529
560
  .asd20-page-header {
@@ -24,6 +24,9 @@
24
24
  class="asd20-school-homepage-header__image"
25
25
  >
26
26
  <img :src="imageUrl" :alt="imageCaption" />
27
+ <span v-if="imageCredits" class="image-credits">
28
+ {{ truncatedDescription(imageCredits) }}
29
+ </span>
27
30
  </div>
28
31
 
29
32
  <aside class="asd20-school-homepage-header__aside" v-if="$slots.aside">
@@ -55,6 +58,8 @@
55
58
  import scrollTrack from '../../../directives/scroll-track'
56
59
  import Asd20Button from '../../atoms/Asd20Button'
57
60
 
61
+ import truncate from 'lodash-es/truncate'
62
+
58
63
  export default {
59
64
  name: 'Asd20SchoolHomepageHeader',
60
65
  components: { Asd20Button },
@@ -65,6 +70,7 @@ export default {
65
70
  callsToAction: { type: Array, default: () => [] },
66
71
  imageUrl: { type: String, default: '' },
67
72
  imageCaption: { type: String, default: '' },
73
+ imageCredits: { type: String, default: '' },
68
74
  fullscreen: { type: Boolean, default: false },
69
75
  detailLink: { type: String, default: '' },
70
76
  detailLinkLabel: { type: String, default: '' },
@@ -89,6 +95,11 @@ export default {
89
95
  )
90
96
  },
91
97
  },
98
+ methods: {
99
+ truncatedDescription(description) {
100
+ return truncate(description, { length: 60, separator: /,? +/ })
101
+ },
102
+ },
92
103
  }
93
104
  </script>
94
105
 
@@ -241,6 +252,7 @@ export default {
241
252
  }
242
253
  }
243
254
  &__image {
255
+ position: relative;
244
256
  img {
245
257
  display: block;
246
258
  width: 100%;
@@ -248,6 +260,17 @@ export default {
248
260
  // object-fit: cover;
249
261
  object-position: center;
250
262
  }
263
+ .image-credits {
264
+ position: absolute;
265
+ text-align: right;
266
+ color: #fff;
267
+ background: rgba(50, 50, 50, 0.5);
268
+ bottom: 0;
269
+ right: 0;
270
+ padding: space(0.25);
271
+ font-family: var(--website-typography__font-family-headlines);
272
+ font-size: 0.8rem !important;
273
+ }
251
274
  }
252
275
  // Hide images on mobile
253
276
  // &__image {
@@ -274,6 +297,12 @@ $max: 4rem;
274
297
  // padding: space(0.25) space(1);
275
298
  align-items: center !important;
276
299
  }
300
+ &__image {
301
+ .image-credits {
302
+ top: inherit;
303
+ bottom: 0;
304
+ }
305
+ }
277
306
  }
278
307
  }
279
308
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <section class="asd20-widgets-section">
2
+ <section class="asd20-widgets-section" role="complementary">
3
3
  <slot name="before" />
4
4
 
5
5
  <asd20-department-contact-card
@@ -112,14 +112,14 @@
112
112
  align-top
113
113
  icon="committee"
114
114
  />
115
- <h4>
115
+ <h3>
116
116
  <b>
117
117
  {{ organization.administrators[0].firstName }}
118
118
  {{ organization.administrators[0].lastName }}
119
119
  <br />
120
120
  <small>Principal</small>
121
121
  </b>
122
- </h4>
122
+ </h3>
123
123
 
124
124
  <asd20-list>
125
125
  <asd20-list-item
@@ -529,6 +529,9 @@ export default {
529
529
  color: asd20-swatch('primary');
530
530
  font-size: 1.25rem;
531
531
  }
532
+ h3 {
533
+ font-size: 1.15rem;
534
+ }
532
535
  }
533
536
  &__secondary-content {
534
537
  padding: space(1);
@@ -195,7 +195,12 @@ export default {
195
195
  heading: this.firstMessage.heading || '',
196
196
  lead: this.firstMessage.shortDescription || '',
197
197
  imageUrl: image ? image.url : '',
198
- imageCaption: image ? image.alt : '',
198
+ imageCaption: this.firstMessage.images
199
+ ? this.firstMessage.images[0].metadata.alt
200
+ : '',
201
+ imageCredits: this.firstMessage.images
202
+ ? this.firstMessage.images[0].metadata.credits
203
+ : '',
199
204
  callsToAction: this.firstMessage.callsToAction
200
205
  ? this.firstMessage.callsToAction
201
206
  : '',
@@ -66,6 +66,14 @@
66
66
  </client-only>
67
67
  </template>
68
68
 
69
+ <!-- Page Content -->
70
+ <asd20-page-content
71
+ class="intro-message"
72
+ :primary-messages="primaryMessage"
73
+ omit-detail-links
74
+ omit-calls-to-action
75
+ />
76
+
69
77
  <!-- Feed Section -->
70
78
  <template>
71
79
  <asd20-feeds-section
@@ -82,12 +90,6 @@
82
90
  </template>
83
91
 
84
92
  <!-- Page Content -->
85
- <asd20-page-content
86
- class="intro-message"
87
- :primary-messages="primaryMessage"
88
- omit-detail-links
89
- omit-calls-to-action
90
- />
91
93
  <asd20-page-content
92
94
  :class="wayFindingPrimaryMessages.length > 3 ? 'limit-message-width' : ''"
93
95
  :primary-messages="wayFindingPrimaryMessages"
@@ -226,7 +228,7 @@ export default {
226
228
  margin-top: space(2) !important;
227
229
  }
228
230
  .asd20-feeds-section {
229
- margin-top: space(2);
231
+ // margin-top: space(2);
230
232
  .asd20-swiper-feed:first-child {
231
233
  padding-top: space(2);
232
234
  padding-bottom: space(1);
@@ -66,6 +66,14 @@
66
66
  </client-only>
67
67
  </template>
68
68
 
69
+ <!-- Page Content -->
70
+ <asd20-page-content
71
+ class="intro-message"
72
+ :primary-messages="primaryMessage"
73
+ omit-detail-links
74
+ omit-calls-to-action
75
+ />
76
+
69
77
  <!-- Feeds Section -->
70
78
  <template>
71
79
  <asd20-feeds-section
@@ -82,12 +90,6 @@
82
90
  </template>
83
91
 
84
92
  <!-- Page Content -->
85
- <asd20-page-content
86
- class="intro-message"
87
- :primary-messages="primaryMessage"
88
- omit-detail-links
89
- omit-calls-to-action
90
- />
91
93
  <asd20-page-content
92
94
  :primary-messages="wayFindingPrimaryMessages"
93
95
  :secondary-messages="secondaryMessages"
@@ -229,7 +231,7 @@ export default {
229
231
  margin-bottom: space(1);
230
232
  }
231
233
  .asd20-feeds-section {
232
- margin-top: space(2);
234
+ // margin-top: space(2);
233
235
  .asd20-swiper-feed:first-child {
234
236
  padding-top: space(2);
235
237
  padding-bottom: space(1);
@@ -114,7 +114,8 @@
114
114
  }],
115
115
  "isCover": true,
116
116
  "metadata": {
117
- "alt": ""
117
+ "alt": "An RHS student cheers at her graduation ceremony.",
118
+ "credits": "Photo Credit: Allison Cortez"
118
119
  }
119
120
  }],
120
121
  "videos": [{
@@ -397,7 +397,8 @@
397
397
  }],
398
398
  "isCover": true,
399
399
  "metadata": {
400
- "alt": "The Kadet Coffee space."
400
+ "alt": "The Kadet Coffee space.",
401
+ "credits": "Photo Credit: Paul Hollendorfer"
401
402
  }
402
403
  }, {
403
404
  "files": [{
@@ -192,6 +192,7 @@ export default {
192
192
  let imageUrl = null
193
193
  let headerImageUrl = null
194
194
  let imageCaption = null
195
+ let imageCredits = null
195
196
  let videoUrl = firstVideo ? firstVideo.watchUrl : null
196
197
 
197
198
  // if (coverImage) {
@@ -213,6 +214,9 @@ export default {
213
214
  imageCaption = coverImage.metadata
214
215
  ? coverImage.metadata.alt
215
216
  : coverImage.alt || ''
217
+ imageCredits = coverImage.metadata
218
+ ? coverImage.metadata.credits
219
+ : coverImage.credits || ''
216
220
  }
217
221
  }
218
222
  // else if (firstVideo) {
@@ -227,6 +231,7 @@ export default {
227
231
  lead: this.firstMessage.shortDescription || '',
228
232
  imageUrl,
229
233
  imageCaption,
234
+ imageCredits,
230
235
  headerImageUrl,
231
236
  videoUrl,
232
237
  callsToAction: this.firstMessage.callsToAction,