mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 10:15:22 +00:00
feat: add support for displaying square avatars
Simplify generated avatar resources and commit. See #1509
This commit is contained in:
1 parent
1a3efac296
commit
242479c5ed
5 files changed
+2
-2
No files matched your search
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@@ -32,7 +32,7 @@
|
||||
{{ if and site.Params.avatar.gravatar .Params.email }}
|
||||
<img class="avatar mr-3 {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="https://s.gravatar.com/avatar/{{ md5 .Params.email }}?s=200')" alt="Avatar">
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "200x200 Center" }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
<img class="avatar mr-3 {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="{{ $avatar_image.RelPermalink }}" alt="Avatar">
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
{{ if site.Params.avatar.gravatar }}
|
||||
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=150" (md5 .Params.email) }}
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "150x150 Center" }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
{{ $src = $avatar_image.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ if $src }}
|
||||
|
||||
Reference in new issue
Block a user