Open external links in a new tab

This commit is contained in:
Oliver Davies 2019-06-06 19:45:05 +01:00
parent 3bd8fcd70a
commit 4f32fdea4e

View file

@ -1,7 +1,12 @@
<div class="spaced-y-2"> <div class="spaced-y-2">
<div class="spaced-y-2px"> <div class="spaced-y-2px">
<h2 class="text-inherit text-lg m-0"> <h2 class="text-inherit text-lg m-0">
<a href="{{ post.external_url ?: post.url }}" class="text-inherit" tabindex="-1"> <a
href="{{ post.external_url ?: post.url }}"
class="text-inherit"
tabindex="-1"
{% if post.external_url %}target="_blank" rel="noopener"{% endif %}
>
{{ post.draft ? 'Draft: '|upper }}{{ post.title }} {{ post.draft ? 'Draft: '|upper }}{{ post.title }}
</a> </a>
</h2> </h2>