mirror of
https://github.com/imfing/hextra.git
synced 2025-08-24 07:46:35 -04:00
docs: add documentation on all shortcodes (#753)
This commit is contained in:

committed by
GitHub

parent
80ada64da0
commit
2033d50005
@@ -1,3 +1,13 @@
|
||||
{{- /*
|
||||
A simple hero section with a heading and optional style.
|
||||
|
||||
@param {string} heading The heading level (default: h2).
|
||||
@param {string} style The style of the heading.
|
||||
@param {string} content The content of the heading.
|
||||
|
||||
@example {{< hextra/hero-section heading="h3" >}}{{< /hextra/hero-section >}}>
|
||||
*/ -}}
|
||||
|
||||
{{- $style := .Get "style" -}}
|
||||
{{- $heading := int (strings.TrimPrefix "h" (.Get "heading" | default "h2")) -}}
|
||||
{{- $size := cond (ge $heading 4) "xl" (cond (eq $heading 3) "2xl" "4xl") -}}
|
||||
|
Reference in New Issue
Block a user