Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/timer-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Henning <mail@philip-henning.com>2018-10-24 14:56:18 +0300
committerPhilip Henning <mail@philip-henning.com>2018-10-24 14:56:18 +0300
commit38b826555911e53c6ec5a2990b05dba6078279fa (patch)
tree796f1857063a729251430f2b5ecfa924b0947791
parent73d703de69defe17c7fa0304bce1274f2c5f1236 (diff)
Replace static list of social icons with a dynamic user defined list.
-rw-r--r--exampleSite/config.toml15
-rw-r--r--layouts/partials/footer.html26
2 files changed, 19 insertions, 22 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 481ef7c..1e2433e 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -89,4 +89,19 @@ theme = "timer-hugo"
customized = false # Set this variable to true if you customized the design.
copyright_owner = "Themefisher"
copyright_since = "2018"
+ [[params.footer.social]]
+ icon = "ion-social-facebook"
+ link = "https://facebook.com"
+ [[params.footer.social]]
+ icon = "ion-social-twitter"
+ link = "https://twitter.com"
+ [[params.footer.social]]
+ icon = "ion-social-linkedin"
+ link = "https://linkedin.com"
+ [[params.footer.social]]
+ icon = "ion-social-googleplus"
+ link = "https://googleplus.com"
+ [[params.footer.social]]
+ icon = "ion-social-github"
+ link = "https://github.com"
\ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index dca2462..66420f2 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -18,31 +18,13 @@
<div class="col-md-4 col-12">
{{ "<!-- Social Media -->" | safeHTML }}
<ul class="social text-center text-md-right text-lg-right">
+ {{ range $index, $element := .Site.Params.footer.social }}
<li>
- <a href="#" class="facebook">
- <i class="ion-social-facebook"></i>
- </a>
- </li>
- <li>
- <a href="#" class="twitter">
- <i class="ion-social-twitter"></i>
- </a>
- </li>
- <li>
- <a href="#" class="linkedin">
- <i class="ion-social-linkedin"></i>
- </a>
- </li>
- <li>
- <a href="#" class="googleplus">
- <i class="ion-social-googleplus"></i>
- </a>
- </li>
- <li>
- <a href="#" class="github">
- <i class="ion-social-github"></i>
+ <a href="{{ if eq .link "" }}#{{ else }}{{ .link | safeURL }}{{ end }}" target="_blank">
+ <i class="{{ .icon }}"></i>
</a>
</li>
+ {{ end }}
</ul>
</div>
</div>