// Package icons is this app's icon set, scaffolded once by // rastrillo new --icons=lucide --icon-delivery=inline and owned // by this app from then on. Edit it, add to it, or replace it. // // Keys are Lucide slugs whatever the set: that is rastrillo's icon // vocabulary, so {{icon "search"}} means the same thing in every // app and the shipped ui/ partials never have to change. // // Wire both seams onto your template tree: // // tmpl := template.Must(template.New(""). // Funcs(ui.Funcs(ui.WithIcons(icons.Icon, icons.Assets))). // ParseFS(ui.Templates(), "*.html")) // // Every icon is aria-hidden: it sits beside its own visible text label, // which is the accessible name. A control that uses an icon as its ONLY // label needs an explicit aria-label. package icons import "html/template" var icons = map[string]template.HTML{ "mic": ``, "mic-off": ``, "video": ``, "video-off": ``, "monitor": ``, "message-circle": ``, "sliders-horizontal": ``, "log-out": ``, // The call window's bar (2026-09-28), in the Mac bar's order and // meaning: share a screen (and stop), Speaker or Grid, the meeting // link, chat, more, and Leave โ€” the handset laid down, as the Mac's // phone.down.fill is. "screen-share": ``, "screen-share-off": ``, "panel-bottom": ``, "layout-grid": ``, "share": ``, "messages-square": ``, "ellipsis": ``, "phone-down": ``, "alert-triangle": ``, // class carries "lucide-bot" alongside the app's own "icon" so the // drive surface's robot badge (index.html, ยง8.1) can be told apart // from an ordinary badge by markup alone โ€” every other slug here // needs no such hook and stays plain "icon". "bot": ``, "check": ``, "check-circle": ``, "chevron-down": ``, "help-circle": ``, "info": ``, "kebab": ``, "menu": ``, "plus": ``, "search": ``, // Speaker view's tile buttons (0.4.0): Pin, and Move to first, // earlier and later. "pin": ``, "arrow-left": ``, "arrow-right": ``, "arrow-left-to-line": ``, "x": ``, "x-circle": ``, } // Icon renders one icon by its Lucide slug. An unknown slug renders // nothing rather than panicking a page mid-response โ€” a typo costs a // missing icon, not a crash. rastrillo generate --check catches it // before ship. func Icon(slug string) template.HTML { return icons[slug] } // Assets is the markup this delivery mode needs in the document . // Inline delivery vendors every icon into the binary, so there is // nothing to load and this returns empty. Call it anyway: switching // --icon-delivery later then needs no template change. func Assets() template.HTML { return "" }