File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
package conf
2
2
3
3
import (
4
+ stdtpl "html/template"
4
5
"net/http"
5
6
6
7
"github.com/zrcoder/amisgo/internal/conf"
29
30
type Config struct {
30
31
Title string
31
32
Icon string
32
- CustomCSS string
33
- CustomJS string
33
+ CustomCSS stdtpl. CSS
34
+ CustomJS stdtpl. JS
34
35
LocalSdkFS http.FileSystem
35
36
* template.Templ
36
37
}
@@ -106,14 +107,14 @@ func WithIcon(icon string) Option {
106
107
// WithCustomCSS sets the custom CSS URL.
107
108
func WithCustomCSS (customCSS string ) Option {
108
109
return func (c * Config ) {
109
- c .CustomCSS = customCSS
110
+ c .CustomCSS = stdtpl . CSS ( customCSS )
110
111
}
111
112
}
112
113
113
114
// WithCustomJS sets the custom JavaScript URL.
114
115
func WithCustomJS (customJS string ) Option {
115
116
return func (c * Config ) {
116
- c .CustomJS = customJS
117
+ c .CustomJS = stdtpl . JS ( customJS )
117
118
}
118
119
}
119
120
You can’t perform that action at this time.
0 commit comments