Merge pull request #4 from patrickderitter/social-fix

This commit is contained in:
Nurlan Su 2017-02-11 23:34:02 +01:00 committed by GitHub
commit 317905fbca
3 changed files with 12 additions and 12 deletions

View File

@ -19,7 +19,7 @@ theme = "hugo-sustain"
custom_css = []
custom_js = []
[social]
[params.social]
Github = "username"
Email = "email@example.com"
Twitter = "username"

View File

@ -11,7 +11,7 @@
<h3>I love all things computer science and maths.</h3>
<h3>Have a look at some of my working <a href="{{ .Site.BaseURL }}projects/"> projects</a>.</h3>
<h3>For more check out my academic &amp; professional <a href="http://biomadeira.github.io/vitae">Resume</a>.</h3>
<h3>Contact me at <a href="http://twitter.com/{{ .Site.Social.Twitter }}">@{{ .Site.Social.Twitter }}</a> or by <a href="mailto:{{ .Site.Social.Email }}">email</a>.</h3>
<h3>Contact me at <a href="http://twitter.com/{{ .Site.Params.Social.Twitter }}">@{{ .Site.Params.Social.Twitter }}</a> or by <a href="mailto:{{ .Site.Params.Social.Email }}">email</a>.</h3>
{{ partial "social.html" . }}
</div>
</section>

View File

@ -1,23 +1,23 @@
<div class="social">
<h4>
{{ if .Site.Social.Github }}
<a href="http://github.com/{{ .Site.Social.Github }}"><i class="fa fa-github"></i></a>
{{ if .Site.Params.Social.Github }}
<a href="http://github.com/{{ .Site.Params.Social.Github }}"><i class="fa fa-github"></i></a>
{{ end }}
{{ if .Site.Social.Email }}
<a href="mailto:{{ .Site.Social.Email }}"><i class="fa fa-envelope"></i></a>
{{ if .Site.Params.Social.Email }}
<a href="mailto:{{ .Site.Params.Social.Email }}"><i class="fa fa-envelope"></i></a>
{{ end }}
{{ if .Site.Social.Twitter }}
<a href="http://twitter.com/{{ .Site.Social.Twitter }}"><i class="fa fa-twitter"></i></a>
{{ if .Site.Params.Social.Twitter }}
<a href="http://twitter.com/{{ .Site.Params.Social.Twitter }}"><i class="fa fa-twitter"></i></a>
{{ end }}
{{ if .Site.Social.LinkedIn }}
<a href="http://linkedin.com/in/{{ .Site.Social.LinkedIn }}"><i class="fa fa-linkedin"></i></a>
{{ if .Site.Params.Social.LinkedIn }}
<a href="http://linkedin.com/in/{{ .Site.Params.Social.LinkedIn }}"><i class="fa fa-linkedin"></i></a>
{{ end }}
{{ if .Site.Social.Stackoverflow }}
<a href="http://stackoverflow.com/{{ .Site.Social.Stackoverflow }}"><i class="fa fa-stack-overflow"></i></a>
{{ if .Site.Params.Social.Stackoverflow }}
<a href="http://stackoverflow.com/{{ .Site.Params.Social.Stackoverflow }}"><i class="fa fa-stack-overflow"></i></a>
{{ end }}
</h4>
</div>