drewcassidy.me/_includes/figure-image.html
drewcassidy 6ea805ee50 Finish image includes
• Finish the image-gallery
• Add Figure-Image with a single image, which can be floated to the left
or right, or fill the entire document width
• Publish the first real blog post!
2023-04-19 01:16:57 -07:00

20 lines
605 B
HTML

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