summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-22 11:54:06 +0200
committerDanilo M. <danix@danix.xyz>2026-04-22 11:54:06 +0200
commit0078ec475cba19fc5a27dca8e186190bdc5ac023 (patch)
tree389acb66c9072120da7b8d38453191c4a4d3b5c5 /themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html
parent97ded5db20bd901ef48b1f50abf5f7dc83e667bd (diff)
downloaddanixxyz-0078ec475cba19fc5a27dca8e186190bdc5ac023.tar.gz
danixxyz-0078ec475cba19fc5a27dca8e186190bdc5ac023.zip
Chore: fixed gravatar display in pages.
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html')
-rw-r--r--themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html b/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html
index a463086..3a1ebcc 100644
--- a/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html
+++ b/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html
@@ -1,11 +1,11 @@
{{- $email := .Get "email" -}}
-{{- $size := .Get "size" | default "256" -}}
+{{- $size := .Get "size" | default "256" | int -}}
{{- $alt := .Get "alt" | default "User avatar" -}}
{{- $class := .Get "class" | default "w-32 h-32 rounded-full" -}}
{{- if $email -}}
{{- $hash := md5 (strings.TrimSpace (strings.ToLower $email)) -}}
- {{- $gravatarURL := printf "https://www.gravatar.com/avatar/%s?s=%s&d=identicon" $hash $size -}}
+ {{- $gravatarURL := printf "https://www.gravatar.com/avatar/%s?s=%d&d=identicon" $hash $size -}}
<img
src="{{ $gravatarURL }}"
alt="{{ $alt }}"