Skip to content

Commit

Permalink
fix(v2): fix HTML issues nav dropdown and highlight docs item
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Apr 1, 2020
1 parent 409f169 commit 38dc448
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
12 changes: 5 additions & 7 deletions packages/docusaurus-theme-classic/src/theme/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ function NavItem({items, position, ...props}) {
</NavLink>
<ul className="dropdown__menu">
{items.map((linkItemInner, i) => (
<NavLink
className="navbar__item navbar__link"
{...linkItemInner}
key={i}
/>
<li key={i}>
<NavLink className="navbar__item navbar__link" {...linkItemInner} />
</li>
))}
</ul>
</div>
Expand All @@ -91,8 +89,8 @@ function MobileNavItem({items, ...props}) {
</NavLink>
<ul className="menu__list">
{items.map((linkItemInner, i) => (
<li className="menu__list-item">
<NavLink className="menu__link" {...linkItemInner} key={i} />
<li className="menu__list-item" key={i}>
<NavLink className="menu__link" {...linkItemInner} />
</li>
))}
</ul>
Expand Down
3 changes: 2 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ module.exports = {
links: [
{
label: 'Docs',
to: 'docs/introduction', // "fake" link
position: 'left',
activeBasePath: 'docs',
items: [
{
label: versions[0],
to: `docs/introduction`,
to: 'docs/introduction',
},
].concat(
versions.slice(1).map(version => ({
Expand Down
5 changes: 5 additions & 0 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ html[data-theme='dark'] {
html[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgb(0, 0, 0, 0.3);
}

/* This will be removed after new release of Infima */
.navbar__item.dropdown > .navbar__link {
pointer-events: none;
}

0 comments on commit 38dc448

Please sign in to comment.