2020-05-31 20:26:49 +00:00
|
|
|
{% capture imagePath %}/assets/blog/{{ page.id | split: "/" | last }}/{{ include.name }}{% endcapture %}
|
2019-07-22 02:16:23 +00:00
|
|
|
|
2020-06-03 01:04:07 +00:00
|
|
|
{% assign imagePath=(imagePath | relative_url) %}
|
|
|
|
|
2020-05-31 20:26:49 +00:00
|
|
|
{% capture src %}src="{{ imagePath }}"{% endcapture %}
|
|
|
|
|
|
|
|
{% assign caption=include.caption | default: "" %}
|
2020-06-01 00:06:32 +00:00
|
|
|
{% assign alt=include.alt | default: caption %}
|
2020-05-31 20:26:49 +00:00
|
|
|
|
2020-06-01 00:06:32 +00:00
|
|
|
{% if alt != blank %}
|
|
|
|
{% capture alt %}alt="{{ alt }}" title="{{ alt }}"{% endcapture %}
|
2020-05-31 20:26:49 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2020-09-01 01:06:29 +00:00
|
|
|
{% assign frame=include.frame %}
|
|
|
|
{% if frame == blank %}
|
|
|
|
{% assign frame=true %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if include.width != blank %}
|
|
|
|
{% capture width %}style="width:{{ include.width }}"{% endcapture %}
|
|
|
|
{% endif %}
|
2020-05-31 20:26:49 +00:00
|
|
|
|
2020-09-01 01:06:29 +00:00
|
|
|
<figure {{width}} class="figure {% if include.caption %}caption{% endif %} {% if frame %}frame{% endif %}">
|
|
|
|
<a target="_blank" href="{{ imagePath }}"><img {{ src }} {{ alt }} /></a>
|
2020-05-31 20:26:49 +00:00
|
|
|
{% if caption != blank %}<figcaption>{{ caption }}</figcaption>{% endif %}
|
2019-07-22 02:16:23 +00:00
|
|
|
</figure>
|