From 6309c01d84115f4f4b721b8eec8416944f7ea986 Mon Sep 17 00:00:00 2001 From: Fabien CASTERS Date: Fri, 5 Mar 2021 12:11:46 +0100 Subject: add params.social.name to display the name on mouseover --- layouts/_default/baseof.html | 4 +++- layouts/partials/icon.html | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d4fb410..01ef5c4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -34,7 +34,9 @@ {{- with .Site.Params.social }}
{{ range . }} - {{ partial "icon.html" (dict "ctx" $ "name" .icon) }} + + {{ partial "icon.html" (dict "ctx" $ "name" .icon "title" .name) }} + {{ end }}
{{- end }} diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html index 123bd23..06f8a42 100644 --- a/layouts/partials/icon.html +++ b/layouts/partials/icon.html @@ -1,6 +1,6 @@ {{- if isset .ctx.Site.Data.m10c.icons .name -}} - {{ .name }} + {{ .title | default .name }} {{ safeHTML (index .ctx.Site.Data.m10c.icons .name) }} {{- else -}} @@ -9,4 +9,3 @@ {{- end -}} - -- cgit v1.2.3