mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 04:57:05 +02:00
feat(v2): nav dropdown (#2487)
* feat(v2): allow nav dropdown * docs(v2): document navbar links * fix bug
This commit is contained in:
parent
054563befe
commit
f96c2b61d7
5 changed files with 108 additions and 40 deletions
|
@ -91,25 +91,29 @@ module.exports = {
|
|||
},
|
||||
links: [
|
||||
{
|
||||
to: 'versions',
|
||||
label: `${versions[0].substr(6)}`,
|
||||
position: 'left',
|
||||
style: {
|
||||
whiteSpace: 'nowrap',
|
||||
padding: '0.25rem 0.5rem 0.2rem 0.25rem',
|
||||
fontSize: 'calc(0.9 * var(--ifm-font-size-base))',
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
},
|
||||
{
|
||||
to: 'docs/introduction',
|
||||
activeBasePath: 'docs',
|
||||
label: 'Docs',
|
||||
position: 'left',
|
||||
activeBasePath: 'docs',
|
||||
items: [
|
||||
{
|
||||
label: versions[0],
|
||||
to: `docs/introduction`,
|
||||
},
|
||||
].concat(
|
||||
versions.slice(1).map(version => ({
|
||||
label: version,
|
||||
to: `docs/${version}/introduction`,
|
||||
})),
|
||||
),
|
||||
},
|
||||
{to: 'blog', label: 'Blog', position: 'left'},
|
||||
{to: 'showcase', label: 'Showcase', position: 'left'},
|
||||
{to: 'feedback', label: 'Feedback', position: 'left'},
|
||||
{
|
||||
to: 'versions',
|
||||
label: `v${versions[0]}`,
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/facebook/docusaurus',
|
||||
label: 'GitHub',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue