Compare commits
5 Commits
ec315ea1b5
...
9905066046
Author | SHA1 | Date | |
---|---|---|---|
9905066046
|
|||
4e37655a16
|
|||
de272212ca
|
|||
8fac4841d4
|
|||
c52639e38f
|
@@ -25,21 +25,19 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- with $image -}}
|
||||
{{ $original := . }}
|
||||
{{ $full := . | images.Filter (images.Process "webp q90") }}
|
||||
|
||||
{{ $full := $original | images.Filter (images.Process "webp q90") }}
|
||||
|
||||
{{ $thumb := $original }}
|
||||
{{- if gt $original.Width 2000 -}}
|
||||
{{- $thumb = $original | images.Filter (images.Process "resize 2000x webp q75") -}}
|
||||
{{ $thumb := . }}
|
||||
{{- if gt .Width 2000 -}}
|
||||
{{- $thumb = . | images.Filter (images.Process "resize 2000x webp q75") -}}
|
||||
{{- else -}}
|
||||
{{- $thumb = $original | images.Filter (images.Process "webp q75") -}}
|
||||
{{- $thumb = . | images.Filter (images.Process "webp q75") -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
<figure class="captioned-image lightbox">
|
||||
<a
|
||||
href="{{- $original.RelPermalink -}}"
|
||||
href="{{- $full.RelPermalink -}}"
|
||||
data-pswp-src="{{- $full.RelPermalink -}}"
|
||||
data-pswp-width="{{- $full.Width -}}"
|
||||
data-pswp-height="{{- $full.Height -}}"
|
||||
|
Reference in New Issue
Block a user