mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -06:00
Add target="_blank" automatically to navbar items
This commit is contained in:
parent
2f6d67a03f
commit
219f97bc00
@ -13,7 +13,9 @@
|
||||
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
||||
{{ $isActive = true }}
|
||||
{{ end }}
|
||||
<a class="navbar-item{{ if $isActive }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
||||
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
||||
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
|
||||
href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user