Compare commits

..

5 Commits

Author SHA1 Message Date
17947be625 Improve taxonomy handling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-09-12 13:33:41 +01:00
d86cc63aa4 Fix unhighlighted code styles
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-09-12 12:05:37 +01:00
49d90045db Add shell prompt support
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-09-12 11:16:18 +01:00
4e2c24ad59 Fix layout bugs
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-09-11 17:43:07 +00:00
903227b07c Add image processing
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-09-11 17:42:53 +00:00

View File

@@ -25,30 +25,28 @@
{{- end -}} {{- end -}}
{{- with $image -}} {{- with $image -}}
{{ $original := . }} {{ $full := . | images.Filter (images.Process "webp q90") }}
{{ $full := $original | images.Filter (images.Process "webp q90") }} {{ $thumb := . }}
{{- if gt .Width 2000 -}}
{{ $thumb := $original }} {{- $thumb = . | images.Filter (images.Process "resize 2000x webp q75") -}}
{{- if gt $original.Width 2000 -}}
{{- $thumb = $original | images.Filter (images.Process "resize 2000x webp q75") -}}
{{- else -}} {{- else -}}
{{- $thumb = $original | images.Filter (images.Process "webp q75") -}} {{- $thumb = . | images.Filter (images.Process "webp q75") -}}
{{- end -}} {{- end -}}
<figure class="captioned-image lightbox"> <figure class="captioned-image lightbox">
<a <a
href="{{- $original.RelPermalink -}}" href="{{- .RelPermalink -}}"
data-pswp-src="{{- $full.RelPermalink -}}" data-pswp-src="{{- .RelPermalink -}}"
data-pswp-width="{{- $full.Width -}}" data-pswp-width="{{- .Width -}}"
data-pswp-height="{{- $full.Height -}}" data-pswp-height="{{- .Height -}}"
class="pswp-image" class="pswp-image"
> >
<img <img
src="{{- $thumb.RelPermalink -}}" src="{{- $thumb.RelPermalink -}}"
width="{{- $thumb.Width -}}" width="{{- .Width -}}"
height="{{- $thumb.Height -}}" height="{{- .Height -}}"
loading="lazy" loading="lazy"
{{ with $title }}title="{{- . -}}"{{ end }} {{ with $title }}title="{{- . -}}"{{ end }}
{{ with $alt }}alt="{{- . -}}"{{ end }} {{ with $alt }}alt="{{- . -}}"{{ end }}