summaryrefslogtreecommitdiff
path: root/themes/LoveIt/layouts/shortcodes/style.html
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2022-08-14 19:01:21 +0200
committerChristoph Cullmann <cullmann@kde.org>2022-08-14 19:01:21 +0200
commit51fb029ca27d67d7cd67352cdede45e5b25868f7 (patch)
tree6d8e34b2abdc757310ffe11189e926d017417bae /themes/LoveIt/layouts/shortcodes/style.html
parent260b6803e78609e16ad3d59792f1681d9df0f1e4 (diff)
switch back to LoveIt, other theme is deprectated
Diffstat (limited to 'themes/LoveIt/layouts/shortcodes/style.html')
-rw-r--r--themes/LoveIt/layouts/shortcodes/style.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/themes/LoveIt/layouts/shortcodes/style.html b/themes/LoveIt/layouts/shortcodes/style.html
new file mode 100644
index 0000000..8e03596
--- /dev/null
+++ b/themes/LoveIt/layouts/shortcodes/style.html
@@ -0,0 +1,8 @@
+{{- $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" -}}