Skip to content

Commit 735c1aa

Browse files
committed
First scaffold for the new collapsible navigation
1 parent 4818367 commit 735c1aa

File tree

10 files changed

+458
-231
lines changed

10 files changed

+458
-231
lines changed

src/DocsOverview.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DocsOverview.res

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ let default = (~showVersionSelect=true) => {
3939
("GenType", "/docs/gentype/latest/introduction"),
4040
("Reanalyze", "https://github.com/reason-association/reanalyze"),
4141
]
42+
4243
let tools = [("Syntax Lookup", "/syntax-lookup")]
4344

4445
let versionSelect = if showVersionSelect {
@@ -55,7 +56,7 @@ let default = (~showVersionSelect=true) => {
5556
router->Next.Router.push(targetUrl)
5657
}
5758
<div className="text-fire">
58-
<VersionSelect availableVersions=ManualDocsLayout.allManualVersions onChange version />
59+
<VersionSelect availableVersions=Constants.allManualVersions onChange version />
5960
</div>
6061
} else {
6162
React.null

src/common/Constants.js

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/common/Constants.res

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This is used for the version dropdown in the manual layouts
2+
let allManualVersions = [("latest", "v8.2.0"), ("v8.0.0", "< v8.2.0")]
3+
4+
// Used for the DocsOverview and collapsible navigation
5+
let languageManual = version => {
6+
[
7+
("Overview", `/docs/manual/${version}/introduction`),
8+
("Language Features", `/docs/manual/${version}/overview`),
9+
("JS Interop", `/docs/manual/${version}/embed-raw-javascript`),
10+
("Build System", `/docs/manual/${version}/build-overview`),
11+
]
12+
}
13+
14+
let ecosystem = [
15+
("Package Index", "/packages"),
16+
("rescript-react", "/docs/react/latest/introduction"),
17+
("GenType", "/docs/gentype/latest/introduction"),
18+
("Reanalyze", "https://github.com/reason-association/reanalyze"),
19+
]
20+
21+
let tools = [("Syntax Lookup", "/syntax-lookup")]

0 commit comments

Comments
 (0)