Skip to content

Commit

Permalink
bulb: Cleaned up beacon CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
DougLau committed Feb 12, 2025
1 parent 1bde427 commit ca8b6a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
10 changes: 5 additions & 5 deletions bulb/src/beacon.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2022-2024 Minnesota Department of Transportation
// Copyright (C) 2022-2025 Minnesota Department of Transportation
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -147,11 +147,11 @@ impl Beacon {
"<div class='title row'>{name} {item_states}</div>\
<div class='beacon-container row center'>\
<button id='ob_flashing' disabled></button>\
<label for='ob_flashing' class='beacon-disabled'>\
<label for='ob_flashing' class='signal-housing'>\
<span class='{flashing}'>🔆</span>\
</label>\
<span class='beacon-sign tiny'>{message}</span>\
<label for='ob_flashing' class='beacon-disabled'>\
<label for='ob_flashing' class='signal-housing'>\
<span class='{flashing} flash-delayed'>🔆</span>\
</label>\
</div>"
Expand Down Expand Up @@ -181,11 +181,11 @@ impl Beacon {
</div>\
<div class='beacon-container row center'>\
<button id='ob_flashing'></button>\
<label for='ob_flashing' class='beacon'>\
<label for='ob_flashing' class='beacon signal-housing'>\
<span class='{flashing}'>🔆</span>\
</label>\
<span class='beacon-sign'>{message}</span>\
<label for='ob_flashing' class='beacon'>\
<label for='ob_flashing' class='beacon signal-housing'>\
<span class='{flashing} flash-delayed'>🔆</span>\
</label>\
</div>\
Expand Down
26 changes: 12 additions & 14 deletions bulb/static/bulb.css
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,18 @@ label:has(+ #sb_resource) {
margin: 0;
}

/* ---------------
* Signal Housings
* --------------- */
.signal-housing {
align-self: start;
background-color: black;
text-indent: 0;
padding: 0.2rem 0.2rem 0 0.2rem;
border-radius: 0.2rem;
border: 1px solid black;
}

/* -------
* Beacons
* ------- */
Expand All @@ -453,20 +465,6 @@ label:has(+ #sb_resource) {
.beacon {
cursor: pointer;
pointer-events: auto;
align-self: start;
background-color: black;
text-indent: 0;
padding: 0.15rem 0.1rem 0 0.1rem;
border-radius: 0.4rem;
border: 1px solid black;
}
.beacon-disabled {
align-self: start;
background-color: black;
text-indent: 0;
padding: 0.15rem 0.1rem 0 0.1rem;
border-radius: 0.4rem;
border: 1px solid black;
}
.not-flashing {
opacity: 0;
Expand Down

0 comments on commit ca8b6a2

Please sign in to comment.