diff --git a/web/src/signals.ts b/web/src/signals.ts index 4622eae..53890f7 100644 --- a/web/src/signals.ts +++ b/web/src/signals.ts @@ -35,9 +35,11 @@ function feedRow(id: string, cls: string, html: string, open: ()=>void){ /// takes nothing else either). const ICON_ID=/^(solid|regular|brands)\/[a-z0-9-]{1,64}$/; const iconHTML=(icon: string)=>``; +/// Every Signal in the accent tint the folder has, icon or initials: tinted by a hash of its name, +/// as a feed without art is, one came out a colour of its own for no reason anyone could see (#262). function signalTile(sg: {name: string, icon: string|null}){ - return sg.icon&&ICON_ID.test(sg.icon) - ? `
${iconHTML(sg.icon)}
` : tileHTML(sg.name); + const inner=sg.icon&&ICON_ID.test(sg.icon) ? iconHTML(sg.icon) : esc(initials(sg.name)); + return `
${inner}
`; } const badgeHTML=(n: number)=>`${n>999?'999+':n}`; function signalFolder(list: HTMLElement, q: string){