From ff4d9cf06955aaa21a429ff10456468e1fae84fc Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 9 Apr 2019 13:07:05 -0700 Subject: have webcapture wayback links go right to capture (not calendar) --- python/fatcat_web/templates/entity_macros.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 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 6d9ceed0..813a419e 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -74,16 +74,22 @@ {%- endmacro %} -{% macro url_list(urls) -%} +{% macro url_list(urls, wayback_suffix="") -%} {% for url in urls %} + {% if url.rel == "wayback" %} + {% set suffix = wayback_suffix %} + {% else %} + {% set suffix = "" %} + {% endif %} + {% set entity = release %}
{{ url.rel }} - + {% if url.url.count('/') >= 3 and url.rel != "dweb" %} - {{ '/'.join(url.url.split('/')[0:2]) }}/{{ ''.join(url.url.split('/')[2]) }}/{{ '/'.join(url.url.split('/')[3:]) }} + {{ '/'.join(url.url.split('/')[0:2]) }}/{{ ''.join(url.url.split('/')[2]) }}/{{ '/'.join(url.url.split('/')[3:]) }}{{ suffix }} {% else %} - {{ url.url }} + {{ url.url }}{{ suffix }} {% endif %} {% endfor %} -- cgit v1.2.3