Add rotation animation on settings button when loading

This commit is contained in:
Guillaume Gomez 2022-05-04 15:39:18 +02:00
parent 12d3f107c1
commit 13b45aa6c6
3 changed files with 14 additions and 1 deletions

View file

@ -1401,6 +1401,18 @@ pre.rust {
cursor: pointer;
}
@keyframes rotating {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
#settings-menu.rotate img {
animation: rotating 2s linear infinite;
}
#help-button {
font-family: "Fira Sans", Arial, sans-serif;
text-align: center;

View file

@ -300,8 +300,8 @@ function loadCss(cssFileName) {
document.head.append(script);
}
getSettingsButton().onclick = event => {
addClass(getSettingsButton(), "rotate");
event.preventDefault();
loadScript(window.settingsJS);
};

View file

@ -272,5 +272,6 @@
if (!isSettingsPage) {
switchDisplayedElement(settingsMenu);
}
removeClass(getSettingsButton(), "rotate");
}, 0);
})();