{% set cols = opt|default({
cols: 3
}).cols %}
<div class="row">
{% for propIndex,someProperty in properties %}
<div class="col-12 col-md-6 col-lg-4 col-xl-{{ 12 / cols }}">
<div class="property">
<a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="image"><img src="{{ file_helper.thumbnail((someProperty.featuredImage ? 'data/' ~ someProperty.featuredImage.filename : '.' ~ asset('data/placeholder.png')), 750, 750) }}" alt=""/></a>
{% if someProperty.cornerBanner %}
<img src="{{ asset('build/images/' ~ someProperty.cornerBanner) }}" class="corner-banner" alt=""/>
{% endif %}
<div class="detail">
<span class="area">{{ someProperty.area.name }}, {{ someProperty.postcode }}</span>
<a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="title">{{ someProperty.address2 }}</a>
<div class="row mt-3">
<div class="col-4">
<div class="spec">
<i class="fas fa-bed"></i>
<span>{{ someProperty.bedrooms }} Beds</span>
</div>
</div>
<div class="col-4">
<div class="spec">
<i class="fas fa-bath"></i>
<span>{{ someProperty.bathrooms }} Bathrooms</span>
</div>
</div>
<div class="col-4">
<div class="spec">
<i class="far fa-calendar"></i>
{% if someProperty.dateAvailable and someProperty.dateAvailable > "today"|date %}
<span class="availability">Available {{ someProperty.dateAvailable|date('M') }}</span>
{% else %}
<span>Available Now</span>
{% endif %}
</div>
</div>
</div>
</div>
<div class="bottom">
<div class="row">
<div class="col-6">
{% if someProperty.listingType == "letting" %}
<a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="btn btn-lg btn-outline-secondary w-100"><strong>{{ (someProperty.rentalPrice / 10)|format_currency('GBP', {fraction_digit: 0}) }}</strong> <small>/{{ someProperty.rentFrequency|short_rental_frequency }}</small></a>
{% else %}
<a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="btn btn-lg btn-outline-secondary w-100"><strong>{{ (someProperty.salePrice / 10)|format_currency('GBP', {fraction_digit: 0}) }}</strong></a>
{% endif %}
</div>
<div class="col-6">
<a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="btn btn-lg btn-dark w-100">View Details</a>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>