kobel/assets/scss/index.scss

539 lines
9 KiB
SCSS
Raw Normal View History

2023-12-23 23:01:53 +00:00
$font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
2023-12-25 22:14:57 +00:00
$width: 680px;
2023-12-23 23:01:53 +00:00
2024-01-06 19:44:35 +00:00
$lightBg: white;
$lightText: black;
$darkBg: #383838;
$darkText: white;
:root {
color-scheme: light dark;
}
body {
background-color: $darkBg;
color: $darkText;
}
body.light {
background-color: $lightBg;
color: $lightText;
}
@media (prefers-color-scheme: light) {
body {
background-color: $lightBg;
color: $lightText;
}
body.dark {
background-color: $darkBg;
color: $darkText;
}
}
2023-12-23 23:01:53 +00:00
* {
box-sizing: border-box;
word-break: break-word;
}
html {
scroll-behavior: smooth;
}
2024-01-06 19:44:35 +00:00
header, footer {
background-color: black;
color: white;
}
header {
position: sticky;
top: 0;
z-index: 9;
}
2023-12-23 23:01:53 +00:00
html, body {
height: 100%;
}
body {
margin: 0;
display: flex;
flex-direction: column;
font-family: $font;
font-weight: 400;
font-style: normal;
}
h1 {
margin: 0rem;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
}
p {
margin: 0.5rem;
}
a {
text-decoration: none;
color: {{ .Site.Params.color.secondary }};
}
{{ if .Site.Params.list.icon }}
2023-12-25 22:14:57 +00:00
ul {
list-style: none;
padding-left: 1rem;
}
2023-12-23 23:01:53 +00:00
2023-12-25 22:14:57 +00:00
ul li {
display: flex;
}
2023-12-23 23:01:53 +00:00
2023-12-25 22:14:57 +00:00
ul li:before {
content: url({{ .Site.Params.list.icon }});
display: inline-block;
width: 21px;
height: 21px;
margin-right: 10px;
flex-shrink: 0;
}
2023-12-23 23:01:53 +00:00
{{ end }}
.col-3 {flex: 25%; width: 25%; max-width: 25%;}
.col-4 {flex: 33.33%; width: 33.33%; max-width: 33.33%;}
.col-5 {flex: 41.66%; width: 41.66%; max-width: 41.66%;}
.col-6 {flex: 50%; width: 50%; max-width: 50%;}
.col-7 {flex: 58.33%; width: 58.33%; max-width: 58.33%;}
.col-8 {flex: 66.66%; width: 66.66%; max-width: 66.66%;}
.col-9 {flex: 75%; width: 75%; max-width: 75%;}
.col-10 {flex: 83.33%; width: 83.33%; max-width: 83.33%;}
.col-11 {flex: 91.66%; width: 91.66%; max-width: 91.66%;}
.col-12 {flex: 100%; width: 100%; max-width: 100%;}
[class*="col-"] {
2023-12-25 22:14:57 +00:00
float: left;
2023-12-23 23:01:53 +00:00
}
2024-01-06 19:44:35 +00:00
.rotate-45 {-webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg);}
.rotate-90 {-webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -ms-transform: rotate(90deg); -o-transform: rotate(90deg); transform: rotate(90deg);}
.rotate-180 { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg);}
2023-12-23 23:01:53 +00:00
.row {
2023-12-25 22:14:57 +00:00
display: flex;
flex-wrap: wrap;
flex-flow: column;
2023-12-23 23:01:53 +00:00
}
/* Header */
2023-12-25 22:14:57 +00:00
.header {
display: flex;
flex-direction: row;
width: 100%;
max-width: $width;
margin: auto;
padding: 10px;
font-size: large;
}
.header i {
font-size: x-large;
}
.header > .items {
display: flex;
flex-grow: 1;
justify-content: right;
}
.header > .items > .item {
align-self: center;
2023-12-26 23:23:25 +00:00
padding-inline-end: 16px;
2023-12-25 22:14:57 +00:00
}
.progress {
background: {{ .Site.Params.color.primary }};
height: 5px;
width: 0%;
position: fixed;
top: 0;
z-index: 10;
}
#theme-toggler {
border: none;
background: inherit;
color: {{ .Site.Params.color.secondary }};
cursor: pointer;
}
2023-12-25 22:14:57 +00:00
/* Footer */
.footer {
display: flex;
flex-direction: column;
padding-block-start: 16px;
font-size: medium;
text-align: center;
}
.footer > .social {
display: flex;
2023-12-26 23:23:25 +00:00
flex-direction: row;
flex-wrap: wrap;
2023-12-25 22:14:57 +00:00
justify-content: center;
2023-12-26 23:23:25 +00:00
}
.footer > .social i {
2023-12-25 22:14:57 +00:00
font-size: x-large;
}
.footer > .social a {
2023-12-26 23:23:25 +00:00
padding-inline: 6px;
2023-12-25 22:14:57 +00:00
color: {{ .Site.Params.color.primary }};
}
.footer > .links {
display: flex;
justify-content: center;
flex-wrap: wrap;
padding: 0;
}
.footer > .links .link {
display: flex;
padding-inline: 16px;
}
.footer > .links .link a {
color: inherit;
}
.footer > .links .link:before {
content: none;
}
.footer > .copyright {
font-size: small;
}
.totop {
display: inline-flex;
background-color: {{ .Site.Params.color.primary }};
color: #f2f2f2;
width: 40px;
height: 40px;
align-items: center;
justify-content: center;
border-radius: 50%;
margin: 20px;
position: fixed;
bottom: 0px;
right: 0px;
transition: background-color .3s;
z-index: 10;
visibility: hidden;
opacity: 0;
}
.totop:hover {
filter: brightness(60%);
}
.totop.show {
visibility: visible;
opacity: 1;
}
2023-12-23 23:01:53 +00:00
/* Sections */
2024-01-09 21:51:52 +00:00
.table-of-contents {
position: fixed;
left: 0px;
top: 0px;
height: 100%;
display: flex;
flex-direction: row;
.extend {
margin: auto;
padding-block: 1rem;
padding-inline: 0.4rem;
border-radius: 0rem 0.5rem 0.5rem 0rem;
background-color: black;
cursor: pointer;
}
}
#TableOfContents {
display: none;
margin: auto;
padding-inline: 20px;
border-radius: 0rem 0.5rem 0.5rem 0rem;
background-color: black;
font-size: larger;
ul {
counter-reset:toc1;
list-style-type:none;
padding-inline-start: 0rem;
padding-block: 0.5rem;
}
li {
list-style-type:none;
ul {
counter-reset:toc2;
li {
list-style-type:none;
ul {
counter-reset:toc3;
li:before {
counter-increment:toc3;
content:counter(toc1) "." counter(toc2) "." counter(toc3) " ";
}
}
}
li:before {
counter-increment:toc2;
content:counter(toc1) "." counter(toc2) " ";
}
}
}
li:before {
counter-increment:toc1;
content:counter(toc1) ". ";
}
}
#TableOfContents.show {
display: block;
}
2023-12-23 23:01:53 +00:00
#content {
flex-grow: 1;
display: flex;
flex-direction: column;
}
2023-12-26 23:23:25 +00:00
.title h1 {
2024-01-09 21:51:52 +00:00
font-size: xxx-large;
2024-04-20 19:43:44 +00:00
margin-block-end: 3rem;
2023-12-26 23:23:25 +00:00
}
2024-01-14 11:16:30 +00:00
main > .content {
2023-12-23 23:01:53 +00:00
padding-top: 9rem;
padding-bottom: 2rem;
padding-right: 1.5rem;
padding-left: 1.5rem;
width: 100%;
2023-12-25 22:14:57 +00:00
max-width: $width;
2023-12-23 23:01:53 +00:00
margin: 0;
align-self: center;
flex-grow: 1;
}
2024-04-20 19:43:44 +00:00
.list {
margin-block-start: 2rem;
}
.list > li {
list-style: none;
margin: 0.5rem;
}
.list > article {
margin: 0.5rem;
padding: 0.5rem;
border: 2px solid gray;
border-radius: 6px;
}
.list > article > h3 {
margin: 0px;
padding-block: 0.25rem;
font-size: x-large;
}
.list > article > .meta {
font-size: smaller;
padding-block-end: 1rem;
}
.meta > span {
padding-inline-end: 1rem;
}
.list > article > .more {
display: block;
width: 100%;
text-align: right;
font-size: x-large;
border: none;
background: inherit;
color: {{ .Site.Params.color.secondary }};
}
2023-12-23 23:01:53 +00:00
.section {
padding-top: 2rem;
padding-bottom: 2.5rem;
padding-right: 1.5rem;
padding-left: 1.5rem;
width: 100%;
margin: 0;
align-self: center;
flex: 1 0 auto;
}
2024-01-14 11:16:30 +00:00
.section.even {
2024-01-06 19:44:35 +00:00
// background-color: #eee;
2023-12-23 23:01:53 +00:00
}
2024-01-14 11:16:30 +00:00
.section.highlight {
2023-12-23 23:01:53 +00:00
background-color: {{ .Site.Params.color.primary }};
}
2024-01-14 11:16:30 +00:00
.section > .content {
2023-12-23 23:01:53 +00:00
width: 100%;
2023-12-25 22:14:57 +00:00
max-width: $width;
2023-12-23 23:01:53 +00:00
margin: auto;
justify-content: center;
}
2024-01-14 11:16:30 +00:00
.hero > .content {
2023-12-23 23:01:53 +00:00
display: flex;
justify-content: center;
}
2024-01-14 11:16:30 +00:00
.hero > .content > .image {
max-width: 150px;
2024-01-14 11:16:30 +00:00
}
.hero > .description {
2023-12-23 23:01:53 +00:00
padding: 10px;
position: relative;
margin-block-start: 50px;
border: none;
}
2024-01-14 11:16:30 +00:00
.hero > .description::before,
.hero > .description::after {
2023-12-23 23:01:53 +00:00
position: absolute;
width: 33px;
height: 25px;
content: "";
}
2024-01-14 11:16:30 +00:00
.hero > .description::before {
2023-12-23 23:01:53 +00:00
left: 0;
top: 0;
border-left: 3px solid {{ .Site.Params.color.primary }};
border-top: 3px solid {{ .Site.Params.color.primary }};
}
2024-01-14 11:16:30 +00:00
.hero > .description::after {
2023-12-23 23:01:53 +00:00
right: 0;
bottom: 0;
border-right: 3px solid {{ .Site.Params.color.primary }};
border-bottom: 3px solid {{ .Site.Params.color.primary }};
2023-12-25 22:14:57 +00:00
}
2023-12-23 23:01:53 +00:00
.hero > .content > .heading {
2023-12-23 23:01:53 +00:00
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
padding-inline-start: 25px;
}
2024-01-14 11:16:30 +00:00
.hero > .content .social {
2024-01-06 19:44:35 +00:00
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
2024-01-14 11:16:30 +00:00
.hero > .content .social i {
2024-01-06 19:44:35 +00:00
font-size: x-large;
}
2024-01-14 11:16:30 +00:00
.hero > .content .social a {
2024-01-06 19:44:35 +00:00
padding-inline: 6px;
color: {{ .Site.Params.color.primary }};
}
2023-12-23 23:01:53 +00:00
/* Buttons */
/* TODO: test */
.button {
2023-12-23 23:01:53 +00:00
font-family: inherit;
font-size: 100%;
line-height: inherit;
color: inherit;
background-color: transparent;
background-image: none;
text-transform: none;
padding: 0;
}
.button:hover {
filter: brightness(60%);
}
.button.filled {
2023-12-23 23:01:53 +00:00
background-color: {{ .Site.Params.color.primary }};
color: white;
border: 2px solid {{ .Site.Params.color.primary }};
border-radius: 4px;
padding: 0.5rem 1.5rem;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1rem;
}
.button.outlined {
2023-12-23 23:01:53 +00:00
background-color: transparent;
color: {{ .Site.Params.color.primary }};
border: 2px solid {{ .Site.Params.color.primary }};
border-radius: 4px;
padding: 0.5rem 1.5rem;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1rem;
}
.button.outlined:hover {
2023-12-23 23:01:53 +00:00
background-color: {{ .Site.Params.color.primary }};
color: white;
}
/* Images */
img {
2024-01-14 11:44:43 +00:00
max-width: 100%;
height: auto;
2023-12-23 23:01:53 +00:00
margin: auto;
object-fit: contain;
border-radius: 6px;
2023-12-23 23:01:53 +00:00
}
.avatar {
border-radius: 50%;
border: 3px solid {{ .Site.Params.color.primary }};
object-fit: cover;
}
.caption {
text-align: center;
color: gray;
font-size: small;
margin: 0px;
2024-04-20 19:43:44 +00:00
}