Skip to content

Commit 8fcb0a8

Browse files
committed
fix custom css bug
1 parent 55cdc7e commit 8fcb0a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

conf/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package conf
22

33
import (
4+
stdtpl "html/template"
45
"net/http"
56

67
"github.com/zrcoder/amisgo/internal/conf"
@@ -29,8 +30,8 @@ type (
2930
type Config struct {
3031
Title string
3132
Icon string
32-
CustomCSS string
33-
CustomJS string
33+
CustomCSS stdtpl.CSS
34+
CustomJS stdtpl.JS
3435
LocalSdkFS http.FileSystem
3536
*template.Templ
3637
}
@@ -106,14 +107,14 @@ func WithIcon(icon string) Option {
106107
// WithCustomCSS sets the custom CSS URL.
107108
func WithCustomCSS(customCSS string) Option {
108109
return func(c *Config) {
109-
c.CustomCSS = customCSS
110+
c.CustomCSS = stdtpl.CSS(customCSS)
110111
}
111112
}
112113

113114
// WithCustomJS sets the custom JavaScript URL.
114115
func WithCustomJS(customJS string) Option {
115116
return func(c *Config) {
116-
c.CustomJS = customJS
117+
c.CustomJS = stdtpl.JS(customJS)
117118
}
118119
}
119120

0 commit comments

Comments
 (0)