Button
Th' button shortcode displays a click'ble button wit' adjustable color, title an' ay'con.
Usage
Parameters
| Name | Default | Notes |
|---|---|---|
| href | <empty> | Either th' destinat'n URL fer th' button or JavaScript code t' be executed on click. If this parameter be not set, th' button will do noth'n but be still displayed as click'ble. - if start'n wit' javascript: all follow'n text will be executed 'n yer browser- every other str'n will be interpreted as URL, ye can use link effects as well. |
| type | see notes | Th' button type if href be JavaScript. Otherwise th' parameter be not used. If th' parameter be not given it defaults t' button. |
| borderless | false |
When true, no border will be shown around th' button. |
| hint | <empty> | Tooltip fer th' button. |
| style | transparent |
Th' style scheme used fer th' button. - by severity: caut'n, 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, act'n, inlineYe can also define yer own styles. |
| color | see notes | Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default. - fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color |
| ay'con | see notes | Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default. - fer severity styles: a nice match'n ay'con fer th' severity - fer all other styles: <empty> If ye want no ay'con fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces) |
| iconposit'n | left |
Places th' ay'con t' th' left or right o' th' title. |
| <content> | see notes | Arbitrary text fer th' button title. Depend'n on th' style there may be a default title. Any given value will overwrite th' default. - fer severity styles: th' match'n title fer th' severity - fer all other styles: <empty> If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces) |
Examples
Style
By Severity
By Brand Colors
By Color
By Special Color
Ay'con
Empty
Only wit' Hint
Mouse-over th' button t' see th' hint.
T' th' Left
T' th' Right
Override fer Severity
Link Effects (Target, Download)
Ye can use link effects wit' yer href t' open th' link 'n a different tab or start'n a download.
Other
Borderless
Wit' User-Defined Color, Font Awesome Brand Ay'con an' Marrrkdown Title
Severity Style wit' All Defaults
Button t' Internal Plank
Button wit' JavaScript Act'n
If yer JavaScript act'n does not change th' focus afterwards, make sure t' call this.blur() 'n th' end t' unselect th' button.
Button within a form Element
T' use native HTML elements 'n yer Marrrkdown, add this 'n yer hugo.toml