Skip to content

Commit

Permalink
final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stephiescastle committed Jul 23, 2024
1 parent 04a7a76 commit 61d48d7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HeroMediaData } from './../../../components/HeroMedia/HeroMedia.stories'
import { DetailHeadlineData } from './../../../components/DetailHeadline/DetailHeadline.stories'
import { BlockIframeEmbedData } from './../../../components/BlockIframeEmbed/BlockIframeEmbed.stories.js'
import { BlockImageCarouselData } from './../../../components/BlockImageCarousel/BlockImageCarousel.stories'
import { BlockImageComparisonData } from './../../../components/BlockImageComparison/BlockImageComparison.stories'
Expand Down Expand Up @@ -27,18 +26,18 @@ export default {
excludeStories: /.*Data$/
}

export const ArticleDetail = {
export const BaseStory = {
args: {
data: {
slug: 'nasas-ingenuity-mars-helicopter-recharges-its-batteries-in-flight',
url: '/news/nasas-ingenuity-mars-helicopter-recharges-its-batteries-in-flight',
...DetailHeadlineData,
displayLabel: 'Resource',
summary:
'Headed to the Red Planet with the Perseverance rover, the pioneering helicopter is powered up for the first time in interplanetary space as part of a systems check.',
thumbnailImage: {
original: 'https://picsum.photos/400/200'
},
__typename: 'EDUResourceArticlePage',
pageType: 'EDUResourceArticlePage',
contentType: 'edu_resources.EDUResourceArticlePage',
seoTitle: 'Test Resource',
searchDescription: '',
slug: 'test-resource',
url: 'http://localhost:3000/edu/resources/test-resource',
title: 'Test Resource',
heroConstrain: true,
heroPosition: 'full_bleed',
hero: [
{
Expand All @@ -47,46 +46,66 @@ export const ArticleDetail = {
}
],
...BlockStreamfieldTruncatedData,
relatedLinks: [BlockRelatedLinksData.data],
relatedContentHeading: 'Related Activities',
relatedContent: [
// external link card, no image
publicationDate: '2024-07-09',
summary: 'Summary of resource article',
getTopicsForDisplay: [
{
label: 'Explore NASA',
thumbnailImage: {
src: {
url: 'https://picsum.photos/550/288',
width: 550,
height: 288
}
},
title: 'NASA website',
externalLink: 'https://www.nasa.gov'
__typename: 'TopicPage',
title: 'Asteroids',
url: 'http://localhost:3000/topics/asteroids'
}
],
topicLabel: 'Asteroids',
primarySubject: {
__typename: 'EDUPrimarySubject',
id: '2',
subject: 'Engineering'
},
additionalSubjects: [
{
__typename: 'EDUPrimarySubject',
id: '1',
subject: 'Art'
}
],
gradeLevels: [
{
__typename: 'EDUGradeLevel',
id: '2',
gradeLevel: 'K'
},
// via page chooser
{
page: {
label: 'Mission',
thumbnailImage: {
src: {
url: 'https://picsum.photos/512/288',
width: 512,
height: 288
}
},
title: 'GRACE-FO',
url: '/mission/placeholder'
}
__typename: 'EDUGradeLevel',
id: '3',
gradeLevel: '1'
},
...BlockLinkCardCarouselData
]
{
__typename: 'EDUGradeLevel',
id: '4',
gradeLevel: '2'
},
{
__typename: 'EDUGradeLevel',
id: '13',
gradeLevel: '11'
}
],
body: BlockStreamfieldTruncatedData.body,
thumbnailImage: {
__typename: 'CustomImage',
original: 'http://127.0.0.1:9000/media/original_images/imagessirtfsirtf-090303-16.jpg',
alt: ''
},
relatedLinks: BlockRelatedLinksData.data,
relatedContentHeading: 'Related Content',
relatedContent: BlockLinkCardCarouselData
}
}
}
export const InlineHero = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
heroPosition: 'inline'
}
}
Expand All @@ -95,7 +114,7 @@ export const InlineHero = {
export const HeroCarousel = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
hero: [{ blockType: 'CarouselBlock', blocks: BlockImageCarouselData }]
}
}
Expand All @@ -104,7 +123,7 @@ export const HeroCarousel = {
export const HeroImageComparison = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
heroPosition: 'inline',
hero: [
{
Expand All @@ -118,7 +137,7 @@ export const HeroImageComparison = {
export const HeroVideo = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
hero: [
{
blockType: 'VideoBlock',
Expand All @@ -134,7 +153,7 @@ export const HeroVideo = {
export const HeroVideoEmbed = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
heroPosition: 'inline',
hero: [
{
Expand All @@ -152,7 +171,7 @@ export const HeroVideoEmbed = {
export const HeroIframeEmbed = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
heroPosition: 'inline',
hero: [
{
Expand All @@ -166,7 +185,7 @@ export const HeroIframeEmbed = {
export const NoHero = {
args: {
data: {
...ArticleDetail.args.data,
...BaseStory.args.data,
hero: []
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
import BaseImagePlaceholder from './../../../components/BaseImagePlaceholder/BaseImagePlaceholder.vue'
import BlockImageCarousel from './../../../components/BlockImageCarousel/BlockImageCarousel.vue'
import BlockImageComparison from './../../../components/BlockImageComparison/BlockImageComparison.vue'
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
Expand All @@ -16,6 +17,7 @@ export default defineComponent({
name: 'PageEduResourceArticle',
components: {
HeroMedia,
BaseImagePlaceholder,
LayoutHelper,
DetailHeadline,
BlockImageStandard,
Expand Down

0 comments on commit 61d48d7

Please sign in to comment.