You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exampleSite/content/test-product/cards/permitted.md
+61-34Lines changed: 61 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,18 @@ The structure of a card looks like the following:
16
16
```
17
17
18
18
and will render as the following:
19
-
{{<card-layout >}}
20
-
{{<card-section>}}
21
-
{{<cardtitle="SOME_TITLE">}}
22
-
SOME CONTENT
23
-
{{</card >}}
24
-
{{</card-section>}}
25
-
{{</card-layout >}}
19
+
<divdata-testid="cards-test__basic">
20
+
{{<card-layout >}}
21
+
{{<card-section>}}
22
+
{{<cardtitle="SOME_TITLE">}}
23
+
SOME CONTENT
24
+
{{</card >}}
25
+
{{</card-section>}}
26
+
{{</card-layout >}}
27
+
</div>
26
28
27
29
### Params
28
-
To support customization, there are also some params you can add to the shortcode `<card>` such as `title`, `titleUrl`, `icon`, `brandIcon`, `isFeatured`, `isFullSize`.
30
+
To support customization, there are also some params you can add to the shortcode `<card>` such as `title`, `titleUrl`, `icon`, `brandIcon`, `isFeaturedCard`, `isFullSize`.
29
31
30
32
*`title` - Title of the card.
31
33
<br>
@@ -36,8 +38,8 @@ To support customization, there are also some params you can add to the shortcod
36
38
*`brandIcon` - Custom icon using image from `nginx-hugo-theme/static/images/icons`.
{{- if not (in (slice "true" "false") $isFeaturedParam) -}}
10
-
{{- warnf "The '<card>' Shortcode parameter 'isFeatured' must be 'true' or 'false', but got: '%s'. This will now default to 'false'" $isFeaturedParam -}}
10
+
{{- warnf "The '<card>' Shortcode parameter 'isFeaturedCard' must be 'true' or 'false', but got: '%s'. This will now default to 'false'" $isFeaturedParam -}}
{{- /* Validate that the parent is card-section and under 3 cards */ -}}
28
28
{{- if (eq .Parent.Name "card-section") -}}
29
-
<divclass="card{{ if eq $isFeatured "true" }} featured-card{{ end }}" data-grid="{{ $dataGrid }}">
29
+
<divclass="card{{ if eq $isFeatured "true" }} featured-card{{ end }}" data-grid="{{ $dataGrid }}"data-testid="{{ if eq $isFeatured "true" }}card__featured-card{{else}}card{{ end }}">
0 commit comments