From 75043727d25a0e6bdf21fd351b0f6b620a55a299 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 20 Feb 2024 15:06:13 +0100 Subject: [PATCH] Add basic stylesheet --- static/style.css | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++-- template/authorize.html | 2 +- template/client-secret.html | 5 +++-- template/index.html | 13 ++++++------- template/login.html | 12 +++++++++--- template/manage-client.html | 49 +++++++++++++++++++++++++++++++++---------------- template/manage-user.html | 21 +++++++++++++++++---- template/nav.html | 5 +++++ diff --git a/static/style.css b/static/style.css index e26eb85883fc8813d01c5e1de60f86c362e0a955..11ee1cd1c404545b588ae3df225819645768a854 100644 --- a/static/style.css +++ b/static/style.css @@ -1,17 +1,98 @@ body { font-family: sans-serif; margin: 0; + color: #444; } -main { +main, #nav-inner { padding: 0 5px; max-width: 800px; margin: 0 auto; +} +main { + padding-bottom: 20px; +} + +nav { + border-bottom: 1px solid #eee; +} +nav h1 { + margin: 0; + padding: 10px 0; + font-size: 1.2em; +} +nav h1 a { + color: inherit; + text-decoration: none; +} + +h2 { + font-size: 1.2em; } table { border-collapse: collapse; } td, th { - border: 1px solid black; + border: 1px solid rgb(208, 210, 215); padding: 5px; } + +button { + border: 1px solid rgb(208, 210, 215); + border-radius: 4px; + padding: 6px 12px; + margin: 4px 0; + color: #444; + background-color: transparent; + cursor: pointer; +} +button:hover { + background-color: rgba(0, 0, 0, 0.02); +} +button[type="submit"]:not(.btn-regular):first-of-type { + background-color: rgb(0, 128, 0); + border-color: rgb(0, 128, 0); + color: white; +} +button[type="submit"]::not(.btn-regular):first-of-type:hover { + background-color: rgb(0, 150, 0); + border-color: rgb(0, 150, 0); +} + +input[type="text"], input[type="password"], input[type="url"], textarea { + border: 1px solid rgb(208, 210, 215); + border-radius: 4px; + padding: 6px; + margin: 4px 0; + color: #444; +} +input[type="text"]:focus, input[type="password"]:focus, input[type="url"]:focus, textarea:focus { + outline: none; + border-color: rgb(0, 128, 0); +} + +label { + display: block; + margin: 15px 0; +} +label input[type="text"], label input[type="password"], label input[type="url"] { + display: block; + width: 100%; + max-width: 350px; + box-sizing: border-box; +} +label:has(input[type="radio"]) { + margin: 5px 0; +} +label textarea { + display: block; + width: 100%; + resize: vertical; +} + +main.narrow { + max-width: 400px; +} +main.narrow input { + max-width: 100%; +} diff --git a/template/authorize.html b/template/authorize.html index 7c0f525dacb582e2843d317f2acaba9e5a59fba9..3146dc9877f1e2e44a5b2e59e1fa8458d5cc33f0 100644 --- a/template/authorize.html +++ b/template/authorize.html @@ -1,6 +1,6 @@ {{ template "head.html" .Base }} -
+

{{ .ServerName }}

diff --git a/template/client-secret.html b/template/client-secret.html index c0f79bbb903b219cdad1f8c0b1bb5cf7334ba536..834be520449dd059a28e4ebbfd6b1b8afb44e8bc 100644 --- a/template/client-secret.html +++ b/template/client-secret.html @@ -1,15 +1,16 @@ {{ template "head.html" .Base }} +{{ template "nav.html" .Base }}
-

{{ .ServerName }}

+

Client credentials

Client ID: {{ .ClientID }}
Client secret: {{.ClientSecret}}

-Back +
diff --git a/template/index.html b/template/index.html index 1b27564b32a0df2cff9ecd5d946b75fd44aca382..ddd00bbec5810994b5910c58f2bf17a9e4948d63 100644 --- a/template/index.html +++ b/template/index.html @@ -1,14 +1,13 @@ {{ template "head.html" .Base }} +{{ template "nav.html" .Base }}
- -

{{ .ServerName }}

Welcome, {{ .Me.Username }}!

- +

Authorized clients

@@ -53,11 +52,11 @@ {{ if .Me.Admin }}

Registered clients

- {{ with .Clients }} -

- -

+

+ +

+ {{ with .Clients }} diff --git a/template/login.html b/template/login.html index ab88c5ca0b9086d49fd8a26519a07e4ca398e7fa..babcf43987c51756d117469441d3b5e712e5e911 100644 --- a/template/login.html +++ b/template/login.html @@ -1,12 +1,18 @@ {{ template "head.html" .Base }} -
+

{{ .ServerName }}

- Username:
- Password:
+ + diff --git a/template/manage-client.html b/template/manage-client.html index 0a78e7620775468d6e3c498e49646a41dc2b8ad3..39874e21683daf50b5cb5f033956318db0f08a06 100644 --- a/template/manage-client.html +++ b/template/manage-client.html @@ -1,41 +1,58 @@ {{ template "head.html" .Base }} +{{ template "nav.html" .Base }}
-

{{ .ServerName }}

+

+ {{ if .Client.ID }} + Update client + {{ else }} + Create client + {{ end }} +

{{ if .Client.ClientID }} Client ID: {{ .Client.ClientID }}
{{ end }} - Name:
- Website:
+ + - Client type: {{ if .Client.ID }} - {{ if .Client.IsPublic }} - public - {{ else }} - confidential - {{ end }} -
+

+ Client type +
+ + {{ if .Client.IsPublic }} + Public + {{ else }} + Confidential + {{ end }} + +

{{ else }} -
+ Client type -
-
{{ end }} - Redirect URIs:
-
- The special URI http://localhost matches all loopback interfaces.
+
Client ID