added Kommentar mit Beispielen zur Benutzung
This commit is contained in:
parent
14096383bf
commit
1729f02bfb
3 changed files with 58 additions and 7 deletions
|
|
@ -3,3 +3,16 @@
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
|
||||||
|
This shortcode is a wrapper for a card component. It has a default class of "text-gray-700 bg-white" but can be overridden by passing a class attribute.
|
||||||
|
Attributes:
|
||||||
|
1. class - The class of the card
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
{{< card class="text-gray-700 bg-white" >}}
|
||||||
|
This is the content of the card
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
|
*/}}
|
||||||
|
|
@ -1,8 +1,28 @@
|
||||||
{{/* TODO Add To Docs "top" */}}
|
{{/* TODO Add To Docs "top" */}}
|
||||||
<div class="md:flex {{ if isset .Params "center" }}items-center {{ end }}{{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}">
|
<div class="md:flex {{ if isset .Params "center" }}items-center {{ end }}{{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}">
|
||||||
{{ range split .Inner "..column.." }}
|
{{ range split (trim .Inner " \n") "..column.." }}
|
||||||
{{ printf "<div class=\" markdown-inner items-center flex-1 px-4 \">"| safeHTML }}
|
{{ if ne . "" }} <!-- Check if the column content is not empty -->
|
||||||
{{ . | safeHTML }}
|
{{ printf "<div class=\"markdown-inner items-center flex-1 px-4 \">"| safeHTML }}
|
||||||
|
{{ . | safeHTML }}
|
||||||
{{ printf "</div>" | safeHTML }}
|
{{ printf "</div>" | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Adds the ability to create columns in markdown content.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
{{< columns class="some-class" >}}
|
||||||
|
Content
|
||||||
|
..column..
|
||||||
|
Content
|
||||||
|
{{< /columns >}}
|
||||||
|
|
||||||
|
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4,3 +4,21 @@
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
|
||||||
|
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 >}}
|
||||||
|
*/}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue