Skip to content

Commit

Permalink
Merge pull request gatsbyjs#3 from sw-yx/topics/showcase-rebase-v2
Browse files Browse the repository at this point in the history
make Site Showcase responsive
  • Loading branch information
cassiebeckley committed Jun 8, 2018
2 parents c043296 + 4068c28 commit 7614b04
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 239 deletions.
3 changes: 2 additions & 1 deletion www/src/assets/mobile-nav-icons.js
Expand Up @@ -2,5 +2,6 @@ import BlogIcon from "./blog.svg"
import DocsIcon from "./docs.svg"
import TutorialIcon from "./tutorial.svg"
import PluginsIcon from "./plugins.svg"
import ShowcaseIcon from "./showcase-magic.svg"

export { BlogIcon, DocsIcon, TutorialIcon, PluginsIcon }
export { BlogIcon, DocsIcon, TutorialIcon, PluginsIcon, ShowcaseIcon }
23 changes: 23 additions & 0 deletions www/src/assets/showcase-magic.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions www/src/components/layout.js
Expand Up @@ -58,7 +58,7 @@ class DefaultLayout extends React.Component {
isModal = true
}

if (isModal) {
if (isModal && window.innerWidth > 750) {
return (
<React.Fragment>
<PageRenderer
Expand Down Expand Up @@ -100,9 +100,9 @@ class DefaultLayout extends React.Component {
backgroundColor: `#ffffff`,
boxShadow: `0px 0px 90px -24px ${colors.gatsby}`
}}>
{this.props.children}
{this.props.modalPreviousLink}
{this.props.modalNextLink}
{this.props.children}
{this.props.modalPreviousLink}
{this.props.modalNextLink}
</div>
</Modal>
</React.Fragment>
Expand Down
4 changes: 2 additions & 2 deletions www/src/components/navigation-mobile.js
Expand Up @@ -6,6 +6,7 @@ import {
DocsIcon,
TutorialIcon,
PluginsIcon,
ShowcaseIcon,
} from "../assets/mobile-nav-icons"
import presets, { colors } from "../utils/presets"
import typography, { rhythm, scale, options } from "../utils/typography"
Expand Down Expand Up @@ -54,8 +55,7 @@ const MobileNavigation = () => (
<MobileNavItem linkTo="/tutorial/" label="Tutorial" icon={TutorialIcon} />
<MobileNavItem linkTo="/plugins/" label="Plugins" icon={PluginsIcon} />
<MobileNavItem linkTo="/blog/" label="Blog" icon={BlogIcon} />
{/* TODO: change to showcase icon */}
<MobileNavItem linkTo="/showcase/" label="Showcase" icon={BlogIcon} />
<MobileNavItem linkTo="/showcase/" label="Showcase" icon={ShowcaseIcon} />
</div>
)

Expand Down

0 comments on commit 7614b04

Please sign in to comment.