Add rotation animation on settings button when loading
This commit is contained in:
parent
12d3f107c1
commit
13b45aa6c6
3 changed files with 14 additions and 1 deletions
|
@ -1401,6 +1401,18 @@ pre.rust {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes rotating {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#settings-menu.rotate img {
|
||||||
|
animation: rotating 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
#help-button {
|
#help-button {
|
||||||
font-family: "Fira Sans", Arial, sans-serif;
|
font-family: "Fira Sans", Arial, sans-serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -300,8 +300,8 @@ function loadCss(cssFileName) {
|
||||||
document.head.append(script);
|
document.head.append(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getSettingsButton().onclick = event => {
|
getSettingsButton().onclick = event => {
|
||||||
|
addClass(getSettingsButton(), "rotate");
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
loadScript(window.settingsJS);
|
loadScript(window.settingsJS);
|
||||||
};
|
};
|
||||||
|
|
|
@ -272,5 +272,6 @@
|
||||||
if (!isSettingsPage) {
|
if (!isSettingsPage) {
|
||||||
switchDisplayedElement(settingsMenu);
|
switchDisplayedElement(settingsMenu);
|
||||||
}
|
}
|
||||||
|
removeClass(getSettingsButton(), "rotate");
|
||||||
}, 0);
|
}, 0);
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue