@asd20/ui 3.2.842 → 3.2.844
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/molecules/Asd20Card/index.vue +44 -18
- package/src/components/organisms/Asd20FeedsSection/index.vue +0 -2
- package/src/components/templates/Asd20ArticleDigestTemplate/index.vue +1 -1
- package/src/design/_typography.scss +1 -1
- package/src/helpers/mapMessageToCard.js +1 -0
package/package.json
CHANGED
|
@@ -22,16 +22,26 @@
|
|
|
22
22
|
</component>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<p class="asd20-card__date
|
|
25
|
+
<p class="asd20-card__date" v-if="date && !emphasizedDate">
|
|
26
|
+
<asd20-icon name="calendar" size="sm" />
|
|
27
|
+
<span v-if="modifiedDate && showModifiedDate" class="date-meta">
|
|
28
|
+
<span>Updated: </span>
|
|
29
|
+
<span
|
|
30
|
+
v-if="modifiedDate && showModifiedDate"
|
|
31
|
+
v-html="modifiedDate"
|
|
32
|
+
></span>
|
|
33
|
+
</span>
|
|
34
|
+
<span v-else class="date-meta">
|
|
35
|
+
<span>Published: </span>
|
|
36
|
+
<span v-if="date && !emphasizedDate" v-html="date"></span>
|
|
37
|
+
</span>
|
|
38
|
+
</p>
|
|
39
|
+
<p v-if="time" class="asd20-card__time">
|
|
26
40
|
<asd20-icon name="hours-alt" size="sm" />
|
|
27
|
-
<span
|
|
28
|
-
v-if="date && !emphasizedDate"
|
|
29
|
-
class="asd20-card__date"
|
|
30
|
-
v-html="date"
|
|
31
|
-
></span>
|
|
32
|
-
<span v-if="time" class="asd20-card__time" v-html="time"></span>
|
|
41
|
+
<span v-html="time"></span>
|
|
33
42
|
</p>
|
|
34
|
-
|
|
43
|
+
|
|
44
|
+
<p v-if="location" class="asd20-card__location">
|
|
35
45
|
<asd20-icon name="map" size="sm" />
|
|
36
46
|
<span v-html="location"></span>
|
|
37
47
|
</p>
|
|
@@ -113,6 +123,7 @@ export default {
|
|
|
113
123
|
linkLabel: { type: String, default: '' },
|
|
114
124
|
emphasizedDate: { type: Boolean, default: false },
|
|
115
125
|
date: { type: String, default: '' },
|
|
126
|
+
modifiedDate: { type: String, default: '' },
|
|
116
127
|
time: { type: String, default: '' },
|
|
117
128
|
weekday: { type: String, default: '' },
|
|
118
129
|
day: { type: String, default: '' },
|
|
@@ -164,6 +175,17 @@ export default {
|
|
|
164
175
|
this.hasFile
|
|
165
176
|
)
|
|
166
177
|
},
|
|
178
|
+
showModifiedDate() {
|
|
179
|
+
const publishDateTimeString = new Date(this.date)
|
|
180
|
+
const modifiedDateTimeString = new Date(this.modifiedDate)
|
|
181
|
+
// console.log(publishDateTimeString, modifiedDateTimeString)
|
|
182
|
+
|
|
183
|
+
let publishDateTimePlusOne = new Date(
|
|
184
|
+
publishDateTimeString.setDate(publishDateTimeString.getDate() + 1)
|
|
185
|
+
)
|
|
186
|
+
// console.log(publishDateTimePlusOne, modifiedDateTimeString)
|
|
187
|
+
return modifiedDateTimeString > publishDateTimePlusOne ? true : false
|
|
188
|
+
},
|
|
167
189
|
},
|
|
168
190
|
}
|
|
169
191
|
</script>
|
|
@@ -202,7 +224,7 @@ export default {
|
|
|
202
224
|
|
|
203
225
|
font-family: var(--website-typography__font-family-body);
|
|
204
226
|
line-height: 1.2;
|
|
205
|
-
font-size:
|
|
227
|
+
font-size: 1rem;
|
|
206
228
|
|
|
207
229
|
// ::v-deep .asd20-icon g {
|
|
208
230
|
// --line-color: var(--color__accent);
|
|
@@ -301,12 +323,13 @@ export default {
|
|
|
301
323
|
}
|
|
302
324
|
}
|
|
303
325
|
|
|
304
|
-
&__date
|
|
326
|
+
&__date,
|
|
327
|
+
&__time,
|
|
305
328
|
&__location {
|
|
306
|
-
font-size:
|
|
329
|
+
font-size: 0.85rem !important;
|
|
307
330
|
font-weight: normal;
|
|
308
331
|
display: flex;
|
|
309
|
-
align-items:
|
|
332
|
+
align-items: center;
|
|
310
333
|
margin-top: space(0.5);
|
|
311
334
|
margin-bottom: 0;
|
|
312
335
|
.asd20-icon {
|
|
@@ -314,13 +337,16 @@ export default {
|
|
|
314
337
|
margin-left: -0.125em;
|
|
315
338
|
margin-right: space(0.25);
|
|
316
339
|
}
|
|
340
|
+
.date-meta {
|
|
341
|
+
font-size: 0.85rem !important;
|
|
342
|
+
}
|
|
317
343
|
}
|
|
318
|
-
&
|
|
344
|
+
&__time + &__location {
|
|
319
345
|
margin-top: space(0);
|
|
320
346
|
}
|
|
321
|
-
&__date {
|
|
322
|
-
|
|
323
|
-
}
|
|
347
|
+
// &__date {
|
|
348
|
+
// margin-right: space(0.5);
|
|
349
|
+
// }
|
|
324
350
|
|
|
325
351
|
&--emphasized-date {
|
|
326
352
|
.asd20-card__header {
|
|
@@ -489,7 +515,7 @@ export default {
|
|
|
489
515
|
// right: 0;
|
|
490
516
|
// bottom: 100%;
|
|
491
517
|
// padding: space(1) space(1);
|
|
492
|
-
// margin-bottom: 0;
|
|
518
|
+
// margin-bottom: space(0.5);
|
|
493
519
|
color: var(--website-card__foreground-color);
|
|
494
520
|
|
|
495
521
|
// background: linear-gradient(
|
|
@@ -584,7 +610,7 @@ export default {
|
|
|
584
610
|
|
|
585
611
|
@media (min-width: 1024px) {
|
|
586
612
|
.asd20-card {
|
|
587
|
-
font-size: 1.25rem;
|
|
613
|
+
// font-size: 1.25rem;
|
|
588
614
|
min-height: 15vw;
|
|
589
615
|
|
|
590
616
|
&__description {
|
|
@@ -97,7 +97,6 @@ export default {
|
|
|
97
97
|
return this.announcements.map(a =>
|
|
98
98
|
mapMessageToCard(a, {
|
|
99
99
|
reversed: true,
|
|
100
|
-
date: '',
|
|
101
100
|
time: '',
|
|
102
101
|
zoom: true,
|
|
103
102
|
noCoverImage: true,
|
|
@@ -110,7 +109,6 @@ export default {
|
|
|
110
109
|
return this.stories.map(s =>
|
|
111
110
|
mapMessageToCard(s, {
|
|
112
111
|
// description: '',
|
|
113
|
-
date: '',
|
|
114
112
|
time: '',
|
|
115
113
|
zoom: true,
|
|
116
114
|
})
|
|
@@ -29,6 +29,7 @@ export default function mapMessageToCard(message, options = {}) {
|
|
|
29
29
|
description: message.description || message.summary,
|
|
30
30
|
categories: message.categories,
|
|
31
31
|
date: format(message.publishDateTime, 'MMM. D, YYYY'),
|
|
32
|
+
modifiedDate: format(message.modifiedDateTime, 'MMM. D, YYYY'),
|
|
32
33
|
time: format(message.publishDateTime, 'h:mm A'),
|
|
33
34
|
pinned: message.isFeatured || message.isDistrictFeatured,
|
|
34
35
|
image: bannerImageOrDefault ? bannerImageOrDefault.url : '',
|