Skip to content

Commit

Permalink
Merge pull request #171 from MarekPikula/hero-social-local
Browse files Browse the repository at this point in the history
Don't open hero social link if href is local
  • Loading branch information
gurusabarish authored Jun 15, 2024
2 parents b8c83af + 0a95ffa commit 684a314
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions layouts/partials/sections/hero/social.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
<span>
{{ range .Site.Params.hero.socialLinks.fontAwesomeIcons }}
<span class="px-1">
<a href="{{ .url }}" target="_blank" class="btn social-icon">
<a href="{{ .url }}"
{{ if not (hasPrefix .url "#") }} target="_blank" {{ end }}
class="btn social-icon"
>
<i class="{{ .icon }}"></i>
</a>
</span>
{{ end }}

{{ range .Site.Params.hero.socialLinks.customIcons }}
<span class="px-1">
<a href="{{ .url }}" target="_blank" class="btn social-icon">
<a href="{{ .url }}"
{{ if not (hasPrefix .url "#") }} target="_blank" {{ end }}
class="btn social-icon"
>
<img src="{{ .icon }}">
</a>
</span>
{{ end }}
</span>
</span>

0 comments on commit 684a314

Please sign in to comment.