feat(post): un-italicize post md headings

This commit is contained in:
Barrett Ruth 2024-07-31 07:54:08 -05:00
parent 102c71e87a
commit ca4b773f35
3 changed files with 67 additions and 1 deletions

View file

@ -0,0 +1,61 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/styles/common.css" />
<link rel="stylesheet" href="/styles/post.css" />
<link rel="icon" type="image/webp" href="/public/logo.webp" />
<link href="/public/prism/prism.css" rel="stylesheet" />
<link href="/public/prism/prism-theme.css" rel="stylesheet" />
<script defer src="/public/prism/prism.js"></script>
<link rel="stylesheet" href="/public/katex/katex.css" />
<script defer src="/public/katex/katex.js"></script>
<script
defer
src="/public/katex/katex-render.js"
onload="renderMathInElement(document.body);"
></script>
<title>Barrett Ruth</title>
</head>
<body class="graph-background">
<header>
<a
href="/"
style="text-decoration: none; color: inherit"
onclick="goHome(event)"
>
<div class="terminal-container">
<span class="terminal-prompt">barrett@ruth:~$ /algorithms</span>
<span class="terminal-cursor"></span>
</div>
</a>
</header>
<main class="main">
<div class="post-container">
<header class="post-header">
<h1 class="post-title">extrema circular buffer</h1>
<p class="post-meta">
<time datetime="2024-07-30">30/07/2024</time>
</p>
</header>
<article class="post-article">
<h2>an h2</h2>
<div class="fold">
<h3>
<a
target="blank"
href="https://leetcode.com/problems/container-with-most-water/"
>container with most water</a
>
</h3>
</div>
<div class="problem-content">content</div>
</article>
</div>
</main>
<script src="/scripts/common.js"></script>
<script src="/scripts/post.js"></script>
</body>
</html>

View file

@ -18,7 +18,11 @@ const postMapping = new Map([
["Trading", [{ name: "InteractiveBrokers TWS" }, { name: "valuation" }]],
[
"Algorithms",
[{ name: "two pointers", link: "two-pointers" }, { name: "convex hull" }],
[
{ name: "extrema circular buffer", link: "extrema-circular-buffer" },
{ name: "two pointers", link: "two-pointers" },
{ name: "convex hull" },
],
],
]);

View file

@ -39,6 +39,7 @@ document.addEventListener("DOMContentLoaded", () => {
document.querySelectorAll("article h2").forEach((h2) => {
const mdHeading = document.createElement("span");
mdHeading.textContent = "# ";
mdHeading.style.fontStyle = "normal";
mdHeading.style.color = getTopicColor(urlToTopic());
h2.prepend(mdHeading);
});