This is an automated email from the ASF dual-hosted git repository.
mayanks pushed a commit to branch new-site-dev
in repository https://gitbox.apache.org/repos/asf/pinot-site.git
The following commit(s) were added to refs/heads/new-site-dev by this push:
new bccd829b SAR-634 - Fix navigation (#146)
bccd829b is described below
commit bccd829b928af9903b57cf680c8bb04245876a35
Author: Gio <[email protected]>
AuthorDate: Tue Apr 1 20:14:09 2025 +0200
SAR-634 - Fix navigation (#146)
---
components/CommunitySection.tsx | 15 +++++++++++----
data/headerNavLinks.ts | 2 +-
data/siteMetadata.js | 3 ++-
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/components/CommunitySection.tsx b/components/CommunitySection.tsx
index 3b091b35..39410706 100644
--- a/components/CommunitySection.tsx
+++ b/components/CommunitySection.tsx
@@ -6,6 +6,7 @@ type CommunityBoxProps = {
icon: string;
link: string;
isWide?: boolean;
+ target?: string;
};
type CommunityLink = {
@@ -13,17 +14,23 @@ type CommunityLink = {
icon: string;
link: string;
isWide?: boolean;
+ target?: string;
};
-// Create a single box component
-const CommunityBox: React.FC<CommunityBoxProps> = ({ name, icon, link, isWide
= false }) => {
+const CommunityBox: React.FC<CommunityBoxProps> = ({
+ name,
+ icon,
+ link,
+ isWide = false,
+ target = '_blank'
+}) => {
const iconContainerClass = isWide ? 'w-auto h-16 flex' : 'w-16 h-16 flex';
return (
<a
href={link}
className="flex h-36 w-40 flex-col items-center justify-center
rounded-lg border-2 border-amber-800 transition-colors hover:bg-gray-100
focus:bg-gray-100 dark:border-gray-800 dark:hover:bg-gray-800
dark:focus:bg-gray-800"
- target="_blank"
+ target={target}
>
<div className={`${iconContainerClass} relative mb-2 items-center
justify-center`}>
<Image
@@ -39,7 +46,6 @@ const CommunityBox: React.FC<CommunityBoxProps> = ({ name,
icon, link, isWide =
);
};
-// The main section component
const CommunitySection: React.FC = () => {
return (
<section className="px-6 py-14 md:mx-auto md:max-w-5xl md:px-[13.5rem]
md:py-[6.5rem]">
@@ -54,6 +60,7 @@ const CommunitySection: React.FC = () => {
icon={community.icon}
link={community.link}
isWide={community.isWide}
+ target={community.target ? community.target : '_blank'}
/>
))}
</div>
diff --git a/data/headerNavLinks.ts b/data/headerNavLinks.ts
index d48b062b..4d6bcb4a 100644
--- a/data/headerNavLinks.ts
+++ b/data/headerNavLinks.ts
@@ -4,7 +4,7 @@ const headerNavLinks = [
{ href: '/download/', title: 'Download' },
{ href: '/powered-by/', title: 'Powered by' },
{ href: '/blog/', title: 'Blog' },
- { href: '#join-community', title: 'Community' }
+ { href: '/#join-community', title: 'Community' }
];
export default headerNavLinks;
diff --git a/data/siteMetadata.js b/data/siteMetadata.js
index 98cec9d7..7c54bcea 100644
--- a/data/siteMetadata.js
+++ b/data/siteMetadata.js
@@ -192,7 +192,8 @@ const siteMetadata = {
icon: '/static/images/socials/youtube.svg',
// link: 'https://www.youtube.com/@Apache_Pinot',
link: '/share/',
- isWide: true
+ isWide: true,
+ target: '_self'
},
{
name: 'Meetup in a Box',
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]