diff --git a/content/community/EzmeralSoftwareForum.md b/content/community/EzmeralSoftwareForum.md index 3e3a53f752..9cf8dfc7d1 100644 --- a/content/community/EzmeralSoftwareForum.md +++ b/content/community/EzmeralSoftwareForum.md @@ -5,7 +5,7 @@ linkname: Go to the HPE Ezmeral Forum description: Want to stay updated on how to deploy in any cloud, on any hardware and is 100% open source Kubernetes? Join the discussion. active: true -priority: 7 +priority: 8 image: /img/community/EzmeralForum192_192.png --- ... \ No newline at end of file diff --git a/content/community/HPEInnovationCentral.md b/content/community/HPEInnovationCentral.md new file mode 100644 index 0000000000..9705668021 --- /dev/null +++ b/content/community/HPEInnovationCentral.md @@ -0,0 +1,9 @@ +--- +title: HPE Innovation Central +link: https://hpe.sharepoint.com/teams/InnovationCentral/SitePages/index.aspx +linkname: Start Innovating +description: Being innovative is part of our DNA and heritage. Everyone at HPE has the opportunity to be an innovator - all ideas are welcome! +active: true +priority: 1 +image: /img/community/HPE-Innovation.jpg +--- \ No newline at end of file diff --git a/content/community/OSScontribute.md b/content/community/OSScontribute.md index a403ada6b7..d1b2353962 100644 --- a/content/community/OSScontribute.md +++ b/content/community/OSScontribute.md @@ -4,7 +4,7 @@ link: /OSScontribute linkname: Start contributing description: I'd like to start contributing to open source software. active: true -priority: 5 +priority: 6 image: /img/github-mark.png --- . \ No newline at end of file diff --git a/content/community/Slack.md b/content/community/Slack.md index 2ae7a0a000..6381f53c32 100644 --- a/content/community/Slack.md +++ b/content/community/Slack.md @@ -3,7 +3,7 @@ link: /slack-signup linkname: Join us on Slack description: Have questions or just want to chat with other devs who work at HPE? - priority: 1 + priority: 2 image: '/img/community/slack.svg' active: true --- diff --git a/content/community/Twitter.md b/content/community/Twitter.md index 868db426d4..8fa7c30276 100644 --- a/content/community/Twitter.md +++ b/content/community/Twitter.md @@ -4,7 +4,7 @@ link: https://twitter.com/HPE_Developer linkname: Follow us on Twitter description: Interested in what’s currently happening in the HPE Developer Community? active: true -priority: 2 +priority: 3 image: /img/logo-black.png --- Text \ No newline at end of file diff --git a/content/community/contribute.md b/content/community/contribute.md index 80a5dbd6b9..1325d93546 100644 --- a/content/community/contribute.md +++ b/content/community/contribute.md @@ -5,7 +5,7 @@ linkname: Get Started description: Give back to the community by sharing your knowledge. Write an article or tutorial and contribute to the HPE Developer blog. active: true -priority: 4 +priority: 5 image: /img/community/contribute.svg --- . \ No newline at end of file diff --git a/content/community/newsletter.md b/content/community/newsletter.md index f65d456789..224fd3e195 100644 --- a/content/community/newsletter.md +++ b/content/community/newsletter.md @@ -5,7 +5,7 @@ linkname: Read our Newsletters description: Subscribe to our HPE Developer Newsletter to stay up-to-date on the newest HPE Developer Community activities, posts, and tutorials. active: true -priority: 3 +priority: 4 image: /img/community/newsletter.svg --- ... \ No newline at end of file diff --git a/content/community/openSource.md b/content/community/openSource.md index 783f05096a..54bfd6e73f 100644 --- a/content/community/openSource.md +++ b/content/community/openSource.md @@ -6,7 +6,7 @@ description: Open collaboration is in HPE’s DNA. We believe open source technologies and communities can help deliver innovative solutions securely and at scale. active: true -priority: 6 +priority: 7 image: /img/community/opensource.svg --- ... \ No newline at end of file diff --git a/src/components/Header/index.js b/src/components/Header/index.js index b808641743..f35d996a74 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -13,9 +13,9 @@ import { import { Menu, Search, FormDown } from 'grommet-icons'; import styled from 'styled-components'; import { AppContext } from '../../providers/AppProvider'; -import { ButtonLink } from '..'; +import { ButtonLink,ExternalButtonLink } from '..'; import { UserMenu } from './UserMenu'; - +import { validateHpeEmail } from '../../pages/community'; const TextAlignLeft = styled(Box)` & > a { @@ -294,6 +294,55 @@ function Header() { />, ); } + + if (validateHpeEmail(userDetail?.email)) + { + navLinks.push( + } + reverse + dropContent={ + + + + + + + } + />, + ); + } if (size === 'small') { navLinks.push( { + const hpeEmailPattern = /@hpe\.com$/; + console.log('validateEmail : ',user); + if (hpeEmailPattern.test(user)) + { + console.log('Email is from HPE user'); + return true; + } + console.log('Email is from outsider'); + return false; +}; + function Community({ data }) { const communities = data.allMarkdownRemark.edges; const siteMetadata = useSiteMetadata(); const siteTitle = siteMetadata.title; + const { user }= useContext(AppContext); + const [email,setEmail]=useState(user?.email || ';'); + useEffect(()=>{ +setEmail(user?.email); + },[user]); + console.log('Community : ',email); return ( @@ -49,9 +69,15 @@ function Community({ data }) { - {communities.map((community) => ( + { validateHpeEmail(email) + ? communities.map((community) => ( - ))} + )) + : communities.filter((community)=> + community.node.frontmatter.title!=='HPE Innovation Central') + .map((community)=> + ) + } diff --git a/static/img/community/HPE-Innovation.jpg b/static/img/community/HPE-Innovation.jpg new file mode 100644 index 0000000000..162c4af9ee Binary files /dev/null and b/static/img/community/HPE-Innovation.jpg differ