Skip to content

Commit 81380a5

Browse files
committed
Add shadow to status bar
1 parent 3f1cabc commit 81380a5

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

web/src/index.htm

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
<body>
1010
<div class="heading">STORINATOR</div>
1111

12-
<button
13-
id="powerStatus"
14-
type="button"
15-
class="button"
16-
disabled
17-
style="height: 5%; font-size: 2vh; color: #b413ff"
18-
>
12+
<button id="powerStatus" type="button" class="statusButton" disabled>
1913
NO CONNECTION
2014
</button>
2115
<button
@@ -88,6 +82,23 @@
8882
background-color: #313131;
8983
}
9084

85+
.statusButton {
86+
height: 5%;
87+
font-size: 2vh;
88+
color: #b413ff;
89+
box-shadow: 0px 0px 2vh #b413ff;
90+
animation: status-shadow ease-in-out 7s infinite alternate;
91+
}
92+
93+
@keyframes status-shadow {
94+
0% {
95+
box-shadow: 0px 0px 3vh #1f1e29;
96+
}
97+
100% {
98+
box-shadow: 0px 0px 3vh currentcolor;
99+
}
100+
}
101+
91102
.activeButton {
92103
cursor: pointer;
93104
}
@@ -127,12 +138,15 @@
127138
if (state == 'on') {
128139
powerStatus.textContent = 'POWERED ON'
129140
powerStatus.style.color = '#27e670'
141+
powerStatus.style.boxShadow.color = '#27e670'
130142
} else if (state == 'off') {
131143
powerStatus.textContent = 'POWERED OFF'
132144
powerStatus.style.color = '#eb1e8f'
145+
powerStatus.style.boxShadow.color = '#eb1e8f'
133146
} else {
134-
powerStatus.style.color = '#b413ff'
135147
powerStatus.textContent = 'NO CONNECTION'
148+
powerStatus.style.color = '#b413ff'
149+
powerStatus.style.boxShadow.color = '#b413ff'
136150
}
137151
}
138152

0 commit comments

Comments
 (0)