Commit 965f5b32 authored by Martin Leblanc's avatar Martin Leblanc
Browse files

Merge branch 'feature/ISTWCMS-4888-ebremner-image-block' into '3.0.x'

ISTWCMS-4888: updating template and css for image

See merge request !140
parents 0d799d55 1798124e
......@@ -43,6 +43,7 @@ $grid-gap: rem(gesso-spacing(lg));
&.layout--uw-1-col{
.block-inline-blockuw-cbl-banner-images,
.block-inline-blockuw-cbl-image,
.block-uw-cbl-image,
.block-inline-blockuw-cbl-remote-video,
.block-inline-blockuw-cbl-image-gallery{
@include uw-full-width-margin;
......
.uw-image {
&__wrapper.uw-contained-width {
@include uw-contained-width;
.block-uw-cbl-image{
.uw-image {
display:flex;
flex-flow: column;
width:100%;
img{
display: block;
}
&__sized-image {
&--center {
align-self: center;
}
&--left {
align-self: flex-start;
}
&--right {
align-self: flex-end;
}
}
}
}
{% 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,
} %}
{% else %}
<img src="{{ image.image.url }}" width="{{ image.image.width }}" height="{{ image.image.height }}" alt="{{ image.alt }}" />
{% endif %}
{% if image.caption %}
<div class="uw-image__caption" {% if image.image.width %} style="width:{{ image.image.width }}px;"{% endif %}>
{% include '@components/caption/caption.twig' with {
'caption': image.caption
} %}
</div>
{% 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