diff --git a/configuration.go b/configuration.go deleted file mode 100644 index 5cb9b7c..0000000 --- a/configuration.go +++ /dev/null @@ -1,46 +0,0 @@ -package main - -import ( - // External - werr "git.gibonuddevalla.se/go/wrappederror" - - // Standard - "database/sql" -) - -type Configuration struct { - Settings map[string]string -} - -var smonConfig Configuration - -func SmonConfigInit() (err error) { - smonConfig.Settings = make(map[string]string, 8) - - var rows *sql.Rows - rows, err = service.Db.Conn.Query(`SELECT * FROM public.configuration`) - if err != nil { - err = werr.Wrap(err) - return - } - defer rows.Close() - - for rows.Next() { - var setting, value string - err = rows.Scan(&setting, &value) - if err != nil { - err = werr.Wrap(err) - return - } - - smonConfig.Settings[setting] = value - } - - return -} - -func (cfg *Configuration) SetTheme(theme string) (err error) { - cfg.Settings["THEME"] = theme - _, err = service.Db.Conn.Exec(`UPDATE public.configuration SET value=$1 WHERE setting='THEME'`, theme) - return -} diff --git a/main.go b/main.go index 6b0a45c..f31024f 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,7 @@ import ( "time" ) -const VERSION = "v20" +const VERSION = "v18" var ( logger *slog.Logger @@ -148,17 +148,10 @@ func main() { // {{{ service.Register("/trigger/delete/{id}", false, false, actionTriggerDelete) service.Register("/configuration", false, false, pageConfiguration) - service.Register("/configuration/theme", false, false, actionConfigurationTheme) service.Register("/entry/{datapoint}", false, false, actionEntryDatapoint) go nodataLoop() - err = SmonConfigInit() - if err != nil { - logger.Error("configuration", "error", werr.Wrap(err)) - os.Exit(1) - } - err = service.Start() if err != nil { logger.Error("webserver", "error", werr.Wrap(err)) @@ -373,7 +366,6 @@ func pageIndex(w http.ResponseWriter, _ *http.Request, _ *session.T) { // {{{ page := Page{ LAYOUT: "main", PAGE: "index", - CONFIG: smonConfig.Settings, } page.Render(w) } // }}} @@ -489,7 +481,6 @@ func pageProblems(w http.ResponseWriter, _ *http.Request, _ *session.T) { // {{{ page := Page{ LAYOUT: "main", PAGE: "problems", - CONFIG: smonConfig.Settings, } problems, err := ProblemsRetrieve() @@ -564,7 +555,6 @@ func pageDatapoints(w http.ResponseWriter, r *http.Request, _ *session.T) { // { page := Page{ LAYOUT: "main", PAGE: "datapoints", - CONFIG: smonConfig.Settings, } datapoints, err := DatapointsRetrieve() @@ -609,7 +599,6 @@ func pageDatapointEdit(w http.ResponseWriter, r *http.Request, _ *session.T) { / page := Page{ LAYOUT: "main", PAGE: "datapoint_edit", - CONFIG: smonConfig.Settings, MENU: "datapoints", Icon: "datapoints", Label: "Datapoint", @@ -690,7 +679,6 @@ func pageDatapointValues(w http.ResponseWriter, r *http.Request, _ *session.T) { page := Page{ LAYOUT: "main", PAGE: "datapoint_values", - CONFIG: smonConfig.Settings, MENU: "datapoints", Icon: "datapoints", Label: "Values for " + datapoint.Name, @@ -718,7 +706,6 @@ func pageTriggers(w http.ResponseWriter, _ *http.Request, _ *session.T) { // {{{ page := Page{ LAYOUT: "main", PAGE: "triggers", - CONFIG: smonConfig.Settings, Data: map[string]any{ "Areas": areas, }, @@ -803,7 +790,6 @@ func pageTriggerEdit(w http.ResponseWriter, r *http.Request, _ *session.T) { // LAYOUT: "main", PAGE: "trigger_edit", MENU: "triggers", - CONFIG: smonConfig.Settings, Label: "Trigger", Icon: "triggers", Data: map[string]any{ @@ -948,7 +934,6 @@ func pageConfiguration(w http.ResponseWriter, _ *http.Request, _ *session.T) { / page := Page{ LAYOUT: "main", PAGE: "configuration", - CONFIG: smonConfig.Settings, Data: map[string]any{ "Areas": areas, }, @@ -956,14 +941,3 @@ func pageConfiguration(w http.ResponseWriter, _ *http.Request, _ *session.T) { / page.Render(w) } // }}} -func actionConfigurationTheme(w http.ResponseWriter, r *http.Request, _ *session.T) { // {{{ - theme := r.FormValue("theme") - err := smonConfig.SetTheme(theme) - if err != nil { - httpError(w, werr.Wrap(err).Log()) - return - } - - w.Header().Add("Location", "/configuration") - w.WriteHeader(302) -} // }}} diff --git a/page.go b/page.go index 18e151b..2465645 100644 --- a/page.go +++ b/page.go @@ -15,7 +15,6 @@ type Page struct { LAYOUT string PAGE string MENU string - CONFIG map[string]string Label string Icon string @@ -48,8 +47,6 @@ func (p *Page) Render(w http.ResponseWriter) { "LAYOUT": p.LAYOUT, "PAGE": p.PAGE, "MENU": p.MENU, - "CONFIG": smonConfig.Settings, - "Label": p.Label, "Icon": p.Icon, "Data": p.Data, diff --git a/sql/00018.sql b/sql/00018.sql deleted file mode 100644 index c9f5a0c..0000000 --- a/sql/00018.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE public."configuration" ( - setting varchar NOT NULL, - value varchar DEFAULT '' NOT NULL, - CONSTRAINT configuration_pk PRIMARY KEY (setting) -); diff --git a/sql/00019.sql b/sql/00019.sql deleted file mode 100644 index e564737..0000000 --- a/sql/00019.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO public.configuration(setting, value) VALUES('THEME', 'gruvbox'); diff --git a/static/css/configuration.css b/static/css/configuration.css new file mode 100644 index 0000000..e013c47 --- /dev/null +++ b/static/css/configuration.css @@ -0,0 +1,130 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +*:focus { + outline: none; +} +[onClick] { + cursor: pointer; +} +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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; +} +#areas .area > .name { + display: grid; + grid-template-columns: 1fr min-content; + grid-gap: 0px 16px; + align-items: center; + padding-left: 16px; + padding-right: 8px; +} +#areas .area > .name img { + margin-top: 3px; + margin-bottom: 4px; + height: 16px; +} +#areas .area .section.configuration { + display: grid; + grid-template-columns: 1fr min-content; + grid-gap: 0 16px; + margin-top: 8px; + margin-bottom: 8px; +} +#areas .area .section.configuration:last-child { + margin-bottom: 16px; +} +#areas .area .section.configuration img { + height: 16px; +} diff --git a/static/css/datapoints.css b/static/css/datapoints.css new file mode 100644 index 0000000..3baa3b0 --- /dev/null +++ b/static/css/datapoints.css @@ -0,0 +1,168 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +*:focus { + outline: none; +} +[onClick] { + cursor: pointer; +} +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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(6, min-content); + grid-gap: 8px 16px; + margin-top: 16px; +} +#datapoints .group { + font-size: 1.1em; + font-weight: bold; + color: #b8bb26; + margin-top: 1.5em; + padding-bottom: 4px; +} +#datapoints h2 { + border-bottom: unset; +} +#datapoints .header { + font-weight: 800; + font-size: 0.85em; + color: #d5c4a1; +} +#datapoints div { + white-space: nowrap; + align-self: center; +} +#datapoints .icons { + display: flex; + gap: 12px; + align-items: center; +} +#datapoints img.info { + height: 20px; +} +#values { + display: grid; + grid-template-columns: repeat(2, min-content); + gap: 16px; + white-space: nowrap; +} +.widgets { + display: grid; + grid-template-columns: min-content 1fr; + gap: 8px 16px; +} +.widgets .label { + margin-top: 4px; + white-space: nowrap; +} +.widgets input[type="text"], +.widgets textarea { + width: 100%; +} +.widgets .datapoints { + display: grid; + grid-template-columns: min-content 1fr; + gap: 6px 8px; + font-family: "Roboto Mono", monospace; + margin-bottom: 8px; +} +.widgets .action { + display: grid; + grid-template-columns: min-content min-content; + grid-gap: 8px; +} diff --git a/static/css/default_light/configuration.css b/static/css/default_light/configuration.css deleted file mode 100644 index 83a9658..0000000 --- a/static/css/default_light/configuration.css +++ /dev/null @@ -1,26 +0,0 @@ -#areas .area > .name { - display: grid; - grid-template-columns: 1fr min-content; - grid-gap: 0px 16px; - align-items: center; - padding-left: 16px; - padding-right: 8px; -} -#areas .area > .name img { - margin-top: 3px; - margin-bottom: 4px; - height: 16px; -} -#areas .area .section.configuration { - display: grid; - grid-template-columns: 1fr min-content; - grid-gap: 0 16px; - margin-top: 8px; - margin-bottom: 8px; -} -#areas .area .section.configuration:last-child { - margin-bottom: 16px; -} -#areas .area .section.configuration img { - height: 16px; -} diff --git a/static/css/default_light/datapoints.css b/static/css/default_light/datapoints.css deleted file mode 100644 index 5ca8d48..0000000 --- a/static/css/default_light/datapoints.css +++ /dev/null @@ -1,64 +0,0 @@ -#datapoints { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 8px 16px; - margin-top: 16px; -} -#datapoints .group { - font-size: 1.1em; - font-weight: bold; - color: #2c6e97; - margin-top: 1.5em; - padding-bottom: 4px; -} -#datapoints h2 { - border-bottom: unset; -} -#datapoints .header { - font-weight: 800; - font-size: 0.85em; - color: #333; -} -#datapoints div { - white-space: nowrap; - align-self: center; -} -#datapoints .icons { - display: flex; - gap: 12px; - align-items: center; -} -#datapoints img.info { - height: 20px; -} -#values { - display: grid; - grid-template-columns: repeat(2, min-content); - gap: 16px; - white-space: nowrap; -} -.widgets { - display: grid; - grid-template-columns: min-content 1fr; - gap: 8px 16px; -} -.widgets .label { - margin-top: 4px; - white-space: nowrap; -} -.widgets input[type="text"], -.widgets textarea { - width: 100%; -} -.widgets .datapoints { - display: grid; - grid-template-columns: min-content 1fr; - gap: 6px 8px; - font-family: "Roboto Mono", monospace; - margin-bottom: 8px; -} -.widgets .action { - display: grid; - grid-template-columns: min-content min-content; - grid-gap: 8px; -} diff --git a/static/css/default_light/default_light.css b/static/css/default_light/default_light.css deleted file mode 100644 index f1ece36..0000000 --- a/static/css/default_light/default_light.css +++ /dev/null @@ -1,37 +0,0 @@ -.widgets .action #run-result { - background-color: #fff !important; - border: 1px solid #ccc; -} -#menu .entry .label { - color: #7bb8eb !important; -} -#menu .entry.selected .label { - color: #fff !important; -} -input[type="text"], -textarea, -select { - border: 1px solid #ccc; -} -.description { - border: 1px solid #ccc; -} -button { - background: #2979b8; - color: #fff; - border: 1px solid #2e84cb; -} -button:focus { - background: #2979b8; -} -#areas .area { - background: #fff !important; - border: 1px solid #2979b8; -} -#areas .area .name { - border-top-left-radius: unset; - border-top-right-radius: unset; -} -#areas .area .section .name { - font-weight: normal; -} diff --git a/static/css/default_light/gruvbox.css b/static/css/default_light/gruvbox.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/default_light/index.css b/static/css/default_light/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/default_light/main.css b/static/css/default_light/main.css deleted file mode 100644 index d543b2f..0000000 --- a/static/css/default_light/main.css +++ /dev/null @@ -1,206 +0,0 @@ -html { - box-sizing: border-box; -} -*, -*:before, -*:after { - box-sizing: inherit; -} -*:focus { - outline: none; -} -[onClick] { - cursor: pointer; -} -#layout { - display: grid; - grid-template-areas: "menu content"; - grid-template-columns: 104px 1fr; - height: 100vh; -} -#menu { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: repeat(32, min-content); - align-items: start; - grid-area: menu; - background: #1b4e78; -} -#menu .entry.selected { - background: #2979b8; -} -#menu .entry.selected a { - color: #000 !important; -} -#menu .entry > a { - display: grid; - justify-items: center; - grid-template-rows: 38px - 16px - ; - padding: 16px; - color: #7bb8eb; - text-decoration: none; -} -#menu .entry > a img { - display: block; - width: 32px; -} -#menu .entry > a .label { - font-size: 0.9em; - font-weight: bold; -} -#page { - grid-area: content; - padding: 32px; -} -#page .page-label { - display: grid; - grid-template-columns: min-content 1fr; - grid-gap: 12px; - align-items: center; - margin-bottom: 32px; -} -#page .page-label div { - font-weight: 800; - font-size: 1.5em; - color: #1b4e78; -} -#page .page-label img { - display: block; -} -#areas { - display: flex; - flex-wrap: wrap; - gap: 12px; - margin-top: 16px; -} -#areas .area { - background: #2979b8; - border-radius: 4px; -} -#areas .area > .name { - background: #1b4e78; - color: #fff; - font-weight: 800; - padding: 4px 16px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -#areas .area .section { - margin: 8px 16px; - margin-top: 12px; - margin-bottom: 20px; -} -#areas .area .section:last-child { - margin-bottom: 12px; -} -#areas .area .section .create { - display: grid; - grid-template-columns: min-content min-content; - grid-gap: 8px; - white-space: nowrap; -} -#areas .area .section .create .new { - font-weight: 800; -} -#areas .area .section > .name { - font-weight: 800; -} -dialog { - background: #1b4e78; - border: 1px solid #3f90d4; - color: #333; - box-shadow: 10px 10px 15px 0px rgba(0, 0, 0, 0.25); -} -html, -body { - margin: 0; - padding: 0; -} -body { - background: #fff; - font-family: sans-serif; - font-weight: 300; - color: #333; - font-size: 11pt; -} -h1, -h2 { - margin-bottom: 4px; -} -h1:first-child, -h2:first-child { - margin-top: 0px; -} -h1 { - margin-top: 32px; - font-size: 1.5em; - color: #1b4e78; - font-weight: 800; -} -h2 { - font-size: 1.25em; - color: #2c6e97; - font-weight: 800; -} -a { - color: #2c6e97; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -b { - font-weight: 800; -} -input[type="text"], -textarea, -select { - font-family: monospace; - background: #fff; - color: #333; - padding: 4px 8px; - border: 1px solid #484848; - font-size: 1em; - line-height: 1.5em; -} -button { - background: #1b4e78; - color: #333; - padding: 8px 32px; - border: 1px solid #2e84cb; - font-size: 1em; - height: 3em; -} -button:focus { - background: #2979b8; -} -.line { - grid-column: 1 / -1; - border-bottom: 1px solid #d9d9d9; -} -span.date { - color: #333; - font-weight: 800; -} -span.time { - font-size: 0.9em; - color: #333; -} -span.seconds { - display: none; -} -label { - user-select: none; -} -.description { - border: 1px solid #123450; - color: #2c6e97; - background: #fff; - padding: 4px 8px; - margin-top: 8px; - white-space: nowrap; - width: min-content; - border-radius: 8px; -} diff --git a/static/css/default_light/problems.css b/static/css/default_light/problems.css deleted file mode 100644 index ffe8a97..0000000 --- a/static/css/default_light/problems.css +++ /dev/null @@ -1,51 +0,0 @@ -#problems-list, -#acknowledged-list { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 4px 16px; - margin-bottom: 32px; -} -#problems-list div, -#acknowledged-list div { - white-space: nowrap; - line-height: 24px; -} -#problems-list .header, -#acknowledged-list .header { - font-weight: 800; -} -#problems-list .trigger, -#acknowledged-list .trigger { - color: #1b4e78; - font-weight: 800; -} -#problems-list .acknowledge img, -#acknowledged-list .acknowledge img { - height: 16px; -} -#acknowledged-list.hidden { - display: none; -} -#areas { - display: flex; - flex-wrap: wrap; - gap: 12px; - margin-top: 16px; -} -#areas .area .section { - display: grid; - grid-template-columns: repeat(2, min-content); - grid-gap: 8px 12px; -} -#areas .area .section .name { - color: #000; - grid-column: 1 / -1; - font-weight: bold !important; - line-height: 24px; -} -#areas .area .section div { - white-space: nowrap; -} -.hidden { - display: none; -} diff --git a/static/css/default_light/theme-default_light.css b/static/css/default_light/theme-default_light.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/default_light/theme-gruvbox.css b/static/css/default_light/theme-gruvbox.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/default_light/trigger_edit.css b/static/css/default_light/trigger_edit.css deleted file mode 100644 index 0ba9a92..0000000 --- a/static/css/default_light/trigger_edit.css +++ /dev/null @@ -1,44 +0,0 @@ -.widgets { - display: grid; - grid-template-columns: min-content 1fr; - gap: 8px 16px; -} -.widgets .label { - margin-top: 4px; -} -.widgets input[type="text"], -.widgets textarea { - width: 100%; -} -.widgets .datapoints { - font: "Roboto Mono", monospace; - display: grid; - grid-template-columns: min-content min-content 1fr; - gap: 6px 8px; - margin-bottom: 8px; - white-space: nowrap; -} -.widgets .datapoints .invalid { - color: #c83737; -} -.widgets .datapoints .delete img { - height: 16px; -} -.widgets .action { - display: grid; - grid-template-columns: min-content min-content 1fr; - grid-gap: 8px; -} -.widgets .action #run-result { - font-family: 'Roboto Mono', monospace; - margin-left: 16px; - padding: 16px; - background: #1b4e78; - min-height: 8em; -} -.widgets .action #run-result.ok { - color: #333; -} -.widgets .action #run-result.error { - color: #fb4934; -} diff --git a/static/css/default_light/triggers.css b/static/css/default_light/triggers.css deleted file mode 100644 index 0e0890f..0000000 --- a/static/css/default_light/triggers.css +++ /dev/null @@ -1,13 +0,0 @@ -#areas .area .section .triggers .trigger { - display: grid; - grid-template-columns: min-content 1fr min-content; - grid-gap: 8px; - align-items: center; - margin-top: 8px; -} -#areas .area .section .triggers .trigger img { - height: 16px; -} -#areas .area .section .triggers .trigger .label { - color: inherit; -} diff --git a/static/css/gruvbox/configuration.css b/static/css/gruvbox/configuration.css deleted file mode 100644 index 83a9658..0000000 --- a/static/css/gruvbox/configuration.css +++ /dev/null @@ -1,26 +0,0 @@ -#areas .area > .name { - display: grid; - grid-template-columns: 1fr min-content; - grid-gap: 0px 16px; - align-items: center; - padding-left: 16px; - padding-right: 8px; -} -#areas .area > .name img { - margin-top: 3px; - margin-bottom: 4px; - height: 16px; -} -#areas .area .section.configuration { - display: grid; - grid-template-columns: 1fr min-content; - grid-gap: 0 16px; - margin-top: 8px; - margin-bottom: 8px; -} -#areas .area .section.configuration:last-child { - margin-bottom: 16px; -} -#areas .area .section.configuration img { - height: 16px; -} diff --git a/static/css/gruvbox/datapoints.css b/static/css/gruvbox/datapoints.css deleted file mode 100644 index 4b896e4..0000000 --- a/static/css/gruvbox/datapoints.css +++ /dev/null @@ -1,64 +0,0 @@ -#datapoints { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 8px 16px; - margin-top: 16px; -} -#datapoints .group { - font-size: 1.1em; - font-weight: bold; - color: #b8bb26; - margin-top: 1.5em; - padding-bottom: 4px; -} -#datapoints h2 { - border-bottom: unset; -} -#datapoints .header { - font-weight: 800; - font-size: 0.85em; - color: #d5c4a1; -} -#datapoints div { - white-space: nowrap; - align-self: center; -} -#datapoints .icons { - display: flex; - gap: 12px; - align-items: center; -} -#datapoints img.info { - height: 20px; -} -#values { - display: grid; - grid-template-columns: repeat(2, min-content); - gap: 16px; - white-space: nowrap; -} -.widgets { - display: grid; - grid-template-columns: min-content 1fr; - gap: 8px 16px; -} -.widgets .label { - margin-top: 4px; - white-space: nowrap; -} -.widgets input[type="text"], -.widgets textarea { - width: 100%; -} -.widgets .datapoints { - display: grid; - grid-template-columns: min-content 1fr; - gap: 6px 8px; - font-family: "Roboto Mono", monospace; - margin-bottom: 8px; -} -.widgets .action { - display: grid; - grid-template-columns: min-content min-content; - grid-gap: 8px; -} diff --git a/static/css/gruvbox/default_light.css b/static/css/gruvbox/default_light.css deleted file mode 100644 index d30536b..0000000 --- a/static/css/gruvbox/default_light.css +++ /dev/null @@ -1,37 +0,0 @@ -.widgets .action #run-result { - background-color: #fff !important; - border: 1px solid #ccc; -} -#menu .entry .label { - color: #777 !important; -} -#menu .entry.selected .label { - color: #fff !important; -} -input[type="text"], -textarea, -select { - border: 1px solid #ccc; -} -.description { - border: 1px solid #ccc; -} -button { - background: #333; - color: #fff; - border: 1px solid #535353; -} -button:focus { - background: #333; -} -#areas .area { - background: #fff !important; - border: 1px solid #333; -} -#areas .area .name { - border-top-left-radius: unset; - border-top-right-radius: unset; -} -#areas .area .section .name { - font-weight: normal; -} diff --git a/static/css/gruvbox/gruvbox.css b/static/css/gruvbox/gruvbox.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/gruvbox/index.css b/static/css/gruvbox/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/gruvbox/problems.css b/static/css/gruvbox/problems.css deleted file mode 100644 index 6cd6c90..0000000 --- a/static/css/gruvbox/problems.css +++ /dev/null @@ -1,51 +0,0 @@ -#problems-list, -#acknowledged-list { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 4px 16px; - margin-bottom: 32px; -} -#problems-list div, -#acknowledged-list div { - white-space: nowrap; - line-height: 24px; -} -#problems-list .header, -#acknowledged-list .header { - font-weight: 800; -} -#problems-list .trigger, -#acknowledged-list .trigger { - color: #fb4934; - font-weight: 800; -} -#problems-list .acknowledge img, -#acknowledged-list .acknowledge img { - height: 16px; -} -#acknowledged-list.hidden { - display: none; -} -#areas { - display: flex; - flex-wrap: wrap; - gap: 12px; - margin-top: 16px; -} -#areas .area .section { - display: grid; - grid-template-columns: repeat(2, min-content); - grid-gap: 8px 12px; -} -#areas .area .section .name { - color: #f7edd7; - grid-column: 1 / -1; - font-weight: bold !important; - line-height: 24px; -} -#areas .area .section div { - white-space: nowrap; -} -.hidden { - display: none; -} diff --git a/static/css/gruvbox/theme-default_light.css b/static/css/gruvbox/theme-default_light.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/gruvbox/theme-gruvbox.css b/static/css/gruvbox/theme-gruvbox.css deleted file mode 100644 index e69de29..0000000 diff --git a/static/css/gruvbox/trigger_edit.css b/static/css/gruvbox/trigger_edit.css deleted file mode 100644 index 711dc17..0000000 --- a/static/css/gruvbox/trigger_edit.css +++ /dev/null @@ -1,44 +0,0 @@ -.widgets { - display: grid; - grid-template-columns: min-content 1fr; - gap: 8px 16px; -} -.widgets .label { - margin-top: 4px; -} -.widgets input[type="text"], -.widgets textarea { - width: 100%; -} -.widgets .datapoints { - font: "Roboto Mono", monospace; - display: grid; - grid-template-columns: min-content min-content 1fr; - gap: 6px 8px; - margin-bottom: 8px; - white-space: nowrap; -} -.widgets .datapoints .invalid { - color: #c83737; -} -.widgets .datapoints .delete img { - height: 16px; -} -.widgets .action { - display: grid; - grid-template-columns: min-content min-content 1fr; - grid-gap: 8px; -} -.widgets .action #run-result { - font-family: 'Roboto Mono', monospace; - margin-left: 16px; - padding: 16px; - background: #202020; - min-height: 8em; -} -.widgets .action #run-result.ok { - color: #d5c4a1; -} -.widgets .action #run-result.error { - color: #fb4934; -} diff --git a/static/css/gruvbox/triggers.css b/static/css/gruvbox/triggers.css deleted file mode 100644 index 0e0890f..0000000 --- a/static/css/gruvbox/triggers.css +++ /dev/null @@ -1,13 +0,0 @@ -#areas .area .section .triggers .trigger { - display: grid; - grid-template-columns: min-content 1fr min-content; - grid-gap: 8px; - align-items: center; - margin-top: 8px; -} -#areas .area .section .triggers .trigger img { - height: 16px; -} -#areas .area .section .triggers .trigger .label { - color: inherit; -} diff --git a/static/css/index.css b/static/css/index.css new file mode 100644 index 0000000..5c0077f --- /dev/null +++ b/static/css/index.css @@ -0,0 +1,108 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +*:focus { + outline: none; +} +[onClick] { + cursor: pointer; +} +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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; +} +.graph { + margin-top: 192px; + border-radius: 16px; +} diff --git a/static/css/gruvbox/main.css b/static/css/main.css similarity index 96% rename from static/css/gruvbox/main.css rename to static/css/main.css index 1ab2986..c5de4d4 100644 --- a/static/css/gruvbox/main.css +++ b/static/css/main.css @@ -12,10 +12,100 @@ html { [onClick] { cursor: pointer; } +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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"; - grid-template-columns: 104px 1fr; + grid-template-columns: 96px 1fr; height: 100vh; } #menu { @@ -113,94 +203,3 @@ dialog { color: #d5c4a1; box-shadow: 10px 10px 15px 0px rgba(0, 0, 0, 0.25); } -html, -body { - margin: 0; - padding: 0; -} -body { - background: #282828; - font-family: sans-serif; - font-weight: 300; - color: #d5c4a1; - font-size: 11pt; -} -h1, -h2 { - margin-bottom: 4px; -} -h1:first-child, -h2:first-child { - margin-top: 0px; -} -h1 { - margin-top: 32px; - font-size: 1.5em; - color: #fb4934; - font-weight: 800; -} -h2 { - font-size: 1.25em; - color: #b8bb26; - font-weight: 800; -} -a { - color: #3f9da1; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -b { - font-weight: 800; -} -input[type="text"], -textarea, -select { - font-family: monospace; - background: #282828; - color: #d5c4a1; - padding: 4px 8px; - border: 1px solid #484848; - font-size: 1em; - line-height: 1.5em; -} -button { - background: #202020; - color: #d5c4a1; - padding: 8px 32px; - border: 1px solid #535353; - font-size: 1em; - height: 3em; -} -button:focus { - background: #333; -} -.line { - grid-column: 1 / -1; - border-bottom: 1px solid #4e4e4e; -} -span.date { - color: #d5c4a1; - font-weight: 800; -} -span.time { - font-size: 0.9em; - color: #d5c4a1; -} -span.seconds { - display: none; -} -label { - user-select: none; -} -.description { - border: 1px solid #737373; - color: #3f9da1; - background: #282828; - padding: 4px 8px; - margin-top: 8px; - white-space: nowrap; - width: min-content; - border-radius: 8px; -} diff --git a/static/css/problems.css b/static/css/problems.css new file mode 100644 index 0000000..afbf302 --- /dev/null +++ b/static/css/problems.css @@ -0,0 +1,155 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +*:focus { + outline: none; +} +[onClick] { + cursor: pointer; +} +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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; + grid-template-columns: repeat(6, min-content); + grid-gap: 4px 16px; + margin-bottom: 32px; +} +#problems-list div, +#acknowledged-list div { + white-space: nowrap; + line-height: 24px; +} +#problems-list .header, +#acknowledged-list .header { + font-weight: 800; +} +#problems-list .trigger, +#acknowledged-list .trigger { + color: #fb4934; + font-weight: 800; +} +#problems-list .acknowledge img, +#acknowledged-list .acknowledge img { + height: 16px; +} +#acknowledged-list.hidden { + display: none; +} +#areas { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin-top: 16px; +} +#areas .area .section { + display: grid; + grid-template-columns: repeat(2, min-content); + grid-gap: 8px 12px; +} +#areas .area .section .name { + color: #f7edd7; + grid-column: 1 / -1; + font-weight: bold !important; + line-height: 24px; +} +#areas .area .section div { + white-space: nowrap; +} +.hidden { + display: none; +} diff --git a/static/css/gruvbox/theme.css b/static/css/theme.css similarity index 100% rename from static/css/gruvbox/theme.css rename to static/css/theme.css diff --git a/static/css/trigger_edit.css b/static/css/trigger_edit.css new file mode 100644 index 0000000..070964d --- /dev/null +++ b/static/css/trigger_edit.css @@ -0,0 +1,148 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +*:focus { + outline: none; +} +[onClick] { + cursor: pointer; +} +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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; + gap: 8px 16px; +} +.widgets .label { + margin-top: 4px; +} +.widgets input[type="text"], +.widgets textarea { + width: 100%; +} +.widgets .datapoints { + font: "Roboto Mono", monospace; + display: grid; + grid-template-columns: min-content min-content 1fr; + gap: 6px 8px; + margin-bottom: 8px; + white-space: nowrap; +} +.widgets .datapoints .invalid { + color: #c83737; +} +.widgets .datapoints .delete img { + height: 16px; +} +.widgets .action { + display: grid; + grid-template-columns: min-content min-content 1fr; + grid-gap: 8px; +} +.widgets .action #run-result { + font-family: 'Roboto Mono', monospace; + margin-left: 16px; + padding: 16px; + background: #202020; + min-height: 8em; +} +.widgets .action #run-result.ok { + color: #d5c4a1; +} +.widgets .action #run-result.error { + color: #fb4934; +} diff --git a/static/css/triggers.css b/static/css/triggers.css new file mode 100644 index 0000000..352428d --- /dev/null +++ b/static/css/triggers.css @@ -0,0 +1,117 @@ +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + box-sizing: inherit; +} +*:focus { + outline: none; +} +[onClick] { + cursor: pointer; +} +html, +body { + margin: 0; + padding: 0; +} +body { + background: #282828; + font-family: sans-serif; + font-weight: 300; + color: #d5c4a1; + font-size: 11pt; +} +h1, +h2 { + margin-bottom: 4px; +} +h1:first-child, +h2:first-child { + margin-top: 0px; +} +h1 { + font-size: 1.5em; + color: #fb4934; + font-weight: 800; +} +h2 { + font-size: 1.25em; + color: #b8bb26; + font-weight: 800; +} +a { + color: #3f9da1; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 800; +} +input[type="text"], +textarea, +select { + font-family: monospace; + background: #202020; + color: #d5c4a1; + padding: 4px 8px; + border: none; + font-size: 1em; + line-height: 1.5em; +} +button { + background: #202020; + color: #d5c4a1; + padding: 8px 32px; + border: 1px solid #535353; + font-size: 1em; + height: 3em; +} +button:focus { + background: #333; +} +.line { + grid-column: 1 / -1; + border-bottom: 1px solid #4e4e4e; +} +span.date { + color: #d5c4a1; + font-weight: 800; +} +span.time { + font-size: 0.9em; + color: #d5c4a1; +} +span.seconds { + display: none; +} +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; +} +#areas .area .section .triggers .trigger { + display: grid; + grid-template-columns: min-content 1fr min-content; + grid-gap: 8px; + align-items: center; + margin-top: 8px; +} +#areas .area .section .triggers .trigger img { + height: 16px; +} +#areas .area .section .triggers .trigger .label { + color: inherit; +} diff --git a/static/images/default_light/acknowledge-filled.svg b/static/images/acknowledge-filled.svg similarity index 100% rename from static/images/default_light/acknowledge-filled.svg rename to static/images/acknowledge-filled.svg diff --git a/static/images/default_light/acknowledge-outline.svg b/static/images/acknowledge-outline.svg similarity index 100% rename from static/images/default_light/acknowledge-outline.svg rename to static/images/acknowledge-outline.svg diff --git a/static/images/default_light/acknowledge.svg b/static/images/acknowledge.svg similarity index 100% rename from static/images/default_light/acknowledge.svg rename to static/images/acknowledge.svg diff --git a/static/images/gruvbox/configuration.svg b/static/images/configuration.svg similarity index 100% rename from static/images/gruvbox/configuration.svg rename to static/images/configuration.svg diff --git a/static/images/gruvbox/configuration_selected.svg b/static/images/configuration_selected.svg similarity index 100% rename from static/images/gruvbox/configuration_selected.svg rename to static/images/configuration_selected.svg diff --git a/static/images/gruvbox/datapoints.svg b/static/images/datapoints.svg similarity index 100% rename from static/images/gruvbox/datapoints.svg rename to static/images/datapoints.svg diff --git a/static/images/gruvbox/datapoints_selected.svg b/static/images/datapoints_selected.svg similarity index 100% rename from static/images/gruvbox/datapoints_selected.svg rename to static/images/datapoints_selected.svg diff --git a/static/images/default_light/configuration.svg b/static/images/default_light/configuration.svg deleted file mode 100644 index b7430d2..0000000 --- a/static/images/default_light/configuration.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/static/images/default_light/configuration_selected.svg b/static/images/default_light/configuration_selected.svg deleted file mode 100644 index d76911c..0000000 --- a/static/images/default_light/configuration_selected.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/default_light/datapoints.svg b/static/images/default_light/datapoints.svg deleted file mode 100644 index ec437db..0000000 --- a/static/images/default_light/datapoints.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - diff --git a/static/images/default_light/datapoints_selected.svg b/static/images/default_light/datapoints_selected.svg deleted file mode 100644 index fdb858d..0000000 --- a/static/images/default_light/datapoints_selected.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - - diff --git a/static/images/default_light/graph.svg b/static/images/default_light/graph.svg deleted file mode 100644 index 32135be..0000000 --- a/static/images/default_light/graph.svg +++ /dev/null @@ -1,848 +0,0 @@ - - - - diff --git a/static/images/default_light/info-filled.svg b/static/images/default_light/info-filled.svg deleted file mode 100644 index 2e6e386..0000000 --- a/static/images/default_light/info-filled.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/static/images/default_light/info-outline.svg b/static/images/default_light/info-outline.svg deleted file mode 100644 index 168ba2b..0000000 --- a/static/images/default_light/info-outline.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - diff --git a/static/images/default_light/logo.svg b/static/images/default_light/logo.svg deleted file mode 100644 index a15846a..0000000 --- a/static/images/default_light/logo.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - diff --git a/static/images/default_light/logo_selected.svg b/static/images/default_light/logo_selected.svg deleted file mode 100644 index b60f69c..0000000 --- a/static/images/default_light/logo_selected.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - diff --git a/static/images/default_light/problems.svg b/static/images/default_light/problems.svg deleted file mode 100644 index 04f5282..0000000 --- a/static/images/default_light/problems.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/static/images/default_light/problems_selected.svg b/static/images/default_light/problems_selected.svg deleted file mode 100644 index 32283c5..0000000 --- a/static/images/default_light/problems_selected.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/default_light/triggers.svg b/static/images/default_light/triggers.svg deleted file mode 100644 index 76542fe..0000000 --- a/static/images/default_light/triggers.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - diff --git a/static/images/default_light/triggers_selected.svg b/static/images/default_light/triggers_selected.svg deleted file mode 100644 index 59d9a72..0000000 --- a/static/images/default_light/triggers_selected.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/static/images/default_light/values.svg b/static/images/default_light/values.svg deleted file mode 100644 index 4cc90a7..0000000 --- a/static/images/default_light/values.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/default_light/delete.svg b/static/images/delete.svg similarity index 100% rename from static/images/default_light/delete.svg rename to static/images/delete.svg diff --git a/static/images/default_light/delete_white.svg b/static/images/delete_white.svg similarity index 100% rename from static/images/default_light/delete_white.svg rename to static/images/delete_white.svg diff --git a/static/images/gruvbox/graph.svg b/static/images/graph.svg similarity index 100% rename from static/images/gruvbox/graph.svg rename to static/images/graph.svg diff --git a/static/images/gruvbox/acknowledge-filled.svg b/static/images/gruvbox/acknowledge-filled.svg deleted file mode 100644 index f2d8a57..0000000 --- a/static/images/gruvbox/acknowledge-filled.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/gruvbox/acknowledge-outline.svg b/static/images/gruvbox/acknowledge-outline.svg deleted file mode 100644 index 7e97bfb..0000000 --- a/static/images/gruvbox/acknowledge-outline.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/static/images/gruvbox/acknowledge.svg b/static/images/gruvbox/acknowledge.svg deleted file mode 100644 index bec58fc..0000000 --- a/static/images/gruvbox/acknowledge.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/gruvbox/delete.svg b/static/images/gruvbox/delete.svg deleted file mode 100644 index 23ba519..0000000 --- a/static/images/gruvbox/delete.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/gruvbox/delete_white.svg b/static/images/gruvbox/delete_white.svg deleted file mode 100644 index 7ae4dab..0000000 --- a/static/images/gruvbox/delete_white.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/static/images/gruvbox/info-filled.svg b/static/images/info-filled.svg similarity index 100% rename from static/images/gruvbox/info-filled.svg rename to static/images/info-filled.svg diff --git a/static/images/gruvbox/info-outline.svg b/static/images/info-outline.svg similarity index 100% rename from static/images/gruvbox/info-outline.svg rename to static/images/info-outline.svg diff --git a/static/images/gruvbox/logo.svg b/static/images/logo.svg similarity index 100% rename from static/images/gruvbox/logo.svg rename to static/images/logo.svg diff --git a/static/images/gruvbox/logo_selected.svg b/static/images/logo_selected.svg similarity index 100% rename from static/images/gruvbox/logo_selected.svg rename to static/images/logo_selected.svg diff --git a/static/images/gruvbox/problems.svg b/static/images/problems.svg similarity index 100% rename from static/images/gruvbox/problems.svg rename to static/images/problems.svg diff --git a/static/images/gruvbox/problems_selected.svg b/static/images/problems_selected.svg similarity index 100% rename from static/images/gruvbox/problems_selected.svg rename to static/images/problems_selected.svg diff --git a/static/images/gruvbox/triggers.svg b/static/images/triggers.svg similarity index 100% rename from static/images/gruvbox/triggers.svg rename to static/images/triggers.svg diff --git a/static/images/gruvbox/triggers_selected.svg b/static/images/triggers_selected.svg similarity index 100% rename from static/images/gruvbox/triggers_selected.svg rename to static/images/triggers_selected.svg diff --git a/static/images/gruvbox/values.svg b/static/images/values.svg similarity index 100% rename from static/images/gruvbox/values.svg rename to static/images/values.svg diff --git a/static/less/Makefile b/static/less/Makefile index 4d60bca..7e91a05 100644 --- a/static/less/Makefile +++ b/static/less/Makefile @@ -1,9 +1,9 @@ less = $(wildcard *.less) _css = $(less:.less=.css) -css = $(addprefix ../css/${THEME}/, $(_css) ) +css = $(addprefix ../css/, $(_css) ) -../css/${THEME}/%.css: %.less theme-${THEME}.less - lessc --global-var="THEME=${THEME}" $< $@ +../css/%.css: %.less theme.less + lessc $< ../css/$@ all: $(css) diff --git a/static/less/configuration.less b/static/less/configuration.less index 33a8323..8c59755 100644 --- a/static/less/configuration.less +++ b/static/less/configuration.less @@ -1,4 +1,4 @@ -@import 'theme-@{THEME}.less'; +@import 'theme.less'; #areas { .area { diff --git a/static/less/datapoints.less b/static/less/datapoints.less index 878623d..8ecc09a 100644 --- a/static/less/datapoints.less +++ b/static/less/datapoints.less @@ -1,4 +1,4 @@ -@import "theme-@{THEME}.less"; +@import "theme.less"; #datapoints { display: grid; diff --git a/static/less/default_light.less b/static/less/default_light.less deleted file mode 100644 index 8afa131..0000000 --- a/static/less/default_light.less +++ /dev/null @@ -1,53 +0,0 @@ -@import "theme-@{THEME}.less"; - -.widgets { - .action { - #run-result { - background-color: #fff !important; - border: 1px solid #ccc; - } - } -} - -#menu .entry .label { - color: @text3 !important; -} - -#menu .entry.selected .label { - color: #fff !important; -} - -input[type="text"], -textarea, -select { - border: 1px solid #ccc; -} - -.description { - border: 1px solid #ccc; -} - -button { - background: @bg3; - color: #fff; - border: 1px solid lighten(@bg2, 20%); - &:focus { - background: @bg3; - } -} - -#areas { - .area { - background: #fff !important; - border: 1px solid @bg3; - - .name { - border-top-left-radius: unset; - border-top-right-radius: unset; - } - - .section .name { - font-weight: normal; - } - } -} diff --git a/static/less/gruvbox.less b/static/less/gruvbox.less deleted file mode 100644 index f369797..0000000 --- a/static/less/gruvbox.less +++ /dev/null @@ -1 +0,0 @@ -@import "theme-@{THEME}.less"; diff --git a/static/less/index.less b/static/less/index.less index f369797..97eb0bb 100644 --- a/static/less/index.less +++ b/static/less/index.less @@ -1 +1,6 @@ -@import "theme-@{THEME}.less"; +@import "theme.less"; + +.graph { + margin-top: 192px; + border-radius: 16px; +} diff --git a/static/less/loop_make.sh b/static/less/loop_make.sh index afae519..0aceed7 100755 --- a/static/less/loop_make.sh +++ b/static/less/loop_make.sh @@ -6,15 +6,10 @@ do inotifywait -q -e MODIFY *less #sleep 0.5 clear - - for THEME in $(ls theme-*.less | sed -e 's/^theme-\(.*\)\.less$/\1/'); do - if make -j12; then - : - #curl -s http://notes.lan:1371/_ws/css_update - fi - done - echo -e "\n\e[32;1mOK!\e[0m" - sleep 1 - clear - + if make -j12; then + echo -e "\n\e[32;1mOK!\e[0m" + #curl -s http://notes.lan:1371/_ws/css_update + sleep 1 + clear + fi done diff --git a/static/less/main.less b/static/less/main.less index 4c61a90..d04e244 100644 --- a/static/less/main.less +++ b/static/less/main.less @@ -1,27 +1,9 @@ -@import "theme-@{THEME}.less"; - -html { - box-sizing: border-box; -} - -*, -*:before, -*:after { - box-sizing: inherit; -} - -*:focus { - outline: none; -} - -[onClick] { - cursor: pointer; -} +@import "theme.less"; #layout { display: grid; grid-template-areas: "menu content"; - grid-template-columns: 104px 1fr; + grid-template-columns: 96px 1fr; height: 100vh; } @@ -48,7 +30,7 @@ html { 16px ; padding: 16px; - color: @text3; + color: #777; text-decoration: none; img { @@ -140,111 +122,3 @@ dialog { color: @text1; box-shadow: 10px 10px 15px 0px rgba(0, 0, 0, 0.25); } - -html, -body { - margin: 0; - padding: 0; -} - -body { - background: @bg1; - font-family: sans-serif; - font-weight: 300; - color: @text1; - font-size: 11pt; -} - -h1, -h2 { - margin-bottom: 4px; - &:first-child { - margin-top: 0px; - } -} - -h1 { - margin-top: 32px; - font-size: 1.5em; - color: @color1; - font-weight: @bold; -} - -h2 { - font-size: 1.25em; - color: @color3; - font-weight: @bold; -} - -a { - color: @color4; - text-decoration: none; - - &:hover { - text-decoration: underline; - } -} - -b { - font-weight: @bold; -} - -input[type="text"], -textarea, -select { - font-family: monospace; - background: @bg1; - color: @text1; - padding: 4px 8px; - border: 1px solid #484848; - font-size: 1em; - line-height: 1.5em; // fix for chrome hiding underscores -} - -button { - background: @bg2; - color: @text1; - padding: 8px 32px; - border: 1px solid lighten(@bg2, 20%); - font-size: 1em; - height: 3em; - - &:focus { - background: @bg3; - } -} - -.line { - grid-column: 1 / -1; - border-bottom: 1px solid .lighterOrDarker(@bg1, 15%)[@result]; -} - -span.date { - color: @text1; - font-weight: @bold; -} - -span.time { - font-size: 0.9em; - color: @text1; -} - -span.seconds { - display: none; -} - -label { - user-select: none; -} - -.description { - border: 1px solid .lighterOrDarker(@bg3, 25%)[@result]; - color: @color4; - background: @bg1; - padding: 4px 8px; - margin-top: 8px; - white-space: nowrap; - width: min-content; - border-radius: 8px; -} - diff --git a/static/less/problems.less b/static/less/problems.less index 29caf1f..a6b6551 100644 --- a/static/less/problems.less +++ b/static/less/problems.less @@ -1,4 +1,4 @@ -@import "theme-@{THEME}.less"; +@import "theme.less"; #problems-list, #acknowledged-list { display: grid; diff --git a/static/less/theme-default_light.less b/static/less/theme-default_light.less deleted file mode 100644 index 36dca3d..0000000 --- a/static/less/theme-default_light.less +++ /dev/null @@ -1,20 +0,0 @@ -@bg1: #fff; -@bg2: #1b4e78; -@bg3: #2979b8; - -@text1: #333; -@text2: #000; -@text3: #7bb8eb; - -@error: #fb4934; -@color1: #1b4e78; -@color2: #fabd2f; -@color3: #2c6e97; -@color4: #2c6e97; -@color5: #fe8019; - -@bold: 800; - -.lighterOrDarker(@color, @amount) { - @result: darken(@color, @amount); -} diff --git a/static/less/theme-gruvbox.less b/static/less/theme-gruvbox.less deleted file mode 100644 index 5df450d..0000000 --- a/static/less/theme-gruvbox.less +++ /dev/null @@ -1,20 +0,0 @@ -@bg1: #282828; -@bg2: #202020; -@bg3: #333; - -@text1: #d5c4a1; -@text2: #f7edd7; -@text3: #777; - -@error: #fb4934; -@color1: #fb4934; -@color2: #fabd2f; -@color3: #b8bb26; -@color4: #3f9da1; -@color5: #fe8019; - -@bold: 800; - -.lighterOrDarker(@color, @amount) { - @result: lighten(@color, @amount); -} diff --git a/static/less/theme.less b/static/less/theme.less new file mode 100644 index 0000000..9a27b23 --- /dev/null +++ b/static/less/theme.less @@ -0,0 +1,143 @@ +@bg1: #282828; +@bg2: #202020; +@bg3: #333; + +@text1: #d5c4a1; +@text2: #f7edd7; + +@error: #fb4934; +@color1: #fb4934; +@color2: #fabd2f; +@color3: #b8bb26; +@color4: #3f9da1; +@color5: #fe8019; + +@bold: 800; + +.lighterOrDarker(@color, @amount) { + @result: lighten(@color, @amount); +} + +html { + box-sizing: border-box; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +*:focus { + outline: none; +} + +[onClick] { + cursor: pointer; +} + +html, +body { + margin: 0; + padding: 0; +} + +body { + background: @bg1; + font-family: sans-serif; + font-weight: 300; + color: @text1; + font-size: 11pt; +} + +h1, +h2 { + margin-bottom: 4px; + &:first-child { + margin-top: 0px; + } +} + +h1 { + font-size: 1.5em; + color: @color1; + font-weight: @bold; +} + +h2 { + font-size: 1.25em; + color: @color3; + font-weight: @bold; +} + +a { + color: @color4; + text-decoration: none; + + &:hover { + text-decoration: underline; + } +} + +b { + font-weight: @bold; +} + +input[type="text"], +textarea, +select { + 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 { + background: @bg2; + color: @text1; + padding: 8px 32px; + border: 1px solid lighten(@bg2, 20%); + font-size: 1em; + height: 3em; + + &:focus { + background: @bg3; + } +} + +.line { + grid-column: 1 / -1; + border-bottom: 1px solid .lighterOrDarker(@bg1, 15%)[@result]; +} + +span.date { + color: @text1; + font-weight: @bold; +} + +span.time { + font-size: 0.9em; + color: @text1; +} + +span.seconds { + display: none; +} + +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; +} diff --git a/static/less/trigger_edit.less b/static/less/trigger_edit.less index 4e3f0e2..8e48ed9 100644 --- a/static/less/trigger_edit.less +++ b/static/less/trigger_edit.less @@ -1,4 +1,4 @@ -@import "theme-@{THEME}.less"; +@import "theme.less"; #dlg-datapoints { } diff --git a/static/less/triggers.less b/static/less/triggers.less index b83dfa2..9fecbe5 100644 --- a/static/less/triggers.less +++ b/static/less/triggers.less @@ -1,4 +1,4 @@ -@import 'theme-@{THEME}.less'; +@import 'theme.less'; #areas { diff --git a/views/components/menu.gotmpl b/views/components/menu.gotmpl index c0c1ddf..f00b4d6 100644 --- a/views/components/menu.gotmpl +++ b/views/components/menu.gotmpl @@ -2,35 +2,35 @@