Files
Cell 3e8bdfd8f9 ♻️ Refactor: global/site/page scope state management (#610)
*  Perf: adjust global/site scope state management

*  Perf: adjust page scope state management
2025-07-03 12:48:32 +08:00

13 lines
759 B
HTML

{{- $id := dict "Page" .Page | partial "function/id.html" -}}
{{- $wechatpay := (.Get "wechatpay") | default (.Get 0) -}}
{{- $alipay := (.Get "alipay") | default (.Get 1) -}}
{{- $paypal := (.Get "paypal") | default (.Get 2) -}}
{{- $bitcoin := (.Get "bitcoin") | default (.Get 3) -}}
{{- $author := (.Get "author") | default (.Get 4) -}}
{{- $comment := (.Get "comment") | default (.Get 5) -}}
{{- $mode := (.Get "mode") | default (.Get 6) -}}
{{- $reward := dict "enable" true "comment" $comment "mode" $mode -}}
{{- $reward = dict "wechatpay" $wechatpay "alipay" $alipay "paypal" $paypal "bitcoin" $bitcoin | dict "ways" | merge $reward -}}
{{- $options := dict "Reward" $reward "Id" $id "Author" $author -}}
{{- partial "plugin/reward.html" $options -}}