Files
86box.github.io/_includes/image.html
2024-11-08 22:20:27 -03:00

25 lines
604 B
HTML

<figure class="image">
{%- assign thumbnail = include.thumbnail | default: include.url -%}
{%- assign alt = include.alt | default: include.description | normalize_whitespace -%}
{%- if include.url -%}
<a href="{{ include.url }}"
{% if alt %}
title="{{ alt }}"
{% endif %}
>
{%- endif -%}
<img class="image" src="{{ thumbnail }}"
{%- if alt %}
alt="{{ alt }}"
{%- endif -%}
/>
{%- if include.url -%}
</a>
{%- endif -%}
{%- if include.description -%}
<figcaption class="image-caption">
{{- include.description | markdownify -}}
</figcaption>
{%- endif -%}
</figure>