File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1616 {{ $avatar := resources.Get (.src) }}
1717
1818 {{ if $avatar }}
19- {{ $avatarResized := $avatar.Resize "300x" }}
20- < img src ="{{ $avatarResized.RelPermalink }} " width ="{{ $avatarResized.Width }} "
21- height ="{{ $avatarResized.Height }} " class ="site-logo " loading ="lazy " alt ="Avatar ">
19+ {{ $avatarResized := $avatar.Resize "120x" }}
20+ {{ $avatar1_5 := $avatar.Resize "180x" }}
21+ {{ $avatar2 := $avatar.Resize "240x" }}
22+ < img
23+ src ="{{ $avatarResized.RelPermalink }} "
24+ srcset ="{{$avatarResized.RelPermalink}},
25+ {{$avatar1_5.RelPermalink}} 1.5x,
26+ {{$avatar2.RelPermalink}} 2x "
27+ width ="{{ $avatarResized.Width }} "
28+ height ="{{ $avatarResized.Height }} "
29+ class ="site-logo "
30+ loading ="lazy "
31+ alt ="Avatar "
32+ />
2233 {{ else }}
2334 {{ errorf "Failed loading avatar from %q" . }}
2435 {{ end }}
You can’t perform that action at this time.
0 commit comments