mirror of https://github.com/jpanther/congo.git
commit
9433645cb6
|
@ -57,7 +57,7 @@
|
||||||
<source
|
<source
|
||||||
{{ if lt .Width 660 }}
|
{{ if lt .Width 660 }}
|
||||||
{{ with .Resize (printf "%dx%d webp" .Width .Height) }}
|
{{ with .Resize (printf "%dx%d webp" .Width .Height) }}
|
||||||
src="{{ .RelPermalink }}"
|
srcset="{{ .RelPermalink }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
srcset=" {{- (.Resize "330x webp").RelPermalink }} 330w,
|
srcset=" {{- (.Resize "330x webp").RelPermalink }} 330w,
|
||||||
|
@ -70,19 +70,18 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if gt .Width 1320 }}
|
{{ if gt .Width 1320 }}
|
||||||
,{{ (.Resize "1320x webp").RelPermalink }} 2x
|
,{{ (.Resize "1320x webp").RelPermalink }} 1320w
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ with .Resize (printf "%dx%d webp" .Width .Height) }}
|
{{ with .Resize (printf "%dx%d webp" .Width .Height) }}
|
||||||
,{{ .RelPermalink }} {{ .Width }}w
|
,{{ .RelPermalink }} {{ .Width }}w
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}"
|
{{ end }}"
|
||||||
src="{{ (.Resize "660x webp").RelPermalink }}"
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
sizes="100vw"
|
||||||
type="image/webp"
|
type="image/webp"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img
|
<img
|
||||||
src="{{ .RelPermalink }}"
|
|
||||||
width="{{ $width }}"
|
width="{{ $width }}"
|
||||||
height="{{ $height }}"
|
height="{{ $height }}"
|
||||||
{{ with $class }}class="{{ . }}"{{ end }}
|
{{ with $class }}class="{{ . }}"{{ end }}
|
||||||
|
@ -91,20 +90,20 @@
|
||||||
{{ if lt .Width 660 }}
|
{{ if lt .Width 660 }}
|
||||||
src="{{ .RelPermalink }}"
|
src="{{ .RelPermalink }}"
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
src="{{ (.Resize "660x").RelPermalink }}"
|
||||||
srcset=" {{- (.Resize "330x").RelPermalink }} 330w,
|
srcset=" {{- (.Resize "330x").RelPermalink }} 330w,
|
||||||
{{- (.Resize "660x").RelPermalink }}
|
{{- (.Resize "660x").RelPermalink }} 660w
|
||||||
660w
|
|
||||||
{{ if gt .Width 1024 }}
|
{{ if gt .Width 1024 }}
|
||||||
,{{ (.Resize "1024x").RelPermalink }} 1024w
|
,{{ (.Resize "1024x").RelPermalink }} 1024w
|
||||||
{{ else }}
|
{{ else }}
|
||||||
,{{ .RelPermalink }} {{ .Width }}w
|
,{{ .RelPermalink }} {{ .Width }}w
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if gt .Width 1320 }}
|
{{ if gt .Width 1320 }}
|
||||||
,{{ (.Resize "1320x").RelPermalink }} 2x
|
,{{ (.Resize "1320x").RelPermalink }} 1320w
|
||||||
{{ else }}
|
{{ else }}
|
||||||
,{{ .RelPermalink }} {{ .Width }}w
|
,{{ .RelPermalink }} {{ .Width }}w
|
||||||
{{ end }}"
|
{{ end }}"
|
||||||
src="{{ (.Resize "660x").RelPermalink }}"
|
sizes="100vw"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
/>
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
|
|
Loading…
Reference in New Issue