stars.html 508 B

1234567891011121314
  1. {% removeemptylines %}
  2. {% assign count = include.count | default: 5 %}
  3. {% assign rate = include.rate | default: 4 %}
  4. {% assign icon = include.icon | default: 'star' %}
  5. {% assign class = include.color | default: 'yellow' | prepend: 'text-' %}
  6. {% assign filled = include.filled | default: false %}
  7. <div class="stars">
  8. {% for i in (1..5) %}
  9. <span class="star {% if forloop.index <= rate %}{{ class }}{% endif %}">
  10. {% include ui/icon.html icon=icon %}
  11. </span>
  12. {% endfor %}
  13. </div>
  14. {% endremoveemptylines %}