feat(partials): add simple renderer without LQIP

This commit is contained in:
kdevo
2021-10-09 16:06:00 +02:00
parent 8121a2f2e1
commit c824db3108
+13
View File
@@ -0,0 +1,13 @@
{{ $class := .class }}
{{ $alt := .alt }}
{{ $noscriptSupport := .noscript }}
{{ $imgDict := .imgDict }}
{{- if $noscriptSupport -}}
<noscript>
{{ partial "renderer/native" . }}
</noscript>
{{- end -}}
<img src="{{ $imgDict.default.Permalink }}" class="{{ $class }} lazyload"
{{- with $imgDict.default }} height="{{ .Height }}" width="{{ .Width }}" {{- end -}}
{{- if $imgDict.responsive -}}{{ with partial "renderer/_srcset" $imgDict }} data-sizes="auto" data-srcset="{{ . }}"{{- end }} {{- end -}}
{{- with $alt }} alt="{{ . }}" {{- end }}>