Fixed issues with external links not opening in a new tab
This commit is contained in:
parent
ecb83a96c6
commit
3ba730043f
1 changed files with 18 additions and 9 deletions
|
@ -26,18 +26,27 @@
|
|||
|
||||
{{if .Href}}
|
||||
<div class="card-actions justify-end">
|
||||
<a
|
||||
role="button"
|
||||
href={{.Href}}
|
||||
aria-label={{.Name}}
|
||||
class="btn btn-circle btn-base-100 text-primary hover:btn-accent hover:text-neutral"
|
||||
>
|
||||
{{if eq true .Internal}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>
|
||||
<a
|
||||
role="button"
|
||||
href={{.Href}}
|
||||
aria-label={{.Name}}
|
||||
class="btn btn-circle btn-base-100 text-primary hover:btn-accent hover:text-neutral"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>
|
||||
</a>
|
||||
{{else}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>
|
||||
<a
|
||||
role="button"
|
||||
href={{.Href}}
|
||||
aria-label={{.Name}}
|
||||
class="btn btn-circle btn-base-100 text-primary hover:btn-accent hover:text-neutral"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>
|
||||
</a>
|
||||
{{end}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue