Refactor columns shortcode to use markdownify for consistent HTML output, Add new mdcolumns shortcode to convert markdown column content to HTML, Remove unnecessary comments and reformat code
This commit is contained in:
parent
02bccc155b
commit
bd43b8aeee
3 changed files with 32 additions and 32 deletions
13
themes/hugoplate/layouts/shortcodes/mdcolumns.html
Normal file
13
themes/hugoplate/layouts/shortcodes/mdcolumns.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Columns Container Start -->
|
||||
<div class="md:flex {{ if isset .Params "center" }}items-center {{ end }}{{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}">
|
||||
<!-- Split content into columns based on a unique delimiter, e.g., "..column.." -->
|
||||
{{ range split (trim .Inner " \n") "..column.." }}
|
||||
{{ if ne . "" }} <!-- Check if the column content is not empty -->
|
||||
<div class="markdown-inner items-center flex-1 px-4">
|
||||
<!-- Convert Markdown column content to HTML -->
|
||||
{{ . | markdownify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<!-- Columns Container End -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue