website/assets/scss/style.scss

522 lines
11 KiB
SCSS

$bg_color: {{ .Site.Params.backgroundColor | default "#242629" }};
$fg_color: {{ .Site.Params.foregroundColor | default "white" }};
$dim_fg_color: {{ .Site.Params.dimForegroundColor | default "#bababa" }};
$stroke_color: {{ .Site.Params.strokeColor | default "#4f4f4f" }};
$accent_color: {{ .Site.Params.accentColor | default "#db5793" }};
$main_font: {{ .Site.Params.fontFamily | default "JetBrains Mono" }};
$mono_font: {{ .Site.Params.monospaceFontFamily | default "JetBrains Mono" }};
$highlight_bg_color: {{ .Site.Params.highlightBgColor | default "#34363b" }};
$content_width: {{ .Site.Params.contentWidth | default "1000px" }};
$border_radius: 10px;
$content_spacing: 25px;
::selection, ::-moz-selection {
background: $accent_color;
color: $fg_color;
}
a {
transition: all .15s ease-in-out;
}
body, html {
font-family: "Symbols Nerd Font", $main_font, monospace;
margin: 0;
padding: 0;
background-color: $bg_color;
color: $fg_color;
}
body {
min-height: 100vh;
}
a {
color: $fg_color;
text-decoration: none;
border-bottom: 2px solid $fg_color;
&:hover, &:focus {
border-color: $accent_color !important;
}
}
#content {
max-width: $content_width;
padding: 15px;
margin: auto;
}
footer {
color: $dim_fg_color;
a {
color: $dim_fg_color;
}
hr {
margin-top: (2 * $content_spacing);
}
.footerColumns {
font-size: .9rem;
display: flex;
flex-direction: row;
flex-wrap: wrap;
ul {
margin: ($content_spacing / 2);
list-style-type: none;
padding: 0;
li > strong {
font-size: 1rem;
}
}
}
}
#links {
padding: 5px 0;
}
article, .articlePreview {
img {
margin: auto;
display: block;
max-width: 100%;
}
pre, code {
overflow: auto;
}
pre {
padding: 20px;
border: 1px solid $stroke_color;
border-radius: 3px;
}
}
code {
font-family: $mono_font, monospace;
font-size: .8em;
padding: 2px;
border: 1px solid $stroke_color;
border-radius: 3px;
}
pre code {
border: none;
border-radius: none;
padding: 0
}
.date, .date a {
color: $dim_fg_color;
border-color: $dim_fg_color;
font-size: .9em;
}
#pageNavigation, .nerdlink, nav {
a {
border-bottom: none;
&:hover {
border-bottom: none;
}
}
}
#pageNavigation {
text-align: right;
a {
color: $accent_color;
}
&.nav-circles {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-end;
align-items: center;
a, span {
margin: 5px;
text-align: center;
display: inline-block;
width: 40px;
height: 40px;
line-height: 40px;
padding: auto;
border-radius: 100%;
background-color: $highlight_bg_color;
color: $fg_color;
}
span {
background-color: $accent_color;
}
a:hover {
background-color: $accent_color;
}
}
}
h1, h2, h3, h4, h5, h6 {
a {
color: $accent_color;
border-bottom: none;
}
}
.nerd {
font-family: "Symbols Nerd Font", $mono_font;
font-size: 1.2em;
margin: 5px;
display: inline-block;
}
.nerdlink {
transition: all .15s ease-in-out;
@extend .nerd;
color: $fg_color;
border-bottom: none;
position: relative;
width: 1em;
height: 1.2em;
display: inline-flex;
align-items: center;
justify-content: center;
.pseudofont {
transition: all .15s ease-in-out;
fill: $fg_color;
display: inline;
position: relative;
top: 1px;
}
span {
position: absolute;
top: 1.5em;
left: 50%;
transform: translateX(-50%);
padding: 2px;
border: 1px solid $stroke_color;
border-radius: 3px;
color: $fg_color;
display: none;
background-color: $bg_color;
z-index: 900;
text-align: center;
}
&:hover {
.pseudofont {
fill: $accent_color;
}
color: $accent_color;
text-decoration: none;
border-bottom: none;
span {
display: block;
}
}
}
.card {
padding-bottom: 25px;
&.discrete {
background-color: $highlight_bg_color;
border-radius: $border_radius;
padding: 20px;
padding-top: 1px;
}
}
.postlist {
display: grid;
grid-gap: 25px;
margin-bottom: $content_spacing;
grid-template-columns: 1fr;
&.gridView {
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
.card {
&.discrete {
}
}
}
}
// only hide hr in cards if they are in the article list
// cards in list are divs, cards as in full-blown articles use the article tag
.postlistitem.card.discrete {
hr { display: none; }
}
.postlistitem.card div {
img {
height: 250px;
min-width: 100%;
object-fit: cover;
}
}
ul {
li {
margin: 5px 0;
}
}
ul.list {
.date {
display: inline-block;
min-width: 100px;
}
}
#commento {
margin-top: 25px;
color: $fg_color;
font-family: $main_font, monospace;
textarea, #commento-markdown-help-root {
background: rgba(255, 255, 255, .05);
color: $fg_color;
border-radius: 0;
border: none;
td, td>*, td>*>* {
color: $fg_color;
pre {
font-family: $mono_font, monospace;
color: $dim_fg_color;
}
}
}
#commento-submit-button-root {
background: $accent_color;
color: $fg_color;
}
.commento-name {
color: $dim_fg_color;
}
.commento-sort-policy-buttons {
a {
border-bottom: none;
}
.commento-sort-policy-button-selected {
color: $accent_color;
}
}
.commento-card {
border-top: none;
margin: 25px 0;
}
.commento-body {
>*, *>*, >*>*>*, >*>*>*>*, >*>*>*>*>* {
color: $fg_color;
font-family: $main_font, monospace;
}
}
}
.search {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin: 12px 0;
.nerdlink {
display: inline-block;
cursor: pointer;
}
#searchbar {
@extend a;
width: 100%;
display: inline-block;
background-color: transparent;
border-top: none;
border-left: none;
border-right: none;
padding: 6px 0;
font-family: $main_font;
font-size: 1.3em;
outline: none;
}
}
.titleAndSearchContainer {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
#titleContainer {
flex-grow: 99;
}
.search {
flex-grow: 1;
&, #searchbar {font-size: 1em;}
}
}
.featuredCardLink {
border: none;
padding: 0;
.featuredCard {
@extend .card;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
position: relative;
height: 250px;
.contentArea {
position: absolute;
bottom: 0;
padding: 15px;
&, h2, .date {color: white;}
h2 {
margin: 0;
}
.date {
margin: 0;
}
}
&.discrete {
border-radius: $border_radius;
padding: 0;
}
}
}
@mixin buttonLikeLink {
display: inline-block;
border-radius: $border_radius;
background-color: $highlight_bg_color;
padding: ($content_spacing / 2);
margin: ($content_spacing / 6) 0;
border-bottom: none;
&:hover, &:focus {
background-color: $accent_color;
}
}
.loadMoreButton {
text-align: center;
font-size: 1.2rem;
font-weight: bold;
&.buttonLike {
a {
@include buttonLikeLink;
}
}
}
.relatedArticlesContainer {
margin: $content_spacing 0;
#relatedArticles .postlistitem {
@extend .featuredCard;
}
}
#titleContainer {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-start;
align-self: flex-start;
h1 {
font-weight: normal;
font-size: 1.6em;
margin: 0;
}
img {
margin-right: ($content_spacing / 2);
margin-top: 7px;
align-self: flex-start;
width: 50px;
max-height: 50px;
border-radius: 5px;
}
}
nav, #links {
ul {
list-style-type: none;
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding: 0;
margin: 0;
}
}
header {
margin-bottom: $content_spacing;
.titleAndHamburger {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-start;
justify-content: space-between;
}
nav {
font-size: .9em;
ul {
li {
border-right: 1px solid $accent_color;
&:last-child {
border-right: none;
}
a {
padding: 2px 20px;
color: $accent_color;
&:hover {
text-decoration: underline;
}
}
}
}
}
}
.articleTagsContainer {
margin: $content_spacing 0;
}
a.discreteTag {
@include buttonLikeLink;
}
{{ if .Site.Params.mobileHamburgerNav | default false }}
header {
#hamburger-menu {
@extend .nerdlink;
display: none !important;
}
#main-nav-toggler {
display: none;
}
}
@media only screen and (max-width: 520px) {
header {
#hamburger-menu {
display: block !important;
font-size: 1.2rem;
cursor: pointer;
text-align: center;
margin: 0;
padding: ($content_spacing / 4);
align-self: center;
}
nav {
ul#main-nav {
display: none;
flex-direction: column;
li {
border-right: none !important;
display: block;
text-align: right;
a {
padding-left: 0;
padding-right: ($content_spacing / 4);
}
}
}
#main-nav-toggler:checked ~ #main-nav {
display: flex;
}
}
}
}
{{ end }}