Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add routing page #9550

Open
wants to merge 41 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
95dd7b6
docs: redesigned navigation
shahednasser Oct 10, 2024
8e36691
fix usage of incorrect button element
shahednasser Oct 10, 2024
77874dc
fix icon button paddings
shahednasser Oct 10, 2024
16627a3
fix button paddings
shahednasser Oct 10, 2024
d64b718
move everything to /learn + fix layouts
shahednasser Oct 10, 2024
1d492df
fixes
shahednasser Oct 10, 2024
f585054
Merge branch 'docs/redesign-navigation' into docs/router-page
shahednasser Oct 10, 2024
80d4ed3
fix build error
shahednasser Oct 10, 2024
eeef3c9
Merge branch 'docs/redesign-navigation' into docs/router-page
shahednasser Oct 10, 2024
cdcc531
change dropdown left placement
shahednasser Oct 10, 2024
8306655
fix sidebar show / hide button
shahednasser Oct 10, 2024
ee7cc3c
fix padding for theme dropdown items
shahednasser Oct 10, 2024
e194cc8
update shadows
shahednasser Oct 10, 2024
93c67de
remove cli from references
shahednasser Oct 11, 2024
7ae1e7a
Merge branch 'docs/redesign-navigation' into docs/router-page
shahednasser Oct 11, 2024
d831d69
inital work on router page
shahednasser Oct 11, 2024
e2ad044
Merge branch 'develop' into docs/router-page
shahednasser Oct 11, 2024
72920cf
Merge branch 'develop' into docs/router-page
shahednasser Oct 14, 2024
06a60d1
Merge branch 'develop' into docs/router-page
shahednasser Oct 14, 2024
f22933e
finish up routing page
shahednasser Oct 14, 2024
c61b1f9
Merge branch 'develop' into docs/router-page
shahednasser Oct 14, 2024
5f4ed97
add admin components to resources navbar
shahednasser Oct 14, 2024
9e51dd1
fix links
shahednasser Oct 14, 2024
11407b3
fix title suffix
shahednasser Oct 14, 2024
783fd06
fix links header text color
shahednasser Oct 14, 2024
c4e2871
address comments
shahednasser Oct 14, 2024
beefd9a
added highlight animation
shahednasser Oct 14, 2024
c475bc9
Merge branch 'develop' into docs/router-page
shahednasser Oct 14, 2024
36ef88c
Merge branch 'develop' into docs/router-page
shahednasser Oct 14, 2024
f899eb4
resolve comments
shahednasser Oct 14, 2024
4427641
fix path
shahednasser Oct 14, 2024
85438b9
revert config change
shahednasser Oct 15, 2024
e945785
Merge branch 'develop' into docs/router-page
shahednasser Oct 15, 2024
78e5102
Merge branch 'develop' into docs/router-page
shahednasser Oct 15, 2024
e7d51a6
address design feedback
shahednasser Oct 15, 2024
e9483c5
fixed edit dates generated file
shahednasser Oct 15, 2024
4fe94f3
fix breadcrumbs on small devices
shahednasser Oct 15, 2024
3566337
Merge branch 'develop' into docs/router-page
shahednasser Oct 16, 2024
2486a54
update highlights
shahednasser Oct 16, 2024
0d5faf9
update highlighting
shahednasser Oct 16, 2024
3e0a172
Merge branch 'develop' into docs/router-page
shahednasser Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions www/apps/api-reference/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./globals.css"
import Providers from "../providers"
import { WideLayout } from "docs-ui"
import { BareboneLayout, WideLayout } from "docs-ui"
import { Inter, Roboto_Mono } from "next/font/google"
import clsx from "clsx"

Expand All @@ -26,17 +26,18 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
<WideLayout
ProvidersComponent={Providers}
sidebarProps={{
expandItems: false,
}}
bodyClassName={clsx(inter.variable, robotoMono.variable)}
showToc={false}
showBanner={false}
showBreadcrumbs={false}
>
{children}
</WideLayout>
<BareboneLayout htmlClassName={clsx(inter.variable, robotoMono.variable)}>
<WideLayout
sidebarProps={{
expandItems: false,
}}
showToc={false}
showBanner={false}
showBreadcrumbs={false}
ProvidersComponent={Providers}
>
{children}
</WideLayout>
</BareboneLayout>
)
}
File renamed without changes.
12 changes: 12 additions & 0 deletions www/apps/book/app/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Inter, Roboto_Mono } from "next/font/google"

export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
weight: ["400", "500"],
})

export const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
})
6 changes: 5 additions & 1 deletion www/apps/book/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
@apply bg-medusa-bg-highlight;
}

* {
*:not(.code-block-elm) {
scrollbar-color: var(--docs-border-base) var(--docs-bg-base);
}

.code-block-elm {
scrollbar-color: var(--docs-contrast-border-base) transparent;
}

aside * {
scrollbar-color: var(--docs-border-base) var(--docs-bg-subtle);
}
Expand Down
31 changes: 4 additions & 27 deletions www/apps/book/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import type { Metadata } from "next"
import { Inter, Roboto_Mono } from "next/font/google"
import Providers from "@/providers"
import "./globals.css"
import { TightLayout } from "docs-ui"
import { config } from "@/config"
import { BareboneLayout } from "docs-ui"
import { inter, robotoMono } from "./fonts"
import clsx from "clsx"
import Feedback from "@/components/Feedback"
import EditButton from "@/components/EditButton"

export const metadata: Metadata = {
title: {
Expand All @@ -19,34 +16,14 @@ export const metadata: Metadata = {
),
}

export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
weight: ["400", "500"],
})

export const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
})

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<TightLayout
ProvidersComponent={Providers}
sidebarProps={{
expandItems: true,
}}
showPagination={true}
bodyClassName={clsx(inter.variable, robotoMono.variable)}
feedbackComponent={<Feedback className="my-2" />}
editComponent={<EditButton />}
>
<BareboneLayout htmlClassName={clsx(inter.variable, robotoMono.variable)}>
{children}
</TightLayout>
</BareboneLayout>
)
}
24 changes: 24 additions & 0 deletions www/apps/book/app/learn/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { TightLayout } from "docs-ui"
import Feedback from "@/components/Feedback"
import EditButton from "@/components/EditButton"
import Providers from "../../providers"

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<TightLayout
sidebarProps={{
expandItems: true,
}}
showPagination={true}
feedbackComponent={<Feedback className="my-2" />}
editComponent={<EditButton />}
ProvidersComponent={Providers}
>
{children}
</TightLayout>
)
}
File renamed without changes.
23 changes: 23 additions & 0 deletions www/apps/book/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { TightLayout } from "docs-ui"
import Feedback from "../components/Feedback"
import EditButton from "../components/EditButton"
import NotFoundContent from "./_not-found.mdx"
import Providers from "../providers"

const NotFoundPage = () => {
return (
<TightLayout
sidebarProps={{
expandItems: true,
}}
showPagination={true}
feedbackComponent={<Feedback className="my-2" />}
editComponent={<EditButton />}
ProvidersComponent={Providers}
>
<NotFoundContent />
</TightLayout>
)
}

export default NotFoundPage
49 changes: 49 additions & 0 deletions www/apps/book/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import clsx from "clsx"
import { MainNav, RootProviders } from "docs-ui"
import HomepageTopSection from "../components/Homepage/TopSection"
import Providers from "../providers"
import HomepageLinksSection from "../components/Homepage/LinksSection"
import HomepageRecipesSection from "../components/Homepage/RecipesSection"
import HomepageModulesSection from "../components/Homepage/ModulesSection"
import HomepageFooter from "../components/Homepage/Footer"

const Homepage = () => {
return (
<body
className={clsx(
"bg-medusa-bg-subtle font-base text-medium w-full",
"text-medusa-fg-subtle px-0.25 pt-0.25",
"h-screen overflow-hidden"
)}
>
<RootProviders>
<Providers>
<div
className={clsx(
"rounded-t bg-medusa-bg-base",
"shadow-elevation-card-rest dark:shadow-elevation-card-rest-dark",
"h-full w-full",
"overflow-y-scroll overflow-x-hidden"
)}
id="main"
>
<MainNav
className="border-b border-medusa-border-base"
itemsClassName={clsx(
"!my-1 [&_li_div]:!text-medusa-fg-subtle [&_li_a]:!text-medusa-fg-subtle",
"hover:[&_li_div]:!text-medusa-fg-base hover:[&_li_a]:!text-medusa-fg-base"
)}
/>
<HomepageTopSection />
<HomepageLinksSection />
<HomepageRecipesSection />
<HomepageModulesSection />
<HomepageFooter />
</div>
</Providers>
</RootProviders>
</body>
)
}

export default Homepage
Loading
Loading