Skip to content
Snippets Groups Projects
Commit 773a195c authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-3503: adding stylings and images for responsive images

parent 76db7f71
No related branches found
No related tags found
No related merge requests found
picture {
img {
width: 100%;
}
width: 100%;
}
{% if output_image_tag %}
{{ img_element }}
{% else %}
<picture {{ attributes }}>
{% if sources %}
{#
Internet Explorer 9 doesn't recognise source elements that are wrapped in
picture tags. See http://scottjehl.github.io/picturefill/#ie9
#}
<!--[if IE 9]><video style="display: none;"><![endif]-->
{% for source in sources %}
<source srcset="{{ source.srcset|raw }}" media="{{ source.media }}" type="{{ source.type }}" />
{% endfor %}
<!--[if IE 9]></video><![endif]-->
{% endif %}
{# The controlling image, with the fallback image in srcset. #}
<img class="contextual-region" src="{{ img_element }}" alt="{{ alt }}">
</picture>
{% endif %}
sources:
- srcset: "../../../../source/images/president/president_xlarge.jpg"
media: "all and (min-width: 63.19em)"
type: "image/jpeg"
- srcset: "../../../../source/images/president/president_large.jpg"
media: "all and (min-width: 49.81em)"
type: "image/jpeg"
- srcset: "../../../../source/images/president/president_medium.jpg"
media: "all and (min-width: 30em)"
type: "image/jpeg"
- srcset: "../../../../source/images/president/president_small.jpg"
media: "all and (min-width: 25em)"
type: "image/jpeg"
- srcset: "../../../../source/images/president/president_xsmall.jpg"
media: "all and (min-width: 15em)"
type: "image/jpeg"
img_element: "../../../../source/images/president/president_xlarge.jpg"
alt: "Alternative text"
source/images/president/president_large.jpg

40.1 KiB

source/images/president/president_medium.jpg

31.8 KiB

source/images/president/president_small.jpg

10.6 KiB

source/images/president/president_xlarge.jpg

53.9 KiB

source/images/president/president_xsmall.jpg

9.24 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment