aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-04 13:24:44 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-04 13:24:47 -0700
commitf75190ab7979c411bc8d90fab13c931933f4595c (patch)
tree34aa7822761c5fb0ee3cb2735a9f73447c99933b /python/fatcat_web/templates/entity_macros.html
parent22fc51c7ce5a04e29870c921e291fddd3de38503 (diff)
downloadfatcat-f75190ab7979c411bc8d90fab13c931933f4595c.tar.gz
fatcat-f75190ab7979c411bc8d90fab13c931933f4595c.zip
finish container coverage page
Also re-worked container view sidebar a bit more.
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r--python/fatcat_web/templates/entity_macros.html13
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 %}
+