More tidying.
[yaffs-website] / web / modules / contrib / views_bootstrap / templates / views-bootstrap-media-object.html.twig
1 {# @TODO: How to remove bootstrap theme's default .img-responsive class on image fields, which doesn't work with .media-left, etc. For now, I'm using .pull-left as a fix. #}
2 <div id="{{ id }}" {{ attributes.addClass(classes) }}>
3     {% for key, row in rows -%}
4           <div class="media">
5
6               {% if row.image_class == "media-left" %}
7                   <div class="pull-left">
8                       {{ row.image }}
9                   </div>
10               {% endif %}
11
12               {% if row.image_class == "media-middle" %}
13                   <div class="media-middle">
14                       {{ row.image }}
15                   </div>
16               {% endif %}
17
18               <div class="media-body">
19                     {% if row.heading %}
20                           <h4 class="media-heading">
21                               {{ row.heading }}
22                           </h4>
23                     {% endif %}
24                     {% if row.body %}
25                         {{ row.body }}
26                     {% endif %}
27
28                   {% if row.image_class == "media-right" %}
29                       <div class="pull-right">
30                           {{ row.image }}
31                       </div>
32                   {% endif %}
33
34               </div>
35           </div>
36     {%- endfor %}
37 </div>
38