14 lines
411 B
Go
14 lines
411 B
Go
package theme
|
|
|
|
import "strings"
|
|
|
|
// getFriendlyThemeName converts an raw theme name to a friendly, readable name.
|
|
// Example: forgejo-dark -> Forgejo Dark, catppuccin-maroon-auto -> Catppuccin Maroon Auto
|
|
func getFriendlyThemeName(themeName string) string {
|
|
themeName = strings.ReplaceAll(themeName, "-", " ")
|
|
|
|
themeName = strings.ToLower(themeName)
|
|
themeName = strings.Title(themeName)
|
|
|
|
return themeName
|
|
}
|