forgejo/models/theme/theme_name.go
Minecon724 d303f10bdc
feat: Theme loading and metadata (#13)
commit c92f17c167
Author: Minecon724 <minecon724@noreply.git.m724.eu>
Date:   Sat Sep 13 10:46:57 2025 +0000

    Display everything in the UI

commit fa533b8ba5
Author: Minecon724 <minecon724@noreply.git.m724.eu>
Date:   Sat Sep 13 10:46:40 2025 +0000

    Add theme loader

commit adbd5af8d1
Author: Minecon724 <minecon724@noreply.git.m724.eu>
Date:   Sat Sep 13 10:17:00 2025 +0000

    Fix webpack

commit 933ad0b23a
Author: Minecon724 <minecon724@noreply.git.m724.eu>
Date:   Sat Sep 13 10:16:51 2025 +0000

    Add metadata to builtin themes

commit 1b8aa2fc35
Author: Minecon724 <minecon724@noreply.git.m724.eu>
Date:   Sat Sep 13 10:16:38 2025 +0000

    Remove accessibility themes
2025-10-05 17:16:53 +02:00

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
}