@explorer-1/vue 0.1.3 → 0.1.5
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 +8960 -10011
- package/dist/explorer-1-vue.umd.cjs +13 -16
- package/dist/src/components/BaseHeading/BaseHeading.stories.d.ts +6 -11
- package/dist/src/components/BaseHeading/BaseHeading.vue.d.ts +6 -10
- package/dist/src/components/BasePlaceholder/BasePlaceholder.stories.d.ts +0 -1
- package/dist/src/components/BlockDialog/BlockDialog.stories.d.ts +81 -0
- package/dist/src/components/BlockImage/BlockImage.stories.d.ts +0 -1
- package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.d.ts +6 -0
- package/dist/src/components/BlockLinkCarousel/BlockLinkCarousel.vue.d.ts +6 -0
- package/dist/src/components/BlockQuote/BlockQuote.stories.d.ts +0 -1
- package/dist/src/components/BlockStreamfield/BlockStreamfield.stories.d.ts +58 -8
- package/dist/src/components/BlockVideoEmbed/BlockVideoEmbed.vue.d.ts +7 -3
- package/dist/src/components/HeroListingIndex/HeroListingIndex.stories.d.ts +1 -0
- package/dist/src/components/HeroMedium/HeroMedium.stories.d.ts +1 -0
- package/dist/src/components/HeroMedium/HeroSmall.stories.d.ts +1 -0
- package/dist/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.d.ts +1 -6
- package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.d.ts +31 -47
- package/dist/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue.d.ts +5 -1
- package/dist/src/components/HomepageStats/HomepageStats.stories.d.ts +19 -9
- package/dist/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.d.ts +6 -50
- package/dist/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue.d.ts +7 -1
- package/dist/src/components/MissionDetailAbout/MissionDetailAbout.stories.d.ts +1 -6
- package/dist/src/components/MissionDetailHero/MissionDetailHero.stories.d.ts +11 -11
- package/dist/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.d.ts +6 -6
- package/dist/src/components/NavDesktop/NavDesktop.stories.d.ts +3 -6
- package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +289 -0
- package/dist/src/components/NavLogoLinks/NavLogoLinks.stories.d.ts +0 -5
- package/dist/src/components/NavMobile/NavMobile.stories.d.ts +42 -9
- package/dist/src/components/NavMobile/NavMobile.vue.d.ts +13 -2
- package/dist/src/components/NavMobile/NavMobileEdu.stories.d.ts +392 -0
- package/dist/src/components/NavSocial/NavSocial.stories.d.ts +42 -1
- package/dist/src/components/NavSocial/NavSocial.vue.d.ts +42 -1
- package/dist/src/components/TheFooter/TheFooter.vue.d.ts +9 -1
- package/dist/src/components/TimelineDialog/TimelineDialog.stories.d.ts +75 -0
- package/dist/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.d.ts +1 -7
- package/dist/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.d.ts +1 -6
- package/dist/src/docs/foundation/typography.stories.d.ts +6 -10
- package/dist/src/store/curatedGallery.d.ts +6 -0
- package/dist/src/store/search.d.ts +10 -0
- package/dist/src/templates/PageAudioDetail/PageAudioDetail.stories.d.ts +102 -0
- package/dist/src/templates/PageContent/PageContent.stories.d.ts +2 -1
- package/dist/src/templates/PageContent/PageContent.vue.d.ts +8 -0
- package/dist/src/templates/PageEventDetail/PageEventDetail.stories.d.ts +1 -1
- package/dist/src/templates/PageImageDetail/PageImageDetail.stories.d.ts +141 -0
- package/dist/src/templates/PageNewsDetail/PageNewsDetail.stories.d.ts +1163 -228
- package/dist/src/templates/PageVideoDetail/PageVideoDetail.stories.d.ts +56 -0
- package/dist/src/templates/edu/PageContentEdu.stories.d.ts +27 -0
- package/dist/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.d.ts +360 -0
- package/dist/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.d.ts +99 -0
- package/dist/src/templates/{edu/PageEduNewsDetail.stories.d.ts → www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.d.ts} +48 -67
- package/dist/src/templates/www/PageCuratedGallery/PageCuratedGallery.stories.d.ts +98 -0
- package/dist/src/templates/www/PageGoDirectory/PageGoDirectory.stories.d.ts +56 -0
- package/dist/src/templates/www/PageHomepage/PageHomepage.stories.d.ts +704 -0
- package/dist/src/templates/www/PageInfographicDetail/PageInfographicDetail.stories.d.ts +41 -0
- package/dist/src/templates/www/PageMaintenanceMode/PageMaintenanceMode.stories.d.ts +14 -0
- package/dist/src/templates/www/PageMissionDetail/PageMissionDetail.stories.d.ts +875 -0
- package/dist/src/templates/www/PagePodcast/PagePodcast.stories.d.ts +115 -0
- package/dist/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.d.ts +84 -0
- package/dist/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.d.ts +64 -0
- package/dist/src/templates/www/PageProfileDetail/PageProfileDetail.stories.d.ts +60 -0
- package/dist/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.d.ts +170 -0
- package/dist/src/templates/www/PageTimeline/PageTimeline.stories.d.ts +338 -0
- package/dist/src/templates/www/PageTopicDetail/PageTopicDetail.stories.d.ts +297 -0
- package/dist/style.css +1 -1
- package/lib/main.ts +4 -0
- package/package.json +2 -1
- package/src/components/BaseAudio/BaseAudio.vue +0 -1
- package/src/components/BaseHeading/BaseHeading.stories.js +0 -1
- package/src/components/BaseHeading/BaseHeading.vue +5 -7
- package/src/components/BasePlaceholder/BasePlaceholder.stories.js +0 -1
- package/src/components/BlockAudio/BlockAudio.stories.js +2 -3
- package/src/components/BlockDialog/BlockDialog.stories.js +56 -0
- package/src/components/BlockDialog/BlockDialog.stories.mdx +28 -0
- package/src/components/BlockDialog/BlockDialog.vue +132 -0
- package/src/components/BlockHeading/BlockHeading.stories.js +2 -2
- package/src/components/BlockImage/BlockImage.stories.js +0 -1
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +0 -1
- package/src/components/BlockImageGallery/BlockImageGallery.vue +0 -1
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +4 -2
- package/src/components/BlockQuote/BlockQuote.stories.js +0 -1
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +20 -9
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +3 -2
- package/src/components/DsnWidget/DsnWidget.vue +2 -2
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.js +1 -8
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.js +115 -118
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +3 -23
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue +1 -2
- package/src/components/HomepageStats/HomepageStats.stories.js +10 -10
- package/src/components/HomepageStats/HomepageStats.vue +8 -8
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.js +11 -18
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +20 -14
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlockCardImage.vue +1 -1
- package/src/components/MissionDetailAbout/MissionDetailAbout.stories.js +1 -8
- package/src/components/MissionDetailHero/MissionDetailHero.stories.js +11 -11
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +6 -6
- package/src/components/MixinCarousel/MixinCarousel.docs.mdx +1 -1
- package/src/components/NavDesktop/NavDesktop.stories.js +1 -4
- package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +2 -1
- package/src/components/NavDesktopEdu/NavDesktopEdu.vue +0 -26
- package/src/components/NavMobile/NavMobileEdu.stories.js +2 -1
- package/src/components/NavSecondary/NavSecondary.vue +1 -1
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +1 -1
- package/src/components/TimelineDialog/TimelineDialog.stories.js +47 -0
- package/src/components/TimelineDialog/TimelineDialog.stories.mdx +26 -0
- package/src/components/TimelineDialog/TimelineDialog.vue +145 -0
- package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.js +1 -9
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.js +1 -8
- package/src/docs/utils/ComponentItem.jsx +0 -1
- package/src/store/curatedGallery.ts +23 -0
- package/src/store/search.ts +43 -0
- package/src/templates/PageAudioDetail/PageAudioDetail.stories.js +106 -0
- package/src/templates/PageAudioDetail/PageAudioDetail.vue +375 -0
- package/src/templates/PageContent/PageContent.stories.js +2 -1
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +1 -1
- package/src/templates/PageImageDetail/PageImageDetail.stories.js +116 -0
- package/src/templates/PageImageDetail/PageImageDetail.vue +444 -0
- package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +3 -2
- package/src/templates/PageNewsDetail/PageNewsDetail.vue +1 -1
- package/src/templates/PageVideoDetail/PageVideoDetail.stories.js +84 -0
- package/src/templates/PageVideoDetail/PageVideoDetail.vue +173 -0
- package/src/templates/edu/PageContentEdu.stories.js +1 -0
- package/src/templates/edu/{PageEduNewsDetail.stories.js → PageEduNewsDetail/PageEduNewsDetail.stories.js} +5 -3
- package/src/templates/edu/{PageEduNewsDetail.vue → PageEduNewsDetail/PageEduNewsDetail.vue} +3 -2
- package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.js +54 -0
- package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.vue +79 -0
- package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.js +34 -0
- package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.vue +56 -0
- package/src/templates/www/PageCuratedGallery/PageCuratedGallery.stories.js +110 -0
- package/src/templates/www/PageCuratedGallery/PageCuratedGallery.vue +345 -0
- package/src/templates/www/PageGoDirectory/PageGoDirectory.stories.js +61 -0
- package/src/templates/www/PageGoDirectory/PageGoDirectory.vue +76 -0
- package/src/templates/www/PageHomepage/PageHomepage.stories.js +101 -0
- package/src/templates/www/PageHomepage/PageHomepage.vue +136 -0
- package/src/templates/www/PageInfographicDetail/PageInfographicDetail.stories.js +46 -0
- package/src/templates/www/PageInfographicDetail/PageInfographicDetail.vue +125 -0
- package/src/templates/www/PageMaintenanceMode/PageMaintenanceMode.stories.js +14 -0
- package/src/templates/www/PageMaintenanceMode/PageMaintenanceMode.vue +94 -0
- package/src/templates/www/PageMissionDetail/PageMissionDetail.stories.js +246 -0
- package/src/templates/www/PageMissionDetail/PageMissionDetail.vue +136 -0
- package/src/templates/www/PagePodcast/PagePodcast.stories.js +86 -0
- package/src/templates/www/PagePodcast/PagePodcast.vue +219 -0
- package/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.js +96 -0
- package/src/templates/www/PagePodcastSeason/PagePodcastSeason.vue +191 -0
- package/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.js +72 -0
- package/src/templates/www/PagePressKitIndex/PagePressKitIndex.vue +76 -0
- package/src/templates/www/PageProfileDetail/PageProfileDetail.stories.js +76 -0
- package/src/templates/www/PageProfileDetail/PageProfileDetail.vue +178 -0
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +43 -0
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.vue +101 -0
- package/src/templates/www/PageTimeline/BlockMilestone.vue +99 -0
- package/src/templates/www/PageTimeline/PageTimeline.stories.js +357 -0
- package/src/templates/www/PageTimeline/PageTimeline.vue +384 -0
- package/src/templates/www/PageTopicDetail/PageTopicDetail.stories.js +87 -0
- package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +121 -0
- package/src/utils/mixins.ts +1 -1
- package/components.d.ts +0 -217
- package/src/templates/www/HomePage/HomePage.vue +0 -30
- /package/dist/src/components/{MixinDropdownToggle/MixinDropdownToggle.vue.d.ts → NavDropdownToggle/NavDropdownToggle.vue.d.ts} +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="data"
|
|
4
|
+
class="-nav-offset"
|
|
5
|
+
>
|
|
6
|
+
<div :class="theTheme">
|
|
7
|
+
<MissionDetailHero
|
|
8
|
+
:title="data.title"
|
|
9
|
+
:subtitle="data.subtitle"
|
|
10
|
+
:summary="data.summary"
|
|
11
|
+
:template-style="data.templateStyle"
|
|
12
|
+
:mission-website-url="data.missionWebsiteUrl"
|
|
13
|
+
:instrument-image="data.instrumentImage"
|
|
14
|
+
:instrument-background="data.instrumentBackground"
|
|
15
|
+
:hero-fallback="data.heroImage"
|
|
16
|
+
/>
|
|
17
|
+
<MissionDetailStats
|
|
18
|
+
:show-clock="data.showClock"
|
|
19
|
+
:show-distance="data.showDistance"
|
|
20
|
+
:clock-type="data.clockType"
|
|
21
|
+
:start-date-time="data.startDateTime"
|
|
22
|
+
:distance-type="data.distanceType"
|
|
23
|
+
:distance-value="data.distanceValue"
|
|
24
|
+
:distance-api-urls="data.distanceApiUrls"
|
|
25
|
+
:display-date="data.displayDate"
|
|
26
|
+
:mission-types="data.missionTypes"
|
|
27
|
+
:mission-targets="data.missionTargets"
|
|
28
|
+
:status="data.status"
|
|
29
|
+
/>
|
|
30
|
+
<MissionDetailAbout
|
|
31
|
+
class="py-10"
|
|
32
|
+
:description-heading="data.descriptionHeading"
|
|
33
|
+
:description="data.description"
|
|
34
|
+
:instruments="data.instruments"
|
|
35
|
+
/>
|
|
36
|
+
<!-- 3D model -->
|
|
37
|
+
<MissionDetailHighlights
|
|
38
|
+
v-if="data.highlights && data.highlights.length"
|
|
39
|
+
:animation="data.showHighlightsAnimation"
|
|
40
|
+
:graphic="data.highlightsGraphic"
|
|
41
|
+
:heading="data.highlightsHeading"
|
|
42
|
+
:mission-title="data.title"
|
|
43
|
+
:highlights="data.highlights"
|
|
44
|
+
/>
|
|
45
|
+
<!-- Mission Streamfield (text and image, blockquote) -->
|
|
46
|
+
<MissionDetailStreamfield
|
|
47
|
+
v-if="data.feature && data.feature.length"
|
|
48
|
+
class="pt-10"
|
|
49
|
+
:class="{ 'pb-10': data.templateStyle === 'dark' }"
|
|
50
|
+
:data="data.feature"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<!-- Related Pages, data returned only if a topic is assigned -->
|
|
54
|
+
<BlockLinkCarousel
|
|
55
|
+
item-type="cards"
|
|
56
|
+
class="lg:mt-24 mt-18 lg:mb-18 mb-10"
|
|
57
|
+
:heading="moreAboutTopicHeading"
|
|
58
|
+
:items="data.relatedPages"
|
|
59
|
+
/>
|
|
60
|
+
<!-- Related Links -->
|
|
61
|
+
<LayoutHelper
|
|
62
|
+
v-if="data.relatedLinks && data.relatedLinks.length"
|
|
63
|
+
indent="col-2"
|
|
64
|
+
class="lg:mb-18 mb-10"
|
|
65
|
+
>
|
|
66
|
+
<BlockRelatedLinks :data="data.relatedLinks[0]" />
|
|
67
|
+
</LayoutHelper>
|
|
68
|
+
<!-- Other Missions -->
|
|
69
|
+
<div
|
|
70
|
+
v-if="data.otherMissions && data.otherMissions.length"
|
|
71
|
+
class="bg-gray-light lg:py-24 lg:mt-24 py-12 mt-12"
|
|
72
|
+
>
|
|
73
|
+
<BlockLinkCarousel
|
|
74
|
+
item-type="tiles"
|
|
75
|
+
heading="Explore Other Missions"
|
|
76
|
+
:items="data.otherMissions"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
<script lang="ts">
|
|
82
|
+
import { defineComponent } from 'vue'
|
|
83
|
+
import MissionDetailHighlights from './../../../components/MissionDetailHighlights/MissionDetailHighlights.vue'
|
|
84
|
+
import MissionDetailHero from './../../../components/MissionDetailHero/MissionDetailHero.vue'
|
|
85
|
+
import MissionDetailAbout from './../../../components/MissionDetailAbout/MissionDetailAbout.vue'
|
|
86
|
+
import MissionDetailStats from './../../../components/MissionDetailStats/MissionDetailStats.vue'
|
|
87
|
+
import MissionDetailStreamfield from './../../../components/MissionDetailStreamfield/MissionDetailStreamfield.vue'
|
|
88
|
+
import BlockRelatedLinks from './../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
89
|
+
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
90
|
+
import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
91
|
+
|
|
92
|
+
interface dataShape {
|
|
93
|
+
templateStyle: string
|
|
94
|
+
}
|
|
95
|
+
export default defineComponent({
|
|
96
|
+
name: 'PageMissionDetail',
|
|
97
|
+
components: {
|
|
98
|
+
MissionDetailHighlights,
|
|
99
|
+
MissionDetailHero,
|
|
100
|
+
MissionDetailAbout,
|
|
101
|
+
MissionDetailStats,
|
|
102
|
+
MissionDetailStreamfield,
|
|
103
|
+
BlockRelatedLinks,
|
|
104
|
+
BlockLinkCarousel,
|
|
105
|
+
LayoutHelper
|
|
106
|
+
},
|
|
107
|
+
props: {
|
|
108
|
+
data: {
|
|
109
|
+
type: Object,
|
|
110
|
+
required: false,
|
|
111
|
+
default: undefined
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
theTheme() {
|
|
116
|
+
if ((this.data as dataShape).templateStyle === 'dark') {
|
|
117
|
+
return 'ThemeVariantDark bg-black'
|
|
118
|
+
}
|
|
119
|
+
return 'ThemeVariantLight'
|
|
120
|
+
},
|
|
121
|
+
moreAboutTopicHeading() {
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
const { topicLabels } = this.data
|
|
124
|
+
if (!topicLabels || topicLabels.length === 0) {
|
|
125
|
+
return 'More'
|
|
126
|
+
}
|
|
127
|
+
if (topicLabels.length === 1) {
|
|
128
|
+
return `More about ${topicLabels[0]}`
|
|
129
|
+
}
|
|
130
|
+
const last = topicLabels[topicLabels.length - 1]
|
|
131
|
+
const firsts = topicLabels.slice(0, topicLabels.length - 1).join(', ')
|
|
132
|
+
return `More about ${firsts} and ${last}`
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
</script>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { BlockRelatedLinksData } from './../../../components/BlockRelatedLinks/BlockRelatedLinks.stories.js'
|
|
2
|
+
import { HeroMediaData } from './../../../components/HeroMedia/HeroMedia.stories'
|
|
3
|
+
import { BlockLinkTileCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
|
|
4
|
+
import PagePodcast from './PagePodcast.vue'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Templates/WWW/PagePodcast',
|
|
8
|
+
component: PagePodcast,
|
|
9
|
+
tags: ['!autodocs'],
|
|
10
|
+
decorators: [
|
|
11
|
+
() => ({
|
|
12
|
+
template: `<div id="storyDecorator" class="disable-nav-offset"><story/></div>`
|
|
13
|
+
})
|
|
14
|
+
],
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
html: {
|
|
18
|
+
root: '#storyDecorator'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
excludeStories: /.*(Data)$/
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// data
|
|
25
|
+
export const PagePodcastData = {
|
|
26
|
+
title: 'On a Mission',
|
|
27
|
+
topicLabel: 'Mars',
|
|
28
|
+
label: 'Podcast',
|
|
29
|
+
summary:
|
|
30
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas in nibh mauris. Praesent vel tempus enim, a ultricies justo. Cras nec lorem quis lorem ullamcorper accumsan. Aliquam lacus tortor, vulputate sit amet purus vitae, accumsan maximus diam. Vivamus ac dui non sapien hendrerit elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
31
|
+
heroImage: HeroMediaData.image,
|
|
32
|
+
seasons: [
|
|
33
|
+
{
|
|
34
|
+
id: 1,
|
|
35
|
+
seasonNumber: 1,
|
|
36
|
+
label: 'On a Mission | Season 1',
|
|
37
|
+
subtitle: 'Descriptive Title of Season 1',
|
|
38
|
+
summary:
|
|
39
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
40
|
+
parent: {
|
|
41
|
+
title: 'On a Mission'
|
|
42
|
+
},
|
|
43
|
+
thumbnailImage: {
|
|
44
|
+
src: {
|
|
45
|
+
url: 'https://picsum.photos/560/560',
|
|
46
|
+
width: '560',
|
|
47
|
+
height: '560'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
title: 'Season 1',
|
|
51
|
+
url: '/podcasts/season1/',
|
|
52
|
+
firstPublishedAt: '2020-10-01'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 2,
|
|
56
|
+
seasonNumber: 2,
|
|
57
|
+
label: 'On a Mission | Season 2',
|
|
58
|
+
subtitle: 'Descriptive Title of Season 2',
|
|
59
|
+
summary:
|
|
60
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
61
|
+
parent: {
|
|
62
|
+
title: 'On a Mission'
|
|
63
|
+
},
|
|
64
|
+
thumbnailImage: {
|
|
65
|
+
src: {
|
|
66
|
+
url: 'https://picsum.photos/560/560',
|
|
67
|
+
width: '560',
|
|
68
|
+
height: '560'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
title: 'Season 2',
|
|
72
|
+
url: '/podcasts/season2/',
|
|
73
|
+
firstPublishedAt: '2020-12-01'
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
relatedLinks: [BlockRelatedLinksData.data],
|
|
77
|
+
relatedPodcasts: BlockLinkTileCarouselData
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// stories
|
|
81
|
+
export const BaseStory = {
|
|
82
|
+
name: 'PagePodcast',
|
|
83
|
+
args: {
|
|
84
|
+
data: PagePodcastData
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="data"
|
|
4
|
+
class="ThemeVariantLight"
|
|
5
|
+
:class="{ '-nav-offset': data.heroImage }"
|
|
6
|
+
>
|
|
7
|
+
<!-- hero image -->
|
|
8
|
+
<HeroMedia
|
|
9
|
+
v-if="data.heroImage"
|
|
10
|
+
class="md:mb-12 lg:mb-18 mb-10"
|
|
11
|
+
:image="data.heroImage"
|
|
12
|
+
:caption="data.heroImageCaption"
|
|
13
|
+
:display-caption="!data.heroImageCaption ? false : true"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<!-- page headline -->
|
|
17
|
+
<LayoutHelper
|
|
18
|
+
indent="col-1"
|
|
19
|
+
class="3xl:px-0 lg:mt-12 px-5 mx-auto mt-5 mb-5 lg:mb-10"
|
|
20
|
+
>
|
|
21
|
+
<DetailHeadline
|
|
22
|
+
:title="data.title"
|
|
23
|
+
:publication-date="data.publicationDate"
|
|
24
|
+
label="Podcast Series"
|
|
25
|
+
schema
|
|
26
|
+
/>
|
|
27
|
+
<BlockText
|
|
28
|
+
v-if="data.summary"
|
|
29
|
+
:text="data.summary"
|
|
30
|
+
variant="medium"
|
|
31
|
+
class="lg:w-2/3 mt-5"
|
|
32
|
+
/>
|
|
33
|
+
</LayoutHelper>
|
|
34
|
+
|
|
35
|
+
<LayoutHelper>
|
|
36
|
+
<div class="col-span-12 pb-2 justify-end flex flex-row pr-0.5">
|
|
37
|
+
<!-- toggle gallery view -->
|
|
38
|
+
<div
|
|
39
|
+
v-if="allowGridView"
|
|
40
|
+
class="align-end flex text-2xl font-secondary font-semibold tracking-wider"
|
|
41
|
+
>
|
|
42
|
+
<button
|
|
43
|
+
class="lg:ml-6"
|
|
44
|
+
:class="
|
|
45
|
+
showGridView
|
|
46
|
+
? 'text-theme-red cursor-default'
|
|
47
|
+
: 'text-gray-mid can-hover:hover:text-theme-red-hover cursor-pointer'
|
|
48
|
+
"
|
|
49
|
+
:aria-label="showGridView ? 'Grid View (enabled)' : 'Grid View'"
|
|
50
|
+
:disabled="showGridView"
|
|
51
|
+
@click="
|
|
52
|
+
isGallery
|
|
53
|
+
? searchStore.updateGridViewForPodcasts(true)
|
|
54
|
+
: searchStore.updateGridView(true)
|
|
55
|
+
"
|
|
56
|
+
>
|
|
57
|
+
<span class="flex items-center">
|
|
58
|
+
<IconGrid />
|
|
59
|
+
</span>
|
|
60
|
+
</button>
|
|
61
|
+
<button
|
|
62
|
+
class="ml-3"
|
|
63
|
+
:class="
|
|
64
|
+
!showGridView
|
|
65
|
+
? 'text-theme-red cursor-default'
|
|
66
|
+
: 'text-gray-mid can-hover:hover:text-theme-red-hover cursor-pointer'
|
|
67
|
+
"
|
|
68
|
+
:aria-label="!showGridView ? 'List View (enabled)' : 'List View'"
|
|
69
|
+
:disabled="!showGridView"
|
|
70
|
+
@click="
|
|
71
|
+
isGallery
|
|
72
|
+
? searchStore.updateGridViewForPodcasts(false)
|
|
73
|
+
: searchStore.updateGridView(false)
|
|
74
|
+
"
|
|
75
|
+
>
|
|
76
|
+
<span class="flex items-center">
|
|
77
|
+
<IconList />
|
|
78
|
+
</span>
|
|
79
|
+
</button>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</LayoutHelper>
|
|
83
|
+
|
|
84
|
+
<LayoutHelper
|
|
85
|
+
v-if="sortedSeasons && sortedSeasons.length"
|
|
86
|
+
indent="col-2"
|
|
87
|
+
class="border-gray-mid lg:mb-24 pt-10 mb-12 border-t"
|
|
88
|
+
>
|
|
89
|
+
<section aria-label="Podcast Seasons">
|
|
90
|
+
<template v-if="!showGridView">
|
|
91
|
+
<SearchResultCard
|
|
92
|
+
v-for="season of sortedSeasons"
|
|
93
|
+
:key="season.id"
|
|
94
|
+
:type="season.parent.title"
|
|
95
|
+
:topic="season.title"
|
|
96
|
+
:url="season.url"
|
|
97
|
+
:image="season.thumbnailImage"
|
|
98
|
+
:title="season.subtitle"
|
|
99
|
+
:summary="season.summary"
|
|
100
|
+
:date="
|
|
101
|
+
// @ts-ignore
|
|
102
|
+
$filters.displayDate(season.firstPublishedAt)
|
|
103
|
+
"
|
|
104
|
+
heading-level="h2"
|
|
105
|
+
/>
|
|
106
|
+
</template>
|
|
107
|
+
<template v-else>
|
|
108
|
+
<div class="md:grid grid-cols-12 gap-10">
|
|
109
|
+
<div
|
|
110
|
+
v-for="season of sortedSeasons"
|
|
111
|
+
:key="season.id"
|
|
112
|
+
class="col-span-6 lg:col-span-4"
|
|
113
|
+
>
|
|
114
|
+
<SearchResultGridItem
|
|
115
|
+
:type="season.parent.title"
|
|
116
|
+
:topic="season.title"
|
|
117
|
+
:url="season.url"
|
|
118
|
+
:image="season.thumbnailImage"
|
|
119
|
+
:title="season.title"
|
|
120
|
+
:summary="season.summary"
|
|
121
|
+
:date="
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
$filters.displayDate(season.firstPublishedAt)
|
|
124
|
+
"
|
|
125
|
+
heading-level="h2"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
</section>
|
|
131
|
+
</LayoutHelper>
|
|
132
|
+
|
|
133
|
+
<!-- related links -->
|
|
134
|
+
<LayoutHelper
|
|
135
|
+
v-if="data.relatedLinks && data.relatedLinks.length"
|
|
136
|
+
indent="col-2"
|
|
137
|
+
class="lg:mb-18 mb-10 -mt-5"
|
|
138
|
+
>
|
|
139
|
+
<BlockRelatedLinks :data="data.relatedLinks[0]" />
|
|
140
|
+
</LayoutHelper>
|
|
141
|
+
|
|
142
|
+
<div
|
|
143
|
+
v-if="data.relatedPodcasts && data.relatedPodcasts.length"
|
|
144
|
+
class="bg-gray-light lg:py-24 lg:mt-24 py-12 mt-12"
|
|
145
|
+
>
|
|
146
|
+
<BlockLinkCarousel
|
|
147
|
+
item-type="tiles"
|
|
148
|
+
heading="Explore Other Podcasts"
|
|
149
|
+
:items="data.relatedPodcasts"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</template>
|
|
154
|
+
<script>
|
|
155
|
+
import { defineComponent } from 'vue'
|
|
156
|
+
import { mapStores } from 'pinia'
|
|
157
|
+
import { useSearchStore } from './../../../store/search.ts'
|
|
158
|
+
import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
|
|
159
|
+
import IconGrid from './../../../components/Icons/IconGrid.vue'
|
|
160
|
+
import IconList from './../../../components/Icons/IconList.vue'
|
|
161
|
+
import DetailHeadline from './../../../components/DetailHeadline/DetailHeadline.vue'
|
|
162
|
+
import SearchResultCard from './../../../components/SearchResultCard/SearchResultCard.vue'
|
|
163
|
+
import SearchResultGridItem from './../../../components/SearchResultGridItem/SearchResultGridItem.vue'
|
|
164
|
+
import LayoutHelper from './../../../components/LayoutHelper/LayoutHelper.vue'
|
|
165
|
+
import BlockRelatedLinks from './../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
166
|
+
import BlockText from './../../../components/BlockText/BlockText.vue'
|
|
167
|
+
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
168
|
+
|
|
169
|
+
export default defineComponent({
|
|
170
|
+
name: 'PagePodcast',
|
|
171
|
+
components: {
|
|
172
|
+
HeroMedia,
|
|
173
|
+
DetailHeadline,
|
|
174
|
+
SearchResultCard,
|
|
175
|
+
SearchResultGridItem,
|
|
176
|
+
LayoutHelper,
|
|
177
|
+
BlockRelatedLinks,
|
|
178
|
+
BlockText,
|
|
179
|
+
BlockLinkCarousel,
|
|
180
|
+
IconGrid,
|
|
181
|
+
IconList
|
|
182
|
+
},
|
|
183
|
+
props: {
|
|
184
|
+
data: {
|
|
185
|
+
type: Object,
|
|
186
|
+
required: false
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
data() {
|
|
191
|
+
return {
|
|
192
|
+
allowGridView: true,
|
|
193
|
+
defaultShowGridView: false,
|
|
194
|
+
isGallery: true
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
computed: {
|
|
198
|
+
...mapStores(useSearchStore),
|
|
199
|
+
showGridView() {
|
|
200
|
+
if (this.isGallery) {
|
|
201
|
+
if (this.searchStore.showGridViewForPodcasts !== undefined) {
|
|
202
|
+
return this.searchStore.showGridViewForPodcasts
|
|
203
|
+
}
|
|
204
|
+
} else if (this.searchStore.showGridView !== undefined) {
|
|
205
|
+
return this.searchStore.showGridView
|
|
206
|
+
}
|
|
207
|
+
return this.defaultShowGridView
|
|
208
|
+
},
|
|
209
|
+
sortedSeasons() {
|
|
210
|
+
let seasons = null
|
|
211
|
+
if (this.data && this.data.seasons) {
|
|
212
|
+
seasons = this.data.seasons
|
|
213
|
+
return seasons.sort((a, b) => a.seasonNumber - b.seasonNumber)
|
|
214
|
+
}
|
|
215
|
+
return seasons
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
</script>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { HeroMediumData } from './../../../components/HeroMedium/HeroMedium.stories'
|
|
2
|
+
import { BlockLinkTileCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js'
|
|
3
|
+
import PagePodcastSeason from './PagePodcastSeason.vue'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/WWW/PagePodcastSeason',
|
|
7
|
+
component: PagePodcastSeason,
|
|
8
|
+
tags: ['!autodocs'],
|
|
9
|
+
decorators: [
|
|
10
|
+
() => ({
|
|
11
|
+
template: `<div id="storyDecorator" class="disable-nav-offset"><story/></div>`
|
|
12
|
+
})
|
|
13
|
+
],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'fullscreen',
|
|
16
|
+
html: {
|
|
17
|
+
root: '#storyDecorator'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
excludeStories: /.*(Data)$/
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// data
|
|
24
|
+
export const PagePodcastSeasonData = {
|
|
25
|
+
title: 'Season 1',
|
|
26
|
+
subtitle: 'Descriptive Season Title',
|
|
27
|
+
topicLabel: 'Mars',
|
|
28
|
+
label: 'On a Mission | Season 1',
|
|
29
|
+
summary:
|
|
30
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas in nibh mauris. Praesent vel tempus enim, a ultricies justo. Cras nec lorem quis lorem ullamcorper accumsan. Aliquam lacus tortor, vulputate sit amet purus vitae, accumsan maximus diam. Vivamus ac dui non sapien hendrerit elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
31
|
+
featuredEpisode: HeroMediumData.feature,
|
|
32
|
+
heroImage: {
|
|
33
|
+
// same dimensions used for HeroMedium
|
|
34
|
+
src: {
|
|
35
|
+
url: 'https://picsum.photos/id/247/1800/1200',
|
|
36
|
+
width: 1800,
|
|
37
|
+
height: 1200
|
|
38
|
+
},
|
|
39
|
+
srcSet:
|
|
40
|
+
'https://picsum.photos/id/247/768/548 768w, https://picsum.photos/id/247/1024/684 1024w, https://picsum.photos/id/82475/1440/770 1440w, https://picsum.photos/id/247/1800/963 1800w',
|
|
41
|
+
screenMd: {
|
|
42
|
+
url: 'https://picsum.photos/id/247/800/640'
|
|
43
|
+
},
|
|
44
|
+
screenSm: {
|
|
45
|
+
url: 'https://picsum.photos/id/247/640/900'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
episodes: [
|
|
50
|
+
{
|
|
51
|
+
id: 1,
|
|
52
|
+
title: 'Episode 01: Getting to Mars is Hard',
|
|
53
|
+
summary:
|
|
54
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
55
|
+
series: {
|
|
56
|
+
title: 'On a Mission'
|
|
57
|
+
},
|
|
58
|
+
thumbnailImage: {
|
|
59
|
+
src: {
|
|
60
|
+
url: 'https://picsum.photos/560/560',
|
|
61
|
+
width: '560',
|
|
62
|
+
height: '560'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
url: '/podcasts/season1/episode1/',
|
|
66
|
+
publicationDate: '2020-11-01'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 2,
|
|
70
|
+
title: 'Episode 01: Getting to Mars is Hard',
|
|
71
|
+
summary:
|
|
72
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porttitor ac quam sed eleifend.',
|
|
73
|
+
series: {
|
|
74
|
+
title: 'On a Mission'
|
|
75
|
+
},
|
|
76
|
+
thumbnailImage: {
|
|
77
|
+
src: {
|
|
78
|
+
url: 'https://picsum.photos/560/560',
|
|
79
|
+
width: '560',
|
|
80
|
+
height: '560'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
url: '/podcasts/season1/episode2/',
|
|
84
|
+
publicationDate: '2020-12-01'
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
relatedPodcasts: BlockLinkTileCarouselData
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// stories
|
|
91
|
+
export const Template = {
|
|
92
|
+
name: 'PagePodcastSeason',
|
|
93
|
+
args: {
|
|
94
|
+
data: PagePodcastSeasonData
|
|
95
|
+
}
|
|
96
|
+
}
|