added syntax highlighting

This commit is contained in:
Ell 2023-06-13 19:20:57 +02:00
parent eac65e03a1
commit 67eb189a3b
3 changed files with 12 additions and 4 deletions

View file

@ -3,6 +3,14 @@ layout: default
nav: blognav.html
---
<script>
let style = darkTheme ? "monokai" : "default";
$("head").append($("<link/>", {
rel: "stylesheet",
href: `https://cdn.jsdelivr.net/gh/richleland/pygments-css@master/${style}.css`
}));
</script>
<style>
h1 .anchor-heading, h2 .anchor-heading, h3 .anchor-heading, h4 .anchor-heading, h5 .anchor-heading, h6 .anchor-heading {
visibility: hidden;

View file

@ -6,7 +6,3 @@ body {
.text-muted {
color: #929aa0 !important;
}
pre {
color: #9ca6b0;
}

View file

@ -11,6 +11,10 @@ h1, h2, h3, h4, h5, h6, .nav-item {
font-family: Cadman, Lato, sans-serif;
}
pre.highlight {
padding: 10px;
}
.navbar-container {
max-width: 850px;
}