From 0c77f1fd2f16dd610dff58117ec92a2a2644ee68 Mon Sep 17 00:00:00 2001
From: zumbiepig <121742281+zumbiepig@users.noreply.github.com>
Date: Mon, 2 Sep 2024 21:18:03 -0700
Subject: [PATCH] pls fix the buttons
---
public/mods/mods/index.html | 8 +++---
public/mods/resourcepacks/index.html | 2 +-
public/resources/styles/themes/default.css | 30 +++++++++++++---------
public/settings/index.html | 4 +--
src/resources/scripts/main.ts | 22 ++++++++--------
5 files changed, 36 insertions(+), 30 deletions(-)
diff --git a/public/mods/mods/index.html b/public/mods/mods/index.html
index ee0e971..062c3e8 100644
--- a/public/mods/mods/index.html
+++ b/public/mods/mods/index.html
@@ -54,10 +54,10 @@
+
+
diff --git a/public/mods/resourcepacks/index.html b/public/mods/resourcepacks/index.html
index 6335b76..226a854 100644
--- a/public/mods/resourcepacks/index.html
+++ b/public/mods/resourcepacks/index.html
@@ -54,7 +54,7 @@
diff --git a/public/resources/styles/themes/default.css b/public/resources/styles/themes/default.css
index 0088a1b..b4a96ea 100644
--- a/public/resources/styles/themes/default.css
+++ b/public/resources/styles/themes/default.css
@@ -185,8 +185,7 @@ nav {
flex-direction: column;
background-color: #202020;
box-sizing: border-box;
- position: relative;
- overflow: auto;
+ overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #555 #333;
}
@@ -207,13 +206,12 @@ nav {
.installations {
display: flex;
- flex: 1;
align-items: center;
justify-content: space-between;
width: 100%;
background-color: #292929;
box-sizing: border-box;
- position: absolute;
+ position: sticky;
bottom: 0;
left: 0;
padding: 10px 20px;
@@ -452,7 +450,6 @@ nav {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
- max-height: 100%;
padding: 10px;
text-align: center;
scrollbar-width: thin;
@@ -465,6 +462,8 @@ nav {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
padding: 10px;
text-align: center;
+ position: relative;
+ padding-bottom: 30px;
}
.mod-item .mod-icon {
@@ -506,10 +505,17 @@ nav {
.mod-item .mod-links {
display: flex;
justify-content: space-around;
- margin-top: 10px;
+ position: absolute;
+ bottom: 10px;
+ width: 100%;
}
-.mod-item .mod-download {
+.mod-item .mod-links .mod-download,
+.mod-item .mod-links .mod-install {
+ flex: 1;
+}
+
+.mod-item .mod-links .mod-download {
padding: 5px 15px;
background-color: #555;
color: #fff;
@@ -518,12 +524,12 @@ nav {
transition: background-color 0.3s;
}
-.mod-item .mod-download:hover {
+.mod-item .mod-links .mod-download:hover {
cursor: pointer;
background-color: #777;
}
-.mod-item .mod-install {
+.mod-item .mod-links .mod-install {
padding: 5px 15px;
background-color: #4c4;
color: #fff;
@@ -532,16 +538,16 @@ nav {
transition: background-color 0.3s;
}
-.mod-item .mod-install:hover {
+.mod-item .mod-links .mod-install:hover {
cursor: pointer;
background-color: #00b300;
}
-.mod-item .mod-install.installed {
+.mod-item .mod-links .mod-install.installed {
background-color: #ff0000;
}
-.mod-item .mod-install.installed:hover {
+.mod-item .mod-links .mod-install.installed:hover {
background-color: #cc0000;
}
diff --git a/public/settings/index.html b/public/settings/index.html
index 1b94628..6d6cfa3 100644
--- a/public/settings/index.html
+++ b/public/settings/index.html
@@ -66,10 +66,10 @@
-->
-
+
diff --git a/src/resources/scripts/main.ts b/src/resources/scripts/main.ts
index f756153..6527757 100644
--- a/src/resources/scripts/main.ts
+++ b/src/resources/scripts/main.ts
@@ -395,7 +395,7 @@ if (window.location.pathname === '/') {
}
});
- if (storage.local.get('showAds')) {
+ /* if (storage.local.get('showAds')) {
const googleAdsScript = document.createElement('script');
googleAdsScript.async = true;
googleAdsScript.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1132419379737567';
@@ -412,7 +412,7 @@ if (window.location.pathname === '/') {
adsContainer.style.display = 'flex';
});
});
- }
+ } */
}
if (window.location.pathname === '/settings/') {
@@ -421,8 +421,8 @@ if (window.location.pathname === '/settings/') {
const usernameInput = document.getElementById('username-input') as HTMLInputElement;
const themeSelect = document.getElementById('theme-select') as HTMLSelectElement;
// const offlineCheckbox = document.getElementById('offline-checkbox') as HTMLInputElement;
- const adsCheckbox = document.getElementById('ads-checkbox') as HTMLInputElement;
- const themeData: { id: string; name: string }[] = (await(await fetch('/resources/data.json')).json()).themes;
+ // const adsCheckbox = document.getElementById('ads-checkbox') as HTMLInputElement;
+ const themeData: { id: string; name: string }[] = (await (await fetch('/resources/data.json')).json()).themes;
themeData.forEach((theme: { id: string; name: string }) => {
const option = document.createElement('option');
@@ -434,7 +434,7 @@ if (window.location.pathname === '/settings/') {
usernameInput.placeholder = storage.local.get('username') ?? '';
themeSelect.value = storage.local.get('theme') ?? '';
// offlineCheckbox.checked = storage.local.get('offlineCache') ?? false;
- adsCheckbox.checked = storage.local.get('showAds');
+ // adsCheckbox.checked = storage.local.get('showAds');
usernameInput.addEventListener('input', () => {
let username = usernameInput.value.replace(/[^A-Za-z0-9]/g, '_').substring(0, 16);
@@ -460,11 +460,11 @@ if (window.location.pathname === '/settings/') {
}
}); */
- adsCheckbox.addEventListener('change', () => {
+ /* adsCheckbox.addEventListener('change', () => {
storage.local.set('showAds', adsCheckbox.checked);
const adsContainers = Array.from(document.getElementsByClassName('ads-container')) as HTMLElement[];
adsContainers.forEach((adsContainer) => (adsContainer.style.display = 'none'));
- });
+ }); */
});
} else if (window.location.pathname === '/welcome/') {
document.addEventListener('DOMContentLoaded', async () => {
@@ -535,17 +535,17 @@ if (window.location.pathname === '/settings/') {
-
${addon.name}
+
${addon.name}
By ${addon.author}
${addon.description}
-
+
+
-
`;
+ `;
modList?.appendChild(modItem);
});