From 83e8262667763335f3e73ee9a98dedc0b6eae46c Mon Sep 17 00:00:00 2001 From: Stephanie Smith Date: Thu, 18 Jul 2024 12:22:34 -0700 Subject: [PATCH] Feature: EDU header and footer (#497) * adding edu main navigation desktop and mobile * showing social icons in defaultTheme NavMobile only * minor cleanup * edu modifications to TheFooter * removing unneeded stories * adding edu social links to footer * updating a header in the edu footer * minor cleanup * removing iniline test --- apps/vue-storybook/package.json | 2 +- packages/common/tailwind.colors.ts | 24 +- packages/vue/lib/main.ts | 4 +- .../NavDesktop/NavDesktopDropdown.vue | 20 +- .../NavDesktop/NavDesktopDropdownContent.vue | 2 +- .../NavDesktopEdu/NavDesktopEdu.stories.js | 186 +++++++++++ .../NavDesktopEdu/NavDesktopEdu.vue | 315 ++++++++++++++++++ .../NavDropdownToggle.vue} | 4 +- .../src/components/NavHeading/NavHeading.vue | 4 +- .../NavLogoLinks/NavLogoLinks.stories.js | 5 +- .../components/NavLogoLinks/NavLogoLinks.vue | 1 - .../src/components/NavMobile/NavMobile.vue | 55 ++- .../NavMobile/NavMobileDropdown.vue | 8 +- .../NavMobile/NavMobileEdu.stories.js | 174 ++++++++++ .../NavMobile/NavMobileSecondaryDropdown.vue | 10 +- .../NavSecondary/NavSecondaryDropdown.vue | 10 +- .../src/components/NavSocial/NavSocial.vue | 112 ++++--- .../src/components/TheFooter/TheFooter.vue | 46 ++- .../docs/overviews/global_headers.docs.mdx | 8 + .../edu/PageEduNewsDetail.stories.js | 5 + .../src/templates/edu/PageEduNewsDetail.vue | 2 +- 21 files changed, 881 insertions(+), 116 deletions(-) create mode 100644 packages/vue/src/components/NavDesktopEdu/NavDesktopEdu.stories.js create mode 100644 packages/vue/src/components/NavDesktopEdu/NavDesktopEdu.vue rename packages/vue/src/components/{MixinDropdownToggle/MixinDropdownToggle.vue => NavDropdownToggle/NavDropdownToggle.vue} (92%) create mode 100644 packages/vue/src/components/NavMobile/NavMobileEdu.stories.js diff --git a/apps/vue-storybook/package.json b/apps/vue-storybook/package.json index 8b750405..041140e7 100644 --- a/apps/vue-storybook/package.json +++ b/apps/vue-storybook/package.json @@ -17,7 +17,7 @@ "prepare": "pnpm prepare:public && pnpm prepare:fontcss", "prepare:public": "cp -R ./node_modules/@explorer-1/common/src/public/explorer-1/ ./public/explorer-1", "prepare:fontcss": "cp ./node_modules/@explorer-1/common/src/scss/_fonts.scss ./public/css/font-face.css", - "storybook": "storybook dev -c .storybook -p 6006 --ci --force-build-preview", + "storybook": "storybook dev -c .storybook -p 6006 --ci", "build": "storybook build -c .storybook -o storybook_compiled NODE_ENV='production'", "percy": "percy storybook http://localhost:6006", "percy:dry-run": "percy storybook http://localhost:6006 --dry-run", diff --git a/packages/common/tailwind.colors.ts b/packages/common/tailwind.colors.ts index 412a8df7..99fa2209 100644 --- a/packages/common/tailwind.colors.ts +++ b/packages/common/tailwind.colors.ts @@ -140,16 +140,19 @@ export const socialColors = { // custom css vars export const themeVariantColors = { primary: 'var(--color-primary)', + 'primary-lighter': 'var(--color-primary-lighter)', 'primary-light': 'var(--color-primary-light)', 'primary-dark': 'var(--color-primary-dark)', 'primary-darker': 'var(--color-primary-darker)', 'primary-hover': 'var(--color-primary-dark)', secondary: 'var(--color-secondary)', + 'secondary-lighter': 'var(--color-secondary-lighter)', 'secondary-light': 'var(--color-secondary-light)', 'secondary-dark': 'var(--color-secondary-dark)', 'secondary-darker': 'var(--color-secondary-darker)', 'secondary-hover': 'var(--color-secondary-dark)', action: 'var(--color-action)', + 'action-lighter': 'var(--color-action-lighter)', 'action-light': 'var(--color-action-light)', 'action-dark': 'var(--color-action-dark)', 'action-darker': 'var(--color-action-darker)', @@ -160,44 +163,53 @@ export const themeVariantColors = { export const ThemeWww = { default: { '--color-primary': foundationColors['jpl-red'], + '--color-primary-lighter': foundationColors['jpl-red-lighter'], '--color-primary-light': foundationColors['jpl-red-light'], '--color-primary-dark': foundationColors['jpl-red-dark'], '--color-primary-darker': foundationColors['jpl-red-darker'], '--color-secondary': 'var(--color-primary)', + '--color-secondary-lighter': 'var(--color-primary-lighter)', '--color-secondary-light': 'var(--color-primary-light)', '--color-secondary-dark': 'var(--color-primary-dark)', '--color-secondary-darker': 'var(--color-primary-darker)', '--color-action': 'var(--color-primary)', + '--color-action-lighter': 'var(--color-primary-lighter)', '--color-action-light': 'var(--color-primary-light)', '--color-action-dark': 'var(--color-primary-dark)', '--color-action-darker': 'var(--color-primary-darker)' }, dark: { '--color-primary': foundationColors['jpl-red-light'], + '--color-primary-lighter': foundationColors['jpl-red-lighter'], '--color-primary-light': foundationColors['jpl-red-light'], '--color-primary-dark': foundationColors['jpl-red'], '--color-primary-darker': foundationColors['jpl-red-dark'], '--color-secondary': 'var(--color-primary)', + '--color-secondary-lighter': 'var(--color-primary-lighter)', '--color-secondary-light': 'var(--color-primary-light)', '--color-secondary-dark': 'var(--color-primary-dark)', '--color-secondary-darker': 'var(--color-primary-darker)', '--color-action': 'var(--color-primary)', + '--color-action-lighter': 'var(--color-primary-lighter)', '--color-action-light': 'var(--color-primary-light)', '--color-action-dark': 'var(--color-primary-dark)', '--color-action-darker': 'var(--color-primary-darker)' }, gray: { '--color-primary': foundationColors['jpl-red-dark'], + '--color-primary-lighter': foundationColors['jpl-red-light'], '--color-primary-light': foundationColors['jpl-red'], '--color-primary-dark': foundationColors['jpl-red-darker'], '--color-primary-darker': foundationColors['jpl-red-darker'], - '--color-secondary': 'var(--color-primary)', - '--color-secondary-light': 'var(--color-primary-light)', - '--color-secondary-dark': 'var(--color-primary-dark)', + '--color-secondary': 'var(--color-secondary-dark)', + '--color-secondary-lighter': 'var(--color-primary-light)', + '--color-secondary-light': 'var(--color-primary)', + '--color-secondary-dark': 'var(--color-primary-darker)', '--color-secondary-darker': 'var(--color-primary-darker)', - '--color-action': 'var(--color-primary)', - '--color-action-light': 'var(--color-primary-light)', - '--color-action-dark': 'var(--color-primary-dark)', + '--color-action': 'var(--color-action-dark)', + '--color-action-lighter': 'var(--color-action-light)', + '--color-action-light': 'var(--color-action)', + '--color-action-dark': 'var(--color-primary-darker)', '--color-action-darker': 'var(--color-primary-darker)' } } diff --git a/packages/vue/lib/main.ts b/packages/vue/lib/main.ts index bbf3d7a7..fbde193d 100644 --- a/packages/vue/lib/main.ts +++ b/packages/vue/lib/main.ts @@ -161,7 +161,7 @@ import MissionDetailStats from './../src/components/MissionDetailStats/MissionDe import MissionDetailStreamfield from './../src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue' import MixinAnimationCaret from './../src/components/MixinAnimationCaret/MixinAnimationCaret.vue' import MixinCarousel from './../src/components/MixinCarousel/MixinCarousel.vue' -import MixinDropdownToggle from './../src/components/MixinDropdownToggle/MixinDropdownToggle.vue' +import NavDropdownToggle from './../src/components/NavDropdownToggle/NavDropdownToggle.vue' import MixinFancybox from './../src/components/MixinFancybox/MixinFancybox.vue' import MixinVideoBg from './../src/components/MixinVideoBg/MixinVideoBg.vue' import NavDesktop from './../src/components/NavDesktop/NavDesktop.vue' @@ -363,7 +363,7 @@ export { MissionDetailStreamfield, MixinAnimationCaret, MixinCarousel, - MixinDropdownToggle, + NavDropdownToggle, MixinFancybox, MixinVideoBg, NavDesktop, diff --git a/packages/vue/src/components/NavDesktop/NavDesktopDropdown.vue b/packages/vue/src/components/NavDesktop/NavDesktopDropdown.vue index 5849d68d..4c6516a5 100644 --- a/packages/vue/src/components/NavDesktop/NavDesktopDropdown.vue +++ b/packages/vue/src/components/NavDesktop/NavDesktopDropdown.vue @@ -1,6 +1,6 @@