Skip to content

Commit 5675fa8

Browse files
authored
Merge pull request #136 from HyperloopUPV-H8/control-station/gauge
[control-station] Gauge component
2 parents eeaf72b + d521d9a commit 5675fa8

7 files changed

Lines changed: 38 additions & 21 deletions

File tree

control-station/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
type="image/svg+xml"
88
href="/vite.svg"
99
/>
10+
<link rel="preconnect" href="https://fonts.googleapis.com">
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12+
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
1013
<meta
1114
name="viewport"
1215
content="width=device-width, initial-scale=1.0"

control-station/package-lock.json

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.backgroundArc {
2-
stroke: rgba(0, 0, 0, 0.049);
2+
stroke: #c4d7e5a1;
33
}
44

55
.radialShadowArc {
@@ -9,16 +9,16 @@
99
.rainbowArc {
1010
background: conic-gradient(
1111
from 220deg,
12-
#7295ef,
13-
60deg,
14-
#7aefcc,
15-
130deg,
16-
#efe84a,
17-
190deg,
18-
#ffab2c,
19-
240deg,
20-
#ff1e1e,
21-
330deg,
22-
#7295ef
12+
#91e473,
13+
40deg,
14+
#9BF37C,
15+
80deg,
16+
#F4E55E,
17+
120deg,
18+
#F4E55E,
19+
220deg,
20+
#F3785C,
21+
310deg,
22+
#F3785C
2323
);
2424
}

control-station/src/components/GaugeTag/GaugeTag.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
@use "../../styles/colors";
2+
13
.gaugeTagWrapper {
24
display: grid;
35
grid-template-columns: min-content;
46
justify-items: center;
57
align-items: center;
68
margin-bottom: -1.87em;
9+
background-color: map-get($map: colors.$key-colors, $key: lightskyblue);
10+
padding: 1rem;
11+
border-radius: 100%;
712
}
813

914
.gauge {
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../../styles/fonts.scss";
2+
13
.textData {
24
display: flex;
35
flex-direction: column;
@@ -10,19 +12,22 @@
1012

1113
.name {
1214
font-weight: inherit;
13-
font-size: 0.7em;
14-
font-weight: 400;
15+
font-family: map-get($map: fonts.$font-families, $key: roboto);
16+
font-size: map-get($map: fonts.$font-sizes, $key: x-small);
17+
font-weight: map-get($map: fonts.$font-weights, $key: light);
18+
font-style: italic;
1519
}
1620

1721
.value {
18-
font-family: var(--font-mono);
22+
font-family: map-get($map: fonts.$font-families, $key: roboto);
1923
font-size: 1.8em;
20-
font-weight: 600;
24+
font-weight: map-get($map: fonts.$font-weights, $key: bold);
2125
}
2226

2327
.units {
2428
font-weight: inherit;
25-
font-size: 1em;
26-
font-weight: 400;
29+
font-family: map-get($map: fonts.$font-families, $key: roboto);
30+
font-size: map-get($map: fonts.$font-sizes, $key: small);
31+
font-weight: map-get($map: fonts.$font-weights, $key: normal);
2732
}
2833
}

control-station/src/styles/colors.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ $key-colors: (
66
stable: hsl(73, 68%, 40%),
77
fault: hsl(0, 68%, 40%),
88
warning: hsl(49, 90%, 40%),
9-
neutral: hsl(0, 0%, 40%)
9+
neutral: hsl(0, 0%, 40%),
10+
lightskyblue: hsl(206, 100%, 96%),
1011
);
1112

1213
$lightnesses: 0, 10, 15, 20, 30, 40, 50, 60, 70, 80, 85, 90, 95, 99, 100;

control-station/src/styles/fonts.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
$font-families: (
44
sans: "Inter",
55
mono: "JetBrains Mono, IBM Plex Mono, monospace",
6+
roboto: "Roboto"
67
);
78

89
$font-sizes: (

0 commit comments

Comments
 (0)