Footer contact info: Icons and linking (#471)

* Footer contact info: Icons and linking

* Open link in a new tab

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
Till 2021-12-07 19:11:59 +01:00 committed by GitHub
parent 0c408aa7ce
commit 39e1433fca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,8 +86,24 @@
<h5>{{ i18n "contact_me" }}</h5>
<ul>
{{ range $key,$value:= $author.contactInfo }}
{{ 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>
{{ end }}