<span class="rating_stars {{ classname }}">
{% for i in 1..5 %}
{% set isGreen = i <= rating %}
{% set isHalfGreen = not isGreen and i - 0.5 <= rating %}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 96 96" version="1.1">
<g id="Trustpilot_ratings_5star-RGB" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g fill-rule="nonzero">
<rect
fill="{% if isGreen or isHalfGreen %}#43B077{% else %}#DCDCE6{% endif %}"
x="0" y="0"
width="{% if isHalfGreen %}48{% else %}96{% endif %}"
height="96"
/>
{% if isHalfGreen %}
<rect
fill="#DCDCE6"
x="48" y="0"
width="48"
height="96"
/>
{% endif %}
<path d="M48,64.7 L62.6,61 L68.7,79.8 L48,64.7 Z M81.6,40.4 L55.9,40.4 L48,16.2 L40.1,40.4 L14.4,40.4 L35.2,55.4 L27.3,79.6 L48.1,64.6 L60.9,55.4 L81.6,40.4 L81.6,40.4 L81.6,40.4 L81.6,40.4 Z" id="Shape" fill="#FFFFFF"/>
</g>
</g>
</svg>
{% endfor %}
</span>