Add option to disable email/phone linking in Contact section

This commit is contained in:
George Cushen 2016-05-17 22:39:49 +01:00
commit be17a08fda
2 changed files with 13 additions and 1 deletions

View file

@ -20,7 +20,7 @@ googleAnalytics = ""
address = "Stanford AI Lab, Stanford University, California, 90210, USA."
phone = "888 888 88 88"
# Date format (refer to Go's formatting options)
# Date format (refer to Go's date format: http://flippinggodateformat.com )
# Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "Mon, Jan 2, 2006"
@ -46,6 +46,10 @@ googleAnalytics = ""
institution = "Massachusetts Institute of Technology"
year = 2008
[params.contact]
# Automatically link email and phone?
autolink = true
# Social/Academic Networking
#
# Icon pack "fa" includes the following social network icons:

View file

@ -3,14 +3,22 @@
{{ with .Site.Params.phone }}
<li>
<i class="fa fa-phone fa-fw" aria-hidden="true"></i>
{{ if and (isset $.Site.Params.contact "autolink") (eq $.Site.Params.contact.autolink false) }}
<span>{{ . }}</span>
{{ else }}
<span><a href="tel:{{ . }}">{{ . }}</a></span>
{{ end }}
</li>
{{ end }}
{{ with .Site.Params.email }}
<li>
<i class="fa fa-envelope fa-fw" aria-hidden="true"></i>
{{ if and (isset $.Site.Params.contact "autolink") (eq $.Site.Params.contact.autolink false) }}
<span>{{ . }}</span>
{{ else }}
<span><a href="mailto:{{ . }}">{{ . }}</a></span>
{{ end }}
</li>
{{ end }}