diff --git a/themes/hugoplate/layouts/shortcodes/columns.html b/themes/hugoplate/layouts/shortcodes/columns.html index ade5f92..445f151 100644 --- a/themes/hugoplate/layouts/shortcodes/columns.html +++ b/themes/hugoplate/layouts/shortcodes/columns.html @@ -1,28 +1,30 @@ {{/* TODO Add To Docs "top" */}} -
+
{{ range split (trim .Inner " \n") "..column.." }} {{ if ne . "" }} -{{ printf "
"| safeHTML }} -{{ . | safeHTML }} -{{ printf "
" | safeHTML }} + +{{ $columnContent := . | markdownify }} +
+ +{{ $columnContent | safeHTML }} +
{{ end }} {{ end }}
{{/* - Adds the ability to create columns in markdown content. - - Usage: - {{< columns class="some-class" >}} - Content - ..column.. - Content - {{< /columns >}} +Adds the ability to create columns in markdown content. + +Usage: +{{< columns class="some-class" >}} +Content +..column.. +Content +{{< /columns >}} - */}} +*/}} - \ No newline at end of file diff --git a/themes/hugoplate/layouts/shortcodes/mdcolumns.html b/themes/hugoplate/layouts/shortcodes/mdcolumns.html new file mode 100644 index 0000000..85cb172 --- /dev/null +++ b/themes/hugoplate/layouts/shortcodes/mdcolumns.html @@ -0,0 +1,13 @@ + +
+ +{{ range split (trim .Inner " \n") "..column.." }} +{{ if ne . "" }} +
+ +{{ . | markdownify }} +
+{{ end }} +{{ end }} +
+ \ No newline at end of file diff --git a/themes/hugoplate/layouts/shortcodes/section.html b/themes/hugoplate/layouts/shortcodes/section.html index ff64e99..7e88665 100644 --- a/themes/hugoplate/layouts/shortcodes/section.html +++ b/themes/hugoplate/layouts/shortcodes/section.html @@ -1,24 +1,9 @@ +{{ with .Get "background-image" }} + +{{ end }}
{{ with .Get "title" }}

{{ . | markdownify }}

{{ end }}
{{ .Inner }}
- -{{/* - - This shortcode is a wrapper for a section component. It has a default class of "text-gray-700 bg-white" but can be overridden by passing a class attribute. - - Attributes: - 1. title - 2. background-color - 3. background-image - 4. light-text - 5. fixed - 6. classes - - Usage: - {{< section title="This is a section" background-color="#f5f5f5" background-image="https://source.unsplash.com/random/1920x1080" light-text="true" fixed="true" classes="text-center" >}} - This is the content of the section - {{< /section >}} -*/}}