@explorer-1/vue 0.0.3 → 0.1.0
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/dist/explorer-1-vue.js +4555 -4478
- package/dist/explorer-1-vue.umd.cjs +16 -16
- package/dist/src/components/BaseAudio/BaseAudio.vue.d.ts +4 -4
- package/dist/src/components/BaseVideo/BaseVideo.stories.d.ts +2 -5
- package/dist/src/components/BlockImageCarousel/BlockImageCarousel.vue.d.ts +8 -0
- package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.d.ts +32 -8
- package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +2 -2
- package/dist/src/components/HeroMedia/HeroMedia.stories.d.ts +0 -3
- package/dist/src/components/HomepageCarousel/HomepageCarousel.stories.d.ts +6 -0
- package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +3 -3
- package/dist/src/components/NavMobile/NavMobile.stories.d.ts +3 -3
- package/dist/src/docs/foundation/themes.stories.d.ts +1 -12
- package/dist/src/templates/PageContent/PageContent.stories.d.ts +0 -3
- package/dist/src/templates/PageEventDetail/PageEventDetail.stories.d.ts +0 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/BaseAudio/BaseAudio.stories.js +1 -1
- package/src/components/BaseAudio/BaseAudio.vue +89 -57
- package/src/components/BaseImage/BaseImage.vue +1 -0
- package/src/components/BaseTimer/BaseTimer.vue +1 -0
- package/src/components/BaseVideo/BaseVideo.stories.js +2 -4
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +1 -0
- package/src/components/BlockImageCarousel/BlockImageCarousel.vue +7 -0
- package/src/components/BlockImageGallery/BlockImageGallery.vue +1 -0
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +15 -14
- package/src/components/BlockQuote/BlockQuote.vue +1 -0
- package/src/components/BlockTable/BlockTable.vue +1 -1
- package/src/components/EventDetailHero/EventDetailHero.vue +12 -6
- package/src/components/FormContact/FormContact.vue +1 -1
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.vue +1 -1
- package/src/components/HeroListingIndex/HeroListingIndex.stories.js +2 -4
- package/src/components/HeroMedia/HeroMedia.stories.js +0 -5
- package/src/components/HeroMedia/HeroMedia.vue +2 -1
- package/src/components/HomepageCarousel/HomepageCarousel.stories.js +3 -0
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +1 -0
- package/src/components/MissionDetailHero/MissionDetailHero.vue +1 -0
- package/src/components/MissionDetailStats/MissionDetailStats.vue +2 -2
- package/src/components/MissionDetailStats/MissionDetailStatsMicro.vue +1 -1
- package/src/components/MissionDetailStats/MissionDetailStatsMini.vue +3 -3
- package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -2
- package/src/components/MixinCarousel/MixinCarousel.vue +5 -2
- package/src/components/MixinFancybox/MixinFancybox.vue +1 -0
- package/src/components/NavDesktop/NavDesktop.stories.js +1 -1
- package/src/components/NavDesktop/NavDesktopDropdownContent.vue +1 -1
- package/src/components/NavDesktop/NavDesktopDropdownMore.vue +1 -1
- package/src/components/NavHeading/NavHeading.stories.js +1 -1
- package/src/components/NavHeading/NavHeading.vue +2 -2
- package/src/components/NavLinkList/NavLinkList.stories.js +1 -1
- package/src/components/NavSocial/NavSocial.stories.js +1 -1
- package/src/components/SearchFilterGroup/SearchFilterGroup.vue +1 -1
- package/src/components/SearchResultCard/SearchResultCard.vue +2 -1
- package/src/components/TheFooter/TheFooter.vue +1 -1
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue +1 -1
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +2 -2
- package/src/docs/foundation/DynamicTokens.vue +4 -4
- package/src/docs/foundation/color.docs.mdx +50 -45
- package/src/docs/foundation/themes.docs.mdx +8 -2
- package/src/docs/foundation/themes.stories.js +0 -35
- package/src/templates/PageContent/PageContent.stories.js +0 -5
- package/src/templates/PageContent/PageContent.vue +62 -37
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +0 -5
- package/src/templates/PageEventDetail/PageEventDetail.vue +32 -0
- package/src/templates/edu/PageEduNewsDetail.vue +9 -1
- package/src/utils/dayjs.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.4.21",
|
|
29
29
|
"vue-observe-visibility": "^1.0.0",
|
|
30
30
|
"vue3-compare-image": "^1.2.5",
|
|
31
|
-
"@explorer-1/common": "1.0.
|
|
31
|
+
"@explorer-1/common": "1.0.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -118,7 +118,6 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
</template>
|
|
120
120
|
<script lang="ts">
|
|
121
|
-
// @ts-nocheck
|
|
122
121
|
import { defineComponent } from 'vue'
|
|
123
122
|
import IconPlay from './../Icons/IconPlay.vue'
|
|
124
123
|
import IconPause from './../Icons/IconPause.vue'
|
|
@@ -136,7 +135,7 @@ export const generateUUID = () => {
|
|
|
136
135
|
})
|
|
137
136
|
}
|
|
138
137
|
|
|
139
|
-
export const convertTimeHHMMSS = (val) => {
|
|
138
|
+
export const convertTimeHHMMSS = (val: any) => {
|
|
140
139
|
const hhmmss = new Date(val * 1000).toISOString().substr(11, 8)
|
|
141
140
|
return hhmmss.indexOf('00:') === 0 ? hhmmss.substr(3) : hhmmss
|
|
142
141
|
}
|
|
@@ -161,7 +160,20 @@ export default defineComponent({
|
|
|
161
160
|
default: false
|
|
162
161
|
}
|
|
163
162
|
},
|
|
164
|
-
data() {
|
|
163
|
+
data(): {
|
|
164
|
+
firstPlay: boolean
|
|
165
|
+
isMuted: boolean
|
|
166
|
+
loaded: boolean
|
|
167
|
+
playing: boolean
|
|
168
|
+
paused: boolean
|
|
169
|
+
progressStyle: string
|
|
170
|
+
currentTime: string
|
|
171
|
+
uuid: string
|
|
172
|
+
audio?: HTMLAudioElement
|
|
173
|
+
totalDuration: number
|
|
174
|
+
hideVolumeSlider: boolean
|
|
175
|
+
volumeValue: number
|
|
176
|
+
} {
|
|
165
177
|
return {
|
|
166
178
|
firstPlay: true,
|
|
167
179
|
isMuted: false,
|
|
@@ -191,89 +203,106 @@ export default defineComponent({
|
|
|
191
203
|
this.init()
|
|
192
204
|
},
|
|
193
205
|
beforeUnmount() {
|
|
194
|
-
this.audio
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
206
|
+
if (this.audio) {
|
|
207
|
+
this.audio.removeEventListener('timeupdate', this._handlePlayingUI)
|
|
208
|
+
this.audio.removeEventListener('loadeddata', this._handleLoaded)
|
|
209
|
+
this.audio.removeEventListener('pause', this._handlePlayPause)
|
|
210
|
+
this.audio.removeEventListener('play', this._handlePlayPause)
|
|
211
|
+
}
|
|
198
212
|
},
|
|
199
213
|
methods: {
|
|
200
|
-
setPosition: function name(e) {
|
|
201
|
-
|
|
202
|
-
|
|
214
|
+
setPosition: function name(e: any) {
|
|
215
|
+
if (this.audio) {
|
|
216
|
+
const tag = e.target
|
|
217
|
+
if (this.paused) return
|
|
203
218
|
|
|
204
|
-
|
|
205
|
-
|
|
219
|
+
if (e.target.tagName === 'SPAN') {
|
|
220
|
+
return
|
|
221
|
+
}
|
|
222
|
+
const pos = tag.getBoundingClientRect()
|
|
223
|
+
const seekPos = (e.clientX - pos.left) / pos.width
|
|
224
|
+
this.audio.currentTime = this.audio.duration * seekPos
|
|
206
225
|
}
|
|
207
|
-
const pos = tag.getBoundingClientRect()
|
|
208
|
-
const seekPos = (e.clientX - pos.left) / pos.width
|
|
209
|
-
this.audio.currentTime = parseInt(this.audio.duration * seekPos)
|
|
210
226
|
},
|
|
211
227
|
updateVolume() {
|
|
212
|
-
this.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
this.
|
|
216
|
-
|
|
228
|
+
if (this.audio) {
|
|
229
|
+
this.hideVolumeSlider = false
|
|
230
|
+
this.audio.volume = this.volumeValue / 100
|
|
231
|
+
if (this.volumeValue / 100 > 0) {
|
|
232
|
+
this.isMuted = this.audio.muted = false
|
|
233
|
+
}
|
|
217
234
|
|
|
218
|
-
|
|
219
|
-
|
|
235
|
+
if (this.volumeValue / 100 === 0) {
|
|
236
|
+
this.isMuted = this.audio.muted = true
|
|
237
|
+
}
|
|
220
238
|
}
|
|
221
239
|
},
|
|
222
240
|
toggleVolume() {
|
|
223
241
|
this.hideVolumeSlider = true
|
|
224
242
|
},
|
|
225
243
|
stop() {
|
|
226
|
-
this.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
244
|
+
if (this.audio) {
|
|
245
|
+
this.playing = false
|
|
246
|
+
this.paused = true
|
|
247
|
+
this.audio.pause()
|
|
248
|
+
this.audio.currentTime = 0
|
|
249
|
+
}
|
|
230
250
|
},
|
|
231
251
|
play() {
|
|
232
|
-
if (this.playing && !this.paused)
|
|
233
|
-
|
|
234
|
-
this.audio
|
|
235
|
-
|
|
236
|
-
|
|
252
|
+
if (this.playing && !this.paused) {
|
|
253
|
+
return
|
|
254
|
+
} else if (this.audio) {
|
|
255
|
+
this.paused = false
|
|
256
|
+
this.audio.play()
|
|
257
|
+
this.playing = true
|
|
258
|
+
this.$root?.$emit('play', this.uuid)
|
|
259
|
+
}
|
|
237
260
|
},
|
|
238
|
-
forward(duration) {
|
|
239
|
-
return (this.audio.currentTime += duration)
|
|
261
|
+
forward(duration: number) {
|
|
262
|
+
return this.audio ? (this.audio.currentTime += duration) : undefined
|
|
240
263
|
},
|
|
241
|
-
rewind(duration) {
|
|
242
|
-
return (this.audio.currentTime -= duration)
|
|
264
|
+
rewind(duration: number) {
|
|
265
|
+
return this.audio ? (this.audio.currentTime -= duration) : undefined
|
|
243
266
|
},
|
|
244
267
|
pause() {
|
|
245
|
-
this.
|
|
246
|
-
|
|
268
|
+
if (this.audio) {
|
|
269
|
+
this.paused = !this.paused
|
|
270
|
+
this.paused ? this.audio.pause() : this.audio.play()
|
|
271
|
+
}
|
|
247
272
|
},
|
|
248
|
-
pauseOthers(activeUuid) {
|
|
249
|
-
if (this.uuid !== activeUuid) {
|
|
273
|
+
pauseOthers(activeUuid: string) {
|
|
274
|
+
if (this.audio && this.uuid !== activeUuid) {
|
|
250
275
|
this.paused = true
|
|
251
276
|
this.audio.pause()
|
|
252
277
|
}
|
|
253
278
|
},
|
|
254
279
|
toggleMute() {
|
|
255
|
-
this.
|
|
256
|
-
|
|
257
|
-
|
|
280
|
+
if (this.audio) {
|
|
281
|
+
this.isMuted = !this.isMuted
|
|
282
|
+
this.audio.muted = this.isMuted
|
|
283
|
+
this.volumeValue = this.isMuted ? 0 : 100
|
|
284
|
+
}
|
|
258
285
|
},
|
|
259
286
|
_handleLoaded() {
|
|
260
|
-
if (this.audio.readyState >= 2) {
|
|
287
|
+
if (this.audio && this.audio.readyState >= 2) {
|
|
261
288
|
if (this.autoPlay) this.play()
|
|
262
289
|
|
|
263
290
|
this.loaded = true
|
|
264
|
-
this.totalDuration =
|
|
291
|
+
this.totalDuration = this.audio.duration
|
|
265
292
|
} else {
|
|
266
293
|
throw new Error('Failed to load audio file')
|
|
267
294
|
}
|
|
268
295
|
},
|
|
269
|
-
_handlePlayingUI(_e) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
296
|
+
_handlePlayingUI(_e: any) {
|
|
297
|
+
if (this.audio) {
|
|
298
|
+
const currTime = this.audio.currentTime
|
|
299
|
+
const percentage = (currTime / this.totalDuration) * 100
|
|
300
|
+
this.progressStyle = `width: ${percentage}%;`
|
|
301
|
+
this.currentTime = convertTimeHHMMSS(currTime)
|
|
302
|
+
}
|
|
274
303
|
},
|
|
275
|
-
_handlePlayPause(e) {
|
|
276
|
-
if (e.type === 'play' && this.firstPlay) {
|
|
304
|
+
_handlePlayPause(e: any) {
|
|
305
|
+
if (this.audio && e.type === 'play' && this.firstPlay) {
|
|
277
306
|
// in some situations, audio.currentTime is the end one on chrome
|
|
278
307
|
this.audio.currentTime = 0
|
|
279
308
|
if (this.firstPlay) {
|
|
@@ -290,17 +319,20 @@ export default defineComponent({
|
|
|
290
319
|
this.paused = this.playing = false
|
|
291
320
|
},
|
|
292
321
|
init() {
|
|
293
|
-
this.audio
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
322
|
+
if (this.audio) {
|
|
323
|
+
this.audio.addEventListener('timeupdate', this._handlePlayingUI)
|
|
324
|
+
this.audio.addEventListener('loadeddata', this._handleLoaded)
|
|
325
|
+
this.audio.addEventListener('pause', this._handlePlayPause)
|
|
326
|
+
this.audio.addEventListener('play', this._handlePlayPause)
|
|
327
|
+
this.audio.addEventListener('ended', this._handleEnded)
|
|
328
|
+
}
|
|
298
329
|
// TODO: VUE3: find solution for emitting event from slot
|
|
299
330
|
// TODO: find a cleaner way to do this w/o using mounted or root level events
|
|
300
331
|
// scoped slots? https://github.com/vuejs/vue/issues/4332
|
|
301
|
-
this.$root?.$on('play', this.pauseOthers)
|
|
332
|
+
// this.$root?.$on('play', this.pauseOthers)
|
|
302
333
|
},
|
|
303
334
|
getAudio() {
|
|
335
|
+
console.log(this.$el.querySelectorAll('audio')[0])
|
|
304
336
|
return this.$el.querySelectorAll('audio')[0]
|
|
305
337
|
}
|
|
306
338
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import BaseVideo from './BaseVideo.vue'
|
|
2
|
-
import videoMp4 from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4'
|
|
3
|
-
import videoWebm from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm'
|
|
4
2
|
|
|
5
3
|
export default {
|
|
6
4
|
title: 'Components/Base/BaseVideo',
|
|
@@ -11,10 +9,10 @@ export default {
|
|
|
11
9
|
// shared data
|
|
12
10
|
export const BaseVideoData = {
|
|
13
11
|
duration: '8',
|
|
14
|
-
file:
|
|
12
|
+
file: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4',
|
|
15
13
|
fileExtension: 'mp4',
|
|
16
14
|
fileOgg: 'http://127.0.0.1:9000/media/media/NASA-Mars-Helicopter-IngenuityAnimations-7sec.ogv', // no webpack loader for ogg files
|
|
17
|
-
fileWebm:
|
|
15
|
+
fileWebm: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm',
|
|
18
16
|
height: null,
|
|
19
17
|
id: '1',
|
|
20
18
|
sources:
|
|
@@ -88,6 +88,10 @@ export default defineComponent({
|
|
|
88
88
|
type: Array as PropType<Partial<ImageObject>[]>,
|
|
89
89
|
required: false
|
|
90
90
|
},
|
|
91
|
+
itemRole: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: false
|
|
94
|
+
},
|
|
91
95
|
loop: {
|
|
92
96
|
type: Boolean,
|
|
93
97
|
default: true
|
|
@@ -122,6 +126,9 @@ export default defineComponent({
|
|
|
122
126
|
loop: this.loop,
|
|
123
127
|
// this component has custom pagination
|
|
124
128
|
pagination: false,
|
|
129
|
+
a11y: {
|
|
130
|
+
slideRole: this.itemRole as string | undefined
|
|
131
|
+
},
|
|
125
132
|
on: {
|
|
126
133
|
slideChange: (swiper: Swiper) => {
|
|
127
134
|
// See https://github.com/vuejs/vue/issues/8721.
|
|
@@ -160,19 +160,12 @@ export const EventsBlockLinkCarouselData = [
|
|
|
160
160
|
}
|
|
161
161
|
]
|
|
162
162
|
|
|
163
|
-
// template
|
|
164
|
-
const BlockLinkCarouselTemplate = (args) => ({
|
|
165
|
-
props: Object.keys(args),
|
|
166
|
-
components: { BlockLinkCarousel },
|
|
167
|
-
template: `<BlockLinkCarousel :itemType="itemType" :heading="heading" :items="items"/>`
|
|
168
|
-
})
|
|
169
|
-
|
|
170
163
|
const BlockLinkCarouselMultipleTemplate = (args) => ({
|
|
171
164
|
components: { BlockLinkCarousel },
|
|
172
165
|
setup() {
|
|
173
166
|
return { args }
|
|
174
167
|
},
|
|
175
|
-
template: `<div><BlockLinkCarousel class="mb-20" v-bind="args" /><BlockLinkCarousel
|
|
168
|
+
template: `<div><BlockLinkCarousel class="mb-20" v-bind="args[0]" /><BlockLinkCarousel v-bind="args[1]" /></div>`
|
|
176
169
|
})
|
|
177
170
|
|
|
178
171
|
// stories
|
|
@@ -209,9 +202,17 @@ export const TwoItems = {
|
|
|
209
202
|
}
|
|
210
203
|
|
|
211
204
|
export const MultipleCarousels = BlockLinkCarouselMultipleTemplate.bind({})
|
|
212
|
-
MultipleCarousels.args =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
205
|
+
MultipleCarousels.args = [
|
|
206
|
+
{
|
|
207
|
+
itemType: 'cards',
|
|
208
|
+
heading: 'Related Pages',
|
|
209
|
+
otherHeading: 'Explore More',
|
|
210
|
+
items: BlockLinkCardCarouselData
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
itemType: 'cards',
|
|
214
|
+
heading: 'More Related Pages',
|
|
215
|
+
otherHeading: 'Explore Even More',
|
|
216
|
+
items: BlockLinkCardCarouselData
|
|
217
|
+
}
|
|
218
|
+
]
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
v-for="(col, index_col) in row.cols"
|
|
14
14
|
:key="index_col"
|
|
15
15
|
:class="
|
|
16
|
-
row.header ? 'bg-
|
|
16
|
+
row.header ? 'bg-jpl-blue-darker text-subtitle text-white' : 'bg-white text-gray-dark'
|
|
17
17
|
"
|
|
18
18
|
class="border-gray-light-mid lg:p-5 p-3 border-b"
|
|
19
19
|
>
|
|
@@ -6,18 +6,20 @@
|
|
|
6
6
|
<div class="bg-gray-light">
|
|
7
7
|
<div class="relative flex items-center mx-auto overflow-hidden vh-crop max-w-screen-3xl">
|
|
8
8
|
<div class="hero">
|
|
9
|
-
<
|
|
9
|
+
<BaseImage
|
|
10
10
|
v-if="image.src"
|
|
11
|
-
class="object-cover object-center w-full h-full"
|
|
12
|
-
:srcset="getSrcSet"
|
|
13
11
|
:src="image.src.url"
|
|
12
|
+
:srcset="getSrcSet"
|
|
13
|
+
:alt="image.alt"
|
|
14
14
|
:width="image.src.width"
|
|
15
15
|
:height="image.src.height"
|
|
16
|
-
|
|
16
|
+
image-class="object-center w-full h-full"
|
|
17
|
+
object-fit-class="cover"
|
|
18
|
+
loading="lazy"
|
|
17
19
|
/>
|
|
18
20
|
<div
|
|
19
21
|
v-if="startDateSplit"
|
|
20
|
-
class="absolute top-0 left-0 z-10 px-4 py-4 text-center text-white bg-primary"
|
|
22
|
+
class="ThemeVariantLight absolute top-0 left-0 z-10 px-4 py-4 text-center text-white bg-primary"
|
|
21
23
|
>
|
|
22
24
|
<div class="font-extrabold text-6xl leading-tight tracking-wider">
|
|
23
25
|
{{ startDateSplit.day }}
|
|
@@ -33,18 +35,22 @@
|
|
|
33
35
|
</template>
|
|
34
36
|
<script lang="ts">
|
|
35
37
|
import { defineComponent } from 'vue'
|
|
38
|
+
import BaseImage from '../BaseImage/BaseImage.vue'
|
|
36
39
|
import { mixinGetSrcSet, type EventDateObject } from './../../utils/mixins'
|
|
37
40
|
import type { PropType } from 'vue'
|
|
38
41
|
|
|
39
42
|
export default defineComponent({
|
|
40
43
|
name: 'EventDetailHero',
|
|
44
|
+
components: {
|
|
45
|
+
BaseImage
|
|
46
|
+
},
|
|
41
47
|
props: {
|
|
42
48
|
data: {
|
|
43
49
|
type: Object,
|
|
44
50
|
required: false
|
|
45
51
|
},
|
|
46
52
|
startDateSplit: {
|
|
47
|
-
type: Object as PropType<EventDateObject>,
|
|
53
|
+
type: Object as PropType<EventDateObject | undefined>,
|
|
48
54
|
required: true
|
|
49
55
|
},
|
|
50
56
|
image: {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
>
|
|
122
122
|
<BaseHeading level="h2">Thank you!</BaseHeading>
|
|
123
123
|
<div
|
|
124
|
-
class="text-jpl-
|
|
124
|
+
class="text-jpl-blue-light h-22 w-22 p-5 mx-auto my-8 text-6xl font-bold border-4 rounded-full"
|
|
125
125
|
>
|
|
126
126
|
✓
|
|
127
127
|
</div>
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
>
|
|
163
163
|
<BaseHeading level="h2">Thank you!</BaseHeading>
|
|
164
164
|
<div
|
|
165
|
-
class="text-jpl-
|
|
165
|
+
class="text-jpl-blue-light h-22 w-22 p-5 mx-auto my-8 text-6xl font-bold border-4 rounded-full"
|
|
166
166
|
>
|
|
167
167
|
✓
|
|
168
168
|
</div>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import videoMp4 from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4'
|
|
2
|
-
import videoWebm from '@explorer-1/common-storybook/src/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm'
|
|
3
1
|
import HeroListingIndex from './HeroListingIndex.vue'
|
|
4
2
|
|
|
5
3
|
export default {
|
|
@@ -91,8 +89,8 @@ export const NewsVideoHero = {
|
|
|
91
89
|
{
|
|
92
90
|
blockType: 'VideoBlock',
|
|
93
91
|
video: {
|
|
94
|
-
file:
|
|
95
|
-
fileWebm:
|
|
92
|
+
file: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.mp4',
|
|
93
|
+
fileWebm: '/videos/NASA-Mars-Helicopter-IngenuityAnimations-7sec.webm'
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
]
|
|
@@ -4,11 +4,6 @@ import HeroMedia from './HeroMedia.vue'
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Heroes/HeroMedia',
|
|
6
6
|
component: HeroMedia,
|
|
7
|
-
decorators: [
|
|
8
|
-
() => ({
|
|
9
|
-
template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
|
|
10
|
-
})
|
|
11
|
-
],
|
|
12
7
|
parameters: {
|
|
13
8
|
html: {
|
|
14
9
|
root: '#storyDecorator'
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
:height="theImageData.src.height"
|
|
17
17
|
:alt="theImageData.alt"
|
|
18
18
|
itemprop="image"
|
|
19
|
+
data-chromatic="ignore"
|
|
19
20
|
/>
|
|
20
21
|
</template>
|
|
21
22
|
<template v-else-if="video">
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
<div
|
|
44
45
|
v-if="hasCaptionArea"
|
|
45
46
|
:class="captionVisibilityClass"
|
|
46
|
-
class="max-w-screen-3xl bg-gray-light bg-opacity-90 lg:bg-opacity-100 lg:block lg:pb-4 lg:px-3 xl:px-8 lg:pt-4 items-start p-4 mx-auto"
|
|
47
|
+
class="max-w-screen-3xl ThemeVariantGray bg-gray-light bg-opacity-90 lg:bg-opacity-100 ThemeVariantGray lg:block lg:pb-4 lg:px-3 xl:px-8 lg:pt-4 items-start p-4 mx-auto"
|
|
47
48
|
>
|
|
48
49
|
<BaseImageCaption :data="theImageData || customCaption" />
|
|
49
50
|
</div>
|
|
@@ -165,7 +165,7 @@ export default defineComponent({
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
.ThemeVariantDark & .theme {
|
|
168
|
-
@apply bg-
|
|
168
|
+
@apply bg-jpl-blue-darker bg-opacity-75 text-white;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.label {
|
|
@@ -173,7 +173,7 @@ export default defineComponent({
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
.ThemeVariantDark & .label {
|
|
176
|
-
@apply text-jpl-
|
|
176
|
+
@apply text-jpl-blue-light;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
.legend {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
v-if="showClock && startDateTime"
|
|
8
8
|
class="theme-inner lg:col-span-4 xl:col-span-4 2xl:col-span-3 sm:col-span-7 col-span-11"
|
|
9
9
|
>
|
|
10
|
-
<p class="text-jpl-
|
|
10
|
+
<p class="text-jpl-blue-lighter text-subtitle mb-3">
|
|
11
11
|
{{ clockTypeLabel }}
|
|
12
12
|
</p>
|
|
13
13
|
<BaseTimer
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:distance-api-urls="distanceApiUrls"
|
|
26
26
|
>
|
|
27
27
|
<template #label="slotProps">
|
|
28
|
-
<p class="text-jpl-
|
|
28
|
+
<p class="text-jpl-blue-lighter text-subtitle mb-3">
|
|
29
29
|
{{ slotProps.label }}
|
|
30
30
|
</p>
|
|
31
31
|
</template>
|
|
@@ -82,7 +82,7 @@ export default defineComponent({
|
|
|
82
82
|
.MissionDetailStatsMini {
|
|
83
83
|
.theme,
|
|
84
84
|
.theme-inner {
|
|
85
|
-
@apply bg-
|
|
85
|
+
@apply bg-jpl-blue-darker bg-opacity-75 text-white;
|
|
86
86
|
}
|
|
87
87
|
// different padding left for first child, which is dynamic
|
|
88
88
|
.theme-inner {
|
|
@@ -25,7 +25,7 @@ export const Default = {
|
|
|
25
25
|
},
|
|
26
26
|
template: `<MixinCarousel v-bind="args">
|
|
27
27
|
<div v-for="(item, index) in [1, 2, 3, 4, 5, 6, 7]" :key="index" class="swiper-slide">
|
|
28
|
-
<img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide">
|
|
28
|
+
<img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide" data-chromatic="ignore">
|
|
29
29
|
</div>
|
|
30
30
|
</MixinCarousel>`
|
|
31
31
|
})
|
|
@@ -46,7 +46,7 @@ export const BaseCarouselWLink = {
|
|
|
46
46
|
},
|
|
47
47
|
template: `<MixinCarousel v-bind="args">
|
|
48
48
|
<div v-for="(item, index) in [1, 2, 3, 4, 5, 6, 7]" :key="index" class="swiper-slide">
|
|
49
|
-
<img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide">
|
|
49
|
+
<img src="https://picsum.photos/550/483" width="550" height="483" alt="test slide" data-chromatic="ignore">
|
|
50
50
|
</div>
|
|
51
51
|
</MixinCarousel>`
|
|
52
52
|
})
|
|
@@ -46,7 +46,9 @@
|
|
|
46
46
|
<div class="swiper-wrapper">
|
|
47
47
|
<slot />
|
|
48
48
|
</div>
|
|
49
|
-
<div
|
|
49
|
+
<div
|
|
50
|
+
class="swiper-navigation xl:block absolute top-0 left-0 hidden w-full ThemeVariantLight"
|
|
51
|
+
>
|
|
50
52
|
<div class="xl:-ml-22 top-1/2 absolute left-0 z-30 -ml-20">
|
|
51
53
|
<BaseButton
|
|
52
54
|
class="swiper-prev xl:text-xl"
|
|
@@ -196,7 +198,8 @@ export default defineComponent({
|
|
|
196
198
|
initialSlide: this.initialSlide,
|
|
197
199
|
a11y: {
|
|
198
200
|
prevSlideMessage: this.heading ? this.heading + ' - Previous slide' : 'Previous slide',
|
|
199
|
-
nextSlideMessage: this.heading ? this.heading + ' - Next slide' : 'Next slide'
|
|
201
|
+
nextSlideMessage: this.heading ? this.heading + ' - Next slide' : 'Next slide',
|
|
202
|
+
slideRole: 'link'
|
|
200
203
|
},
|
|
201
204
|
breakpoints: {
|
|
202
205
|
...MixinCarouselOptions.breakpoints,
|
|
@@ -199,7 +199,7 @@ export const NavInverted = {
|
|
|
199
199
|
return { args }
|
|
200
200
|
},
|
|
201
201
|
template: `<div class="absolute inset-0">
|
|
202
|
-
<div style="height:2500px" class="nav-offset bg-
|
|
202
|
+
<div style="height:2500px" class="nav-offset bg-jpl-blue-darker">
|
|
203
203
|
<NavDesktop v-bind="args" />
|
|
204
204
|
<div v-if="invertOverride" class="-nav-offset max-w-screen-3xl mx-auto">
|
|
205
205
|
<img class="w-full h-auto block" src="https://picsum.photos/1600/900" alt="Example Hero" />
|