hiding banners in focus mode

closes #2752
This commit is contained in:
Miodec 2022-03-22 18:40:15 +01:00
parent 0582662f16
commit 7e30eca23d
2 changed files with 8 additions and 0 deletions

View file

@ -12,6 +12,7 @@ export function set(foc: boolean, withCursor = false): void {
$("#bottom").addClass("focus");
if (!withCursor) $("body").css("cursor", "none");
$("#middle").addClass("focus");
$("#bannerCenter").addClass("focus");
} else if (!foc && state) {
state = false;
Caret.startAnimation();
@ -19,6 +20,7 @@ export function set(foc: boolean, withCursor = false): void {
$("#bottom").removeClass("focus");
$("body").css("cursor", "default");
$("#middle").removeClass("focus");
$("#bannerCenter").removeClass("focus");
}
}

View file

@ -2,6 +2,7 @@
position: fixed;
width: 100%;
z-index: 1000;
transition: 0.25s;
.banner {
background: var(--sub-color);
color: var(--bg-color);
@ -55,4 +56,9 @@
background: var(--error-color);
}
}
&.focus {
opacity: 0;
pointer-events: none;
}
}