@asd20/ui 3.2.1030 → 3.2.1032
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 +1 -1
- package/src/components/atoms/Asd20Messaging/index.vue +13 -7
- package/src/components/molecules/Asd20Card/index.vue +26 -50
- package/src/components/organisms/Asd20ImageHeader/index.vue +1 -2
- package/src/components/organisms/Asd20NotificationGroup/index.vue +49 -55
- package/src/components/organisms/Asd20PageContent/index.vue +26 -4
- package/src/components/organisms/Asd20PageHeader/index.vue +1 -2
- package/src/components/organisms/Asd20QuicklinksMenu/index.vue +1 -2
- package/src/components/organisms/Asd20SwiperFeed/index.vue +2 -2
- package/src/components/organisms/Asd20VideoHeaderContent/index.vue +1 -1
- package/src/components/templates/Asd20ArticleDigestCompactTemplate/index.vue +2 -1
- package/src/components/templates/Asd20ArticleDigestTemplate/index.vue +2 -1
- package/src/components/templates/Asd20ArticleListTemplate/index.vue +3 -2
- package/src/components/templates/Asd20ArticleTemplate/index.vue +2 -1
- package/src/components/templates/Asd20ClubsTemplate/index.vue +3 -2
- package/src/components/templates/Asd20DetailImageFullTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DetailImageTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DetailTemplate/index.vue +2 -1
- package/src/components/templates/Asd20LoginsTemplate/index.vue +2 -2
- package/src/components/templates/Asd20WayfindingAccessibilityTemplate/index.vue +2 -1
- package/src/components/templates/Asd20WayfindingAlternateTemplate/index.vue +2 -1
- package/src/components/templates/Asd20WayfindingImageTemplate/index.vue +2 -1
- package/src/components/templates/Asd20WayfindingTemplate/index.vue +2 -1
- package/src/data/page-queries/digest-page-query-result.json +1 -1
- package/src/data/page-queries/landing-page-query-result.json +2 -2
- package/src/data/page-queries/school-home-page-query-result.json +1 -1
- package/src/data/page-queries/story-index-page-query-result.json +1 -1
- package/src/data/page-queries/sublanding-page-query-result.json +1 -1
- package/src/helpers/mapMessageToCard.js +41 -15
package/package.json
CHANGED
|
@@ -28,9 +28,14 @@
|
|
|
28
28
|
class="long-description"
|
|
29
29
|
v-html="longDescription"
|
|
30
30
|
/>
|
|
31
|
-
<div v-if="bodyContent" class="asd20-messaging__body-content">
|
|
31
|
+
<!-- <div v-if="bodyContent" class="asd20-messaging__body-content">
|
|
32
32
|
<component :is="dynamicComponent"></component>
|
|
33
|
-
</div>
|
|
33
|
+
</div> -->
|
|
34
|
+
<div
|
|
35
|
+
v-if="bodyContent"
|
|
36
|
+
class="asd20-messaging__body-content"
|
|
37
|
+
v-html="bodyContent"
|
|
38
|
+
/>
|
|
34
39
|
|
|
35
40
|
<div
|
|
36
41
|
v-if="callsToAction && callsToAction.length > 0"
|
|
@@ -55,6 +60,7 @@ import Asd20Icon from '../Asd20Icon'
|
|
|
55
60
|
|
|
56
61
|
export default {
|
|
57
62
|
name: 'Asd20Messaging',
|
|
63
|
+
inheritAttrs: false,
|
|
58
64
|
components: { Asd20Button, Asd20Icon },
|
|
59
65
|
props: {
|
|
60
66
|
images: { type: Array, default: () => [] },
|
|
@@ -81,11 +87,11 @@ export default {
|
|
|
81
87
|
'asd20-messaging--padded': this.padded,
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
|
-
dynamicComponent() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
},
|
|
90
|
+
// dynamicComponent() {
|
|
91
|
+
// return {
|
|
92
|
+
// template: `<div>${this.bodyContent}</div>`,
|
|
93
|
+
// }
|
|
94
|
+
// },
|
|
89
95
|
messageImage() {
|
|
90
96
|
// Get full image
|
|
91
97
|
const messageImages = Array.isArray(this.images) ? this.images : []
|
|
@@ -22,20 +22,27 @@
|
|
|
22
22
|
</component>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<
|
|
25
|
+
<div
|
|
26
|
+
class="asd20-card__date"
|
|
27
|
+
v-if="!emphasizedDate && (date || (modifiedDate && showModifiedDate))"
|
|
28
|
+
>
|
|
26
29
|
<asd20-icon name="calendar" size="sm" />
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
+
|
|
31
|
+
<div class="asd20-card__date-lines">
|
|
32
|
+
<div class="asd20-card__date-line" v-if="date">
|
|
33
|
+
<span class="label">Published: </span>
|
|
34
|
+
<time>{{ date }}</time>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div
|
|
38
|
+
class="asd20-card__date-line"
|
|
30
39
|
v-if="modifiedDate && showModifiedDate"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</span>
|
|
38
|
-
</p>
|
|
40
|
+
>
|
|
41
|
+
<span class="label">Updated: </span>
|
|
42
|
+
<time>{{ modifiedDate }}</time>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
39
46
|
<p v-if="time" class="asd20-card__time">
|
|
40
47
|
<asd20-icon name="hours-alt" size="sm" />
|
|
41
48
|
<span v-html="time"></span>
|
|
@@ -156,8 +163,8 @@ export default {
|
|
|
156
163
|
const strippedDescription = this.description
|
|
157
164
|
//remove anchor tags but leave anchor text description
|
|
158
165
|
.replace(/<a[^>]*>(.*?)<\/a>/g, '$1')
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
// remove other html tags
|
|
167
|
+
// .replace(/<[^>]+>/g, '')
|
|
161
168
|
return truncate(strippedDescription, { length: 150, separator: /,? +/ })
|
|
162
169
|
},
|
|
163
170
|
classes() {
|
|
@@ -341,9 +348,10 @@ export default {
|
|
|
341
348
|
font-size: 0.85rem !important;
|
|
342
349
|
font-weight: bold;
|
|
343
350
|
font-family: var(--website-typography__font-family-headlines);
|
|
351
|
+
line-height: 1.2;
|
|
344
352
|
display: flex;
|
|
345
353
|
align-items: flex-start;
|
|
346
|
-
margin-top: space(0.
|
|
354
|
+
margin-top: space(0.5);
|
|
347
355
|
margin-bottom: space(0.25);
|
|
348
356
|
align-items: center;
|
|
349
357
|
.asd20-icon {
|
|
@@ -351,17 +359,11 @@ export default {
|
|
|
351
359
|
margin-left: -0.125em;
|
|
352
360
|
margin-right: space(0.25);
|
|
353
361
|
}
|
|
354
|
-
.date-meta {
|
|
355
|
-
font-size: 0.85rem !important;
|
|
356
|
-
}
|
|
357
362
|
}
|
|
358
363
|
&__time + &__location {
|
|
359
364
|
margin-top: space(0);
|
|
360
365
|
margin-bottom: space(0.25);
|
|
361
366
|
}
|
|
362
|
-
// &__date {
|
|
363
|
-
// margin-right: space(0.5);
|
|
364
|
-
// }
|
|
365
367
|
|
|
366
368
|
&--emphasized-date {
|
|
367
369
|
.asd20-card__header {
|
|
@@ -425,6 +427,9 @@ export default {
|
|
|
425
427
|
display: flex;
|
|
426
428
|
flex-wrap: wrap;
|
|
427
429
|
margin-left: space(-0.25);
|
|
430
|
+
.asd20-tag {
|
|
431
|
+
padding: 0 space(0.25);
|
|
432
|
+
}
|
|
428
433
|
}
|
|
429
434
|
|
|
430
435
|
&__indicators {
|
|
@@ -526,18 +531,7 @@ export default {
|
|
|
526
531
|
|
|
527
532
|
.asd20-card__header {
|
|
528
533
|
position: relative;
|
|
529
|
-
// left: 0;
|
|
530
|
-
// right: 0;
|
|
531
|
-
// bottom: 100%;
|
|
532
|
-
// padding: space(1) space(1);
|
|
533
|
-
// margin-bottom: space(0.5);
|
|
534
534
|
color: var(--website-card__foreground-color);
|
|
535
|
-
|
|
536
|
-
// background: linear-gradient(
|
|
537
|
-
// 0deg,
|
|
538
|
-
// rgba(0, 0, 0, 0.5) 70%,
|
|
539
|
-
// rgba(0, 0, 0, 0) 100%
|
|
540
|
-
// );
|
|
541
535
|
}
|
|
542
536
|
|
|
543
537
|
.asd20-card__date-time,
|
|
@@ -555,9 +549,6 @@ export default {
|
|
|
555
549
|
.asd20-card__title {
|
|
556
550
|
color: var(--website-card__reverse-foreground-color);
|
|
557
551
|
}
|
|
558
|
-
.asd20-card__link {
|
|
559
|
-
// color: var(--website-card__reverse-foreground-color) !important;
|
|
560
|
-
}
|
|
561
552
|
}
|
|
562
553
|
|
|
563
554
|
&--with-image:not(.asd20-card--seperate-image) {
|
|
@@ -574,17 +565,10 @@ export default {
|
|
|
574
565
|
&--reversed,
|
|
575
566
|
&--with-image:not(.asd20-card--seperate-image) {
|
|
576
567
|
color: var(--website-card__reverse-foreground-color);
|
|
577
|
-
// .asd20-card__date-time,
|
|
578
|
-
// .asd20-card__location {
|
|
579
|
-
// .asd20-icon {
|
|
580
|
-
// --line-color: var(--website-icon__fill-color-reverse);
|
|
581
|
-
// }
|
|
582
|
-
// }
|
|
583
568
|
}
|
|
584
569
|
&--reversed {
|
|
585
570
|
background: var(--website-card__reverse-background-color)
|
|
586
571
|
var(--website-card__reverse-background-style);
|
|
587
|
-
// box-shadow: none;
|
|
588
572
|
&:hover {
|
|
589
573
|
box-shadow: 0 0 0 0 transparent, var(--website-card__hover-shadow);
|
|
590
574
|
background: var(--website-card__hover-reverse-background-color);
|
|
@@ -592,17 +576,9 @@ export default {
|
|
|
592
576
|
::v-deep .asd20-icon {
|
|
593
577
|
--line-color: var(--website-card__reverse-foreground-color);
|
|
594
578
|
}
|
|
595
|
-
// .asd20-card__date-time,
|
|
596
|
-
// .asd20-card__location {
|
|
597
|
-
// &::v-deep .asd20-icon g{
|
|
598
|
-
// --line-color: var(--website-icon__fill-color-reverse);
|
|
599
|
-
// // --line-color: red;
|
|
600
|
-
// }
|
|
601
|
-
// }
|
|
602
579
|
}
|
|
603
580
|
|
|
604
581
|
&--expanded-header {
|
|
605
|
-
// background: var(--website-card__hover-background-color);
|
|
606
582
|
.asd20-card__header {
|
|
607
583
|
flex-grow: 1;
|
|
608
584
|
display: flex;
|
|
@@ -324,7 +324,6 @@ export default {
|
|
|
324
324
|
width: max-content;
|
|
325
325
|
background: rgba(255, 255, 255, 0.9);
|
|
326
326
|
border-radius: 3rem;
|
|
327
|
-
padding: 0 1em 0 0.5em;
|
|
328
327
|
&::v-deep .asd20-select-input {
|
|
329
328
|
color: var(--website-page__foreground-color) !important;
|
|
330
329
|
}
|
|
@@ -369,7 +368,7 @@ export default {
|
|
|
369
368
|
z-index: 1;
|
|
370
369
|
position: relative;
|
|
371
370
|
color: var(--website-header__foreground-color);
|
|
372
|
-
padding: space(1.5) space(
|
|
371
|
+
padding: space(1.5) space(0.5) space(3) space(0.5);
|
|
373
372
|
background: var(--website-header__background-color)
|
|
374
373
|
var(--website-header__background-style);
|
|
375
374
|
// background: var(--website-header__background-color) var(--imageBackground)
|
|
@@ -41,7 +41,9 @@
|
|
|
41
41
|
"
|
|
42
42
|
@click.native="$emit('toggle-all')"
|
|
43
43
|
>
|
|
44
|
-
<span v-if="totalDismissedNotifications > 0" aria-hidden="true">{{
|
|
44
|
+
<span v-if="totalDismissedNotifications > 0" aria-hidden="true">{{
|
|
45
|
+
totalDismissedNotifications
|
|
46
|
+
}}</span>
|
|
45
47
|
</asd20-button>
|
|
46
48
|
|
|
47
49
|
<div
|
|
@@ -100,7 +102,7 @@ export default {
|
|
|
100
102
|
notificationsFromIndex: [],
|
|
101
103
|
enterActiveClass: 'fade-in',
|
|
102
104
|
leaveActiveClass: 'fade-out',
|
|
103
|
-
}
|
|
105
|
+
}
|
|
104
106
|
},
|
|
105
107
|
|
|
106
108
|
computed: {
|
|
@@ -112,29 +114,29 @@ export default {
|
|
|
112
114
|
]
|
|
113
115
|
},
|
|
114
116
|
showControls() {
|
|
115
|
-
return this.notifications.length > 1
|
|
117
|
+
return this.notifications.length > 1
|
|
116
118
|
},
|
|
117
|
-
nextTitle
|
|
119
|
+
nextTitle() {
|
|
118
120
|
return `Go to notification ${
|
|
119
121
|
this.index + 1 > this.notificationsFromIndex.length - 1
|
|
120
122
|
? 1
|
|
121
123
|
: this.index + 2
|
|
122
124
|
} of ${this.notificationsFromIndex.length}`
|
|
123
125
|
},
|
|
124
|
-
prevTitle
|
|
126
|
+
prevTitle() {
|
|
125
127
|
return `Go to notification ${
|
|
126
128
|
this.index - 1 < 0 ? this.notificationsFromIndex.length : this.index
|
|
127
129
|
} of ${this.notificationsFromIndex.length}`
|
|
128
|
-
}
|
|
130
|
+
},
|
|
129
131
|
},
|
|
130
132
|
created() {
|
|
131
|
-
this.initNotifications(this.notifications)
|
|
133
|
+
this.initNotifications(this.notifications)
|
|
132
134
|
},
|
|
133
135
|
|
|
134
136
|
watch: {
|
|
135
|
-
notifications: function(value) {
|
|
136
|
-
this.initNotifications(value)
|
|
137
|
-
}
|
|
137
|
+
notifications: function (value) {
|
|
138
|
+
this.initNotifications(value)
|
|
139
|
+
},
|
|
138
140
|
},
|
|
139
141
|
methods: {
|
|
140
142
|
initNotifications(incomingNotifications) {
|
|
@@ -146,24 +148,28 @@ export default {
|
|
|
146
148
|
const newNotifications = incomingNotifications
|
|
147
149
|
.filter(n => !this.notificationsFromIndex.find(n2 => n2.id === n.id))
|
|
148
150
|
.map(newN => ({
|
|
149
|
-
...newN,
|
|
151
|
+
...newN,
|
|
150
152
|
key: Math.random().toString(36).substr(2, 9),
|
|
151
|
-
ariaHidden: true
|
|
153
|
+
ariaHidden: true,
|
|
152
154
|
}))
|
|
153
155
|
// take care of notifications that match and keep their existing key value to prevent animations from occurring
|
|
154
156
|
for (const [oldIndex, oldNotification] of Object.entries(
|
|
155
157
|
this.notificationsFromIndex
|
|
156
158
|
)) {
|
|
157
|
-
const matchingUpdatedNotification = (incomingNotifications || []).find(
|
|
158
|
-
|
|
159
|
+
const matchingUpdatedNotification = (incomingNotifications || []).find(
|
|
160
|
+
n => n.id === oldNotification.id
|
|
161
|
+
)
|
|
162
|
+
if (matchingUpdatedNotification) {
|
|
159
163
|
this.notificationsFromIndex[oldIndex] = {
|
|
160
164
|
...matchingUpdatedNotification,
|
|
161
|
-
key: this.notificationsFromIndex[oldIndex].key
|
|
165
|
+
key: this.notificationsFromIndex[oldIndex].key,
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
169
|
// put new notifications at the beginning of the array
|
|
166
|
-
this.notificationsFromIndex = newNotifications.concat(
|
|
170
|
+
this.notificationsFromIndex = newNotifications.concat(
|
|
171
|
+
this.notificationsFromIndex
|
|
172
|
+
)
|
|
167
173
|
// if(this.index > this.notificationsFromIndex.length -1 )
|
|
168
174
|
if (
|
|
169
175
|
newNotifications.length > 0 ||
|
|
@@ -175,13 +181,11 @@ export default {
|
|
|
175
181
|
},
|
|
176
182
|
next() {
|
|
177
183
|
const newIndex =
|
|
178
|
-
this.index < this.notifications.length - 1 ? this.index + 1 : 0
|
|
184
|
+
this.index < this.notifications.length - 1 ? this.index + 1 : 0
|
|
179
185
|
|
|
180
|
-
const topItem = this.notificationsFromIndex[0]
|
|
186
|
+
const topItem = this.notificationsFromIndex[0]
|
|
181
187
|
|
|
182
|
-
topItem.key = Math.random()
|
|
183
|
-
.toString(36)
|
|
184
|
-
.substr(2, 9);
|
|
188
|
+
topItem.key = Math.random().toString(36).substr(2, 9)
|
|
185
189
|
|
|
186
190
|
if (this.groupType === 'banner') {
|
|
187
191
|
this.enterActiveClass = ''
|
|
@@ -192,13 +196,13 @@ export default {
|
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
// Remove top item
|
|
195
|
-
this.notificationsFromIndex.splice(0, 1)
|
|
199
|
+
this.notificationsFromIndex.splice(0, 1)
|
|
196
200
|
|
|
197
201
|
// Add top item to bottom
|
|
198
|
-
this.notificationsFromIndex.push(topItem)
|
|
202
|
+
this.notificationsFromIndex.push(topItem)
|
|
199
203
|
|
|
200
204
|
// Update the index
|
|
201
|
-
this.index = newIndex
|
|
205
|
+
this.index = newIndex
|
|
202
206
|
},
|
|
203
207
|
previous() {
|
|
204
208
|
if (this.groupType === 'banner') {
|
|
@@ -211,31 +215,29 @@ export default {
|
|
|
211
215
|
|
|
212
216
|
const notifications = this.notifications.map(n => ({
|
|
213
217
|
...n,
|
|
214
|
-
key: this.notificationsFromIndex.find(n2 => n2.title === n.title).key
|
|
215
|
-
}))
|
|
218
|
+
key: this.notificationsFromIndex.find(n2 => n2.title === n.title).key,
|
|
219
|
+
}))
|
|
216
220
|
const replacementIndex =
|
|
217
|
-
this.index > 0 ? this.index - 1 : this.notifications.length - 1
|
|
221
|
+
this.index > 0 ? this.index - 1 : this.notifications.length - 1
|
|
218
222
|
|
|
219
223
|
const newItem = {
|
|
220
224
|
...notifications[replacementIndex],
|
|
221
|
-
key: Math.random()
|
|
222
|
-
.toString(36)
|
|
223
|
-
.substr(2, 9)
|
|
225
|
+
key: Math.random().toString(36).substr(2, 9),
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
// Remove old item
|
|
227
|
-
notifications.splice(replacementIndex, 1)
|
|
229
|
+
notifications.splice(replacementIndex, 1)
|
|
228
230
|
|
|
229
231
|
// Add top item to top
|
|
230
|
-
notifications.unshift(newItem)
|
|
232
|
+
notifications.unshift(newItem)
|
|
231
233
|
|
|
232
|
-
this.notificationsFromIndex = notifications
|
|
234
|
+
this.notificationsFromIndex = notifications
|
|
233
235
|
|
|
234
236
|
// Update the index
|
|
235
|
-
this.index = replacementIndex
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
237
|
+
this.index = replacementIndex
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
}
|
|
239
241
|
</script>
|
|
240
242
|
|
|
241
243
|
<style lang="scss">
|
|
@@ -287,8 +289,8 @@ export default {
|
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
svg {
|
|
290
|
-
width:
|
|
291
|
-
height:
|
|
292
|
+
width: 32px;
|
|
293
|
+
height: 32px;
|
|
292
294
|
color: var(--website-icon__line-color) !important;
|
|
293
295
|
fill: var(--website-menu__icon-fill-color) !important;
|
|
294
296
|
}
|
|
@@ -357,10 +359,9 @@ export default {
|
|
|
357
359
|
background: rgba(255, 255, 255, 0.85);
|
|
358
360
|
align-self: stretch;
|
|
359
361
|
margin-right: -2rem;
|
|
360
|
-
// z-index: -1;
|
|
361
362
|
z-index: 8;
|
|
362
363
|
padding-right: 2rem;
|
|
363
|
-
|
|
364
|
+
padding-left: 0.5rem;
|
|
364
365
|
border-radius: 3rem;
|
|
365
366
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.0625);
|
|
366
367
|
}
|
|
@@ -381,7 +382,8 @@ export default {
|
|
|
381
382
|
border-radius: var(--website-shape__radius-m);
|
|
382
383
|
&:first-child {
|
|
383
384
|
z-index: 9;
|
|
384
|
-
.asd20-notification__content,
|
|
385
|
+
.asd20-notification__content,
|
|
386
|
+
g {
|
|
385
387
|
transition: all 0.5s;
|
|
386
388
|
opacity: 1;
|
|
387
389
|
align-self: initial !important;
|
|
@@ -398,7 +400,8 @@ export default {
|
|
|
398
400
|
overflow-y: hidden;
|
|
399
401
|
transform: translateY(#{0.75 * ($i - 1)}rem)
|
|
400
402
|
scale(#{1 - (($i - 1) * 0.05)});
|
|
401
|
-
.asd20-notification__content,
|
|
403
|
+
.asd20-notification__content,
|
|
404
|
+
g {
|
|
402
405
|
transition: all 0.5s;
|
|
403
406
|
opacity: 0.5;
|
|
404
407
|
}
|
|
@@ -441,7 +444,7 @@ export default {
|
|
|
441
444
|
left: 0.5rem;
|
|
442
445
|
}
|
|
443
446
|
|
|
444
|
-
|
|
447
|
+
&--top-left {
|
|
445
448
|
position: fixed;
|
|
446
449
|
top: 0.5rem;
|
|
447
450
|
left: 0.5rem;
|
|
@@ -458,15 +461,6 @@ export default {
|
|
|
458
461
|
fill: #ffffff;
|
|
459
462
|
}
|
|
460
463
|
}
|
|
461
|
-
&--banner .notifications {
|
|
462
|
-
// flex-direction: column;
|
|
463
|
-
// position: absolute;
|
|
464
|
-
// top: calc(100% + 0.5rem);
|
|
465
|
-
// right: 0;
|
|
466
|
-
// left: auto;
|
|
467
|
-
// width: 100%;
|
|
468
|
-
// display: flex;
|
|
469
|
-
}
|
|
470
464
|
&--banner .notification {
|
|
471
465
|
transition: all 0.25s;
|
|
472
466
|
top: 0;
|
|
@@ -631,11 +625,11 @@ export default {
|
|
|
631
625
|
|
|
632
626
|
@keyframes swoop-in {
|
|
633
627
|
0% {
|
|
634
|
-
transform: scale(0
|
|
628
|
+
transform: scale(0);
|
|
635
629
|
opacity: 0;
|
|
636
630
|
}
|
|
637
631
|
100% {
|
|
638
|
-
transform: scale(1
|
|
632
|
+
transform: scale(1);
|
|
639
633
|
opacity: 1;
|
|
640
634
|
}
|
|
641
635
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
(formattedPrimaryMessages.length > 0 &&
|
|
7
7
|
primaryMessages[0].bodyContent &&
|
|
8
8
|
primaryMessages[0].bodyContent !== '<p></p>') ||
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
formattedPrimaryMessages.length > 1 ||
|
|
10
|
+
forceDisplay
|
|
11
11
|
"
|
|
12
12
|
>
|
|
13
13
|
<slot name="before"></slot>
|
|
@@ -45,15 +45,37 @@
|
|
|
45
45
|
<script>
|
|
46
46
|
import Asd20Messaging from '../../atoms/Asd20Messaging'
|
|
47
47
|
|
|
48
|
+
// function formatMessage(
|
|
49
|
+
// message,
|
|
50
|
+
// omitBodyContent,
|
|
51
|
+
// omitDetailLink,
|
|
52
|
+
// omitCallsToAction
|
|
53
|
+
// ) {
|
|
54
|
+
// return {
|
|
55
|
+
// ...message,
|
|
56
|
+
// bodyContent: omitBodyContent ? '' : message.bodyContent,
|
|
57
|
+
// detailLink: omitDetailLink ? '' : message.detailLink,
|
|
58
|
+
// callsToAction: omitCallsToAction ? [] : message.callsToAction,
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
61
|
+
|
|
48
62
|
function formatMessage(
|
|
49
63
|
message,
|
|
50
64
|
omitBodyContent,
|
|
51
65
|
omitDetailLink,
|
|
52
66
|
omitCallsToAction
|
|
53
67
|
) {
|
|
68
|
+
// Prefer existing bodyContent, else fall back to bodyHtml
|
|
69
|
+
const body = omitBodyContent
|
|
70
|
+
? ''
|
|
71
|
+
: message.bodyContent || message.bodyHtml || ''
|
|
72
|
+
|
|
73
|
+
// Strip bodyHtml so it doesn't "fall through" as a root attribute
|
|
74
|
+
const { bodyHtml, ...rest } = message
|
|
75
|
+
|
|
54
76
|
return {
|
|
55
|
-
...
|
|
56
|
-
bodyContent:
|
|
77
|
+
...rest,
|
|
78
|
+
bodyContent: body,
|
|
57
79
|
detailLink: omitDetailLink ? '' : message.detailLink,
|
|
58
80
|
callsToAction: omitCallsToAction ? [] : message.callsToAction,
|
|
59
81
|
}
|
|
@@ -354,7 +354,6 @@ export default {
|
|
|
354
354
|
width: max-content;
|
|
355
355
|
background: rgba(255, 255, 255, 0.9);
|
|
356
356
|
border-radius: 3rem;
|
|
357
|
-
padding: 0 1em 0 0.5em;
|
|
358
357
|
&::v-deep .asd20-select-input {
|
|
359
358
|
color: var(--website-page__foreground-color) !important;
|
|
360
359
|
}
|
|
@@ -404,7 +403,7 @@ export default {
|
|
|
404
403
|
background: var(--website-header__background-color)
|
|
405
404
|
var(--website-header__background-style);
|
|
406
405
|
color: var(--website-header__foreground-color);
|
|
407
|
-
padding: space(1) space(
|
|
406
|
+
padding: space(1) space(0.5);
|
|
408
407
|
z-index: 1;
|
|
409
408
|
&::v-deep .asd20-breadcrumb {
|
|
410
409
|
margin: space(1) 0;
|
|
@@ -77,6 +77,7 @@ export default {
|
|
|
77
77
|
text-align: center;
|
|
78
78
|
flex: 1 1;
|
|
79
79
|
align-self: start;
|
|
80
|
+
margin: space(0.5) 0;
|
|
80
81
|
&::v-deep .asd20-button__label {
|
|
81
82
|
margin-left: space(0);
|
|
82
83
|
}
|
|
@@ -87,8 +88,6 @@ export default {
|
|
|
87
88
|
@media (min-width: 1024px) {
|
|
88
89
|
.asd20-quicklinks-menu {
|
|
89
90
|
padding: space(0) space(1);
|
|
90
|
-
.asd20-button {
|
|
91
|
-
}
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
</style>
|
|
@@ -214,7 +214,7 @@ export default {
|
|
|
214
214
|
.asd20-swiper-feed {
|
|
215
215
|
.feed-buttons {
|
|
216
216
|
flex-direction: row;
|
|
217
|
-
margin-left:
|
|
217
|
+
margin-left: 0;
|
|
218
218
|
}
|
|
219
219
|
.secondary-button {
|
|
220
220
|
margin: 0 0 0 space(0.5);
|
|
@@ -240,7 +240,7 @@ export default {
|
|
|
240
240
|
font-size: 1rem !important;
|
|
241
241
|
}
|
|
242
242
|
.feed-buttons {
|
|
243
|
-
margin-left: space(
|
|
243
|
+
margin-left: space(2);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
border-radius: var(--website-shape__radius-m) 0 0 var(--website-shape__radius-m);
|
|
263
263
|
/* Make sure it sits behind the messaging card */
|
|
264
264
|
z-index: -1;
|
|
265
|
-
animation: slide_left2
|
|
265
|
+
animation: slide_left2 2s ease-in-out 0s both;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
&::v-deep .asd20-messaging__button-group {
|
|
@@ -410,7 +410,8 @@ export default {
|
|
|
410
410
|
margin-top: space(2.25);
|
|
411
411
|
.asd20-notification-group--floating {
|
|
412
412
|
position: absolute;
|
|
413
|
-
top: space(2
|
|
413
|
+
top: space(2);
|
|
414
|
+
right: space(0.75);
|
|
414
415
|
}
|
|
415
416
|
.notification-group--inline {
|
|
416
417
|
margin: space(2) space(1) space(1) space(1);
|
|
@@ -423,7 +423,8 @@ export default {
|
|
|
423
423
|
margin-top: space(2.25);
|
|
424
424
|
.asd20-notification-group--floating {
|
|
425
425
|
position: absolute;
|
|
426
|
-
top: space(2
|
|
426
|
+
top: space(2);
|
|
427
|
+
right: space(0.75);
|
|
427
428
|
}
|
|
428
429
|
.notification-group--inline {
|
|
429
430
|
margin: space(2) space(1) space(1) space(1);
|
|
@@ -331,7 +331,7 @@ export default {
|
|
|
331
331
|
keywords: { type: String, default: '' },
|
|
332
332
|
selectedCategories: { type: Array, default: () => [] },
|
|
333
333
|
},
|
|
334
|
-
data: function() {
|
|
334
|
+
data: function () {
|
|
335
335
|
return {
|
|
336
336
|
numberToShow: 25,
|
|
337
337
|
counter: 1,
|
|
@@ -466,7 +466,8 @@ export default {
|
|
|
466
466
|
margin-top: space(2.25);
|
|
467
467
|
.asd20-notification-group--floating {
|
|
468
468
|
position: absolute;
|
|
469
|
-
top: space(2
|
|
469
|
+
top: space(2);
|
|
470
|
+
right: space(0.75);
|
|
470
471
|
}
|
|
471
472
|
.feed-title {
|
|
472
473
|
margin: space(1) 0 0 0;
|
|
@@ -314,7 +314,7 @@ export default {
|
|
|
314
314
|
selectedCategories: { type: Array, default: () => [] },
|
|
315
315
|
// categoryOptions: { type: Array, default: () => [] },
|
|
316
316
|
},
|
|
317
|
-
data: function() {
|
|
317
|
+
data: function () {
|
|
318
318
|
return {
|
|
319
319
|
numberToShow: 100,
|
|
320
320
|
counter: 1,
|
|
@@ -408,7 +408,8 @@ export default {
|
|
|
408
408
|
margin-top: space(2.25);
|
|
409
409
|
.asd20-notification-group--floating {
|
|
410
410
|
position: absolute;
|
|
411
|
-
top: space(2
|
|
411
|
+
top: space(2);
|
|
412
|
+
right: space(0.75);
|
|
412
413
|
}
|
|
413
414
|
.asd20-page-content {
|
|
414
415
|
display: block;
|
|
@@ -243,7 +243,8 @@ export default {
|
|
|
243
243
|
margin-top: space(2.25);
|
|
244
244
|
.asd20-notification-group--floating {
|
|
245
245
|
position: absolute;
|
|
246
|
-
top: space(2
|
|
246
|
+
top: space(2);
|
|
247
|
+
right: space(0.75);
|
|
247
248
|
}
|
|
248
249
|
.asd20-notification-group--inline {
|
|
249
250
|
margin-top: space(2) !important;
|
|
@@ -221,7 +221,8 @@ export default {
|
|
|
221
221
|
margin-top: space(2.25);
|
|
222
222
|
.asd20-notification-group--floating {
|
|
223
223
|
position: absolute;
|
|
224
|
-
top: space(2
|
|
224
|
+
top: space(2);
|
|
225
|
+
right: space(0.75);
|
|
225
226
|
}
|
|
226
227
|
.asd20-notification-group--inline {
|
|
227
228
|
margin-top: space(2) !important;
|
|
@@ -222,7 +222,8 @@ export default {
|
|
|
222
222
|
margin-top: space(2.25);
|
|
223
223
|
.asd20-notification-group--floating {
|
|
224
224
|
position: absolute;
|
|
225
|
-
top: space(2
|
|
225
|
+
top: space(2);
|
|
226
|
+
right: space(0.75);
|
|
226
227
|
}
|
|
227
228
|
.asd20-notification-group--inline {
|
|
228
229
|
margin-top: space(2) !important;
|
|
@@ -217,7 +217,8 @@ export default {
|
|
|
217
217
|
margin-top: space(2.25);
|
|
218
218
|
.asd20-notification-group--floating {
|
|
219
219
|
position: absolute;
|
|
220
|
-
top: space(2
|
|
220
|
+
top: space(2);
|
|
221
|
+
right: space(0.75);
|
|
221
222
|
}
|
|
222
223
|
.asd20-notification-group--inline {
|
|
223
224
|
margin-top: space(2) !important;
|
|
@@ -897,7 +897,7 @@
|
|
|
897
897
|
"id": "f4656914-9ec6-1811-aa5d-31f532f483d5",
|
|
898
898
|
"title": "Discovery Canyon Campus High School",
|
|
899
899
|
"educationLevels": ["High"],
|
|
900
|
-
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/
|
|
900
|
+
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/DCC.png",
|
|
901
901
|
"website": "https://dcchigh.asd20.org"
|
|
902
902
|
}, {
|
|
903
903
|
"id": "b6341b18-f4b9-311d-614c-a0ee36eb3254",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"isCover": false,
|
|
125
125
|
"files": [{
|
|
126
126
|
"name": "full",
|
|
127
|
-
"url": "https://asd20websitestorage.blob.core.windows.net/website-files/message-images
|
|
127
|
+
"url": "https://asd20websitestorage.blob.core.windows.net/website-files/message-images/supports-for-academic-success/full/AEES_student_selects_book_1280x582_2023-06-12T18_54_25.jpg"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"name": "thumbnail-md",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
{
|
|
162
162
|
"name": "full",
|
|
163
163
|
"filename": "PES Accredidation Hero_1280x711_2023-08-29T21_16_58.jpg",
|
|
164
|
-
"url": "https://asd20websitestorage.blob.core.windows.net/website-files/message-images/
|
|
164
|
+
"url": "https://asd20websitestorage.blob.core.windows.net/website-files/message-images/supports-for-academic-success/full/AEES_student_selects_book_1280x582_2023-06-12T18_54_25.jpg"
|
|
165
165
|
}
|
|
166
166
|
],
|
|
167
167
|
"metadata": {
|
|
@@ -980,7 +980,7 @@
|
|
|
980
980
|
"id": "26eaf390-d8ab-11e9-a3a8-5de5bba4f125",
|
|
981
981
|
"title": "Academy District 20",
|
|
982
982
|
"educationLevels": [],
|
|
983
|
-
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/
|
|
983
|
+
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/ASD20.png",
|
|
984
984
|
"website": "https://www.asd20.org"
|
|
985
985
|
}, {
|
|
986
986
|
"id": "10a1d179-6149-064e-7034-36c1a1e7f790",
|
|
@@ -853,7 +853,7 @@
|
|
|
853
853
|
"id": "f4656914-9ec6-1811-aa5d-31f532f483d5",
|
|
854
854
|
"title": "Discovery Canyon Campus High School",
|
|
855
855
|
"educationLevels": ["High"],
|
|
856
|
-
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/
|
|
856
|
+
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/DCC.png",
|
|
857
857
|
"website": "https://dcchigh.asd20.org"
|
|
858
858
|
}, {
|
|
859
859
|
"id": "b6341b18-f4b9-311d-614c-a0ee36eb3254",
|
|
@@ -1576,7 +1576,7 @@
|
|
|
1576
1576
|
"id": "f4656914-9ec6-1811-aa5d-31f532f483d5",
|
|
1577
1577
|
"title": "Discovery Canyon Campus High School",
|
|
1578
1578
|
"educationLevels": ["High"],
|
|
1579
|
-
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/
|
|
1579
|
+
"logoImageUrl": "https://asd20websitestorage.blob.core.windows.net/asd20-images/school-logos/DCC.png",
|
|
1580
1580
|
"website": "https://dcchigh.asd20.org"
|
|
1581
1581
|
}, {
|
|
1582
1582
|
"id": "b6341b18-f4b9-311d-614c-a0ee36eb3254",
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { format, parseISO } from 'date-fns'
|
|
2
2
|
|
|
3
|
+
function formatApDate(iso) {
|
|
4
|
+
try {
|
|
5
|
+
const d = parseISO(iso)
|
|
6
|
+
if (isNaN(d)) return ''
|
|
7
|
+
const m = format(d, 'MMM') // locale-dependent; assumes en-US -> 'May'
|
|
8
|
+
const mOut = m === 'May' ? m : `${m}.`
|
|
9
|
+
return `${mOut} ${format(d, 'd, yyyy')}`
|
|
10
|
+
} catch {
|
|
11
|
+
return ''
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
3
15
|
export default function mapMessageToCard(
|
|
4
16
|
message,
|
|
5
17
|
options = {},
|
|
@@ -53,28 +65,42 @@ export default function mapMessageToCard(
|
|
|
53
65
|
let modifiedDate = ''
|
|
54
66
|
let time = ''
|
|
55
67
|
|
|
68
|
+
// if (message.publishDateTime) {
|
|
69
|
+
// try {
|
|
70
|
+
// const parsed = parseISO(message.publishDateTime)
|
|
71
|
+
// if (!isNaN(parsed)) {
|
|
72
|
+
// date = format(parsed, 'MMM. d, yyyy')
|
|
73
|
+
// time = format(parsed, 'h:mm aa')
|
|
74
|
+
// }
|
|
75
|
+
// } catch (e) {
|
|
76
|
+
// date = ''
|
|
77
|
+
// time = ''
|
|
78
|
+
// }
|
|
79
|
+
// }
|
|
80
|
+
|
|
56
81
|
if (message.publishDateTime) {
|
|
82
|
+
date = formatApDate(message.publishDateTime)
|
|
57
83
|
try {
|
|
58
84
|
const parsed = parseISO(message.publishDateTime)
|
|
59
|
-
if (!isNaN(parsed))
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
} catch (e) {
|
|
64
|
-
date = ''
|
|
65
|
-
time = ''
|
|
85
|
+
if (!isNaN(parsed)) time = format(parsed, 'h:mm aa')
|
|
86
|
+
} catch {
|
|
87
|
+
/* ignore */
|
|
66
88
|
}
|
|
67
89
|
}
|
|
68
90
|
|
|
91
|
+
// if (message.modifiedDateTime) {
|
|
92
|
+
// try {
|
|
93
|
+
// const parsed = parseISO(message.modifiedDateTime)
|
|
94
|
+
// if (!isNaN(parsed)) {
|
|
95
|
+
// modifiedDate = format(parsed, 'MMM. d, yyyy')
|
|
96
|
+
// }
|
|
97
|
+
// } catch (e) {
|
|
98
|
+
// modifiedDate = ''
|
|
99
|
+
// }
|
|
100
|
+
// }
|
|
101
|
+
|
|
69
102
|
if (message.modifiedDateTime) {
|
|
70
|
-
|
|
71
|
-
const parsed = parseISO(message.modifiedDateTime)
|
|
72
|
-
if (!isNaN(parsed)) {
|
|
73
|
-
modifiedDate = format(parsed, 'MMM. d, yyyy')
|
|
74
|
-
}
|
|
75
|
-
} catch (e) {
|
|
76
|
-
modifiedDate = ''
|
|
77
|
-
}
|
|
103
|
+
modifiedDate = formatApDate(message.modifiedDateTime)
|
|
78
104
|
}
|
|
79
105
|
|
|
80
106
|
return Object.assign(
|