mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-10 13:44:27 +08:00
added scroll to top buttons
This commit is contained in:
parent
4ebd60b25b
commit
918567f348
3 changed files with 30 additions and 0 deletions
|
@ -2438,6 +2438,26 @@ key {
|
|||
}
|
||||
}
|
||||
|
||||
.scrollToTopButton {
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
position: fixed;
|
||||
font-size: 2rem;
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
text-align: center;
|
||||
line-height: 4rem;
|
||||
background: var(--bg-color);
|
||||
border-radius: 99rem;
|
||||
z-index: 99;
|
||||
cursor: pointer;
|
||||
color: var(--sub-color);
|
||||
transition: 0.25s;
|
||||
&:hover {
|
||||
color: var(--main-color);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1000px) {
|
||||
#centerContent {
|
||||
.pageSettings .section.themes .buttons,
|
||||
|
|
|
@ -1343,6 +1343,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="page pageSettings hidden">
|
||||
<div class="scrollToTopButton">
|
||||
<i class="fas fa-angle-double-up"></i>
|
||||
</div>
|
||||
<div class="tip">
|
||||
tip: You can also change all these settings quickly using the
|
||||
command line (
|
||||
|
@ -2272,6 +2275,9 @@
|
|||
</div>
|
||||
|
||||
<div class="page pageAccount hidden">
|
||||
<div class="scrollToTopButton">
|
||||
<i class="fas fa-angle-double-up"></i>
|
||||
</div>
|
||||
<div class="preloader">
|
||||
<i class="fas fa-fw fa-spin fa-circle-notch"></i>
|
||||
</div>
|
||||
|
|
|
@ -4017,6 +4017,10 @@ $(document).ready(() => {
|
|||
});
|
||||
});
|
||||
|
||||
$(".scrollToTopButton").click((event) => {
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
|
||||
let ctx = $("#wpmChart");
|
||||
let wpmOverTimeChart = new Chart(ctx, {
|
||||
type: "line",
|
||||
|
|
Loading…
Reference in a new issue