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

[docs] adds docs-wide search component #8349

Merged
merged 3 commits into from
Jun 13, 2019
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
17 changes: 12 additions & 5 deletions docs/components/page_shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ import { overviewNavigation } from '../data/overview-navigation';
import { styleSpecNavigation } from '../data/style-spec-navigation';
import { plugins } from '../data/plugins';
import { routeToPrefixed } from '@mapbox/batfish/modules/route-to';

import Search from '@mapbox/dr-ui/search';

const slugger = new GithubSlugger();

const site = "Mapbox GL JS";

class PageShell extends React.Component {

componentDidMount() {
Expand Down Expand Up @@ -212,12 +214,12 @@ class PageShell extends React.Component {

const sidebarProps = this.getSidebarProps(activeTab);
const topbarContent = {
productName: "Mapbox GL JS",
productName: site,
topNav: <TopNavTabs activeTab={activeTab} />
};

return (
<ReactPageShell site="Mapbox GL JS" darkHeaderText={true} includeFooter={false} {...this.props}>
<ReactPageShell site={site} darkHeaderText={true} includeFooter={false} {...this.props}>
<Helmet>
<link
rel="canonical"
Expand All @@ -227,17 +229,22 @@ class PageShell extends React.Component {
<div className="shell-header-buffer" />
<TopbarSticker unStickWidth={980}>
<div className="limiter">
<div className="grid grid--gut36 mr-neg36 mr0-mm">
<div className="grid">
<div className={`col col--4-mm ${sidebarProps.sidebarColSize ? `col--${sidebarProps.sidebarColSize}-ml` : ''} col--12`}>
<div className="ml24-mm pt12">
<ProductMenu productName={topbarContent.productName} homePage='/mapbox-gl-js/'/>
</div>
</div>
<div className={`col col--8-mm ${sidebarProps.sidebarColSize ? `col--${12 - sidebarProps.sidebarColSize}-ml` : ''} col--12`}>
<div className={`col col--6-mm ${sidebarProps.sidebarColSize ? `col--${10 - sidebarProps.sidebarColSize}-ml` : ''} col--12`}>
<div style={{ height: '50px' }}>
{topbarContent.topNav}
</div>
</div>
<div className="col col--2-mm col--12">
<div className="flex-parent-mm flex-parent--end-main h-full-mm wmax300 wmax-full-mm " style={{margin: '7px 0'}}>
<Search site={site} />
</div>
</div>
</div>
</div>
</TopbarSticker>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
"@mapbox/appropriate-images": "^2.0.0",
"@mapbox/appropriate-images-react": "^1.0.0",
"@mapbox/batfish": "1.9.8",
"@mapbox/dr-ui": "0.6.0",
"@mapbox/dr-ui": "0.15.2",
"@mapbox/flow-remove-types": "^1.3.0-await.upstream.2",
"@mapbox/gazetteer": "^3.1.2",
"@mapbox/mapbox-gl-rtl-text": "^0.2.1",
"@mapbox/mapbox-gl-test-suite": "file:test/integration",
"@mapbox/mbx-assembly": "^0.28.2",
"@mapbox/mr-ui": "0.5.0",
"@mapbox/mr-ui": "0.7.1",
"@octokit/rest": "^15.15.1",
"babel-eslint": "^10.0.1",
"benchmark": "^2.1.4",
Expand Down
Loading