Documentation
¶
Index ¶
- func Get(name string) string
- func GetWithClass(name, class string) string
- func LoadCollection(data []byte) error
- func LoadIconDirectory(dirPath string) error
- func Render(name, baseClass string, attrs map[string]string) string
- func SetDefaultPrefix(p string)
- func SetRenderMode(m string)
- func SpriteForHTML(pageHTML []byte) []byte
- func SpriteMode() bool
- type SetLicense
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWithClass ¶
GetWithClass returns an inline SVG with an optional CSS class attribute. Used by block extensions (aside/card/linkcard/linkbutton). No fallback; defaults to 16x16. ARIA attributes (aria-hidden, focusable) are injected by the manager's renderer.
func LoadCollection ¶
LoadCollection loads an additional Iconify JSON collection from raw bytes and registers it as a provider under its prefix.
func LoadIconDirectory ¶
LoadIconDirectory registers a DirectoryProvider that loads SVG files from dirPath. Bare icon names resolve from this directory FIRST (project overrides win). A missing directory is not an error.
func Render ¶
Render returns an inline SVG for the template func and inline Markdown extension. Falls back to "circle-help" on miss, applies transforms, accessibility attributes.
func SetDefaultPrefix ¶
func SetDefaultPrefix(p string)
SetDefaultPrefix sets the icon set used for bare (prefixless) names.
func SpriteForHTML ¶
SpriteForHTML scans finished page HTML for sprite <use> references and returns a hidden <svg> holding one <symbol> per unique referenced icon.
Types ¶
type SetLicense ¶
SetLicense is a loaded icon set's license metadata, for attribution.
func LoadedSetLicenses ¶
func LoadedSetLicenses() []SetLicense
LoadedSetLicenses returns license metadata for every loaded collection.
func UsedSetLicenses ¶
func UsedSetLicenses() []SetLicense
UsedSetLicenses returns license metadata for the collections actually referenced during the build.