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;
}
}

View File

@ -20,85 +20,3 @@
}
}
#menu {
display:none;
@include vendor('transform', 'translateX(20em)');
@include vendor('transition', 'transform #{_duration(menu)} ease');
-webkit-overflow-scrolling: touch;
background: _palette(accent1, bg);
color: _palette(accent1, fg-bold);
height: 100%;
max-width: 80%;
overflow-y: auto;
padding: 3em 2em;
position: fixed;
right: 0;
top: 0;
width: 20em;
z-index: _misc(z-index-base) + 2;
ul {
list-style: none;
padding: 0;
> li {
border-top: solid 1px _palette(accent1, border);
margin: 0.5em 0 0 0;
padding: 0.5em 0 0 0;
&:first-child {
border-top: 0 !important;
margin-top: 0 !important;
padding-top: 0 !important;
}
> a {
border: 0;
color: black;
display: block;
font-size: 0.8em;
letter-spacing: _size(letter-spacing-alt);
outline: 0;
text-decoration: none;
text-transform: uppercase;
@include breakpoint(small) {
line-height: 3em;
}
}
}
}
.close {
background-image: url('images/close.svg');
background-position: 4.85em 1em;
background-repeat: no-repeat;
border: 0;
cursor: pointer;
display: block;
height: 3em;
position: absolute;
right: 0;
top: 0;
vertical-align: middle;
width: 7em;
}
@include breakpoint(small) {
padding: 3em 1.5em;
}
}
body.is-menu-visible {
#page-wrapper {
opacity: 0.35;
&:before {
display: block;
}
}
#menu {
@include vendor('transform', 'translateX(0)');
}
}