2020-03-02 16:47:28 +08:00
|
|
|
{{- $content := .Inner | .Page.RenderString -}}
|
2020-05-18 21:30:33 +08:00
|
|
|
{{- $id := dict "Scratch" .Page.Scratch | partial "function/id.html" -}}
|
2020-03-02 16:47:28 +08:00
|
|
|
{{- $tag := .Get 1 | default "div" -}}
|
2020-05-18 16:10:24 +08:00
|
|
|
{{- printf `<%v id="%v">%v</%v>` $tag $id $content $tag | safeHTML -}}
|
2020-04-29 02:34:28 +08:00
|
|
|
|
2020-05-18 16:10:24 +08:00
|
|
|
{{- $style := .Get 0 | printf "#%v{%v}" $id -}}
|
2020-04-29 02:34:28 +08:00
|
|
|
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
|
2020-05-28 17:05:37 +08:00
|
|
|
{{- $styleArr | append $style | .Page.Scratch.SetInMap "this" "styleArr" -}}
|