tpl/images: Change signature of images.QR to images.QR TEXT OPTIONS

Closes #13230
This commit is contained in:
Joe Mooring
2025-01-08 10:10:18 -08:00
committed by Bjørn Erik Pedersen
parent d9594a96fc
commit b13d0a68e6
5 changed files with 42 additions and 35 deletions

View File

@@ -64,8 +64,8 @@ Encodes the given text into a QR code using the specified options and renders th
{{- /* Render image. */}}
{{- if not $errors }}
{{- $opts := dict "text" $text "level" $level "scale" $scale "targetDir" $targetDir }}
{{- with images.QR $opts -}}
{{- $opts := dict "level" $level "scale" $scale "targetDir" $targetDir }}
{{- with images.QR $text $opts -}}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"
{{- with $alt }} alt="{{ $alt }}" {{- end }}
{{- with $class }} class="{{ $class }}" {{- end }}