Add a layout for posts
This commit is contained in:
parent
69b423b565
commit
a79f462669
19
src/_includes/layouts/post-layout.njk
Normal file
19
src/_includes/layouts/post-layout.njk
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
layout: layouts/layout.njk
|
||||
---
|
||||
|
||||
<dl class="tags">
|
||||
<dt>
|
||||
<svg class="icon">
|
||||
<use href="/images/feather-sprite.svg#tag" />
|
||||
</svg>
|
||||
Tags
|
||||
</dt>
|
||||
{% for tag in tags %}
|
||||
{% if tag != "posts" %}
|
||||
<dd>{{ tag }}</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
|
||||
{{ content | safe }}
|
|
@ -16,3 +16,17 @@ dl {
|
|||
margin-inline-start: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
dl.tags {
|
||||
dt {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
padding: 0.25em 0;
|
||||
}
|
||||
|
||||
dd {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Posts
|
||||
layout: layouts/layout.njk
|
||||
eleventyNavigation:
|
||||
key: Posts
|
||||
icon: edit-2
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"layout": "layouts/post-layout.njk",
|
||||
"tags": [ "posts" ],
|
||||
"date": "git Created"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue