Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<nav") TagClose = []byte("</nav>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new nav element with optional child nodes Example: nav.New() Renders: <nav></nav>
func RawText ¶
func RawText(content string) *element
RawText Creates a new nav element with raw text content. Uses text.RawText which is not HTML-escaped. Example: nav.RawText("<a href=\"/\">Home</a> | <a href=\"/about\">About</a>") Renders: <nav><a href="/">Home</a> | <a href="/about">About</a></nav>
func RawTextf ¶
RawTextf Creates a new nav element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: nav.RawTextf("<a href=\"%s\">Back</a>", url) Renders: <nav><a href="/about">Back</a></nav>
func Static ¶
func Static(content string) *element
Static Creates a new nav element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: nav.Static("Navigation") Renders: <nav>Navigation</nav>