feat: add full-width image option to shortcodes

Closes #85
This commit is contained in:
welpo
2023-07-05 02:43:07 +02:00
parent 8c5f30556a
commit fd50204e32
9 changed files with 89 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
{% set meta = get_image_metadata(path=src, allow_missing=true) %}
<div class="full-width">
<img {% if src %}src="{{ get_url(path=src) }}" {% endif %} {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
</div>