-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #670 from gethinode/validation
Refactor argument validation and documentation
- Loading branch information
Showing
13 changed files
with
452 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
comment: >- | ||
Displays a Bootstrap card. Either specify a valid path, or set the arguments | ||
title, href, header, description, and thumbnail individually. The latter | ||
arguments override any page attributes. | ||
arguments: | ||
title: | ||
type: string | ||
optional: true | ||
comment: >- | ||
Title of the card. | ||
path: | ||
type: path | ||
optional: true | ||
comment: >- | ||
Path of the page, override with other parameters. | ||
href: | ||
type: url | ||
optional: true | ||
comment: >- | ||
Optional address for the button or hyperlink. | ||
group: partial | ||
class: | ||
type: string | ||
optional: true | ||
parent: merge | ||
comment: >- | ||
Optional class attribute of the card element, e.g. “w-50”. | ||
color: | ||
type: select | ||
optional: true | ||
parent: cascade | ||
comment: >- | ||
Theme color of the card. By default, no color is specified. | ||
options: | ||
values: | ||
- primary | ||
- secondary | ||
- success | ||
- danger | ||
- warning | ||
- info | ||
- light | ||
- dark | ||
- white | ||
- black | ||
- body | ||
- body-tertiary | ||
padding: | ||
type: select | ||
optional: true | ||
default: auto | ||
parent: cascade | ||
comment: >- | ||
Optional padding of the content. | ||
options: | ||
values: | ||
- "0" | ||
- "1" | ||
- "2" | ||
- "3" | ||
- "4" | ||
- "5" | ||
- "auto" | ||
gutter: | ||
type: select | ||
optional: true | ||
default: "0" | ||
parent: cascade | ||
comment: >- | ||
Gutter between columns in a group. | ||
options: | ||
values: | ||
- "0" | ||
- "1" | ||
- "2" | ||
- "3" | ||
- "4" | ||
- "5" | ||
header: | ||
type: select | ||
optional: true | ||
default: full | ||
parent: cascade | ||
comment: >- | ||
Optional header components of the card, displayed in small caps. | ||
options: | ||
values: | ||
- full | ||
- publication | ||
- tags | ||
- none | ||
footer: | ||
type: select | ||
optional: true | ||
default: none | ||
parent: cascade | ||
comment: >- | ||
Optional footer components of the card, displayed in small caps. | ||
options: | ||
values: | ||
- full | ||
- publication | ||
- tags | ||
- none | ||
description: | ||
type: | ||
- string | ||
- template.HTML | ||
optional: true | ||
comment: >- | ||
Optional description of the card. | ||
group: partial | ||
loading: | ||
type: select | ||
optional: true | ||
default: eager | ||
comment: >- | ||
Loading behavior of the image. The loading of lazily loaded images is | ||
deferred until the image is within scrolling range of the viewport. This | ||
should reduce the initial loading time of the website. It is recommended | ||
to lazily load only those images that are below the page fold. | ||
options: | ||
values: | ||
- lazy | ||
- eager | ||
group: partial | ||
thumbnail: | ||
type: path | ||
optional: true | ||
comment: >- | ||
Optional thumbnail image url, displayed on top or the left of the card. | ||
ratio: | ||
type: select | ||
optional: true | ||
comment: >- | ||
Ratio of the thumbnail image, defaults to "16x9" (stacked orientation) | ||
or "1x1" (horizontal orientation). | ||
options: | ||
values: | ||
- 1x1 | ||
- 3x2 | ||
- 4x3 | ||
- 16x9 | ||
- 21x9 | ||
group: partial | ||
alt: | ||
type: string | ||
optional: true | ||
comment: >- | ||
Alternate text for the thumbnail, uses "title" by default. | ||
icon: | ||
type: string | ||
optional: true | ||
comment: >- | ||
Font Awesome icon, displayed on top or the left of the card. | ||
orientation: | ||
type: select | ||
optional: true | ||
default: stacked | ||
parent: cascade | ||
comment: >- | ||
Placement of the thumbnail or icon. | ||
options: | ||
values: | ||
- stacked | ||
- horizontal | ||
- horizontal-sm | ||
- none | ||
body: | ||
optional: true | ||
comment: >- | ||
Optional description of the card. | ||
group: shortcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.