diff --git a/data/svg.toml b/data/svg.toml index 1464a83..4eb4c51 100644 --- a/data/svg.toml +++ b/data/svg.toml @@ -243,6 +243,9 @@ gitlab = ''' ''' +gmail = ''' +Gmail +''' goodreads = ''' + +{{- /* Base64Email */}} +{{- if (.Param "MaskedEmail") }} + +{{- end -}} + + {{- /* Search */}} {{- if (eq .Layout `search`) -}} diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html index 21b9046..3127da4 100644 --- a/layouts/partials/home_info.html +++ b/layouts/partials/home_info.html @@ -7,7 +7,7 @@ {{- trim .Content "\n" | markdownify -}} {{- end -}} diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index 24e34fd..d48acd7 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -29,7 +29,7 @@ {{- end }} {{ .title | default site.Title | markdownify }} {{ .subtitle | markdownify }} - {{- partial "social_icons.html" (dict "icons" site.Params.socialIcons "svg" $.Site.Data.svg) -}} + {{- partial "social_icons.html" (dict "icons" site.Params.socialIcons "svg" $.Site.Data.svg "MaskedEmail" site.Params.MaskedEmail) -}} {{- with .buttons }} diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html index 62e156c..7a6cfbe 100644 --- a/layouts/partials/social_icons.html +++ b/layouts/partials/social_icons.html @@ -1,8 +1,16 @@ {{- range .icons }} + {{- $icon_name := ( trim .name " " | lower )}} + + {{- if (eq .url "email") }} + + {{ safeHTML (index $.svg $icon_name | default $.svg.default) }} + + {{- else }} - {{- $icon_name := ( trim .name " " | lower )}} {{ safeHTML (index $.svg $icon_name | default $.svg.default) }} {{- end }} + + {{- end }}