instagram-block-image.html.twig in Instagram Block 8.3
Same filename and directory in other branches
Default theme implementation of an Instagram image link.
Available variables:
- data: The entire data array returned from the Instagram API request.
- href: The url to the Instagram post page.
- src: The source url to the instagram image.
- width: The display width of the image.
- height: The display height of the image.
1 theme call to instagram-block-image.html.twig
- InstagramBlockBlock::build in src/
Plugin/ Block/ InstagramBlockBlock.php - Builds and returns the renderable array for this block plugin.
File
templates/instagram-block-image.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation of an Instagram image link.
- *
- * Available variables:
- * - data: The entire data array returned from the Instagram API request.
- * - href: The url to the Instagram post page.
- * - src: The source url to the instagram image.
- * - width: The display width of the image.
- * - height: The display height of the image.
- *
- * @ingroup themeable
- */
- #}
- {% if height is empty %}
- {% set width_and_height = '' %}
- {% else %}
- {% set width_and_height = 'height="' ~ height ~ 'px"' %}
- {% endif %}
- {% if width is not empty %}
- {% set width_and_height = width_and_height ~ ' width="' ~ width ~ 'px"' %}
- {% endif %}
- {% spaceless %}
- <a class="group" target="_blank" data-instagram-rel="1" href="{{ href }}">
- <img alt="{{ data.caption.text }}" {{ width_and_height }} src="{{ src }}">
- </a>
- {% endspaceless %}