diff options
author | Fabien CASTERS <fabien@vaga.io> | 2021-03-05 14:11:46 +0300 |
---|---|---|
committer | Fabien <vaga@users.noreply.github.com> | 2021-03-05 14:29:43 +0300 |
commit | 6309c01d84115f4f4b721b8eec8416944f7ea986 (patch) | |
tree | 234940bd9585c27c50446619195086e986c40158 /layouts | |
parent | 0b0e233a3e7ad2140104cb584b6094f352e8aa21 (diff) |
add params.social.name to display the name on mouseover
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 4 | ||||
-rw-r--r-- | layouts/partials/icon.html | 3 |
2 files changed, 4 insertions, 3 deletions
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 }} <div class="app-header-social"> {{ range . }} - <a href="{{ .url }}" target="_blank" rel="noreferrer noopener">{{ partial "icon.html" (dict "ctx" $ "name" .icon) }}</a> + <a href="{{ .url }}" target="_blank" rel="noreferrer noopener"> + {{ partial "icon.html" (dict "ctx" $ "name" .icon "title" .name) }} + </a> {{ end }} </div> {{- 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 -}} <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-{{ .name }}"> - <title>{{ .name }}</title> + <title>{{ .title | default .name }}</title> {{ safeHTML (index .ctx.Site.Data.m10c.icons .name) }} </svg> {{- else -}} @@ -9,4 +9,3 @@ <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> {{- end -}} - |