From 426308d44baf9165a2ac8adf4d3573154a5e7f46 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 28 Jul 2020 15:07:10 -0700 Subject: control shadow preservation display with a flag --- python/fatcat_web/templates/entity_macros.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'python/fatcat_web/templates/entity_macros.html') diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index c3ae099a..718c071c 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -265,7 +265,6 @@ yellow {% set frac_bright = stats.bright/stats.total %} {% set frac_dark = stats.dark/stats.total %} - {% set frac_shadows_only = stats.shadows_only/stats.total %} {% set frac_none = stats.none/stats.total %}
@@ -275,9 +274,12 @@ yellow
{# {{ (frac_dark*100)|int }}% #}
+ {% if stats.shadows_only %} + {% set frac_shadows_only = stats.shadows_only/stats.total %}
{# {{ (frac_shadows_only*100)|int }}% #}
+ {% endif %}
{# {{ (frac_none*100)|int }}% #}
@@ -290,7 +292,6 @@ yellow {% set frac_bright = stats.bright/stats.total %} {% set frac_dark = stats.dark/stats.total %} - {% set frac_shadows_only = stats.shadows_only/stats.total %} {% set frac_none = stats.none/stats.total %} @@ -305,11 +306,14 @@ yellow
{{ "{:,}".format(stats.dark) }} {{ (frac_dark*100)|round(2,method='ceil') }}% preserved but not publicly accessible (dark) + {% if stats.shadows_only %} + {% set frac_shadows_only = stats.shadows_only/stats.total %}
{{ "{:,}".format(stats.shadows_only) }} {{ (frac_shadows_only*100)|round(2,method='ceil') }}% only independently preserved in "shadow" libraries + {% endif %}
{{ "{:,}".format(stats.none) }} @@ -324,7 +328,6 @@ yellow {% set frac_bright = stats.bright/stats.total %} {% set frac_dark = stats.dark/stats.total %} - {% set frac_shadows_only = stats.shadows_only/stats.total %} {% set frac_none = stats.none/stats.total %} @@ -337,10 +340,13 @@ yellow
{{ "{:,}".format(stats.dark) }} preserved, inaccessible (dark) + {% if stats.shadows_only %} + {% set frac_shadows_only = stats.shadows_only/stats.total %}
{{ "{:,}".format(stats.shadows_only) }} shadow library only + {% endif %}
{{ "{:,}".format(stats.none) }} -- cgit v1.2.3