Skip to content

Commit

Permalink
Merge branch 'master' into styleguide-grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
Arya-Gupta authored Jun 16, 2023
2 parents 769bfa3 + 46cf788 commit d28c673
Show file tree
Hide file tree
Showing 14 changed files with 412 additions and 117 deletions.
70 changes: 70 additions & 0 deletions components/data/buckets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import IconGettingStarted from '../icons/GettingStarted'
import IconTutorials from '../icons/Tutorials'
import IconUseCases from '../icons/UseCases'
import IconGuide from '../icons/Guide'
import IconSpec from '../icons/Spec'
import IconUsers from '../icons/Users'

export const buckets = [
{
name: 'concepts',
title: 'Concepts',
description: 'Our Concepts section defines the concepts of AsyncAPI features and capabilities.',
link: '/docs/concepts',
className: 'bg-secondary-200',
borderClassName: 'border-secondary-200',
Icon: IconGettingStarted,
},
{
name: 'tutorials',
title: 'Tutorials',
description: 'Our Tutorials section teaches beginner processes with AsyncAPI, guiding you from Point A to Point B.',
link: '/docs/tutorials',
className: 'bg-pink-100',
borderClassName: 'border-pink-100',
Icon: IconTutorials,
},
{
name: 'guides',
title: 'Guides',
description: "Our Guides section teaches AsyncAPI's capabilities at a high level.",
link: '/docs/guides',
className: 'bg-primary-200',
borderClassName: 'border-primary-200',
Icon: IconGuide,
},
{
name: 'tools',
title: 'Tools',
description: 'Our Tools section documents the AsyncAPI tools ecosystem.',
link: '/docs/tools',
className: 'bg-green-200',
borderClassName: 'border-green-200',
Icon: IconUseCases,
},
{
name: 'reference',
title: 'Reference',
description: 'Our Reference section documents the AsyncAPI specification.',
link: '/docs/reference',
className: 'bg-yellow-200',
borderClassName: 'border-yellow-200',
Icon: IconSpec,
},
{
name: 'community',
title: 'Community',
description: 'Our Community section documents the community guidelines and resources.',
link: '/docs/community',
className: 'bg-orange-200',
borderClassName: 'border-orange-200',
Icon: IconUsers,
},
].map(bucket => {
// we need such a mapping for some parts of website, e.g navigation blocks use the `icon` property, not `Icon` etc.
return {
...bucket,
href: bucket.link,
icon: bucket.Icon,
};
});
46 changes: 2 additions & 44 deletions components/docs/DocsCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,12 @@ import Link from 'next/link';
import Heading from '../typography/Heading';
import Paragraph from '../typography/Paragraph';

import IconGettingStarted from '../icons/GettingStarted'
import IconTutorials from '../icons/Tutorials'
import IconUseCases from '../icons/UseCases'
import IconGuide from '../icons/Guide'
import IconSpec from '../icons/Spec'

const cards = [
{
title: 'Concepts',
description: 'Our Concepts section defines the concepts of AsyncAPI features and capabilities.',
link: '/docs/concepts',
className: 'bg-secondary-200',
Icon: IconGettingStarted,
},
{
title: 'Tutorials',
description: 'Our Tutorials section teaches beginner processes with AsyncAPI, guiding you from Point A to Point B.',
link: '/docs/tutorials',
className: 'bg-pink-100',
Icon: IconTutorials,
},
{
title: 'Tools',
description: 'Our Tools section documents the AsyncAPI tools ecosystem.',
link: '/docs/tools',
className: 'bg-green-200',
Icon: IconUseCases,
},
{
title: 'Guides',
description: "Our Guides section teaches AsyncAPI's capabilities at a high level.",
link: '/docs/guides',
className: 'bg-primary-200',
Icon: IconGuide,
},
{
title: 'Reference',
description: 'Our Reference section documents the AsyncAPI specification.',
link: '/docs/reference',
className: 'bg-yellow-200',
Icon: IconSpec,
}
];
import { buckets } from '../data/buckets';

export function DocsCards() {
return (
<div className='grid gap-4 grid-cols-1 sm:grid-cols-2'>
{cards.map(card => (
{buckets.map(card => (
<Card key={card.title} {...card} />
))}
</div>
Expand Down
21 changes: 21 additions & 0 deletions components/icons/Users.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default function IconUsers({ ...rest }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.3"
strokeLinecap="round"
strokeLinejoin="round"
{...rest}
>
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
</svg>
);
}
44 changes: 14 additions & 30 deletions components/navigation/DocsNav.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,32 @@
import DocsNavItem from './DocsNavItem';
import IconHome from '../icons/Home';

import IconHome from '../icons/Home'
import IconRocket from '../icons/Rocket'
import IconGradCap from '../icons/GradCap'
import IconPlant from '../icons/Plant'
import IconGuide from '../icons/Guide'
import IconPaper from '../icons/Paper'
import { buckets } from '../data/buckets';

const buckets = {
'welcome': {
const serializedBuckets = buckets.reduce((acc, bucket) => {
acc[bucket.name] = {
...bucket,
className: `${bucket.className} ${bucket.borderClassName}`,
};
return acc;
}, {
welcome: {
icon: IconHome,
className: 'bg-gray-300 border-gray-300',
},
'concepts': {
icon: IconRocket,
className: 'bg-secondary-200 border-secondary-200',
},
'tutorials': {
icon: IconGradCap,
className: 'bg-pink-100 border-pink-100',
},
'tools': {
icon: IconPlant,
className: 'bg-green-200 border-green-200',
},
'guides': {
icon: IconGuide,
className: 'bg-primary-200 border-primary-200',
},
'reference': {
icon: IconPaper,
className: 'bg-yellow-200 border-yellow-200',
},
};
});

export default function DocsNav({
item,
active,
onClick = () => {},
}) {
const subCategories = item.children;
const bucket = serializedBuckets[item.item.rootSectionId];

return (
<li className='mb-4' key={item.item.title}>
<DocsNavItem {...item.item} activeSlug={active} defaultClassName='font-body text-sm text-black hover:font-semibold' inactiveClassName='font-regular' activeClassName='font-semibold' bucket={buckets[item.item.rootSectionId]} onClick={onClick} />
<DocsNavItem {...item.item} activeSlug={active} defaultClassName='font-body text-sm text-black hover:font-semibold' inactiveClassName='font-regular' activeClassName='font-semibold' bucket={bucket} onClick={onClick} />
<ul className='border-l border-gray-200 pl-4 ml-3 mt-1'>
{Object.values(subCategories).map((subCategory) => (
<li key={subCategory.item.title}>
Expand Down
4 changes: 2 additions & 2 deletions components/navigation/LearningPanel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import FlyoutMenu from './FlyoutMenu'
import learningItems from './learningItems'
import { buckets } from '../data/buckets'

export default function LearningPanel () {
return (
<FlyoutMenu items={learningItems} />
<FlyoutMenu items={buckets} />
)
}
4 changes: 3 additions & 1 deletion components/navigation/learningItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import IconGradCap from '../icons/GradCap'
import IconPlant from '../icons/Plant'
import IconGuide from '../icons/Guide'
import IconPaper from '../icons/Paper'
import IconUsers from '../icons/Users'

export default [
{ href: '/docs/concepts', icon: IconRocket, className: 'bg-secondary-200', title: 'Concepts', description: 'Our Concepts section defines the concepts of AsyncAPI features and capabilities.' },
{ href: '/docs/tutorials', icon: IconGradCap, className: 'bg-pink-100', title: 'Tutorials', description: 'Our Tutorials section teaches beginner processes with AsyncAPI, guiding you from Point A to Point B.' },
{ href: '/docs/tools', icon: IconPlant, className: 'bg-green-200', title: 'Tools', description: 'Our Tools section documents the AsyncAPI tools ecosystem.' },
{ href: '/docs/guides', icon: IconGuide, className: 'bg-primary-200', title: 'Guides', description: `Our Guides section teaches AsyncAPI's capabilities at a high level.` },
{ href: '/docs/reference', icon: IconPaper, className: 'bg-yellow-200', title: 'Reference', description: `Our Reference section documents the AsyncAPI specification.` }
{ href: '/docs/reference', icon: IconPaper, className: 'bg-yellow-200', title: 'Reference', description: `Our Reference section documents the AsyncAPI specification.` },
{ href: '/docs/community', icon: IconUsers, className: 'bg-red-200', title: 'Community', description: `Our Community section documents the community guidelines and resources.` },
]
2 changes: 1 addition & 1 deletion components/tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ export default function Tabs({ tabs = [], className = '' }) {
</div>
</div>
);
}
}
13 changes: 7 additions & 6 deletions config/meetings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
"url": "https://github.com/asyncapi/community/issues/625",
"date": "2023-03-08T14:00:00.000Z"
},
{
"title": "Community Meeting",
"calLink": "https://www.google.com/calendar/event?eid=NmRyanI0ZGd2cHNqOG5qb3FvMWRlZG9oMmcgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/629",
"date": "2023-03-07T08:00:00.000Z"
},
{
"title": "Spec 3.0 Meeting",
"calLink": "https://www.google.com/calendar/event?eid=bjE2ZTdnZGJ1bHNxMWhrcW9rcjh0bGRxN3MgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
Expand Down Expand Up @@ -192,5 +186,12 @@
"url": "https://github.com/asyncapi/community/issues/747",
"banner": "",
"date": "2023-06-15T02:30:00.000Z"
},
{
"title": "Spec 3.0 Docs Meeting",
"calLink": "https://www.google.com/calendar/event?eid=ajJoMTY5N2hpOWFlMTcyamFmbWttbTJlNG8gY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/749",
"banner": "",
"date": "2023-06-22T14:30:00.000Z"
}
]
40 changes: 20 additions & 20 deletions config/newsroom_videos.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[
{
"image_url": "https://i.ytimg.com/vi/52qqKE8jFlI/hqdefault.jpg",
"title": "Spec 3.0 (June 7th 2023)",
"description": "https://github.com/asyncapi/community/issues/734.",
"videoId": "52qqKE8jFlI"
"image_url": "https://i.ytimg.com/vi/mAISwYCZa2I/hqdefault.jpg",
"title": "Studio planning",
"description": "https://github.com/asyncapi/community/issues/745.",
"videoId": "mAISwYCZa2I"
},
{
"image_url": "https://i.ytimg.com/vi/cIK6V28Rv3g/hqdefault.jpg",
"title": "Studio Vision &amp; Plans (June 5th 2023)",
"description": "https://github.com/asyncapi/community/issues/728.",
"videoId": "cIK6V28Rv3g"
"image_url": "https://i.ytimg.com/vi/V3Op2A08UQs/hqdefault.jpg",
"title": "Headless Commerce: Streamlining Architecture",
"description": "https://github.com/asyncapi/community/issues/716.",
"videoId": "V3Op2A08UQs"
},
{
"image_url": "https://i.ytimg.com/vi/0X7wnn41Vho/hqdefault.jpg",
"title": "Community Meeting (May 30th 2023)",
"description": "https://github.com/asyncapi/community/issues/715.",
"videoId": "0X7wnn41Vho"
"image_url": "https://i.ytimg.com/vi/LfKYDiqZDNA/hqdefault.jpg",
"title": "Let&#39;s talk about contributing: Mentorship Program FAQ",
"description": "https://github.com/asyncapi/community/issues/739.",
"videoId": "LfKYDiqZDNA"
},
{
"image_url": "https://i.ytimg.com/vi/e0pQClU6QqU/hqdefault.jpg",
"title": "Spec 3.0 (May 24th 2023)",
"description": "https://github.com/asyncapi/community/issues/714.",
"videoId": "e0pQClU6QqU"
"image_url": "https://i.ytimg.com/vi/_zdXm90KvF0/hqdefault.jpg",
"title": "Community Meeting, Tuesday June 13th 2023",
"description": "https://github.com/asyncapi/community/issues/738.",
"videoId": "_zdXm90KvF0"
},
{
"image_url": "https://i.ytimg.com/vi/l9Tp5eMTol4/hqdefault.jpg",
"title": "Community Health in Open-source",
"description": "Community health in open-source refers to the overall well-being of the individuals that contribute to a particular open-source ...",
"videoId": "l9Tp5eMTol4"
"image_url": "https://i.ytimg.com/vi/52qqKE8jFlI/hqdefault.jpg",
"title": "Spec 3.0 (June 7th 2023)",
"description": "https://github.com/asyncapi/community/issues/734.",
"videoId": "52qqKE8jFlI"
}
]
Loading

0 comments on commit d28c673

Please sign in to comment.