@explorer-1/vue 0.2.9 → 0.2.11
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/BaseTimer/BaseTimer.vue +4 -3
- package/src/components/HeroLarge/HeroLarge.stories.js +20 -0
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +1 -1
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +8 -8
- package/src/components/NavSearchForm/NavSearchForm.vue +30 -41
- package/src/components/PastEventsCarousel/PastEventsCarousel.vue +2 -2
- package/src/templates/PageVideoDetail/PageVideoDetail.stories.js +2 -1
- package/src/templates/PageVideoDetail/PageVideoDetail.vue +4 -4
- package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.js +22 -1
- package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.vue +1 -1
- package/src/templates/www/PageInfographicDetail/PageInfographicDetail.stories.js +1 -1
- package/src/templates/www/PageInfographicDetail/PageInfographicDetail.vue +2 -2
- package/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.js +1 -1
- package/src/templates/www/PagePodcastSeason/PagePodcastSeason.vue +1 -1
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +1 -1
- package/src/templates/www/PageTopicDetail/PageTopicDetail.stories.js +1 -1
- package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +1 -1
package/package.json
CHANGED
|
@@ -51,9 +51,10 @@
|
|
|
51
51
|
<script lang="ts">
|
|
52
52
|
import type { PropType } from 'vue'
|
|
53
53
|
import { defineComponent } from 'vue'
|
|
54
|
-
import dayjs
|
|
55
|
-
import
|
|
56
|
-
import
|
|
54
|
+
import dayjs from './../../utils/dayjs'
|
|
55
|
+
import { type Dayjs } from 'dayjs'
|
|
56
|
+
import duration, { type Duration } from 'dayjs/plugin/duration.js'
|
|
57
|
+
import minMax from 'dayjs/plugin/minMax.js'
|
|
57
58
|
|
|
58
59
|
dayjs.extend(duration)
|
|
59
60
|
dayjs.extend(minMax)
|
|
@@ -32,6 +32,26 @@ export const HeroLargeData = {
|
|
|
32
32
|
url: 'https://picsum.photos/id/247/640/900'
|
|
33
33
|
},
|
|
34
34
|
alt: 'Robotics detail page hero image'
|
|
35
|
+
},
|
|
36
|
+
listingPageHeroImage: {
|
|
37
|
+
// beach
|
|
38
|
+
src: {
|
|
39
|
+
url: 'https://picsum.photos/id/973/1800/1200',
|
|
40
|
+
width: 1800,
|
|
41
|
+
height: 1200
|
|
42
|
+
},
|
|
43
|
+
// lake
|
|
44
|
+
srcSet:
|
|
45
|
+
'https://picsum.photos/id/865/768/548 768w, https://picsum.photos/id/865/1024/684 1024w, https://picsum.photos/id/865/1440/770 1440w, https://picsum.photos/id/865/1800/963 1800w',
|
|
46
|
+
// jungle
|
|
47
|
+
screenMd: {
|
|
48
|
+
url: 'https://picsum.photos/id/921/800/640'
|
|
49
|
+
},
|
|
50
|
+
// desert
|
|
51
|
+
screenSm: {
|
|
52
|
+
url: 'https://picsum.photos/id/247/640/900'
|
|
53
|
+
},
|
|
54
|
+
alt: 'Robotics detail page hero image'
|
|
35
55
|
}
|
|
36
56
|
}
|
|
37
57
|
|
|
@@ -28,7 +28,7 @@ export const HomepageCarouselItemData = {
|
|
|
28
28
|
externalLink: 'https://mars.nasa.gov',
|
|
29
29
|
slideTitle: 'Creating Robots to go Where Humans Can’t',
|
|
30
30
|
video: BaseVideoData,
|
|
31
|
-
|
|
31
|
+
listingPageHeroImage: {
|
|
32
32
|
src: {
|
|
33
33
|
url: 'https://picsum.photos/id/973/1800/1200',
|
|
34
34
|
width: 1800,
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
/>
|
|
30
30
|
</video>
|
|
31
31
|
<!-- change to v-if if image should load as fallback until video loads -->
|
|
32
|
-
<picture v-else-if="item.
|
|
32
|
+
<picture v-else-if="item.listingPageHeroImage && item.listingPageHeroImage.src">
|
|
33
33
|
<source
|
|
34
34
|
media="(min-width: 768px)"
|
|
35
|
-
:srcset="item.
|
|
35
|
+
:srcset="item.listingPageHeroImage.srcSet"
|
|
36
36
|
/>
|
|
37
37
|
<source
|
|
38
38
|
media="(min-width: 420px)"
|
|
39
|
-
:srcset="item.
|
|
39
|
+
:srcset="item.listingPageHeroImage.screenMd?.url"
|
|
40
40
|
/>
|
|
41
|
-
<source :srcset="item.
|
|
41
|
+
<source :srcset="item.listingPageHeroImage.screenSm?.url" />
|
|
42
42
|
<img
|
|
43
43
|
class="md:object-right object-cover object-bottom w-full h-full"
|
|
44
|
-
:src="item.
|
|
45
|
-
:width="item.
|
|
46
|
-
:height="item.
|
|
44
|
+
:src="item.listingPageHeroImage.src.url"
|
|
45
|
+
:width="item.listingPageHeroImage.src.width"
|
|
46
|
+
:height="item.listingPageHeroImage.src.height"
|
|
47
47
|
alt=""
|
|
48
48
|
loading="lazy"
|
|
49
49
|
data-chromatic="ignore"
|
|
@@ -116,7 +116,7 @@ export interface Slide {
|
|
|
116
116
|
fileOgg: string
|
|
117
117
|
fileWebm: string
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
listingPageHeroImage: Partial<ImageObject>
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
export default defineComponent({
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { useRouter } from 'vue-router'
|
|
4
|
+
import SearchInput from './../SearchInput/SearchInput.vue'
|
|
5
|
+
const router = useRouter()
|
|
6
|
+
|
|
7
|
+
interface NavSearchFormProps {
|
|
8
|
+
mobile?: boolean
|
|
9
|
+
}
|
|
10
|
+
const props = withDefaults(defineProps<NavSearchFormProps>(), {
|
|
11
|
+
mobile: false
|
|
12
|
+
})
|
|
13
|
+
const emit = defineEmits(['clearSearch', 'submitForm'])
|
|
14
|
+
|
|
15
|
+
const searchQuery = ref()
|
|
16
|
+
|
|
17
|
+
const clearSearch = () => {
|
|
18
|
+
searchQuery.value = undefined
|
|
19
|
+
emit('clearSearch')
|
|
20
|
+
}
|
|
21
|
+
const submitSearch = () => {
|
|
22
|
+
emit('submitForm')
|
|
23
|
+
console.log(searchQuery.value)
|
|
24
|
+
router.push({ path: '/search', query: searchQuery.value })
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
1
27
|
<template>
|
|
2
28
|
<form
|
|
3
29
|
class="NavSearchForm"
|
|
@@ -6,11 +32,11 @@
|
|
|
6
32
|
<SearchInput
|
|
7
33
|
v-model="searchQuery"
|
|
8
34
|
placeholder="Search JPL"
|
|
9
|
-
:underlined-input="!mobile"
|
|
35
|
+
:underlined-input="!props.mobile"
|
|
10
36
|
:underlined-input-value="searchQuery"
|
|
11
|
-
:auto-focus="!mobile"
|
|
12
|
-
:inline="!mobile"
|
|
13
|
-
:default-colors="mobile"
|
|
37
|
+
:auto-focus="!props.mobile"
|
|
38
|
+
:inline="!props.mobile"
|
|
39
|
+
:default-colors="props.mobile"
|
|
14
40
|
@esc="clearSearch()"
|
|
15
41
|
/>
|
|
16
42
|
<button
|
|
@@ -22,43 +48,6 @@
|
|
|
22
48
|
</button>
|
|
23
49
|
</form>
|
|
24
50
|
</template>
|
|
25
|
-
<script lang="ts">
|
|
26
|
-
import { defineComponent } from 'vue'
|
|
27
|
-
import SearchInput from './../SearchInput/SearchInput.vue'
|
|
28
|
-
|
|
29
|
-
export default defineComponent({
|
|
30
|
-
name: 'NavSearchForm',
|
|
31
|
-
components: {
|
|
32
|
-
SearchInput
|
|
33
|
-
},
|
|
34
|
-
props: {
|
|
35
|
-
mobile: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
searchQuery: undefined
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
clearSearch() {
|
|
47
|
-
this.searchQuery = undefined
|
|
48
|
-
this.$emit('clearSearch')
|
|
49
|
-
},
|
|
50
|
-
submitSearch() {
|
|
51
|
-
this.$emit('submitForm')
|
|
52
|
-
if (this.$router) {
|
|
53
|
-
this.$router.push({
|
|
54
|
-
name: 'search',
|
|
55
|
-
query: { query: this.searchQuery }
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
</script>
|
|
62
51
|
<style lang="scss">
|
|
63
52
|
.NavSearchForm {
|
|
64
53
|
::placeholder {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
heading="Past Events"
|
|
5
5
|
variant="cards"
|
|
6
6
|
:link="{
|
|
7
|
-
path: '
|
|
7
|
+
// path: 'events',
|
|
8
8
|
query: {
|
|
9
9
|
event_status: 'Past events',
|
|
10
10
|
sortBy: 'eventStartDateLatest',
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</MixinCarousel>
|
|
29
29
|
</template>
|
|
30
30
|
<script lang="ts">
|
|
31
|
-
//
|
|
31
|
+
// relative link to view past events assumes that this component will only be used on an events index page.
|
|
32
32
|
import { defineComponent } from 'vue'
|
|
33
33
|
import type { ElasticSearchPage } from '../../interfaces'
|
|
34
34
|
import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
|
|
@@ -17,7 +17,8 @@ export const BaseStory = {
|
|
|
17
17
|
args: {
|
|
18
18
|
data: {
|
|
19
19
|
block: [],
|
|
20
|
-
|
|
20
|
+
videoDetailBody:
|
|
21
|
+
'How Earth satellites including the JPL-managed Topex/Poseidon are helping researchers track the movements and behaviors of sea lions and seals to keep them from extinction.',
|
|
21
22
|
firstPublishedAt: '2001-12-03T08:00:00+00:00',
|
|
22
23
|
id: '6723',
|
|
23
24
|
label: 'Video',
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
:content="data.thumbnailImage.original"
|
|
23
23
|
/>
|
|
24
24
|
<meta
|
|
25
|
-
v-if="data.summary || data.
|
|
25
|
+
v-if="data.summary || data.videoDetailBody"
|
|
26
26
|
itemprop="description"
|
|
27
|
-
:content="data.summary || data.
|
|
27
|
+
:content="data.summary || data.videoDetailBody"
|
|
28
28
|
/>
|
|
29
29
|
<div class="lg:container 3xl:px-0 lg:mt-12 px-5 mx-auto mt-5">
|
|
30
30
|
<DetailHeadline
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
<LayoutHelper indent="col-2">
|
|
59
59
|
<div class="lg:grid grid-cols-10">
|
|
60
60
|
<div
|
|
61
|
-
v-if="data.
|
|
61
|
+
v-if="data.videoDetailBody"
|
|
62
62
|
class="col-span-7"
|
|
63
63
|
>
|
|
64
|
-
<BlockText :text="data.
|
|
64
|
+
<BlockText :text="data.videoDetailBody" />
|
|
65
65
|
<hr class="border-gray-light-mid lg:my-8 my-5" />
|
|
66
66
|
<div
|
|
67
67
|
v-if="data.transcript"
|
|
@@ -25,7 +25,28 @@ export const BaseStory = {
|
|
|
25
25
|
name: 'PageAsteroidWatchIndex',
|
|
26
26
|
args: {
|
|
27
27
|
data: {
|
|
28
|
-
|
|
28
|
+
description:
|
|
29
|
+
'Crawl, walk and even climb rock walls, this robot was designed to operate in extreme terrains.',
|
|
30
|
+
listingPageHeroImage: {
|
|
31
|
+
// beach
|
|
32
|
+
src: {
|
|
33
|
+
url: 'https://picsum.photos/id/973/1800/1200',
|
|
34
|
+
width: 1800,
|
|
35
|
+
height: 1200
|
|
36
|
+
},
|
|
37
|
+
// lake
|
|
38
|
+
srcSet:
|
|
39
|
+
'https://picsum.photos/id/865/768/548 768w, https://picsum.photos/id/865/1024/684 1024w, https://picsum.photos/id/865/1440/770 1440w, https://picsum.photos/id/865/1800/963 1800w',
|
|
40
|
+
// jungle
|
|
41
|
+
screenMd: {
|
|
42
|
+
url: 'https://picsum.photos/id/921/800/640'
|
|
43
|
+
},
|
|
44
|
+
// desert
|
|
45
|
+
screenSm: {
|
|
46
|
+
url: 'https://picsum.photos/id/247/640/900'
|
|
47
|
+
},
|
|
48
|
+
alt: 'Robotics detail page hero image'
|
|
49
|
+
},
|
|
29
50
|
title: 'Asteroid Watch',
|
|
30
51
|
body: BlockStreamfieldData.body,
|
|
31
52
|
latestAsteroidNews: BlockLinkCardCarouselData
|
|
@@ -39,7 +39,7 @@ export const BaseStory = {
|
|
|
39
39
|
publicationDate: '2012-07-05T20:04:21+00:00',
|
|
40
40
|
title: 'Milky Way',
|
|
41
41
|
topicLabel: 'Stars and Galaxies',
|
|
42
|
-
|
|
42
|
+
descriptionString:
|
|
43
43
|
'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lobortis lorem non purus consequat rutrum. Nulla vel convallis urna, eu porta purus. In hendrerit odio id diam volutpat auctor. Curabitur imperdiet dolor ipsum, quis luctus quam hendrerit eu. Quisque gravida lacus velit, a tempor dolor facilisis interdum. Sed pharetra mi eget feugiat bibendum. Donec vel nisi non nisi ultrices pellentesque eget non massa. Proin hendrerit sodales auctor. Phasellus egestas tortor eget ullamcorper tempor. Cras quis mauris erat. Curabitur tempor quam eget tellus aliquam semper. Morbi fringilla sodales dapibus. Proin pellentesque turpis eu neque pretium, in sodales sem auctor.</p>'
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
>
|
|
43
43
|
<div class="lg:grid grid-cols-10">
|
|
44
44
|
<div
|
|
45
|
-
v-if="data.
|
|
45
|
+
v-if="data.descriptionString"
|
|
46
46
|
class="col-span-7"
|
|
47
47
|
>
|
|
48
|
-
<BlockText :text="data.
|
|
48
|
+
<BlockText :text="data.descriptionString" />
|
|
49
49
|
</div>
|
|
50
50
|
<aside class="col-start-9 col-end-11">
|
|
51
51
|
<div class="lg:pt-0 pt-8 mb-12">
|
|
@@ -29,7 +29,7 @@ export const PagePodcastSeasonData = {
|
|
|
29
29
|
summary:
|
|
30
30
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas in nibh mauris. Praesent vel tempus enim, a ultricies justo. Cras nec lorem quis lorem ullamcorper accumsan. Aliquam lacus tortor, vulputate sit amet purus vitae, accumsan maximus diam. Vivamus ac dui non sapien hendrerit elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
31
31
|
featuredEpisode: HeroMediumData.feature,
|
|
32
|
-
|
|
32
|
+
listingPageHeroImage: {
|
|
33
33
|
// same dimensions used for HeroMedium
|
|
34
34
|
src: {
|
|
35
35
|
url: 'https://picsum.photos/id/247/1800/1200',
|
|
@@ -32,7 +32,7 @@ export const TopicDetailData = {
|
|
|
32
32
|
parentDisplayTitle: 'Solar System Exploration at JPL',
|
|
33
33
|
strapline:
|
|
34
34
|
'Robotic orbiters, landers and mobile laboratories explore Mars and communicate with Earth via the Deep Space Network.',
|
|
35
|
-
|
|
35
|
+
listingPageHeroImage: {
|
|
36
36
|
src: {
|
|
37
37
|
url: 'https://picsum.photos/1800/1200',
|
|
38
38
|
width: 1800,
|