Add support for code syntax highlighting
This commit is contained in:
parent
ed1a3e3cfa
commit
e284972969
9 changed files with 69 additions and 7 deletions
|
|
@ -14,6 +14,8 @@
|
|||
{% endif %}
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ '/css/prism.min.css' }}" media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet" href="{{ '/css/prism-tomorrow.min.css' }}" media="(prefers-color-scheme: dark)">
|
||||
<link rel="stylesheet" href="{{ '/css/site.css' | url }}">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ header {
|
|||
|
||||
main {
|
||||
width: 100%;
|
||||
min-width: 0px;
|
||||
max-width: 70em;
|
||||
padding: 2rem;
|
||||
margin-left: auto;
|
||||
|
|
|
|||
|
|
@ -17,3 +17,17 @@ code {
|
|||
border: solid 1px var(--primary-border-color);
|
||||
border-radius: calc(var(--main-border-radius) / 2);
|
||||
}
|
||||
|
||||
pre {
|
||||
background: var(--code-background);
|
||||
padding: 1em;
|
||||
border: solid 1px var(--primary-border-color);
|
||||
border-radius: calc(var(--main-border-radius) / 2);
|
||||
|
||||
code {
|
||||
background: unset;
|
||||
padding: unset;
|
||||
border: unset;
|
||||
border-radius: unset;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ eleventyNavigation:
|
|||
<section>
|
||||
<h2><a href={{ post.url }}>{{ post.data.title }}</a></h2>
|
||||
<div>
|
||||
<svg class="icon">
|
||||
<use href="/images/feather-sprite.svg#clock" />
|
||||
</svg>
|
||||
{{ post.date.toLocaleDateString("en-US") }}
|
||||
</div>
|
||||
<p>{{ post.data.description }}</p>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"tags": [ "posts" ]
|
||||
"tags": [ "posts" ],
|
||||
"date": "git Created"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue