Commit b4503e38 authored by Eric Bremner's avatar Eric Bremner Committed by Martin Leblanc
Browse files

ISTWCMS-4888: updating template and css for image

parent 0d799d55
.uw-image {
&__wrapper.uw-contained-width {
@include uw-contained-width;
&__sized-image {
display: block;
width: 100%;
&--center {
text-align: center;
}
&--left {
text-align: left;
}
&--right {
text-align: right;
}
}
}
{% if image.type == 'full' %}
{% set image_class = 'uw-image__full-width' %}
{% else %}
{% set image_class = 'uw-image__sized-image uw-image__sized-image--' ~ image.alignment %}
{% endif %}
<div class="uw-image">
<div class="uw-image__wrapper {{ width }}">
{% block content %}
{% endblock %}
<div class="uw-image__wrapper {{ image_class }}">
{% if image.type == 'full' %}
{% include '@components/responsive-image/responsive-image.twig' with {
'sources': image.image.sources,
'img_element': image.image.img_element['#uri'],
'alt': image.alt,
} %}
{% if image.caption %}
<div class="uw_ig__caption">
{% include '@components/caption/caption.twig' with {
'caption': image.caption
} %}
</div>
{% endif %}
{% else %}
<img src="{{ image.image.url }}" width="{{ image.image.width }}" height="{{ image.image.height }}" />
{% endif %}
</div>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment