font replacements

This commit is contained in:
zyqunix 2024-12-02 22:44:29 +01:00
parent 30587e0317
commit 2b56853761
9 changed files with 28 additions and 33 deletions

12
404.css
View file

@ -1,3 +1,13 @@
@font-face {
font-family: 'Hack';
src: url('/Fonts/Hack/Hack-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'JetBrainsMono';
src: url('/Fonts/JetBrainsMono/JetBrainsMono-Regular.woff2');
}
body {
display: flex;
justify-content: center;
@ -8,8 +18,10 @@ body {
background-color: #2a2a2a;
transition: background-color 0.3s, color 0.3s;
color: white;
font-family: 'Hack', 'JetBrainsMono', monospace;
}
.main {
text-align: center;
background-color: #4b4b4b;

View file

@ -21,7 +21,7 @@ body {
padding: 20px;
flex-direction: column;
overflow: hidden;
font-family: 'JetBrainsMono', 'Hack', monospace;
font-family: 'Hack', 'JetBrainsMono', monospace;
}
.top {

View file

@ -17,7 +17,7 @@ body {
background-color: #2a2a2a;
user-select: none;
transition: background-color 0.3s, color 0.3s;
font-family: 'JetBrainsMono', 'Hack', monospace;
font-family: 'Hack', 'JetBrainsMono', monospace;
}
button, p {

View file

@ -10,7 +10,7 @@
body {
background-color: #505050;
font-family: 'JetBrainsMono', 'Hack', monospace;
font-family: 'Hack', 'JetBrainsMono', monospace;
margin: 20px 40px 20px 40px;
display: flex;
justify-content: center;

View file

@ -30,8 +30,6 @@
</button>
<button class="reset" id="reset">Reset</button>
<button class="button" id="font-button">Enable Funny Font</button>
</div>

View file

@ -5,7 +5,6 @@ const help = document.getElementById('help');
const container = document.getElementById('container');
const seperator = document.getElementById('seperator');
const counterMain = document.getElementById('key-counters');
const fontButton = document.getElementById('font-button');
let isLightMode = false;
@ -41,35 +40,10 @@ document.addEventListener("keydown", (e) => {
logKey(e.key);
});
help.addEventListener('click', function () {
alert('Press any key to see how many times it was pressed.')
});
let isFunnyFont = false;
fontButton.addEventListener('click', function() {
if (!isFunnyFont) {
document.querySelectorAll("*").forEach((e) => {
e.style.fontFamily = "crueltysquad";
});
isFunnyFont = true;
console.log(isFunnyFont);
document.getElementById('font-button').innerHTML = "Disable Funny Font";
} else {
document.querySelectorAll("*").forEach((e) => {
e.style.fontFamily = "monospace";
});
isFunnyFont = false;
console.log(isFunnyFont)
document.getElementById('font-button').innerHTML = "Enable Funny Font";
}
});
themeToggle.addEventListener('click', function() {
if (!isLightMode) {
document.getElementById('navBar').style.backgroundColor = "rgba(200,200,200,0.775)";

View file

@ -17,7 +17,7 @@ body {
transition: background-color 0.3s, color 0.3s;
overflow-x: hidden;
overflow-y: visible;
font-family: 'JetBrainsMono', 'Hack', monospace;
font-family: 'Hack', 'JetBrainsMono', monospace;
}
* {

View file

@ -20,7 +20,7 @@ body {
background-color: #2a2a2a;
color: #f0f0f0;
overflow-x: hidden;
font-family: 'JetBrainsMono', 'Hack', monospace;
font-family: 'Hack', 'JetBrainsMono', monospace;
}
html {

View file

@ -1,3 +1,13 @@
@font-face {
font-family: 'Hack';
src: url('/Fonts/Hack/Hack-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'JetBrainsMono';
src: url('/Fonts/JetBrainsMono/JetBrainsMono-Regular.woff2');
}
body {
display: flex;
justify-content: center;
@ -10,6 +20,7 @@ body {
background-color: #2a2a2a;
color: #f0f0f0;
overflow-x: hidden;
font-family: 'Hack', 'JetBrainsMono', monospace;
}
html {