1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-18 00:00:48 -05:00

global header/navbar on all pages like a grown-up website (#17)

This commit is contained in:
2019-11-24 18:07:12 -05:00
committed by GitHub
parent 2bb25a6a5f
commit 8ccd15ab87
30 changed files with 616 additions and 640 deletions

View File

@@ -1,47 +0,0 @@
@charset "UTF-8";
// Global Styles
body {
width: 100%;
height: 100%;
margin: 0 auto;
background-color: $color-background;
color: $color-text;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
"Droid Sans", "Helvetica Neue", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
box-sizing: border-box;
a {
color: $color-links;
text-decoration: none;
background-image: underline-hack($color-links);
background-position: 0% 100%;
background-repeat: no-repeat;
background-size: 0% $link-underline-size;
padding-bottom: $link-underline-size;
transition: background-size 0.25s ease-in-out;
&:hover {
text-decoration: none;
background-size: 100% $link-underline-size;
}
&.no-underline {
background: none !important;
}
}
}
// Responsive
@mixin responsive--global() {
body {
// Safari iOS menu bar reappers below 44px:
// https://www.eventbrite.com/engineering/mobile-safari-why/
padding-bottom: 45px !important;
// Allows you to scroll below the viewport; default value is visible
overflow-y: scroll;
}
}

View File

@@ -1,12 +1,12 @@
@charset "UTF-8";
// Home Styles
body#home {
font-size: 1.5em;
main#home {
font-size: 1.35em;
font-weight: 300;
line-height: 1.5;
max-width: 1070px;
padding: 50px 65px;
max-width: 980px;
padding: 1.5em 1.75em;
margin: 0 auto;
a {
// Loop through $colors-home -- the main reason I switched to SASS :)
@@ -18,20 +18,24 @@ body#home {
}
}
h1 {
margin: 0;
font-size: 1.5em;
h2 {
margin: 0 0 0.6em 0;
font-size: 1.4em;
font-weight: 500;
line-height: 1.2;
a {
color: inherit;
span#wave {
display: inline-block;
animation-name: wave;
animation-duration: 2.5s;
animation-iteration-count: infinite;
transform-origin: 70% 70%;
}
}
h2 {
h3 {
margin: 0.6em 0;
font-size: 1.2em;
font-size: 1.15em;
font-weight: 400;
line-height: 1.4;
}
@@ -75,109 +79,30 @@ body#home {
}
}
footer {
display: flex;
justify-content: space-between;
p#blog {
font-size: 0.9em;
margin-bottom: 0;
div {
vertical-align: middle;
height: 100%;
&#blog {
width: 40%;
text-align: left;
font-size: 0.9em;
line-height: 2;
span {
margin-right: 4px;
}
}
&#info {
width: 40%;
text-align: right;
font-size: 0.55em;
line-height: 3.35; // magic numbers don't judge
color: $color-light;
a {
color: inherit;
&#source {
border-bottom: 1px solid $color-super-light;
}
}
}
&#panda {
width: 20%;
text-align: center;
font-size: 1.25em;
line-height: 1.4; // magic numbers don't judge
a {
display: inline-block;
transition: transform 0.2s ease-in-out;
&:hover {
transform: scale(1.6) rotate(10deg);
}
}
}
span {
margin-right: 4px;
}
}
h1 span#wave {
display: inline-block;
animation-name: wave;
animation-duration: 2.5s;
animation-iteration-count: infinite;
transform-origin: 70% 70%;
}
}
// Responsive
@mixin responsive--home() {
body#home {
font-size: 1em;
padding: 25px;
main#home {
font-size: 1.1em;
p {
p, p#blog {
font-size: 1.1em;
}
img#me {
width: 68px;
height: 68px;
width: 100px;
height: 100px;
padding: 2px;
}
footer div {
&#panda {
display: none;
}
&#blog,
&#info {
width: 50%;
}
&#blog {
font-size: 1em;
line-height: 1.5;
}
&#info {
font-size: 0.7em;
line-height: 2.1; // magic numbers don't judge
span#copyright::after {
content: "\A";
white-space: pre;
}
}
}
}
}

View File

@@ -0,0 +1,64 @@
@charset "UTF-8";
// Archive/List Styles
main#list {
max-width: 1010px;
padding: 1.5em 3em;
margin: 0 auto;
section.year {
font-size: 1.1em;
/* stylelint-disable-next-line no-descending-specificity */
h2 {
font-size: 1.8em;
margin: 0;
}
/* stylelint-disable-next-line no-descending-specificity */
ul {
list-style-type: none;
padding-left: 0;
display: block;
}
/* stylelint-disable-next-line no-descending-specificity */
li {
display: flex;
div.date {
color: $color-light;
width: 5.25em;
flex-shrink: 0;
}
&::after {
content: '';
display: block;
clear: both;
}
/* stylelint-disable-next-line no-descending-specificity */
&:last-child {
margin-bottom: 1.8em;
}
/* stylelint-disable-next-line no-descending-specificity */
+ li {
margin-top: 1.3em;
}
}
}
}
// Responsive
@mixin responsive--list() {
main#list {
padding: 1em 1.2em;
section.year {
font-size: 1em;
}
}
}

View File

@@ -1,389 +0,0 @@
@charset "UTF-8";
// Blog Styles
body#notes {
line-height: 1.5;
font-weight: 400;
max-width: 1010px;
padding: 0 50px 35px 50px;
header {
border-bottom: 1px solid $color-super-light;
margin-bottom: 25px;
nav {
width: 100%;
padding: 8px 0;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
a#logo {
display: flex;
align-items: center;
color: $color-medium;
padding: 15px;
&:hover {
color: $color-links;
}
img,
svg {
width: 30px;
height: 45px;
}
span#name {
margin-left: 20px;
font-size: 1.4em;
font-weight: 500;
}
}
ul {
list-style: none;
display: flex;
align-items: center;
font-size: 1.5em;
line-height: 1;
padding: 0;
margin-right: 15px;
li {
width: 60px;
text-align: right;
a {
display: inline-block;
transition: transform 0.15s ease-in-out;
&:hover {
transform: scale(1.4);
}
}
}
}
}
}
footer {
border-top: 1px solid $color-super-light;
line-height: 1.7;
padding-top: 1.5em;
margin-top: 2em;
color: $color-light;
display: flex;
justify-content: space-between;
/* stylelint-disable-next-line no-descending-specificity */
a {
color: inherit;
}
div {
&#copyright,
&#poweredby {
width: 40%;
font-size: 0.85em;
line-height: 2;
}
&#copyright {
text-align: left;
}
&#poweredby {
text-align: right;
a#source {
border-bottom: 1px solid $color-super-light;
}
}
&#panda {
width: 20%;
text-align: center;
font-size: 1.7em;
line-height: 1;
a {
display: inline-block;
transition: transform 0.2s ease-in-out;
&:hover {
transform: scale(1.6) rotate(10deg);
}
}
}
}
}
main {
&#single article div {
&#meta {
color: $color-light;
font-size: 0.85em;
line-height: 1.5;
letter-spacing: 1px;
a {
color: inherit;
}
div#tags {
text-transform: uppercase;
letter-spacing: 2px;
margin-top: 0.5em;
span.tag {
margin: 0 0.6em;
}
}
}
&#info {
text-align: center;
h1 {
margin: 0.3em 0;
font-size: 2em;
line-height: 1.4;
a {
color: inherit;
}
}
}
&#content {
line-height: 1.8;
h1,
h2,
h3 {
margin-top: 0.9em;
margin-bottom: 0.5em;
font-weight: 500;
line-height: 1.5;
}
img,
figure {
height: auto;
max-width: 100%;
margin: 1em auto;
display: block;
}
// reduce margin between image and caption
figure img {
margin-bottom: 0.4em;
}
// image captions -- two different markdown hacks
img + em,
figure figcaption {
display: block;
font-size: 0.9em;
font-style: normal;
color: $color-light;
text-align: center;
}
blockquote {
border-left: 5px solid $color-links;
margin-left: 0.5em;
padding-left: 1em;
}
ul {
list-style-position: outside;
list-style-type: square;
margin-left: 1.5em;
padding-left: 0;
li {
padding-left: 0.25em;
}
}
hr {
width: 60%;
margin: 0.75em auto;
border: 1px solid $color-super-light;
}
video.embed {
display: block;
margin: 1em auto;
max-width: 100%;
height: auto;
border: 0;
}
div.embed.video-player {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
iframe.youtube-player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
display: inline-block;
}
}
iframe.twitter-tweet, twitter-widget {
margin: 0 auto;
display: block;
}
iframe {
border: 0;
}
code {
// https://markdotto.com/2018/02/07/github-system-fonts/
font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", "Courier", monospace;
font-size: 0.9em;
padding: 0.2em;
background: $color-super-duper-light;
border: 1px solid $color-super-light;
}
pre code {
display: block;
padding: 1em 1.5em;
margin: 1.4em 0;
line-height: 1.6;
border-left: 3px solid $color-links;
max-width: 100%;
overflow-x: scroll;
page-break-inside: avoid;
object-fit: scale-down;
}
}
}
&#archive section.year {
font-size: 1.1em;
/* stylelint-disable-next-line no-descending-specificity */
ul {
list-style-type: none;
padding-left: 0;
display: block;
}
/* stylelint-disable-next-line no-descending-specificity */
li {
display: flex;
div.date {
color: $color-light;
width: 5.25em;
flex-shrink: 0;
}
&::after {
content: '';
display: block;
clear: both;
}
/* stylelint-disable-next-line no-descending-specificity */
&:last-child {
margin-bottom: 1.8em;
}
/* stylelint-disable-next-line no-descending-specificity */
+ li {
margin-top: 1.3em;
}
}
/* stylelint-disable-next-line no-descending-specificity */
h2 {
font-size: 1.8em;
}
}
}
}
// Responsive
@mixin responsive--notes() {
body#notes {
padding: 0 20px;
width: 100%;
max-width: 100%;
header {
nav {
padding: 5px 0;
a#logo {
padding: 10px;
img,
svg {
width: 40px;
height: 60px;
}
span#name {
display: none;
}
}
ul {
font-size: 1.75em;
margin-right: 10px;
li {
width: 55px;
}
}
}
}
footer div {
&#panda {
display: none;
}
&#copyright,
&#poweredby {
line-height: 1.8;
width: 50%;
}
&#poweredby {
a#hugo::after {
content: "\A";
white-space: pre;
}
}
}
main#archive section.year {
font-size: 1em;
}
main#single article {
width: 100%;
max-width: 100%;
div#info h1 {
font-size: 1.7em;
}
}
}
}

View File

@@ -0,0 +1,177 @@
@charset "UTF-8";
// Post Styles
main#single {
max-width: 910px;
padding: 1em 3em;
margin: 0 auto;
article div {
&#meta {
color: $color-light;
font-size: 0.85em;
line-height: 1.5;
letter-spacing: 1px;
a {
color: inherit;
}
div#tags {
text-transform: uppercase;
letter-spacing: 2px;
margin-top: 0.5em;
span.tag {
margin: 0 0.6em;
}
}
}
&#info {
text-align: center;
h1 {
margin: 0.3em 0;
font-size: 2em;
line-height: 1.4;
a {
color: inherit;
}
}
}
&#content {
font-weight: 400;
line-height: 1.8;
h1,
h2,
h3 {
margin-top: 0.9em;
margin-bottom: 0.5em;
font-weight: 500;
line-height: 1.5;
}
img,
figure {
height: auto;
max-width: 100%;
margin: 1em auto;
display: block;
}
// reduce margin between image and caption
figure img {
margin-bottom: 0.4em;
}
// image captions -- two different markdown hacks
img + em,
figure figcaption {
display: block;
font-size: 0.9em;
font-style: normal;
color: $color-light;
text-align: center;
}
blockquote {
border-left: 5px solid $color-links;
margin-left: 0.5em;
padding-left: 1em;
}
ul {
list-style-position: outside;
list-style-type: square;
margin-left: 1.5em;
padding-left: 0;
li {
padding-left: 0.25em;
}
}
hr {
width: 60%;
margin: 0.75em auto;
border: 1px solid $color-super-light;
}
video.embed {
display: block;
margin: 1em auto;
max-width: 100%;
height: auto;
border: 0;
}
div.embed.video-player {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
iframe.youtube-player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
display: inline-block;
}
}
iframe.twitter-tweet, twitter-widget {
margin: 0 auto;
display: block;
}
iframe {
border: 0;
}
code {
// https://markdotto.com/2018/02/07/github-system-fonts/
font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", "Courier", monospace;
font-size: 0.9em;
padding: 0.2em;
background: $color-super-duper-light;
border: 1px solid $color-super-light;
}
pre code {
display: block;
padding: 1em 1.5em;
margin: 1.4em 0;
line-height: 1.6;
border-left: 3px solid $color-links;
max-width: 100%;
overflow-x: scroll;
page-break-inside: avoid;
object-fit: scale-down;
}
}
}
}
// Responsive
@mixin responsive--single() {
main#single {
padding: 0.8em 1.2em;
article {
width: 100%;
max-width: 100%;
div#info h1 {
font-size: 1.7em;
}
}
}
}

View File

@@ -1,29 +1,21 @@
@charset "UTF-8";
// Video Styles
body#videos {
margin: 75px auto;
main#video {
margin: 20px auto;
text-align: center;
p {
font-size: 0.85em;
line-height: 1.5em;
color: #777777;
margin: 0;
padding: 0 10px;
margin: 20px 10px;
}
a {
font-weight: bold;
}
a#logo svg {
height: 48px;
width: 48px;
padding: 4px;
margin: 16px 0 8px 0;
}
video {
width: $responsive-width;
height: auto;
@@ -34,12 +26,12 @@ body#videos {
// Responsive
@mixin responsive--videos() {
body#videos {
main#video {
margin: 20px 0;
h1 {
font-size: 1.6em;
padding: 0 10px;
padding: 0 15px;
}
video {