mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 11:38:28 -04:00
189 lines
3.7 KiB
SCSS
189 lines
3.7 KiB
SCSS
@charset "UTF-8";
|
|
|
|
// Global Header Styles
|
|
header {
|
|
width: 100%;
|
|
padding: 0 1.5em;
|
|
box-sizing: border-box;
|
|
border-bottom: 1px solid;
|
|
|
|
@include colors() {
|
|
border-color: c(kinda-light);
|
|
}
|
|
|
|
nav {
|
|
width: 100%;
|
|
max-width: $max-width;
|
|
margin: 0 auto;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
|
|
a#logo {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
@include colors() {
|
|
color: c(medium-dark);
|
|
}
|
|
|
|
h1#name {
|
|
margin: 0.95em 0 0.95em 0.725em;
|
|
font-size: 1.35em;
|
|
font-weight: 500;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
svg {
|
|
width: 28px;
|
|
height: 40px;
|
|
}
|
|
|
|
// mix up logo colors on hover
|
|
&:hover {
|
|
@include colors() {
|
|
color: c(links);
|
|
}
|
|
|
|
svg {
|
|
g#c1 {
|
|
fill: $color-logo2;
|
|
}
|
|
g#c2 {
|
|
fill: $color-logo3;
|
|
}
|
|
g#c3 {
|
|
fill: $color-logo1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Horizontal emoji links
|
|
ul {
|
|
list-style: none;
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: 1.2em;
|
|
letter-spacing: -0.002em;
|
|
|
|
li {
|
|
text-align: right;
|
|
margin-left: 1.7em;
|
|
|
|
a {
|
|
display: inline-block;
|
|
transition: transform 0.15s ease-in-out;
|
|
|
|
@include colors() {
|
|
color: c(medium-dark);
|
|
}
|
|
|
|
&:hover {
|
|
transform: scale(1.1);
|
|
|
|
@include colors() {
|
|
color: c(links);
|
|
}
|
|
}
|
|
|
|
span.icon {
|
|
font-size: 1.15em;
|
|
vertical-align: -0.075em;
|
|
}
|
|
|
|
span.text {
|
|
font-size: 0.8em;
|
|
font-weight: 500;
|
|
margin-left: 0.5em;
|
|
}
|
|
}
|
|
|
|
// no margin on the first child to make more room on narrow windows (before responsiveness kicks in).
|
|
// last child is the dark mode toggle -- margin is set directly on it in case it's hidden (if JS is disabled).
|
|
&:first-child,
|
|
&:last-child {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
// Dark mode toggle
|
|
button.dark-mode-toggle {
|
|
// native button reset
|
|
border: 0;
|
|
padding: 0;
|
|
|
|
// prepare for lightbulb symbol depending on active theme (set in components/_global)
|
|
background-color: transparent;
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
|
|
height: 1.5em;
|
|
width: 1em;
|
|
margin-left: 1.7em;
|
|
cursor: pointer;
|
|
|
|
// hidden by default in case user's JS is disabled, switches to `block` onload in dark-mode.js
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Responsive
|
|
@mixin responsive--header() {
|
|
header {
|
|
padding: 1em 1.25em;
|
|
|
|
nav {
|
|
a#logo {
|
|
img,
|
|
svg {
|
|
width: 36px;
|
|
height: 54px;
|
|
}
|
|
|
|
h1#name {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
ul {
|
|
font-size: 1.6em;
|
|
|
|
li {
|
|
margin-left: 1.15em;
|
|
|
|
a {
|
|
span.icon {
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
// hide text next to emojis on mobile
|
|
span.text {
|
|
display: none;
|
|
}
|
|
|
|
// disable hover scale effect
|
|
&:hover {
|
|
transform: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Dark mode toggle
|
|
button.dark-mode-toggle {
|
|
// TODO: figure out need for weird magic numbers here
|
|
height: 1.025em;
|
|
width: 0.75em;
|
|
margin-top: 0.15em;
|
|
margin-left: 1.15em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|