@explorer-1/vue 0.0.0
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/LICENSE +21 -0
- package/README.md +9 -0
- package/components.d.ts +215 -0
- package/index.html +18 -0
- package/lib/main.ts +78 -0
- package/package.json +54 -0
- package/postcss.config.js +7 -0
- package/public/edu/.gitkeep +0 -0
- package/public/edu/explorer-1/bg-stars-edu.png +0 -0
- package/public/edu/explorer-1/bg-stars.jpg +0 -0
- package/public/explorer-1/bg-stars-edu.png +0 -0
- package/public/explorer-1/bg-stars.jpg +0 -0
- package/src/App.vue +30 -0
- package/src/assets/fonts/README.md +12 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-Bold.woff2 +0 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBold.woff2 +0 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBoldItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-Bold.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-ExtraBold.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-Medium.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-Regular.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-RegularItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-SemiBold.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-SemiBoldItalic.woff2 +0 -0
- package/src/assets/scss/styles.scss +1 -0
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +156 -0
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +156 -0
- package/src/components/BackToTop/BackToTop.stories.js +24 -0
- package/src/components/BackToTop/BackToTop.vue +76 -0
- package/src/components/BaseAudio/BaseAudio.stories.js +29 -0
- package/src/components/BaseAudio/BaseAudio.vue +359 -0
- package/src/components/BaseButton/BaseButton.stories.ts +65 -0
- package/src/components/BaseButton/BaseButton.vue +114 -0
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.mdx +68 -0
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +101 -0
- package/src/components/BaseHeading/BaseHeading.stories.js +75 -0
- package/src/components/BaseHeading/BaseHeading.vue +58 -0
- package/src/components/BaseImage/BaseImage.stories.ts +52 -0
- package/src/components/BaseImage/BaseImage.vue +120 -0
- package/src/components/BaseImageCaption/BaseImageCaption.stories.js +27 -0
- package/src/components/BaseImageCaption/BaseImageCaption.vue +51 -0
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +73 -0
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +90 -0
- package/src/components/BaseLightboxCloseButton/BaseLightboxCloseButton.vue +45 -0
- package/src/components/BaseLightboxOpenButton/BaseLightboxOpenButton.vue +46 -0
- package/src/components/BaseLink/BaseLink.stories.js +47 -0
- package/src/components/BaseLink/BaseLink.vue +227 -0
- package/src/components/BaseModal/BaseModal.stories.js +90 -0
- package/src/components/BaseModal/BaseModal.vue +54 -0
- package/src/components/BaseModal/BaseModalDialog.vue +59 -0
- package/src/components/BasePlaceholder/BasePlaceholder.stories.js +29 -0
- package/src/components/BasePlaceholder/BasePlaceholder.vue +30 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.stories.mdx +68 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.vue +102 -0
- package/src/components/BaseSwimlane/BaseSwimlane.stories.mdx +64 -0
- package/src/components/BaseSwimlane/BaseSwimlane.vue +204 -0
- package/src/components/BaseTag/BaseTag.stories.js +34 -0
- package/src/components/BaseTag/BaseTag.vue +36 -0
- package/src/components/BaseTimer/BaseTimer.stories.js +78 -0
- package/src/components/BaseTimer/BaseTimer.test.js +15 -0
- package/src/components/BaseTimer/BaseTimer.vue +270 -0
- package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +86 -0
- package/src/components/BaseUnitToggle/BaseUnitToggle.test.js +26 -0
- package/src/components/BaseUnitToggle/BaseUnitToggle.vue +255 -0
- package/src/components/BaseVideo/BaseVideo.stories.js +31 -0
- package/src/components/BaseVideo/BaseVideo.vue +73 -0
- package/src/components/BlockAnchor/BlockAnchor.vue +38 -0
- package/src/components/BlockAudio/BlockAudio.stories.js +29 -0
- package/src/components/BlockAudio/BlockAudio.vue +78 -0
- package/src/components/BlockCard/BlockCard.stories.js +24 -0
- package/src/components/BlockCard/BlockCard.vue +88 -0
- package/src/components/BlockCardGroup/BlockCardGroup.stories.js +71 -0
- package/src/components/BlockCardGroup/BlockCardGroup.vue +61 -0
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +55 -0
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.vue +120 -0
- package/src/components/BlockCta/BlockCta.stories.js +35 -0
- package/src/components/BlockCta/BlockCta.vue +55 -0
- package/src/components/BlockHeading/BlockHeading.stories.js +22 -0
- package/src/components/BlockHeading/BlockHeading.vue +27 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +40 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +84 -0
- package/src/components/BlockImage/BlockImage.stories.js +137 -0
- package/src/components/BlockImage/BlockImage.vue +48 -0
- package/src/components/BlockImage/BlockImageFullBleed.vue +119 -0
- package/src/components/BlockImage/BlockImageStandard.vue +106 -0
- package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +108 -0
- package/src/components/BlockImageCarousel/BlockImageCarousel.vue +201 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +63 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +120 -0
- package/src/components/BlockImageComparison/BlockImageComparison.stories.js +46 -0
- package/src/components/BlockImageComparison/BlockImageComparison.vue +59 -0
- package/src/components/BlockImageGallery/BlockImageGallery.stories.js +55 -0
- package/src/components/BlockImageGallery/BlockImageGallery.vue +128 -0
- package/src/components/BlockInlineImage/BlockInlineImage.stories.js +68 -0
- package/src/components/BlockInlineImage/BlockInlineImage.vue +124 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +28 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.vue +48 -0
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +102 -0
- package/src/components/BlockLinkCard/BlockLinkCard.vue +197 -0
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +217 -0
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +68 -0
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +72 -0
- package/src/components/BlockLinkTile/BlockLinkTile.vue +193 -0
- package/src/components/BlockListCards/BlockListCards.stories.js +69 -0
- package/src/components/BlockListCards/BlockListCards.vue +129 -0
- package/src/components/BlockQuote/BlockQuote.stories.js +84 -0
- package/src/components/BlockQuote/BlockQuote.vue +87 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +60 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +77 -0
- package/src/components/BlockRelatedLinks/RelatedLink.vue +85 -0
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +88 -0
- package/src/components/BlockStreamfield/BlockStreamfield.vue +333 -0
- package/src/components/BlockTable/BlockTable.stories.js +20 -0
- package/src/components/BlockTable/BlockTable.vue +73 -0
- package/src/components/BlockTeaser/BlockTeaser.stories.js +74 -0
- package/src/components/BlockTeaser/BlockTeaser.test.js +12 -0
- package/src/components/BlockTeaser/BlockTeaser.vue +174 -0
- package/src/components/BlockText/BlockText.stories.js +21 -0
- package/src/components/BlockText/BlockText.vue +44 -0
- package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.stories.js +19 -0
- package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue +61 -0
- package/src/components/BlockVideo/BlockVideo.stories.js +23 -0
- package/src/components/BlockVideo/BlockVideo.vue +41 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +20 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +71 -0
- package/src/components/CalendarButton/CalendarButton.stories.js +36 -0
- package/src/components/CalendarButton/CalendarButton.vue +86 -0
- package/src/components/DetailHeadline/DetailHeadline.stories.js +48 -0
- package/src/components/DetailHeadline/DetailHeadline.vue +143 -0
- package/src/components/DsnWidget/DsnWidget.stories.js +29 -0
- package/src/components/DsnWidget/DsnWidget.vue +96 -0
- package/src/components/EventCard/EventCard.vue +188 -0
- package/src/components/EventDetailHero/EventDetailHero.stories.js +53 -0
- package/src/components/EventDetailHero/EventDetailHero.vue +64 -0
- package/src/components/FormContact/FormContact.stories.js +16 -0
- package/src/components/FormContact/FormContact.vue +202 -0
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +16 -0
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.vue +355 -0
- package/src/components/HeroLarge/HeroLarge.stories.js +46 -0
- package/src/components/HeroLarge/HeroLarge.vue +93 -0
- package/src/components/HeroListingIndex/HeroListingIndex.stories.js +156 -0
- package/src/components/HeroListingIndex/HeroListingIndex.vue +80 -0
- package/src/components/HeroMedia/HeroMedia.stories.js +135 -0
- package/src/components/HeroMedia/HeroMedia.vue +174 -0
- package/src/components/HeroMedium/HeroMedium.stories.js +73 -0
- package/src/components/HeroMedium/HeroMedium.vue +166 -0
- package/src/components/HomepageCarousel/HomepageCarousel.stories.js +112 -0
- package/src/components/HomepageCarousel/HomepageCarousel.vue +382 -0
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +60 -0
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +168 -0
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.js +35 -0
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +39 -0
- package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.stories.js +93 -0
- package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.vue +129 -0
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.js +153 -0
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +282 -0
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue +143 -0
- package/src/components/HomepageStats/HomepageStats.stories.js +155 -0
- package/src/components/HomepageStats/HomepageStats.vue +362 -0
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.js +90 -0
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +156 -0
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlockCardImage.vue +58 -0
- package/src/components/Icons/Icon360.vue +29 -0
- package/src/components/Icons/IconArrow.vue +26 -0
- package/src/components/Icons/IconArrows.vue +43 -0
- package/src/components/Icons/IconAudio.vue +27 -0
- package/src/components/Icons/IconBook.vue +21 -0
- package/src/components/Icons/IconBookUser.vue +21 -0
- package/src/components/Icons/IconBriefcase.vue +21 -0
- package/src/components/Icons/IconCalendar.vue +25 -0
- package/src/components/Icons/IconCaret.vue +26 -0
- package/src/components/Icons/IconCheckbox.vue +26 -0
- package/src/components/Icons/IconCheckboxSelected.vue +35 -0
- package/src/components/Icons/IconClose.vue +27 -0
- package/src/components/Icons/IconCloseLightbox.vue +25 -0
- package/src/components/Icons/IconDownload.vue +31 -0
- package/src/components/Icons/IconDropdown.vue +25 -0
- package/src/components/Icons/IconEnvelope.vue +21 -0
- package/src/components/Icons/IconExpand.vue +28 -0
- package/src/components/Icons/IconExternal.vue +25 -0
- package/src/components/Icons/IconFilter.vue +25 -0
- package/src/components/Icons/IconForwardTen.vue +38 -0
- package/src/components/Icons/IconGrid.vue +25 -0
- package/src/components/Icons/IconHand.vue +21 -0
- package/src/components/Icons/IconInfo.vue +26 -0
- package/src/components/Icons/IconLink.vue +27 -0
- package/src/components/Icons/IconList.vue +25 -0
- package/src/components/Icons/IconLocation.vue +37 -0
- package/src/components/Icons/IconMagnifyingGlass.vue +21 -0
- package/src/components/Icons/IconMedal.vue +21 -0
- package/src/components/Icons/IconMenu.vue +27 -0
- package/src/components/Icons/IconMinus.vue +26 -0
- package/src/components/Icons/IconMute.vue +27 -0
- package/src/components/Icons/IconNext.vue +25 -0
- package/src/components/Icons/IconPause.vue +28 -0
- package/src/components/Icons/IconPlay.vue +28 -0
- package/src/components/Icons/IconPlus.vue +25 -0
- package/src/components/Icons/IconPrev.vue +25 -0
- package/src/components/Icons/IconRewindTen.vue +42 -0
- package/src/components/Icons/IconSearch.vue +25 -0
- package/src/components/Icons/IconShare.vue +30 -0
- package/src/components/Icons/IconSlideshow.vue +30 -0
- package/src/components/Icons/IconSocialEmail.vue +26 -0
- package/src/components/Icons/IconSocialFacebook.vue +26 -0
- package/src/components/Icons/IconSocialGoogleClassroom.vue +26 -0
- package/src/components/Icons/IconSocialInstagram.vue +35 -0
- package/src/components/Icons/IconSocialPinterest.vue +26 -0
- package/src/components/Icons/IconSocialReddit.vue +25 -0
- package/src/components/Icons/IconSocialTwitter.vue +25 -0
- package/src/components/Icons/IconSocialYoutube.vue +35 -0
- package/src/components/Icons/IconStop.vue +27 -0
- package/src/components/Icons/IconTime.vue +25 -0
- package/src/components/Icons/IconUniversity.vue +21 -0
- package/src/components/Icons/IconUser.vue +26 -0
- package/src/components/Icons/IconVolume.vue +27 -0
- package/src/components/Icons/Icons.stories.ts +440 -0
- package/src/components/ImageDetailContextImage/ImageDetailContextImage.vue +125 -0
- package/src/components/LayoutHelper/LayoutHelper.vue +38 -0
- package/src/components/LoadingTransition/LoadingTransition.vue +48 -0
- package/src/components/LogoCaltech/LogoCaltech.stories.js +39 -0
- package/src/components/LogoCaltech/LogoCaltech.vue +29 -0
- package/src/components/LogoTribrand/LogoTribrand.stories.js +76 -0
- package/src/components/LogoTribrand/LogoTribrand.vue +93 -0
- package/src/components/MissionDetailAbout/MissionDetailAbout.stories.js +70 -0
- package/src/components/MissionDetailAbout/MissionDetailAbout.vue +204 -0
- package/src/components/MissionDetailHero/MissionDetailHero.stories.js +303 -0
- package/src/components/MissionDetailHero/MissionDetailHero.vue +292 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +278 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.vue +332 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarousel.vue +160 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarouselItem.vue +123 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +43 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +97 -0
- package/src/components/MissionDetailStats/DistanceStats.test.js +133 -0
- package/src/components/MissionDetailStats/DistanceStats.vue +250 -0
- package/src/components/MissionDetailStats/MissionDetailStats.stories.js +95 -0
- package/src/components/MissionDetailStats/MissionDetailStats.test.js +23 -0
- package/src/components/MissionDetailStats/MissionDetailStats.vue +187 -0
- package/src/components/MissionDetailStats/MissionDetailStatsMicro.vue +52 -0
- package/src/components/MissionDetailStats/MissionDetailStatsMini.vue +109 -0
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.stories.js +55 -0
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +95 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +24 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +81 -0
- package/src/components/MixinCarousel/MixinCarousel.docs.mdx +33 -0
- package/src/components/MixinCarousel/MixinCarousel.stories.js +53 -0
- package/src/components/MixinCarousel/MixinCarousel.vue +236 -0
- package/src/components/MixinDropdownToggle/MixinDropdownToggle.vue +53 -0
- package/src/components/MixinFancybox/MixinFancybox.vue +405 -0
- package/src/components/MixinFancybox/MixinFancyboxOpenButton.vue +35 -0
- package/src/components/MixinVideoBg/MixinVideoBg.stories.js +23 -0
- package/src/components/MixinVideoBg/MixinVideoBg.vue +39 -0
- package/src/components/NavDesktop/NavDesktop.stories.js +254 -0
- package/src/components/NavDesktop/NavDesktop.vue +355 -0
- package/src/components/NavDesktop/NavDesktopDropdown.vue +201 -0
- package/src/components/NavDesktop/NavDesktopDropdownContent.vue +87 -0
- package/src/components/NavDesktop/NavDesktopDropdownMore.vue +112 -0
- package/src/components/NavDesktop/NavDesktopTopHat.vue +56 -0
- package/src/components/NavHeading/NavHeading.stories.js +23 -0
- package/src/components/NavHeading/NavHeading.vue +40 -0
- package/src/components/NavHighlight/NavHighlight.stories.js +42 -0
- package/src/components/NavHighlight/NavHighlight.vue +67 -0
- package/src/components/NavLinkList/NavLinkList.stories.js +46 -0
- package/src/components/NavLinkList/NavLinkList.vue +66 -0
- package/src/components/NavLogoLinks/NavLogoLinks.stories.js +22 -0
- package/src/components/NavLogoLinks/NavLogoLinks.vue +57 -0
- package/src/components/NavMobile/NavMobile.stories.js +231 -0
- package/src/components/NavMobile/NavMobile.vue +280 -0
- package/src/components/NavMobile/NavMobileDropdown.vue +175 -0
- package/src/components/NavMobile/NavMobileLink.vue +69 -0
- package/src/components/NavMobile/NavMobileSecondaryDropdown.vue +124 -0
- package/src/components/NavSearchForm/NavSearchForm.stories.js +13 -0
- package/src/components/NavSearchForm/NavSearchForm.vue +102 -0
- package/src/components/NavSecondary/NavSecondary.stories.js +24 -0
- package/src/components/NavSecondary/NavSecondary.vue +191 -0
- package/src/components/NavSecondary/NavSecondaryDropdown.vue +181 -0
- package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +140 -0
- package/src/components/NavSecondary/NavSecondaryLink.vue +62 -0
- package/src/components/NavSocial/NavSocial.stories.js +20 -0
- package/src/components/NavSocial/NavSocial.vue +97 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +60 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.test.js +30 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +73 -0
- package/src/components/ParallaxContainer/ParallaxContainer.stories.js +47 -0
- package/src/components/ParallaxContainer/ParallaxContainer.vue +76 -0
- package/src/components/ParallaxElement/ParallaxElement.vue +25 -0
- package/src/components/PastEventsCarousel/PastEventsCarousel.vue +86 -0
- package/src/components/PodcastEpisodeCard/PodcastEpisodeCard.vue +251 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.stories.js +235 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +171 -0
- package/src/components/ProfileDetailSectionGroup/ProfileDetailSectionGroup.vue +84 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +97 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.test.js +21 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.vue +217 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStatsMini.vue +182 -0
- package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +59 -0
- package/src/components/SearchFilterGroup/SearchFilterGroup.vue +221 -0
- package/src/components/SearchInput/SearchInput.stories.js +35 -0
- package/src/components/SearchInput/SearchInput.vue +93 -0
- package/src/components/SearchPagination/SearchPagination.stories.js +55 -0
- package/src/components/SearchPagination/SearchPagination.vue +173 -0
- package/src/components/SearchResultCard/SearchResultCard.stories.js +57 -0
- package/src/components/SearchResultCard/SearchResultCard.vue +282 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +70 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.vue +140 -0
- package/src/components/SearchResultsList/SearchResultsList.vue +183 -0
- package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +25 -0
- package/src/components/SearchSelectMenu/SearchSelectMenu.vue +86 -0
- package/src/components/ShareButtons/ShareButtons.stories.js +16 -0
- package/src/components/ShareButtons/ShareButtons.vue +132 -0
- package/src/components/ShareButtonsEdu/ShareButtonsEdu.stories.js +14 -0
- package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +215 -0
- package/src/components/SkipLink/SkipLink.stories.js +9 -0
- package/src/components/SkipLink/SkipLink.vue +53 -0
- package/src/components/SwimlaneCTA/SwimlaneCTA.stories.mdx +77 -0
- package/src/components/SwimlaneCTA/SwimlaneCTA.vue +281 -0
- package/src/components/TheFooter/TheFooter.stories.js +602 -0
- package/src/components/TheFooter/TheFooter.vue +228 -0
- package/src/components/TheFooter/TheFooterSignUp.vue +61 -0
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +106 -0
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +76 -0
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +93 -0
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue +68 -0
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +38 -0
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +104 -0
- package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.js +84 -0
- package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.vue +112 -0
- package/src/components/TopicDetailMore/TopicDetailMore.stories.js +221 -0
- package/src/components/TopicDetailMore/TopicDetailMore.vue +124 -0
- package/src/components/TopicDetailMore/TopicDetailMoreVisibility.vue +51 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +116 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.vue +130 -0
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.js +34 -0
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +98 -0
- package/src/components/YearTicker/YearTicker.stories.js +37 -0
- package/src/components/YearTicker/YearTicker.vue +132 -0
- package/src/docs/foundation/DynamicTokens.vue +106 -0
- package/src/docs/foundation/FontVariants.vue +80 -0
- package/src/docs/foundation/color.docs.mdx +112 -0
- package/src/docs/foundation/grid.docs.mdx +189 -0
- package/src/docs/foundation/grid.stories.js +263 -0
- package/src/docs/foundation/grid_layouthelpers.docs.mdx +78 -0
- package/src/docs/foundation/grid_layouthelpers.stories.js +53 -0
- package/src/docs/foundation/themes.docs.mdx +71 -0
- package/src/docs/foundation/themes.stories.js +63 -0
- package/src/docs/foundation/typography.docs.mdx +50 -0
- package/src/docs/foundation/typography.stories.js +119 -0
- package/src/interfaces.ts +129 -0
- package/src/main.ts +34 -0
- package/src/store/header.ts +40 -0
- package/src/store/theme.ts +27 -0
- package/src/templates/PageContent/PageContent.stories.js +92 -0
- package/src/templates/PageContent/PageContent.vue +140 -0
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +104 -0
- package/src/templates/PageEventDetail/PageEventDetail.vue +358 -0
- package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +158 -0
- package/src/templates/PageNewsDetail/PageNewsDetail.vue +242 -0
- package/src/templates/edu/PageEduNewsDetail.stories.js +64 -0
- package/src/templates/edu/PageEduNewsDetail.vue +155 -0
- package/src/templates/www/HomePage/HomePage.vue +30 -0
- package/src/utils/dayjs.js +32 -0
- package/src/utils/filters.js +33 -0
- package/src/utils/mixins.ts +353 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +24 -0
- package/tsconfig.json +29 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +55 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { HomepageCarouselItemData } from './../HomepageCarouselItem/HomepageCarouselItem.stories'
|
|
2
|
+
import HomepageCarousel from './HomepageCarousel.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'WWW/Homepage/HomepageCarousel',
|
|
6
|
+
component: HomepageCarousel,
|
|
7
|
+
excludeStories: /.*Data$/,
|
|
8
|
+
parameters: {
|
|
9
|
+
viewMode: 'canvas'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const HomepageCarouselData = [
|
|
14
|
+
{
|
|
15
|
+
...HomepageCarouselItemData.item,
|
|
16
|
+
externalLink: null,
|
|
17
|
+
video: null,
|
|
18
|
+
slideTitle: '1. NASA’s Perseverance Rover on Target to Land About 12:55 p.m. PST Today'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
...HomepageCarouselItemData.item,
|
|
22
|
+
page: {},
|
|
23
|
+
slideTitle: '2. Another carousel slide item for homepage'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
...HomepageCarouselItemData.item,
|
|
27
|
+
externalLink: null,
|
|
28
|
+
video: null,
|
|
29
|
+
slideTitle: '3. Lorem ipsum dolor sit amet consectatur'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
...HomepageCarouselItemData.item,
|
|
33
|
+
page: {},
|
|
34
|
+
video: null,
|
|
35
|
+
slideTitle: '4. Etiam posuere posuere auctor'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
...HomepageCarouselItemData.item,
|
|
39
|
+
externalLink: null,
|
|
40
|
+
video: null,
|
|
41
|
+
slideTitle: '5. Donec ultricies faucibus erat pellentesque'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
...HomepageCarouselItemData.item,
|
|
45
|
+
page: {},
|
|
46
|
+
video: null,
|
|
47
|
+
slideTitle: '6. Praesent tristique ligula nisi, ut ornare'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
...HomepageCarouselItemData.item,
|
|
51
|
+
externalLink: null,
|
|
52
|
+
video: null,
|
|
53
|
+
slideTitle: '7. Sed a ullamcorper ex, in laoreet'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
...HomepageCarouselItemData.item,
|
|
57
|
+
page: {},
|
|
58
|
+
video: null,
|
|
59
|
+
slideTitle: '8. Morbi ac sem et elit iaculis gravida'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
...HomepageCarouselItemData.item,
|
|
63
|
+
page: {},
|
|
64
|
+
video: null,
|
|
65
|
+
slideTitle: '9. This is the second to last slide'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
...HomepageCarouselItemData.item,
|
|
69
|
+
page: {},
|
|
70
|
+
video: null,
|
|
71
|
+
slideTitle: '10. This is the very last slide'
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
// replicate shuffle from pages/index.vue
|
|
76
|
+
const HomepageCarouselShuffledData = () => {
|
|
77
|
+
const items = [...HomepageCarouselData]
|
|
78
|
+
for (let i = items.length - 1; i > 0; i--) {
|
|
79
|
+
const j = Math.floor(Math.random() * (i + 1))
|
|
80
|
+
;[items[i], items[j]] = [items[j], items[i]]
|
|
81
|
+
}
|
|
82
|
+
return items
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// stories
|
|
86
|
+
export const Carousel = {
|
|
87
|
+
args: {
|
|
88
|
+
items: HomepageCarouselData,
|
|
89
|
+
duration: 10000
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export const Shuffled = {
|
|
93
|
+
name: 'Carousel with shuffled items',
|
|
94
|
+
args: {
|
|
95
|
+
items: HomepageCarouselShuffledData(),
|
|
96
|
+
duration: 10000
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export const OneSlide = {
|
|
100
|
+
name: 'Carousel with one slide',
|
|
101
|
+
args: {
|
|
102
|
+
items: [HomepageCarouselData[0]],
|
|
103
|
+
duration: 10000
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export const FewSlides = {
|
|
107
|
+
name: 'Carousel with few slides',
|
|
108
|
+
args: {
|
|
109
|
+
items: HomepageCarouselData.slice(0, 3),
|
|
110
|
+
duration: 5000
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="items"
|
|
4
|
+
class="HomepageCarousel max-w-screen-3xl mx-auto"
|
|
5
|
+
>
|
|
6
|
+
<!-- standalone "nav" just for screen readers -->
|
|
7
|
+
<nav
|
|
8
|
+
aria-label="Features"
|
|
9
|
+
class="sr-only"
|
|
10
|
+
>
|
|
11
|
+
<ul>
|
|
12
|
+
<li
|
|
13
|
+
v-for="(item, index) in items"
|
|
14
|
+
:key="index"
|
|
15
|
+
>
|
|
16
|
+
<BaseLink
|
|
17
|
+
variant="none"
|
|
18
|
+
:href="item.externalLink ? item.externalLink : undefined"
|
|
19
|
+
:to="item.page && item.page.url && !item.externalLink ? item.page.url : undefined"
|
|
20
|
+
>
|
|
21
|
+
{{ item.slideTitle }}
|
|
22
|
+
</BaseLink>
|
|
23
|
+
</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</nav>
|
|
26
|
+
<div
|
|
27
|
+
class="relative w-full overflow-hidden"
|
|
28
|
+
role="presentation"
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
ref="HomepageCarouselSlider"
|
|
32
|
+
class="HomepageCarouselSlider swiper"
|
|
33
|
+
>
|
|
34
|
+
<div class="swiper-wrapper">
|
|
35
|
+
<HomepageCarouselItem
|
|
36
|
+
v-for="(item, index) in items"
|
|
37
|
+
:key="index"
|
|
38
|
+
:item="item"
|
|
39
|
+
class="swiper-slide"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
<!-- mobile pagination -->
|
|
43
|
+
<div
|
|
44
|
+
v-if="!onlyOneSlide"
|
|
45
|
+
class="lg:hidden pb-14 absolute bottom-0 w-full"
|
|
46
|
+
>
|
|
47
|
+
<div class="swiper-pagination container">
|
|
48
|
+
<!-- Render before swiper initializes and replaces content to prevent content shifting -->
|
|
49
|
+
<template
|
|
50
|
+
v-for="(_item, index) in items"
|
|
51
|
+
:key="index"
|
|
52
|
+
>
|
|
53
|
+
<span
|
|
54
|
+
:class="`swiper-pagination-bullet${
|
|
55
|
+
index === 0 ? ' swiper-pagination-bullet-active' : ''
|
|
56
|
+
}`"
|
|
57
|
+
></span>
|
|
58
|
+
</template>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<!-- progress bar and navigation -->
|
|
62
|
+
<div
|
|
63
|
+
v-if="!onlyOneSlide"
|
|
64
|
+
class="lg:block text-contrast absolute inset-x-0 bottom-0 z-10 hidden text-left text-white bg-black bg-opacity-50"
|
|
65
|
+
>
|
|
66
|
+
<!-- progress bar -->
|
|
67
|
+
<div class="h-2px w-full bg-transparent">
|
|
68
|
+
<transition name="load">
|
|
69
|
+
<div
|
|
70
|
+
v-if="slideLoaded"
|
|
71
|
+
class="h-2px w-full bg-white bg-opacity-50 -translate-x-full"
|
|
72
|
+
:style="`transition-duration: ${duration}ms`"
|
|
73
|
+
></div>
|
|
74
|
+
</transition>
|
|
75
|
+
</div>
|
|
76
|
+
<!-- tabbed navigation -->
|
|
77
|
+
<div class="HomepageCarouselTabs relative container overflow-hidden mx-auto pt-5 pb-22">
|
|
78
|
+
<!-- offset by one tab to allow for previous slide transitions -->
|
|
79
|
+
<div class="w-full -translate-x-1/5">
|
|
80
|
+
<!-- tab container width adjusts automatically according to slide count when there are less than 6 slides -->
|
|
81
|
+
<div :class="tabContainerWidthClass">
|
|
82
|
+
<!-- translate amount depends on tab container width, so the class is applied dynamically -->
|
|
83
|
+
<div
|
|
84
|
+
class="flex flex-nowrap"
|
|
85
|
+
:class="tabTranslateClass"
|
|
86
|
+
>
|
|
87
|
+
<BaseLink
|
|
88
|
+
v-for="(item, index) in tabbedItems"
|
|
89
|
+
:key="index"
|
|
90
|
+
variant="none"
|
|
91
|
+
:href="item.externalLink ? item.externalLink : undefined"
|
|
92
|
+
:to="
|
|
93
|
+
item.page && item.page.url && !item.externalLink ? item.page.url : undefined
|
|
94
|
+
"
|
|
95
|
+
external-target-blank
|
|
96
|
+
class="pr-5 flex-shrink-0 h-auto translate-x-0"
|
|
97
|
+
:class="tabWidthClass"
|
|
98
|
+
link-class="
|
|
99
|
+
group
|
|
100
|
+
border-opacity-30 border-r border-white
|
|
101
|
+
can-hover:hover:text-white
|
|
102
|
+
can-hover:hover:text-opacity-100
|
|
103
|
+
flex
|
|
104
|
+
items-start
|
|
105
|
+
h-full
|
|
106
|
+
px-5
|
|
107
|
+
-ml-5
|
|
108
|
+
font-semibold
|
|
109
|
+
text-base text-left text-white text-opacity-75
|
|
110
|
+
transition-all duration-200 ease-in"
|
|
111
|
+
>
|
|
112
|
+
<span>
|
|
113
|
+
{{ item.slideTitle }}
|
|
114
|
+
</span>
|
|
115
|
+
</BaseLink>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
|
+
<script lang="ts">
|
|
126
|
+
import { defineComponent } from 'vue'
|
|
127
|
+
import type { PropType } from 'vue'
|
|
128
|
+
import type { Slide } from './../HomepageCarouselItem/HomepageCarouselItem.vue'
|
|
129
|
+
import { mixinTransparentHeader } from '../../utils/mixins'
|
|
130
|
+
import Swiper from 'swiper'
|
|
131
|
+
import { A11y, Pagination, EffectFade, Autoplay } from 'swiper/modules'
|
|
132
|
+
import type { SwiperOptions } from 'swiper/types'
|
|
133
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
134
|
+
import HomepageCarouselItem from './../HomepageCarouselItem/HomepageCarouselItem.vue'
|
|
135
|
+
|
|
136
|
+
Swiper.use([Pagination, A11y, EffectFade, Autoplay])
|
|
137
|
+
|
|
138
|
+
export default defineComponent({
|
|
139
|
+
name: 'HomepageCarousel',
|
|
140
|
+
components: {
|
|
141
|
+
BaseLink,
|
|
142
|
+
HomepageCarouselItem
|
|
143
|
+
},
|
|
144
|
+
props: {
|
|
145
|
+
items: {
|
|
146
|
+
type: Array as PropType<Slide[]>,
|
|
147
|
+
required: false
|
|
148
|
+
},
|
|
149
|
+
duration: {
|
|
150
|
+
type: Number,
|
|
151
|
+
default: 5000
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
data(): {
|
|
155
|
+
slideLoaded: boolean
|
|
156
|
+
slider: Swiper | null
|
|
157
|
+
sliderOptions: SwiperOptions
|
|
158
|
+
tabbedItems: Slide[] | undefined
|
|
159
|
+
slideToNext: Boolean
|
|
160
|
+
} {
|
|
161
|
+
return {
|
|
162
|
+
slideLoaded: false,
|
|
163
|
+
slider: null,
|
|
164
|
+
sliderOptions: {
|
|
165
|
+
effect: 'fade',
|
|
166
|
+
slidesPerView: 1,
|
|
167
|
+
speed: 500, // transition speed
|
|
168
|
+
threshold: 20, // swipe threshold in px
|
|
169
|
+
followFinger: false, // disables partial transitions when dragging
|
|
170
|
+
longSwipesRatio: 0.01, // adjusts sensitivity for click and drag
|
|
171
|
+
autoplay: {
|
|
172
|
+
delay: this.duration,
|
|
173
|
+
disableOnInteraction: false
|
|
174
|
+
},
|
|
175
|
+
loop: true,
|
|
176
|
+
pagination: {
|
|
177
|
+
el: '.swiper-pagination',
|
|
178
|
+
clickable: true
|
|
179
|
+
},
|
|
180
|
+
lazyPreloadPrevNext: 1,
|
|
181
|
+
on: {
|
|
182
|
+
transitionStart: () => {
|
|
183
|
+
;(this as any).slideLoaded = false
|
|
184
|
+
},
|
|
185
|
+
transitionEnd: () => {
|
|
186
|
+
;(this as any).slideLoaded = true
|
|
187
|
+
;(this as any).slideToNext = true
|
|
188
|
+
;(this as any).updateTabbedItems()
|
|
189
|
+
},
|
|
190
|
+
sliderMove: (swiper: Swiper) => {
|
|
191
|
+
if (swiper.touches.diff > 0) {
|
|
192
|
+
;(this as any).slideToNext = false
|
|
193
|
+
} else {
|
|
194
|
+
;(this as any).slideToNext = true
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
slideChange: (swiper: Swiper) => {
|
|
198
|
+
;(this as any).videoHandler(swiper)
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
tabbedItems: undefined,
|
|
203
|
+
slideToNext: true
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
computed: {
|
|
207
|
+
theIndex(): number | false {
|
|
208
|
+
if (this.slider) {
|
|
209
|
+
return this.slider.realIndex
|
|
210
|
+
}
|
|
211
|
+
return false
|
|
212
|
+
},
|
|
213
|
+
onlyOneSlide(): boolean {
|
|
214
|
+
return this.items?.length === 1
|
|
215
|
+
},
|
|
216
|
+
loopedTabs(): Array<Slide> {
|
|
217
|
+
// return a looped array starting at the active slide
|
|
218
|
+
const items = this.items
|
|
219
|
+
// offset by one to avoid slice(0,0) in reorderedItems
|
|
220
|
+
const index: number = this.theIndex ? this.theIndex + 1 : 1
|
|
221
|
+
if (index && items) {
|
|
222
|
+
const reorderedItems = [...items.slice(index - 1), ...items.slice(0, index)]
|
|
223
|
+
return reorderedItems
|
|
224
|
+
}
|
|
225
|
+
return this.items as Array<Slide>
|
|
226
|
+
},
|
|
227
|
+
tabContainerWidthClass(): string {
|
|
228
|
+
/* corresponds with how many tabs will appear in the container
|
|
229
|
+
* visible tabs = number of slides - 1; (active tab is not visible), maximum of 5
|
|
230
|
+
* container width = visible tabs/5 + 'w-1/5'; to account for offset that allows for previous tab transition
|
|
231
|
+
* simplified = number of slides/5
|
|
232
|
+
*/
|
|
233
|
+
if (this.items?.length === 2) {
|
|
234
|
+
return 'overflow-hidden w-2/5'
|
|
235
|
+
} else if (this.items?.length === 3) {
|
|
236
|
+
return 'overflow-hidden w-3/5'
|
|
237
|
+
} else if (this.items?.length === 4) {
|
|
238
|
+
return 'overflow-hidden w-4/5'
|
|
239
|
+
} else if (this.items?.length === 5) {
|
|
240
|
+
return 'overflow-hidden container'
|
|
241
|
+
}
|
|
242
|
+
return 'overflow-visible container'
|
|
243
|
+
},
|
|
244
|
+
tabWidthClass(): string {
|
|
245
|
+
if (this.items?.length === 2) {
|
|
246
|
+
return 'w-1/2'
|
|
247
|
+
} else if (this.items?.length === 3) {
|
|
248
|
+
return 'w-1/3'
|
|
249
|
+
} else if (this.items?.length === 4) {
|
|
250
|
+
return 'w-1/4'
|
|
251
|
+
} else if (this.items?.length === 5) {
|
|
252
|
+
return 'w-1/5'
|
|
253
|
+
}
|
|
254
|
+
return 'w-1/5'
|
|
255
|
+
},
|
|
256
|
+
tabTranslateClass(): string {
|
|
257
|
+
let computedClass = ''
|
|
258
|
+
if (this.slideToNext) {
|
|
259
|
+
if (this.items?.length === 2) {
|
|
260
|
+
computedClass = '-translate-x-1/2'
|
|
261
|
+
} else if (this.items?.length === 3) {
|
|
262
|
+
computedClass = '-translate-x-1/3'
|
|
263
|
+
} else if (this.items?.length === 4) {
|
|
264
|
+
computedClass = '-translate-x-1/4'
|
|
265
|
+
} else {
|
|
266
|
+
computedClass = '-translate-x-1/5'
|
|
267
|
+
}
|
|
268
|
+
} else if (!this.slideToNext) {
|
|
269
|
+
if (this.items?.length === 2) {
|
|
270
|
+
computedClass = 'translate-x-1/2'
|
|
271
|
+
} else if (this.items?.length === 3) {
|
|
272
|
+
computedClass = 'translate-x-1/3'
|
|
273
|
+
} else if (this.items?.length === 4) {
|
|
274
|
+
computedClass = 'translate-x-1/4'
|
|
275
|
+
} else {
|
|
276
|
+
computedClass = 'translate-x-1/5'
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (!this.slideLoaded) {
|
|
280
|
+
computedClass += ' transform transition-transform duration-500'
|
|
281
|
+
}
|
|
282
|
+
return computedClass
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
mounted() {
|
|
286
|
+
mixinTransparentHeader()
|
|
287
|
+
this.init()
|
|
288
|
+
},
|
|
289
|
+
methods: {
|
|
290
|
+
init() {
|
|
291
|
+
// initializes the sliders with different settings depending on slideshow length
|
|
292
|
+
if (this.onlyOneSlide) {
|
|
293
|
+
// only one slide, no need to loop or autoplay
|
|
294
|
+
this.slider = new Swiper(this.$refs.HomepageCarouselSlider as HTMLElement, {
|
|
295
|
+
...this.sliderOptions,
|
|
296
|
+
loop: false,
|
|
297
|
+
autoplay: false
|
|
298
|
+
})
|
|
299
|
+
} else {
|
|
300
|
+
this.slider = new Swiper(
|
|
301
|
+
this.$refs.HomepageCarouselSlider as HTMLElement,
|
|
302
|
+
this.sliderOptions
|
|
303
|
+
)
|
|
304
|
+
}
|
|
305
|
+
this.updateTabbedItems()
|
|
306
|
+
this.slideLoaded = true
|
|
307
|
+
this.videoHandler(this.slider)
|
|
308
|
+
},
|
|
309
|
+
updateTabbedItems() {
|
|
310
|
+
this.tabbedItems = this.loopedTabs
|
|
311
|
+
},
|
|
312
|
+
videoHandler(swiper: Swiper) {
|
|
313
|
+
const indexCurrentSlide = swiper.activeIndex
|
|
314
|
+
const currentVideo = this.getVideo(indexCurrentSlide, swiper)
|
|
315
|
+
// make sure video starts at the beginning once in view
|
|
316
|
+
if (currentVideo) {
|
|
317
|
+
currentVideo.autoplay = true
|
|
318
|
+
currentVideo.load()
|
|
319
|
+
}
|
|
320
|
+
// pause video playback when no longer the active slide
|
|
321
|
+
if (swiper.previousIndex) {
|
|
322
|
+
const indexPreviousSlide = swiper.previousIndex
|
|
323
|
+
const previousVideo = this.getVideo(indexPreviousSlide, swiper)
|
|
324
|
+
if (previousVideo) {
|
|
325
|
+
previousVideo.pause()
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
// factory function to retrieve the video element from a slide
|
|
330
|
+
getVideo(index: number, swiper: Swiper): HTMLVideoElement | null {
|
|
331
|
+
const slide = swiper.slides[index] as HTMLElement
|
|
332
|
+
if (slide) {
|
|
333
|
+
const video = slide.getElementsByTagName('video')
|
|
334
|
+
if (video.length) {
|
|
335
|
+
return video[0]
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return null
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
})
|
|
342
|
+
</script>
|
|
343
|
+
<style lang="scss">
|
|
344
|
+
@import 'swiper/swiper-bundle.css';
|
|
345
|
+
|
|
346
|
+
.HomepageCarousel {
|
|
347
|
+
.HomepageCarouselSlider {
|
|
348
|
+
.swiper-pagination {
|
|
349
|
+
@apply relative text-left mx-auto pl-3;
|
|
350
|
+
|
|
351
|
+
span {
|
|
352
|
+
@apply py-2 pl-1 pr-2 h-auto w-auto bg-transparent m-0 opacity-100;
|
|
353
|
+
|
|
354
|
+
&::before {
|
|
355
|
+
content: '';
|
|
356
|
+
width: 0.65rem;
|
|
357
|
+
height: 0.65rem;
|
|
358
|
+
@apply block rounded-full bg-white bg-opacity-40;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
&.swiper-pagination-bullet-active {
|
|
362
|
+
&::before {
|
|
363
|
+
@apply bg-jpl-red;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.load-enter-active {
|
|
371
|
+
transition: transform 500ms linear;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.load-leave-active {
|
|
375
|
+
transition: none;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.load-enter-to {
|
|
379
|
+
@apply translate-x-0;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BaseVideoData } from './../BaseVideo/BaseVideo.stories'
|
|
2
|
+
import HomepageCarouselItem from './HomepageCarouselItem.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'WWW/Homepage/HomepageCarousel/HomepageCarouselItem',
|
|
6
|
+
component: HomepageCarouselItem,
|
|
7
|
+
decorators: [
|
|
8
|
+
() => ({
|
|
9
|
+
template: `<div id="storyDecorator" class="max-w-screen-3xl mx-auto"><story/></div>`
|
|
10
|
+
})
|
|
11
|
+
],
|
|
12
|
+
parameters: {
|
|
13
|
+
html: {
|
|
14
|
+
root: '#storyDecorator'
|
|
15
|
+
},
|
|
16
|
+
viewMode: 'canvas'
|
|
17
|
+
},
|
|
18
|
+
excludeStories: /.*Data$/
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// data
|
|
22
|
+
export const HomepageCarouselItemData = {
|
|
23
|
+
item: {
|
|
24
|
+
heading: 'DARE MIGHTY THINGS',
|
|
25
|
+
page: {
|
|
26
|
+
url: '/news/new-maps-open-roads-to-research/'
|
|
27
|
+
},
|
|
28
|
+
externalLink: 'https://mars.nasa.gov',
|
|
29
|
+
slideTitle: 'Creating Robots to go Where Humans Can’t',
|
|
30
|
+
video: BaseVideoData,
|
|
31
|
+
image: {
|
|
32
|
+
src: {
|
|
33
|
+
url: 'https://picsum.photos/id/973/1800/1200',
|
|
34
|
+
width: 1800,
|
|
35
|
+
height: 1200
|
|
36
|
+
},
|
|
37
|
+
srcSet:
|
|
38
|
+
'https://picsum.photos/id/865/768/548 768w, https://picsum.photos/id/865/1024/684 1024w, https://picsum.photos/id/865/1440/770 1440w, https://picsum.photos/id/865/1800/963 1800w',
|
|
39
|
+
screenMd: {
|
|
40
|
+
url: 'https://picsum.photos/id/921/800/640'
|
|
41
|
+
},
|
|
42
|
+
screenSm: {
|
|
43
|
+
url: 'https://picsum.photos/id/247/640/900'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const SingleItem = {
|
|
50
|
+
args: {
|
|
51
|
+
item: {
|
|
52
|
+
...HomepageCarouselItemData.item,
|
|
53
|
+
video: null
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const WithVideo = {
|
|
59
|
+
args: HomepageCarouselItemData
|
|
60
|
+
}
|