feat: format

This commit is contained in:
Barrett Ruth 2025-05-22 16:12:05 -05:00
parent b0df7bebb0
commit da030f3dc1
30 changed files with 603 additions and 348 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,18 @@
document.addEventListener("DOMContentLoaded", function () {
const katexParagraphs = document.querySelectorAll("article p");
katexParagraphs.forEach((p) => {
const katexSpan = p.querySelector(".katex");
if (!katexSpan) return;
const clone = p.cloneNode(true);
clone.querySelector(".katex").remove();
const textWithoutKatex = clone.textContent.trim();
if (textWithoutKatex === "") {
p.style.display = "flex";
p.style.justifyContent = "center";
p.style.margin = "1.5rem 0";
}
});
});

View file

@ -54,3 +54,9 @@ li {
.terminal-container {
font-family: "Courier New", monospace;
}
pre {
font-feature-settings:
"liga" 0,
"calt" 0;
}

View file

@ -1,63 +0,0 @@
article h1, article h2, article h3,
.post-article h1, .post-article h2, .post-article h3 {
font-weight: normal;
position: relative;
}
article h1, .post-article h1 {
padding-left: 1.5em;
}
article h2, .post-article h2 {
padding-left: 2em;
}
article h3, .post-article h3 {
padding-left: 2.5em;
}
article h1::before, .post-article h1::before {
content: "#";
}
article h2::before, .post-article h2::before {
content: "##";
}
article h3::before, .post-article h3::before {
content: "###";
}
article h1::before, article h2::before, article h3::before,
.post-article h1::before, .post-article h2::before, .post-article h3::before {
position: absolute;
left: 0;
color: var(--topic-color, #000);
margin-right: 0.5em;
}
article img {
display: block;
margin: 2rem auto;
max-width: 100%;
height: auto;
}
article pre {
padding: 1rem;
overflow-x: auto;
}
/* Heading with date styling */
article h2.heading-with-date, article h3.heading-with-date {
display: flex;
justify-content: space-between;
align-items: center;
}
article h2.heading-with-date .date, article h3.heading-with-date .date {
font-size: 0.8em;
color: #000;
font-weight: normal;
margin-left: 1rem;
}

View file

@ -39,17 +39,6 @@ li {
width: 80%;
}
.post-meta {
margin-left: 100px;
font-size: 1.3em;
}
h2 .post-meta {
float: right;
margin-left: 20px;
font-size: 1em;
}
.post-title {
font-weight: normal;
font-size: 2.2em;
@ -59,33 +48,10 @@ h2 .post-meta {
display: inline-block;
}
:not(pre) > code {
font-family: "Courier New", Courier, monospace;
padding: 2px 4px;
margin: 0 5px;
font-size: 0.95em;
white-space: nowrap;
border: 1px solid #e1e1e1;
}
code,
pre {
border-radius: 4px;
background: #f4f4f4 !important;
}
pre {
border: 1px solid #e1e1e1;
}
pre * {
background: #f4f4f4 !important;
}
.post-title::before {
content: "";
position: absolute;
background-color: var(--topic-color);
background-color: var(--topic-color, #000);
height: 30px;
width: 2px;
bottom: -10px;
@ -95,34 +61,110 @@ pre * {
.post-title::after {
content: "";
position: absolute;
background-color: var(--topic-color);
background-color: var(--topic-color, #000);
width: 200px;
height: 2px;
bottom: -10px;
left: -20px;
}
.post-meta {
font-size: 1.3em;
color: #000;
margin-left: 100px;
}
.post-article {
font-size: 1.5em;
line-height: 1.5em;
padding-bottom: 50px;
}
.post-article h2 {
font-weight: normal;
}
.post-article h3 {
font-weight: normal;
}
.post-article a {
text-decoration: underline;
}
.language-python,
.language-py,
.language-cc,
.language-cpp {
article h1,
article h2,
article h3,
.post-article h1,
.post-article h2,
.post-article h3 {
font-weight: normal;
position: relative;
}
article h1,
.post-article h1 {
padding-left: 1.5em;
}
article h2,
.post-article h2 {
padding-left: 2em;
}
article h3,
.post-article h3 {
padding-left: 2.5em;
}
article h1::before,
.post-article h1::before {
content: "#";
}
article h2::before,
.post-article h2::before {
content: "##";
}
article h3::before,
.post-article h3::before {
content: "###";
}
article h1::before,
article h2::before,
article h3::before,
.post-article h1::before,
.post-article h2::before,
.post-article h3::before {
position: absolute;
left: 0;
color: var(--topic-color, #000);
margin-right: 0.5em;
}
article img {
display: block;
margin: 2rem auto;
max-width: 100%;
height: auto;
}
article pre {
padding: 1rem;
overflow-x: auto;
border-radius: 4px;
background: #f4f4f4 !important;
border: 1px solid #e1e1e1;
}
pre * {
background: #f4f4f4 !important;
}
:not(pre) > code {
font-family: "Courier New", Courier, monospace;
padding: 4px;
margin: 0 5px;
white-space: nowrap;
border: 1px solid #e1e1e1;
border-radius: 4px;
background: #f4f4f4 !important;
}
.astro-code {
font-size: 0.8em !important;
}