trending.html 514 B

123456789101112131415
  1. {% assign value = include.value | default: 25 %}
  2. {% if value > 0 %}
  3. {% assign color = 'green' %}
  4. {% assign icon = 'trending-up' %}
  5. {% elsif value == 0 %}
  6. {% assign color = 'yellow' %}
  7. {% assign icon = 'minus' %}
  8. {% else %}
  9. {% assign color = 'red' %}
  10. {% assign icon = 'trending-down' %}
  11. {% endif %}
  12. <span class="text-{{ color }} d-inline-flex align-items-center lh-1{% if include.class %} {{ include.class }}{% endif %}">
  13. {{ value }}% {% include ui/icon.html icon=icon class="ms-1" %}
  14. </span>