From 7c4f11591eaecaa90134d2cc3c43a8ed6a2c2c2b Mon Sep 17 00:00:00 2001 From: PeekabooSteam Date: Wed, 8 Mar 2023 21:42:14 +0000 Subject: [PATCH] Tarted up the unit control panel a bit more. --- client/public/stylesheets/layout.css | 53 ++++++++++++++++++ client/public/stylesheets/olympus.css | 32 +++++++++-- client/src/index.ts | 2 + client/views/unitcontrolpanel.ejs | 79 ++++++++++++++++----------- 4 files changed, 129 insertions(+), 37 deletions(-) diff --git a/client/public/stylesheets/layout.css b/client/public/stylesheets/layout.css index 1bcc28fa..faf6ebcf 100644 --- a/client/public/stylesheets/layout.css +++ b/client/public/stylesheets/layout.css @@ -49,6 +49,11 @@ body { z-index: 1000; } +#unit-control-panel h4 { + margin-bottom:8px; + margin-top:20px; +} + body.feature-forceShowUnitControlPanel #unit-control-panel { display:block !important; } @@ -57,6 +62,54 @@ body.feature-forceShowUnitControlPanel #unit-control-panel { position: static; } +dl.data-grid { + display:flex; + flex-direction: row; + flex-wrap: wrap; + margin:0; + row-gap: 4px; +} + +dl.data-grid dt { + width:40%; +} + +dl.data-grid dd { + width:60%; +} + + +dl.data-grid dt.icon { + text-indent: 10px; +} + +dl.data-grid dt.icon::before { + content: url( /images/icons/speed.svg ); + display:inline-block; + filter:invert(100%); + width: 20px; + translate:-20px 2px; +} + + +dl.data-grid dt.icon-speed::before { + content: url( /images/icons/speed.svg ); +} + + +dl.data-grid dt.icon-altitude::before { + content: url( /images/icons/altitude.svg ); +} + + +dl.data-grid dd { + display: flex; + justify-content: flex-end; + margin-left: auto; +} + + + .ol-button-box { column-gap: 6px; diff --git a/client/public/stylesheets/olympus.css b/client/public/stylesheets/olympus.css index f9259b27..39ebdb41 100644 --- a/client/public/stylesheets/olympus.css +++ b/client/public/stylesheets/olympus.css @@ -65,8 +65,8 @@ button[disabled="disabled"] { .pill { border-radius: var( --border-radius-sm ); - display:inline-block; - padding:6px; + padding:2px 6px; + width:fit-content; } @@ -82,6 +82,14 @@ button[disabled="disabled"] { width:fit-content; } +.ol-panel hr { + background-color: var( --secondary-light-grey ); + border:none; + height:1px; + margin:20px 0; + width:100%; +} + .ol-panel-padding-lg { padding:24px 30px; } @@ -265,6 +273,11 @@ h4 { font-weight: normal; } +button.ol-button-warning { + border: 1px solid var( --primary-red ); + color: var( --primary-red ); +} + nav.ol-panel { column-gap: 20px; @@ -329,6 +342,15 @@ nav.ol-panel > :last-child { } +.accent-green { + color: var(--accent-green); + font-weight: var( --font-weight-bolder ); +} +.accent-light-blue { + color: var(--accent-light-blue); + font-weight: var( --font-weight-bolder ); +} + .accent-bluefor { color: var(--primary-blue); font-weight: var( --font-weight-bolder ); @@ -467,7 +489,7 @@ nav.ol-panel > :last-child { #unit-info-panel #unit-identification .unit { height:28px; - margin-right:10px; + margin-right:6px; width:28px; } @@ -485,12 +507,12 @@ nav.ol-panel > :last-child { background-color:transparent; border:none; color:white; - font-size:18px; + font-size:16px; font-weight: var( --font-weight-bolder ); outline:none; overflow: hidden; white-space: nowrap; - width: 130px; + width: 150px; } #edit-unit-name { diff --git a/client/src/index.ts b/client/src/index.ts index bf28c498..d58ad7a5 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -102,6 +102,7 @@ function setup() { }); + /* const unitName = document.getElementById( "unit-name" ); if ( unitName instanceof HTMLInputElement ) { @@ -124,6 +125,7 @@ function setup() { }); } + //*/ diff --git a/client/views/unitcontrolpanel.ejs b/client/views/unitcontrolpanel.ejs index 2e6e9bb7..c9b06d7f 100644 --- a/client/views/unitcontrolpanel.ejs +++ b/client/views/unitcontrolpanel.ejs @@ -1,19 +1,19 @@
-
-
-
-
-
18
-
- - - - +
+
+
+
18
+ + + +
+ +
Name
Group
Task
@@ -23,16 +23,38 @@
-
-

Flight data

-
-
-
-
Ground Speed

12

-
Altitude

-
Heading

+
+ +

Flight data

+ +
+
Heading
+
123°
+
Speed
+
323kts
+
Altitude
+
27,414ft
+
+ +

Flight controls

+
+
+
Speed
+
451kts
+
+
+ +
+
+
Altitude
+
21,594ft
+
+ +
+
+

Loadout

@@ -43,20 +65,6 @@
-

Controls

-
-
-
Altitude
-
- -
-
-
Speed
-
- -
-
- @@ -73,4 +81,11 @@
+ +
+ +
+ +
+