Badge
The badge shortcode displays colorful markers in your text with optional icons.
Usage
Parameters
| Name | Default | Notes |
|---|---|---|
| style | default |
The style scheme used for the badge. - by severity: caution, important, info, note, tip, warning- by brand color: primary, secondary, accent- by color: blue, cyan, green, grey, magenta, orange, red- by special color: default, transparent, code, link, action, inlineYou can also define your own styles. |
| color | see notes | The CSS color value to be used. If not set, the chosen color depends on the style. Any given value will overwrite the default. - for severity styles: a nice matching color for the severity - for all other styles: the corresponding color |
| title | see notes | Arbitrary text for the badge title. Depending on the style there may be a default title. Any given value will overwrite the default. - for severity styles: the matching title for the severity - for all other styles: <empty> If you want no title for a severity style, you have to set this parameter to " " (a non empty string filled with spaces) |
| icon | see notes | Font Awesome icon name set to the left of the title. Depending on the style there may be a default icon. Any given value will overwrite the default. - for severity styles: a nice matching icon for the severity - for all other styles: <empty> If you want no icon for a severity style, you have to set this parameter to " " (a non empty string filled with spaces) |
| <content> | <empty> | Arbitrary text for the badge. |
Examples
Style
By Severity
By Brand Colors
By Color
By Special Color
Variants
Without Icon and Title Text
Without Icon
Without Title Text
All Set
Override for Severity
Other
With User-Defined Color, Font Awesome Brand Icon and Markdown Title and Content
With Icon Content
You can combine the badge with the icon shortcode to create even more stunning visuals.
In this case you need to declare {{< badge >}} instead of {{% badge %}}. Note, that in this case it is not possible to put markdown in the content.
Pirate
Rank
Rank Pirate
Rank
Rank Pirate
Inside of Text