diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-04 13:24:44 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-04 13:24:47 -0700 |
commit | f75190ab7979c411bc8d90fab13c931933f4595c (patch) | |
tree | 34aa7822761c5fb0ee3cb2735a9f73447c99933b /python/fatcat_web/templates/container_view_coverage.html | |
parent | 22fc51c7ce5a04e29870c921e291fddd3de38503 (diff) | |
download | fatcat-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/container_view_coverage.html')
-rw-r--r-- | python/fatcat_web/templates/container_view_coverage.html | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/python/fatcat_web/templates/container_view_coverage.html b/python/fatcat_web/templates/container_view_coverage.html index eb9dba8a..db435181 100644 --- a/python/fatcat_web/templates/container_view_coverage.html +++ b/python/fatcat_web/templates/container_view_coverage.html @@ -6,10 +6,65 @@ {% block entity_main %} -<h3>Preservation Coverage By Year</h3> +<div class="ui centered grid"> + <div class="row"> + <div class="twelve wide column"> + <div class="ui large horizontal statistic"> + <div class="value">{{ "{:,}".format(container._stats.total) }}</div> + <div class="label" style="text-transform: none;">Known Releases</div> + </div> + {% if container._stats.total >= 1 %} -<img src="/container/{{ container.ident }}/ia_coverage_years.svg"> -<br><a href="/container/{{ container.ident }}/ia_coverage_years.json">Download as JSON</a> + {% set frac_kbart = container._stats.in_kbart/container._stats.total %} + {% set frac_preserved = container._stats.is_preserved/container._stats.total %} + {% set frac_web = container._stats.in_web/container._stats.total %} + + <div class="ui large {{ entity_macros.progress_color(frac_web) }} progress" style="margin-bottom: 0.1em;"> + <div class="bar" style="width: {{ (frac_web*100)|int }}%;"> + <div class="progress">{{ (frac_web*100)|int }}%</div> + </div> + <div class="label"> + {{ "{:,}".format(container._stats.in_web) }} preserved and available (bright) + </div> + </div> + + <br> + <div class="ui large {{ entity_macros.progress_color(frac_preserved) }} progress" style="margin-bottom: 0.1em;"> + <div class="bar" style="width: {{ (frac_preserved*100)|int }}%;"> + <div class="progress">{{ (frac_preserved*100)|int }}%</div> + </div> + <div class="label"> + {{ "{:,}".format(container._stats.is_preserved) }} preserved at all (bright or dark) + </div> + </div> + + <br> + <div class="ui large {{ entity_macros.progress_color(frac_kbart) }} progress" style="margin-bottom: 0.1em; margin-top: 1em;"> + <div class="bar" style="width: {{ (frac_kbart*100)|int }}%;"> + <div class="progress">{{ (frac_kbart*100)|int }}%</div> + </div> + <div class="label"> + {{ "{:,}".format(container._stats.in_kbart ) }} preserved by Keeper (dark) + </div> + </div> + + {% endif %} + </div> + </div> +</div> + +{% if container._stats.total >= 1 %} + <br> + <h2>Perpetual Access Coverage by Year</h2> + + <figure style="margin: 0 0 0 0;"> + <embed type="image/svg+xml" src="/container/{{ container.ident }}/ia_coverage_years.svg" /> + </figure> + + <div style="float: right;"> + <a href="/container/{{ container.ident }}/ia_coverage_years.json">Download as JSON</a> + </div> +{% endif %} {% endblock %} |