The Tree of Widsdom

智慧の樹

Glyph

^do( Glyph, glyphname, [fontsize-as-percent] )^

Type: Macro

Purpose: Embeds a Bootstrap Glyphicon

Inserting a Bootstrap glyphicon is exactly what an old-school macro would do—pure text minimization. Instead of the N keystrokes required to type <span class="glyphicon glyphicon-headphones"></span>, you only have to type in (N - H). In this case, ^do(Glyph, headphones)^.

Use optional 2nd arg to modify font size (as a percentage away from the default-in-context).

Use optional 3nd arg to modify font color.

Hover below to reveal BoxPress code

<span class="glyphicon glyphicon-$1" style="^if($2)^font-size: $2%; ^endIf^^if($3)^color: $3;^endIf^"></span>

Glyph sample

This is the markup that is rendered below. Two nonbreaking spaces after the checkboxes were added using ⌥ space.

^do(PanelInfo, "Today’s  ^do(Glyph, inbox)^  items", "
^do(Glyph, check)^  Plant a ^do(Glyph, grain, 200, #4a4)^.
^do(Glyph, check)^  Sip from a ^do(Glyph, glass)^.
^do(Glyph, unchecked)^  Take out the tiny ^do(Glyph, trash, 80)^.
^do(Glyph, unchecked)^  Get some ^do(Glyph, eye-close,,blue)^.")^ 

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.

Today’s    items
  Plant a .

  Sip from a .

  Take out the tiny .

  Get some .

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.