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

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-02-24 12:48:24 +0300
committerCurtis Timson <curt@live.co.uk>2018-02-24 12:48:24 +0300
commite09028a905aceacb7d855b7d6d8e39f1f574a884 (patch)
tree64121d55f1eda73632b83f0d39f462361e4da94a
parent4e038cbae1f830b27fb1280a2d50f4482f7ab2f1 (diff)
:sparkles: Move social links to data files
-rw-r--r--exampleSite/config-prod.toml7
-rw-r--r--exampleSite/config.toml7
-rw-r--r--exampleSite/data/footer/links/social.yaml5
-rw-r--r--layouts/partials/footer/social.html22
4 files changed, 17 insertions, 24 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml
index dce9e3b..5b4c8b9 100644
--- a/exampleSite/config-prod.toml
+++ b/exampleSite/config-prod.toml
@@ -18,13 +18,6 @@ theme = "../.."
postsperpage = "6"
foldername = "blog"
-[params.social]
- facebook = "https://facebook.com"
- twitter = "https://twitter.com/"
- dribbble = "https://dribbble.com"
- linkedin = "https://www.linkedin.com"
- googleplus = "https://plus.google.com/"
-
[params.address]
line1 = "Untitled Incorporated"
line2 = "1234 Somewhere Road Suite"
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index ea71d5c..9368bec 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -18,13 +18,6 @@ theme = "../.."
postsperpage = "6"
foldername = "blog"
-[params.social]
- facebook = "https://facebook.com"
- twitter = "https://twitter.com/"
- dribbble = "https://dribbble.com"
- linkedin = "https://www.linkedin.com"
- googleplus = "https://plus.google.com/"
-
[params.address]
line1 = "Untitled Incorporated"
line2 = "1234 Somewhere Road Suite"
diff --git a/exampleSite/data/footer/links/social.yaml b/exampleSite/data/footer/links/social.yaml
new file mode 100644
index 0000000..230ad13
--- /dev/null
+++ b/exampleSite/data/footer/links/social.yaml
@@ -0,0 +1,5 @@
+facebook: "https://facebook.com"
+twitter: "https://twitter.com/"
+dribbble: "https://dribbble.com"
+linkedin: "https://www.linkedin.com"
+googleplus: "https://plus.google.com/" \ No newline at end of file
diff --git a/layouts/partials/footer/social.html b/layouts/partials/footer/social.html
index e31e2cb..68e9120 100644
--- a/layouts/partials/footer/social.html
+++ b/layouts/partials/footer/social.html
@@ -1,17 +1,19 @@
<ul class="social">
- {{ if .Site.Params.Social.facebook }}
- <li><a class="icon fa-facebook" href="{{ .Site.Params.Social.facebook }}"><span class="label">Facebook</span></a></li>
+ {{ with .Site.Data.footer.links.social }}
+ {{ if .facebook }}
+ <li><a class="icon fa-facebook" href="{{ .facebook }}"><span class="label">Facebook</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.twitter }}
- <li><a class="icon fa-twitter" href="{{ .Site.Params.Social.twitter }}"><span class="label">Twitter</span></a></li>
+ {{ if .twitter }}
+ <li><a class="icon fa-twitter" href="{{ .twitter }}"><span class="label">Twitter</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.dribbble }}
- <li><a class="icon fa-dribbble" href="{{ .Site.Params.Social.dribbble }}"><span class="label">Dribbble</span></a></li>
+ {{ if .dribbble }}
+ <li><a class="icon fa-dribbble" href="{{ .dribbble }}"><span class="label">Dribbble</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.linkedin }}
- <li><a class="icon fa-linkedin" href="{{ .Site.Params.Social.linkedin }}"><span class="label">LinkedIn</span></a></li>
+ {{ if .linkedin }}
+ <li><a class="icon fa-linkedin" href="{{ .linkedin }}"><span class="label">LinkedIn</span></a></li>
+ {{ end }}
+ {{ if .googleplus }}
+ <li><a class="icon fa-google-plus" href="{{ .googleplus }}"><span class="label">Google+</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.googleplus }}
- <li><a class="icon fa-google-plus" href="{{ .Site.Params.Social.googleplus }}"><span class="label">Google+</span></a></li>
{{ end }}
</ul> \ No newline at end of file