The Tree of Widsdom

智慧の樹

Button

^do( Button, title, href, [Bootstrap class], [center|right] )^

Type: Macro

Purpose: Adds a Bootstrap button on a new line

The Button macro inserts a button on a new line that displays title and that links to href. Optional 3rd arg is the Bootstrap Button Class. This defaults to default but you can override by supplying an argument. Optional 4th arg is the alignment—left by default, so you can add either center or right.

  • Optional 3rd arg options are: primary, success, info, warning, danger, and link.
  • Optional 4th arg options are: center and right.

Hover below to reveal BoxPress code

<p><a class="btn btn-^if($3)^^value($3)^^else^default^endIf^ blog-btn" href="$2" target="_blank" role="button">$1</a></p>

Button sample

This is the markup that is rendered below

Default button (args: none): ^do(Button, "Bootstrap Downloads", "http://getbootstrap.com/getting-started/")^ More text to show embedding.
Primary button (args: primary, center): ^do(Button, "Bootstrap Downloads", "http://getbootstrap.com/getting-started/", "primary", "center")^ More text to show embedding.
Danger button (args: danger, right): ^do(Button, "Bootstrap Downloads", "http://getbootstrap.com/getting-started/", "danger", "right")^ More text to show embedding.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Default button (args: none):

Bootstrap Downloads

More text to show embedding.

Primary button (args: primary, center):

Bootstrap Downloads

More text to show embedding.

Danger button (args: danger, right):

Bootstrap Downloads

More text to show embedding.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.