Skip to content

Commit

Permalink
feat: Add site-container to header and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 16, 2020
1 parent 98e20f6 commit a320069
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 35 deletions.
64 changes: 33 additions & 31 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,40 @@ const Header = () => {

return (
<header className={cx(styles.main, { [styles.isOpen]: isOpen })}>
<nav role="navigation" aria-label="New Relic" className={styles.navNr}>
<h3 className={styles.hideOnDesktop}>Sites</h3>
<ul>
<li className={styles.hideOnMobile}>
<ExternalLink
className={cx(styles.logo, styles.logoNr)}
href="//newrelic.com"
/>
</li>
<li>
<Link to="/" className={styles.isActive}>
Developers
</Link>
</li>
<li>
<ExternalLink href="//opensource.newrelic.com">
Open Source
</ExternalLink>
</li>
<li>
<ExternalLink href="//docs.newrelic.com">
Documentation
</ExternalLink>
</li>
</ul>
</nav>
<div className="site-container">
<nav role="navigation" aria-label="New Relic" className={styles.navNr}>
<h3 className={styles.hideOnDesktop}>Sites</h3>
<ul>
<li className={styles.hideOnMobile}>
<ExternalLink
className={cx(styles.logo, styles.logoNr)}
href="//newrelic.com"
/>
</li>
<li>
<Link to="/" className={styles.isActive}>
Developers
</Link>
</li>
<li>
<ExternalLink href="//opensource.newrelic.com">
Open Source
</ExternalLink>
</li>
<li>
<ExternalLink href="//docs.newrelic.com">
Documentation
</ExternalLink>
</li>
</ul>
</nav>

<HamburgerMenu
className={styles.hamburgerMenu}
toggle={() => setIsOpen(!isOpen)}
isOpen={isOpen}
/>
<HamburgerMenu
className={styles.hamburgerMenu}
toggle={() => setIsOpen(!isOpen)}
isOpen={isOpen}
/>
</div>
</header>
);
};
Expand Down
3 changes: 2 additions & 1 deletion src/components/Layout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

import Footer from './Footer';
import Header from './Header';
Expand All @@ -11,7 +12,7 @@ import './styles.scss';
const Layout = ({ children }) => (
<div className={styles.layout}>
<Header />
<div className={styles.main}>
<div className={cx(styles.main, 'site-container')}>
<Sidebar pages={pages} />
<main className={styles.content}>{children}</main>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/components/Layout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
.main {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
max-width: 1460px;
margin: 0 auto;
width: 100%;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ code {
}

.site-container {
max-width: 1200px;
max-width: 1460px;
margin: auto;
}
}

0 comments on commit a320069

Please sign in to comment.