diff options
author | Tobias Sachs <tobias@tobiassachs.de> | 2017-04-27 22:15:39 +0300 |
---|---|---|
committer | Tobias Sachs <tobias@tobiassachs.de> | 2017-04-27 22:15:39 +0300 |
commit | 23217ef7b57774cb5b7dd97fdb4d625af6238924 (patch) | |
tree | ac64eb08126b14ff3eb8c483d77fca1820bc8602 | |
parent | ad6da21dde86b7970d68cdf4d7a4a0ee45cc681b (diff) |
Making the social part from the footer a variable
-rw-r--r-- | exampleSite/config.toml | 4 | ||||
-rwxr-xr-x | layouts/partials/footer.html | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ae10ed8..558d4e1 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -277,3 +277,7 @@ theme = "hugo-elate-theme" [params.footer] enable = true copyright = '© Elate Free HTML5. All Rights Reserved. <br>Created by <a href="http://freehtml5.co/" target="_blank">FREEHTML5.co</a> Images: <a href="http://pexels.com/" target="_blank">Pexels</a>, <a href="http://plmd.me/" target="_blank">plmd.me</a> <br>Hugo port by: <a href="https://github.com/saey55" target="_blank">saey55</a>' + # Remove # to disable the logo + facebook = '#' + twitter = '#' + youtube = '#' diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 829be25..e4abda1 100755 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -10,11 +10,11 @@ <div class="row">
<div class="col-md-12 text-center">
<ul class="social social-circle">
- <li><a href="#"><i class="icon-twitter"></i></a></li>
- <li><a href="#"><i class="icon-facebook"></i></a></li>
- <li><a href="#"><i class="icon-youtube"></i></a></li>
+ {{ if .Site.Params.footer.twitter }}<li><a href="{{ printf "%s" .Site.Params.footer.twitter }}"><i class="icon-twitter"></i></a></li>{{ end }}
+ {{ if .Site.Params.footer.facebook }}<li><a href="{{ printf "%s" .Site.Params.footer.facebook }}"><i class="icon-facebook"></i></a></li>{{ end }}
+ {{ if .Site.Params.footer.youtube }}<li><a href="{{ printf "%s" .Site.Params.footer.youtube }}"><i class="icon-youtube"></i></a></li>{{ end }}
</ul>
</div>
</div>
</div>
- </footer>
\ No newline at end of file + </footer>
|