1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 09:38:27 -04:00
jarv.is/assets/style.scss
2019-09-25 16:36:46 -04:00

662 lines
13 KiB
SCSS

/* JJ SCSS */
/* Compiled from https://github.com/jakejarvis/jarv.is/blob/master/assets/style.scss */
// Global Colors
$color-background: #ffffff;
$color-text: #202020;
$color-light: #666666;
$color-medium-light: #9e9e9e;
$color-super-light: #dddddd;
$color-super-duper-light: #f4f4f4;
$color-links: #036e9b;
// Colorful Homepage
$colors-home:(
boston: #fb4d42,
javascript: #f48024,
node: #6fbc4e,
golang: #00acd7,
react: #4fb3cd,
angular: #c3002f,
vue: #486491,
java: #ab6311,
cpp: #865fc5,
python: #fea500,
php: #8892bf,
ruby: #d34135,
infosec: #00b81a,
server: #0098ec,
devops: #ff6200,
containers: #c48f49,
y2k: #4169e1,
jbb: #9932cc,
github: #8d4eff,
linkedin: #0073b1,
facebook: #4267b2,
twitter: #00acee,
dm: #00acee,
instagram: #a37754,
mastodon: #6d8ca7,
resume: #d54b3d,
email: #de0c0c,
pgp: #777777,
sms: #6fcc01,
news-1: #ff1b1b,
news-2: #f78200,
news-3: #f2b702,
news-4: #5ebd3e,
news-5: #009cdf,
news-6: #3e49bb,
news-7: #973999
);
$color-serverless: #87cef7;
$color-fairy: #f23e93;
// Global Styles
* {
box-sizing: border-box;
}
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";
font-weight: 300;
font-size: 24px;
line-height: 1.5;
a {
color: $color-links;
background-color: transparent;
text-decoration: none;
border-bottom: 1px solid transparent;
&:hover {
border-color: mix($color-links, $color-background, 40%);
}
}
// Home Styles
&#home {
max-width: 1070px;
padding: 60px;
img#me {
float: right;
margin: 0 0 20px 20px;
padding: 4px;
border: 1px solid $color-super-light;
width: 160px;
height: 160px;
}
h1 {
margin: 0 0 20px 0;
font-size: 1.5em;
font-weight: 500;
line-height: 1;
}
h2 {
margin: 20px 0;
font-size: 1.2em;
font-weight: 400;
line-height: 1.4;
}
p {
margin: 20px 0;
font-size: 1em;
}
sup {
top: -0.5em;
font-size: 0.5em;
line-height: 0;
position: relative;
vertical-align: middle;
}
h1 a {
color: inherit;
border: none;
}
a {
// Loop through $colors-home -- the main reason I'm using SASS :)
@each $id, $color in $colors-home {
&##{$id} {
color: $color;
&:hover {
border-color: mix($color, $color-background, 40%);
}
}
}
}
span {
&#serverless {
color: $color-serverless;
}
&#shh {
color: $color-medium-light;
}
&#fairy {
color: $color-fairy;
&:hover {
cursor: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzNiIgdmlld3BvcnQ9IjAgMCAxMDAgMTAwIiBzdHlsZT0iZm9udC1zaXplOjE4cHgiPjx0ZXh0IHk9IjUwJSI+8J+nmjwvdGV4dD48L3N2Zz4=) 5 5, auto;
}
}
}
footer {
margin: 0;
height: 40px;
div {
float: left;
vertical-align: middle;
line-height: 40px;
height: 100%;
&#blog {
width: 40%;
text-align: left;
font-size: 0.9em;
}
&#panda {
width: 20%;
text-align: center;
font-size: 1em;
span {
text-align: center;
width: 12px;
}
}
&#info {
width: 40%;
font-size: 0.55em;
color: $color-light;
text-align: right;
a {
color: $color-light;
&#source {
border-bottom: 1px solid $color-super-light;
}
}
}
}
}
h1 span#wave {
display: inline-block;
animation-name: wave;
animation-duration: 2.5s;
animation-iteration-count: infinite;
transform-origin: 70% 70%;
}
}
// Blog Styles
&#notes {
font-size: 18px;
font-weight: 400;
max-width: 1010px;
padding: 20px 50px;
header {
font-size: 16px;
margin-top: 20px;
margin-bottom: 40px;
a {
&#more {
border: none;
font-size: 18px;
font-weight: 400;
}
&#logo {
border: none;
margin: 20px auto;
display: block;
img, svg {
height: 150px;
width: 100px;
margin: 0 auto;
display: block;
border: none;
}
}
}
}
footer {
border-top: 1px solid $color-super-light;
height: 40px;
font-size: 24px;
padding-top: 16px;
margin-top: 30px;
margin-bottom: 20px;
a {
color: $color-light;
border: none;
}
div {
float: left;
vertical-align: middle;
line-height: 40px;
height: 100%;
&#copyright, &#poweredby {
width: 40%;
font-size: 0.55em;
color: $color-light;
}
&#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: 1em;
span {
text-align: center;
width: 12px;
}
}
}
}
main {
&#single article div {
&#content {
font-size: 16px;
line-height: 1.8;
object-fit: contain;
}
&#info {
text-align: center;
h1 {
margin-top: 0;
margin-bottom: 20px;
font-size: 32px;
line-height: 1.4;
a {
color: $color-text;
border: none;
}
}
}
&#content {
h1, h2, h3 {
margin-top: 18px;
margin-bottom: 10px;
font-weight: 500;
line-height: 1.5;
}
}
&.meta {
margin: -5px 0 0 0;
color: $color-light;
font-size: 13px;
line-height: 1.5;
letter-spacing: 1px;
a {
color: $color-light;
border: none;
}
div.tags {
text-transform: uppercase;
line-height: 1.5;
letter-spacing: 2px;
margin-top: 5px;
span.tag {
color: $color-light;
border: none;
margin: 0 7px;
a {
color: $color-light;
border: none;
}
}
}
}
&#content {
img {
max-width: 100%;
margin: 0 auto;
display: block;
object-fit: scale-down;
+ em {
display: block;
text-align: center;
font-size: 15px;
color: $color-light;
margin-top: 5px;
}
}
figure figcaption {
display: block;
text-align: center;
font-size: 15px;
color: $color-light;
margin-top: 5px;
}
blockquote {
border-left: 6px solid $color-links;
margin-left: 6px;
padding-left: 15px;
}
ul {
list-style-position: inside;
list-style-type: square;
margin-left: 12px;
padding-left: 0;
}
hr {
width: 60%;
margin: 10px auto;
border: 1px solid $color-super-light;
}
video.embed {
display: block;
margin: 0 auto;
}
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: none;
margin-bottom: 10px;
display: inline-block;
}
}
twitter-widget {
margin: 0 auto;
display: block;
}
code {
font-family: monospace;
background: $color-super-duper-light;
padding: 0.2em;
border: 1px solid $color-super-light;
font-size: 16px;
}
pre code {
padding: 1em 1.5em;
line-height: 1.6;
page-break-inside: avoid;
border: 1px solid $color-super-light;
border-left: 3px solid $color-links;
overflow-x: scroll;
display: block;
max-width: 100%;
object-fit: scale-down;
}
}
&#commento {
border-top: 1px solid #ccc;
padding-top: 20px;
margin-top: 20px;
div#commento-footer {
display: none;
}
}
}
&#archive section.year {
ul {
list-style-type: none;
padding-left: 0;
display: block;
}
li {
&::after {
content: '';
display: block;
clear: both;
}
&:last-child {
margin-bottom: 20px;
}
+ li {
padding-top: 20px;
}
}
div {
&.date {
float: left;
color: $color-light;
width: 100px;
font-weight: 400;
}
&.title {
float: left;
width: calc(100% - 100px);
}
}
}
}
}
}
// Responsive Awesomeness
@media screen and (max-width: 800px) {
// Responsive Home
body#home {
font-size: 16px;
padding: 30px;
img#me {
width: 70px;
height: 70px;
padding: 2px;
margin: 0 0 10px 10px;
}
h1 {
margin: 0 0 12px 0;
}
h2 {
margin: 12px 0;
}
p {
font-size: 1.1em;
line-height: 1.5;
margin: 12px 0;
}
footer div {
&#panda {
display: none;
}
&#blog {
width: 50%;
line-height: 20px;
}
&#info {
width: 50%;
line-height: 20px;
font-size: 0.7em;
}
&#blog {
font-size: 1em;
}
&#info span#copyright::after {
content: "\A";
white-space: pre;
}
}
}
// Responsive Blog
body#notes {
padding: 30px;
width: 100%;
max-width: 100%;
main#single article {
width: 100%;
max-width: 100%;
div.meta {
font-size: 14px;
}
}
header {
margin-top: 0;
margin-bottom: 20px;
a#logo {
img, svg {
height: 75px;
width: 50px;
}
}
}
footer {
margin-bottom: 30px;
div {
&#panda {
display: none;
}
&#copyright {
width: 50%;
font-size: 14px;
line-height: 1.8;
}
&#poweredby {
width: 50%;
font-size: 14px;
line-height: 1.8;
a#hugo::after {
content: "\A";
white-space: pre;
}
}
}
}
}
}
/* Fancy Waving Hand Emoji (TM) - https://jarv.is/notes/css-waving-hand-emoji/ */
@keyframes wave {
0% { transform: rotate( 0.0deg); }
10% { transform: rotate(-10.0deg); }
20% { transform: rotate( 12.0deg); }
30% { transform: rotate(-10.0deg); }
40% { transform: rotate( 9.0deg); }
50% { transform: rotate( 0.0deg); }
100% { transform: rotate( 0.0deg); }
}
/* Syntax Highlighting - modified from Monokai Light https://github.com/mlgill/pygments-style-monokailight */
div.highlight span {
&.k, &.kc, &.kd, &.kp, &.kr, &.kt, &.no {
color: #03748a;
}
&.n, &.bp, &.nb, &.ni, &.fm, &.nl, &.nn, &.py, &.nv, &.vc, &.vg, &.vi, &.vm, &.p {
color: #111111;
}
&.na, &.nc, &.nd, &.ne, &.nf, &.nx {
color: #489c44;
}
&.err, &.nt, &.o, &.ow, &.kn {
color: #e8003d;
}
&.l, &.se, &.m, &.mb, &.mf, &.mh, &.mi, &.il, &.mo {
color: #8145ec;
}
&.ld, &.s, &.sa, &.sb, &.sc, &.dl, &.sd, &.s2, &.sh, &.si, &.sx, &.sr, &.s1, &.ss {
color: #c17005;
}
&.c, &.ch, &.cm, &.c1, &.cs, &.cp, &.cpf {
color: #6b6859;
}
&.ge {
font-style: italic;
}
&.gs {
font-weight: bold;
}
}