Documentation
¶
Index ¶
- Variables
- func Decimal(items ...*li.Element) *element
- func Items(items ...*li.Element) *element
- func LowerAlpha(items ...*li.Element) *element
- func LowerRoman(items ...*li.Element) *element
- func New(nodes ...node.Node) *element
- func UpperAlpha(items ...*li.Element) *element
- func UpperRoman(items ...*li.Element) *element
- type Element
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<ol") TagClose = []byte("</ol>") AttrReversed = []byte(" reversed") AttrStart = []byte(" start=\"") AttrType = []byte(" type=\"") )
Byte constants for HTML rendering.
Functions ¶
func Decimal ¶
Decimal Creates an ordered list with decimal numbering (1, 2, 3...) Example: ol.Decimal(li.Text("one"), li.Text("two")) Renders: <ol type="1"><li>one</li><li>two</li></ol>
func Items ¶ added in v0.3.0
Items Creates an ordered list from li elements, enforcing correct nesting at compile time. Example: ol.Items(li.Text("one"), li.Text("two")) Renders: <ol><li>one</li><li>two</li></ol>
func LowerAlpha ¶
LowerAlpha Creates an ordered list with lowercase letters (a, b, c...) Example: ol.LowerAlpha(li.Text("one"), li.Text("two")) Renders: <ol type="a"><li>one</li><li>two</li></ol>
func LowerRoman ¶
LowerRoman Creates an ordered list with lowercase Roman numerals (i, ii, iii...) Example: ol.LowerRoman(li.Text("one"), li.Text("two")) Renders: <ol type="i"><li>one</li><li>two</li></ol>
func New ¶
New Creates a new ordered list element with optional child nodes (typically li elements) Example: ol.New() Renders: <ol></ol>
func UpperAlpha ¶
UpperAlpha Creates an ordered list with uppercase letters (A, B, C...) Example: ol.UpperAlpha(li.Text("one"), li.Text("two")) Renders: <ol type="A"><li>one</li><li>two</li></ol>
func UpperRoman ¶
UpperRoman Creates an ordered list with uppercase Roman numerals (I, II, III...) Example: ol.UpperRoman(li.Text("one"), li.Text("two")) Renders: <ol type="I"><li>one</li><li>two</li></ol>