mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 21:51:29 +08:00
hiding spacers when needed
This commit is contained in:
parent
d8ebc2cde9
commit
8268f3e122
2 changed files with 13 additions and 1 deletions
|
|
@ -1010,6 +1010,11 @@
|
|||
border-radius: calc(var(--roundness) / 2);
|
||||
background: var(--bg-color);
|
||||
margin: auto 1rem;
|
||||
transition: 0.25s;
|
||||
&.scrolled {
|
||||
width: 0;
|
||||
margin: auto 0;
|
||||
}
|
||||
}
|
||||
.textButton {
|
||||
transition: 0.125s;
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ export async function update(
|
|||
) {
|
||||
//show
|
||||
|
||||
$("#testConfig .leftSpacer").removeClass("scrolled");
|
||||
$("#testConfig .puncAndNum")
|
||||
.css({
|
||||
opacity: 0,
|
||||
|
|
@ -112,7 +113,7 @@ export async function update(
|
|||
puncAndNumVisible[current] == false
|
||||
) {
|
||||
//hide
|
||||
|
||||
$("#testConfig .leftSpacer").addClass("scrolled");
|
||||
$("#testConfig .puncAndNum")
|
||||
.css({
|
||||
opacity: 1,
|
||||
|
|
@ -128,6 +129,12 @@ export async function update(
|
|||
);
|
||||
}
|
||||
|
||||
if (current == "zen") {
|
||||
$("#testConfig .rightSpacer").addClass("scrolled");
|
||||
} else {
|
||||
$("#testConfig .rightSpacer").removeClass("scrolled");
|
||||
}
|
||||
|
||||
// const currentWidth = Math.round(
|
||||
// document.querySelector("#testConfig .row")?.getBoundingClientRect().width ??
|
||||
// 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue