Skip to content

Commit

Permalink
Merge pull request #1704 from starknet-io/dev
Browse files Browse the repository at this point in the history
Merge dev into production
  • Loading branch information
nuno-aac authored Nov 27, 2023
2 parents 119c72d + 8a3b824 commit 67c89c4
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 25 deletions.
9 changes: 5 additions & 4 deletions _data/pages/developers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ blocks:
- type: image_icon_link_card
color: peach
title: Starknet Basecamp
description: Sign up for the next basecamp and learn everything about Starknet -
from STARK mathematics to Cairo 1 smart contracts best practices.
description: Register for an upcoming Basecamp cohort or watch the previous
recordings, where you will learn everything about Starknet, Cairo, and
STARKs.
icon: /assets/basecamp.svg
link:
custom_title: Sign-up
custom_title: View
custom_internal_link: ""
custom_external_link: https://docs.google.com/forms/d/e/1FAIpQLSf2k9vjPpeymbUpJMRDuN3QqNcHtjWx8whX2wY4EbihF1EaPg/viewform
custom_external_link: https://starknet.notion.site/Starknet-Basecamp-1541b3c1f49f439da872d3d71647d834?pvs=4
withIllustration: true
- type: image_icon_link_card
color: cyan
Expand Down
6 changes: 3 additions & 3 deletions _data/settings/main-menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ items:
- title: Resources
columns:
- blocks:
- title: All blog posts
- title: Content
items:
- custom_internal_link: /posts/
custom_title: All blog posts
- custom_title: Community & events
custom_internal_link: /posts/community-and-events
custom_internal_link: /posts/events-and-webinars
hide_from_footer: true
- custom_title: Community calls
custom_internal_link: /posts/community-calls
Expand All @@ -107,7 +107,7 @@ items:
custom_internal_link: /posts/tutorials-and-guides
hide_from_footer: true
- custom_title: STARK Struck Podcast
custom_internal_link: /posts/stark-struck
custom_internal_link: /posts/stark-struck-podcast
hide_from_footer: true
- blocks:
- title: OTHER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export const Solid = () => (
title: "BLOG & MEDIA",
items: [
{
custom_title: "All blog posts",
custom_title: "Content",
custom_internal_link: "/posts/",
},
{
Expand Down
26 changes: 15 additions & 11 deletions workspaces/website/src/components/Layout/Navbar/NavLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,21 @@ export const NavLayout = (props: NavLayoutProps) => {
/>
</Box>

<Box
w="1px"
bg="nav-footer-br"
h="30px"
position="relative"
marginInlineStart="12px !important"
display={{ base: "none", lg: "block" }}
/>
<Box display={{ base: "none", lg: "block" }} marginInlineStart="0 !important">
{props.languageSwitcher}
</Box>
{!!props.languageSwitcher && (
<>
<Box
w="1px"
bg="nav-footer-br"
h="30px"
position="relative"
marginInlineStart="12px !important"
display={{ base: "none", lg: "block" }}
/>
<Box display={{ base: "none", lg: "block" }} marginInlineStart="0 !important">
{props.languageSwitcher}
</Box>
</>
)}

<Box display={{ base: "block", lg: "none" }}><IconButton
ref={menuButtonRef}
Expand Down
2 changes: 0 additions & 2 deletions workspaces/website/src/pages/(components)/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import * as NavAccordian from "@ui/Layout/Navbar/NavAccordion";
import type { MainMenu } from "@starknet-io/cms-data/src/settings/main-menu";
import LocaleSwitcher from "./LocaleSwitcher";
import { NavBar } from "@ui/Layout/Navbar/Navbar";
import { MenuItemWithDropdown } from "@ui/Layout/Navbar/MenuItemWithDropdown";
import { NavbarContainer } from "@ui/Layout/Navbar/NavbarContainer";
Expand Down Expand Up @@ -39,7 +38,6 @@ export default function Navbar({
return (
<NavbarContainer>
<NavBar
languageSwitcher={<LocaleSwitcher seo={languageCenterSeo} />}
search={
<div>
<MainSearch env={env} seo={searchSEO} />
Expand Down
15 changes: 13 additions & 2 deletions workspaces/website/src/pages/posts/@category/index.page.server.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
/**
* Module dependencies.
*/

import { getCategories } from "@starknet-io/cms-data/src/categories";
import { getTopics } from "@starknet-io/cms-data/src/topics";
import { PageContextServer } from "src/renderer/types";
import { Props } from "src/pages/posts/PostsPage";
import { getDefaultPageContext } from "src/renderer/helpers";

/**
* Export `onBeforeRender` function.
*/

export async function onBeforeRender(pageContext: PageContextServer) {
const defaultPageContext = await getDefaultPageContext(pageContext);
const { locale } = defaultPageContext;
const { category: categorySlug } = pageContext.routeParams!;
const categories = await getCategories(locale, pageContext.context);
const category = categories.find((category) => category.slug === categorySlug);

const pageProps: Props = {
categories: await getCategories(locale, pageContext.context),
categories,
topics: await getTopics(locale, pageContext.context),
env: {
ALGOLIA_INDEX: import.meta.env.VITE_ALGOLIA_INDEX!,
Expand All @@ -27,7 +38,7 @@ export async function onBeforeRender(pageContext: PageContextServer) {
...defaultPageContext,
pageProps,
documentProps: {
title: "Starknet Blog",
title: `Starknet Blog - ${category?.name}`,
description: "Get the latest insights from across the Starknet ecosystem, learn what community members are building or take a deep dive into the math that powers Starknet.",
image: `${import.meta.env.VITE_SITE_URL}/assets/share/blog_landing.png`,
},
Expand Down
13 changes: 12 additions & 1 deletion workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { PageContextServer } from "src/renderer/types";
/**
* Module dependencies.
*/

import { DocumentProps, PageContextServer } from "src/renderer/types";
import { getDefaultPageContext } from "src/renderer/helpers";
import {
getRoadmapPostBySlug,
Expand All @@ -7,6 +11,10 @@ import {
import { RoadmapPostProps } from "./(components)/RoadmapPost";
import { getRoadmapSettings } from "@starknet-io/cms-data/src/settings/roadmap";

/**
* Export `onBeforeRender` function.
*/

export async function onBeforeRender(pageContext: PageContextServer) {
const defaultPageContext = await getDefaultPageContext(pageContext);
const { locale } = defaultPageContext;
Expand All @@ -30,6 +38,9 @@ export async function onBeforeRender(pageContext: PageContextServer) {
pageContext: {
...defaultPageContext,
pageProps,
documentProps: {
title: `Starknet Roadmap - ${roadmapPost.title}`,
} satisfies DocumentProps,
},
};
}
21 changes: 20 additions & 1 deletion workspaces/website/src/pages/roadmap/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
export { default as Page } from "src/pages/roadmap/(components)/RoadmapPage";
/**
* Module dependencies
*/

import { DocumentProps } from "src/renderer/types";

/**
* Export `Page` component
*/

export { default as Page } from "src/pages/roadmap/(components)/RoadmapPage";

/**
* Export `documentProps`.
*/

export const documentProps = {
title: "Starknet Roadmap",
description: "Explore the Starknet Roadmap for a comprehensive journey through our development milestones. Follow our progress as we continue to enhance performance, security, and usability, driving Starknet towards a new era of decentralized computing. Stay informed and join us on this exciting roadmap as we redefine the possibilities of blockchain technology."
} satisfies DocumentProps;

0 comments on commit 67c89c4

Please sign in to comment.