Skip to content

Commit

Permalink
New Nav items (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazemmahdyx committed Feb 23, 2024
1 parent 5ab4314 commit 35aec15
Show file tree
Hide file tree
Showing 13 changed files with 1,239 additions and 71 deletions.
145 changes: 120 additions & 25 deletions packages/blog-starter-kit/themes/enterprise/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,34 @@ import { PublicationNavbarItem } from '../generated/graphql';
import { Button } from './button';
import { useAppContext } from './contexts/appContext';
import {
AIAgentsSVG,
AboutUsNavSVG,
BlogNavSGV,
CareersSVG,
CaseStudiesSVG,
CommunitySVG,
ContactSVG,
CustomChatbotsSVG,
DocsNavSVG,
EnterpriseSVG,
EventsSVG,
FeaturesSVG,
FineTuningSVG,
ForecastingSVG,
GithubSVG,
HashnodeBlueSVG,
IntegrationsSVG,
MindsdbLogoSVG,
NewsroomSVG,
ProductUpdatesSVG,
SemanticSearchSVG,
SlackNavSGV,
SlackWhiteNavSGV,
SupportSVG,
TextProcessingSVG,
UpTimeNavSVG,
UseCasesSVG,
} from './icons';
import ContributeSVG from './icons/svgs/NavbarIcons/ContributeSVG';
function hasUrl(
navbarItem: PublicationNavbarItem,
): navbarItem is PublicationNavbarItem & { url: string } {
Expand All @@ -43,14 +51,26 @@ const product1 = [
// Icon: <CloudNavBarSVG />,
// },
{
name: 'Github',
description: 'Visit our Repo',
href: 'https://github.com/mindsdb/mindsdb/',
Icon: <GithubSVG />,
name: 'Features',
description: 'Building blocks & concepts',
href: 'https://docs.mindsdb.com/what-is-mindsdb',
Icon: <FeaturesSVG />,
},
{
name: 'Integrations',
description: 'AI engines, data sources, and apps',
href: 'https://docs.mindsdb.com/integrations/integrations',
Icon: <IntegrationsSVG />,
},
{
name: 'MindsDB Enterprise',
description: 'Contact sales',
name: 'Product Updates',
description: 'New features and improvements',
href: 'https://github.com/mindsdb/mindsdb/releases',
Icon: <ProductUpdatesSVG />,
},
{
name: 'Enterprise',
description: 'Get it on your terms',
href: 'https://mindsdb.com/book-a-demo',
Icon: <EnterpriseSVG />,
},
Expand All @@ -69,6 +89,46 @@ const product2 = [
Icon: <CommunitySVG />,
},
];
const sol1 = [
{
name: 'Continuous Fine-Tuning',
description: 'Improve AI models in real time',
href: 'https://docs.mindsdb.com/finetune/openai',
Icon: <FineTuningSVG />,
},
{
name: 'AI Agents',
description: 'Enhance versatility with customizable “skills”',
href: 'https://docs.mindsdb.com/mindsdb_sql/agents/agent',
Icon: <AIAgentsSVG />,
},
{
name: 'Semantic Search',
description: 'RAG and embeddings sync',
href: 'https://docs.mindsdb.com/sql/tutorials/rag',
Icon: <SemanticSearchSVG />,
},
];
const sol2 = [
{
name: 'Custom Chatbots',
description: 'Connect agents with chat interfaces',
href: 'https://docs.mindsdb.com/mindsdb_sql/agents/chatbot',
Icon: <CustomChatbotsSVG />,
},
{
name: 'Forecasting',
description: 'Forecast trends in your data with enhanced SQL',
href: 'https://docs.mindsdb.com/sql/tutorials/house-sales-forecasting',
Icon: <ForecastingSVG />,
},
{
name: 'In-database Text Processing',
description: 'Sentiment analysis, summarization, and more',
href: 'https://docs.mindsdb.com/nlp/sentiment-analysis-inside-mysql-with-openai',
Icon: <TextProcessingSVG />,
},
];
const res1 = [
{
name: 'Support',
Expand All @@ -94,6 +154,12 @@ const res1 = [
href: 'https://mindsdb.com/blog',
Icon: <BlogNavSGV />,
},
{
name: 'Slack',
description: 'Join our channels for helpful discussions',
href: 'https://mindsdb.com/joincommunity',
Icon: <SlackNavSGV />,
},
];
const res2 = [
{
Expand All @@ -108,12 +174,7 @@ const res2 = [
href: 'https://mindsdb.com/blog-categories/product-updates',
Icon: <ProductUpdatesSVG />,
},
{
name: 'Slack',
description: 'Join our channels for helpful discussions',
href: 'https://mindsdb.com/joincommunity',
Icon: <SlackNavSGV />,
},

{
name: 'Uptime Status',
description: 'All systems operational',
Expand Down Expand Up @@ -156,10 +217,10 @@ const company2 = [
Icon: <ContactSVG />,
},
{
name: 'Contests',
description: 'Build Your Own AI Agent Online Hackathon',
href: 'https://hashnode.com/hackathons/mindsdb',
Icon: <HashnodeBlueSVG />,
name: 'Contribute',
description: 'Check guidelines and first-time issues',
href: 'https://docs.mindsdb.com/contribute/contribute',
Icon: <ContributeSVG />,
},
];

Expand Down Expand Up @@ -217,11 +278,33 @@ const ProductPopover = () => {
/>
))}
</div>
</div>
</Popover.Panel>
</Transition>
</Popover>
);
};
const SolutionsPopover = () => {
return (
<Popover className="relative">
<Popover.Button className="flex items-center gap-x-1 text-sm font-semibold leading-6 text-white">
Solutions
<ChevronDownIcon className="h-5 w-5 flex-none text-gray-400" aria-hidden="true" />
</Popover.Button>

{/* <div className="w-full">
<p className="mb-4 border-b px-4 pb-3 text-black">OPEN-SOURCE</p>
{product2.map((item) => (
<Transition
as={Fragment}
enter="transition ease-out duration-200"
enterFrom="opacity-0 translate-y-1"
enterTo="opacity-100 translate-y-0"
leave="transition ease-in duration-150"
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="absolute -left-8 top-full z-10 mt-3 w-screen max-w-2xl overflow-hidden rounded-3xl bg-white shadow-lg ring-1 ring-gray-900/5">
<div className="flex flex-row p-4 text-black ">
<div className="w-full">
{sol1.map((item) => (
<NavItem
key={item.name}
title={item.name}
Expand All @@ -230,7 +313,18 @@ const ProductPopover = () => {
url={item.href}
/>
))}
</div> */}
</div>
<div className="w-full">
{sol2.map((item) => (
<NavItem
key={item.name}
title={item.name}
description={item.description}
icon={item.Icon}
url={item.href}
/>
))}
</div>
</div>
</Popover.Panel>
</Transition>
Expand All @@ -254,7 +348,7 @@ const ResourcesPopover = () => {
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="absolute -left-8 top-full z-10 mt-3 w-screen max-w-2xl overflow-hidden rounded-3xl bg-white shadow-lg ring-1 ring-gray-900/5">
<Popover.Panel className="absolute -left-8 top-full z-10 mt-3 w-96 max-w-2xl overflow-hidden rounded-3xl bg-white shadow-lg ring-1 ring-gray-900/5">
<div className="flex flex-row p-4 text-black ">
<div className="w-full">
{res1.map((item) => (
Expand All @@ -267,7 +361,7 @@ const ResourcesPopover = () => {
/>
))}
</div>
<div className="w-full">
{/* <div className="w-full">
{res2.map((item) => (
<NavItem
key={item.name}
Expand All @@ -277,7 +371,7 @@ const ResourcesPopover = () => {
url={item.href}
/>
))}
</div>
</div> */}
</div>
</Popover.Panel>
</Transition>
Expand Down Expand Up @@ -386,6 +480,7 @@ export const Header = () => {
</div>
<Popover.Group className="hidden lg:flex lg:gap-x-7">
<ProductPopover />
<SolutionsPopover />
<ResourcesPopover />
<CompanyPopover />
</Popover.Group>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';

export default class AIAgentsSVG extends React.Component {
render() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
>
<path
d="M4 13.6724V14.1724H4.5V13.6724H4ZM4 16.3621H4.5V15.8621H4V16.3621ZM20 16.3621V15.8621H19.5V16.3621H20ZM20 13.6724H19.5V14.1724H20V13.6724ZM7 22.5H6.5C6.5 22.6894 6.607 22.8625 6.77639 22.9472C6.94579 23.0319 7.14849 23.0136 7.3 22.9L7 22.5ZM10.7333 19.7L11.0333 20.1L10.7333 19.7ZM3.5 9.5V13.6724H4.5V9.5H3.5ZM4 13.1724H3V14.1724H4V13.1724ZM1.5 14.6724V15.3621H2.5V14.6724H1.5ZM3 16.8621H4V15.8621H3V16.8621ZM3.5 16.3621V17.5H4.5V16.3621H3.5ZM20.5 17.5V16.3621H19.5V17.5H20.5ZM20 16.8621H21V15.8621H20V16.8621ZM22.5 15.3621V14.6724H21.5V15.3621H22.5ZM21 13.1724H20V14.1724H21V13.1724ZM20.5 13.6724V9.5H19.5V13.6724H20.5ZM17 6H7V7H17V6ZM11.3333 20H18V19H11.3333V20ZM6.5 20.5V22.5H7.5V20.5H6.5ZM7.3 22.9L11.0333 20.1L10.4333 19.3L6.7 22.1L7.3 22.9ZM6 20C6.27614 20 6.5 20.2239 6.5 20.5H7.5C7.5 19.6716 6.82843 19 6 19V20ZM22.5 14.6724C22.5 13.844 21.8284 13.1724 21 13.1724V14.1724C21.2761 14.1724 21.5 14.3963 21.5 14.6724H22.5ZM21 16.8621C21.8284 16.8621 22.5 16.1905 22.5 15.3621H21.5C21.5 15.6382 21.2761 15.8621 21 15.8621V16.8621ZM19.5 17.5C19.5 18.3284 18.8284 19 18 19V20C19.3807 20 20.5 18.8807 20.5 17.5H19.5ZM1.5 15.3621C1.5 16.1905 2.17157 16.8621 3 16.8621V15.8621C2.72386 15.8621 2.5 15.6382 2.5 15.3621H1.5ZM11.3333 19C11.0088 19 10.693 19.1053 10.4333 19.3L11.0333 20.1C11.1199 20.0351 11.2251 20 11.3333 20V19ZM3 13.1724C2.17157 13.1724 1.5 13.844 1.5 14.6724H2.5C2.5 14.3963 2.72386 14.1724 3 14.1724V13.1724ZM3.5 17.5C3.5 18.8807 4.61929 20 6 20V19C5.17157 19 4.5 18.3284 4.5 17.5H3.5ZM20.5 9.5C20.5 7.56701 18.933 6 17 6V7C18.3807 7 19.5 8.11929 19.5 9.5H20.5ZM4.5 9.5C4.5 8.11929 5.61929 7 7 7V6C5.067 6 3.5 7.567 3.5 9.5H4.5Z"
fill="#F97316"
/>
<path d="M4 11.5V16.5" stroke="#F97316" stroke-linecap="round" stroke-linejoin="round" />
<path d="M20 11.5V16.5" stroke="#F97316" stroke-linecap="round" stroke-linejoin="round" />
<path d="M12 4.5L12 6.5" stroke="#F97316" />
<circle cx="12" cy="3.5" r="1.5" stroke="#F97316" />
<circle cx="8.5" cy="11" r="1.5" stroke="#F97316" />
<circle cx="15.5" cy="11" r="1.5" stroke="#F97316" />
<path
d="M10 15C10.2851 15.5818 11.0729 16 12 16C12.9271 16 13.7149 15.5818 14 15"
stroke="#F97316"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react';

export default class ContributeSVG extends React.Component {
render() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.75 3C3.7835 3 3 3.7835 3 4.75C3 5.7165 3.7835 6.5 4.75 6.5C5.7165 6.5 6.5 5.7165 6.5 4.75C6.5 3.7835 5.7165 3 4.75 3ZM1.5 4.75C1.5 2.95507 2.95507 1.5 4.75 1.5C6.54493 1.5 8 2.95507 8 4.75C8 6.54493 6.54493 8 4.75 8C2.95507 8 1.5 6.54493 1.5 4.75Z"
fill="#FAB12D"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.75 17.5C3.7835 17.5 3 18.2835 3 19.25C3 20.2165 3.7835 21 4.75 21C5.7165 21 6.5 20.2165 6.5 19.25C6.5 18.2835 5.7165 17.5 4.75 17.5ZM1.5 19.25C1.5 17.4551 2.95507 16 4.75 16C6.54493 16 8 17.4551 8 19.25C8 21.0449 6.54493 22.5 4.75 22.5C2.95507 22.5 1.5 21.0449 1.5 19.25Z"
fill="#FAB12D"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M19.25 17.5C18.2835 17.5 17.5 18.2835 17.5 19.25C17.5 20.2165 18.2835 21 19.25 21C20.2165 21 21 20.2165 21 19.25C21 18.2835 20.2165 17.5 19.25 17.5ZM16 19.25C16 17.4551 17.4551 16 19.25 16C21.0449 16 22.5 17.4551 22.5 19.25C22.5 21.0449 21.0449 22.5 19.25 22.5C17.4551 22.5 16 21.0449 16 19.25Z"
fill="#FAB12D"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.75 7.25C5.16421 7.25 5.5 7.58579 5.5 8V16C5.5 16.4142 5.16421 16.75 4.75 16.75C4.33579 16.75 4 16.4142 4 16V8C4 7.58579 4.33579 7.25 4.75 7.25Z"
fill="#FAB12D"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M13.4053 1.71967C13.6982 2.01256 13.6982 2.48744 13.4053 2.78033L12.1857 4H16.25C18.3211 4 20 5.67893 20 7.75V16.5C20 16.9142 19.6642 17.25 19.25 17.25C18.8358 17.25 18.5 16.9142 18.5 16.5V7.75C18.5 6.50736 17.4926 5.5 16.25 5.5H12.1857L13.4053 6.71967C13.6982 7.01256 13.6982 7.48744 13.4053 7.78033C13.1124 8.07322 12.6376 8.07322 12.3447 7.78033L9.84467 5.28033C9.55178 4.98744 9.55178 4.51256 9.84467 4.21967L12.3447 1.71967C12.6376 1.42678 13.1124 1.42678 13.4053 1.71967Z"
fill="#FAB12D"
/>
</svg>
);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';

export default class FeaturesSVG extends React.Component {
render() {
return (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={this.props.className}
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M11.5775 1.09382C11.8456 0.968728 12.1552 0.968728 12.4233 1.09382L22.0233 5.57382C22.3754 5.73812 22.6004 6.09148 22.6004 6.48V17.52C22.6004 17.9085 22.3754 18.2619 22.0233 18.4262L12.4233 22.9062C12.1552 23.0313 11.8456 23.0313 11.5775 22.9062L1.97751 18.4262C1.62543 18.2619 1.40039 17.9085 1.40039 17.52V6.48C1.40039 6.09148 1.62543 5.73812 1.97751 5.57382L11.5775 1.09382ZM3.40039 7.99157L11.0004 11.2216V20.4298L3.40039 16.8831V7.99157ZM13.0004 20.4298L20.6004 16.8831V7.99157L13.0004 11.2216V20.4298ZM12.0004 9.47344L19.1442 6.43731L12.0004 3.10353L4.85657 6.43731L12.0004 9.47344Z"
fill="#00A587"
/>
</svg>
);
}
}
Loading

0 comments on commit 35aec15

Please sign in to comment.