CSS for server

This commit is contained in:
bel
2020-03-17 03:53:21 +00:00
parent 4708b68742
commit e29dc1b5d8
2 changed files with 45 additions and 50 deletions

View File

@@ -1,6 +1,7 @@
package server
import (
"fmt"
"local/oauth2/oauth2server/config"
"local/router"
"local/storage"
@@ -46,3 +47,33 @@ func purgeIssuedCredentials(store storage.DB) {
store.Set(token, nil, TOKEN)
}
}
func wrapBody(title, body string) string {
return fmt.Sprintf(`
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>%s</title>
<style>body{
max-width: 960px;
overflow: hidden;
filter:invert(80%%);
background-color: #222;
font-size: 5em;
zoom: 1.5;
-moz-transform: scale(1.5);
-moz-transform-origin: 0 0;
-o-transform: scale(1.5);
-o-transform-origin: 0 0;
-webkit-transform: scale(1.5);
-webkit-transform-origin: 0 0;
transform: scale(1.5);
transform-origin: 0 0;
}</style>
</head>
<body>
%s
</body>
</html>
`, title, body)
}