从无法访问的项目Fork
体验新版 GitCode,发现更多精彩内容 >>
{% assign value = include.value | default: 25 %} {% if value > 0 %} {% assign color = 'green' %} {% assign icon = 'trending-up' %} {% elsif value == 0 %} {% assign color = 'yellow' %} {% assign icon = 'minus' %} {% else %} {% assign color = 'red' %} {% assign icon = 'trending-down' %} {% endif %}
<span class="text-{{ color }} d-inline-flex align-items-center leading-none{% if include.class %} {{ include.class }}{% endif %}">
{{ value }}% {% include_cached ui/icon.html icon=icon class="icon-thin" class="ml-1" %}
</span>