-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Getting-Started, Icons, Tokens and Guides for a first preview …
…release of the documentation (#532)
- Loading branch information
Showing
74 changed files
with
4,061 additions
and
3,197 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
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,38 @@ | ||
.hd-layout_404 { | ||
text-align: center; | ||
} | ||
|
||
.hd-404__title { | ||
font-weight: 400; | ||
font-size: clamp(2rem, 5vw, 4rem); | ||
margin-top: 1rem; | ||
margin-bottom: 2rem | ||
} | ||
|
||
.hd-404__subtitle { | ||
font-weight: 400; | ||
font-size: clamp(1rem, 4vw, 1.825rem); | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.hd-404__button { | ||
border: none; | ||
border-radius: var(--hd-border-radius-md); | ||
height: 3rem; | ||
padding: 0 1rem; | ||
font-size: 1.25rem; | ||
text-align: center; | ||
background-color: var(--hd-accent-700); | ||
display: inline-flex; | ||
align-items: center; | ||
color: var(--hd-white); | ||
margin-top: 2rem; | ||
} | ||
|
||
.hd-404__button:hover { | ||
background-color: var(--hd-accent-900); | ||
} | ||
|
||
.hd-404__button:active { | ||
background-color: var(--hd-accent-400); | ||
} |
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 |
---|---|---|
@@ -1,35 +1,36 @@ | ||
"use client"; | ||
|
||
import type { ReactNode } from "react"; | ||
import { allGettingStarteds } from "contentlayer/generated"; | ||
import { useSelectedLayoutSegment } from "next/navigation"; | ||
import getPageLinks from "@/app/lib/getPageLinks"; | ||
import getSectionLinks from "@/app/lib/getSectionLinks"; | ||
import Sidebar from "@/app/ui/layout/sidebar/Sidebar"; | ||
import SubHeader from "@/app/ui/layout/subHeader/SubHeader"; | ||
import Wrapper from "@/app/ui/layout/wrapper/Wrapper"; | ||
import getSectionLinks from "@/app/lib/getSectionLinks"; | ||
import { SidebarProvider } from "@/context/sidebar/SidebarProvider"; | ||
import getPageLinks from "@/app/lib/getPageLinks"; | ||
import { allGettingStarteds } from "contentlayer/generated"; | ||
import { notFound, useSelectedLayoutSegment } from "next/navigation"; | ||
import type { ReactNode } from "react"; | ||
|
||
export default function TokenLayout({ children }: { children: ReactNode }) { | ||
const slug = useSelectedLayoutSegment(); | ||
const pageContent = allGettingStarteds.find(page => page.slug === slug); | ||
const allGettingStartedsLinks = getPageLinks(allGettingStarteds); | ||
export default function GettingStartedLayout({ children }: { children: ReactNode }) { | ||
const selectedLayoutSegment = useSelectedLayoutSegment(); | ||
const [section, type] = selectedLayoutSegment?.split("/") ?? ["", ""]; | ||
|
||
const pageContent = allGettingStarteds.find(page => page.slug === type && page.section === section); | ||
if (!pageContent) { | ||
return null; | ||
return notFound(); | ||
} | ||
|
||
const sectionLinks = getSectionLinks(pageContent); | ||
const allGettingStartedsLinks = getPageLinks(allGettingStarteds, { | ||
order: ["overview", "installation-path", "advanced-options", "guides"] | ||
}); | ||
|
||
return ( | ||
<> | ||
<SidebarProvider> | ||
<SubHeader links={sectionLinks} /> | ||
<Wrapper type="with-sidebar"> | ||
<Sidebar links={allGettingStartedsLinks} /> | ||
{children} | ||
</Wrapper> | ||
</SidebarProvider> | ||
</> | ||
<SidebarProvider> | ||
<SubHeader links={sectionLinks} /> | ||
<Wrapper type="with-sidebar"> | ||
<Sidebar links={allGettingStartedsLinks} /> | ||
{children} | ||
</Wrapper> | ||
</SidebarProvider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,37 +1,41 @@ | ||
"use client"; | ||
|
||
import type { ReactNode } from "react"; | ||
import { allGuides } from "contentlayer/generated"; | ||
import { useSelectedLayoutSegment } from "next/navigation"; | ||
import getPageLinks from "@/app/lib/getPageLinks"; | ||
import getSectionLinks from "@/app/lib/getSectionLinks"; | ||
import Sidebar from "@/app/ui/layout/sidebar/Sidebar"; | ||
import Wrapper from "@/app/ui/layout/wrapper/Wrapper"; | ||
import SubHeader from "@/app/ui/layout/subHeader/SubHeader"; | ||
import getSectionLinks from "@/app/lib/getSectionLinks"; | ||
import Wrapper from "@/app/ui/layout/wrapper/Wrapper"; | ||
import { SidebarProvider } from "@/context/sidebar/SidebarProvider"; | ||
import getPageLinks from "@/app/lib/getPageLinks"; | ||
import { allGuides } from "contentlayer/generated"; | ||
import { notFound, useSelectedLayoutSegment } from "next/navigation"; | ||
import type { ReactNode } from "react"; | ||
|
||
export default function TokenLayout({ children }: { children: ReactNode }) { | ||
export default function GuideLayout({ children }: { children: ReactNode }) { | ||
const selectedLayoutSegment = useSelectedLayoutSegment(); | ||
const [section, type] = selectedLayoutSegment?.split("/") ?? ["", ""]; | ||
let segments = selectedLayoutSegment?.split("/") ?? ["", ""]; | ||
if (segments.length === 1) { | ||
segments = ["guides", ...segments]; | ||
} | ||
const [section, type] = segments; | ||
|
||
const pageContent = allGuides.find(icon => icon.slug === type && icon.section === section); | ||
|
||
if (!pageContent) { | ||
return null; | ||
return notFound(); | ||
} | ||
|
||
const sectionLinks = getSectionLinks(pageContent); | ||
const allGuidesLinks = getPageLinks(allGuides); | ||
const allGuidesLinks = getPageLinks(allGuides, { | ||
order: ["overview", "guides"] | ||
}); | ||
|
||
return ( | ||
<> | ||
<SidebarProvider> | ||
<SubHeader links={sectionLinks} /> | ||
<Wrapper type="with-sidebar"> | ||
<Sidebar links={allGuidesLinks} /> | ||
{children} | ||
</Wrapper> | ||
</SidebarProvider> | ||
</> | ||
<SidebarProvider> | ||
<SubHeader links={sectionLinks} /> | ||
<Wrapper type="with-sidebar"> | ||
<Sidebar links={allGuidesLinks} /> | ||
{children} | ||
</Wrapper> | ||
</SidebarProvider> | ||
); | ||
} |
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
Oops, something went wrong.