From d340727b78288306685d1cb8047467971afd3147 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 10 May 2022 00:15:05 +0200 Subject: Create html-tag short code --- layouts/shortcodes/html-tag.html | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 layouts/shortcodes/html-tag.html (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/html-tag.html b/layouts/shortcodes/html-tag.html new file mode 100644 index 0000000..15a7814 --- /dev/null +++ b/layouts/shortcodes/html-tag.html @@ -0,0 +1,4 @@ +{{ $optBlock := dict "display" "block" }} +{{ print "<" | safeHTML }}{{ .Get "tag" | default "div" }}{{ with .Get "id" }} id="{{ . }}"{{ end }}{{ with .Get "class" }} class="{{ . }}"{{ end }}{{ with .Get "style" }} style="{{ . | safeCSS }}"{{ end }}{{ print ">" | safeHTML }} +{{ with .Inner }}{{ . | $.Page.RenderString $optBlock }}{{ end }} +{{ print "" | safeHTML }} -- cgit v1.2.3