Skip to content

Commit

Permalink
Remove the Container component from the docsNavContainer
Browse files Browse the repository at this point in the history
In this case, the `docsNavContainer` does not pick up any styles or attributes from the `container` component it is wrapped in.

It does however pick up the pesky `.container` className, which when paired with bootstrap, messes up the styling of the top navigation in mobile.

This change is completely non-destructive, but helps enable the use of bootstrap on top of Docusaurus.
  • Loading branch information
shawntabrizi committed Jun 11, 2019
1 parent 2d7a456 commit 892cc1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/docusaurus-1.x/lib/core/BlogSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

const React = require('react');
const Container = require('./Container.js');
const SideNav = require('./nav/SideNav.js');

const MetadataBlog = require('./MetadataBlog.js');
Expand Down Expand Up @@ -42,15 +41,15 @@ class BlogSidebar extends React.Component {
category: blogSidebarTitle,
};
return (
<Container className="docsNavContainer" id="docsNav" wrapper={false}>
<div className="docsNavContainer" id="docsNav">
<SideNav
language={this.props.language}
root={`${this.props.config.baseUrl}blog/`}
title="Blog"
contents={contents}
current={current}
/>
</Container>
</div>
);
}
}
Expand Down
5 changes: 2 additions & 3 deletions packages/docusaurus-1.x/lib/core/DocsSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const React = require('react');
const fs = require('fs');
const Container = require('./Container.js');
const SideNav = require('./nav/SideNav.js');
const Metadata = require('../core/metadata.js');

Expand Down Expand Up @@ -38,7 +37,7 @@ class DocsSidebar extends React.Component {
}

return (
<Container className="docsNavContainer" id="docsNav" wrapper={false}>
<div className="docsNavContainer" id="docsNav">
<SideNav
collapsible={this.props.collapsible}
language={this.props.metadata.language}
Expand All @@ -47,7 +46,7 @@ class DocsSidebar extends React.Component {
contents={docsCategories[this.props.metadata.language]}
current={this.props.metadata}
/>
</Container>
</div>
);
}
}
Expand Down

0 comments on commit 892cc1a

Please sign in to comment.