From 466953355f3e2a18cbdb93ca39d077103703f049 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 3 Sep 2019 14:15:44 -0700 Subject: webface include webarchive_urls for containers --- python/fatcat_web/templates/container_view.html | 5 +++++ python/fatcat_web/templates/entity_macros.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html index 182589c7..1998bc68 100644 --- a/python/fatcat_web/templates/container_view.html +++ b/python/fatcat_web/templates/container_view.html @@ -12,6 +12,11 @@
{{ container.extra['urls'][0] }}
+{% elif (container.extra != None) and (container.extra['webarchive_urls'] != None) and (container.extra['webarchive_urls']|length > 0) %} +{# fallback to a webarchive URL if no valid/live homepage URL #} +
+ {{ container.extra['webarchive_urls'][0] }} +
{% endif %}

{% if container.publisher != None %} diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 4d6e80f2..0e3943dd 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -70,7 +70,7 @@ {{ key }}.{{ inner_key }} {{ inner_value }} {% endfor %} - {% elif key in ("urls") and value and value is iterable and value is not string and value[0] is string %} + {% elif key in ("urls", "webarchive_urls") and value and value is iterable and value is not string and value[0] is string %} {{ key }} -- cgit v1.2.3