From fe9571c4665231eca8082a72d4f54b6a6b506e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Sat, 25 May 2024 15:00:01 +0200 Subject: [PATCH] nodata ui changes --- go.mod | 4 ++-- go.sum | 4 ++-- static/css/datapoints.css | 26 ++++++++++++++------------ static/css/main.css | 25 +++++++++++++------------ static/css/problems.css | 25 +++++++++++++------------ static/css/theme.css | 25 +++++++++++++------------ static/css/trigger_edit.css | 25 +++++++++++++------------ static/js/datapoint_edit.mjs | 2 +- static/less/datapoints.less | 1 + static/less/theme.less | 28 ++++++++++++++-------------- 10 files changed, 86 insertions(+), 79 deletions(-) diff --git a/go.mod b/go.mod index d8dc4da..32bf233 100644 --- a/go.mod +++ b/go.mod @@ -6,14 +6,14 @@ require ( git.gibonuddevalla.se/go/webservice v0.2.15 git.gibonuddevalla.se/go/wrappederror v0.3.4 github.com/expr-lang/expr v1.16.5 + github.com/jmoiron/sqlx v1.3.5 + github.com/lib/pq v1.10.9 ) require ( git.gibonuddevalla.se/go/dbschema v1.3.0 // indirect github.com/google/uuid v1.5.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect - github.com/jmoiron/sqlx v1.3.5 // indirect - github.com/lib/pq v1.10.9 // indirect golang.org/x/net v0.17.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 26c1b8f..03a3465 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ git.gibonuddevalla.se/go/dbschema v1.3.0 h1:HzFMR29tWfy/ibIjltTbIMI4inVktj/rh8bESALibgM= git.gibonuddevalla.se/go/dbschema v1.3.0/go.mod h1:BNw3q/574nXbGoeWyK+tLhRfggVkw2j2aXZzrBKC3ig= -git.gibonuddevalla.se/go/webservice v0.2.12 h1:IcaIycmF7eO88RmFQkslHaKRWYxXdciVQXUAvJ36b4g= -git.gibonuddevalla.se/go/webservice v0.2.12/go.mod h1:3uBS6nLbK9qbuGzDls8MZD5Xr9ORY1Srbj6v06BIhws= +git.gibonuddevalla.se/go/webservice v0.2.15 h1:ECe63fRDSrg3RJcgYV2pG+WsAQLVG8wvfHennz7aHsY= +git.gibonuddevalla.se/go/webservice v0.2.15/go.mod h1:3uBS6nLbK9qbuGzDls8MZD5Xr9ORY1Srbj6v06BIhws= git.gibonuddevalla.se/go/wrappederror v0.3.4 h1:dcKp9/+QrZSO3S4fVnq7yG2p7DUZVmlztBAb/OzoZNY= git.gibonuddevalla.se/go/wrappederror v0.3.4/go.mod h1:j4w320Hk1wvhOPjUaK4GgLvmtnjUUM5yVu6JFO1OCSc= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/static/css/datapoints.css b/static/css/datapoints.css index 1963b13..8333e8e 100644 --- a/static/css/datapoints.css +++ b/static/css/datapoints.css @@ -19,7 +19,7 @@ body { } body { background: #282828; - font-family: "Roboto", sans-serif; + font-family: sans-serif; font-weight: 300; color: #d5c4a1; font-size: 11pt; @@ -48,25 +48,16 @@ a:hover { b { font-weight: 500; } -.roboto-light { - font-family: "Roboto", sans-serif; - font-weight: 300; - font-style: normal; -} -.roboto-medium { - font-family: "Roboto", sans-serif; - font-weight: 500; - font-style: normal; -} input[type="text"], textarea, select { - font-family: "Roboto Mono", monospace; + font-family: monospace; background: #202020; color: #d5c4a1; padding: 4px 8px; border: none; font-size: 1em; + line-height: 1.5em; } button { background: #202020; @@ -97,6 +88,16 @@ span.seconds { label { user-select: none; } +.description { + border: 1px solid #737373; + color: #3f9da1; + background: #202020; + padding: 4px 8px; + margin-top: 8px; + white-space: nowrap; + width: min-content; + border-radius: 8px; +} #datapoints { display: grid; grid-template-columns: repeat(5, min-content); @@ -137,6 +138,7 @@ label { } .widgets .label { margin-top: 4px; + white-space: nowrap; } .widgets input[type="text"], .widgets textarea { diff --git a/static/css/main.css b/static/css/main.css index e24674f..c2dc070 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -19,7 +19,7 @@ body { } body { background: #282828; - font-family: "Roboto", sans-serif; + font-family: sans-serif; font-weight: 300; color: #d5c4a1; font-size: 11pt; @@ -48,25 +48,16 @@ a:hover { b { font-weight: 500; } -.roboto-light { - font-family: "Roboto", sans-serif; - font-weight: 300; - font-style: normal; -} -.roboto-medium { - font-family: "Roboto", sans-serif; - font-weight: 500; - font-style: normal; -} input[type="text"], textarea, select { - font-family: "Roboto Mono", monospace; + font-family: monospace; background: #202020; color: #d5c4a1; padding: 4px 8px; border: none; font-size: 1em; + line-height: 1.5em; } button { background: #202020; @@ -97,6 +88,16 @@ span.seconds { label { user-select: none; } +.description { + border: 1px solid #737373; + color: #3f9da1; + background: #202020; + padding: 4px 8px; + margin-top: 8px; + white-space: nowrap; + width: min-content; + border-radius: 8px; +} #layout { display: grid; grid-template-areas: "menu content"; diff --git a/static/css/problems.css b/static/css/problems.css index 5b6316c..080965f 100644 --- a/static/css/problems.css +++ b/static/css/problems.css @@ -19,7 +19,7 @@ body { } body { background: #282828; - font-family: "Roboto", sans-serif; + font-family: sans-serif; font-weight: 300; color: #d5c4a1; font-size: 11pt; @@ -48,25 +48,16 @@ a:hover { b { font-weight: 500; } -.roboto-light { - font-family: "Roboto", sans-serif; - font-weight: 300; - font-style: normal; -} -.roboto-medium { - font-family: "Roboto", sans-serif; - font-weight: 500; - font-style: normal; -} input[type="text"], textarea, select { - font-family: "Roboto Mono", monospace; + font-family: monospace; background: #202020; color: #d5c4a1; padding: 4px 8px; border: none; font-size: 1em; + line-height: 1.5em; } button { background: #202020; @@ -97,6 +88,16 @@ span.seconds { label { user-select: none; } +.description { + border: 1px solid #737373; + color: #3f9da1; + background: #202020; + padding: 4px 8px; + margin-top: 8px; + white-space: nowrap; + width: min-content; + border-radius: 8px; +} #problems-list, #acknowledged-list { display: grid; diff --git a/static/css/theme.css b/static/css/theme.css index 68c59d9..104cf3d 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -19,7 +19,7 @@ body { } body { background: #282828; - font-family: "Roboto", sans-serif; + font-family: sans-serif; font-weight: 300; color: #d5c4a1; font-size: 11pt; @@ -48,25 +48,16 @@ a:hover { b { font-weight: 500; } -.roboto-light { - font-family: "Roboto", sans-serif; - font-weight: 300; - font-style: normal; -} -.roboto-medium { - font-family: "Roboto", sans-serif; - font-weight: 500; - font-style: normal; -} input[type="text"], textarea, select { - font-family: "Roboto Mono", monospace; + font-family: monospace; background: #202020; color: #d5c4a1; padding: 4px 8px; border: none; font-size: 1em; + line-height: 1.5em; } button { background: #202020; @@ -97,3 +88,13 @@ span.seconds { label { user-select: none; } +.description { + border: 1px solid #737373; + color: #3f9da1; + background: #202020; + padding: 4px 8px; + margin-top: 8px; + white-space: nowrap; + width: min-content; + border-radius: 8px; +} diff --git a/static/css/trigger_edit.css b/static/css/trigger_edit.css index 477f462..b2600b6 100644 --- a/static/css/trigger_edit.css +++ b/static/css/trigger_edit.css @@ -19,7 +19,7 @@ body { } body { background: #282828; - font-family: "Roboto", sans-serif; + font-family: sans-serif; font-weight: 300; color: #d5c4a1; font-size: 11pt; @@ -48,25 +48,16 @@ a:hover { b { font-weight: 500; } -.roboto-light { - font-family: "Roboto", sans-serif; - font-weight: 300; - font-style: normal; -} -.roboto-medium { - font-family: "Roboto", sans-serif; - font-weight: 500; - font-style: normal; -} input[type="text"], textarea, select { - font-family: "Roboto Mono", monospace; + font-family: monospace; background: #202020; color: #d5c4a1; padding: 4px 8px; border: none; font-size: 1em; + line-height: 1.5em; } button { background: #202020; @@ -97,6 +88,16 @@ span.seconds { label { user-select: none; } +.description { + border: 1px solid #737373; + color: #3f9da1; + background: #202020; + padding: 4px 8px; + margin-top: 8px; + white-space: nowrap; + width: min-content; + border-radius: 8px; +} .widgets { display: grid; grid-template-columns: min-content 1fr; diff --git a/static/js/datapoint_edit.mjs b/static/js/datapoint_edit.mjs index 611011c..dfe5e9c 100644 --- a/static/js/datapoint_edit.mjs +++ b/static/js/datapoint_edit.mjs @@ -1,7 +1,7 @@ export class UI { constructor() { document.addEventListener('keydown', evt=>this.keyHandler(evt)) - document.querySelector('input[name="name"]').focus() + document.querySelector('input[name="group"]').focus() } keyHandler(evt) { if (!(evt.altKey && evt.shiftKey)) diff --git a/static/less/datapoints.less b/static/less/datapoints.less index 26ee63d..770db5f 100644 --- a/static/less/datapoints.less +++ b/static/less/datapoints.less @@ -47,6 +47,7 @@ .label { margin-top: 4px; + white-space: nowrap; } input[type="text"], textarea { diff --git a/static/less/theme.less b/static/less/theme.less index 513db5f..11ae2fc 100644 --- a/static/less/theme.less +++ b/static/less/theme.less @@ -44,7 +44,7 @@ body { body { background: @bg1; - font-family: "Roboto", sans-serif; + font-family: sans-serif; font-weight: 300; color: @text1; font-size: 11pt; @@ -80,27 +80,16 @@ b { font-weight: @bold; } -.roboto-light { - font-family: "Roboto", sans-serif; - font-weight: 300; - font-style: normal; -} - -.roboto-medium { - font-family: "Roboto", sans-serif; - font-weight: 500; - font-style: normal; -} - input[type="text"], textarea, select { - font-family: "Roboto Mono", monospace; + font-family: monospace; background: @bg2; color: @text1; padding: 4px 8px; border: none; font-size: 1em; + line-height: 1.5em; // fix for chrome hiding underscores } button { @@ -138,3 +127,14 @@ span.seconds { label { user-select: none; } + +.description { + border: 1px solid .lighterOrDarker(@bg3, 25%)[@result]; + color: @color4; + background: @bg2; + padding: 4px 8px; + margin-top: 8px; + white-space: nowrap; + width: min-content; + border-radius: 8px; +}