Skip to content

Commit 8a5f07a

Browse files
Fix 4 bugs
- Fixes Cards would be to tall to fit on screen when aspect ratio is greater than 1.6 Hotkey to hide settings would trigger when typing in textboxes On narrow screens, the counter would overlap with the channel name Comma and negative sign not changing color when odometer update colors are set
1 parent 0f332a8 commit 8a5f07a

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

top50/index.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ label,h1,h2,h3,h4,h5,h6,p {
3333
}
3434

3535
.card {
36-
height: 5.5vw;
36+
height: 4.25vw;
3737
padding: 0.1vw;
3838
margin: 0.2vw;
3939
text-align: left;
@@ -57,7 +57,7 @@ label,h1,h2,h3,h4,h5,h6,p {
5757
font-size: 2vw;
5858
font-family: 'Roboto', sans-serif;
5959
padding-left: 0.2vw;
60-
margin-top: calc(1vw - 2vh);
60+
margin-top: 0;
6161
src: url('../../fonts/Roboto-Regular.ttf') format('truetype');
6262
}
6363

top50/index.js

+26-25
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,17 @@ function setupDesign(list, sort, order) {
270270
let cards = parseInt(data.theme.split('H')[0].split('top')[1]);
271271
toReturn[1] = "margin-top: 0px; display: grid; grid-template-columns: repeat(10, 1fr);";
272272
if (cards == 100) {
273-
toReturn[2] = `.image { height: 2.15vw; width: 2.15vw; }
274-
.card { height: ${data.showDifferences ? '2.9vw' : '2.15vw'}; }
275-
.count { font-size: 1vw; }
276-
.name { font-size: 0.75vw; }
277-
.subgap {font-size: 0.75vw; }`;
273+
toReturn[2] = `.image { height: ${data.showDifferences ? 1.5 : 2.15}vw; width: ${data.showDifferences ? 1.5 : 2.15}vw; }
274+
.card { height: 2.15vw; }
275+
.count { font-size: ${data.showDifferences ? 0.7 : 1}vw; }
276+
.name { font-size: ${data.showDifferences ? 0.5 : 0.75}vw; }
277+
.subgap { font-size: 0.7vw;}`;
278278
} else if (cards == 150) {
279-
toReturn[2] = `.image { height: 2.15vw; width: 2.15vw; }
280-
.card { height: ${data.showDifferences ? '2.9vw' : '2.15vw'}; }
281-
.count { font-size: 1vw; }
282-
.name { font-size: 0.75vw; }
283-
.subgap { font-size: 0.75vw; }`;
279+
toReturn[2] = `.image { height: ${data.showDifferences ? 1.5 : 2.15}vw; width: ${data.showDifferences ? 1.5 : 2.15}vw; }
280+
.card { height: 2.15vw; }
281+
.count { font-size: ${data.showDifferences ? 0.7 : 1}vw; }
282+
.name { font-size: ${data.showDifferences ? 0.5 : 0.75}vw; }
283+
.subgap { font-size: 0.7vw;}`;
284284
} else {
285285
toReturn[1] = "margin-top: 0px; display: grid; grid-template-columns: repeat(5, 1fr);";
286286
}
@@ -335,24 +335,24 @@ function setupDesign(list, sort, order) {
335335
}
336336
if (data.theme == 'top100') {
337337
toReturn[1] = "margin-top: 0px; display: grid; grid-template-columns: repeat(10, 1fr);";
338-
toReturn[2] = `.image { height: 2.15vw; width: 2.15vw; }
339-
.card { height: ${data.showDifferences ? '2.9vw' : '2.15vw'}; }
340-
.count { font-size: 1vw; }
341-
.name { font-size: 0.75vw; }
342-
.subgap { font-size: 0.75vw; }`;
338+
toReturn[2] = `.image { height: ${data.showDifferences ? 1.5 : 2.15}vw; width: ${data.showDifferences ? 1.5 : 2.15}vw; }
339+
.card { height: 2.15vw; }
340+
.count { font-size: ${data.showDifferences ? 0.7 : 1}vw; }
341+
.name { font-size: ${data.showDifferences ? 0.5 : 0.75}vw; }
342+
.subgap { font-size: 0.7vw;}`;
343343
} else if (data.theme == 'top150') {
344344
toReturn[1] = "margin-top: 0px; display: grid; grid-template-columns: repeat(10, 1fr);";
345-
toReturn[2] = `.image { height: 2.15vw; width: 2.15vw; }
346-
.card { height: ${data.showDifferences ? '2.9vw' : '2.15vw'}; }
347-
.count { font-size: 1vw; }
348-
.name { font-size: 0.75vw; }
349-
.subgap { font-size: 0.75vw;}`;
345+
toReturn[2] = `.image { height: ${data.showDifferences ? 1.5 : 2.15}vw; width: ${data.showDifferences ? 1.5 : 2.15}vw; }
346+
.card { height: 2.15vw; }
347+
.count { font-size: ${data.showDifferences ? 0.7 : 1}vw; }
348+
.name { font-size: ${data.showDifferences ? 0.5 : 0.75}vw; }
349+
.subgap { font-size: 0.7vw;}`;
350350
toReturn[1] = "margin-top: 0px; display: grid; grid-template-columns: repeat(10, 1fr);";
351351
} else {
352-
toReturn[2] = `.image { height: 4.25vw; width: 4.25vw; }
353-
.card { height: ${data.showDifferences ? '5.5vw' : '4.25vw'}; }
354-
.count { font-size: 2vw; }
355-
.name { font-size: 1.5vw; }
352+
toReturn[2] = `.image { height: ${data.showDifferences ? 3 : 4.25}vw; width: ${data.showDifferences ? 3 : 4.25}vw; }
353+
.card { height: 4.25vw; }
354+
.count { font-size: ${data.showDifferences ? 1.4 : 2}vw; }
355+
.name { font-size: ${data.showDifferences ? 1.05 : 1.5}vw; }
356356
.subgap {font-size: 1.25vw;}`;
357357
toReturn[1] = "margin-top: 0px; display: grid; grid-template-columns: repeat(5, 1fr);";
358358
}
@@ -1125,7 +1125,7 @@ function fix() {
11251125
}
11261126
let odometerStyles = document.getElementById('odometerStyles')
11271127
odometerStyles.innerText = '';
1128-
odometerStyles.innerText += `.odometer.odometer-auto-theme.odometer-animating-up.odometer-animating .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-up.odometer-animating .odometer-ribbon-inner {
1128+
odometerStyles.innerText += `.odometer.odometer-auto-theme.odometer-animating-up.odometer-animating .odometer-inside, .odometer.odometer-theme-default.odometer-animating-up.odometer-animating .odometer-inside {
11291129
color: ${data.odometerUp};
11301130
}`
11311131
odometerStyles.innerText += `.odometer.odometer-auto-theme.odometer-animating-down.odometer-animating .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-down.odometer-animating .odometer-ribbon-inner {
@@ -1452,6 +1452,7 @@ function hideSettings() {
14521452
}
14531453

14541454
document.addEventListener('keydown', function (e) {
1455+
if (e.target && e.target.tagName === 'INPUT') return;
14551456
if (e.key == data.hideSettings) {
14561457
if (document.getElementById('settings').style.display == "none") {
14571458
document.getElementById('settings').style.display = "block";

0 commit comments

Comments
 (0)