Skip to content

Commit

Permalink
Footer contact info: Icons and linking (hugo-toha#471)
Browse files Browse the repository at this point in the history
* Footer contact info: Icons and linking

* Open link in a new tab

Signed-off-by: hossainemruz <[email protected]>

Co-authored-by: Emruz Hossain <[email protected]>
  • Loading branch information
tifrel and hossainemruz committed Dec 7, 2021
1 parent 0c408aa commit 39e1433
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

{{ $disclaimer := "" }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.disclaimer }}
{{ if $siteConfig.disclaimer }}
{{ $disclaimer = $siteConfig.disclaimer }}
{{ end }}

Expand Down Expand Up @@ -86,7 +86,23 @@ <h5>{{ i18n "navigation" }}</h5>
<h5>{{ i18n "contact_me" }}</h5>
<ul>
{{ range $key,$value:= $author.contactInfo }}
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
{{ if (eq $key "email") }}
<li><a href={{ printf "mailto:%s" $value }} target="_blank" rel="noopener">
<span><i class="fas fa-envelope"></i></span> <span>{{ $value }}</span>
</a></li>
{{ else if (eq $key "phone") }}
<li><span><i class="fas fa-phone-alt"></i></span> <span>{{ $value }}</span></li>
{{ else if (eq $key "linkedin") }}
<li><a href={{ printf "https://www.linkedin.com/in/%s" $value }} target="_blank" rel="noopener">
<span><i class="fab fa-linkedin"></i></span> <span>{{ $author.name }}</span>
</a></li>
{{ else if (eq $key "github") }}
<li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener">
<span><i class="fab fa-github"></i></span> <span>{{ $value }}</span>
</a></li>
{{ else }}
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
{{ end }}
{{ end }}
</ul>
</div>
Expand Down

0 comments on commit 39e1433

Please sign in to comment.