Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2): fix HTML issues nav dropdown and highlight docs item #2489

Merged
merged 1 commit into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}