34 lines
795 B
HTML
34 lines
795 B
HTML
{% if pull %}
|
|
{% if pull == "left" %}
|
|
{% set float = "is-pulled-left" %}
|
|
{% elif pull == "right" %}
|
|
{% set float = "is-pulled-right" %}
|
|
{% else %}
|
|
{% set float = "is-pulled-over-there" %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% set float = " " %}
|
|
{% endif %}
|
|
|
|
{% if class %}
|
|
{% set cls = class %}
|
|
{% else %}
|
|
{% set cls = "" %}
|
|
{% endif %}
|
|
|
|
{% if page %}
|
|
{% set context = page %}
|
|
{% elif section %}
|
|
{% set context = section %}
|
|
{% endif %}
|
|
|
|
{% set image_path = context.path ~ name %}
|
|
{% set meta = get_image_metadata(path = image_path) %}
|
|
{% set image_width = (meta.width * 0.666)%}
|
|
|
|
<img
|
|
class="{{cls}} {{float}}"
|
|
style="width:{{image_width}}px;"
|
|
src="{{name}}"
|
|
alt="{{alt}}"
|
|
/> |