diff options
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r-- | python/fatcat_web/templates/entity_macros.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 6124630c..fc199c21 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -221,3 +221,16 @@ {% endif %} </div> {% endmacro %} + +{% macro progress_color(frac) -%} +{% if frac >= 1 %} +green +{% elif frac > 0.95 %} +olive +{% elif frac < 0.5 %} +red +{% else %} +yellow +{% endif %} +{%- endmacro %} + |