@explorer-1/vue 0.2.0 → 0.2.2
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/components.d.ts +1 -0
- package/dist/explorer-1-vue.js +3759 -3729
- package/dist/explorer-1-vue.umd.cjs +12 -12
- package/dist/src/components/BlockCard/BlockCard.vue.d.ts +9 -0
- package/dist/src/components/BlockLinkCard/BlockLinkCard.vue.d.ts +30 -0
- package/dist/src/components/BlockRelatedLinks/BlockRelatedLinks.vue.d.ts +11 -0
- package/dist/src/components/BlockStreamfield/BlockStreamfield.stories.d.ts +17 -0
- package/dist/src/components/CalendarButton/CalendarButton.stories.d.ts +2 -62
- package/dist/src/components/CalendarButton/CalendarButton.vue.d.ts +26 -7
- package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +8 -1
- package/dist/src/templates/PageEventDetail/PageEventDetail.stories.d.ts +3 -1
- package/dist/src/templates/PageImageDetail/PageImageDetail.stories.d.ts +19 -27
- package/dist/src/templates/PageNewsDetail/PageNewsDetail.stories.d.ts +136 -0
- package/dist/src/templates/edu/PageContentEdu.stories.d.ts +1 -0
- package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.d.ts +128 -0
- package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +51 -0
- package/dist/src/templates/edu/PageEduResourceArticle/PageEduResourceArticle.stories.d.ts +17 -0
- package/dist/src/templates/www/PageCuratedGallery/PageCuratedGallery.stories.d.ts +17 -0
- package/dist/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.d.ts +17 -0
- package/dist/style.css +1 -1
- package/lib/main.ts +4 -4
- package/package.json +1 -1
- package/src/components/BaseTag/BaseTag.vue +2 -2
- package/src/components/{BlockCardGroup/BlockCardGroup.stories.js → BlockCardGrid/BlockCardGrid.stories.js} +21 -12
- package/src/components/BlockCardGrid/BlockCardGrid.vue +70 -0
- package/src/components/{BlockCard/BlockCard.stories.js → BlockCardGridItem/BlockCardGridItem.stories.js} +14 -6
- package/src/components/BlockCardGridItem/BlockCardGridItem.vue +40 -0
- package/src/components/{BlockCard/BlockCard.vue → BlockCardGridItem/BlockCardGridItemElement.vue} +36 -20
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +2 -1
- package/src/components/BlockInlineImage/BlockInlineImage.vue +1 -1
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +2 -1
- package/src/components/BlockLinkCard/BlockLinkCard.vue +33 -13
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +0 -1
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +3 -2
- package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -1
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +8 -1
- package/src/components/BlockStreamfield/BlockStreamfield.vue +17 -4
- package/src/components/CalendarButton/CalendarButton.stories.js +1 -19
- package/src/components/CalendarButton/CalendarButton.vue +43 -17
- package/src/components/EventDetailHero/EventDetailHero.vue +26 -31
- package/src/components/LayoutHelper/LayoutHelper.vue +7 -1
- package/src/components/MixinCarousel/MixinCarousel.vue +1 -1
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -0
- package/src/docs/overviews/blocks.docs.mdx.disabled +7 -7
- package/src/docs/overviews/cards.docs.mdx +81 -0
- package/src/interfaces.ts +7 -2
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +3 -1
- package/src/templates/PageEventDetail/PageEventDetail.vue +3 -3
- package/src/templates/PageImageDetail/PageImageDetail.stories.js +1 -1
- package/src/templates/edu/PageContentEdu.stories.js +1 -0
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +130 -0
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue +419 -0
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +2 -2
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +4 -4
- package/src/components/BlockCardGroup/BlockCardGroup.vue +0 -61
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
/>
|
|
34
34
|
|
|
35
35
|
<LayoutHelper
|
|
36
|
-
v-else-if="block.blockType == 'ListBlock'"
|
|
36
|
+
v-else-if="block.blockType == 'ListBlock' && block.field === 'content_card_list'"
|
|
37
37
|
:key="`listBlock${index}`"
|
|
38
38
|
indent="col-3"
|
|
39
39
|
class="lg:mb-18 mb-10"
|
|
@@ -186,6 +186,15 @@
|
|
|
186
186
|
:data="block"
|
|
187
187
|
/>
|
|
188
188
|
|
|
189
|
+
<LayoutHelper
|
|
190
|
+
v-else-if="block.blockType == 'ListBlock' && block.field === 'card_grid'"
|
|
191
|
+
:key="`gridBlock${index}`"
|
|
192
|
+
indent="col-1"
|
|
193
|
+
class="lg:mb-18 mb-10"
|
|
194
|
+
>
|
|
195
|
+
<BlockCardGrid :cards="block.items" />
|
|
196
|
+
</LayoutHelper>
|
|
197
|
+
|
|
189
198
|
<div
|
|
190
199
|
v-else
|
|
191
200
|
:key="index"
|
|
@@ -199,10 +208,11 @@
|
|
|
199
208
|
<script lang="ts">
|
|
200
209
|
import { defineComponent } from 'vue'
|
|
201
210
|
import type { PropType } from 'vue'
|
|
202
|
-
import type { ImageObject } from '../../interfaces'
|
|
211
|
+
import type { BlockData, ImageObject } from '../../interfaces'
|
|
203
212
|
import type { BlockData as VideoBlockEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
204
213
|
import type { BlockQuoteAttributes } from './../BlockQuote/BlockQuote.vue'
|
|
205
214
|
import LayoutHelper from './../LayoutHelper/LayoutHelper.vue'
|
|
215
|
+
import BlockCardGrid from './../BlockCardGrid/BlockCardGrid.vue'
|
|
206
216
|
import BlockCta from './../BlockCta/BlockCta.vue'
|
|
207
217
|
import BlockHeading from './../BlockHeading/BlockHeading.vue'
|
|
208
218
|
import BlockImage from './../BlockImage/BlockImage.vue'
|
|
@@ -233,8 +243,7 @@ export const variants: Variants = {
|
|
|
233
243
|
fluid: '-fluid'
|
|
234
244
|
}
|
|
235
245
|
|
|
236
|
-
export interface StreamfieldBlockData {
|
|
237
|
-
blockType: string
|
|
246
|
+
export interface StreamfieldBlockData extends BlockData {
|
|
238
247
|
id: string
|
|
239
248
|
fullBleed: boolean
|
|
240
249
|
heading: string
|
|
@@ -256,6 +265,7 @@ export default defineComponent({
|
|
|
256
265
|
name: 'BlockStreamfield',
|
|
257
266
|
components: {
|
|
258
267
|
LayoutHelper,
|
|
268
|
+
BlockCardGrid,
|
|
259
269
|
BlockCta,
|
|
260
270
|
BlockHeading,
|
|
261
271
|
BlockImage,
|
|
@@ -316,6 +326,9 @@ export default defineComponent({
|
|
|
316
326
|
&.-fluid {
|
|
317
327
|
.LayoutHelper {
|
|
318
328
|
@apply block;
|
|
329
|
+
&.container {
|
|
330
|
+
@apply px-0;
|
|
331
|
+
}
|
|
319
332
|
}
|
|
320
333
|
|
|
321
334
|
.BlockInlineImage {
|
|
@@ -15,22 +15,4 @@ export const CalendarButtonData = {
|
|
|
15
15
|
endDatetime: '2021-11-11T23:59:59.999999-08:00'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
const CalendarButtonTemplate = (args) => ({
|
|
20
|
-
props: Object.keys(args),
|
|
21
|
-
components: { CalendarButton },
|
|
22
|
-
template: `
|
|
23
|
-
<CalendarButton
|
|
24
|
-
:is-all-day="isAllDay"
|
|
25
|
-
:start-datetime="startDatetime"
|
|
26
|
-
:end-datetime="endDatetime"
|
|
27
|
-
:title="title"
|
|
28
|
-
:location="location"
|
|
29
|
-
/>
|
|
30
|
-
`
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
export const BaseStory = CalendarButtonTemplate.bind({})
|
|
34
|
-
BaseStory.args = {
|
|
35
|
-
...CalendarButtonData
|
|
36
|
-
}
|
|
18
|
+
export const BaseStory = { name: 'CalendarButton', args: CalendarButtonData }
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BaseButton
|
|
3
|
+
ref="CalendarButton"
|
|
3
4
|
class="w-full"
|
|
4
5
|
variant="secondary"
|
|
5
6
|
compact
|
|
6
|
-
@click="
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
icalendar.download()
|
|
9
|
-
"
|
|
7
|
+
@click="handleDownload"
|
|
10
8
|
>
|
|
11
9
|
Add to calendar
|
|
12
10
|
</BaseButton>
|
|
@@ -15,6 +13,7 @@
|
|
|
15
13
|
import { defineComponent } from 'vue'
|
|
16
14
|
import { ICalendar } from 'datebook'
|
|
17
15
|
import type { CalendarOptions } from 'datebook'
|
|
16
|
+
import { kebabCase } from 'lodash'
|
|
18
17
|
// @ts-ignore
|
|
19
18
|
import dayjs from 'dayjs'
|
|
20
19
|
import BaseButton from './../BaseButton/BaseButton.vue'
|
|
@@ -27,31 +26,50 @@ export default defineComponent({
|
|
|
27
26
|
props: {
|
|
28
27
|
isAllDay: {
|
|
29
28
|
type: Boolean,
|
|
30
|
-
required:
|
|
29
|
+
required: false,
|
|
30
|
+
default: false
|
|
31
31
|
},
|
|
32
|
+
|
|
32
33
|
startDatetime: {
|
|
33
34
|
type: String,
|
|
34
35
|
required: true
|
|
35
36
|
},
|
|
36
37
|
endDatetime: {
|
|
37
38
|
type: String,
|
|
38
|
-
required: false
|
|
39
|
+
required: false,
|
|
40
|
+
default: undefined
|
|
39
41
|
},
|
|
40
42
|
title: {
|
|
41
43
|
type: String,
|
|
42
|
-
required: false
|
|
44
|
+
required: false,
|
|
45
|
+
default: undefined
|
|
43
46
|
},
|
|
44
47
|
location: {
|
|
45
48
|
type: String,
|
|
46
|
-
required: false
|
|
49
|
+
required: false,
|
|
50
|
+
default: undefined
|
|
47
51
|
},
|
|
48
52
|
description: {
|
|
49
53
|
type: String,
|
|
50
|
-
required: false
|
|
54
|
+
required: false,
|
|
55
|
+
default: undefined
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
data(): {
|
|
59
|
+
icalendar: any
|
|
60
|
+
options: CalendarOptions | undefined
|
|
61
|
+
} {
|
|
62
|
+
return {
|
|
63
|
+
icalendar: undefined,
|
|
64
|
+
options: undefined
|
|
51
65
|
}
|
|
52
66
|
},
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
|
|
68
|
+
mounted() {
|
|
69
|
+
this.init()
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
init() {
|
|
55
73
|
let recurrence = {}
|
|
56
74
|
if (this.endDatetime && this.isAllDay) {
|
|
57
75
|
// Calculate how many full days
|
|
@@ -61,7 +79,7 @@ export default defineComponent({
|
|
|
61
79
|
recurrence = { frequency: 'DAILY', interval: 1, count: difference }
|
|
62
80
|
}
|
|
63
81
|
|
|
64
|
-
|
|
82
|
+
this.options = {
|
|
65
83
|
title: this.title ? this.title : undefined,
|
|
66
84
|
location: this.location ? this.addSlashes(this.location) : undefined,
|
|
67
85
|
description: this.description ? this.description : undefined,
|
|
@@ -69,17 +87,25 @@ export default defineComponent({
|
|
|
69
87
|
end: !this.isAllDay && this.endDatetime ? new Date(this.endDatetime) : undefined,
|
|
70
88
|
recurrence
|
|
71
89
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
methods: {
|
|
90
|
+
this.icalendar = new ICalendar(this.options)
|
|
91
|
+
},
|
|
77
92
|
addSlashes(string: string): string {
|
|
78
93
|
// Escape special characters COMMA, SEMI-COLON and BACKSLASH
|
|
79
94
|
// as temporary fix for this issue https://github.com/jshor/datebook/issues/179
|
|
80
95
|
// regex based of https://stackoverflow.com/a/770533
|
|
81
96
|
// eslint-disable-next-line
|
|
82
97
|
return string.replace(/[,;\\]/g, '\\$&').replace(/\u0000/g, '\\0')
|
|
98
|
+
},
|
|
99
|
+
handleDownload() {
|
|
100
|
+
const ics = this.icalendar.render()
|
|
101
|
+
const blob = new Blob([ics], {
|
|
102
|
+
type: 'text/calendar'
|
|
103
|
+
})
|
|
104
|
+
const objectUrl = window.URL.createObjectURL(blob)
|
|
105
|
+
let fileLink = document.createElement('a')
|
|
106
|
+
fileLink.href = objectUrl
|
|
107
|
+
fileLink.download = kebabCase(this.title)
|
|
108
|
+
fileLink.click()
|
|
83
109
|
}
|
|
84
110
|
}
|
|
85
111
|
})
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="image"
|
|
4
|
-
class="
|
|
4
|
+
class="EventDetailHero mb-10 md:mb-10 lg:mb-14 -mx-4 lg:mx-0"
|
|
5
5
|
>
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<div class="text-subtitle">
|
|
28
|
-
{{ startDateSplit.monthAndYear }}
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
6
|
+
<div class="hero">
|
|
7
|
+
<BaseImage
|
|
8
|
+
v-if="image.src"
|
|
9
|
+
:src="image.src.url"
|
|
10
|
+
:srcset="getSrcSet"
|
|
11
|
+
:width="image.src.width"
|
|
12
|
+
:height="image.src.height"
|
|
13
|
+
:alt="image.alt"
|
|
14
|
+
image-class="w-full h-auto"
|
|
15
|
+
object-fit-class="cover"
|
|
16
|
+
loading="lazy"
|
|
17
|
+
/>
|
|
18
|
+
<div
|
|
19
|
+
v-if="startDateSplit"
|
|
20
|
+
class="ThemeVariantLight absolute top-0 left-0 z-10 px-4 py-4 text-center text-white bg-primary"
|
|
21
|
+
>
|
|
22
|
+
<div class="font-extrabold text-6xl leading-tight tracking-wider">
|
|
23
|
+
{{ startDateSplit.day }}
|
|
24
|
+
</div>
|
|
25
|
+
<div class="text-subtitle">
|
|
26
|
+
{{ startDateSplit.monthAndYear }}
|
|
31
27
|
</div>
|
|
32
28
|
</div>
|
|
33
29
|
</div>
|
|
@@ -47,7 +43,8 @@ export default defineComponent({
|
|
|
47
43
|
props: {
|
|
48
44
|
data: {
|
|
49
45
|
type: Object,
|
|
50
|
-
required: false
|
|
46
|
+
required: false,
|
|
47
|
+
default: undefined
|
|
51
48
|
},
|
|
52
49
|
startDateSplit: {
|
|
53
50
|
type: Object as PropType<EventDateObject | undefined>,
|
|
@@ -55,7 +52,8 @@ export default defineComponent({
|
|
|
55
52
|
},
|
|
56
53
|
image: {
|
|
57
54
|
type: Object,
|
|
58
|
-
required: false
|
|
55
|
+
required: false,
|
|
56
|
+
default: undefined
|
|
59
57
|
}
|
|
60
58
|
},
|
|
61
59
|
computed: {
|
|
@@ -65,6 +63,3 @@ export default defineComponent({
|
|
|
65
63
|
}
|
|
66
64
|
})
|
|
67
65
|
</script>
|
|
68
|
-
<style lang="scss">
|
|
69
|
-
@import '@explorer-1/common/src/scss/components/HeroMedia';
|
|
70
|
-
</style>
|
|
@@ -20,6 +20,10 @@ export default defineComponent({
|
|
|
20
20
|
required: false,
|
|
21
21
|
default: 'col-1',
|
|
22
22
|
validator: (prop: string): boolean => Object.keys(indents).includes(prop)
|
|
23
|
+
},
|
|
24
|
+
fullBleed: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
computed: {
|
|
@@ -31,7 +35,9 @@ export default defineComponent({
|
|
|
31
35
|
</script>
|
|
32
36
|
<template>
|
|
33
37
|
<div class="LayoutHelper BaseGrid container mx-auto">
|
|
34
|
-
<div
|
|
38
|
+
<div
|
|
39
|
+
:class="`${theWidth} col-start-1 col-end-13 lg:px-0 ${fullBleed ? 'px-0' : 'px-4'} relative`"
|
|
40
|
+
>
|
|
35
41
|
<slot></slot>
|
|
36
42
|
</div>
|
|
37
43
|
</div>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="sm:flex flex-wrap items-center justify-between">
|
|
18
18
|
<h2
|
|
19
19
|
v-if="heading"
|
|
20
|
-
class="
|
|
20
|
+
class="MixinCarousel__Heading text-h3 defaultTheme:uppercase"
|
|
21
21
|
>
|
|
22
22
|
{{ heading }}
|
|
23
23
|
</h2>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Meta } from '@storybook/blocks'
|
|
3
3
|
import { ComponentList } from './../utils/ComponentList'
|
|
4
4
|
import _ as BlockAccordionStories from './../../components/BlockAccordion/BlockAccordion.stories'
|
|
5
|
-
import _ as
|
|
6
|
-
import _ as BlockCardStories from './../../components/
|
|
5
|
+
import _ as BlockCardGridStories from './../../components/BlockCardGrid/BlockCardGrid.stories'
|
|
6
|
+
import _ as BlockCardStories from './../../components/BlockCardGridItem/BlockCardGridItem.stories'
|
|
7
7
|
import _ as BlockCircleImageCardStories from './../../components/BlockCircleImageCard/BlockCircleImageCard.stories'
|
|
8
8
|
import _ as BlockIframeEmbedStories from './../../components/BlockIframeEmbed/BlockIframeEmbed.stories'
|
|
9
9
|
import _ as BlockImageCarouselStories from './../../components/BlockImageCarousel/BlockImageCarousel.stories'
|
|
@@ -88,11 +88,11 @@ Reserved for the top of the page. Learn more about our heroes on the [heroes ove
|
|
|
88
88
|
fullWidth: true
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
heading: '
|
|
91
|
+
heading: 'BlockCardGrid',
|
|
92
92
|
customDescription:
|
|
93
93
|
'A collection of smaller cards that support images, labels, headings, and descriptions, laid out in a grid on medium and larger screens, or in a carousel on small screens.',
|
|
94
|
-
meta:
|
|
95
|
-
path: '/docs/components-blocks-
|
|
94
|
+
meta: BlockCardGridStories,
|
|
95
|
+
path: '/docs/components-blocks-BlockCardGrid--docs',
|
|
96
96
|
canvasClass: 'sbdocs-inline-height',
|
|
97
97
|
fullWidth: true
|
|
98
98
|
},
|
|
@@ -161,9 +161,9 @@ Reserved for the top of the page. Learn more about our heroes on the [heroes ove
|
|
|
161
161
|
<ComponentList
|
|
162
162
|
components={[
|
|
163
163
|
{
|
|
164
|
-
heading: '
|
|
164
|
+
heading: 'BlockCardGridItem',
|
|
165
165
|
meta: BlockCardStories,
|
|
166
|
-
path: '/docs/components-blocks-
|
|
166
|
+
path: '/docs/components-blocks-BlockCardGridItem--docs'
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
heading: 'BlockLinkCard',
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Meta } from '@storybook/blocks'
|
|
2
|
+
import { ComponentList } from './../utils/ComponentList'
|
|
3
|
+
import * as BlockCardGridItemStories from './../../components/BlockCardGridItem/BlockCardGridItem.stories'
|
|
4
|
+
import * as BlockCircleImageCardStories from './../../components/BlockCircleImageCard/BlockCircleImageCard.stories'
|
|
5
|
+
import * as BlockLinkCardStories from './../../components/BlockLinkCard/BlockLinkCard.stories'
|
|
6
|
+
import * as BlockLinkTileStories from './../../components/BlockLinkTile/BlockLinkTile.stories'
|
|
7
|
+
|
|
8
|
+
<Meta title="Components/Cards/Overview" />
|
|
9
|
+
|
|
10
|
+
# Card Components
|
|
11
|
+
|
|
12
|
+
- [Carousel Cards](#carousel)
|
|
13
|
+
- [Grid Cards](#grid)
|
|
14
|
+
- [Reserved-use Cards](#reserved)
|
|
15
|
+
|
|
16
|
+
<br />
|
|
17
|
+
|
|
18
|
+
<br />
|
|
19
|
+
|
|
20
|
+
<span id="carousel"></span>
|
|
21
|
+
|
|
22
|
+
## Carousel Cards
|
|
23
|
+
|
|
24
|
+
These cards are interchangeable within `MixinCarousel`.
|
|
25
|
+
|
|
26
|
+
<br />
|
|
27
|
+
|
|
28
|
+
<ComponentList
|
|
29
|
+
components={[
|
|
30
|
+
{
|
|
31
|
+
heading: 'BlockLinkCard',
|
|
32
|
+
meta: BlockLinkCardStories,
|
|
33
|
+
path: '/story/components-cards-blocklinkcard--base-story',
|
|
34
|
+
fullWidth: true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
heading: 'BlockLinkTile',
|
|
38
|
+
meta: BlockLinkTileStories,
|
|
39
|
+
path: '/story/components-cards-blocklinktile--base-story',
|
|
40
|
+
fullWidth: true
|
|
41
|
+
}
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<span id="carousel"></span>
|
|
46
|
+
|
|
47
|
+
## Grid Cards
|
|
48
|
+
|
|
49
|
+
These cards can be used to create a grid of cards.
|
|
50
|
+
|
|
51
|
+
<br />
|
|
52
|
+
|
|
53
|
+
<ComponentList
|
|
54
|
+
components={[
|
|
55
|
+
{
|
|
56
|
+
heading: 'BlockCardGridItem',
|
|
57
|
+
meta: BlockCardGridItemStories,
|
|
58
|
+
customDescription: 'The link is optional',
|
|
59
|
+
path: '/story/components-cards-blockcardgriditem--base-story',
|
|
60
|
+
fullWidth: true
|
|
61
|
+
}
|
|
62
|
+
]}
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
## Reserved-use Cards
|
|
66
|
+
|
|
67
|
+
These cards were built for specific use-cases, but that does not exclude them from being re-used for other purposes.
|
|
68
|
+
|
|
69
|
+
<br />
|
|
70
|
+
|
|
71
|
+
<ComponentList
|
|
72
|
+
components={[
|
|
73
|
+
{
|
|
74
|
+
heading: 'BlockCircleImageCard',
|
|
75
|
+
meta: BlockCircleImageCardStories,
|
|
76
|
+
path: '/story/components-cards-blockcircleimagecard--base-story',
|
|
77
|
+
fullWidth: true,
|
|
78
|
+
customDescription: 'Used in the Timeline'
|
|
79
|
+
}
|
|
80
|
+
]}
|
|
81
|
+
/>
|
package/src/interfaces.ts
CHANGED
|
@@ -6,6 +6,8 @@ export interface BreadcrumbPathObject {
|
|
|
6
6
|
|
|
7
7
|
export interface BlockData {
|
|
8
8
|
blockType: string
|
|
9
|
+
field?: string
|
|
10
|
+
items?: any[]
|
|
9
11
|
}
|
|
10
12
|
export interface ImageSrcObject {
|
|
11
13
|
url: string
|
|
@@ -80,12 +82,15 @@ export interface Card {
|
|
|
80
82
|
thumbnailImage?: Partial<ImageObject>
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
export interface
|
|
85
|
+
export interface LinkObject {
|
|
84
86
|
page: {
|
|
85
87
|
url: string
|
|
86
88
|
} | null
|
|
87
|
-
document: { url: string } | null
|
|
88
89
|
externalLink: string | null
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface RelatedLinkObject extends LinkObject {
|
|
93
|
+
document: { url: string } | null
|
|
89
94
|
text: string | null
|
|
90
95
|
}
|
|
91
96
|
|
|
@@ -6,6 +6,7 @@ import PageEventDetail from './PageEventDetail.vue'
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Templates/PageEventDetail',
|
|
8
8
|
component: PageEventDetail,
|
|
9
|
+
tags: ['!autodocs'],
|
|
9
10
|
parameters: {
|
|
10
11
|
html: {
|
|
11
12
|
root: '#storyDecorator'
|
|
@@ -17,6 +18,7 @@ export default {
|
|
|
17
18
|
|
|
18
19
|
// stories
|
|
19
20
|
export const BaseStory = {
|
|
21
|
+
name: 'PageEventDetail',
|
|
20
22
|
args: {
|
|
21
23
|
data: {
|
|
22
24
|
id: '285',
|
|
@@ -34,7 +36,7 @@ export const BaseStory = {
|
|
|
34
36
|
label: 'Events',
|
|
35
37
|
location: 'Webcast',
|
|
36
38
|
registerLink: [],
|
|
37
|
-
|
|
39
|
+
eventImage: {
|
|
38
40
|
...EventDetailHeroData.heroImage
|
|
39
41
|
},
|
|
40
42
|
thumbnailImage: {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
>
|
|
33
33
|
<div
|
|
34
34
|
v-if="data.label"
|
|
35
|
-
class="flex flex-wrap items-start mb-
|
|
35
|
+
class="flex flex-wrap items-start mb-4"
|
|
36
36
|
>
|
|
37
37
|
<nuxt-link
|
|
38
38
|
class="py-3 cursor-pointer group nuxt-link-active text-subtitle text-primary can-hover:hover:text-primary-dark"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
<LayoutHelper indent="col-2">
|
|
64
64
|
<EventDetailHero
|
|
65
|
-
:image="data.
|
|
65
|
+
:image="data.eventImage"
|
|
66
66
|
:start-date-split="formattedSplitEventDates"
|
|
67
67
|
/>
|
|
68
68
|
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
:class="data.registerLink && data.registerLink.length > 0 ? '' : 'lg:mb-10'"
|
|
74
74
|
>
|
|
75
75
|
<div class="PageEventDetail__Metadata text-primary">
|
|
76
|
-
<IconCalendar class="relative mr-3" />
|
|
76
|
+
<IconCalendar class="relative mr-3 text-[1.2rem]" />
|
|
77
77
|
<span>{{ formattedEventDates }}</span>
|
|
78
78
|
</div>
|
|
79
79
|
<div
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { BlockKeyPointsData } from './../../../components/BlockKeyPoints/BlockKeyPoints.stories'
|
|
2
|
+
import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
|
|
3
|
+
import { EventDetailHeroData } from './../../../components/EventDetailHero/EventDetailHero.stories'
|
|
4
|
+
import { EventsBlockLinkCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories'
|
|
5
|
+
import PageEduEventDetail from './PageEduEventDetail.vue'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Templates/EDU/PageEduEventDetail',
|
|
9
|
+
component: PageEduEventDetail,
|
|
10
|
+
tags: ['!autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
html: {
|
|
13
|
+
root: '#storyDecorator'
|
|
14
|
+
},
|
|
15
|
+
layout: 'fullscreen'
|
|
16
|
+
},
|
|
17
|
+
excludeStories: /.*Data$/
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// stories
|
|
21
|
+
export const BaseStory = {
|
|
22
|
+
name: 'PageEduEventDetail',
|
|
23
|
+
args: {
|
|
24
|
+
data: {
|
|
25
|
+
id: '285',
|
|
26
|
+
title: 'Becoming a NASA engineer',
|
|
27
|
+
slug: 'becoming-a-nasa-engineer',
|
|
28
|
+
url: '/events/becoming-a-nasa-engineer',
|
|
29
|
+
startDate: '2022-01-23',
|
|
30
|
+
startDatetime: '2022-01-23T17:00:00-08:00',
|
|
31
|
+
startTime: '17:00:00',
|
|
32
|
+
endDate: '2022-01-25',
|
|
33
|
+
endDatetime: '2022-01-25T23:00:00-08:00',
|
|
34
|
+
endTime: '23:00:00',
|
|
35
|
+
isAllDay: false,
|
|
36
|
+
timezone: 'PST',
|
|
37
|
+
eventType: 'Workshop',
|
|
38
|
+
summary:
|
|
39
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus et luctus nisi. Maecenas vel turpis sem. Nullam ultricies nulla quis nisi faucibus eleifend. In turpis ante, blandit nec dapibus tempor, posuere at erat. In justo quam, imperdiet at hendrerit eget, imperdiet ut orci. ',
|
|
40
|
+
locationName: 'Webcast',
|
|
41
|
+
registerLink: [
|
|
42
|
+
{
|
|
43
|
+
text: 'Registration Link',
|
|
44
|
+
document: '',
|
|
45
|
+
page: {
|
|
46
|
+
url: '/placeholder'
|
|
47
|
+
},
|
|
48
|
+
externalLink: ''
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
eventImage: {
|
|
52
|
+
__typename: 'CustomImage',
|
|
53
|
+
srcSet:
|
|
54
|
+
'https://picsum.photos/720/420 320w, https://picsum.photos/720/420 640w, https://picsum.photos/720/420 720w',
|
|
55
|
+
original: 'https://picsum.photos/720/420',
|
|
56
|
+
src: {
|
|
57
|
+
__typename: 'CustomRendition',
|
|
58
|
+
url: 'https://picsum.photos/720/420',
|
|
59
|
+
width: '720',
|
|
60
|
+
height: '420'
|
|
61
|
+
},
|
|
62
|
+
title: 'Marine Picks First Public Mars Global Surveyor Image',
|
|
63
|
+
alt: '',
|
|
64
|
+
caption:
|
|
65
|
+
'<p data-block-key="y00sz">A close-up view of part of the area imaged by Mars Global Surveyor for its public request program.</p>',
|
|
66
|
+
credit: 'Credit',
|
|
67
|
+
detailUrl: null
|
|
68
|
+
},
|
|
69
|
+
thumbnailImage: {
|
|
70
|
+
alt: '',
|
|
71
|
+
original: 'https://picsum.photos/512/288'
|
|
72
|
+
},
|
|
73
|
+
targetAudience: 'All ages',
|
|
74
|
+
body: [
|
|
75
|
+
BlockKeyPointsData,
|
|
76
|
+
{
|
|
77
|
+
blockType: 'RichTextBlock',
|
|
78
|
+
value:
|
|
79
|
+
'<p>Lorem ipsum <a href="/missions/test-mission/">dolor</a> sit amet, consectetur adipiscing elit. Quisque vitae justo quis justo malesuada molestie. Cras sed tincidunt dui.</p><p>Integer imperdiet blandit neque vitae euismod. Nulla aliquet lacus nibh, vel tincidunt urna efficitur non. In et eros vitae ex posuere maximus quis eget urna. Suspendisse fringilla posuere velit sit amet posuere. Morbi malesuada bibendum vehicula. Donec faucibus ut erat ut mattis. Suspendisse ornare, quam at placerat cursus, dolor mi lacinia nunc, eget maximus augue nulla in dolor.</p>\n'
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
relatedEvents: [...EventsBlockLinkCarouselData],
|
|
83
|
+
speakers: [
|
|
84
|
+
{
|
|
85
|
+
host: 'host',
|
|
86
|
+
id: '1',
|
|
87
|
+
internalLink: null,
|
|
88
|
+
name: 'Varoujan Gorjian',
|
|
89
|
+
title: 'Splitzer Research Scientest, JPL'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
host: 'co-host',
|
|
93
|
+
id: '2',
|
|
94
|
+
image: {
|
|
95
|
+
alt: '',
|
|
96
|
+
src: {
|
|
97
|
+
height: '450',
|
|
98
|
+
url: 'https://picsum.photos/560/560',
|
|
99
|
+
width: '450'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
internalLink: null,
|
|
103
|
+
name: 'Robert Hurt',
|
|
104
|
+
title: 'Splitzer visualisation'
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
relatedLinks: [
|
|
108
|
+
{
|
|
109
|
+
blockType: 'RelatedLinksBlock',
|
|
110
|
+
heading: 'Related Links',
|
|
111
|
+
links: [
|
|
112
|
+
{
|
|
113
|
+
document: null,
|
|
114
|
+
externalLink: 'http://www.google.com',
|
|
115
|
+
page: null,
|
|
116
|
+
text: 'Lorem ipsum dolor'
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
document: null,
|
|
120
|
+
externalLink: 'http://www.google.com',
|
|
121
|
+
page: null,
|
|
122
|
+
text: 'Sit amet consectatur'
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
relatedContent: BlockLinkCardCarouselData
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|