aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r--python/fatcat_web/templates/entity_macros.html12
1 files changed, 9 insertions, 3 deletions
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 %}
<div class="ui {{ extra_class }} multiple progress" data-percent="0,0,0,0" style="margin-bottom: 0.1em;">
@@ -275,9 +274,12 @@ yellow
<div class="green bar" style="border-radius: 0; min-width: 0; width: {{ (frac_dark*100)|round(method='ceil') }}%; background-color: darkgreen;" title="dark">
<div class="progress">{# {{ (frac_dark*100)|int }}% #}</div>
</div>
+ {% if stats.shadows_only %}
+ {% set frac_shadows_only = stats.shadows_only/stats.total %}
<div class="red bar" style="border-radius: 0; min-width: 0; width: {{ (frac_shadows_only*100)|round(method='ceil') }}%; background-color: darkred;" title="shadows only">
<div class="progress">{# {{ (frac_shadows_only*100)|int }}% #}</div>
</div>
+ {% endif %}
<div class="red bar" style="border-radius: 0; min-width: 0; width: {{ (frac_none*100)|round(method='ceil') }}%;" title="no preservation">
<div class="progress">{# {{ (frac_none*100)|int }}% #}</div>
</div>
@@ -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 %}
<table class="ui very basic very compact collapsing table" style="font-weight: bold; margin-left: 1em;">
@@ -305,11 +306,14 @@ yellow
<td class="right aligned" >{{ "{:,}".format(stats.dark) }}
<td class="right aligned" >{{ (frac_dark*100)|round(2,method='ceil') }}%
<td>preserved but not publicly accessible (dark)
+ {% if stats.shadows_only %}
+ {% set frac_shadows_only = stats.shadows_only/stats.total %}
<tr>
<td style="background-color: darkred;">
<td class="right aligned" >{{ "{:,}".format(stats.shadows_only) }}
<td class="right aligned" >{{ (frac_shadows_only*100)|round(2,method='ceil') }}%
<td>only independently preserved in "shadow" libraries
+ {% endif %}
<tr>
<td style="background-color: #db2828;">
<td class="right aligned" >{{ "{:,}".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 %}
<table class="ui very basic very compact collapsing table">
@@ -337,10 +340,13 @@ yellow
<td style="background-color: darkgreen;">
<td class="right aligned" >{{ "{:,}".format(stats.dark) }}
<td>preserved, inaccessible (dark)
+ {% if stats.shadows_only %}
+ {% set frac_shadows_only = stats.shadows_only/stats.total %}
<tr>
<td style="background-color: darkred;">
<td class="right aligned" >{{ "{:,}".format(stats.shadows_only) }}
<td>shadow library only
+ {% endif %}
<tr>
<td style="background-color: #db2828;">
<td class="right aligned" >{{ "{:,}".format(stats.none) }}