feat: add support for displaying square avatars

Simplify generated avatar resources and commit.

See #1509
This commit is contained in:
George Cushen committed 2020-01-12 14:35:59 +00:00
1 parent 1a3efac296
commit 242479c5ed
5 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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 }}
+1 -1
View File
@@ -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 }}