mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-05 23:34:19 -04:00
Extract Swagger CSS to its own file (#12616)
This commit is contained in:
parent
65444c5ea3
commit
e25d4867be
@ -4,33 +4,6 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Gitea API</title>
|
<title>Gitea API</title>
|
||||||
<link href="{{StaticUrlPrefix}}/css/swagger.css?v={{MD5 AppVer}}" rel="stylesheet">
|
<link href="{{StaticUrlPrefix}}/css/swagger.css?v={{MD5 AppVer}}" rel="stylesheet">
|
||||||
<style>
|
|
||||||
html {
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
*, *:before, *:after {
|
|
||||||
box-sizing: inherit;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.swagger-back-link {
|
|
||||||
color: #1f69c0;
|
|
||||||
text-decoration: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 1rem;
|
|
||||||
right: 1.5rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.swagger-back-link svg {
|
|
||||||
color: inherit;
|
|
||||||
fill: currentcolor;
|
|
||||||
margin-right: .5rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a class="swagger-back-link" href="{{AppUrl}}">{{svg "octicon-reply" 16}}{{.i18n.Tr "return_to_gitea"}}</a>
|
<a class="swagger-back-link" href="{{AppUrl}}">{{svg "octicon-reply" 16}}{{.i18n.Tr "return_to_gitea"}}</a>
|
||||||
|
31
web_src/less/standalone/swagger.less
Normal file
31
web_src/less/standalone/swagger.less
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
html {
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*:before,
|
||||||
|
*:after {
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-back-link {
|
||||||
|
color: #1f69c0;
|
||||||
|
text-decoration: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 1rem;
|
||||||
|
right: 1.5rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-back-link svg {
|
||||||
|
color: inherit;
|
||||||
|
fill: currentColor;
|
||||||
|
margin-right: .5rem;
|
||||||
|
}
|
@ -50,6 +50,7 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
swagger: [
|
swagger: [
|
||||||
resolve(__dirname, 'web_src/js/standalone/swagger.js'),
|
resolve(__dirname, 'web_src/js/standalone/swagger.js'),
|
||||||
|
resolve(__dirname, 'web_src/less/standalone/swagger.less'),
|
||||||
],
|
],
|
||||||
serviceworker: [
|
serviceworker: [
|
||||||
resolve(__dirname, 'web_src/js/serviceworker.js'),
|
resolve(__dirname, 'web_src/js/serviceworker.js'),
|
||||||
|
Loading…
Reference in New Issue
Block a user