Big documentation rewrite, move docs to example site
This commit is contained in:
@@ -1,33 +1,47 @@
|
||||
# Cards
|
||||
|
||||
> [!WARNING]
|
||||
> Experimental, could change in the future or be removed
|
||||
Content blocks with optional images and links. Often used with [Columns](/docs/shortcodes/columns) for grid layouts.
|
||||
|
||||
## Syntax
|
||||
|
||||
```tpl
|
||||
{{</* card [href="..."] [image="..."] [title="..."] */>}}
|
||||
Markdown content
|
||||
{{</* /card */>}}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
{{% columns %}}
|
||||
- {{< card image="placeholder.svg" >}}
|
||||
### Line 1
|
||||
Line 2
|
||||
### With Image
|
||||
Cards can display an image above the content.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card image="placeholder.svg" >}}
|
||||
This is tab MacOS content.
|
||||
{{< /card >}}
|
||||
{{% /columns %}}
|
||||
|
||||
{{% columns %}}
|
||||
- {{< card href="/docs/shortcodes/experimental/cards" >}}
|
||||
**Markdown**
|
||||
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card >}}
|
||||
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa, et fringilla metus consectetur molestie.
|
||||
### With Link {anchor=false}
|
||||
When `href` is set, the entire card becomes clickable.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card title="Card" >}}
|
||||
### Heading
|
||||
This is tab MacOS content.
|
||||
### Plain Card
|
||||
A basic card with no image or link, used for grouping related content.
|
||||
{{< /card >}}
|
||||
{{% /columns %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
`href`
|
||||
: Makes the card a link. The entire card area becomes clickable.
|
||||
|
||||
`image`
|
||||
: Path to an image displayed above the card content. Supports page resources and URLs.
|
||||
|
||||
`title`
|
||||
: Accessible title for the card.
|
||||
|
||||
`alt`
|
||||
: Alt text for the card image.
|
||||
|
||||
`class`
|
||||
: Additional CSS classes.
|
||||
|
||||
Reference in New Issue
Block a user