mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 05:03:39 +08:00
refactor: use button instead of div
This commit is contained in:
parent
a68af7cb56
commit
5a06954f02
5 changed files with 13 additions and 33 deletions
|
|
@ -42,14 +42,10 @@
|
|||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
gap: 1rem;
|
||||
button,
|
||||
.button {
|
||||
text-decoration: none;
|
||||
font-size: 1.5rem;
|
||||
padding: 2rem 0;
|
||||
.fas,
|
||||
.fab {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,16 +17,6 @@ $(document.body).on("click", "#contactPopupWrapper", (e) => {
|
|||
}
|
||||
});
|
||||
|
||||
$(document.body).on(
|
||||
"keypress",
|
||||
"#contactPopupButton, #contactPopupButton2",
|
||||
(e) => {
|
||||
if (e.key === "Enter") {
|
||||
$(e.currentTarget).trigger("click");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(document).on("keydown", (e) => {
|
||||
if (e.key === "Escape" && isPopupVisible(wrapperId)) {
|
||||
hide();
|
||||
|
|
|
|||
|
|
@ -41,12 +41,6 @@ $("#popups").on("click", "#supportMeWrapper a.button", () => {
|
|||
hide();
|
||||
});
|
||||
|
||||
$(document).on("keypress", "#supportMeButton, #supportMeAboutButton", (e) => {
|
||||
if (e.key === "Enter") {
|
||||
$(e.currentTarget).trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("keydown", (e) => {
|
||||
if (e.key === "Escape" && isPopupVisible(wrapperId)) {
|
||||
hide();
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
</div>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<div class="textButton" id="contactPopupButton">
|
||||
<button class="textButton" id="contactPopupButton">
|
||||
<i class="fas fa-fw fa-envelope"></i>
|
||||
<div class="text">Contact</div>
|
||||
</div>
|
||||
<div id="supportMeButton" class="textButton">
|
||||
</button>
|
||||
<button id="supportMeButton" class="textButton">
|
||||
<i class="fas fa-fw fa-donate"></i>
|
||||
<div class="text">Support</div>
|
||||
</div>
|
||||
</button>
|
||||
<a
|
||||
href="https://github.com/monkeytypegame/monkeytype"
|
||||
class="textButton"
|
||||
|
|
@ -69,21 +69,21 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div
|
||||
<button
|
||||
class="current-theme textButton"
|
||||
aria-label="Shift-click to toggle custom theme"
|
||||
data-balloon-pos="left"
|
||||
>
|
||||
<i class="fas fa-fw fa-palette"></i>
|
||||
<div class="text">serika dark</div>
|
||||
</div>
|
||||
<div id="versionGroup" class="hidden">
|
||||
</button>
|
||||
<button id="versionGroup" class="hidden">
|
||||
<div class="version textButton">
|
||||
<i class="fas fa-fw fa-code-branch"></i>
|
||||
<div class="text">version</div>
|
||||
</div>
|
||||
<key id="newVersionIndicator" class="hidden">new</key>
|
||||
</div>
|
||||
</button>
|
||||
<!-- <div>
|
||||
<i class="fas fa-file"></i>
|
||||
Terms & Conditions
|
||||
|
|
|
|||
|
|
@ -150,10 +150,10 @@
|
|||
possible without you and your continued support.
|
||||
</p>
|
||||
<div class="supportButtons">
|
||||
<div class="button" id="supportMeAboutButton">
|
||||
<button id="supportMeAboutButton">
|
||||
<div class="fas fa-donate"></div>
|
||||
Support
|
||||
</div>
|
||||
</button>
|
||||
<!-- <a class="button ads">
|
||||
<div class="fas fa-ad"></div>
|
||||
Ads
|
||||
|
|
@ -194,10 +194,10 @@
|
|||
here are the different ways you can contact me directly.
|
||||
</p>
|
||||
<div class="contactButtons">
|
||||
<div class="button" id="contactPopupButton2">
|
||||
<button id="contactPopupButton2">
|
||||
<div class="fas fa-envelope"></div>
|
||||
Mail
|
||||
</div>
|
||||
</button>
|
||||
<a
|
||||
class="button"
|
||||
href="https://twitter.com/monkeytypegame"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue