-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor gatsbyjs.org for no layout component
- Loading branch information
1 parent
e9c3027
commit 3c9e3c3
Showing
14 changed files
with
555 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from "react" | ||
|
||
export default ({ children }) => ( | ||
<div className={`docSearch-content`}>{children}</div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react" | ||
|
||
import SidebarBody from "./sidebar-body" | ||
import presets from "../utils/presets" | ||
import { rhythm } from "../utils/typography" | ||
|
||
export default props => { | ||
if (props.disable) { | ||
return props.renderContent() | ||
} else { | ||
return ( | ||
<div> | ||
<div | ||
css={{ | ||
[presets.Tablet]: { paddingLeft: rhythm(10) }, | ||
[`${presets.Tablet} and (max-width:980px)`]: { | ||
".gatsby-highlight": { | ||
marginLeft: 0, | ||
marginRight: 0, | ||
}, | ||
}, | ||
[presets.Desktop]: { paddingLeft: rhythm(12) }, | ||
}} | ||
> | ||
{props.renderContent()} | ||
</div> | ||
<SidebarBody yaml={props.yaml} /> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.