Commit 2a281b86 authored by Emma's avatar Emma 🦉

easy search by submission url hostname

parent 542ec44d
Pipeline #54614318 passed with stages
in 8 minutes and 36 seconds
......@@ -31,6 +31,7 @@
}
&__host {
color: var(--submission-link);
font-size: 0.75rem;
}
......
......@@ -75,11 +75,11 @@
{% endif %}
{% if submission.url is not empty and '://' in submission.url %}
<small class="submission__host">
{%- with {host: submission.url|split('://')[1]|split('/')[0]} -%}
{% with { host: submission.url|split('://')[1]|split('/')[0] } %}
<a href="{{ path('search', { q: host }) }}" class="submission__host">
{{- host[0:4] == 'www.' ? host[4:] : host -}}
{%- endwith -%}
</small>
</a>
{%- endwith -%}
{% endif %}
</h1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment