mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
♻️ Refactor: global/site/page scope state management (#610)
* ⚡ Perf: adjust global/site scope state management * ⚡ Perf: adjust page scope state management
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{{- /* Content */ -}}
|
||||
{{- $content := .Inner | .Page.RenderString -}}
|
||||
{{- /* Content Encryption */ -}}
|
||||
{{- dict "Content" $content "Password" $password "Message" $message "IsPartial" true | partial "plugin/fixit-encryptor.html" -}}
|
||||
{{- dict "Content" $content "Password" $password "Message" $message "IsPartial" true "Page" .Page | partial "plugin/fixit-encryptor.html" -}}
|
||||
{{- else -}}
|
||||
{{- .Inner -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- $id := dict "Scratch" .Page.Scratch | partial "function/id.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) -}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- $content := .Inner | .Page.RenderString -}}
|
||||
{{- $id := dict "Scratch" .Page.Scratch | partial "function/id.html" -}}
|
||||
{{- $id := dict "Page" .Page | partial "function/id.html" -}}
|
||||
{{- $tag := .Get 1 | default "div" -}}
|
||||
{{- printf `<%v id="%v">%v</%v>` $tag $id $content $tag | safeHTML -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user