lot of new functionalities

This commit is contained in:
Arnaud Delcasse
2025-10-14 18:11:13 +02:00
parent a6f70a6e85
commit d992a7984f
164 changed files with 15113 additions and 9442 deletions

26
core/utils/icons/svg-icons.go Executable file
View File

@@ -0,0 +1,26 @@
package icons
import (
"fmt"
"html/template"
)
type IconSet struct {
Icons map[string]string
}
func NewIconSet(set map[string]string) IconSet {
return IconSet{
Icons: set,
}
}
func (i IconSet) Icon(name string, classes string) template.HTML {
icon, ok := i.Icons[name]
if !ok {
return template.HTML("")
}
return template.HTML(fmt.Sprintf(icon, classes))
}