mirror of
https://github.com/idanoo/m2.nz.git
synced 2024-11-23 08:45:12 +00:00
9 lines
430 B
HTML
9 lines
430 B
HTML
|
{{- $content := .Inner | .Page.RenderString -}}
|
||
|
{{- $id := dict "Scratch" .Page.Scratch | partial "function/id.html" -}}
|
||
|
{{- $tag := .Get 1 | default "div" -}}
|
||
|
{{- printf `<%v id="%v">%v</%v>` $tag $id $content $tag | safeHTML -}}
|
||
|
|
||
|
{{- $style := .Get 0 | printf "#%v{%v}" $id -}}
|
||
|
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
|
||
|
{{- $styleArr | append $style | .Page.Scratch.SetInMap "this" "styleArr" -}}
|