@explorer-1/vue 0.2.26 → 0.2.28
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 +3 -0
- package/dist/explorer-1-vue.js +1162 -1112
- package/dist/explorer-1-vue.umd.cjs +13 -13
- package/dist/src/components/AboutTheAuthor/AboutTheAuthor.stories.d.ts +30 -0
- package/dist/src/components/BaseImage/BaseImage.stories.d.ts +1 -1
- package/dist/src/components/BaseImage/BaseImage.vue.d.ts +1 -1
- package/dist/src/components/BasePill/BasePill.vue.d.ts +4 -0
- package/dist/src/components/BlockLinkCard/BlockLinkCard.vue.d.ts +3 -3
- package/dist/src/components/DetailHeadline/DetailHeadline.vue.d.ts +10 -7
- package/dist/src/components/EventCard/EventCard.vue.d.ts +1 -1
- package/dist/src/components/HeroLarge/HeroLarge.vue.d.ts +45 -3
- package/dist/src/components/HeroMedium/HeroMedium.vue.d.ts +1 -1
- package/dist/src/components/MetadataEduResource/MetadataEduResource.vue.d.ts +1 -1
- package/dist/src/components/MetadataEvent/MetadataEvent.vue.d.ts +1 -1
- package/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.d.ts +1 -1
- package/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.vue.d.ts +1 -1
- package/dist/src/components/SearchResultCard/SearchResultCard.vue.d.ts +3 -3
- package/dist/src/components/TextInput/TextInput.vue.d.ts +9 -9
- package/dist/src/interfaces.d.ts +9 -1
- package/dist/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.d.ts +123 -0
- package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +3 -0
- package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +30 -0
- package/dist/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +50 -0
- package/src/components/AboutTheAuthor/AboutTheAuthor.vue +90 -0
- package/src/components/BasePill/BasePill.vue +4 -1
- package/src/components/BlockLinkCard/BlockLinkCard.vue +2 -2
- package/src/components/BlockText/BlockText.vue +3 -3
- package/src/components/DetailHeadline/DetailHeadline.vue +2 -3
- package/src/components/HeroInlineMedia/HeroInlineMedia.vue +77 -0
- package/src/components/HeroLarge/HeroLarge.vue +49 -10
- package/src/components/HeroMedium/HeroMedium.vue +1 -1
- package/src/components/MetaPanel/MetaPanel.vue +1 -1
- package/src/components/MetaPanelItems/MetaPanelItems.vue +11 -8
- package/src/constants.ts +11 -0
- package/src/interfaces.ts +6 -1
- package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js +103 -0
- package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue +146 -0
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.js +3 -1
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +28 -42
- package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +2 -0
- package/src/templates/edu/PageEduLesson/PageEduLesson.vue +13 -37
- package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.js +3 -8
- package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.vue +10 -1
- package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.js +2 -0
- package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.vue +11 -50
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +1 -1
- package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, reactive, ref } from 'vue'
|
|
3
|
+
import type { ImageObject, PageEduResourcesObject } from './../../../interfaces'
|
|
4
|
+
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
5
|
+
import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
6
|
+
import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
|
|
7
|
+
import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
|
|
8
|
+
import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
|
|
9
|
+
import BlockRelatedLinks from '../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
10
|
+
import HeroLarge from './../../../components/HeroLarge/HeroLarge.vue'
|
|
11
|
+
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
12
|
+
import MetaPanel from '../../../components/MetaPanel/MetaPanel.vue'
|
|
13
|
+
|
|
14
|
+
interface PageEduCollectionsDetail extends PageEduResourcesObject {
|
|
15
|
+
heroImage: ImageObject
|
|
16
|
+
heroImageCaption: string
|
|
17
|
+
showMetaPanel: boolean
|
|
18
|
+
heroSubtitle: string
|
|
19
|
+
}
|
|
20
|
+
interface PageEduCollectionsDetailProps {
|
|
21
|
+
data?: PageEduCollectionsDetail
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(defineProps<PageEduCollectionsDetailProps>(), {
|
|
25
|
+
data: undefined
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const { data } = reactive(props)
|
|
29
|
+
|
|
30
|
+
const PageEduCollectionsDetailJumpMenu = ref()
|
|
31
|
+
|
|
32
|
+
defineExpose({
|
|
33
|
+
PageEduCollectionsDetailJumpMenu
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const heroInline = computed((): boolean => {
|
|
37
|
+
return data?.heroPosition === 'inline'
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const computedClass = computed((): string => {
|
|
41
|
+
if (heroInline.value || !data?.heroImage) {
|
|
42
|
+
return 'pt-5 lg:pt-12'
|
|
43
|
+
} else if (!heroInline.value) {
|
|
44
|
+
return '-nav-offset'
|
|
45
|
+
}
|
|
46
|
+
return ''
|
|
47
|
+
})
|
|
48
|
+
</script>
|
|
49
|
+
<template>
|
|
50
|
+
<div
|
|
51
|
+
v-if="data"
|
|
52
|
+
class="ThemeEdu ThemeVariantLight"
|
|
53
|
+
:class="computedClass"
|
|
54
|
+
>
|
|
55
|
+
<!-- hero large -->
|
|
56
|
+
<HeroLarge
|
|
57
|
+
v-if="!heroInline && data.heroImage"
|
|
58
|
+
:title="data.title"
|
|
59
|
+
:image="data.heroImage"
|
|
60
|
+
:summary="'Test test test lorem ipsum dolor sit amet yep.'"
|
|
61
|
+
:custom-pill-type="data.__typename"
|
|
62
|
+
:class="!data.showMetaPanel ? 'mb-10 lg:mb-22' : ''"
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<NavJumpMenu
|
|
66
|
+
ref="PageEduCollectionsDetailJumpMenu"
|
|
67
|
+
:title="data.title"
|
|
68
|
+
:blocks="data.body"
|
|
69
|
+
:enabled="data.showJumpMenu"
|
|
70
|
+
dropdown-text="In this collection"
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
<LayoutHelper
|
|
74
|
+
v-if="heroInline || !data.heroImage"
|
|
75
|
+
indent="col-2"
|
|
76
|
+
class="mb-10"
|
|
77
|
+
>
|
|
78
|
+
<DetailHeadline
|
|
79
|
+
:title="data.title"
|
|
80
|
+
label="Collection"
|
|
81
|
+
pill
|
|
82
|
+
pill-color="primary-inverted"
|
|
83
|
+
/>
|
|
84
|
+
</LayoutHelper>
|
|
85
|
+
<MetaPanel
|
|
86
|
+
v-if="data.showMetaPanel"
|
|
87
|
+
theme="primary"
|
|
88
|
+
:class="{ 'mb-10 lg:mb-14': true }"
|
|
89
|
+
:primary-subject="data.primarySubject"
|
|
90
|
+
:additional-subjects="data.additionalSubjects"
|
|
91
|
+
:grade-levels="data.gradeLevels"
|
|
92
|
+
:negative-top="!heroInline"
|
|
93
|
+
:negative-bottom="heroInline"
|
|
94
|
+
/>
|
|
95
|
+
|
|
96
|
+
<!-- TODO: put this in a component (exclude layout though) -->
|
|
97
|
+
<LayoutHelper
|
|
98
|
+
v-if="data.heroImage && heroInline"
|
|
99
|
+
class="lg:mb-22 mb-10"
|
|
100
|
+
>
|
|
101
|
+
<BlockImageStandard
|
|
102
|
+
:data="data.heroImage"
|
|
103
|
+
:display-caption="data.heroImageCaption ? true : false"
|
|
104
|
+
:caption="data.heroImageCaption"
|
|
105
|
+
:constrain="data.heroConstrain"
|
|
106
|
+
/>
|
|
107
|
+
</LayoutHelper>
|
|
108
|
+
|
|
109
|
+
<!-- streamfield blocks -->
|
|
110
|
+
<BlockStreamfield :data="data.body" />
|
|
111
|
+
|
|
112
|
+
<!-- related links -->
|
|
113
|
+
<LayoutHelper
|
|
114
|
+
v-if="data.relatedLinks && data.relatedLinks.length"
|
|
115
|
+
indent="col-3"
|
|
116
|
+
class="lg:my-18 my-10"
|
|
117
|
+
>
|
|
118
|
+
<BlockRelatedLinks :data="data.relatedLinks[0]" />
|
|
119
|
+
</LayoutHelper>
|
|
120
|
+
|
|
121
|
+
<LayoutHelper
|
|
122
|
+
v-if="data.lastPublishedAt"
|
|
123
|
+
indent="col-3"
|
|
124
|
+
class="lg:my-18 my-10"
|
|
125
|
+
>
|
|
126
|
+
<p class="border-t border-gray-light-mid pt-8">
|
|
127
|
+
<strong>Collection Last Updated:</strong>
|
|
128
|
+
{{
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
$filters.displayDate(data.lastPublishedAt)
|
|
131
|
+
}}
|
|
132
|
+
</p>
|
|
133
|
+
</LayoutHelper>
|
|
134
|
+
<!-- explore more -->
|
|
135
|
+
<div
|
|
136
|
+
v-if="data.relatedContent?.length"
|
|
137
|
+
class="bg-stars bg-primary-darker pt-14 pb-20 ThemeVariantDark text-white"
|
|
138
|
+
>
|
|
139
|
+
<BlockLinkCarousel
|
|
140
|
+
item-type="cards"
|
|
141
|
+
heading="Explore more"
|
|
142
|
+
:items="data.relatedContent"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
@@ -4,10 +4,10 @@ import { BlockImageCarouselData } from './../../../components/BlockImageCarousel
|
|
|
4
4
|
import { BlockImageComparisonData } from './../../../components/BlockImageComparison/BlockImageComparison.stories'
|
|
5
5
|
import { BaseVideoData } from './../../../components/BaseVideo/BaseVideo.stories'
|
|
6
6
|
import { BlockVideoEmbedData } from './../../../components/BlockVideoEmbed/BlockVideoEmbed.stories'
|
|
7
|
-
|
|
8
7
|
import { BlockRelatedLinksData } from './../../../components/BlockRelatedLinks/BlockRelatedLinks.stories.js'
|
|
9
8
|
import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
|
|
10
9
|
import { BlockStreamfieldTruncatedData } from './../../../components/BlockStreamfield/BlockStreamfield.stories'
|
|
10
|
+
import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories'
|
|
11
11
|
import PageEduExplainerArticle from './PageEduExplainerArticle.vue'
|
|
12
12
|
|
|
13
13
|
export default {
|
|
@@ -41,6 +41,8 @@ export const BaseStory = {
|
|
|
41
41
|
url: 'http://localhost:3000/edu/resources/test-resource',
|
|
42
42
|
title: 'Test Resource',
|
|
43
43
|
readTime: '6 min read',
|
|
44
|
+
lastPublishedAt: '2024-08-22T02:33:13.507206+00:00',
|
|
45
|
+
authors: AboutTheAuthorData,
|
|
44
46
|
heroConstrain: true,
|
|
45
47
|
heroPosition: 'full_bleed',
|
|
46
48
|
hero: [
|
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent } from 'vue'
|
|
3
3
|
import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
|
|
4
|
-
import BaseImagePlaceholder from './../../../components/BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
5
|
-
import BlockImageCarousel from './../../../components/BlockImageCarousel/BlockImageCarousel.vue'
|
|
6
|
-
import BlockImageComparison from './../../../components/BlockImageComparison/BlockImageComparison.vue'
|
|
7
4
|
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
8
5
|
import BlockText from './../../../components/BlockText/BlockText.vue'
|
|
9
|
-
import BlockVideo from './../../../components/BlockVideo/BlockVideo.vue'
|
|
10
6
|
import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
11
7
|
import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
|
|
12
|
-
import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
|
|
13
8
|
import ShareButtonsEdu from './../../../components/ShareButtonsEdu/ShareButtonsEdu.vue'
|
|
14
9
|
import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
|
|
15
|
-
import BlockIframeEmbed from '../../../components/BlockIframeEmbed/BlockIframeEmbed.vue'
|
|
16
10
|
import BlockRelatedLinks from '../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
17
11
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
12
|
+
import HeroInlineMedia from './../../../components/HeroInlineMedia/HeroInlineMedia.vue'
|
|
13
|
+
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
18
14
|
|
|
19
15
|
export default defineComponent({
|
|
20
16
|
name: 'PageEduExplainerArticle',
|
|
21
17
|
components: {
|
|
18
|
+
AboutTheAuthor,
|
|
22
19
|
HeroMedia,
|
|
23
|
-
|
|
20
|
+
HeroInlineMedia,
|
|
24
21
|
LayoutHelper,
|
|
25
22
|
DetailHeadline,
|
|
26
|
-
BlockImageStandard,
|
|
27
|
-
BlockIframeEmbed,
|
|
28
23
|
ShareButtonsEdu,
|
|
29
24
|
BlockStreamfield,
|
|
30
|
-
BlockImageCarousel,
|
|
31
|
-
BlockImageComparison,
|
|
32
25
|
BlockLinkCarousel,
|
|
33
26
|
BlockRelatedLinks,
|
|
34
27
|
BlockText,
|
|
35
|
-
BlockVideo,
|
|
36
28
|
NavJumpMenu
|
|
37
29
|
},
|
|
38
30
|
props: {
|
|
@@ -134,43 +126,16 @@ export default defineComponent({
|
|
|
134
126
|
dropdown-text="In this article"
|
|
135
127
|
/>
|
|
136
128
|
<!-- inline hero content -->
|
|
129
|
+
|
|
137
130
|
<LayoutHelper
|
|
138
131
|
v-if="!heroEmpty && heroInline"
|
|
139
132
|
indent="col-2"
|
|
140
133
|
class="lg:mb-22 mt-10 mb-10"
|
|
141
134
|
>
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
:data="data.hero[0].imageInline"
|
|
145
|
-
:display-caption="data.hero[0].displayCaption"
|
|
146
|
-
:caption="data.hero[0].caption"
|
|
135
|
+
<HeroInlineMedia
|
|
136
|
+
:hero-blocks="data.hero"
|
|
147
137
|
:constrain="data.heroConstrain"
|
|
148
138
|
/>
|
|
149
|
-
<BlockImageCarousel
|
|
150
|
-
v-else-if="data.hero[0].blockType === 'CarouselBlock'"
|
|
151
|
-
:items="data.hero[0].blocks"
|
|
152
|
-
:block-id="data.hero[0].id"
|
|
153
|
-
/>
|
|
154
|
-
<BlockIframeEmbed
|
|
155
|
-
v-else-if="data.hero[0].blockType === 'IframeEmbedBlock'"
|
|
156
|
-
:data="data.hero[0]"
|
|
157
|
-
/>
|
|
158
|
-
<BlockVideo
|
|
159
|
-
v-else-if="data.hero[0].blockType === 'VideoBlock'"
|
|
160
|
-
:data="data.hero[0]"
|
|
161
|
-
autoplay
|
|
162
|
-
/>
|
|
163
|
-
<BaseImagePlaceholder
|
|
164
|
-
v-else-if="data.hero[0].blockType === 'VideoEmbedBlock'"
|
|
165
|
-
aspect-ratio="16:9"
|
|
166
|
-
dark-mode
|
|
167
|
-
>
|
|
168
|
-
<div v-html="data.hero[0].embed.embed"></div>
|
|
169
|
-
</BaseImagePlaceholder>
|
|
170
|
-
<BlockImageComparison
|
|
171
|
-
v-else-if="data.hero[0].blockType === 'ImageComparisonBlock'"
|
|
172
|
-
:data="data.hero[0]"
|
|
173
|
-
/>
|
|
174
139
|
</LayoutHelper>
|
|
175
140
|
|
|
176
141
|
<LayoutHelper
|
|
@@ -207,5 +172,26 @@ export default defineComponent({
|
|
|
207
172
|
:heading="data.relatedContentHeading"
|
|
208
173
|
:items="data.relatedContent"
|
|
209
174
|
/>
|
|
175
|
+
|
|
176
|
+
<LayoutHelper
|
|
177
|
+
v-if="data.authors?.length"
|
|
178
|
+
indent="col-3"
|
|
179
|
+
>
|
|
180
|
+
<AboutTheAuthor :authors="data.authors" />
|
|
181
|
+
</LayoutHelper>
|
|
182
|
+
|
|
183
|
+
<LayoutHelper
|
|
184
|
+
v-if="data.lastPublishedAt"
|
|
185
|
+
indent="col-3"
|
|
186
|
+
class="lg:my-18 my-10"
|
|
187
|
+
>
|
|
188
|
+
<p class="border-t border-gray-light-mid pt-8">
|
|
189
|
+
<strong>Explainer Article Last Updated:</strong>
|
|
190
|
+
{{
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
$filters.displayDate(data.lastPublishedAt)
|
|
193
|
+
}}
|
|
194
|
+
</p>
|
|
195
|
+
</LayoutHelper>
|
|
210
196
|
</div>
|
|
211
197
|
</template>
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
BlockStreamfieldMinimalData
|
|
14
14
|
} from './../../../components/BlockStreamfield/BlockStreamfield.stories'
|
|
15
15
|
import PageEduLesson from './PageEduLesson.vue'
|
|
16
|
+
import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories'
|
|
16
17
|
|
|
17
18
|
export default {
|
|
18
19
|
title: 'Templates/EDU/PageEduLesson',
|
|
@@ -50,6 +51,7 @@ export const BaseStory = {
|
|
|
50
51
|
original: 'http://127.0.0.1:9000/media/original_images/imagessirtfsirtf-090303-16.jpg',
|
|
51
52
|
alt: ''
|
|
52
53
|
},
|
|
54
|
+
authors: AboutTheAuthorData,
|
|
53
55
|
hero: [
|
|
54
56
|
{
|
|
55
57
|
...HeroMediaData,
|
|
@@ -8,22 +8,19 @@ import type {
|
|
|
8
8
|
} from './../../../interfaces'
|
|
9
9
|
import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
|
|
10
10
|
import BaseLink from './../../../components/BaseLink/BaseLink.vue'
|
|
11
|
-
import BaseImagePlaceholder from './../../../components/BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
12
11
|
import type { BlockHeadingObject } from '../../../components/BlockHeading/BlockHeading.vue'
|
|
13
|
-
import BlockImageCarousel from './../../../components/BlockImageCarousel/BlockImageCarousel.vue'
|
|
14
|
-
import BlockImageComparison from './../../../components/BlockImageComparison/BlockImageComparison.vue'
|
|
15
12
|
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
16
|
-
import BlockVideo from './../../../components/BlockVideo/BlockVideo.vue'
|
|
17
13
|
import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
18
14
|
import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
|
|
19
|
-
import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
|
|
20
15
|
import ShareButtonsEdu from './../../../components/ShareButtonsEdu/ShareButtonsEdu.vue'
|
|
21
16
|
import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
|
|
22
|
-
import BlockIframeEmbed from '../../../components/BlockIframeEmbed/BlockIframeEmbed.vue'
|
|
23
17
|
import BlockRelatedLinks from '../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
24
18
|
import MetaPanel from '../../../components/MetaPanel/MetaPanel.vue'
|
|
25
19
|
import PageEduLessonSection, { type PageEduLessonSectionProps } from './PageEduLessonSection.vue'
|
|
26
20
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
21
|
+
import HeroInlineMedia from './../../../components/HeroInlineMedia/HeroInlineMedia.vue'
|
|
22
|
+
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
23
|
+
|
|
27
24
|
import { HeadingLevel } from '../../../components/BaseHeading/BaseHeading.vue'
|
|
28
25
|
|
|
29
26
|
interface EduLessonSectionObject extends PageEduLessonSectionProps {
|
|
@@ -319,38 +316,10 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
|
|
|
319
316
|
v-if="!heroEmpty && heroInline && data.hero?.length"
|
|
320
317
|
class="lg:mb-22 mb-10"
|
|
321
318
|
>
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
:data="data.hero[0].imageInline"
|
|
325
|
-
:display-caption="data.hero[0].displayCaption"
|
|
326
|
-
:caption="data.hero[0].caption"
|
|
319
|
+
<HeroInlineMedia
|
|
320
|
+
:hero-blocks="data.hero"
|
|
327
321
|
:constrain="data.heroConstrain"
|
|
328
322
|
/>
|
|
329
|
-
<BlockImageCarousel
|
|
330
|
-
v-else-if="data.hero[0].blockType === 'CarouselBlock'"
|
|
331
|
-
:items="data.hero[0].blocks"
|
|
332
|
-
:block-id="data.hero[0].id"
|
|
333
|
-
/>
|
|
334
|
-
<BlockIframeEmbed
|
|
335
|
-
v-else-if="data.hero[0].blockType === 'IframeEmbedBlock'"
|
|
336
|
-
:data="data.hero[0]"
|
|
337
|
-
/>
|
|
338
|
-
<BlockVideo
|
|
339
|
-
v-else-if="data.hero[0].blockType === 'VideoBlock'"
|
|
340
|
-
:data="data.hero[0]"
|
|
341
|
-
autoplay
|
|
342
|
-
/>
|
|
343
|
-
<BaseImagePlaceholder
|
|
344
|
-
v-else-if="data.hero[0].blockType === 'VideoEmbedBlock'"
|
|
345
|
-
aspect-ratio="16:9"
|
|
346
|
-
dark-mode
|
|
347
|
-
>
|
|
348
|
-
<div v-html="data.hero[0].embed?.embed"></div>
|
|
349
|
-
</BaseImagePlaceholder>
|
|
350
|
-
<BlockImageComparison
|
|
351
|
-
v-else-if="data.hero[0].blockType === 'ImageComparisonBlock'"
|
|
352
|
-
:data="data.hero[0]"
|
|
353
|
-
/>
|
|
354
323
|
</LayoutHelper>
|
|
355
324
|
|
|
356
325
|
<NavJumpMenu
|
|
@@ -396,10 +365,17 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
|
|
|
396
365
|
<BlockLinkCarousel
|
|
397
366
|
item-type="cards"
|
|
398
367
|
class="lg:my-24 my-12 print:px-4"
|
|
399
|
-
:heading="data.relatedContentHeading"
|
|
368
|
+
:heading="data.relatedContentHeading || 'Related Lessons & Projects'"
|
|
400
369
|
:items="data.relatedContent"
|
|
401
370
|
/>
|
|
402
371
|
|
|
372
|
+
<LayoutHelper
|
|
373
|
+
v-if="data.authors?.length"
|
|
374
|
+
indent="col-3"
|
|
375
|
+
>
|
|
376
|
+
<AboutTheAuthor :authors="data.authors" />
|
|
377
|
+
</LayoutHelper>
|
|
378
|
+
|
|
403
379
|
<LayoutHelper
|
|
404
380
|
v-if="data.lastPublishedAt"
|
|
405
381
|
indent="col-3"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { HeroMediaData } from './../../../components/HeroMedia/HeroMedia.stories'
|
|
2
2
|
import { BlockStreamfieldData } from './../../../components/BlockStreamfield/BlockStreamfield.stories'
|
|
3
|
+
import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories'
|
|
4
|
+
|
|
3
5
|
import PageEduNewsDetail from './PageEduNewsDetail.vue'
|
|
4
6
|
|
|
5
7
|
export default {
|
|
@@ -33,14 +35,7 @@ export const BaseStory = {
|
|
|
33
35
|
title: "NASA's Ingenuity Mars Helicopter Recharges Its Batteries in Flight",
|
|
34
36
|
publicationDate: '2024-06-20 20:36:49.657301+00:00',
|
|
35
37
|
readTime: '5 min read',
|
|
36
|
-
authors:
|
|
37
|
-
{
|
|
38
|
-
author: {
|
|
39
|
-
name: 'Author Name',
|
|
40
|
-
organization: 'Organization Name'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
],
|
|
38
|
+
authors: AboutTheAuthorData,
|
|
44
39
|
getTopicsForDisplay: [
|
|
45
40
|
{
|
|
46
41
|
title: 'Mars',
|
|
@@ -10,6 +10,7 @@ import BlockImageStandard from './../../../components/BlockImage/BlockImageStand
|
|
|
10
10
|
import BlockText from './../../../components/BlockText/BlockText.vue'
|
|
11
11
|
import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
|
|
12
12
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
13
|
+
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
13
14
|
|
|
14
15
|
interface PageEduNewsDetailObject extends PageObject {
|
|
15
16
|
readTime: string
|
|
@@ -18,7 +19,7 @@ interface PageEduNewsDetailObject extends PageObject {
|
|
|
18
19
|
heroImageInline: ImageObject
|
|
19
20
|
heroConstrain: boolean
|
|
20
21
|
heroImageCaption: string
|
|
21
|
-
authors: AuthorObject[]
|
|
22
|
+
authors: { author: AuthorObject }[]
|
|
22
23
|
showJumpMenu: boolean
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -152,6 +153,14 @@ defineExpose({
|
|
|
152
153
|
:data="data.body"
|
|
153
154
|
/>
|
|
154
155
|
|
|
156
|
+
<LayoutHelper
|
|
157
|
+
v-if="data.authors?.length"
|
|
158
|
+
indent="col-3"
|
|
159
|
+
class="mb-10 lg:mb-22"
|
|
160
|
+
>
|
|
161
|
+
<AboutTheAuthor :authors="data.authors" />
|
|
162
|
+
</LayoutHelper>
|
|
163
|
+
|
|
155
164
|
<div class="bg-stars bg-primary-darker">
|
|
156
165
|
<div class="py-10 text-center text-white">
|
|
157
166
|
<strong>Related News goes here</strong>
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
BlockStreamfieldMinimalData
|
|
14
14
|
} from './../../../components/BlockStreamfield/BlockStreamfield.stories'
|
|
15
15
|
import PageEduTeachableMoment from './PageEduTeachableMoment.vue'
|
|
16
|
+
import { AboutTheAuthorData } from './../../../components/AboutTheAuthor/AboutTheAuthor.stories'
|
|
16
17
|
|
|
17
18
|
export default {
|
|
18
19
|
title: 'Templates/EDU/PageEduTeachableMoment',
|
|
@@ -47,6 +48,7 @@ export const BaseStory = {
|
|
|
47
48
|
original: 'http://127.0.0.1:9000/media/original_images/imagessirtfsirtf-090303-16.jpg',
|
|
48
49
|
alt: ''
|
|
49
50
|
},
|
|
51
|
+
authors: AboutTheAuthorData,
|
|
50
52
|
hero: [
|
|
51
53
|
{
|
|
52
54
|
...HeroMediaData,
|
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
import { computed, reactive, ref } from 'vue'
|
|
3
3
|
import type { PageEduResourcesObject } from './../../../interfaces'
|
|
4
4
|
import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
|
|
5
|
-
import BaseImagePlaceholder from './../../../components/BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
6
|
-
import BlockImageCarousel from './../../../components/BlockImageCarousel/BlockImageCarousel.vue'
|
|
7
|
-
import BlockImageComparison from './../../../components/BlockImageComparison/BlockImageComparison.vue'
|
|
8
5
|
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
9
|
-
import
|
|
6
|
+
import BlockText from './../../../components/BlockText/BlockText.vue'
|
|
10
7
|
import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
11
8
|
import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
|
|
12
|
-
import BlockImageStandard from './../../../components/BlockImage/BlockImageStandard.vue'
|
|
13
9
|
import ShareButtonsEdu from './../../../components/ShareButtonsEdu/ShareButtonsEdu.vue'
|
|
14
10
|
import BlockStreamfield from './../../../components/BlockStreamfield/BlockStreamfield.vue'
|
|
15
|
-
import BlockIframeEmbed from '../../../components/BlockIframeEmbed/BlockIframeEmbed.vue'
|
|
16
11
|
import BlockRelatedLinks from '../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
17
12
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
13
|
+
import HeroInlineMedia from './../../../components/HeroInlineMedia/HeroInlineMedia.vue'
|
|
14
|
+
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
18
15
|
|
|
19
16
|
interface PageEduTeachableMomentProps {
|
|
20
17
|
data?: PageEduResourcesObject
|
|
@@ -112,43 +109,14 @@ const computedClass = computed((): string => {
|
|
|
112
109
|
/>
|
|
113
110
|
</LayoutHelper>
|
|
114
111
|
|
|
115
|
-
<!-- TODO: put this in a component (exclude layout though) -->
|
|
116
112
|
<LayoutHelper
|
|
117
113
|
v-if="!heroEmpty && heroInline && data.hero?.length"
|
|
118
114
|
class="lg:mb-22 mb-10"
|
|
119
115
|
>
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
:data="data.hero[0].imageInline"
|
|
123
|
-
:display-caption="data.hero[0].displayCaption"
|
|
124
|
-
:caption="data.hero[0].caption"
|
|
116
|
+
<HeroInlineMedia
|
|
117
|
+
:hero-blocks="data.hero"
|
|
125
118
|
:constrain="data.heroConstrain"
|
|
126
119
|
/>
|
|
127
|
-
<BlockImageCarousel
|
|
128
|
-
v-else-if="data.hero[0].blockType === 'CarouselBlock'"
|
|
129
|
-
:items="data.hero[0].blocks"
|
|
130
|
-
:block-id="data.hero[0].id"
|
|
131
|
-
/>
|
|
132
|
-
<BlockIframeEmbed
|
|
133
|
-
v-else-if="data.hero[0].blockType === 'IframeEmbedBlock'"
|
|
134
|
-
:data="data.hero[0]"
|
|
135
|
-
/>
|
|
136
|
-
<BlockVideo
|
|
137
|
-
v-else-if="data.hero[0].blockType === 'VideoBlock'"
|
|
138
|
-
:data="data.hero[0]"
|
|
139
|
-
autoplay
|
|
140
|
-
/>
|
|
141
|
-
<BaseImagePlaceholder
|
|
142
|
-
v-else-if="data.hero[0].blockType === 'VideoEmbedBlock'"
|
|
143
|
-
aspect-ratio="16:9"
|
|
144
|
-
dark-mode
|
|
145
|
-
>
|
|
146
|
-
<div v-html="data.hero[0].embed?.embed"></div>
|
|
147
|
-
</BaseImagePlaceholder>
|
|
148
|
-
<BlockImageComparison
|
|
149
|
-
v-else-if="data.hero[0].blockType === 'ImageComparisonBlock'"
|
|
150
|
-
:data="data.hero[0]"
|
|
151
|
-
/>
|
|
152
120
|
</LayoutHelper>
|
|
153
121
|
|
|
154
122
|
<!-- summary and topper -->
|
|
@@ -162,11 +130,6 @@ const computedClass = computed((): string => {
|
|
|
162
130
|
:text="data.topper"
|
|
163
131
|
/>
|
|
164
132
|
</LayoutHelper>
|
|
165
|
-
<!-- streamfield blocks -->
|
|
166
|
-
<BlockStreamfield
|
|
167
|
-
itemprop="articleBody"
|
|
168
|
-
:data="data.body"
|
|
169
|
-
/>
|
|
170
133
|
|
|
171
134
|
<!-- streamfield blocks -->
|
|
172
135
|
<BlockStreamfield :data="data.body" />
|
|
@@ -180,14 +143,12 @@ const computedClass = computed((): string => {
|
|
|
180
143
|
<BlockRelatedLinks :data="data.relatedLinks[0]" />
|
|
181
144
|
</LayoutHelper>
|
|
182
145
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
:items="data.relatedContent"
|
|
190
|
-
/>
|
|
146
|
+
<LayoutHelper
|
|
147
|
+
v-if="data.authors?.length"
|
|
148
|
+
indent="col-3"
|
|
149
|
+
>
|
|
150
|
+
<AboutTheAuthor :authors="data.authors" />
|
|
151
|
+
</LayoutHelper>
|
|
191
152
|
|
|
192
153
|
<LayoutHelper
|
|
193
154
|
v-if="data.lastPublishedAt"
|