From a1559368c46dc565d062fd4ad4ae099eac353e17 Mon Sep 17 00:00:00 2001 From: Augustin Mauroy Date: Fri, 24 May 2024 23:23:28 +0200 Subject: [PATCH 1/3] feat(pride logo): introduce --- .../Containers/NavBar/index.stories.tsx | 41 +++++++ components/Containers/NavBar/index.tsx | 17 ++- components/Icons/Logos/NodejsDarkPride.tsx | 111 ++++++++++++++++++ components/Icons/Logos/NodejsLightPride.tsx | 111 ++++++++++++++++++ components/__design__/node-logos.stories.tsx | 11 ++ components/withNavBar.tsx | 4 + public/static/logos/nodejsDarkPride.svg | 32 +++++ public/static/logos/nodejsLightPride.svg | 32 +++++ site.json | 1 + types/config.ts | 1 + 10 files changed, 359 insertions(+), 2 deletions(-) create mode 100644 components/Icons/Logos/NodejsDarkPride.tsx create mode 100644 components/Icons/Logos/NodejsLightPride.tsx create mode 100644 public/static/logos/nodejsDarkPride.svg create mode 100644 public/static/logos/nodejsLightPride.svg diff --git a/components/Containers/NavBar/index.stories.tsx b/components/Containers/NavBar/index.stories.tsx index 33a945323fb3b..c8ea0d68cb417 100644 --- a/components/Containers/NavBar/index.stories.tsx +++ b/components/Containers/NavBar/index.stories.tsx @@ -45,4 +45,45 @@ export const Default: Story = { }, }; +export const WithPrideLogo: Story = { + args: { + navItems: [ + { + text: 'Learn', + link: '/', + }, + { + text: 'About', + link: '/about', + }, + { + text: 'Docs', + link: '/docs', + }, + { + text: 'Download', + link: '/download', + }, + { + text: 'Blog', + link: '/blog', + }, + { + text: 'Certification', + link: 'https://openjsf.org/certification', + }, + ], + languages: { + availableLanguages: [ + { name: 'English', code: 'en' }, + { name: 'French', code: 'fr' }, + { name: 'Spanish', code: 'es' }, + ], + currentLanguage: 'en', + }, + onThemeTogglerClick: () => {}, + enablePrideLogo: true, + }, +}; + export default { component: NavBar } as Meta; diff --git a/components/Containers/NavBar/index.tsx b/components/Containers/NavBar/index.tsx index d4e6d9fb3546e..299c3f3beaa4a 100644 --- a/components/Containers/NavBar/index.tsx +++ b/components/Containers/NavBar/index.tsx @@ -11,7 +11,9 @@ import { SearchButton } from '@/components/Common/Search'; import ThemeToggle from '@/components/Common/ThemeToggle'; import NavItem from '@/components/Containers/NavBar/NavItem'; import NodejsDark from '@/components/Icons/Logos/NodejsDark'; +import NodejsDarkPride from '@/components/Icons/Logos/NodejsDarkPride'; import NodejsLight from '@/components/Icons/Logos/NodejsLight'; +import NodejsLightPride from '@/components/Icons/Logos/NodejsLightPride'; import GitHub from '@/components/Icons/Social/GitHub'; import Link from '@/components/Link'; import type { FormattedMessage } from '@/types'; @@ -31,12 +33,14 @@ type NavbarProps = { }>; languages: ComponentProps; onThemeTogglerClick: () => void; + enablePrideLogo?: boolean; }; const NavBar: FC = ({ navItems, languages, onThemeTogglerClick, + enablePrideLogo = false, }) => { const [isMenuOpen, setIsMenuOpen] = useState(false); @@ -44,8 +48,17 @@ const NavBar: FC = ({