cherrykitten.dev/templates/shortcodes/figure.html
2023-04-10 00:13:12 +02:00

8 lines
476 B
HTML

{% if src %}
<figure class="{% if position %}{{ position }}{% else -%} center {%- endif %}" >
<img src="{{ src | safe }}"{% if alt %} alt="{{ alt }}"{% endif %}{% if style %} style="{{ style }}"{% endif %} />
{% if caption %}
<figcaption class="{% if caption_position %}{{ caption_position }}{% else -%} center {%- endif %}"{% if caption_style %} style="{{ caption_style | safe }}"{% endif %}>{{ caption }}</figcaption>
{% endif %}
</figure>
{% endif %}