package components import ( "gitlab.unjx.de/flohoss/godash/services" "html/template" "strings" ) func placeHolder(app services.Application) string { return strings.ToUpper(app.Name[:1]) } func displayLight(app services.Application) bool { return app.Icon != "" } func displayDark(app services.Application) bool { return !app.IgnoreDark && app.IconLight != "" } var bgTemplate = template.Must(template.New("bgTemplate").Parse( `
`, )) var bgTemplateDark = template.Must(template.New("bgTemplate").Parse( ``, )) type Icon struct { Path string } templ Application(application services.Application) { if displayLight(application) { @templ.FromGoHTML(bgTemplate, Icon{Path: application.Icon}) } else {