UserCSS creates colors.css user.css files in "xpui". To not use custom css, set `themeFolder` to blank string To use default color scheme, set `scheme` to `nil`
(appsFolderPath, themeFolder string, scheme map[string]string)
| 110 | // To not use custom css, set `themeFolder` to blank string |
| 111 | // To use default color scheme, set `scheme` to `nil` |
| 112 | func UserCSS(appsFolderPath, themeFolder string, scheme map[string]string) { |
| 113 | colorsDest := filepath.Join(appsFolderPath, "xpui", "colors.css") |
| 114 | if err := os.WriteFile(colorsDest, []byte(getColorCSS(scheme)), 0700); err != nil { |
| 115 | utils.Fatal(err) |
| 116 | } |
| 117 | cssDest := filepath.Join(appsFolderPath, "xpui", "user.css") |
| 118 | if err := os.WriteFile(cssDest, []byte(getUserCSS(themeFolder)), 0700); err != nil { |
| 119 | utils.Fatal(err) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // UserAsset . |
| 124 | func UserAsset(appsFolderPath, themeFolder string) { |
no test coverage detected