Archiving Context refactor complete

This commit is contained in:
msramalho
2023-03-23 14:28:45 +00:00
parent 906ed0f6e0
commit 6f6eb2db7a
11 changed files with 96 additions and 55 deletions

View File

@@ -46,14 +46,16 @@ No preview available for {{ m.key }}.
{% endif %}
{% if links %}
<a href="{{ url }}">open</a> or
<a href="{{ url }}" download="">download</a>
<a href="{{ url }}" download="">download</a> or
{{ copy_urlize(url, "copy") }}
<br>
{% endif %}
{% endfor %}
{%- endmacro -%}
{% macro copy_urlize(val) -%}
{% macro copy_urlize(val, href_text) -%}
{% if val is mapping %}
<ul>
@@ -65,7 +67,11 @@ No preview available for {{ m.key }}.
</ul>
{% else %}
{% if href_text | length == 0 %}
<span class="copy">{{ val | string | urlize }}</span>
{% else %}
<span class="copy" copy-value="{{val}}">{{ href_text | string | urlize }}</span>
{% endif %}
{% endif %}
{%- endmacro -%}