Skip to content

Commit 6bfa061

Browse files
committed
Update navigation frame
1 parent 28d82a4 commit 6bfa061

File tree

1 file changed

+32
-40
lines changed

1 file changed

+32
-40
lines changed

core-concepts/navigation.mdx

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ description: "Structure and customize your documentation's navigation hierarchy"
44
icon: "map"
55
---
66

7+
export const LayoutFrame = ({ children }) => (
8+
<div className="flex justify-center p-10 pointer-events-none border border-zinc-100 dark:border-zinc-800 rounded-2xl bg-zinc-100 dark:bg-zinc-900">
9+
{children}
10+
</div>
11+
)
12+
713
## Introduction
814

915
The `navigation` property in your [docs.json](/core-concepts/settings) defines how users will browse through your documentation. Think of it as the blueprint for your documentation's menu structure.
@@ -14,12 +20,10 @@ With proper navigation configuration, you can organize your content into a logic
1420

1521
Pages are the most fundamental navigation component.
1622

17-
<Frame>
18-
<div className="flex justify-center p-10 pointer-events-none">
19-
<img className="block dark:hidden w-52" src="/images/navigation/pages-light.png" />
20-
<img className="hidden dark:block w-52" src="/images/navigation/pages-dark.png" />
21-
</div>
22-
</Frame>
23+
<LayoutFrame>
24+
<img className="block dark:hidden w-52" src="/images/navigation/pages-light.png" />
25+
<img className="hidden dark:block w-52" src="/images/navigation/pages-dark.png" />
26+
</LayoutFrame>
2327

2428
Pages is an array where each entry must be a reference to the path of a [page file](/core-concepts/pages).
2529

@@ -42,12 +46,10 @@ Pages is an array where each entry must be a reference to the path of a [page fi
4246

4347
Groups allow you to group your pages. Groups can also be nested within each other.
4448

45-
<Frame>
46-
<div className="flex justify-center p-10 pointer-events-none">
47-
<img className="block dark:hidden w-52" src="/images/navigation/groups-light.png" />
48-
<img className="hidden dark:block w-52" src="/images/navigation/groups-dark.png" />
49-
</div>
50-
</Frame>
49+
<LayoutFrame>
50+
<img className="block dark:hidden w-52" src="/images/navigation/groups-light.png" />
51+
<img className="hidden dark:block w-52" src="/images/navigation/groups-dark.png" />
52+
</LayoutFrame>
5153

5254
```json
5355
{
@@ -79,12 +81,10 @@ Groups allow you to group your pages. Groups can also be nested within each othe
7981
Tabs help distinguish between different topics or sections of your
8082
documentation.
8183

82-
<Frame>
83-
<div className="flex justify-center p-10 pointer-events-none">
84-
<img className="block dark:hidden w-52" src="/images/navigation/tabs-light.png" />
85-
<img className="hidden dark:block w-52" src="/images/navigation/tabs-dark.png" />
86-
</div>
87-
</Frame>
84+
<LayoutFrame>
85+
<img className="block dark:hidden w-52" src="/images/navigation/tabs-light.png" />
86+
<img className="hidden dark:block w-52" src="/images/navigation/tabs-dark.png" />
87+
</LayoutFrame>
8888

8989
```json
9090
"navigation": {
@@ -119,12 +119,10 @@ documentation.
119119

120120
Anchors are another way to section your content. They show up on top of your side navigation.
121121

122-
<Frame>
123-
<div className="flex justify-center p-10 pointer-events-none">
122+
<LayoutFrame>
124123
<img className="block dark:hidden w-52" src="/images/navigation/anchors-light.png" />
125124
<img className="hidden dark:block w-52" src="/images/navigation/anchors-dark.png" />
126-
</div>
127-
</Frame>
125+
</LayoutFrame>
128126

129127
The configuration is very similar to tabs.
130128

@@ -165,12 +163,10 @@ While not required, we highly recommend that you set an `icon` field as well.
165163

166164
Dropdowns show up in the same place as anchors, but are consolidated into a single dropdown.
167165

168-
<Frame>
169-
<div className="flex justify-center p-10 pointer-events-none">
170-
<img className="block dark:hidden w-52" src="/images/navigation/dropdowns-light.png" />
171-
<img className="hidden dark:block w-52" src="/images/navigation/dropdowns-dark.png" />
172-
</div>
173-
</Frame>
166+
<LayoutFrame>
167+
<img className="block dark:hidden w-52" src="/images/navigation/dropdowns-light.png" />
168+
<img className="hidden dark:block w-52" src="/images/navigation/dropdowns-dark.png" />
169+
</LayoutFrame>
174170

175171
While not required, we also recommend that you set an icon for each dropdown item.
176172

@@ -210,12 +206,10 @@ While not required, we also recommend that you set an icon for each dropdown ite
210206

211207
Versions can be leveraged to partition your navigation into different versions.
212208

213-
<Frame>
214-
<div className="flex justify-center p-10 pointer-events-none">
215-
<img className="block dark:hidden w-52" src="/images/navigation/versions-light.png" />
216-
<img className="hidden dark:block w-52" src="/images/navigation/versions-dark.png" />
217-
</div>
218-
</Frame>
209+
<LayoutFrame>
210+
<img className="block dark:hidden w-52" src="/images/navigation/versions-light.png" />
211+
<img className="hidden dark:block w-52" src="/images/navigation/versions-dark.png" />
212+
</LayoutFrame>
219213

220214
```json
221215
{
@@ -250,12 +244,10 @@ Versions can be leveraged to partition your navigation into different versions.
250244

251245
Languages can be leveraged to partition your navigation into different languages.
252246

253-
<Frame>
254-
<div className="flex justify-center p-10 pointer-events-none">
255-
<img className="block dark:hidden w-52" src="/images/navigation/languages-light.png" />
256-
<img className="hidden dark:block w-52" src="/images/navigation/languages-dark.png" />
257-
</div>
258-
</Frame>
247+
<LayoutFrame>
248+
<img className="block dark:hidden w-52" src="/images/navigation/languages-light.png" />
249+
<img className="hidden dark:block w-52" src="/images/navigation/languages-dark.png" />
250+
</LayoutFrame>
259251

260252
We currently support the following languages:
261253

0 commit comments

Comments
 (0)