Fix tags in posts, and image sizing
This commit is contained in:
parent
4b52993d7b
commit
c8c98c7ef9
@ -4,4 +4,10 @@ module.exports = (eleventyConfig) => {
|
|||||||
return item.data.tags.includes(value);
|
return item.data.tags.includes(value);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eleventyConfig.addFilter('except', (collection, value) => {
|
||||||
|
return collection.filter((item) => {
|
||||||
|
return item !== value;
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
@ -9,11 +9,12 @@ includePrism: true
|
|||||||
<div class="e-content stack-md">
|
<div class="e-content stack-md">
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
</div>
|
</div>
|
||||||
{% if tags | length %}
|
{% set filteredTags = tags | except("posts") %}
|
||||||
|
{% if filteredTags | length %}
|
||||||
<section>
|
<section>
|
||||||
<h2>Tags:</h2>
|
<h2>Tags:</h2>
|
||||||
<ul role="list">
|
<ul role="list">
|
||||||
{% for tag in tags %}
|
{% for tag in filteredTags %}
|
||||||
<li><a class="p-category" href="/post/tag/{{ tag }}" rel="tag">#{{ tag }}</a></li>
|
<li><a class="p-category" href="/post/tag/{{ tag }}" rel="tag">#{{ tag }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -52,6 +52,7 @@ img,
|
|||||||
picture {
|
picture {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Inherit fonts for inputs and buttons */
|
/* Inherit fonts for inputs and buttons */
|
||||||
|
Loading…
Reference in New Issue
Block a user