Files
sablier/pkg/theme/list.go
Alexis Couvreur 4122109349 wip lol
2024-11-16 22:49:35 -05:00

17 lines
326 B
Go

package theme
import "strings"
// List all the loaded themes
func (t *Themes) List() []string {
themes := make([]string, 0)
for _, template := range t.themes.Templates() {
if strings.HasSuffix(template.Name(), ".html") {
themes = append(themes, strings.TrimSuffix(template.Name(), ".html"))
}
}
return themes
}