website/static/main.css
2025-04-17 22:16:09 -06:00

220 lines
4.2 KiB
CSS

/*
Hey, fair warning, I have no idea what I'm doing with CSS.
This is just cobbled together from a bunch of searching around.
Expect a mess!
Not AI though, just me! :3
*/
:root {
--color-accent-1: #af8cff;
--color-accent-2: #74cded;
--color-links: #77aef2;
--color-note: var(--color-accent-1);
--color-warning: #ed9a5f;
--color-important: #f279ad;
}
@font-face {
font-family: "JetBrains Mono";
src: url("fonts/JetBrainsMono-Regular.woff2");
}
body {
background-color: hsl(from var(--color-accent-1) h 25% 8%);
color: #fafafa;
max-width: clamp(600px, 35%, 800px);
height: 100vh;
margin: auto;
padding-left: 8px;
padding-right: 8px;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
header {
font-family: "JetBrains Mono", monospace;
padding-top: 15px;
display: flex;
flex-direction: row;
justify-content: flex-start;
flex-wrap: wrap;
p {
display: inline-block;
margin: 4px auto 8px 0;
font-family: "JetBrains Mono", monospace;
color: var(--color-accent-1);
}
nav {
--color: white;
:nth-child(1) {
--color: #74cded;
}
:nth-child(2) {
--color: #af8cff;
}
:nth-child(3) {
--color: #f279ad;
}
:nth-child(4) {
--color: #ed9a5f;
}
a:link, a:visited {
color: black;
text-decoration: none;
font-weight: bold;
}
a:hover {
color: hsl(from var(--color) h s 30%);
}
a {
display: inline-block;
padding: 0 4px 0 4px;
background-color: var(--color);
border: 2px solid hsl(from var(--color) h s max(calc(l - 25), 25));
border-radius: 4px;
}
}
}
footer {
align-self: flex-end;
justify-self: flex-end;
width: 100%;
margin-top: auto;
div {
align-self: center;
padding: 5px;
}
text-align: center;
font-size: 14px;
font-family: "JetBrains Mono", monospace;
}
.content {
h1, h2, h3 {
font-family: "JetBrains Mono", monospace;
color: var(--color-accent-1);
}
.subtitle {
font-family: "JetBrains Mono", monospace;
color: var(--color-accent-2)
}
code {
font-family: "JetBrains Mono", monospace;
font-size: smaller;
}
/* Color only inline code blocks */
code:not([class^=language-]) {
color: var(--color-accent-2);
}
a:link, a:visited {
color: var(--color-links);
}
a:hover {
color: hsl(from var(--color-links) h s calc(l + 10));
}
}
.insert-note, .insert-important, .insert-warning {
border-radius: 5px;
border-style: solid;
padding: 2px 8px 2px 15px;
}
.insert-note {
border-color: var(--color-note);
background-color: hsl(from var(--color-note) h 35% 15%);
}
.insert-warning {
border-color: var(--color-warning);
background-color: hsl(from var(--color-warning) h 35% 15%);
}
.insert-important {
border-color: var(--color-important);
background-color: hsl(from var(--color-important) h 35% 15%);
}
#post-list {
color: var(--color-accent-1);
}
hr {
color: var(--color-accent-1);
}
blockquote {
border-left-width: 4px;
border-left-color: var(--color-accent-1);
border-left-style: solid;
padding-left: 10px;
margin-left: 20px;
margin-right: 20px;
}
figure {
img {
max-width: 100%;
display: block;
margin: 0 auto;
}
margin: 0 auto;
}
figcaption {
width: 100%;
text-align: center;
margin: 5px auto 20px;
color: var(--color-accent-2);
font-size: smaller;
font-family: "JetBrains Mono", monospace;
}
/*
Suggested css snippet for making code blocks suck less
see https://www.getzola.org/documentation/content/syntax-highlighting/
*/
pre {
padding: 1rem;
overflow: auto;
}
pre[data-linenos] {
padding: 1rem 0;
}
pre table td {
padding: 0;
}
pre table td:nth-of-type(1) {
text-align: center;
user-select: none;
}
pre table {
width: 100%;
border-collapse: collapse;
}