drewcassidy.me/_includes/figure-image.html

20 lines
605 B
HTML
Raw Normal View History

{% if include.float %}
<figure class="figure-float" style="float:{{ include.float }};">
{% else %}
<figure class="figure-image">
{% endif %}
2017-12-24 23:04:19 +00:00
{% capture path %}/images/{{page.path | split: '/' | last | split: '.' | first }}{% endcapture %}
{% capture alt %}{{ include.caption | markdownify | strip_html }} {{ include.alt }}{% endcapture %}
2017-12-24 23:04:19 +00:00
{% capture src %}{{ path }}/{{ include.src }}{% endcapture %}
{% include image.html src=src alt=alt %}
2017-12-24 23:04:19 +00:00
{% if include.caption %}
<figcaption>
{{ include.caption | markdownify | remove: '<p>' | remove: '</p>' }}
</figcaption>
{% endif %}
</figure>