Add styles for h3, nicer uls and code in articles

This commit is contained in:
arne 2022-10-05 11:33:53 +02:00
commit 2017e49592
3 changed files with 38 additions and 1 deletions

View file

@ -20,6 +20,7 @@ module.exports = function (config) {
config.addPassthroughCopy('src/assets/key.txt') config.addPassthroughCopy('src/assets/key.txt')
config.addPassthroughCopy('src/assets/ibm-plex/IBM-Plex-Mono/fonts/**/*') config.addPassthroughCopy('src/assets/ibm-plex/IBM-Plex-Mono/fonts/**/*')
config.addPassthroughCopy('src/posts/**/*.{jpeg,jpg,png,webp}')
// configure markdown // configure markdown
const mdOptions = { const mdOptions = {

View file

@ -12,7 +12,7 @@
{% block sidebar %} {% block sidebar %}
<div class="sticky"> <div class="sticky">
<h2>Content</h2> <h2>Content</h2>
{{ content | toc | safe }} {{ content | toc(tags=['h2']) | safe }}
<a href="{{ "/" | url }}">Go Back Home</a> <a href="{{ "/" | url }}">Go Back Home</a>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -187,6 +187,13 @@ article {
padding: 24px 0 padding: 24px 0
} }
h3 {
font-size: 14px;
text-transform: uppercase;
font-weight: bold;
padding: 12px 0;
}
ul, ol { ul, ol {
padding: 0 0 0 32px; padding: 0 0 0 32px;
margin: 0 0 28px; margin: 0 0 28px;
@ -196,6 +203,17 @@ article {
} }
} }
ul {
list-style: none;
li:before {
content: '·';
position: absolute;
padding-right: .6em;
transform: translateX(-100%);
}
}
.footnote-ref a { .footnote-ref a {
border-bottom: 0 border-bottom: 0
} }
@ -298,6 +316,24 @@ footer {
} }
} }
} }
pre {
padding: 12px;
margin: 12px 0 32px;
background: $reduced-1;
}
li > code,
p > code {
background: $reduced-1;
padding: .3em;
border-bottom: 2px $reduced-1;
}
img {
max-width: 100%;
height: auto;
}
} }
footer { footer {