diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-09 13:07:05 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-09 13:07:05 -0700 |
commit | ff4d9cf06955aaa21a429ff10456468e1fae84fc (patch) | |
tree | 9078e548422ccc99dac54967609031f424448f00 /python/fatcat_web/templates/entity_macros.html | |
parent | e7229e06bd8af4e97f5a5494e89ee66fbdb607ee (diff) | |
download | fatcat-ff4d9cf06955aaa21a429ff10456468e1fae84fc.tar.gz fatcat-ff4d9cf06955aaa21a429ff10456468e1fae84fc.zip |
have webcapture wayback links go right to capture (not calendar)
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r-- | python/fatcat_web/templates/entity_macros.html | 14 |
1 files changed, 10 insertions, 4 deletions
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="") -%} <table class="ui very basic compact single line fixed table"> <tbody> {% for url in urls %} + {% if url.rel == "wayback" %} + {% set suffix = wayback_suffix %} + {% else %} + {% set suffix = "" %} + {% endif %} + {% set entity = release %} <tr><td class="two wide right aligned">{{ url.rel }} - <td class="eight wide"><small><code><a href="{{ url.url }}"> + <td class="eight wide"><small><code><a href="{{ url.url }}{{ suffix }}"> {% if url.url.count('/') >= 3 and url.rel != "dweb" %} - {{ '/'.join(url.url.split('/')[0:2]) }}/<b>{{ ''.join(url.url.split('/')[2]) }}</b>/{{ '/'.join(url.url.split('/')[3:]) }} + {{ '/'.join(url.url.split('/')[0:2]) }}/<b>{{ ''.join(url.url.split('/')[2]) }}</b>/{{ '/'.join(url.url.split('/')[3:]) }}{{ suffix }} {% else %} - {{ url.url }} + {{ url.url }}{{ suffix }} {% endif %} </a></code></small> {% endfor %} |