forked from c3re/c3re-website
make banner color change by door status
parent
62d67832a9
commit
9201d9fd69
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 121 KiB |
|
@ -258,6 +258,9 @@ a.external:after {
|
|||
background-position-x: center ;
|
||||
background-position-y: top ;
|
||||
}
|
||||
.header.door_open{
|
||||
background-image: url("/img/banner_open.jpg");
|
||||
}
|
||||
.header-wrapper,
|
||||
.footer {
|
||||
width: 90vw;
|
||||
|
|
|
@ -5,6 +5,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
return response.json();
|
||||
})
|
||||
.then(function (data) {
|
||||
let body=document.getElementsByTagName("body")[0];
|
||||
if (data.state.open) {
|
||||
body.classList.remove("door_closed");
|
||||
body.classList.add("door_open");
|
||||
} else {
|
||||
body.classList.remove("door_open");
|
||||
body.classList.add("door_closed");
|
||||
}
|
||||
document
|
||||
.getElementById("ds-img")
|
||||
.setAttribute(
|
||||
|
|
Loading…
Reference in New Issue