{{- /* Post reward panel renderer. - Renders reward switch button and reward QR/payment images. - Supports optional author prefix and animation mode. @param {Object} .Reward - Reward config object @param {String} .Id - Unique input id for reward toggle @param {String} [.Author] - Optional author name for image alt text */ -}} {{- $reward := .Reward -}} {{- $id := .Id -}} {{- $author := .Author | default "" -}} {{- if $reward.enable -}}
{{ $reward.comment }}
{{- range $way, $image := $reward.ways -}} {{- with T (printf "single.reward.%v" $way) -}}{{ $way = . }}{{- end -}} {{- if $image -}}
{{- dict "Src" $image "Alt" (strings.TrimPrefix " " (printf "%v %v" $author $way)) | partial "plugin/image.html" -}} {{ $way }}
{{- end -}} {{- end -}}
{{- end -}}