@explorer-1/vue 0.2.38 → 0.2.39
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/BlockLinkCard/BlockLinkCard.vue +14 -5
- package/src/components/BlockLinkCardList/BlockLinkCardList.vue +0 -2
- package/src/components/CalendarChip/CalendarChip.vue +5 -2
- package/src/components/Icons/IconCalendar.vue +2 -2
- package/src/components/SearchResultCard/SearchResultCard.vue +1 -1
- package/src/components/SearchResultGridItem/SearchResultGridItem.vue +9 -1
- package/src/components/SearchResultsList/SearchResultsList.vue +7 -3
- package/src/utils/mixins.ts +5 -3
package/package.json
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
:to="theItem.url ? theItem.url : undefined"
|
|
6
6
|
:href="theItem.externalLink ? theItem.externalLink : undefined"
|
|
7
7
|
class="BlockLinkCard group"
|
|
8
|
-
:link-class="`block ${small ? 'pb-3' : 'pb-5'} ${large ? 'sm:flex flex-row' : ''}`"
|
|
8
|
+
:link-class="`block ${small ? 'pb-3' : 'pb-5'} ${large ? 'sm:flex flex-row border-b border-gray-light-mid pb-5 mb-5' : ''}`"
|
|
9
9
|
external-target-blank
|
|
10
10
|
>
|
|
11
11
|
<BaseImagePlaceholder
|
|
12
12
|
:aspect-ratio="large ? '3:2' : '16:9'"
|
|
13
|
-
class="bg-gray-dark relative
|
|
14
|
-
:class="{ 'lg:mb-10': medium, 'sm:w-1/3': large }"
|
|
13
|
+
class="bg-gray-dark h-full relative overflow-hidden mb-6"
|
|
14
|
+
:class="{ 'lg:mb-10': medium, 'sm:w-1/3 lg:mb-0': large }"
|
|
15
15
|
dark-mode
|
|
16
16
|
no-logo
|
|
17
17
|
>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
{{ theItem.title }}
|
|
98
98
|
</component>
|
|
99
99
|
<p
|
|
100
|
-
v-if="theItem.date"
|
|
100
|
+
v-if="theItem.date && !themeStore.isEdu"
|
|
101
101
|
class="text-gray-mid-dark mt-2"
|
|
102
102
|
:class="{ 'mt-2': !large, 'mt-4': large }"
|
|
103
103
|
>
|
|
@@ -106,9 +106,19 @@
|
|
|
106
106
|
<p
|
|
107
107
|
v-if="large && theItem.summary"
|
|
108
108
|
class="mt-4 text-gray-mid-dark"
|
|
109
|
+
:class="{
|
|
110
|
+
'line-clamp-2 sm:line-clamp-1 lg:line-clamp-2 xl:line-clamp-3': themeStore.isEdu
|
|
111
|
+
}"
|
|
109
112
|
>
|
|
110
113
|
{{ theItem.summary }}
|
|
111
114
|
</p>
|
|
115
|
+
<p
|
|
116
|
+
v-if="theItem.date && themeStore.isEdu"
|
|
117
|
+
class="text-gray-mid-dark mt-2"
|
|
118
|
+
:class="{ 'mt-2': !large, 'mt-4': large }"
|
|
119
|
+
>
|
|
120
|
+
{{ theItem.date }}
|
|
121
|
+
</p>
|
|
112
122
|
<div
|
|
113
123
|
v-if="metadataAttrs"
|
|
114
124
|
:class="{ 'mt-4': large, 'mt-2 mb-1': medium, 'mt-1 mb-0': small }"
|
|
@@ -117,7 +127,6 @@
|
|
|
117
127
|
v-if="metadataType === 'EDUEventPage'"
|
|
118
128
|
:event="theItem"
|
|
119
129
|
:show-time="large"
|
|
120
|
-
:show-location="false"
|
|
121
130
|
compact
|
|
122
131
|
/>
|
|
123
132
|
<MetadataEduResource
|
|
@@ -16,8 +16,6 @@ const props = withDefaults(defineProps<BlockLinkCardListProps>(), {
|
|
|
16
16
|
<BlockLinkCard
|
|
17
17
|
v-for="(item, index) in props.items"
|
|
18
18
|
:key="index"
|
|
19
|
-
class="border-b border-gray-light-mid mb-5"
|
|
20
|
-
:class="{ 'pt-3': index !== 0 }"
|
|
21
19
|
:data="item"
|
|
22
20
|
size="lg"
|
|
23
21
|
show-calendar-chip
|
|
@@ -33,8 +33,11 @@ const splitDate = computed(() => {
|
|
|
33
33
|
<div class="text-subtitle">Ongoing</div>
|
|
34
34
|
</template>
|
|
35
35
|
<template v-else-if="themeStore.isEdu && splitDate">
|
|
36
|
-
<div
|
|
37
|
-
|
|
36
|
+
<div
|
|
37
|
+
v-if="splitDate.month"
|
|
38
|
+
class="font-extrabold text-6xl leading-tight tracking-wider uppercase"
|
|
39
|
+
>
|
|
40
|
+
{{ splitDate.month.substring(0, 3) }}
|
|
38
41
|
</div>
|
|
39
42
|
<div class="text-subtitle">
|
|
40
43
|
{{ splitDate.year }}
|
|
@@ -15,12 +15,15 @@
|
|
|
15
15
|
startDate,
|
|
16
16
|
endTime,
|
|
17
17
|
endDate,
|
|
18
|
+
customDate,
|
|
18
19
|
location,
|
|
19
|
-
eventType
|
|
20
|
+
eventType,
|
|
21
|
+
ongoing
|
|
20
22
|
}
|
|
21
23
|
}"
|
|
22
24
|
:heading-level="headingLevel"
|
|
23
25
|
size="sm"
|
|
26
|
+
show-calendar-chip
|
|
24
27
|
/>
|
|
25
28
|
<BlockLinkCard
|
|
26
29
|
v-else-if="typename === 'News'"
|
|
@@ -148,6 +151,11 @@ export default defineComponent({
|
|
|
148
151
|
type: String,
|
|
149
152
|
required: false
|
|
150
153
|
},
|
|
154
|
+
customDate: {
|
|
155
|
+
type: String,
|
|
156
|
+
required: false,
|
|
157
|
+
default: undefined
|
|
158
|
+
},
|
|
151
159
|
startTime: {
|
|
152
160
|
type: String,
|
|
153
161
|
required: false,
|
|
@@ -45,10 +45,14 @@
|
|
|
45
45
|
:topic="page.topic"
|
|
46
46
|
:image="page.image"
|
|
47
47
|
:date="page.date"
|
|
48
|
+
:custom-date="page.customDate"
|
|
48
49
|
:start-date="page.startDate"
|
|
49
50
|
:end-date="page.endDate"
|
|
50
51
|
:start-time="page.startTime"
|
|
51
52
|
:end-time="page.endTime"
|
|
53
|
+
:event-type="page.eventType"
|
|
54
|
+
:ongoing="page.ongoing"
|
|
55
|
+
:location="page.location"
|
|
52
56
|
:title="page.title"
|
|
53
57
|
heading-level="h2"
|
|
54
58
|
/>
|
|
@@ -126,6 +130,7 @@ export default defineComponent({
|
|
|
126
130
|
: page._source[handle + '__image']
|
|
127
131
|
// date field is different for mission and event detail pages
|
|
128
132
|
let date
|
|
133
|
+
let location
|
|
129
134
|
let topic =
|
|
130
135
|
handle === 'missions_mission'
|
|
131
136
|
? page._source[handle + '__status_filter']
|
|
@@ -137,6 +142,7 @@ export default defineComponent({
|
|
|
137
142
|
date = 'Event date: ' + parseDate(page._source[handle + '__start_datetime'])
|
|
138
143
|
} else if (handle === 'edu_events_edueventpage') {
|
|
139
144
|
date = null
|
|
145
|
+
location = page._source[handle + '__location_filter']
|
|
140
146
|
} else if (handle === 'missions_mission') {
|
|
141
147
|
date = page._source.display_date_filter
|
|
142
148
|
? 'Launch date: ' + page._source.display_date_filter
|
|
@@ -161,9 +167,7 @@ export default defineComponent({
|
|
|
161
167
|
page.topic = topic
|
|
162
168
|
// properties for event's page
|
|
163
169
|
page.location =
|
|
164
|
-
handle === 'events_eventpage'
|
|
165
|
-
? page._source[handle + '__location'] | page._source[handle + '__location_name']
|
|
166
|
-
: null
|
|
170
|
+
handle === 'events_eventpage' ? page._source[handle + '__location'] : location
|
|
167
171
|
page.startDate =
|
|
168
172
|
handle === 'events_eventpage' || handle === 'edu_events_edueventpage'
|
|
169
173
|
? page._source[handle + '__start_datetime']
|
package/src/utils/mixins.ts
CHANGED
|
@@ -288,14 +288,16 @@ export const mixinLightboxGalleryItems = (items: object | any): object | false =
|
|
|
288
288
|
// return event dates for the red box that appears in the corner of the hero and thumbnail images
|
|
289
289
|
export const mixinFormatSplitEventDates = (
|
|
290
290
|
startDatetime: string,
|
|
291
|
-
endDatetime?: string
|
|
291
|
+
endDatetime?: string,
|
|
292
|
+
compact?: boolean
|
|
292
293
|
): EventDateObject => {
|
|
293
294
|
const startDateDayjs = dayjs(startDatetime)
|
|
294
295
|
|
|
296
|
+
const monthFormat = compact ? 'MM' : 'MMM'
|
|
295
297
|
let day = startDateDayjs.format('D')
|
|
296
|
-
const month = startDateDayjs.format(
|
|
298
|
+
const month = startDateDayjs.format(monthFormat).replace('.', '')
|
|
297
299
|
const year = startDateDayjs.format('YYYY')
|
|
298
|
-
const monthAndYear = startDateDayjs.format(
|
|
300
|
+
const monthAndYear = startDateDayjs.format(`${monthFormat} YYYY`)
|
|
299
301
|
|
|
300
302
|
if (endDatetime) {
|
|
301
303
|
const endDateDayjs = dayjs(endDatetime)
|