File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package conf
22
33import (
4+ stdtpl "html/template"
45 "net/http"
56
67 "github.com/zrcoder/amisgo/internal/conf"
2930type 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.
107108func 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.
114115func WithCustomJS (customJS string ) Option {
115116 return func (c * Config ) {
116- c .CustomJS = customJS
117+ c .CustomJS = stdtpl . JS ( customJS )
117118 }
118119}
119120
You can’t perform that action at this time.
0 commit comments