{{- /* Post disclaimer/declaration partial. Displays a lightweight disclaimer notice at the beginning of an article. Supports multiple types: ai, ai-assisted, ai-translated, repost, original, custom. The "custom" type requires content to be specified, otherwise it will not be displayed. */ -}} {{- $disclaimer := dict "Page" . "Key" "disclaimer" | partial "function/param.html" | default dict -}} {{- if $disclaimer.enable -}} {{- $type := $disclaimer.type | default "ai" -}} {{- $content := "" -}} {{- if eq $type "custom" -}} {{- /* custom type requires content, otherwise skip */ -}} {{- $content = $disclaimer.content | default "" -}} {{- else -}} {{- $content = $disclaimer.content | default (T (printf "single.disclaimerMessage.%s" $type)) -}} {{- end -}} {{- if $content -}} {{- $types := slice "ai" "repost" "original" -}} {{- $iconSrc := "" -}} {{- if in $types $type -}} {{- $iconSrc = printf "images/icons/disclaimer/%v.svg" $type -}} {{- end -}}
{{- if $iconSrc -}} {{- dict "Src" $iconSrc | partial "plugin/icon.html" -}} {{- else -}} {{- dict "Class" "icon fa-solid fa-bullhorn" | partial "plugin/icon.html" -}} {{- end -}} {{ T "single.disclaimer" }}{{ $content | safeHTML }}
{{- end -}} {{- end -}}