2020-03-02 09:47:28 +01:00
|
|
|
{{- $content := .Inner | .Page.RenderString -}}
|
2020-04-26 17:00:29 +02:00
|
|
|
{{- $id := partial "function/id.html" (dict "content" $content) -}}
|
2020-03-02 09:47:28 +01:00
|
|
|
{{- $tag := .Get 1 | default "div" -}}
|
2020-04-26 19:19:23 +02:00
|
|
|
{{- $style := .Get 0 | printf "#%s{%s}" $id -}}
|
|
|
|
{{- $res := resources.FromString "css/shortcode/style.scss" $style -}}
|
|
|
|
{{- $res = $res | toCSS (dict "targetPath" "css/shortcode/style.css" "outputStyle" "compressed") -}}
|
|
|
|
{{- printf `<%s id="%s">%s</%s>` $tag $id $content $tag | safeHTML -}}
|
|
|
|
<style>{{ $res.Content | safeCSS }}</style>
|