1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 20:57:06 +01:00
Files
Grid/_includes/image
2016-11-04 16:07:25 +00:00

10 lines
705 B
Plaintext

{% capture imagePath %}/{{ include.name }}{% endcapture %}
{% if include.caption %}
<figure>
<img src="{{ site.baseurl }}/images{{ imagePath }}" {% if include.alt %} alt="{{ include.alt }}" {% endif %} {% if include.width %} width="{{ include.width }}" style="display: block; margin-left: auto; margin-right: auto" {% endif %}/>
<figcaption>{{ include.caption }}</figcaption>
</figure>
{% else %}
<img src="{{ site.baseurl }}/images{{ imagePath }}" {% if include.alt %} alt="{{ include.alt }}" {% endif %} {% if include.width %} width="{{ include.width }}" style="display: block; margin-left: auto; margin-right: auto" {% endif %}/>
{% endif %}