From f17d8b44a30feda1009888f5663cd4fccea41566 Mon Sep 17 00:00:00 2001 From: Daniel Legt Date: Mon, 22 Jan 2024 23:01:05 +0200 Subject: [PATCH] Implemented View Button * Updated Style + Added 2 icons for the view button + New `drive.html` page ( WIP ) * Updated `index.html` to apply updates --- static/style.css | 40 +++++++++++++++++++++ static/view-alt-svgrepo-com.svg | 5 +++ static/view-svgrepo-com.svg | 4 +++ templates/drive.html | 62 +++++++++++++++++++++++++++++++++ templates/index.html | 4 +++ 5 files changed, 115 insertions(+) create mode 100644 static/view-alt-svgrepo-com.svg create mode 100644 static/view-svgrepo-com.svg create mode 100644 templates/drive.html diff --git a/static/style.css b/static/style.css index afae1d9..83ddbc4 100644 --- a/static/style.css +++ b/static/style.css @@ -11,14 +11,17 @@ --fg1: #434c56; --acc1: #2aa3f4; + --acc1H: #0089e5; --acc1BG0: #2aa3f450; --acc1BG1: #2aa3f430; --acc2: #2af488; + --acc2H: #2af488; --acc2BG0: #2af48850; --acc2BG1: #2af48830; --acc3: #f4e02a; + --acc3H: #f4e02a; --acc3BG0: #f4e02a50; --acc3BG1: #f4e02a30; } @@ -28,6 +31,17 @@ font-family: "Noto Sans Mono", "Roboto", sans-serif; } + +a { + color: inherit; + text-decoration: inherit; +} + +a:hover { + color: inherit; + text-decoration: inherit; +} + html, body { margin: 0; padding: 0; @@ -155,6 +169,32 @@ input { background-color: var(--bg3); } +.btn-link { + color: var(--acc1); +} + +.btn-link:hover { + color: var(--acc1H); +} + +.info-button { + display: flex; + + mask-image: url("/static/view-svgrepo-com.svg"); + background: var(--fg0); + + height: 26px; + width: 26px; + mask-size: contain; + mask-position: center; + mask-repeat: no-repeat; +} + +.info-button:hover { + mask-image: url("/static/view-alt-svgrepo-com.svg"); + background-color: var(--acc1); +} + .input-grp { display: flex; flex-flow: column; diff --git a/static/view-alt-svgrepo-com.svg b/static/view-alt-svgrepo-com.svg new file mode 100644 index 0000000..8267f4f --- /dev/null +++ b/static/view-alt-svgrepo-com.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/view-svgrepo-com.svg b/static/view-svgrepo-com.svg new file mode 100644 index 0000000..a56b666 --- /dev/null +++ b/static/view-svgrepo-com.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/templates/drive.html b/templates/drive.html new file mode 100644 index 0000000..5eb6b28 --- /dev/null +++ b/templates/drive.html @@ -0,0 +1,62 @@ + + + + + + + Drive Health Dashboard + + + +
+ +
+
+

Available Disks

+
+
+ +
+
+ {{ if len .drives }} + + + + + + + + + + + + {{ range .drives }} + {{ $temp := .GetTemperature }} + + + + + + + + {{ if gt $temp 50 }} + + {{ else if gt $temp 30 }} + + {{ else }} + + {{ end }} + + {{ end }} + +
IDNameModelSerialTemperature
#{{ .ID }} {{ .Name }} {{ .Model }} {{ .Serial }}{{ $temp }}°C{{ $temp }}°C{{ $temp }}°C
+ {{ else }} +

No hard drives found.

+ {{ end }} +
+
+ +
+ + + diff --git a/templates/index.html b/templates/index.html index bd9707a..c4622d7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -30,6 +30,7 @@ Model Serial Temperature + Actions @@ -49,6 +50,9 @@ {{ else }} {{ $temp }}°C {{ end }} + + + {{ end }}