@explorer-1/vue 0.2.27 → 0.2.29
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 +3 -3
- package/dist/explorer-1-vue.umd.cjs +1 -1
- 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/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/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 +7 -1
- package/dist/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.d.ts +7 -7
- package/dist/src/templates/edu/PageEduLesson/PageEduLesson.stories.d.ts +2 -0
- package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +30 -0
- package/dist/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.d.ts +2 -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/BaseAccordionItem/BaseAccordionItem.vue +1 -1
- package/src/components/BlockCardGrid/BlockCardGrid.vue +1 -1
- package/src/components/BlockLinkCard/BlockLinkCard.vue +1 -1
- package/src/components/BlockStreamfield/BlockStreamfield.vue +5 -3
- package/src/components/BlockText/BlockText.vue +3 -3
- package/src/components/CalendarButton/CalendarButton.vue +5 -4
- package/src/components/DetailHeadline/DetailHeadline.vue +2 -3
- package/src/components/MetaPanel/MetaPanel.stories.js +1 -1
- package/src/components/MetaPanel/MetaPanel.vue +3 -3
- package/src/components/MetaPanelItems/MetaPanelItems.vue +6 -9
- package/src/components/MetadataEduResource/MetadataEduResource.vue +1 -1
- package/src/components/MetadataEvent/MetadataEvent.stories.js +6 -4
- package/src/interfaces.ts +6 -1
- package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue +1 -1
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.js +3 -1
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +24 -1
- package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +2 -0
- package/src/templates/edu/PageEduLesson/PageEduLesson.vue +9 -2
- package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.js +3 -8
- package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.vue +11 -2
- package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.js +3 -0
- package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.vue +9 -9
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +1 -1
- package/src/utils/dayjs.js +2 -0
- package/src/utils/rangeifyGrades.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorer-1/vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vue-bind-once": "^0.2.1",
|
|
31
31
|
"vue-observe-visibility": "^1.0.0",
|
|
32
32
|
"vue3-compare-image": "^1.2.5",
|
|
33
|
-
"@explorer-1/common": "1.1.
|
|
33
|
+
"@explorer-1/common": "1.1.9"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import AboutTheAuthor from './AboutTheAuthor.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Utilities/AboutTheAuthor',
|
|
5
|
+
component: AboutTheAuthor,
|
|
6
|
+
tags: ['!autodocs'],
|
|
7
|
+
excludeStories: /.*Data$/
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const AboutTheAuthorData = [
|
|
11
|
+
{
|
|
12
|
+
author: {
|
|
13
|
+
biography:
|
|
14
|
+
'<p data-block-key="8meb7">I'm someone that has a bio! Test <a href="http://localhost:3000/edu/news">link</a>.</p>',
|
|
15
|
+
image: {
|
|
16
|
+
src: {
|
|
17
|
+
url: 'https://picsum.photos/512/512',
|
|
18
|
+
width: 512,
|
|
19
|
+
height: 512
|
|
20
|
+
},
|
|
21
|
+
alt: ''
|
|
22
|
+
},
|
|
23
|
+
jobTitle: 'Job title',
|
|
24
|
+
name: 'Author name',
|
|
25
|
+
organization: 'Organization'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
author: {
|
|
30
|
+
biography:
|
|
31
|
+
'<p data-block-key="8meb7">I'm someone that has a bio! Test <a href="http://localhost:3000/edu/news">link</a>. Lorem ipsum dolor sit amet long author bio here.</p><p>Lorem ipsum dolor site amet consectatur.</p>',
|
|
32
|
+
image: {
|
|
33
|
+
src: {
|
|
34
|
+
url: 'https://picsum.photos/512/512',
|
|
35
|
+
width: 512,
|
|
36
|
+
height: 512
|
|
37
|
+
},
|
|
38
|
+
alt: ''
|
|
39
|
+
},
|
|
40
|
+
jobTitle: 'Job title',
|
|
41
|
+
name: 'Another author',
|
|
42
|
+
organization: 'Organization'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
// stories
|
|
47
|
+
export const BaseStory = {
|
|
48
|
+
name: 'AboutTheAuthor',
|
|
49
|
+
args: { authors: AboutTheAuthorData }
|
|
50
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, reactive } from 'vue'
|
|
3
|
+
import type { AuthorObject } from '../../interfaces'
|
|
4
|
+
import BlockText from './../BlockText/BlockText.vue'
|
|
5
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
6
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
7
|
+
|
|
8
|
+
interface AboutTheAuthorProps {
|
|
9
|
+
authors: {
|
|
10
|
+
author?: AuthorObject
|
|
11
|
+
}[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// define props
|
|
15
|
+
const props = withDefaults(defineProps<AboutTheAuthorProps>(), {
|
|
16
|
+
authors: undefined
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const { authors } = reactive(props)
|
|
20
|
+
|
|
21
|
+
const headingString = computed(() => {
|
|
22
|
+
let noun = 'Author'
|
|
23
|
+
if (authors?.length > 1) {
|
|
24
|
+
noun = 'Authors'
|
|
25
|
+
}
|
|
26
|
+
return `About the ${noun}`
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
29
|
+
<template>
|
|
30
|
+
<div class="AboutTheAuthor">
|
|
31
|
+
<h3 class="text-h4 sm:ml-[130px] sm:pl-10 mb-6">
|
|
32
|
+
{{ headingString }}
|
|
33
|
+
</h3>
|
|
34
|
+
<template
|
|
35
|
+
v-for="(author, index) in authors"
|
|
36
|
+
:key="index"
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
v-if="author.author"
|
|
40
|
+
class="sm:flex flex-row"
|
|
41
|
+
:class="{ ' mb-10 sm:mb-12': index + 1 !== authors.length }"
|
|
42
|
+
>
|
|
43
|
+
<div class="sm:mr-10">
|
|
44
|
+
<BaseImagePlaceholder
|
|
45
|
+
aspect-ratio="1:1"
|
|
46
|
+
class="relative mb-6 sm:mb-0 overflow-hidden rounded-full w-[130px]"
|
|
47
|
+
transparent-mode
|
|
48
|
+
no-logo
|
|
49
|
+
>
|
|
50
|
+
<BaseImage
|
|
51
|
+
v-if="author.author.image?.src"
|
|
52
|
+
:src="author.author.image.src.url"
|
|
53
|
+
:width="author.author.image.src.width"
|
|
54
|
+
:height="author.author.image.src.height"
|
|
55
|
+
:alt="author.author.name"
|
|
56
|
+
object-fit-class="cover"
|
|
57
|
+
image-class="can-hover:group-hover:delay-200 can-hover:group-hover:scale-100 absolute top-0 left-0 w-full transition-all duration-200 ease-in transform scale-105"
|
|
58
|
+
loading="lazy"
|
|
59
|
+
/>
|
|
60
|
+
</BaseImagePlaceholder>
|
|
61
|
+
</div>
|
|
62
|
+
<div>
|
|
63
|
+
<div class="mb-4">
|
|
64
|
+
<h3
|
|
65
|
+
v-if="author.author.name"
|
|
66
|
+
class="!font-medium !tracking-normal !text-lg mb-1"
|
|
67
|
+
>
|
|
68
|
+
{{ author.author.name }}
|
|
69
|
+
</h3>
|
|
70
|
+
<p
|
|
71
|
+
v-if="author.author.jobTitle || author.author.organization"
|
|
72
|
+
class="text-lg"
|
|
73
|
+
>
|
|
74
|
+
{{
|
|
75
|
+
(author.author.jobTitle ? author.author.jobTitle : '') +
|
|
76
|
+
(author.author.jobTitle && author.author.organization ? ', ' : '')
|
|
77
|
+
}}
|
|
78
|
+
{{ author.author.organization }}
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
<BlockText
|
|
82
|
+
v-if="author.author.biography"
|
|
83
|
+
:text="author.author.biography"
|
|
84
|
+
variant="small"
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
@@ -271,7 +271,7 @@ export default defineComponent({
|
|
|
271
271
|
} else if (this.medium) {
|
|
272
272
|
classes = 'can-hover:group-hover:-translate-y-3 edu:can-hover:group-hover:-translate-y-2'
|
|
273
273
|
} else if (this.large) {
|
|
274
|
-
classes = 'sm:pl-8 sm:w-2/3'
|
|
274
|
+
classes = 'sm:pl-8 sm:w-2/3 lg:pt-2'
|
|
275
275
|
}
|
|
276
276
|
return classes
|
|
277
277
|
},
|
|
@@ -202,9 +202,11 @@
|
|
|
202
202
|
<div
|
|
203
203
|
v-else-if="block.blockType == 'ListBlock' && block.field === 'card_grid'"
|
|
204
204
|
:key="`cardGridBlock${index}`"
|
|
205
|
-
class="lg:mb-18 mb-10"
|
|
205
|
+
class="LayoutHelper md:BaseGrid md:container md:mx-auto lg:mb-18 mb-10"
|
|
206
206
|
>
|
|
207
|
-
<
|
|
207
|
+
<div class="lg:col-start-2 lg:col-end-12 md:col-span-full md:px-4 px-0 relative">
|
|
208
|
+
<BlockCardGrid :cards="block.items" />
|
|
209
|
+
</div>
|
|
208
210
|
</div>
|
|
209
211
|
|
|
210
212
|
<div
|
|
@@ -218,7 +220,7 @@
|
|
|
218
220
|
<LayoutHelper
|
|
219
221
|
v-else-if="block.blockType === 'LinkCardListBlock' && block.blocks?.length"
|
|
220
222
|
:key="`linkCardListBlock${index}`"
|
|
221
|
-
indent="col-
|
|
223
|
+
indent="col-2"
|
|
222
224
|
class="lg:mb-18 mb-10"
|
|
223
225
|
>
|
|
224
226
|
<BlockLinkCardList :items="block.blocks" />
|
|
@@ -13,9 +13,9 @@ interface Variants {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const variants: Variants = {
|
|
16
|
-
small: 'text-body-sm',
|
|
17
|
-
medium: 'text-body-md',
|
|
18
|
-
large: 'text-body-lg'
|
|
16
|
+
small: 'text-body-sm -small',
|
|
17
|
+
medium: 'text-body-md -medium',
|
|
18
|
+
large: 'text-body-lg -large'
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export default defineComponent({
|
|
@@ -80,11 +80,10 @@ export default defineComponent({
|
|
|
80
80
|
init() {
|
|
81
81
|
let recurrence = undefined
|
|
82
82
|
if ((this.isAllDay && this.endDatetime) || (this.startDate && this.endDatetime)) {
|
|
83
|
-
console.log('initing')
|
|
84
83
|
// Calculate how many full days
|
|
85
84
|
const startDateDayjs = this.startDatetime
|
|
86
85
|
? dayjs(this.startDatetime)
|
|
87
|
-
: dayjs(this.startDate)
|
|
86
|
+
: dayjs(this.startDate).tz('America/Los_Angeles')
|
|
88
87
|
const endDateDayjs = dayjs(this.endDatetime)
|
|
89
88
|
const difference = endDateDayjs.diff(startDateDayjs, 'day') + 1
|
|
90
89
|
recurrence = { frequency: 'DAILY', interval: 1, count: difference }
|
|
@@ -95,9 +94,11 @@ export default defineComponent({
|
|
|
95
94
|
location: this.location ? this.location : undefined,
|
|
96
95
|
description: this.icsDescription,
|
|
97
96
|
start: this.startDatetime
|
|
98
|
-
?
|
|
97
|
+
? // @ts-ignore
|
|
98
|
+
new Date(dayjs(this.startDatetime))
|
|
99
99
|
: this.startDate
|
|
100
|
-
?
|
|
100
|
+
? // @ts-ignore
|
|
101
|
+
new Date(dayjs(this.startDate).tz('America/Los_Angeles'))
|
|
101
102
|
: new Date(),
|
|
102
103
|
end: !this.isAllDay && this.endDatetime ? new Date(this.endDatetime) : undefined,
|
|
103
104
|
recurrence
|
|
@@ -140,7 +140,7 @@ export default defineComponent({
|
|
|
140
140
|
default: undefined
|
|
141
141
|
},
|
|
142
142
|
author: {
|
|
143
|
-
type: Object as PropType<AuthorObject | AuthorObject[]>,
|
|
143
|
+
type: Object as PropType<AuthorObject | { author: AuthorObject }[]>,
|
|
144
144
|
required: false,
|
|
145
145
|
default: undefined
|
|
146
146
|
},
|
|
@@ -208,11 +208,10 @@ export default defineComponent({
|
|
|
208
208
|
const returnDate = new Date(this.publicationDate + ' ' + currentTime)
|
|
209
209
|
return returnDate.toISOString()
|
|
210
210
|
},
|
|
211
|
-
authors():
|
|
211
|
+
authors(): AuthorObject[] | undefined {
|
|
212
212
|
let authors: AuthorObject[] | undefined = undefined
|
|
213
213
|
if (this.author && this.author.constructor === Array) {
|
|
214
214
|
authors = []
|
|
215
|
-
// @ts-expect-error we know it's an array at this point
|
|
216
215
|
this.author.forEach((author: { author: AuthorObject }) => {
|
|
217
216
|
// @ts-expect-error authors array is defined above
|
|
218
217
|
authors.push(author.author)
|
|
@@ -30,7 +30,7 @@ export const BaseStory = {
|
|
|
30
30
|
button: 'View Standards',
|
|
31
31
|
primarySubject: { subject: 'Math' },
|
|
32
32
|
additionalSubjects: [{ subject: 'Science' }],
|
|
33
|
-
time: '30mins - hr',
|
|
33
|
+
time: { time: '30mins - hr' },
|
|
34
34
|
gradeLevels: [
|
|
35
35
|
{ gradeLevel: 'All Ages' },
|
|
36
36
|
{ gradeLevel: 'K' },
|
|
@@ -102,7 +102,7 @@ const standardsEla = computed(() => {
|
|
|
102
102
|
return sortedStandards.value ? sortedStandards.value['ccss_english_language_arts'] : undefined
|
|
103
103
|
})
|
|
104
104
|
const standardsMath = computed(() => {
|
|
105
|
-
return sortedStandards.value ? sortedStandards.value['
|
|
105
|
+
return sortedStandards.value ? sortedStandards.value['ccss_maths'] : undefined
|
|
106
106
|
})
|
|
107
107
|
const standardsNgss = computed(() => {
|
|
108
108
|
return sortedStandards.value ? sortedStandards.value['ngss'] : undefined
|
|
@@ -128,7 +128,7 @@ const standardsIste = computed(() => {
|
|
|
128
128
|
>
|
|
129
129
|
<div class="col-start-container lg:col-start-indent-col-2 col-end-container">
|
|
130
130
|
<div class="MetaPanel-heading lg:grid grid-cols-12 col-end-container container">
|
|
131
|
-
<div class="col-start-1 col-end-10 xl:col-end-9 pl-4 lg:pl-10 pr-
|
|
131
|
+
<div class="col-start-1 col-end-10 xl:col-end-9 pl-4 lg:pl-10 pr-6 py-6 lg:py-10">
|
|
132
132
|
<MetaPanelItems
|
|
133
133
|
:theme="theme"
|
|
134
134
|
:primary-subject="primarySubject"
|
|
@@ -139,7 +139,7 @@ const standardsIste = computed(() => {
|
|
|
139
139
|
</div>
|
|
140
140
|
<div
|
|
141
141
|
v-if="button"
|
|
142
|
-
class="ThemeVariantLight col-start-10 col-end-13 pl-4 pt-4 pb-6 lg:py-10 lg:text-right"
|
|
142
|
+
class="ThemeVariantLight col-start-10 col-end-13 pl-4 lg:pl-0 pt-4 pb-6 lg:pr-4 xl:pr-10 2xl:pr-0 lg:py-10 lg:text-right"
|
|
143
143
|
>
|
|
144
144
|
<BaseButton
|
|
145
145
|
variant="secondary"
|
|
@@ -31,7 +31,7 @@ const props = withDefaults(defineProps<MetaPanelProps>(), {
|
|
|
31
31
|
const { theme, primarySubject, additionalSubjects, gradeLevels, time } = reactive(props)
|
|
32
32
|
|
|
33
33
|
const audience = computed(() => {
|
|
34
|
-
return gradeLevels ? rangeifyGrades(gradeLevels) : undefined
|
|
34
|
+
return gradeLevels ? rangeifyGrades(gradeLevels, false) : undefined
|
|
35
35
|
})
|
|
36
36
|
|
|
37
37
|
const subjects = computed(() => {
|
|
@@ -85,11 +85,11 @@ const themeVariant = computed(() => {
|
|
|
85
85
|
|
|
86
86
|
<template>
|
|
87
87
|
<div
|
|
88
|
-
class="MetaPanelItems md:flex gap-10"
|
|
89
|
-
:class="{ 'justify-between': subjects && audience && time }"
|
|
88
|
+
class="MetaPanelItems md:flex gap-10 pr-5 sm:pr-10 lg:pr-20"
|
|
89
|
+
:class="{ 'justify-between': subjects && audience && time?.time }"
|
|
90
90
|
>
|
|
91
91
|
<div
|
|
92
|
-
v-if="
|
|
92
|
+
v-if="primarySubject?.subject"
|
|
93
93
|
class="MetaPanelItem"
|
|
94
94
|
>
|
|
95
95
|
<div
|
|
@@ -103,14 +103,13 @@ const themeVariant = computed(() => {
|
|
|
103
103
|
class="MetaPanelItem-heading"
|
|
104
104
|
:class="`${themeVariant} ${headingColor}`"
|
|
105
105
|
>
|
|
106
|
-
|
|
107
|
-
<span class="sr-only">.</span>
|
|
106
|
+
Subject
|
|
108
107
|
</div>
|
|
109
108
|
<div
|
|
110
109
|
class="MetaPanelItem-content"
|
|
111
110
|
:class="textColor"
|
|
112
111
|
>
|
|
113
|
-
{{
|
|
112
|
+
{{ primarySubject.subject }}
|
|
114
113
|
</div>
|
|
115
114
|
</div>
|
|
116
115
|
</div>
|
|
@@ -130,7 +129,6 @@ const themeVariant = computed(() => {
|
|
|
130
129
|
:class="`${themeVariant} ${headingColor}`"
|
|
131
130
|
>
|
|
132
131
|
Grade Levels
|
|
133
|
-
<span class="sr-only">.</span>
|
|
134
132
|
</div>
|
|
135
133
|
<div
|
|
136
134
|
class="MetaPanelItem-content"
|
|
@@ -156,7 +154,6 @@ const themeVariant = computed(() => {
|
|
|
156
154
|
:class="`${themeVariant} ${headingColor}`"
|
|
157
155
|
>
|
|
158
156
|
Time Required
|
|
159
|
-
<span class="sr-only">.</span>
|
|
160
157
|
</div>
|
|
161
158
|
<div
|
|
162
159
|
class="MetaPanelItem-content"
|
|
@@ -12,12 +12,14 @@ export const MetadataEventData = {
|
|
|
12
12
|
event: {
|
|
13
13
|
title: 'Event title',
|
|
14
14
|
location: 'Location',
|
|
15
|
-
startDate: '
|
|
16
|
-
startDatetime: '
|
|
17
|
-
|
|
15
|
+
startDate: '2024-08-08',
|
|
16
|
+
startDatetime: '2024-08-08T14:00:00-07:00',
|
|
17
|
+
startTime: '15:00:00',
|
|
18
|
+
endDate: '2024-08-08',
|
|
19
|
+
endDatetime: '2024-08-08T22:00:00-07:00',
|
|
20
|
+
endTime: '22:00:00',
|
|
18
21
|
ongoing: false,
|
|
19
22
|
isVirtualEvent: false,
|
|
20
|
-
endDatetime: '2021-11-11T23:59:59.999999-08:00',
|
|
21
23
|
locationName: 'Webcast',
|
|
22
24
|
locationLink: 'https://www.nasa.gov',
|
|
23
25
|
customDate: undefined
|
package/src/interfaces.ts
CHANGED
|
@@ -183,7 +183,10 @@ export interface Attributes {
|
|
|
183
183
|
|
|
184
184
|
export interface AuthorObject {
|
|
185
185
|
name: string
|
|
186
|
-
organization
|
|
186
|
+
organization?: string
|
|
187
|
+
image?: ImageObject
|
|
188
|
+
jobTitle?: string
|
|
189
|
+
biography?: string
|
|
187
190
|
}
|
|
188
191
|
|
|
189
192
|
export interface Topic {
|
|
@@ -220,6 +223,7 @@ export interface PageObject {
|
|
|
220
223
|
slug: string
|
|
221
224
|
url: string
|
|
222
225
|
title: string
|
|
226
|
+
readTime?: string
|
|
223
227
|
getTopicsForDisplay?: Topic[]
|
|
224
228
|
showJumpMenu?: boolean
|
|
225
229
|
label?: string
|
|
@@ -262,6 +266,7 @@ export interface EduResourceStandardItem {
|
|
|
262
266
|
|
|
263
267
|
export interface PageEduResourcesObject extends PageObject {
|
|
264
268
|
hero?: StreamfieldBlockData[]
|
|
269
|
+
authors?: { author: AuthorObject }[]
|
|
265
270
|
primarySubject?: EduResourcesSubject
|
|
266
271
|
additionalSubjects?: EduResourcesSubject[]
|
|
267
272
|
gradeLevels?: EduResourcesGradeLevel[]
|
|
@@ -63,10 +63,10 @@ const computedClass = computed((): string => {
|
|
|
63
63
|
/>
|
|
64
64
|
|
|
65
65
|
<NavJumpMenu
|
|
66
|
+
v-if="data.showJumpMenu"
|
|
66
67
|
ref="PageEduCollectionsDetailJumpMenu"
|
|
67
68
|
:title="data.title"
|
|
68
69
|
:blocks="data.body"
|
|
69
|
-
:enabled="data.showJumpMenu"
|
|
70
70
|
dropdown-text="In this collection"
|
|
71
71
|
/>
|
|
72
72
|
|
|
@@ -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: [
|
|
@@ -10,10 +10,12 @@ import BlockStreamfield from './../../../components/BlockStreamfield/BlockStream
|
|
|
10
10
|
import BlockRelatedLinks from '../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
11
11
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
12
12
|
import HeroInlineMedia from './../../../components/HeroInlineMedia/HeroInlineMedia.vue'
|
|
13
|
+
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
13
14
|
|
|
14
15
|
export default defineComponent({
|
|
15
16
|
name: 'PageEduExplainerArticle',
|
|
16
17
|
components: {
|
|
18
|
+
AboutTheAuthor,
|
|
17
19
|
HeroMedia,
|
|
18
20
|
HeroInlineMedia,
|
|
19
21
|
LayoutHelper,
|
|
@@ -118,9 +120,9 @@ export default defineComponent({
|
|
|
118
120
|
</LayoutHelper>
|
|
119
121
|
|
|
120
122
|
<NavJumpMenu
|
|
123
|
+
v-if="data.showJumpMenu"
|
|
121
124
|
:title="data.title"
|
|
122
125
|
:blocks="data.body"
|
|
123
|
-
:enabled="data.showJumpMenu"
|
|
124
126
|
dropdown-text="In this article"
|
|
125
127
|
/>
|
|
126
128
|
<!-- inline hero content -->
|
|
@@ -170,5 +172,26 @@ export default defineComponent({
|
|
|
170
172
|
:heading="data.relatedContentHeading"
|
|
171
173
|
:items="data.relatedContent"
|
|
172
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>
|
|
173
196
|
</div>
|
|
174
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,
|
|
@@ -19,6 +19,7 @@ import MetaPanel from '../../../components/MetaPanel/MetaPanel.vue'
|
|
|
19
19
|
import PageEduLessonSection, { type PageEduLessonSectionProps } from './PageEduLessonSection.vue'
|
|
20
20
|
import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue'
|
|
21
21
|
import HeroInlineMedia from './../../../components/HeroInlineMedia/HeroInlineMedia.vue'
|
|
22
|
+
import AboutTheAuthor from './../../../components/AboutTheAuthor/AboutTheAuthor.vue'
|
|
22
23
|
|
|
23
24
|
import { HeadingLevel } from '../../../components/BaseHeading/BaseHeading.vue'
|
|
24
25
|
|
|
@@ -325,7 +326,6 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
|
|
|
325
326
|
ref="PageEduLessonJumpMenu"
|
|
326
327
|
:title="data.title"
|
|
327
328
|
:blocks="consolidatedBlocks"
|
|
328
|
-
:enabled="true"
|
|
329
329
|
dropdown-text="In this lesson"
|
|
330
330
|
/>
|
|
331
331
|
|
|
@@ -364,10 +364,17 @@ const consolidatedSections = computed((): EduLessonSectionObject[] => {
|
|
|
364
364
|
<BlockLinkCarousel
|
|
365
365
|
item-type="cards"
|
|
366
366
|
class="lg:my-24 my-12 print:px-4"
|
|
367
|
-
:heading="data.relatedContentHeading"
|
|
367
|
+
:heading="data.relatedContentHeading || 'Related Lessons & Projects'"
|
|
368
368
|
:items="data.relatedContent"
|
|
369
369
|
/>
|
|
370
370
|
|
|
371
|
+
<LayoutHelper
|
|
372
|
+
v-if="data.authors?.length"
|
|
373
|
+
indent="col-3"
|
|
374
|
+
>
|
|
375
|
+
<AboutTheAuthor :authors="data.authors" />
|
|
376
|
+
</LayoutHelper>
|
|
377
|
+
|
|
371
378
|
<LayoutHelper
|
|
372
379
|
v-if="data.lastPublishedAt"
|
|
373
380
|
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
|
|
|
@@ -68,10 +69,10 @@ defineExpose({
|
|
|
68
69
|
itemtype="http://schema.org/Article"
|
|
69
70
|
>
|
|
70
71
|
<NavJumpMenu
|
|
72
|
+
v-if="data.showJumpMenu"
|
|
71
73
|
ref="PageEduNewsDetailJumpMenu"
|
|
72
74
|
:title="data.title"
|
|
73
75
|
:blocks="data.body"
|
|
74
|
-
:enabled="data.showJumpMenu"
|
|
75
76
|
dropdown-text="In this news article"
|
|
76
77
|
/>
|
|
77
78
|
|
|
@@ -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',
|
|
@@ -41,12 +42,14 @@ export const BaseStory = {
|
|
|
41
42
|
url: 'http://localhost:3000/edu/resources/teachable-moment',
|
|
42
43
|
pageType: 'EDUTeachableMomentPage',
|
|
43
44
|
contentType: 'edu_resources.EDUTeachableMomentPage',
|
|
45
|
+
readTime: '5 min read',
|
|
44
46
|
showJumpMenu: true,
|
|
45
47
|
thumbnailImage: {
|
|
46
48
|
__typename: 'CustomImage',
|
|
47
49
|
original: 'http://127.0.0.1:9000/media/original_images/imagessirtfsirtf-090303-16.jpg',
|
|
48
50
|
alt: ''
|
|
49
51
|
},
|
|
52
|
+
authors: AboutTheAuthorData,
|
|
50
53
|
hero: [
|
|
51
54
|
{
|
|
52
55
|
...HeroMediaData,
|