Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation of a responsive image.
|
||||
*
|
||||
* Available variables:
|
||||
* - sources: The attributes of the <source> tags for this <picture> tag.
|
||||
* - img_element: The controlling image, with the fallback image in srcset.
|
||||
*
|
||||
* @see template_preprocess()
|
||||
* @see template_preprocess_responsive_image()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<picture>
|
||||
{% 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_attributes in sources %}
|
||||
<source{{ source_attributes }}/>
|
||||
{% endfor %}
|
||||
<!--[if IE 9]></video><![endif]-->
|
||||
{% endif %}
|
||||
{# The controlling image, with the fallback image in srcset. #}
|
||||
{{ img_element }}
|
||||
</picture>
|
Reference in a new issue