{% if testimonial.rating %}
<div class="wsb-rating">
    {% set rating = testimonial.rating %}
    {% set stars = range(0, 4) %}
    {% for item in stars %}
        {% set index = item + 1 %}
        {% if index * 2 <= rating %}
            <i class="fas fa-star"></i>
        {% elseif index * 2 > rating + 1 %}
            <i class="far fa-star"></i>
        {% else %}
            <div class="fa-stack">
                <i class="fas fa-star-half fa-stack-1x"></i>
                <i class="far fa-star-half fa-stack-1x fa-flip-horizontal"></i>
            </div>
        {% endif %}
    {% endfor %}
</div>
{% endif %}
