Remove burger menu, replace with responsive row of links

This commit is contained in:
2019-11-14 02:58:10 +00:00
parent b2d8d569a6
commit 4dff7a9a12
5 changed files with 91 additions and 504 deletions

View File

@ -1,105 +1,86 @@
/* Header */
#header {
@include vendor('transition', 'background-color #{_duration(transitions)} ease');
background: _palette(bg);
height: 3em;
left: 0;
line-height: 3em;
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
@include vendor('transition', 'background-color #{_duration(transitions)} ease');
background: _palette(bg);
z-index: _misc(z-index-base);
height: 3em;
line-height: 3em;
padding-left: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
@include breakpoint(small) {
position: initial;
height: auto;
line-height: inherit;
display: block;
margin: 0 auto;
text-align: center
}
}
.header.alt {
background: transparent;
h1 {
@include vendor('transition', 'opacity #{_duration(transitions)} ease');
height: inherit;
left: 1.25em;
line-height: inherit;
position: absolute;
top: 0;
a {
border: 0;
display: block;
height: inherit;
line-height: inherit;
@include breakpoint(small) {
font-size: 0.8em;
}
}
@include vendor('pointer-events', 'none');
opacity: 0;
}
}
nav {
.header-home {
@include vendor('transition', 'opacity #{_duration(transitions)} ease');
margin: 0;
padding: 0;
a {
border: 0;
display: block;
height: inherit;
line-height: inherit;
position: absolute;
right: 0;
top: 0;
> ul {
list-style: none;
margin: 0;
padding: 0;
white-space: nowrap;
> li {
display: inline-block;
padding: 0;
> a {
border: 0;
color: _palette(fg-bold);
display: block;
font-size: 0.8em;
letter-spacing: _size(letter-spacing-alt);
padding: 0 1.5em;
text-transform: uppercase;
&.menuToggle {
outline: 0;
position: relative;
&:after {
background-image: url('images/bars.svg');
background-position: right center;
background-repeat: no-repeat;
content: '';
display: inline-block;
height: 3.75em;
vertical-align: top;
width: 2em;
}
@include breakpoint(small) {
padding: 0 1.5em;
span {
display: none;
}
}
}
@include breakpoint(small) {
padding: 0 0 0 1.5em;
}
}
&:first-child {
margin-left: 0;
}
}
}
}
&.alt {
background: transparent;
h1 {
@include vendor('pointer-events', 'none');
opacity: 0;
}
@include breakpoint(small) {
padding: 1rem 0;
}
}
}
.header-nav {
display: flex;
list-style: none;
margin: 0;
padding: 0;
li { padding: 0; }
@include breakpoint(small) {
justify-content: space-around;
padding-bottom: 0.5rem;
}
}
.header-link {
border: 0;
color: _palette(fg-bold);
font-size: 0.8em;
letter-spacing: _size(letter-spacing-alt);
padding: 0 1.5rem;
text-transform: uppercase;
@include breakpoint(small) {
padding: 0 0.75rem;
}
}