mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 14:19:40 +08:00
fixed footer links
This commit is contained in:
parent
e3734f1658
commit
85a2035261
4 changed files with 56 additions and 81 deletions
|
|
@ -372,12 +372,12 @@ export function mean(array) {
|
|||
}
|
||||
|
||||
//https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-88.php
|
||||
export function median (arr) {
|
||||
try{
|
||||
export function median(arr) {
|
||||
try {
|
||||
const mid = Math.floor(arr.length / 2),
|
||||
nums = [...arr].sort((a, b) => a - b);
|
||||
return arr.length % 2 !== 0 ? nums[mid] : (nums[mid - 1] + nums[mid]) / 2;
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -386,7 +386,8 @@ export function getReleasesFromGitHub() {
|
|||
$.getJSON(
|
||||
"https://api.github.com/repos/Miodec/monkeytype/releases",
|
||||
(data) => {
|
||||
$("#bottom .version").text(data[0].name).css("opacity", 1);
|
||||
$("#bottom .version .text").text(data[0].name);
|
||||
$("#bottom .version").css("opacity", 1);
|
||||
$("#versionHistory .releases").empty();
|
||||
data.forEach((release) => {
|
||||
if (!release.draft && !release.prerelease) {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ export function apply(themeName) {
|
|||
|
||||
$(".keymap-key").attr("style", "");
|
||||
$("#currentTheme").attr("href", `themes/${name}.css`);
|
||||
$(".current-theme").text(themeName.replace("_", " "));
|
||||
$(".current-theme .text").text(themeName.replace("_", " "));
|
||||
|
||||
if (themeName === "custom") {
|
||||
colorVars.forEach((e, index) => {
|
||||
|
|
|
|||
|
|
@ -1827,32 +1827,22 @@ key {
|
|||
justify-self: right;
|
||||
gap: 1rem;
|
||||
// align-items: center;
|
||||
.current-theme {
|
||||
transition: 0.25s;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.discordLink {
|
||||
transition: 0.25s;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.left a,
|
||||
.right a {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
&:hover {
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.version {
|
||||
opacity: 0;
|
||||
transition: 0.25s;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: var(--text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4430,64 +4430,48 @@
|
|||
</div>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<div>
|
||||
<a href="https://github.com/Miodec/monkeytype" target="_blank">
|
||||
<i class="fas fa-fw fa-code"></i>
|
||||
GitHub
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="https://www.discord.gg/monkeytype"
|
||||
target="_blank"
|
||||
class="discordLink"
|
||||
>
|
||||
<i class="fab fa-fw fa-discord"></i>
|
||||
Discord
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://twitter.com/monkeytypegame" target="_blank">
|
||||
<i class="fab fa-fw fa-twitter"></i>
|
||||
Twitter
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<span id="supportMeButton">
|
||||
<i class="fas fa-fw fa-donate"></i>
|
||||
Donate
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="security-policy.html" target="_blank">
|
||||
<i class="fas fa-shield-alt"></i>
|
||||
Security
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="privacy-policy.html" target="_blank">
|
||||
<i class="fas fa-lock"></i>
|
||||
Privacy
|
||||
</a>
|
||||
</div>
|
||||
<a href="https://github.com/Miodec/monkeytype" target="_blank">
|
||||
<i class="fas fa-fw fa-code"></i>
|
||||
<div class="text">GitHub</div>
|
||||
</a>
|
||||
<a
|
||||
href="https://www.discord.gg/monkeytype"
|
||||
target="_blank"
|
||||
class="discordLink"
|
||||
>
|
||||
<i class="fab fa-fw fa-discord"></i>
|
||||
<div class="text">Discord</div>
|
||||
</a>
|
||||
<a href="https://twitter.com/monkeytypegame" target="_blank">
|
||||
<i class="fab fa-fw fa-twitter"></i>
|
||||
<div class="text">Twitter</div>
|
||||
</a>
|
||||
<a id="supportMeButton">
|
||||
<i class="fas fa-fw fa-donate"></i>
|
||||
<div class="text">Donate</div>
|
||||
</a>
|
||||
<a href="security-policy.html" target="_blank">
|
||||
<i class="fas fa-shield-alt"></i>
|
||||
<div class="text">Security</div>
|
||||
</a>
|
||||
<a href="privacy-policy.html" target="_blank">
|
||||
<i class="fas fa-lock"></i>
|
||||
<div class="text">Privacy</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div>
|
||||
<span
|
||||
class="current-theme"
|
||||
aria-label="Shift-click to toggle custom theme"
|
||||
data-balloon-pos="left"
|
||||
>
|
||||
<i class="fas fa-palette"></i>
|
||||
serika dark
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="version">
|
||||
<i class="fas fa-code-branch"></i>
|
||||
version
|
||||
</span>
|
||||
</div>
|
||||
<a
|
||||
class="current-theme"
|
||||
aria-label="Shift-click to toggle custom theme"
|
||||
data-balloon-pos="left"
|
||||
>
|
||||
<i class="fas fa-palette"></i>
|
||||
<div class="text">serika dark</div>
|
||||
</a>
|
||||
<a class="version">
|
||||
<i class="fas fa-code-branch"></i>
|
||||
<div class="text">version</div>
|
||||
</a>
|
||||
<!-- <div>
|
||||
<i class="fas fa-file"></i>
|
||||
Terms & Conditions
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue