@@ -10,7 +10,23 @@ It can be formatted with components including headers and footers, titles and im
1010Card content
1111:::
1212
13- All content before the first occurrence three or more ` ^^^ ` is considered as a header,
13+ See the [ Bootstrap card] ( https://getbootstrap.com/docs/5.0/layout/grid/ ) for further details.
14+
15+ ````` {dropdown} Syntax
16+ :icon: code
17+ :color: light
18+
19+ ````{tab-set-code}
20+ ```{literalinclude} ./snippets/myst/card-basic.txt
21+ :language: markdown
22+ ```
23+ ```{literalinclude} ./snippets/rst/card-basic.txt
24+ :language: rst
25+ ```
26+ ````
27+ `````
28+
29+ All content before the first occurrence of three or more ` ^^^ ` is considered as a header,
1430and all content after the final occurrence of three or more ` +++ ` is considered as a footer:
1531
1632:::{card} Card Title
@@ -21,19 +37,42 @@ Card content
2137Footer
2238:::
2339
24- :::{card} Clickable Card (external)
25- :link : https://example.com
40+ ````` {dropdown} Syntax
41+ :icon: code
42+ :color: light
2643
27- The entire card can be clicked to navigate to < https://example.com > .
28- :::
44+ ````{tab-set-code}
45+ ```{literalinclude} ./snippets/myst/card-head-foot.txt
46+ :language: markdown
47+ ```
48+ ```{literalinclude} ./snippets/rst/card-head-foot.txt
49+ :language: rst
50+ ```
51+ ````
52+ `````
2953
30- :::{card} Clickable Card (internal)
31- :link : cards
32- :link-type: ref
54+ When using cards in grids (see [ ` grid-item-card ` ] ( ./grids.md ) ) footers can be aligned.
3355
34- The entire card can be clicked to navigate to the ` cards ` reference target.
56+ ::::{grid} 2
57+ :::{grid-item-card} Card Title
58+ Header
59+ ^^^
60+ Card content
61+ +++
62+ Footer
3563:::
64+ :::{grid-item-card} Card Title
65+ Header
66+ ^^^
67+ Longer
3668
69+ Card content
70+ +++
71+ Footer
72+ :::
73+ ::::
74+
75+ You can also add images to the top and bottom of the card, with the ` img-top ` and ` img-bottom ` options:
3776
3877::::{grid} 1 2 2 2
3978:::{grid-item-card} Card Title
@@ -48,6 +87,41 @@ Footer
4887:::
4988::::
5089
90+ (cards-clickable)=
91+
92+ ## Clickable cards
93+
94+ Using the ` link ` and ` link-type ` options, you can turn an entire card into a clickable link.
95+ Try hovering over then clicking on the cards below:
96+
97+ :::{card} Clickable Card (external)
98+ :link : https://example.com
99+
100+ The entire card can be clicked to navigate to < https://example.com > .
101+ :::
102+
103+ :::{card} Clickable Card (internal)
104+ :link : cards-clickable
105+ :link-type: ref
106+
107+ The entire card can be clicked to navigate to the ` cards-clickable ` reference target.
108+ :::
109+
110+ ````` {dropdown} Syntax
111+ :icon: code
112+ :color: light
113+
114+ ````{tab-set-code}
115+ ```{literalinclude} ./snippets/myst/card-link.txt
116+ :language: markdown
117+ ```
118+ ```{literalinclude} ./snippets/rst/card-link.txt
119+ :language: rst
120+ ```
121+ ````
122+ `````
123+
124+ ## Aligning cards
51125
52126:::{card} Align Center
53127:width: 75%
@@ -73,8 +147,6 @@ Content
73147Content
74148:::
75149
76- See the [ Bootstrap card] ( https://getbootstrap.com/docs/5.0/layout/grid/ ) for further details.
77-
78150## ` card ` options
79151
80152width
0 commit comments