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

Banner positioning fix for www #4810

Merged
merged 2 commits into from
Apr 3, 2018
Merged
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
5 changes: 3 additions & 2 deletions www/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class DefaultLayout extends React.Component {
render() {
const isHomepage = this.props.location.pathname == `/`
const isBlog = this.props.location.pathname.slice(0, 6) === `/blog/`
const isBlogLanding = this.props.location.pathname === `/blog/`
const isDoc = this.props.location.pathname.slice(0, 6) === `/docs/`
const isTutorial =
this.props.location.pathname.slice(0, 10) === `/tutorial/`
Expand Down Expand Up @@ -141,8 +142,8 @@ class DefaultLayout extends React.Component {
fontFamily: options.headerFontFamily.join(`,`),
textAlign: `center`,
boxShadow: `inset 0px -3px 2px 0px ${colors.ui.bright}`,
zIndex: `2`,
position: isHomepage || isBlog ? `absolute` : `fixed`,
zIndex: `3`,
position: isHomepage || isBlogLanding ? `absolute` : `fixed`,
}}
>
Live 2-day Gatsby training with Kyle Mathews! Sign up for{" "}
Expand Down