diff --git a/new/download.html b/new/download.html
index afbcee5..21337d8 100644
--- a/new/download.html
+++ b/new/download.html
@@ -49,7 +49,11 @@
-
+
+
+
@@ -91,33 +95,6 @@
const getCardTemplate = item => `{{ include "/includes/card.html" }}`;
const modulesCount = document.getElementById('modules-count');
- function renderList(list) {
- if (groupBy === 'type') {
- const groupedData = Object.entries(packageManager.group(groupBy)).filter(([_, items]) => !!items.length)
- document.getElementById('side-panel-packages').innerHTML = `
-
-
Namespaces
- ${groupedData.map(([k]) => `
${k}`).join('')}
-
`;
- document.getElementById('packages').innerHTML = groupedData.map(([category, items]) => `
-
- ${category}
- ${items.map(item => getCardTemplate({ ...item, state: packages.includes(item.path) })).join('')}
-`).join('')
- return;
- }
-
- document.getElementById('side-panel-packages').innerHTML = '';
- document.getElementById('packages').innerHTML = `
-
- ${list.map(item => getCardTemplate({ ...item, state: packages.includes(item.path) })).join('')}
-
`;
- };
-
- packageManager.getPackages().then(() => {
- renderList(packageManager.group(groupBy))
- })
-
document.getElementById('search-package').addEventListener('input', ({ target: { value } }) => {
packageManager.setFilterValue(value.toLowerCase());
renderList(packageManager.group(groupBy))
diff --git a/new/includes/card.html b/new/includes/card.html
index c84231a..e332d0a 100644
--- a/new/includes/card.html
+++ b/new/includes/card.html
@@ -29,7 +29,9 @@
- latest
+
diff --git a/new/resources/css/download.css b/new/resources/css/download.css
index 40c7399..e3e9f58 100644
--- a/new/resources/css/download.css
+++ b/new/resources/css/download.css
@@ -43,7 +43,11 @@ html {
display: flex;
flex-direction: column;
position: sticky;
- top: 0;
+ top: 100px;
+}
+
+#download-link>button {
+ font-size: 1rem;
}
#platform {
@@ -273,4 +277,12 @@ select {
background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16.1px) calc(1px + 50%);
background-size: 4px 4px, 4px 4px;
background-repeat: no-repeat;
+}
+
+.package-version {
+ height: 50%;
+ font-size: 80%;
+ width: 4rem;
+ padding-top: unset;
+ padding-bottom: unset;
}
\ No newline at end of file
diff --git a/new/resources/js/download.js b/new/resources/js/download.js
index 92dad31..3e10942 100644
--- a/new/resources/js/download.js
+++ b/new/resources/js/download.js
@@ -1,3 +1,7 @@
+const BASE_API_PATH = 'https://localhost/api';
+const pkgURL = `${BASE_API_PATH}/packages`;
+const downloadURL = `${BASE_API_PATH}/download`;
+
class Package {
/**
* @typedef {Object} Module
@@ -20,9 +24,6 @@ class Package {
* @property {string} name
*/
- /** @type {string} */
- pkgURL = "https://localhost/api/packages";
-
/**
* @type {ReadonlyArray