1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-26 11:16:12 +04:00
Files
tabler/pages/_includes/ui/stars.html
2019-11-29 16:57:13 +01:00

19 lines
686 B
HTML

{% removeemptylines %}
{% assign count = include.count | default: 5 %}
{% assign rate = include.rate | default: 4 %}
{% assign icon = include.icon | default: 'star' %}
{% assign class = include.color | default: 'yellow' | prepend: 'text-' %}
{% assign filled = include.filled | default: false %}
<div class="stars">
{% for i in (1..5) %}
<span class="star {% if forloop.index <= rate %}{{ class }}{% endif %}">
{% if forloop.index <= rate and filled %}
{% include_cached ui/icon.html icon=icon class="icon-filled" %}
{% else %}
{% include_cached ui/icon.html icon=icon %}
{% endif %}
</span>
{% endfor %}
</div>
{% endremoveemptylines %}