From c7b9901e01ec3720b47fcef3d33bdbd6ce53f000 Mon Sep 17 00:00:00 2001
From: Regis Philibert <login@regisphilibert.com>
Date: Thu, 02 Dec 2021 20:22:18 +0000
Subject: [PATCH] Refactor social service logic and UX (#425)
---
layouts/partials/func/style/GetMainCSS.html | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/layouts/partials/func/style/GetMainCSS.html b/layouts/partials/func/style/GetMainCSS.html
index 7261dae..9e3c24d 100644
--- a/layouts/partials/func/style/GetMainCSS.html
+++ b/layouts/partials/func/style/GetMainCSS.html
@@ -22,6 +22,25 @@
{{ end }}
{{ end }}
+{{ with partialCached "func/socials/Get" "socials/Get" }}
+ {{ $socials_rules := slice }}
+ {{ range $service := . }}
+ {{ with .color }}
+ {{ $rule := printf `
+ .ananke-socials a.%s:hover {
+ color: %s
+ }` $service.name $service.color }}
+ {{ $socials_rules = $socials_rules | append $rule }}
+ {{ end }}
+ {{ end }}
+ {{ with $socials_rules }}
+ {{ $socials_rules = delimit . "" }}
+ {{ $socials_css := $socials_rules | resources.FromString "ananke/css/generated_socials.css" }}
+ {{ $assets_to_concat = $assets_to_concat | append $socials_css }}
+ {{ end }}
+
+{{ end }}
+
{{/* We look for any custom css files registered by the user under `site.params.custom_css and if found in the theme's
css asset directory we add to aforementioned slice */}}
{{ with site.Params.custom_css }}
--
Gitblit v1.10.0