Files
sablier/app/theme/list.go

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
}