Skip to content
Permalink
Browse files

feat: add support for displaying square avatars

Simplify generated avatar resources and commit.

See #1509
  • Loading branch information
gcushen committed Jan 12, 2020
1 parent 1a3efac commit 242479c5eddd8c2d04a401d8675702becf9577d0
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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 @@ <h2 class="mb-4">{{ . | markdownify }}</h2>
{{ 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 }}

0 comments on commit 242479c

Please sign in to comment.
You can’t perform that action at this time.