mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
feat: lazy load more images
This commit is contained in:
1 parent
4fccaa0f4b
commit
f7c06211fa
4 files changed
+4
-4
No files matched your search
@@ -15,7 +15,7 @@
|
||||
<div class="d-flex align-content-start">
|
||||
<div class="mr-2 mb-2">
|
||||
{{- with .organization_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end -}}
|
||||
<img src="{{ $svg_icon.RelPermalink }}" width="56px" height="56px" alt="{{.organization | plainify}}">
|
||||
<img src="{{ $svg_icon.RelPermalink }}" width="56px" height="56px" alt="{{.organization | plainify}}" loading="lazy">
|
||||
{{- with .organization_url}}</a>{{end -}}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="d-flex align-content-start">
|
||||
<div class="mr-2 mb-2">
|
||||
{{- with .company_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end -}}
|
||||
<img src="{{ $svg_icon.RelPermalink }}" width="56px" height="56px" alt="{{.company | plainify}}">
|
||||
<img src="{{ $svg_icon.RelPermalink }}" width="56px" height="56px" alt="{{.company | plainify}}" loading="lazy">
|
||||
{{- with .company_url}}</a>{{end -}}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{{- . | emojify -}}
|
||||
{{- else if eq $pack "custom" -}}
|
||||
{{- $svg_icon := resources.Get (printf "media/icons/%s.svg" .) -}}
|
||||
{{- if $svg_icon -}}<img src="{{ $svg_icon.RelPermalink }}" alt="{{.}}" class="svg-icon svg-baseline">{{- end -}}
|
||||
{{- if $svg_icon -}}<img src="{{ $svg_icon.RelPermalink }}" alt="{{.}}" class="svg-icon svg-baseline" loading="lazy">{{- end -}}
|
||||
{{- else -}}
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ . }}"></i>
|
||||
{{- end -}}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
{{ end }}
|
||||
{{ if $src }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
{{with $link}}<a href="{{.}}">{{end}}<img class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="{{ $src }}" alt="Avatar">{{if $link}}</a>{{end}}
|
||||
{{with $link}}<a href="{{.}}">{{end}}<img width="270" height="270" loading="lazy" class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="{{ $src }}" alt="Avatar">{{if $link}}</a>{{end}}
|
||||
{{ end }}
|
||||
|
||||
<div class="portrait-title">
|
||||
|
||||
Reference in new issue
Block a user