(name string)
| 58 | } |
| 59 | |
| 60 | func (t *themeAwareFileSystem) Open(name string) (http.File, error) { |
| 61 | if GetTheme() == "classic" { |
| 62 | return t.classicFS.Open(name) |
| 63 | } |
| 64 | return t.defaultFS.Open(name) |
| 65 | } |
| 66 | |
| 67 | func NewThemeAwareFS(defaultFS, classicFS static.ServeFileSystem) static.ServeFileSystem { |
| 68 | return &themeAwareFileSystem{defaultFS: defaultFS, classicFS: classicFS} |