summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-08-24 13:53:00 +0200
committerBryan Newbold <bnewbold@robocracy.org>2019-08-24 13:53:00 +0200
commitf1a1fc9af060a07029546e7fde51c9c1f24d9fa3 (patch)
tree654f96fa13cc5d0da3368b19b45802e77a16be92 /python
parent7a36970dfa7b37ebd9bf28e9fdd3c0254ae0be8a (diff)
downloadfatcat-f1a1fc9af060a07029546e7fde51c9c1f24d9fa3.tar.gz
fatcat-f1a1fc9af060a07029546e7fde51c9c1f24d9fa3.zip
simplify url_list() template macro
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/templates/entity_macros.html14
1 files changed, 4 insertions, 10 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
index 56ec6c5d..e553fe79 100644
--- a/python/fatcat_web/templates/entity_macros.html
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -96,22 +96,16 @@
{%- endmacro %}
-{% macro url_list(urls, wayback_suffix="") -%}
+{% macro url_list(urls) -%}
<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 }}{{ suffix }}">
+ <td class="eight wide"><small><code><a href="{{ url.url }}">
{% 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:]) }}{{ suffix }}
+ {{ '/'.join(url.url.split('/')[0:2]) }}/<b>{{ ''.join(url.url.split('/')[2]) }}</b>/{{ '/'.join(url.url.split('/')[3:]) }}
{% else %}
- {{ url.url }}{{ suffix }}
+ {{ url.url }}
{% endif %}
</a></code></small>
{% endfor %}