Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<small") TagClose = []byte("</small>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new small element with the given child nodes. Example: small.New(text.Text("© 2024 Company Name")) Renders: <small>© 2024 Company Name</small>
func RawText ¶
func RawText(str string) *element
RawText Creates a new small element with raw text content. Uses text.RawText which is not HTML-escaped. Example: small.RawText("Copyright 2024 <em>Company</em>") Renders: <small>Copyright 2024 <em>Company</em></small>
func RawTextf ¶
RawTextf Creates a new small element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: small.RawTextf("Copyright %d <em>%s</em>", year, company) Renders: <small>Copyright 2024 <em>Acme</em></small>
func Static ¶
func Static(str string) *element
Static Creates a new small element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: small.Static("All rights reserved.") Renders: <small>All rights reserved.</small>