{% load wagtailcore_tags %}<div class="{{self.alignment}}" >
{% with self.buttons|length as num_of_buttons %}
    {% for button in self.buttons %}
        <a href="{{button.link}}" class="{% if self.alignment == 'align-block' %}col-xs-12 {% endif %}col-md-{% if num_of_buttons == 1 %}12{% elif num_of_buttons == 2%}6{% elif num_of_buttons == 3 %}4{% else %}3{% endif %}">
            <img src="{{button.image.file.url}}" />
            {% if button.title %}<button class="trailer_button bg-secondary" type="button">{{button.title}}</button>{% endif %}
        </a>
    {% endfor %}
{% endwith %}
</div>
{% if self.paragraph %}{{ self.paragraph|richtext }}{% endif %}
