wrong number of arguments

This commit is contained in:
ndgnuh 2020-01-31 13:24:50 +07:00
parent 80f7a5c6bc
commit b23c9c1958
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
<div class="whoami__image-wrapper"> <div class="whoami__image-wrapper">
{{ $src := "" }} {{ $src := "" }}
{{ if site.Params.useGravatar }} {{ if site.Params.useGravatar }}
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=200" (md5 $.Param "email") }} {{ $src = printf "https://s.gravatar.com/avatar/%s?s=200" (md5 ($.Param "email")) }}
<img src="{{ $src }}" alt="{{ if $.Param "myname" }}{{ $.Param "myname" }}{{ else }}Avatar{{ end }}" class="whoami__image"/> <img src="{{ $src }}" alt="{{ if $.Param "myname" }}{{ $.Param "myname" }}{{ else }}Avatar{{ end }}" class="whoami__image"/>
{{ else }} {{ else }}
{{ if $.Param "authorImageUrl" }} {{ if $.Param "authorImageUrl" }}
@ -51,4 +51,4 @@
</div> </div>
</section> </section>
<hr class="hr-slash whoami-hr" /> <hr class="hr-slash whoami-hr" />
{{ end }} {{ end }}

View File

@ -4,7 +4,7 @@
<div class="bio__photo-wrapper"> <div class="bio__photo-wrapper">
{{ $src := "" }} {{ $src := "" }}
{{ if site.Params.useGravatar }} {{ if site.Params.useGravatar }}
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=200" (md5 $.Param "email") }} {{ $src = printf "https://s.gravatar.com/avatar/%s?s=200" (md5 ($.Param "email")) }}
<img src="{{ $src }}" alt="{{ if $.Param "myname" }}{{ $.Param "myname" }}{{ else }}Avatar{{ end }}" class="bio__photo"/> <img src="{{ $src }}" alt="{{ if $.Param "myname" }}{{ $.Param "myname" }}{{ else }}Avatar{{ end }}" class="bio__photo"/>
{{ else }} {{ else }}
{{ if $.Param "bioImageUrl" }} {{ if $.Param "bioImageUrl" }}
@ -75,4 +75,4 @@
</div> </div>
</section> </section>
<hr class="hr-fade sidebar-hr"/> <hr class="hr-fade sidebar-hr"/>
{{ end }} {{ end }}