-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
2,787 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
items: | ||
- categroy: community-and-events | ||
- categroy: community-calls | ||
- categroy: ecosystem | ||
- categroy: engineering | ||
- categroy: 757155c6-ce07-49f1-af21-907b7e0b1cb1 | ||
- categroy: governance | ||
- categroy: stark-math | ||
- categroy: stark-struck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
import { getJSON } from "@starknet-io/cms-utils/src/index"; | ||
|
||
/** | ||
* Export FeaturedSections type. | ||
*/ | ||
|
||
export type FeaturedSections = string[] | ||
|
||
/** | ||
* Export `getFeaturedSections` function. | ||
*/ | ||
export async function getFeaturedSections( | ||
context: EventContext<{}, any, Record<string, unknown>> | ||
): Promise<FeaturedSections> { | ||
try { | ||
const sections = await getJSON("data/featured-sections/featured-sections", context) | ||
|
||
return sections.items.map((item: { category: string }) => item.category); | ||
} catch (cause) { | ||
throw new Error("getFeaturedSection failed!", { | ||
cause, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
workspaces/website/src/components/Blog/BlogBreadcrumbs.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* Module dependencies | ||
*/ | ||
|
||
import { | ||
Breadcrumb, | ||
BreadcrumbItem, | ||
BreadcrumbLink, | ||
Flex, | ||
FlexProps | ||
} from "@chakra-ui/react"; | ||
|
||
import { IoHomeOutline } from "react-icons/io5"; | ||
|
||
/** | ||
* `Props` type. | ||
*/ | ||
|
||
type Props = FlexProps & { | ||
locale: string; | ||
title: string; | ||
} | ||
|
||
/** | ||
* Export `BlogBreadcrumbs` component. | ||
*/ | ||
|
||
export const BlogBreadcrumbs = ({ locale, title, ...rest }: Props) => ( | ||
<Flex | ||
columnGap={'8px'} | ||
{...rest} | ||
> | ||
<IoHomeOutline/> | ||
|
||
<Breadcrumb separator="/"> | ||
<BreadcrumbItem> | ||
<BreadcrumbLink | ||
fontSize={'sm'} | ||
fontWeight={500} | ||
href={`/${locale}`} | ||
> | ||
{'Home'} | ||
</BreadcrumbLink> | ||
</BreadcrumbItem> | ||
<BreadcrumbItem> | ||
<BreadcrumbLink | ||
fontSize={'sm'} | ||
fontWeight={500} | ||
href={`/${locale}/posts`} | ||
> | ||
{'Content'} | ||
</BreadcrumbLink> | ||
</BreadcrumbItem> | ||
|
||
<BreadcrumbItem isCurrentPage> | ||
<BreadcrumbLink | ||
fontSize={'sm'} | ||
fontWeight={500} | ||
color={'heading-navy-fg'} | ||
> | ||
{title} | ||
</BreadcrumbLink> | ||
</BreadcrumbItem> | ||
</Breadcrumb> | ||
</Flex> | ||
); |
Oops, something went wrong.