Skip to content

Commit

Permalink
chore: main navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
zstix committed Apr 21, 2020
1 parent fa54ae2 commit a937f0c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ import './Header.scss';

const Header = ({ links }) => (
<header className="Header">
<nav className="Header-navigation--nr"></nav>
<nav className="Header-nav Header-nav--nr"></nav>

<h1 className="Header-title">
<Link to="/">{'</>'} New Relic Developer</Link>
<Link to="/">{'</>'} New Relic Developers</Link>
</h1>

<nav className="Header-navigation--main"></nav>
<nav className="Header-nav Header-nav--main">
<ul>
{links.map((link, i) => (
<li key={i}>
<Link to={link.url} className="Header-nav-link">
{link.displayName}
</Link>
</li>
))}
</ul>
</nav>
</header>
);

Expand Down
37 changes: 37 additions & 0 deletions src/components/Header.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
header.Header {
background-color: #d7e6e8;
margin-bottom: 1em;

a {
color: #000;
text-decoration: none;
}

h1.Header-title {
font-size: 1.8em;
padding: 0.8em;
padding-bottom: 0.4em;
margin: 0;
}

nav.Header-nav {
width: 100%;

ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
}
}

a.Header-nav-link {
padding: 0.8em 0.6em;

&:hover {
cursor: pointer;
text-decoration: underline;
}
}

nav.Header-nav--main > ul {
justify-content: flex-end;
}
}

0 comments on commit a937f0c

Please sign in to comment.