Skip to content

Commit

Permalink
docs: add cols parameter for cards shortcode (#459)
Browse files Browse the repository at this point in the history
documentation was missing
  • Loading branch information
icannotfly authored Sep 23, 2024
1 parent 36ab528 commit d367a44
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions exampleSite/content/docs/guide/shortcodes/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,30 @@ Card supports adding tags which could be useful to show extra status information
{{</* card link="../callout" title="Card with yellow tag" tag="tag text" tagType="warning" */>}}
{{</* /cards */>}}
```

## Columns

You can specify the maximum number of columns for cards to span by passing the `cols` parameter to the `cards` shortcode. Note that columns will still be collapsed on smaller screens.

{{< cards cols="1" >}}
{{< card link="/" title="Top Card" >}}
{{< card link="/" title="Bottom Card" >}}
{{< /cards >}}

{{< cards cols="2" >}}
{{< card link="/" title="Left Card" >}}
{{< card link="/" title="Right Card" >}}
{{< /cards >}}

```
{{</* cards cols="1" */>}}
{{</* card link="/" title="Top Card" */>}}
{{</* card link="/" title="Bottom Card" */>}}
{{</* /cards */>}}
{{</* cards cols="2" */>}}
{{</* card link="/" title="Left Card" */>}}
{{</* card link="/" title="Right Card" */>}}
{{</* /cards */>}}
```

0 comments on commit d367a44

Please sign in to comment.