wezm.net/v2/templates/shortcodes/figure.html

29 lines
1 KiB
HTML
Raw Normal View History

2022-04-19 20:48:54 +00:00
{% if border %}
<figure class="text-center figure-border">
{% else %}
2021-10-08 22:57:04 +00:00
<figure class="text-center">
2022-04-19 20:48:54 +00:00
{% endif %}
2021-10-08 22:57:04 +00:00
<a href="{{ config.base_url }}/{{ link }}">
{% if resize_width %}
{% set image = resize_image(path=image, width=resize_width, op="fit_width", quality=quality | default(value=75)) %}
2022-04-19 20:48:54 +00:00
{% if width %}
<img src="{{ image.url }}" width="{{ width }}" alt="{{ alt }}" />
{% else %}
<img src="{{ image.url }}" alt="{{ alt }}" />
{% endif %}
{% elif resize_height %}
{% set image = resize_image(path=image, height=resize_height, op="fit_height", quality=quality | default(value=75)) %}
{% if height %}
<img src="{{ image.url }}" style="max-height: {{ height }}px" alt="{{ alt }}" />
{% else %}
<img src="{{ image.url }}" alt="{{ alt }}" />
{% endif %}
2021-10-08 22:57:04 +00:00
{% elif width %}
<img src="{{ config.base_url }}/{{ image }}" width="{{ width }}" alt="{{ alt }}" />
{% else %}
2021-10-08 22:57:04 +00:00
<img src="{{ config.base_url }}/{{ image }}" alt="{{ alt }}" />
{% endif %}
2021-10-08 22:57:04 +00:00
</a>
2020-03-21 03:51:11 +00:00
<figcaption>{{ caption }}</figcaption>
</figure>