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

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html10
1 files changed, 2 insertions, 8 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 3bad352..f0f1679 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -44,16 +44,10 @@
{{ end }}
{{ if .HasShortcode "social" }}
-
- <!-- Reduce repetition... -->
- {{ $centralizedOnPage := $.Page.Params.Social.Centralized }}
- {{ $centralizedOnSite := $.Site.Params.Social.Centralized }}
- {{ $decentralizedOnPage := $.Page.Params.Social.Decentralized }}
- {{ $decentralizedOnSite := $.Site.Params.Social.Decentralized }}
-
+
<!-- Get info about social platform and icon id from "social.json" -->
{{ range .Site.Data.social }}
- {{ if and (or (index (or $centralizedOnPage $centralizedOnSite) .entry) (index (or $decentralizedOnPage $decentralizedOnSite) .entry)) .icon }}
+ {{ if and (or (index $.Site.Params.Social.Centralized .entry) (index $.Site.Params.Social.Decentralized .entry)) .icon }}
{{ $iconId := .icon.id }}
{{ $svgEssential := `(?:<svg (?:.*?)(viewBox="(?:.*?)")(?:.*?)>((?:.|\n)+?)(?:</svg>))` }}
{{ $asSymbol := printf `<symbol ${1} id="%s">${2}</symbol>` $iconId }}