Fix missing URL for Top-level menu entry in nested menue

This commit is contained in:
schachem 2023-04-30 14:25:25 +02:00 committed by GitHub
parent 92f26f9bdd
commit 9e7abf32cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,8 @@
{{ partial "icon.html" .Pre }}
</span>
{{ end }}
<a class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">
<a {{ if .URL }} href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
target="_blank" {{ end }} {{ end }} class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">
{{ .Name | markdownify | emojify }}
</a>
<span>