342 lines
6.7 KiB
SCSS
342 lines
6.7 KiB
SCSS
$light-text: #202020;
|
|
$dark-text: #a6a28c;
|
|
$background: #20201d;
|
|
$background-darker: darken($background, 4%);
|
|
$background-border: darken($background, 8%);
|
|
$header-color: #ff6f33;
|
|
$link-color: #ae9513;
|
|
$link-color-hover: lighten($link-color, 15%);
|
|
$logo-color: #fff;
|
|
$logo-color-hover: $link-color-hover;
|
|
$font-base: "Source Sans Pro", Ubuntu, sans-serif;
|
|
$font-title: "Zilla Slab", "Open Sans", sans-serif;
|
|
$font-article: "Merriweather", serif;
|
|
$font-monospace: "Fira Mono", monospace;
|
|
// $font-logo: "Source Sans Pro", Helvetica, sans-serif;
|
|
$font-logo: $font-title;
|
|
|
|
// Setup the function in your functions or helpers files, wherever you keep these bits.
|
|
@function headings($from:1, $to:6, $prefix:"") {
|
|
@if $from == $to {
|
|
@return $prefix + ' h#{$from}';
|
|
} @else {
|
|
@return $prefix + 'h#{$from},' + headings($from+1, $to, $prefix);
|
|
}
|
|
}
|
|
|
|
html {
|
|
font-size: 16px;
|
|
}
|
|
|
|
body {
|
|
width: 100%;
|
|
max-width: 1120px;
|
|
margin: 0 auto;
|
|
color: $light-text;
|
|
font-family: $font-base;
|
|
background-color: #212931;
|
|
background-image: url("/images/background.jpg");
|
|
background-size: 100% auto;
|
|
background-position: top center;
|
|
background-repeat: no-repeat;
|
|
background-attachment: scroll;
|
|
}
|
|
|
|
#{headings(1,6)} {
|
|
font-family: $font-title;
|
|
color: $header-color;
|
|
|
|
a {
|
|
color: $header-color;
|
|
|
|
&:focus {
|
|
background-color: rgba($header-color, 0.1);
|
|
}
|
|
&:active {
|
|
background-color: rgba($header-color, 0.2);
|
|
}
|
|
&:focus:hover {
|
|
background-color: rgba($link-color-hover, 0.1);
|
|
}
|
|
}
|
|
}
|
|
|
|
h1 {
|
|
font-size:2rem
|
|
}
|
|
|
|
h2 {
|
|
font-size:1.75em
|
|
}
|
|
|
|
h3 {
|
|
font-size:1.5em
|
|
}
|
|
|
|
h4 {
|
|
font-size:1.25em
|
|
}
|
|
|
|
a {
|
|
display: inline-block;
|
|
color: $link-color;
|
|
transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
|
|
text-decoration: none;
|
|
outline: 0;
|
|
|
|
&:hover {
|
|
color: $link-color-hover;
|
|
}
|
|
&:focus {
|
|
background-color: rgba($link-color, 0.1);
|
|
}
|
|
&:active {
|
|
background-color: rgba($link-color-hover, 0.2);
|
|
}
|
|
}
|
|
|
|
body > header#banner {
|
|
text-align: center;
|
|
margin: 0.5em 0;
|
|
}
|
|
@media (max-width: 400px) {
|
|
body > header#banner {
|
|
margin-top: 1em;
|
|
min-height: auto;
|
|
background: none
|
|
}
|
|
}
|
|
|
|
body > header#banner .logo {
|
|
display: inline-block;
|
|
margin: 0.5em 0;
|
|
overflow: visible;
|
|
white-space: nowrap;
|
|
text-decoration: none;
|
|
user-select: none;
|
|
|
|
// TODO: update these!
|
|
transition: border-color 0.2s ease-in-out, color 0.2s ease-in-out, background-color 0.2s ease-in-out, opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
|
|
color: $logo-color;
|
|
border-style: solid;
|
|
border-color: $logo-color;
|
|
border-width: 5px !important;
|
|
font-family: $font-logo;
|
|
font-size: 2.25rem;
|
|
font-weight: 900;
|
|
letter-spacing: 0.075em;
|
|
line-height: 1;
|
|
padding: 1rem 1.75rem;
|
|
text-transform: uppercase;
|
|
}
|
|
body > header#banner .logo:hover {
|
|
border-color: $logo-color-hover !important;
|
|
color: $logo-color-hover !important;
|
|
}
|
|
body > header#banner .logo:active {
|
|
border-color: $logo-color-hover !important;
|
|
color: $logo-color-hover !important;
|
|
background-color: rgba($logo-color-hover, 0.2) !important;
|
|
}
|
|
|
|
main {
|
|
margin-bottom: 2em;
|
|
display: flex;
|
|
color: $dark-text;
|
|
border: 1px solid $background-border;
|
|
box-shadow: 0 0 10px 5px rgba($background-border, 0.4);
|
|
}
|
|
|
|
main .muted {
|
|
color: darken($dark-text, 25%);
|
|
}
|
|
|
|
main .meta {
|
|
font-family: $font-title;
|
|
}
|
|
|
|
content {
|
|
// TODO: makes font-family in article obsolete?
|
|
font-family: $font-article;
|
|
|
|
padding: 2.5em 3em;
|
|
background: $background;
|
|
flex: 1;
|
|
}
|
|
@media (max-width: 550px) {
|
|
content {
|
|
padding: 2.5em 1em;
|
|
}
|
|
}
|
|
|
|
content > header {
|
|
margin: 0;
|
|
padding-bottom: 1em;
|
|
border-bottom: 1px dashed $background-border;
|
|
}
|
|
|
|
#{headings(1,6,"content header >")} {
|
|
margin: 0;
|
|
padding-bottom: 0.3em;
|
|
border-bottom: 0;
|
|
}
|
|
|
|
content pre,
|
|
content img {
|
|
box-sizing: border-box;
|
|
background-color: $background-darker;
|
|
border: 1px solid $background-border;
|
|
box-shadow: 0 0 10px 5px rgba($background-border, 0.4);
|
|
border-radius: 4px;
|
|
}
|
|
content pre {
|
|
padding: 0.5em;
|
|
overflow: auto;
|
|
font-family: $font-monospace;
|
|
}
|
|
content img {
|
|
padding: 0.25em;
|
|
max-width: 100%;
|
|
}
|
|
content code {
|
|
padding: 0 0.2em;
|
|
display: inline-block;
|
|
font-family: $font-monospace;
|
|
background-color: $background-darker;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
sidebar {
|
|
font-family: $font-title;
|
|
width: 20em;
|
|
padding: 0.5em 1.5em 1.5em 1.5em;
|
|
box-sizing: border-box;
|
|
background: $background-darker;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
main {
|
|
flex-direction: column;
|
|
border-left: none;
|
|
border-right: none;
|
|
border-bottom: none;
|
|
margin-bottom: 0;
|
|
}
|
|
sidebar {
|
|
width: auto
|
|
}
|
|
}
|
|
|
|
sidebar {
|
|
h1 {
|
|
font-size: 1.4em;
|
|
}
|
|
#{headings(1,6)} {
|
|
margin: 0;
|
|
padding-bottom: 0.3em;
|
|
}
|
|
}
|
|
|
|
sidebar > section {
|
|
padding: 1rem 0;
|
|
|
|
ul {
|
|
margin: 0 -1.5rem;
|
|
padding: 0;
|
|
list-style-type: none;
|
|
|
|
li {
|
|
line-height: 2;
|
|
width: 100%;
|
|
|
|
a {
|
|
display: block;
|
|
padding: 0 1.5rem;
|
|
font-family: $font-title;
|
|
|
|
&:hover, &.active {
|
|
background-color: rgba($link-color, 0.1);
|
|
}
|
|
&:active {
|
|
background-color: rgba($link-color-hover, 0.2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
article {
|
|
padding: 2em 0;
|
|
font-family: $font-article;
|
|
text-align: justify;
|
|
border-bottom: 1px dashed $background-border;
|
|
|
|
// Hack to fix <pre> overflow
|
|
width: 100%;
|
|
display: table;
|
|
table-layout: fixed;
|
|
}
|
|
|
|
article.single {
|
|
padding: 0.5em 0;
|
|
}
|
|
|
|
article > header {
|
|
#{headings(1,6)} {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
.tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.tag {
|
|
display: inline-block;
|
|
border: 1px solid $background-border;
|
|
border-radius: 3px;
|
|
font-family: $font-title;
|
|
padding: 0.2em 0.4em;
|
|
line-height: 1;
|
|
margin: 0 0.2em 0.2em 0;
|
|
}
|
|
|
|
content .tag {
|
|
background-color: $background-darker;
|
|
}
|
|
sidebar .tag {
|
|
background-color: $background;
|
|
}
|
|
|
|
p {
|
|
line-height: 1.5;
|
|
}
|
|
p#zola-continue-reading {
|
|
height: 0px;
|
|
}
|
|
|
|
footer {
|
|
font-family: $font-title;
|
|
}
|
|
|
|
.anchor {
|
|
transition: opacity 0.5s ease;
|
|
opacity: 0;
|
|
font-size: 1rem;
|
|
position: relative;
|
|
left: 0.5rem;
|
|
}
|
|
*:hover > .anchor,
|
|
.anchor:active,
|
|
.anchor:focus {
|
|
opacity: 1;
|
|
}
|
|
|
|
ul {
|
|
list-style-type: disclosure-closed;
|
|
// list-style-position: inside;
|
|
padding-left: 1em;
|
|
line-height: 1.5;
|
|
}
|