File tree Expand file tree Collapse file tree 2 files changed +9
-18
lines changed Expand file tree Collapse file tree 2 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,10 @@ type Config struct {
171
171
// In case of OpenAPI 3.0 Bearer scheme, apiKeyValue must contain just the token itself without the Bearer prefix.
172
172
// default: ""
173
173
PreauthorizeApiKey template.JS `json:"-"`
174
+
175
+ // Applies custom CSS styles.
176
+ // default: ""
177
+ CustomStyle template.CSS `json:"-"`
174
178
}
175
179
176
180
type FilterConfig struct {
Original file line number Diff line number Diff line change @@ -11,24 +11,11 @@ const indexTmpl string = `
11
11
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
12
12
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
13
13
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
14
- <style>
15
- html
16
- {
17
- box-sizing: border-box;
18
- overflow: -moz-scrollbars-vertical;
19
- overflow-y: scroll;
20
- }
21
- *,
22
- *:before,
23
- *:after
24
- {
25
- box-sizing: inherit;
26
- }
27
- body {
28
- margin:0;
29
- background: #fafafa;
30
- }
31
- </style>
14
+ {{- if .CustomStyle}}
15
+ <style>
16
+ {{.CustomStyle}}
17
+ </style>
18
+ {{- end}}
32
19
</head>
33
20
<body>
34
21
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
You can’t perform that action at this time.
0 commit comments