From fc61e30b854017c6d05cefeaecebc4bf55cc9beb Mon Sep 17 00:00:00 2001 From: Anna Artemova Date: Sun, 22 Dec 2024 22:56:27 +0400 Subject: [PATCH 1/9] feat: update navbar --- src/components/shared/burger/burger.jsx | 2 - .../button-github-stars.jsx | 15 +- .../header/dropdown/developers/developers.jsx | 66 ---- .../developers/images/docomentation.png | Bin 60053 -> 0 bytes .../header/dropdown/developers/index.js | 3 - .../shared/header/dropdown/dropdown.jsx | 175 +++++++---- .../shared/header/dropdown/product/index.js | 3 - .../header/dropdown/product/product.jsx | 118 ------- src/components/shared/header/header.jsx | 27 +- src/components/shared/layout/layout.jsx | 2 + src/components/shared/link/link.jsx | 29 +- src/components/shared/mobile-menu/index.js | 4 +- .../shared/mobile-menu/menu-item/index.js | 3 - .../mobile-menu/menu-item/menu-item.jsx | 70 ----- .../shared/mobile-menu/mobile-menu.jsx | 96 +++--- .../shared/mobile-menu/sub-menu/sub-menu.jsx | 131 +++++++- src/components/shared/tablet-menu/index.js | 3 + .../shared/tablet-menu/tablet-menu.jsx | 288 ++++++++++++++++++ src/constants/links.js | 2 +- src/constants/menus.js | 194 ++++++------ src/images/header/api-icon.svg | 19 ++ src/images/header/blog-icon.svg | 9 + src/images/header/channels-icon.svg | 89 +++--- src/images/header/chat-icon.svg | 9 + src/images/header/component-icon.svg | 9 + src/images/header/content-icon.svg | 9 + src/images/header/developer-icon.svg | 19 ++ src/images/header/discord-icon.svg | 9 + src/images/header/docs-icon.svg | 9 + src/images/header/documentation-icon.svg | 41 --- src/images/header/email-icon.svg | 9 + src/images/header/features-icon.svg | 89 +++--- src/images/header/framework-icon.svg | 24 ++ src/images/header/frameworks-icon.svg | 45 --- src/images/header/future-of-novu.jpg | Bin 0 -> 9742 bytes src/images/header/getting-started-icon.svg | 89 +++--- src/images/header/guide-icon.svg | 9 + src/images/header/guides-icon.svg | 45 --- src/images/header/in-app-icon.svg | 9 + src/images/header/join-us-icon.svg | 46 +++ src/images/header/library-icon.svg | 14 + src/images/header/news-icon.svg | 24 ++ src/images/header/notification-how-to.jpg | Bin 0 -> 17049 bytes src/images/header/open-source-icon.svg | 14 + src/images/header/providers-icon.svg | 76 ++--- src/images/header/push-icon.svg | 9 + src/images/header/security-icon.svg | 14 + src/images/header/sms-icon.svg | 9 + src/images/header/subscriber-icon.svg | 9 + src/images/header/team-community-icon.svg | 24 ++ src/images/header/use-cases-icon.svg | 76 ++--- src/images/header/user-icon.svg | 9 + src/images/header/workflow-digest-icon.svg | 9 + src/styles/global.css | 4 + 54 files changed, 1241 insertions(+), 868 deletions(-) delete mode 100644 src/components/shared/header/dropdown/developers/developers.jsx delete mode 100644 src/components/shared/header/dropdown/developers/images/docomentation.png delete mode 100644 src/components/shared/header/dropdown/developers/index.js delete mode 100644 src/components/shared/header/dropdown/product/index.js delete mode 100644 src/components/shared/header/dropdown/product/product.jsx delete mode 100644 src/components/shared/mobile-menu/menu-item/index.js delete mode 100644 src/components/shared/mobile-menu/menu-item/menu-item.jsx create mode 100644 src/components/shared/tablet-menu/index.js create mode 100644 src/components/shared/tablet-menu/tablet-menu.jsx create mode 100644 src/images/header/api-icon.svg create mode 100644 src/images/header/blog-icon.svg create mode 100644 src/images/header/chat-icon.svg create mode 100644 src/images/header/component-icon.svg create mode 100644 src/images/header/content-icon.svg create mode 100644 src/images/header/developer-icon.svg create mode 100644 src/images/header/discord-icon.svg create mode 100644 src/images/header/docs-icon.svg delete mode 100644 src/images/header/documentation-icon.svg create mode 100644 src/images/header/email-icon.svg create mode 100644 src/images/header/framework-icon.svg delete mode 100644 src/images/header/frameworks-icon.svg create mode 100644 src/images/header/future-of-novu.jpg create mode 100644 src/images/header/guide-icon.svg delete mode 100644 src/images/header/guides-icon.svg create mode 100644 src/images/header/in-app-icon.svg create mode 100644 src/images/header/join-us-icon.svg create mode 100644 src/images/header/library-icon.svg create mode 100644 src/images/header/news-icon.svg create mode 100644 src/images/header/notification-how-to.jpg create mode 100644 src/images/header/open-source-icon.svg create mode 100644 src/images/header/push-icon.svg create mode 100644 src/images/header/security-icon.svg create mode 100644 src/images/header/sms-icon.svg create mode 100644 src/images/header/subscriber-icon.svg create mode 100644 src/images/header/team-community-icon.svg create mode 100644 src/images/header/user-icon.svg create mode 100644 src/images/header/workflow-digest-icon.svg diff --git a/src/components/shared/burger/burger.jsx b/src/components/shared/burger/burger.jsx index 808648f5..49eb1eba 100644 --- a/src/components/shared/burger/burger.jsx +++ b/src/components/shared/burger/burger.jsx @@ -34,11 +34,9 @@ const Burger = ({ className: additionalClassName, isToggled, onClick }) => ( variants={{ initial: { display: 'block', - transition: { delay: ANIMATION_DURATION }, }, toggled: { display: 'none', - transition: { delay: ANIMATION_DURATION }, }, }} /> diff --git a/src/components/shared/button-github-stars/button-github-stars.jsx b/src/components/shared/button-github-stars/button-github-stars.jsx index b8a3f7b1..a9678e66 100644 --- a/src/components/shared/button-github-stars/button-github-stars.jsx +++ b/src/components/shared/button-github-stars/button-github-stars.jsx @@ -5,9 +5,10 @@ import React from 'react'; import Button from 'components/shared/button'; import GitHubIcon from 'icons/github.inline.svg'; +// eslint-disable-next-line import/no-named-as-default import buttonClick from 'utils/use-landing-simple-tracking'; -const ButtonGithubStars = ({ className }) => { +const ButtonGithubStars = ({ className, size }) => { const { github: { url, count }, } = useStaticQuery(graphql` @@ -21,7 +22,7 @@ const ButtonGithubStars = ({ className }) => { return ( - - ))} - - {isDropdownOpen && ( - setDropdownOpen(true)} - onMouseLeave={() => { - setDropdownOpen(false); - setActiveElement(null); - }} - > - {dropdownMenuContent.map(({ title, to }, index) => ( -
  • - - {title} - -
  • - ))} -
    - )} - - - - - ); -}; - -export default Product; diff --git a/src/components/shared/header/header.jsx b/src/components/shared/header/header.jsx index 0fc6963b..bc69e145 100644 --- a/src/components/shared/header/header.jsx +++ b/src/components/shared/header/header.jsx @@ -40,14 +40,15 @@ const Header = ({ isMobileMenuOpen, onBurgerClick }) => { 'safe-paddings absolute left-0 right-0 top-0 z-40 w-full transition-colors duration-200', { 'bg-black': isMobileMenuOpen } )} + data-disable-document-scroll={isMobileMenuOpen} > -
    +
    - + Novu -