Skip to content

Commit

Permalink
Support rel atribute in social links (#735)
Browse files Browse the repository at this point in the history
Signed-off-by: hossainemruz <[email protected]>
  • Loading branch information
hossainemruz authored Feb 9, 2023
1 parent b498330 commit 0d20efe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions exampleSite/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ go 1.19
require github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6 // indirect

replace github.com/hugo-toha/toha/v4 => ../../toha
// replace github.com/hugo-toha/hugo-toha.github.io => ../../hugo-toha.github.io
6 changes: 3 additions & 3 deletions layouts/partials/sections/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ <h5 class="p-1">
{{ range .socialLinks }}
<li>
{{ if eq .name "Email" }}
<a href="mailto:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
<a href="mailto:{{ .url }}" title="{{ .name }}" target="_blank" rel="{{.rel | default "noopener"}}"><i class="{{ .icon }}"></i></a>
{{ else if eq .name (i18n "phone") }}
<a href="tel:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
<a href="tel:{{ .url }}" title="{{ .name }}" target="_blank" rel="{{.rel | default "noopener"}}"><i class="{{ .icon }}"></i></a>
{{ else }}
<a href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
<a href="{{ .url }}" title="{{ .name }}" target="_blank" rel="{{.rel | default "noopener"}}"><i class="{{ .icon }}"></i></a>
{{ end }}
</li>
{{ end }}
Expand Down

0 comments on commit 0d20efe

Please sign in to comment.