30 lines
763 B
HTML
30 lines
763 B
HTML
{{/* TODO Add To Docs "top" */}}
|
|
<div class="md:flex {{ if isset .Params "center" }}items-center {{ end }}{{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}">
|
|
{{ range split (trim .Inner " \n") "..column.." }}
|
|
{{ if ne . "" }} <!-- Check if the column content is not empty -->
|
|
<!-- Process each column's content through markdownify to ensure consistent HTML output -->
|
|
{{ $columnContent := . | markdownify }}
|
|
<div class="markdown-inner items-center flex-1 px-4">
|
|
<!-- Use safeHTML to insert the processed content as HTML -->
|
|
{{ $columnContent | safeHTML }}
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{/*
|
|
Adds the ability to create columns in markdown content.
|
|
|
|
Usage:
|
|
{{< columns class="some-class" >}}
|
|
Content
|
|
..column..
|
|
Content
|
|
{{< /columns >}}
|
|
|
|
|
|
*/}}
|
|
|
|
|
|
|
|
|