From 516082915974dd4b91f661d2d525f6cff6916da8 Mon Sep 17 00:00:00 2001 From: Stephanie Smith Date: Thu, 3 Oct 2024 15:45:59 -0700 Subject: [PATCH 1/2] adding support for NavSecondary on EDU Collections template --- .../PageEduCollectionsDetail.stories.js | 37 +++++++++++++++++++ .../PageEduCollectionsDetail.vue | 21 ++++++++--- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js b/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js index 9de31a59..f261d154 100644 --- a/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js +++ b/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js @@ -1,6 +1,7 @@ import { BlockRelatedLinksData } from './../../../components/BlockRelatedLinks/BlockRelatedLinks.stories.js' import { BlockLinkCardCarouselData } from './../../../components/BlockLinkCarousel/BlockLinkCarousel.stories.js' import { BlockStreamfieldMinimalData } from './../../../components/BlockStreamfield/BlockStreamfield.stories' +import { NavSecondaryData } from './../../../components/NavSecondary/NavSecondary.stories.js' import PageEduCollectionsDetail from './PageEduCollectionsDetail.vue' export default { @@ -102,3 +103,39 @@ export const NoMetaPanel = { } } } + +export const NoHero = { + args: { + data: { + ...BaseStory.args.data, + heroImage: undefined + } + } +} + +export const SecondaryNav = { + args: { + data: { + ...BaseStory.args.data, + breadcrumb: NavSecondaryData.breadcrumb + } + } +} +export const SecondaryNavHeroInline = { + args: { + data: { + ...BaseStory.args.data, + breadcrumb: NavSecondaryData.breadcrumb, + heroPosition: 'inline' + } + } +} +export const SecondaryNavNoHero = { + args: { + data: { + ...BaseStory.args.data, + breadcrumb: NavSecondaryData.breadcrumb, + heroImage: undefined + } + } +} diff --git a/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue b/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue index e7d5b2ae..739c99a8 100644 --- a/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue +++ b/packages/vue/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.vue @@ -9,6 +9,7 @@ import BlockStreamfield from './../../../components/BlockStreamfield/BlockStream import BlockRelatedLinks from '../../../components/BlockRelatedLinks/BlockRelatedLinks.vue' import HeroLarge from './../../../components/HeroLarge/HeroLarge.vue' import NavJumpMenu from './../../../components/NavJumpMenu/NavJumpMenu.vue' +import NavSecondary from './../../../components/NavSecondary/NavSecondary.vue' import MetaPanel from '../../../components/MetaPanel/MetaPanel.vue' import ShareButtonsEdu from '../../../components/ShareButtonsEdu/ShareButtonsEdu.vue' @@ -39,9 +40,9 @@ const heroInline = computed((): boolean => { }) const computedClass = computed((): string => { - if (heroInline.value || !data?.heroImage) { + if ((heroInline.value || !data?.heroImage) && !data?.breadcrumb) { return 'pt-5 lg:pt-12' - } else if (!heroInline.value) { + } else if (!heroInline.value || data?.breadcrumb) { return '-nav-offset' } return '' @@ -63,8 +64,16 @@ const computedClass = computed((): string => { :class="!data.showMetaPanel ? 'mb-10' : ''" /> + + + { :primary-subject="data.primarySubject" :additional-subjects="data.additionalSubjects" :grade-levels="data.gradeLevels" - :negative-top="!heroInline" - :negative-bottom="heroInline" + :negative-top="!heroInline && !data.breadcrumb && data.heroImage ? true : false" + :negative-bottom="heroInline && !data.breadcrumb" /> @@ -115,7 +124,7 @@ const computedClass = computed((): string => { Date: Mon, 7 Oct 2024 10:22:53 -0700 Subject: [PATCH 2/2] fixing width of jump menu --- packages/vue/src/components/NavSecondary/NavSecondary.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue/src/components/NavSecondary/NavSecondary.vue b/packages/vue/src/components/NavSecondary/NavSecondary.vue index 573674b7..fd8f90ce 100644 --- a/packages/vue/src/components/NavSecondary/NavSecondary.vue +++ b/packages/vue/src/components/NavSecondary/NavSecondary.vue @@ -10,7 +10,7 @@ }" >